From a9ae52222bf634de89a5c0b13b8f77c064b8e58a Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Sat, 23 Nov 2024 18:03:34 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E6=B5=81=E7=A8=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inOutWarehouse/inOutWarehouse.vue | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/pages-warehouse/inOutWarehouse/inOutWarehouse.vue b/pages-warehouse/inOutWarehouse/inOutWarehouse.vue index 90a2a72..c341c21 100644 --- a/pages-warehouse/inOutWarehouse/inOutWarehouse.vue +++ b/pages-warehouse/inOutWarehouse/inOutWarehouse.vue @@ -55,6 +55,13 @@ + + + + + + + @@ -93,6 +100,10 @@ export default { selectRows: [], fileList: [], sizeType: ['compressed'], + chooseStaff: [], + staffs: [], + ticketId: null, + nowStaffId: null, }; }, onLoad(data) { @@ -100,6 +111,8 @@ export default { this.formData = getJSONData("applyWaresForm") this.isReceive = this.formData.isReceive this.twId = this.formData.id + this.ticketId = this.formData.ticketId + this.nowStaffId = this.formData.repairId this.init() } if (data.isToBeReviewed) { @@ -109,7 +122,7 @@ export default { computed: {}, methods: { - submitBefore(){ + async submitBefore(){ if (this.isReceive){ if (!this.selectRows || this.selectRows.length === 0){ uni.showToast({ @@ -118,7 +131,21 @@ export default { }) return } - this.$refs.popup.open() + request({ + url: '/admin-api/repair/worker/listByTicketId?ticketId=' + this.ticketId, + method: 'get' + }).then(res => { + this.chooseStaff = [] + const data = res.data + this.staffs = data.map(item => { + return { + text: item.userName, + value: item.userId + } + }) + this.chooseStaff.push(this.nowStaffId) + this.$refs.popup.open() + }) }else { this.submit() } @@ -288,6 +315,14 @@ export default { return item.path.replace(config.baseImageUrl, "") }).join(",") } + if (this.isReceive && (!this.chooseStaff || this.chooseStaff.length === 0)){ + uni.showToast({ + title: '请选择领料人!', + icon: 'none' + }) + return + } + this.formData.repairSo.userIds = this.chooseStaff.join(",") request({ url: '/admin-api/repair/tw/pass', method: 'post',