From be77586206e5bd0e2deb31ac7256791e418b869f Mon Sep 17 00:00:00 2001 From: PQZ Date: Wed, 13 Nov 2024 17:47:41 +0800 Subject: [PATCH] 1 --- components/orderCard.vue | 3 ++- pages-home/home/home.vue | 3 +++ pages-order/choosePeople/choosePeople.vue | 29 +++++++++++++++++++++-- utils/utils.js | 1 + 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/components/orderCard.vue b/components/orderCard.vue index 8517283..0cf19d9 100644 --- a/components/orderCard.vue +++ b/components/orderCard.vue @@ -199,8 +199,9 @@ export default { url: '/pages-order/choosePeople/choosePeople?id=' + this.order.id + '&isNei='+isNei }) }else { + let canOperate = this.order.canOperate?'1':'0' uni.navigateTo({ - url: '/pages-order/choosePeople/choosePeople?id=' + this.order.id + url: '/pages-order/choosePeople/choosePeople?id=' + this.order.id + '&canOperate='+canOperate }) } } diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue index d85f0e3..0c7a3e3 100644 --- a/pages-home/home/home.vue +++ b/pages-home/home/home.vue @@ -9,6 +9,7 @@ {{ userInfo.nickname }} {{ userInfo.roleNames }} + 班组长 @@ -229,6 +230,7 @@ export default { selectedProj: [], //告知客户的内容 tellCusText:"", + ifLeader:false, } }, onLoad(){ @@ -250,6 +252,7 @@ export default { }else{ //直接取缓存中的用户信息 this.userInfo = getUserInfo() + this.ifLeader = getStrData('ifLeader') this.getNoReadNum() this.getNoticeList() this.onRefresherrefresh() diff --git a/pages-order/choosePeople/choosePeople.vue b/pages-order/choosePeople/choosePeople.vue index 9c92769..84e9478 100644 --- a/pages-order/choosePeople/choosePeople.vue +++ b/pages-order/choosePeople/choosePeople.vue @@ -56,7 +56,7 @@ - 确定选择(内返派工) + 确定选择 确定选择 @@ -100,7 +100,13 @@ export default { if (data.id) { console.log('执行了派单') this.ticketId = data.id - this.workByTicketId() + console.log(data.canOperate,103) + console.log(data.canOperate === '1',104) + if (data.canOperate === '1'){ + this.listLeadsAll() + } else { + this.workByTicketId() + } } if (data.isNei) { //内返派工 @@ -131,6 +137,25 @@ export default { } }, methods: { + + /** + * 维修班组长修改派工 + */ + listLeadsAll(){ + request({ + url: '/admin-api/repair/worker/listLeadsAll', + method: 'get', + }).then((res) => { + this.list = res.data + if (this.list.length > 0) { + console.log(this.list[0].userId) + this.checkedUserId = this.list[0].userId + this.checkedUserName = this.list[0].userName + } + }) + }, + + /** * 内返派工打开上传附件弹窗 */ diff --git a/utils/utils.js b/utils/utils.js index ca7cca4..9122e26 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -221,6 +221,7 @@ export function builderOrder(order) { userName: order.userName, userPhone: order.userMobile, counselorName: order.adviserName, + canOperate:order.canOperate, } }