diff --git a/App.vue b/App.vue
index e1e15cf..260e0de 100644
--- a/App.vue
+++ b/App.vue
@@ -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() {
diff --git a/commons/flying-monkey.css b/commons/flying-monkey.css
index 9567a97..3033d70 100644
--- a/commons/flying-monkey.css
+++ b/commons/flying-monkey.css
@@ -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;
diff --git a/jsFile/public-api.js b/jsFile/public-api.js
index 5b79a2c..db45f1e 100644
--- a/jsFile/public-api.js
+++ b/jsFile/public-api.js
@@ -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) {
diff --git a/jsFile/requst.js b/jsFile/requst.js
index d3abf9e..c4bf8aa 100644
--- a/jsFile/requst.js
+++ b/jsFile/requst.js
@@ -7,7 +7,7 @@ console.log(ENV,'当前环境'); // development:开发环境 test:测试环
// #endif
// #ifdef MP-WEIXIN
const hostapi = 'https://7and5.cn';
-// #endif
+// #endif
// #ifdef H5
const hostapi = '/web';
// const hostapi = 'https://7and5.cn';
@@ -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) {
diff --git a/jsFile/tools.js b/jsFile/tools.js
index c967c3c..1bc0f39 100644
--- a/jsFile/tools.js
+++ b/jsFile/tools.js
@@ -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 = {
+
+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: {
diff --git a/manifest.json b/manifest.json
index 8db9743..6270395 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "飞猴",
- "appid" : "__UNI__C9AEDD9",
+ "appid" : "__UNI__25FB71A",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
diff --git a/pages.json b/pages.json
index d8ab8d3..2f2910a 100644
--- a/pages.json
+++ b/pages.json
@@ -1,11 +1,5 @@
{
- "pages": [ {
- "path": "pages/workOrder/punchCard",
- "style": {
- "navigationBarTitleText": "个人中心",
- "navigationStyle": "custom" //禁用原生导航栏,微信小程序可用
- }
- },{
+ "pages": [{
"path": "pages/guide-page/guide-page",
"style": {
"navigationBarTitleText": "",
diff --git a/pages/dataQuery/client.vue b/pages/dataQuery/client.vue
index d25d84b..3eb06e4 100644
--- a/pages/dataQuery/client.vue
+++ b/pages/dataQuery/client.vue
@@ -3,7 +3,7 @@
-
+
{{item.name}}
@@ -19,6 +19,7 @@
{{item.address}}
+
@@ -26,75 +27,50 @@
diff --git a/pages/dataQuery/details.vue b/pages/dataQuery/details.vue
index 2c2283f..79e91d5 100644
--- a/pages/dataQuery/details.vue
+++ b/pages/dataQuery/details.vue
@@ -139,6 +139,7 @@
diff --git a/pages/dataQuery/projectQuery.vue b/pages/dataQuery/projectQuery.vue
index 3e852ea..9c03261 100644
--- a/pages/dataQuery/projectQuery.vue
+++ b/pages/dataQuery/projectQuery.vue
@@ -4,7 +4,7 @@
-
+
@@ -23,14 +23,10 @@
{{item.date}}
质保到期
-
- 质保中
-
-
- 临时项目
-
+ 质保中
+ 临时项目
-
+
@@ -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.94m*2.02m",
- 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.94m*2.02m",
+ 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.94m*2.02m",
- 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.94m*2.02m",
- 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.94m*2.02m",
- 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.94m*2.02m",
- 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){
diff --git a/pages/feedback/feedback.vue b/pages/feedback/feedback.vue
index 83043df..a67d675 100644
--- a/pages/feedback/feedback.vue
+++ b/pages/feedback/feedback.vue
@@ -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;
diff --git a/pages/repairsPage/repairsPage.vue b/pages/repairsPage/repairsPage.vue
index 052fb71..b88cff7 100644
--- a/pages/repairsPage/repairsPage.vue
+++ b/pages/repairsPage/repairsPage.vue
@@ -23,9 +23,9 @@
-
- 请填写设备名称和型号或扫描二维码
-
+
+
+
@@ -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
diff --git a/pages/tabbar/pagehome/pagehome.vue b/pages/tabbar/pagehome/pagehome.vue
index 8cd9244..2cecabf 100644
--- a/pages/tabbar/pagehome/pagehome.vue
+++ b/pages/tabbar/pagehome/pagehome.vue
@@ -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: {
// 首页信息查询
diff --git a/pages/workOrder/details.vue b/pages/workOrder/details.vue
index 38b6448..4b1e8e7 100644
--- a/pages/workOrder/details.vue
+++ b/pages/workOrder/details.vue
@@ -40,7 +40,7 @@
维保类型:
-
+
紧急程度:
diff --git a/pages/workOrder/workOrder.vue b/pages/workOrder/workOrder.vue
index 5295099..a537d34 100644
--- a/pages/workOrder/workOrder.vue
+++ b/pages/workOrder/workOrder.vue
@@ -84,7 +84,7 @@
{{serviceModeList[serviceModeIndex].name}}
-
+
定位地址:
@@ -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,//维保类型
diff --git a/pages/workOrder/workOrderLlsit.vue b/pages/workOrder/workOrderLlsit.vue
index a2f35c6..2ff63da 100644
--- a/pages/workOrder/workOrderLlsit.vue
+++ b/pages/workOrder/workOrderLlsit.vue
@@ -39,7 +39,7 @@
{{item.project_name}}
- {{item.btn.attributes.text}}
+ {{item.btn.attributes.text}}
@@ -65,6 +65,7 @@
+
@@ -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 {
diff --git a/pages/workOrder/workOrderThree.vue b/pages/workOrder/workOrderThree.vue
index 91f7a97..64c872e 100644
--- a/pages/workOrder/workOrderThree.vue
+++ b/pages/workOrder/workOrderThree.vue
@@ -51,12 +51,13 @@
其他费用
-
+
- 费用合计¥{{totalPrice}}
+
+ 费用合计¥{{allPrice}}
@@ -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(){
diff --git a/pagesB/electronic-certificate/electronic-certificate.vue b/pagesB/electronic-certificate/electronic-certificate.vue
index 19ee0e1..16b1dbb 100644
--- a/pagesB/electronic-certificate/electronic-certificate.vue
+++ b/pagesB/electronic-certificate/electronic-certificate.vue
@@ -27,7 +27,6 @@