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 @@ - 维修配件 - - 是否开放给客户 - - + 维修配件 是否开放给客户