From a193fc2c5c6d464331a8caabeab97b97749936e4 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Sat, 19 Oct 2024 18:06:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=B7=A5=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=EF=BC=8C=E6=9C=8D=E5=8A=A1=E9=A1=BE=E9=97=AE?= =?UTF-8?q?=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/orderCard.vue | 16 +- pages-order/chooseImg/chooseImg.vue | 224 ++++++++++++++++++ pages-order/choosePeople/choosePeople.vue | 51 +++- pages-order/orderDetail/orderDetail.vue | 208 +++++++++++++--- pages-order/orderList/orderList.vue | 3 +- pages.json | 7 + .../uni-fab/components/uni-fab/uni-fab.vue | 5 +- 7 files changed, 452 insertions(+), 62 deletions(-) create mode 100644 pages-order/chooseImg/chooseImg.vue diff --git a/components/orderCard.vue b/components/orderCard.vue index a068439..bd1cdae 100644 --- a/components/orderCard.vue +++ b/components/orderCard.vue @@ -51,9 +51,9 @@ 接单 - - 开始施工 - + + + 告知取车 @@ -112,15 +112,9 @@ export default { //服务顾问可以告知取车 this.roleCanQc = true } - if(userInfo.roleCodes.includes("repair_staff")){ - //维修工角色可以接单 + if(userInfo.roleCodes.includes("repair_staff") && this.order.nowRepairId==userInfo.id){ + //维修工角色,并且指派处理的人就是当前用户可以接单 this.roleCanJd = true - console.log(this.order.nowRepairId,"this.order.nowRepairId") - console.log(userInfo.id,"userInfo.id") - if(this.order.nowRepairId==userInfo.id){ - //当前用户就是接单的人,可以施工、施工过程、结束施工操作 - this.roleCanSg = true - } } }, onLoad(){ diff --git a/pages-order/chooseImg/chooseImg.vue b/pages-order/chooseImg/chooseImg.vue new file mode 100644 index 0000000..d449b4f --- /dev/null +++ b/pages-order/chooseImg/chooseImg.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/pages-order/choosePeople/choosePeople.vue b/pages-order/choosePeople/choosePeople.vue index c5e334f..7a74e1f 100644 --- a/pages-order/choosePeople/choosePeople.vue +++ b/pages-order/choosePeople/choosePeople.vue @@ -9,17 +9,20 @@
- - + + + + + - + + + + +
@@ -41,9 +44,12 @@ export default { }, data() { return { + current: 0, ticketId:'', list: [], - checked: [] + checkedUserId:"", + checkedUserName:"", + ifDetail:false, } }, onLoad(data) { @@ -51,8 +57,23 @@ export default { this.ticketId = data.id this.workByTicketId() } + if(data.ifDetail){ + //从订单详情页跳过来的,返回时需要返回2步 + this.ifDetail = true + } }, methods: { + radioChange: function(evt) { + for (let i = 0; i < this.list.length; i++) { + if (this.list[i].userId == evt.detail.value) { + this.current = i; + this.checkedUserId = this.list[i].userId + this.checkedUserName = this.list[i].userName + break; + } + } + console.log(this.checkedUserName) + }, /** * 通过工单id查询维修工人 */ @@ -69,12 +90,10 @@ export default { }) }, submit() { - const nowRepairId = this.checked[0] - const nowRepair = this.list.filter(item => nowRepairId===item.userId); const param = { id:this.ticketId, - nowRepairId:nowRepairId, - nowRepairName:nowRepair[0].userName, + nowRepairId:this.checkedUserId, + nowRepairName:this.checkedUserName, } console.log(param) request({ @@ -87,7 +106,13 @@ export default { icon: 'none' }) setTimeout(()=>{ - uni.navigateBack() + if(this.ifDetail){ + uni.navigateBack({ + delta: 2 // 返回倒数第2页 + }) + }else{ + uni.navigateBack() + } },700) }) // diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue index 555fc1f..b903acc 100644 --- a/pages-order/orderDetail/orderDetail.vue +++ b/pages-order/orderDetail/orderDetail.vue @@ -12,7 +12,7 @@ style="width: 48rpx;height: 48rpx"> {{ ticketInfo.ticketsStatus == '02' ? '已完成' : ticketInfo.statusStr }} - 当前工单维修项目{{ ticketInfo.flag == '02' ? '已全部完成' : ticketInfo.statusStr }} + 当前工单维修项目:{{ nowRepair.itemName }} @@ -173,11 +173,7 @@ - 维修配件 - - 是否开放给客户 - - + 维修配件 是否开放给客户