diff --git a/jsFile/tools.js b/jsFile/tools.js index f807396..9a31abe 100644 --- a/jsFile/tools.js +++ b/jsFile/tools.js @@ -92,7 +92,6 @@ const tools = { for(var i = 0; i < phoneStr.length; i++){ if (i==startNum||i==endNum){ phoneArr.push(`${character}` + phoneStr.charAt(i)); - console.log(phoneArr); } else { phoneArr.push(phoneStr.charAt(i)); } diff --git a/pages/tabbar/my/my.vue b/pages/tabbar/my/my.vue index e949c6a..8dda8df 100644 --- a/pages/tabbar/my/my.vue +++ b/pages/tabbar/my/my.vue @@ -230,7 +230,7 @@ '/pagesB/personal-information/personal-information', '/pagesB/electronic-certificate/electronic-certificate', '/pagesB/service-range/service-range', - '/pages/workOrder/workOrderLlsit?status=已完成', + '/pages/workOrder/workOrderLlsit?status=已完成&statusId=8', '/pagesB/my-account/my-account?index=0', '/pagesB/set-up/set-up', ]; diff --git a/pages/tabbar/pagehome/pagehome.vue b/pages/tabbar/pagehome/pagehome.vue index e0dac9d..c453190 100644 --- a/pages/tabbar/pagehome/pagehome.vue +++ b/pages/tabbar/pagehome/pagehome.vue @@ -94,7 +94,7 @@ 项目维修 - + {{item.num}} @@ -108,7 +108,7 @@ 待办工单 - + {{item.num}} @@ -121,7 +121,7 @@ 待办事件 - + {{item.num}} @@ -135,7 +135,7 @@ 工单数据 - + {{item.num}} @@ -161,7 +161,7 @@ 结算情况 - + {{item.num}} @@ -242,7 +242,7 @@ }, data() { return { - role: 1, // 1:业务员 2:表示客户 3:表示客服 4:表示工程师 + role: uni.getStorageSync('type_id'), // 1:业务员 2:表示客户 3:表示客服 4:表示工程师 statusHeight: uni.getSystemInfoSync().statusBarHeight + 50, messageNumber: 16 ,// 消息数量 noticeList:['2021年11月06日公司团建,维修服务暂停一天服务暂停一天服务暂停一天。','51akslfj;dkpiojasdjf;j1ij'],//公告 @@ -274,35 +274,35 @@ ], // 项目维修 projectRepairList:[ - {imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0}, - {imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:99}, - {imgsrc:'/static/public/icon-home-repairIng.png',title:'维修中',num:6}, + {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}, ], // 工单数据 workOrderList:[ - {imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0}, - {imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0}, - {imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0}, - {imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:6,}, + {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}, ], // 结算情况 settlementList:[ - {imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0}, - {imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:6}, - {imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0}, + {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-commission.png',title:'佣金',num:0,id:5}, ], // 待办工单 stayWorkOrderList:[ - {imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0}, - {imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:6}, - {imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维修',num:6}, - {imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0}, + {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-returnVisit.png',title:'待回访',num:0,id:8}, ], // 待办事件 stayEventList:[ - {imgsrc:'/static/public/icon-home-stayBatch.png',title:'待审批',num:0}, - {imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0}, - {imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0}, + {imgsrc:'/static/public/icon-home-stayBatch.png',title:'待审批',num:0,id:6}, + {imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0,id:5}, + {imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0,id:7}, ], // 数据查询 dataQueryList:[ @@ -335,12 +335,12 @@ }) }, // 待办事件 - stayEv(title) { + stayEv(title,statusId) { let url = ''; if(title=='佣金') { url = `/pagesB/my-account/my-account?index=1` } else { - url = `/pages/workOrder/workOrderLlsit?status=${title}` + url = `/pages/workOrder/workOrderLlsit?status=${title}&statusId=${statusId}` } uni.navigateTo({ url:url diff --git a/pages/workOrder/workOrder.vue b/pages/workOrder/workOrder.vue index 140cdfc..ced308a 100644 --- a/pages/workOrder/workOrder.vue +++ b/pages/workOrder/workOrder.vue @@ -130,7 +130,21 @@ uni.removeStorageSync('partsList'); uni.removeStorageSync('targetObj'); }, + onLoad(op) { + this.checkInfoSignIn(op.id); + }, methods: { + // 查看信息签到执行 + checkInfoSignIn(id){ + let params = { + order_id:3, + steps:1, + start_address:'四川省成都市成华区' + } + this.$requst.post('/universal/api.order/process_order',params).then(res=>{ + + }) + }, // 上传图片 chooseImg(){ uni.chooseImage({ diff --git a/pages/workOrder/workOrderLlsit.vue b/pages/workOrder/workOrderLlsit.vue index a7679b6..09e6af7 100644 --- a/pages/workOrder/workOrderLlsit.vue +++ b/pages/workOrder/workOrderLlsit.vue @@ -32,7 +32,7 @@ - + 工单编号:{{item.order_number}} @@ -47,10 +47,10 @@ {{item.failure_time}} - 紧急程度: {{item.principal}} + 紧急程度: {{item.emergency_level_view}} - 主负责人:{{item.name}} - 故障描述:{{item.failure_description}} + 主负责人:{{item.principal}} + 故障描述:{{item.failure_description}} @@ -66,7 +66,7 @@ - + @@ -89,7 +89,7 @@ }) return { statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 40, - role: 1, // 1:业务员 2:表示客户 3:表示客服 4:表示工程师 + role: uni.getStorageSync('type_id'), // 1:业务员 2:表示客户 3:表示客服 4:表示工程师 date: currentDate, workeOrderStatus:'工单状态', array: [ @@ -104,26 +104,26 @@ keyword:"" }, total:0, - dataList:[] + dataList:[], + statusId:0 } }, - onLoad(option) { - + onLoad(op) { + if(op.statusId!=undefined) this.statusId = op.statusId; // 调用获取工单状态事件 - - this.getType(option); + this.getType(); }, methods: { // 获取工单状态 - getType(option){ + getType(){ this.$requst.get('/universal/api.order/order_type').then(res => { // this.$toolAll.tools.showToast(res.msg); if (res.code) { this.array=[...res.data] // 调用获取工单列表事件 - if(option.status){ - this.workeOrderStatusIndex = this.array.findIndex(item=>item.id==option.status); + if(this.statusId){ + this.workeOrderStatusIndex = this.array.findIndex(item=>item.id==this.statusId); if(this.workeOrderStatusIndex!=-1) this.workeOrderStatus = ''; } this.getDatalist(); @@ -145,8 +145,7 @@ }, // 查看工单详情和进入接单页面 projectDetailsFun(status,id,statusText,statusColor) { - // if (uni.getStorageSync('type_id')==4 && status == 3) { - if (status == 3) { + if (uni.getStorageSync('type_id')==4 && status == 2) { // 工程师点击待接单工单 uni.showModal({ cancelText:'取消', @@ -156,8 +155,15 @@ content:'确认接单', success: (res) => { if(res.confirm){ - uni.navigateTo({ - url: `/pages/workOrder/workOrder?id=${id}` + this.$requst.post('/universal/api.order/accept_order',{order_id:id,is_order:1}).then(res=>{ + if(res.code){ + this.$toolAll.tools.showToast('接单成功'); + setTimeout(()=>{ + uni.navigateTo({ + url: `/pages/workOrder/workOrder?id=${id}` + }) + },1000) + } }) } } @@ -385,7 +391,7 @@ .project-list .li .message .installation-site { color: #9b9ba3; font-size: 24rpx; - line-height: 24rpx; + /* line-height: 24rpx; */ } .project-list-address { diff --git a/pages/workOrder/workOrderThree.vue b/pages/workOrder/workOrderThree.vue index 588db9a..6986a82 100644 --- a/pages/workOrder/workOrderThree.vue +++ b/pages/workOrder/workOrderThree.vue @@ -28,13 +28,13 @@ - + 上门费 @@ -42,15 +42,17 @@ 税金 - ¥{{detailObj.taxes}} + ¥{{taxesPrice}} 材料费 ¥{{detailObj.materialCost}} - 其他费用 - ¥{{detailObj.otherCost}} + 其他费用 + + + @@ -65,15 +67,20 @@ 是否开票 - - + + - + 专票 - - + + - + 普票 + + + + + 不开票 @@ -174,7 +181,7 @@ doorToDoorFee:'120.09', taxes:'120.20', materialCost:'120.02', - otherCost:'121.03', + otherCost:'', address:'湖南省株洲市荷塘区红旗中路456号(五矿二十三冶)', collectionCode:[ '/static/del/500478055.png', @@ -183,7 +190,7 @@ ] }, paymentMode:'',//支付方式 - isInvoice: true,//是否开票 + billingIndex:0,//开票类型 0:专票 1:普票 2:不开票 isMoney: true,//是否收款 isCanvas: true, signImage: '',//签名图片 @@ -196,10 +203,23 @@ computed:{ totalPrice() { let prices = 0; - prices = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.taxes,'+',2); - prices = this.$toolAll.tools.operationEv(prices,this.detailObj.materialCost,'+',2); - prices = this.$toolAll.tools.operationEv(prices,this.detailObj.otherCost,'+',2); + if(this.currentWay!=1 && this.currentWay!=2) { + prices = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.taxesPrice,'+',2); + prices = this.$toolAll.tools.operationEv(prices,this.detailObj.materialCost,'+',2); + prices = this.$toolAll.tools.operationEv(prices,this.detailObj.otherCost,'+',2); + } return this.$toolAll.tools.addXiaoShu(prices); + }, + taxesPrice() { + let taxesResult = 0 + if(this.billingIndex!=0) { + taxesResult = '0.00'; + } 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); + } + return taxesResult; } }, onLoad: function(options) { @@ -212,7 +232,9 @@ //设置线两端端点样式更加圆润 content.setLineCap('round') //设置两条线连接处更加圆润 - content.setLineJoin('round') + content.setLineJoin('round'); + // 调用税金换算事件 + // this.conversionEv(); }, methods: { // 提交审核事件 @@ -229,7 +251,7 @@ f:this.detailObj.otherCost, g:this.totalPrice, h:this.paymentMode, - i:this.isInvoice, + i:this.billingIndex, j:this.isMoney, k:this.signImage, m:this.remarkText @@ -254,7 +276,9 @@ }, // 收款码点击事件 openCollectionCodeEv(){ - this.ifCollectionCode = !this.ifCollectionCode; + if(this.currentWay!=1 && this.currentWay!=2) { + this.ifCollectionCode = !this.ifCollectionCode; + } }, clearingFormFun(index) { this.currentWay = index; @@ -263,15 +287,29 @@ this.paymentModeIndex = data.detail.value; this.paymentMode = this.array[this.paymentModeIndex]; }, - serveDate(data) { - console.log(data) - this.serviceTime = data.detail.value; - }, - isInvoiceFun(is) { - this.isInvoice = is + // serveDate(data) { + // this.serviceTime = data.detail.value; + // }, + isInvoiceFun(index) { + if(this.currentWay!=1 && this.currentWay!=2) { + this.billingIndex = index; + // this.conversionEv(); + } }, + // 税金费用换算 + // conversionEv(){ + // if(this.billingIndex!=0) { + // this.detailObj.taxes = '0.00'; + // } else { + // let priceTotal = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.materialCost,'+',2); + // priceTotal = this.$toolAll.tools.operationEv(priceTotal,this.detailObj.otherCost,'+',2); + // this.detailObj.taxes = this.$toolAll.tools.operationEv(priceTotal,0.1,"*",2); + // } + // }, isMoneyFun(is) { - this.isMoney = is + if(this.currentWay!=1 && this.currentWay!=2) { + this.isMoney = is; + } }, // 画布 // 画布的触摸移动开始手势响应 diff --git a/pages/workOrder/workorderTwo.vue b/pages/workOrder/workorderTwo.vue index ab84563..ef43cd0 100644 --- a/pages/workOrder/workorderTwo.vue +++ b/pages/workOrder/workorderTwo.vue @@ -86,7 +86,7 @@ 主维保人: - + @@ -170,7 +170,7 @@ }, data() { return { - isrideo: true, + // isrideo: true, accessoriesData: [], targetObj:'' } @@ -212,10 +212,10 @@ this.targetObj.maintenanceImgList.splice(index,1); }, // 更换配件切换事件 - isrideoFun(is) { - this.isrideo = is; - this.targetObj.ifParts = this.isrideo; - }, + //isrideoFun(is) { + // this.isrideo = is; + // this.targetObj.ifParts = this.isrideo; + //}, goWorkorderTwo(){ console.log(this.targetObj); if(this.checkEmpty()) { diff --git a/pagesB/personal-information/personal-information.vue b/pagesB/personal-information/personal-information.vue index 91aa03a..e854bdc 100644 --- a/pagesB/personal-information/personal-information.vue +++ b/pagesB/personal-information/personal-information.vue @@ -109,13 +109,10 @@ getData(){ this.$requst.get('/universal/api.user/user_info').then(res => { if (res.code == 1 && res.data.length != 1) { - this.nickname=res.data.nickname - this.full_name=res.data.name - if(res.data.sex==0){ - this.genderNum=1 - }else{ - this.genderNum=res.data.sex - } + this.nickname=res.data.nickname; + this.full_name=res.data.name; + // res.data.sex ==> 2:男 1:女 0:未知 + res.data.sex != 1 ? this.genderNum = 1 : this.genderNum = 2; this.contact_number=res.data.phone this.e_mail=res.data.email this.id_card_no=res.data.idcard