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',