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 38a5999..ebf307d 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}} @@ -243,6 +243,7 @@ data() { return { role: 4, // 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 +275,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 +336,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..0fd52da 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(); @@ -133,9 +133,13 @@ // 获取工单列表 getDatalist(){ this.$requst.get('/universal/api.order/order_list',this.dataPage).then(res => { - if (res.code) { + if (res.code==1) { this.total = res.data.total; this.dataList = res.data.data; + console.log(this.dataList,"---------1" ) + }else{ + this.dataList = []; + console.log(this.dataList,"---------2" ) } }) }, @@ -145,8 +149,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 +159,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 +395,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 ca18006..6986a82 100644 --- a/pages/workOrder/workOrderThree.vue +++ b/pages/workOrder/workOrderThree.vue @@ -21,20 +21,20 @@ 结算方式 - + {{item.title}} - + 上门费 @@ -42,15 +42,17 @@ 税金 - ¥{{detailObj.taxes}} + ¥{{taxesPrice}} 材料费 ¥{{detailObj.materialCost}} - 其他费用 - ¥{{detailObj.otherCost}} + 其他费用 + + + @@ -65,26 +67,31 @@ 是否开票 - - + + - + 专票 - - + + - + 普票 + + + + + 不开票 是否收款 - + - + @@ -160,11 +167,12 @@ data() { return { clearingForm: [ - {title: '单次付费',state: true,}, - {title: '质保免费',state: false,}, - {title: '验收扫尾',state: false,}, - {title: '包年签单',state: false,}, + {title: '单次付费'}, + {title: '质保免费'}, + {title: '验收扫尾'}, + {title: '包年签单'}, ], + currentWay:0,//结束方式类型 signatureState:false, array: ['微信', '支付宝', '现金', '类型'], paymentModeIndex:0, @@ -173,7 +181,7 @@ doorToDoorFee:'120.09', taxes:'120.20', materialCost:'120.02', - otherCost:'121.03', + otherCost:'', address:'湖南省株洲市荷塘区红旗中路456号(五矿二十三冶)', collectionCode:[ '/static/del/500478055.png', @@ -182,23 +190,36 @@ ] }, paymentMode:'',//支付方式 - isInvoice: true,//是否开票 + billingIndex:0,//开票类型 0:专票 1:普票 2:不开票 isMoney: true,//是否收款 isCanvas: true, signImage: '',//签名图片 ifCollectionCode:false,//是否显示收款码 remarkText:'',//备注内容 saveTimer:null,//保存签名延迟时间事件 - flag:true//防抖 + flag:true,//防抖 } }, 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) { @@ -211,7 +232,9 @@ //设置线两端端点样式更加圆润 content.setLineCap('round') //设置两条线连接处更加圆润 - content.setLineJoin('round') + content.setLineJoin('round'); + // 调用税金换算事件 + // this.conversionEv(); }, methods: { // 提交审核事件 @@ -219,9 +242,8 @@ if(this.checkEmpty()) { if(this.flag) { this.flag = false; - let exist = this.clearingForm.findIndex(item=>item.state==true); let params = { - a:this.clearingForm[exist].title, + a:this.clearingForm[this.currentWay].title, b:this.serviceTime, c:this.detailObj.doorToDoorFee, d:this.detailObj.taxes, @@ -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,27 +276,40 @@ }, // 收款码点击事件 openCollectionCodeEv(){ - this.ifCollectionCode = !this.ifCollectionCode; + if(this.currentWay!=1 && this.currentWay!=2) { + this.ifCollectionCode = !this.ifCollectionCode; + } }, clearingFormFun(index) { - for (var i = 0; i < this.clearingForm.length; i++) { - this.clearingForm[i].state = false - } - this.clearingForm[index].state = true + this.currentWay = index; }, bindPickerChange(data) { 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