From a71c03764633bf076f4170c44277114cbb55959c Mon Sep 17 00:00:00 2001 From: xiangxy Date: Wed, 17 Dec 2025 14:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E6=89=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/manage/merge-pallet.vue | 42 ++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/pages/manage/merge-pallet.vue b/pages/manage/merge-pallet.vue index 9a06238..c2181fe 100644 --- a/pages/manage/merge-pallet.vue +++ b/pages/manage/merge-pallet.vue @@ -103,7 +103,8 @@ - + + @@ -149,6 +150,9 @@ this.title = options.title }, methods: { + toCancel() { + this.show = false + }, handleChange (e) { if (e) { this._checkTrayInfo(e) @@ -157,15 +161,12 @@ async _checkTrayInfo (e) { try { let res = await checkTrayInfo(e) - if (this.pType === 0) { - this.oPallet = res.vehicle_code - this.oPalletData = res.materials.map(item => ({ - ...item, - selected: false - })) - this.pType = 1 - } else { - if (res.vehicle_code !== this.val1) { + // pType: 控制输入框:0是原始托盘, 1是目标托盘 + // oPallet 表格里的 原始托盘 , oPalletData 原始托盘grid + // tPallet 表格里的 目标托盘 , tPalletData 目标托盘gird + if (this.pType === 1) { + // if (res.vehicle_code !== this.val1) { + if (res.vehicle_code !== this.oPallet) { this.tPallet = res.vehicle_code this.tPalletData = [...res.materials] this.pType = 0 @@ -176,6 +177,16 @@ }) } } + // 扫原始托盘,同时原始托盘表格没值,就第一次查 + if (this.pType === 0 && this.oPallet === null) { + this.oPallet = res.vehicle_code + this.oPalletData = res.materials.map(item => ({ + ...item, + selected: false + })) + this.pType = 1 + } + } catch (e) { if (this.pType === 0) { this.oPallet = null @@ -185,7 +196,9 @@ this.tPalletData = [] } } - this.val1 = '' + setTimeout(()=> { + this.val1 = '' + }, 1600) }, toggleSelect(index) { this.$set(this.oPalletData, index, { @@ -293,11 +306,14 @@ title: res.message, icon: 'none' }) - if (res.is_second_store_in) { + if (res.is_second_store_in === false) { + this.times = 1 + this.message = '请等待AGV取走第一个托盘后再将另一个托盘放置在SD01点位,扫描托盘码进行入库。' + } + if (res.success === true) { this.val2 = '' this.val3 = '' this.times = 1 - this.message = '请等待AGV取走第一个托盘后再将另一个托盘放置在SD01点位,扫描托盘码进行入库。' } } else { if (res.is_second_store_in) {