新增检测app小程序是否开启GPS定位服务,并前往开启,调取费用计算接口、调用查询功能的(客户、项目、备品)列表查询,详情查询接口

master
chen 2022-04-18 17:08:12 +08:00
parent 8dbd9af5b9
commit 49899aa8ed
20 changed files with 1054 additions and 968 deletions

View File

@ -16,8 +16,8 @@
this.globalData.hostapi = 'https://7and5.cn';
// #endif
// #ifdef H5
// this.globalData.hostapi = 'https://7and5.cn';
this.globalData.hostapi = '/web';
this.globalData.hostapi = 'https://7and5.cn';
// this.globalData.hostapi = '/web';
// #endif
},
onShow: function() {
@ -27,6 +27,8 @@
//
this.$toolAll.tools.renewLocationEv();
// }
// GPS
this.$toolAll.tools.checkOpenGPSServiceByAndroidIOS();
},
onHide: function() {

View File

@ -196,7 +196,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;}
background-color: #FFFFFF;
}
.solution-title {
bottom: 0rpx;
bottom: -2rpx;
left: -40rpx;
right: -40rpx;
padding: 6rpx;

View File

@ -18,6 +18,10 @@ export function queryFun(data) {
return request.post("/universal/api.search/search", data);
}
// (客户、项目、备品)详情
export function queryDetail(data) {
return request.post("/universal/api.search/search_info", data);
}
// 处理工单,获取
export function handleWorkOrderGet(data) {

View File

@ -112,7 +112,7 @@ const request = (method, url, options) => {
},
complete: rest => {
// 是否成功,都会执行
console.log(rest,100);
console.log(rest,115);
}
})
})
@ -135,6 +135,7 @@ const uploadFile = (url, options) => {
token:uni.getStorageSync('token') || ''
},
success: res => {
console.log(res,138);
if (res.statusCode == 200) {
let temp = JSON.parse(res.data)
if (temp.code == 1) {

View File

@ -1,4 +1,3 @@
const app = getApp();
import { renewLocation } from './public-api.js';
// 解决微信小程序
var QQMapWX = require('./map/qqmap-wx-jssdk.min.js');
@ -36,7 +35,86 @@ const jsonp = function(url, data) {
document.body.appendChild(scriptNode)
})
}
const tools = {
checkOpenGPSServiceByAndroidIOS() {
// #ifdef APP-PLUS
let system = uni.getSystemInfoSync(); // 获取系统信息
if (system.platform === 'android') { // 判断平台
var context = plus.android.importClass("android.content.Context");
var locationManager = plus.android.importClass("android.location.LocationManager");
var main = plus.android.runtimeMainActivity();
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
uni.showModal({
title: '提示',
content: '请打开定位服务功能',
showCancel: false, // 不显示取消按钮
success() {
if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
var Intent = plus.android.importClass('android.content.Intent');
var Settings = plus.android.importClass('android.provider.Settings');
var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
main.startActivity(intent); // 打开系统设置GPS服务页面
} else {
console.log('GPS功能已开启');
}
}
});
}
} else if (system.platform === 'ios') {
console.log("苹果");
var cllocationManger = plus.ios.import("CLLocationManager");
var enable = cllocationManger.locationServicesEnabled();
var status = cllocationManger.authorizationStatus();
plus.ios.deleteObject(cllocationManger);
if (enable && status != 2) {
console.log("手机系统的定位已经打开");
} else {
console.log("手机系统的定位没有打开");
uni.showModal({
title: '提示',
content: '请前往设置-隐私-定位服务打开定位服务功能',
showCancel: false, // 不显示取消按钮
success() {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
// var setting2 = NSURL2.URLWithString("App-Prefs:root=LOCATION_SERVICES");
var setting2 = NSURL2.URLWithString("app-settings:");
//var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION");
// var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION_SERVICES");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
}
});
}
}
// #endif
// #ifdef MP-WEIXIN
wx.getSetting({
success: (res) => {
console.log(res,99);
if (!res.authSetting['scope.userLocation']) {
//打开提示框,提示前往设置页面
uni.showModal({
title:'为了更好的体验,请开启定位服务',
confirmText:'开启',
cancelText:'关闭',
success:(res)=> {
if(res.confirm) {
wx.openSetting({success (res) {}})
}
}
})
}
}
})
// #endif
},
// 更新用户地理位置
locationTimer:null,
// 每十分钟调用一次
@ -104,10 +182,10 @@ const tools = {
},
// h5
getAddressH5(){
uni.showLoading({
title: '定位中...',
mask:true
});
// uni.showLoading({
// title: '定位中...',
// mask:true
// });
uni.getLocation({
type: 'gcj02', // wgs84 gcj02
altitude: true,
@ -116,7 +194,7 @@ const tools = {
let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}`
jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
// console.log(res,'H5');
uni.hideLoading();
// uni.hideLoading();
if(res.status == 0){
// that.locationName = res.result.address; //当前定位
let params = {
@ -149,7 +227,7 @@ const tools = {
if (res.code) {
var params = {code:res.code}
uni.request({
url: `${app.globalData.hostapi}/api/user/login`,
url: `${getApp().globalData.hostapi}/api/user/login`,
method: 'post',
data: params,
header: {

View File

@ -1,6 +1,6 @@
{
"name" : "飞猴",
"appid" : "__UNI__C9AEDD9",
"appid" : "__UNI__25FB71A",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

View File

@ -1,11 +1,5 @@
{
"pages": [ {
"path": "pages/workOrder/punchCard",
"style": {
"navigationBarTitleText": "个人中心",
"navigationStyle": "custom" //
}
},{
"pages": [{
"path": "pages/guide-page/guide-page",
"style": {
"navigationBarTitleText": "",

View File

@ -3,7 +3,7 @@
<statusNav returnColor="#c2c2c2" navBarTitle="客户(查询结果列表)"></statusNav>
<container-subgroup-two>
<view class="client-content" slot="content" style="margin: -20rpx -30rpx 0;">
<view @tap="goDetail(index)" class="li" v-for="(item,index) in dataList" :key="index">
<view @tap="goDetail(item.id)" class="li" v-for="(item,index) in dataList" :key="index">
<view class="li-content">
<view class="">
<view class="title">{{item.name}}</view>
@ -19,6 +19,7 @@
<view class="text">{{item.address}}</view>
</view>
</view>
<pitera v-if="total==dataList.length" textStr="暂无更多客户列表数据"></pitera>
</view>
</container-subgroup-two>
</view>
@ -26,75 +27,50 @@
<script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import pitera from '@/components/nothing/pitera.vue';
import statusNav from '../../components/status-nav.vue';
import {queryFun} from '../../jsFile/public-api.js';
export default {
components: {
statusNav,
containerSubgroupTwo
containerSubgroupTwo,
pitera
},
data() {
return {
dataList:[
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"12",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"11",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"12",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"14",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"15",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"16",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
],
dataList:[
// {
// name:'',
// code:"KH20220304-002",
// icon:["","",""],
// num:"12",
// address:"1091205"
// }
],
list_rows:20,
page:1,
total:0
total:0,
key_word:''//
}
},
onReachBottom() {
if(this.total != this.dataList.length) {
this.page++;
this.queryFunEv();
}
},
onLoad(op) {
if(op.key_word!=undefined) {
this.key_word = op.key_word;
//
this.queryFunEv(op.key_word);
this.queryFunEv(this.key_word);
}
},
methods: {
//
goDetail(index){
goDetail(id){
uni.navigateTo({
url:'/pages/dataQuery/details'
url:`/pages/dataQuery/details?id=${id}`
})
},
//
@ -107,7 +83,23 @@
}
queryFun(params).then(res=>{
if(res.code) {
this.total = res.data.total;//
if(this.page==1) this.dataList = [];
if(res.data.data.length) {
res.data.data.forEach(item=>{
let obj = {
id:item.member_id,//id
name:item.name,//
code:item.serial_number,//
icon:["弱电安防","弱电安防","弱电安防"],
num:item.project_count,//
address:item.address//
}
this.dataList.push(obj);
})
}
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
}

View File

@ -1,244 +1,227 @@
<template>
<view class="content">
<statusNav returnColor="#c2c2c2" navBarTitle="(备品)查询结果"></statusNav>
<view class="content">
<statusNav returnColor="#c2c2c2" navBarTitle="(备品)查询结果"></statusNav>
<container-subgroup-two >
<view class="dataQuery-content" slot="content" style="margin: 0 -30rpx;">
<view class="li">
<view class="title mar-y120 clips1">
项目名称湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室
</view>
<view class="text-content">
<view class="left">
<view class="text clips1">
核心品牌海康威视
</view>
<view class="text clips1">
规格型号DS-CK18FI-H
</view>
<view class="text clips1">
2210122
</view>
</view>
<view class="rigth">
<view class="text">
备品数量<text class="cor">3</text>
</view>
<view class="text cor1">
备品尺寸320*160
</view>
<view class="text cor1">
入库时间2021-04-06 16:45:45
</view>
</view>
</view>
<view class="icon" v-if="true">
<text class="icon-text">正常</text>
</view>
<view class="icon1" v-else>
<text class="icon-text">待维保</text>
</view>
</view>
<view class="li">
<view class="title">
项目名称湖南工业大学生化学院三楼会议室
</view>
<view class="text-content">
<view class="left">
<view class="text">
核心品牌海康威视
</view>
<view class="text">
规格型号DS-CK18FI-H
</view>
<view class="text">
2210122
</view>
</view>
<view class="rigth">
<view class="text">
备品数量<text class="cor">3</text>
</view>
<view class="text cor1">
备品尺寸320*160
</view>
<view class="text cor1">
入库时间2021-04-06 16:45:45
</view>
</view>
</view>
<view class="icon" v-if="true">
<text class="icon-text">正常</text>
</view>
<view class="icon1" v-else>
<text class="icon-text">待维保</text>
</view>
</view>
<view class="li">
<view class="title">
项目名称湖南工业大学生化学院三楼会议室
</view>
<view class="text-content">
<view class="left">
<view class="text">
核心品牌海康威视
</view>
<view class="text">
规格型号DS-CK18FI-H
</view>
<view class="text">
2210122
</view>
</view>
<view class="rigth">
<view class="text">
备品数量<text class="cor">3</text>
</view>
<view class="text cor1">
备品尺寸320*160
</view>
<view class="text cor1">
入库时间2021-04-06 16:45:45
</view>
</view>
</view>
<view class="icon" v-if="false">
<text class="icon-text">正常</text>
</view>
<view class="icon1" v-else>
<text class="icon-text">待维保</text>
</view>
</view>
</view>
</container-subgroup-two >
</view>
<container-subgroup-two>
<view class="dataQuery-content" slot="content" style="margin: 0 -30rpx;">
<view class="li">
<view class="title mar-y120 clips1">项目名称湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室</view>
<view class="text-content">
<view class="left">
<view class="text clips1">核心品牌海康威视</view>
<view class="text clips1">规格型号DS-CK18FI-H</view>
<view class="text clips1"> 2210122</view>
</view>
<view class="rigth">
<view class="text">备品数量<text class="cor">3</text></view>
<view class="text cor1">备品尺寸320*160</view>
<view class="text cor1">入库时间2021-04-06 16:45:45</view>
</view>
</view>
<view class="icon" v-if="true">
<text class="icon-text">正常</text>
</view>
<view class="icon1" v-else>
<text class="icon-text">待维保</text>
</view>
</view>
<view class="li">
<view class="title">项目名称湖南工业大学生化学院三楼会议室</view>
<view class="text-content">
<view class="left">
<view class="text">核心品牌海康威视</view>
<view class="text">规格型号DS-CK18FI-H</view>
<view class="text"> 2210122</view>
</view>
<view class="rigth">
<view class="text">备品数量<text class="cor">3</text></view>
<view class="text cor1">备品尺寸320*160</view>
<view class="text cor1">入库时间2021-04-06 16:45:45</view>
</view>
</view>
<view class="icon" v-if="true">
<text class="icon-text">正常</text>
</view>
<view class="icon1" v-else>
<text class="icon-text">待维保</text>
</view>
</view>
<view class="li">
<view class="title">项目名称湖南工业大学生化学院三楼会议室</view>
<view class="text-content">
<view class="left">
<view class="text">核心品牌海康威视</view>
<view class="text">规格型号DS-CK18FI-H</view>
<view class="text"> 2210122</view>
</view>
<view class="rigth">
<view class="text">备品数量<text class="cor">3</text></view>
<view class="text cor1">备品尺寸320*160</view>
<view class="text cor1">入库时间2021-04-06 16:45:45</view>
</view>
</view>
<view class="icon" v-if="false">
<text class="icon-text">正常</text>
</view>
<view class="icon1" v-else>
<text class="icon-text">待维保</text>
</view>
</view>
<pitera v-if="total==dataList.length" textStr="暂无更多备品列表数据"></pitera>
</view>
</container-subgroup-two>
</view>
</template>
<script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue';
import {queryFun} from '../../jsFile/public-api.js';
export default {
components: {
statusNav,
containerSubgroupTwo
},
data() {
return {
list_rows:20,
page:1,
total:0
}
},
onLoad(op) {
if(op.key_word!=undefined) {
// ()
this.queryFunEv(op.key_word);
import statusNav from '../../components/status-nav.vue';
import {
queryFun
} from '../../jsFile/public-api.js';
import pitera from '@/components/nothing/pitera.vue';
export default {
components: {
statusNav,
containerSubgroupTwo,
pitera
},
data() {
return {
dataList: [],
list_rows: 20,
page: 1,
total: 0,
key_word: '' //
}
},
methods: {
onReachBottom() {
if (this.total != this.dataList.length) {
this.page++;
this.queryFunEv();
}
},
onLoad(op) {
if (op.key_word != undefined) {
this.key_word = op.key_word;
// ()
this.queryFunEv();
}
},
methods: {
// ()
queryFunEv(keyword){
queryFunEv() {
let params = {
type_id:3,
keyword,
list_rows:this.list_rows,
page:this.page
type_id: 3,
keyword: this.key_word,
list_rows: this.list_rows,
page: this.page
}
queryFun(params).then(res=>{
if(res.code) {
queryFun(params).then(res => {
if (res.code) {
this.total = res.data.total; //
if (this.page == 1) this.dataList = [];
// if(res.data.data.length) {
// res.data.data.forEach(item=>{
// let obj = {
// id:item.member_id,//id
// name:item.name,//
// code:item.serial_number,//
// icon:["","",""],
// num:item.project_count,//
// address:item.address//
// }
// this.projectQuery.push(obj);
// })
// }
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
}
}
}
}
}
</script>
<style>
.dataQuery-content {
font-size: 24rpx;
color: #333333;
margin-top: 15rpx;
}
.dataQuery-content .li {
background-color: #FFFFFF;
padding: 26rpx 28rpx;
.dataQuery-content {
font-size: 24rpx;
color: #333333;
margin-top: 15rpx;
}
margin-bottom: 14rpx;
}
.dataQuery-content .li {
background-color: #FFFFFF;
padding: 26rpx 28rpx;
.dataQuery-content .li {
position: relative;
}
.dataQuery-content .li .text-content {
display: flex;
border-bottom: 2rpx solid #EEEEEE;
padding-bottom: 10rpx;
margin-bottom: 14rpx;
}
}
.dataQuery-content .li {
position: relative;
}
.dataQuery-content .li .text-content .left {
width: 48%;
}
.dataQuery-content .li .text-content {
display: flex;
border-bottom: 2rpx solid #EEEEEE;
padding-bottom: 10rpx;
.dataQuery-content .li .text-content .text {
margin-top: 20rpx;
}
}
.cor {
color: #ff9000;
}
.dataQuery-content .li .text-content .left {
width: 48%;
}
.cor1 {
color: #999999;
}
.dataQuery-content .li .text-content .text {
margin-top: 20rpx;
}
.dataQuery-content .li .icon {
background-image: url(../../static/iocn/zc.png);
width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.cor {
color: #ff9000;
}
.dataQuery-content .li .icon .icon-text {
transform: rotateZ(20deg);
color: #53e5d0;
.cor1 {
color: #999999;
}
}
.dataQuery-content .li .icon {
background-image: url(../../static/iocn/zc.png);
width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.dataQuery-content .li .icon1 {
background-image: url(../../static/iocn/dwx.png);
width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.dataQuery-content .li .icon .icon-text {
transform: rotateZ(20deg);
color: #53e5d0;
.dataQuery-content .li .icon1 .icon-text {
transform: rotateZ(20deg);
color: #ff0006;
}
.dataQuery-content .li .icon1 {
background-image: url(../../static/iocn/dwx.png);
width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.dataQuery-content .li .icon1 .icon-text {
transform: rotateZ(20deg);
color: #ff0006;
}
}
</style>

View File

@ -139,6 +139,7 @@
<script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue';
import {queryDetail} from '@/jsFile/public-api.js';
export default {
components: {
statusNav,
@ -159,9 +160,28 @@
},
projectList:[],
clientId:''//id
}
},
onLoad(op){
if(op.id!=undefined) {
this.clientId = op.id;
console.log(this.clientId);
//
this.queryDetailEv();
}
},
methods: {
//
queryDetailEv(){
queryDetail({type_id:1,member_id:this.clientId}).then(res=>{
if(res.code) {
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
getData(){
},

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
<container-subgroup-two>
<view slot="content" style="margin: 0 -30rpx;">
<view class="project-list">
<view class="li" @click="projectDetailsFun()" v-for="(item,index) in projectQuery">
<view class="li" @click="projectDetailsFun(item.id)" v-for="(item,index) in projectQuery" :key="index">
<view class="message pad-s10">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
<view class="text">
@ -23,14 +23,10 @@
<view class="date">{{item.date}}</view>
</view>
<view class="icon iconBer" v-if="item.state==0"></view>
<view class="icon iconBera" v-if="item.state==1">
质保中
</view>
<view class="icon iconBerb" v-if="item.state==2">
临时项目
</view>
<view class="icon iconBera" v-if="item.state==1"></view>
<view class="icon iconBerb" v-if="item.state==2"></view>
</view>
<pitera v-if="total==projectQuery.length" textStr="暂无更多项目列表数据"></pitera>
</view>
</view>
</container-subgroup-two>
@ -41,110 +37,84 @@
import statusNav from '../../components/status-nav.vue';
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import {queryFun} from '../../jsFile/public-api.js';
import pitera from '@/components/nothing/pitera.vue';
export default {
components:{
containerSubgroupTwo,
statusNav
statusNav,
pitera
},
data() {
return {
dataPage:{
page:1,
list_rows:20
},
projectQuery: [
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 1
projectQuery: [
{
id:1,
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 1
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 2
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 2
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 1
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 0
},
],
}
],
list_rows:20,
page:1,
total:0
total:0,
key_word:''//
}
},
onReachBottom() {
if(this.total!=this.projectQuery.length) {
this.page++;
this.queryFunEv();
}
},
onLoad(op) {
if(op.key_word!=undefined) {
this.key_word = op.key_word;
// ()
this.queryFunEv(op.key_word);
this.queryFunEv();
}
},
methods: {
projectDetailsFun(){
projectDetailsFun(id){
uni.navigateTo({
url:"/pages/dataQuery/projectDetails"
url:`/pages/dataQuery/projectDetails?id=${id}`
})
},
// ()
queryFunEv(){
let params = {
type_id:2,
keyword,
keyword:this.key_word,
list_rows:this.list_rows,
page:this.page
}
queryFun(params).then(res=>{
if(res.code) {
}
this.total = res.data.total;//
if(this.page==1) this.projectQuery = [];
// if(res.data.data.length) {
// res.data.data.forEach(item=>{
// let obj = {
// id:item.member_id,//id
// name:item.name,//
// code:item.serial_number,//
// icon:["","",""],
// num:item.project_count,//
// address:item.address//
// }
// this.projectQuery.push(obj);
// })
// }
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
bindPickerChange(data){

View File

@ -52,7 +52,6 @@
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import { uploadImg } from '@/jsFile/public-api.js';
const app = getApp();
export default {
components: {
footTabOne,
@ -181,6 +180,7 @@
height: 80rpx;
line-height: 80rpx;
padding: 0 40rpx;
box-sizing: border-box;
border-top: 2rpx solid #EAEAEA;
border-bottom: 2rpx solid #EAEAEA;
background-color: #FFFFFF;

View File

@ -23,9 +23,9 @@
</view>
</view>
<view class="padding">
<view class="devicename" @click="scanCodeFun()" v-if="navDataState[0].state">
<view class="">请填写设备名称和型号或扫描二维码</view>
<image class="sm" src="../../static/iocn/sm.png" lazy-load mode=""></image>
<view class="devicename" v-if="navDataState[0].state">
<input type="text" class="fon28 width100" v-model="data.device_name" placeholder="请填写设备名称和型号或扫描二维码" />
<image @click="scanCodeFun()" class="sm flexs" src="../../static/iocn/sm.png" lazy-load mode=""></image>
</view>
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号(例:华为LED" v-else />
<view class="fault-pictures radius10" @click="chooseImg">
@ -172,17 +172,21 @@
},
submitButton() {
this.data.fault_type = this.faultTypeData[this.indexType].id
if (this.data.is_device == 0) {
if (!this.data.device_name) {
this.$toolAll.tools.showToast("请填写设备名称或型号");
return
}
} else {
if (!this.data.project_number) {
this.$toolAll.tools.showToast("请扫描设备二维码");
return
}
}
// if (this.data.is_device == 0) {
// if (!this.data.device_name) {
// this.$toolAll.tools.showToast("");
// return
// }
// } else {
// if (!this.data.project_number) {
// this.$toolAll.tools.showToast("");
// return
// }
// }
if (!this.data.device_name) {
this.$toolAll.tools.showToast("请填写设备名称或型号");
return
}
if (!this.data.username) {
this.$toolAll.tools.showToast("请填写您的姓名");
return

View File

@ -234,7 +234,6 @@
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import {getPlanType} from '@/jsFile/public-api.js';
const app = getApp();
export default {
components:{
pitera,
@ -246,11 +245,11 @@
},
data() {
return {
role: 1, // 1 2: 3: 4
// role: uni.getStorageSync('type_id'), // 1 2: 3: 4
// role: 1, // 1 2: 3: 4
role: uni.getStorageSync('type_id'), // 1 2: 3: 4
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
messageNumber: 0 ,//
noticeList:[{id:1,title:'2021年11月06日公司团建维保服务暂停一天服务暂停一天服务暂停一天。一天服务暂停一天服务暂停一天。'}],//
noticeList:[{id:1,title:'系统正在维护中...'}],//
//
repairList:[
{imgsrc:'/static/public/icon-home-repair.png',title:'报修'},
@ -280,27 +279,27 @@
//
projectRepairList:[
{imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0,id:2},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:99,id:0},
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维保中',num:6,id:4},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:0,id:0},
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维保中',num:0,id:4},
],
//
workOrderList:[
{imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0,id:100},
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0,id:101},
{imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0},
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:6,id:0},
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:0,id:0},
],
//
settlementList:[
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0,id:5},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:6,id:7},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0,id:7},
{imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0,id:5},
],
//
stayWorkOrderList:[
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:6,id:0},
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维保',num:6,id:3},
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维保',num:0,id:3},
{imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0,id:8},
],
//
@ -336,7 +335,6 @@
this.getIncrementServiceType();
//
this.getFaultsList();
},
methods: {
//

View File

@ -40,7 +40,7 @@
</view>
<view class="li">
<view class="title">维保类型</view>
<input type="text" class="input" :value="detailObj.fault_type" />
<input type="text" disabled class="input" :value="detailObj.fault_type" />
</view>
<view class="li">
<view class="title">紧急程度</view>

View File

@ -84,7 +84,7 @@
<view>{{serviceModeList[serviceModeIndex].name}}</view>
</picker>
</view>
<view class="li">
<view class="li" @tap="getAddress">
<view class="title flexs">定位地址</view>
<input type="text" disabled class="input" :value="targetObj.address" />
</view>
@ -181,7 +181,8 @@ var qqmapsdk = new QQMapWX({
],//
serviceModeIndex:0,//
flag:true,
temporaryImg:[]//id
temporaryImg:[],//id
addressFlag:true
}
},
onShow() {
@ -193,28 +194,90 @@ var qqmapsdk = new QQMapWX({
this.orderId = op.id;
this.handleWorkOrderGet(this.orderId);
}
this.getProductType();
this.getFaultType();
this.getAddressH5();
//
this.getAddress();
},
methods: {
//
getAddress() {
// app
getAddress(){
this.$toolAll.tools.showToast('正在获取定位...')
// #ifdef APP-PLUS
if(this.addressFlag) {
this.addressFlag = false;
uni.getLocation({
type: 'gcj02',
geocode:true,
success: (res)=> {
this.$toolAll.tools.showToast('定位成功');
// console.log(res,'app');
this.targetObj.address = `${res.address.province}${res.address.city}${res.address.district}${res.address.street || ''}${res.address.streetNum || ''}${res.address.poiName || ''}`
setTimeout(()=>{
this.addressFlag = true;
},2000)
}
});
} else {
this.$toolAll.tools.showToast('请勿重复获取定位...')
}
// #endif
// #ifdef MP-WEIXIN
this.getAddressWx();
// #endif
// #ifdef H5
this.getAddressH5();
// #endif
},
//
getAddressWx(){
if(this.addressFlag) {
this.addressFlag = false;
uni.getLocation({
type: 'gcj02',
geocode:true,
success: (res)=> {
// console.log(res,'');
qqmapsdk.reverseGeocoder({
location: {latitude: res.latitude, longitude: res.longitude},
success:(res)=> {
console.log(res,'WX');
this.$toolAll.tools.showToast('定位成功');
this.targetObj.address = `${res.result.address_component.province}${res.result.address_component.city}${res.result.address_component.district}${res.result.address_component.street || ''}(${res.result.address_component.street_number || ''})`
setTimeout(()=>{
this.addressFlag = true;
},2000)
},
fail(err) {
console.log(err)
}
})
}
});
} else {
this.$toolAll.tools.showToast('请勿重复获取定位...')
}
},
getAddressH5(){
uni.getLocation({
type: 'gcj02',//wgs84 gcj02
altitude: true,
geocode: true,
success: (res)=> {
let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}`
jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
console.log(res,'H5');
this.targetObj.address = `${res.result.address_component.province}${res.result.address_component.city}${res.result.address_component.district}${res.result.address_component.street || ''}(${res.result.address_component.street_number || ''})`
})
}
});
if(this.addressFlag) {
this.addressFlag = false;
uni.getLocation({
type: 'gcj02',//wgs84 gcj02
altitude: true,
geocode: true,
success: (res)=> {
let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}`
jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
console.log(res,'H5');
this.$toolAll.tools.showToast('定位成功');
this.targetObj.address = `${res.result.address_component.province}${res.result.address_component.city}${res.result.address_component.district}${res.result.address_component.street || ''}(${res.result.address_component.street_number || ''})`
setTimeout(()=>{
this.addressFlag = true;
},2000)
})
}
});
} else {
this.$toolAll.tools.showToast('请勿重复获取定位...')
}
},
//
changePicker(index,e) {
@ -312,6 +375,8 @@ var qqmapsdk = new QQMapWX({
this.getProductType();
//
this.getFaultType();
//
// this.getServiceMode()
}
})
},
@ -341,8 +406,8 @@ var qqmapsdk = new QQMapWX({
uni.setStorageSync('targetObj',this.targetObj);
let params = {
steps:1,
order_id:this.orderId || 14,//id
start_address:'四川省成都市成华区',//
order_id:this.orderId,//id
start_address:this.targetObj.address,//
product_type:this.productTypeList[this.productIndex].id,//
installation_location:this.targetObj.installLocation,//
fault_type:this.faultTypeList[this.faultIndex].id,//

View File

@ -39,7 +39,7 @@
<view class="text disjb fc" style="height: 180rpx;">
<view class="title flexs">
<view class="text clips1">{{item.project_name}}</view>
<view class="icon" :style="{backgroundColor: item.btn.attributes.color}">{{item.btn.attributes.text}}</view>
<view class="icon" :style="{backgroundColor: item.btn.attributes.color || '#DDDDDD'}">{{item.btn.attributes.text}}</view>
</view>
<view class="disjb fc line-h38" style="margin-left: -20rpx;">
<view class="serial-number scal09">
@ -65,6 +65,7 @@
</view>
</view>
</view>
<pitera v-if="total==dataList.length && dataList.length!=0" textStr="暂无更多列表数据"></pitera>
</view>
<nothing-page v-if="dataList.length==0" content="暂无更多列表数据" currentType="0"></nothing-page>
</view>
@ -77,11 +78,13 @@
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue';
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
import pitera from '@/components/nothing/pitera.vue';
export default {
components: {
footTabOne,
statusNav,
containerSubgroupTwo
containerSubgroupTwo,
pitera
},
data() {
const currentDate = this.getDate({
@ -356,7 +359,6 @@
border-radius: 50rpx;
color: #FFFFFF;
display: flex;justify-content: center;align-items: center;
line-height: 40rpx;
}
.project-list .li .message .text .title .icon1 {

View File

@ -51,12 +51,13 @@
<view class="li">
<view class="text flexs">其他费用</view>
<view class="price disac">
<input class="tright fon28" type="digit" v-model="detailObj.otherCost" placeholder="0.00" />
<input @input="otherInput" class="tright fon28" type="digit" v-model="detailObj.otherCost" placeholder="0.00" />
</view>
</view>
</view>
<view class="total-price">
费用合计<text class="money">{{totalPrice}}</text>
<!-- 费用合计<text class="money">{{totalPrice}}</text> -->
费用合计<text class="money">{{allPrice}}</text>
</view>
<picker @change="bindPickerChange" :value="paymentModeIndex" :range="array">
<view class="serve-date">
@ -179,11 +180,13 @@
array: ['微信', '支付宝', '银行转账'],
paymentModeIndex:0,
serviceTime:'' ,//
allPrice:'0.00',//
detailObj:{
doorToDoorFee:'120.09',
taxes:'120.20',
materialCost:'120.02',
otherCost:'',
doorToDoorFee:'0.00',//
taxes:'0.00',
materialCost:'0.00',//
otherCost:'',//
taxRate:10,//
address:'湖南省株洲市荷塘区红旗中路456号(五矿二十三冶)',
collectionCode:[
'/static/del/500478055.png',
@ -221,7 +224,7 @@
} else {
taxesResult = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.materialCost,'+',2);
taxesResult = this.$toolAll.tools.operationEv(taxesResult,this.detailObj.otherCost,'+',2);
taxesResult = this.$toolAll.tools.operationEv(taxesResult,0.1,"*",2);
taxesResult = this.$toolAll.tools.operationEv(taxesResult,this.detailObj.taxRate,"*",2);
}
return taxesResult;
}
@ -243,14 +246,39 @@
this.orderId = op.id;
//
this.handleWorkOrderGet(this.orderId);
//
this.priceEv();
}
this.handleWorkOrderGet();
},
methods: {
//
otherInput() {
this.priceEv();
},
//
priceEv(){
let params = {
order_id:this.orderId,//id
settlement_type:[1,2,3,4][this.currentWay],//
invoice_type:[3,2,1][this.billingIndex],//
other_price:this.detailObj.otherCost || 0,//
}
this.$requst.post('/universal/api.order/compute_cost',params).then(res=>{
if(res.code) {
this.detailObj.doorToDoorFee = parseFloat(res.data.artificial_price);///
this.detailObj.taxRate = parseFloat(res.data.tax_rate)/100;//
this.detailObj.materialCost = parseFloat(res.data.material_price);//
this.allPrice = res.data.pay_price;//
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
//
handleWorkOrderGet(id){
let params = {
order_id:14,
order_id:this.orderId,
steps:3
}
handleWorkOrderGet(params).then(res=>{
@ -268,23 +296,20 @@
order_id:this.orderId,
steps:3,
settlement_type:[1,2,3,4][this.currentWay],//1 2 3 4
c:this.detailObj.doorToDoorFee,
d:this.detailObj.taxes,
e:this.detailObj.materialCost,
f:this.detailObj.otherCost,
g:this.totalPrice,
pay_type:[1,2,3][this.paymentModeIndex],//1 2 3
invoice_type:[3,2,1][this.billingIndex],//3 2 1
is_collection:this.isMoney ? 1 : 0,//
signature:this.signId,//id
signature:this.signId || 62,//id
settlement_address:this.detailObj.address,
settlement_remark:this.remarkText//
}
console.log(params);
handleWorkOrderSubmit(params).then(res=>{
if(res.code) {
uni.navigateTo({
url: `/pages/workOrder/workorderTwo?id=${this.orderId}`
})
} else {
this.$toolAll.tools.showToast(res.msg);
}
this.flag = true;
})
@ -314,6 +339,8 @@
},
clearingFormFun(index) {
this.currentWay = index;
//
this.priceEv();
},
bindPickerChange(data) {
this.paymentModeIndex = data.detail.value;
@ -327,6 +354,8 @@
this.billingIndex = index;
// this.conversionEv();
}
//
this.priceEv();
},
//
// conversionEv(){

View File

@ -27,7 +27,6 @@
</template>
<script>
const app = getApp();
export default {
data() {
return {
@ -49,7 +48,7 @@
if(res.code){
let userData = res.data;
if(userData.avatar) {
this.userImg = app.globalData.hostapi + '/' + userData.avatar;
this.userImg = userData.avatar;
}
this.userId = userData.id;
this.userName = userData.name;