合托修改

This commit is contained in:
2025-12-17 14:14:58 +08:00
parent a90cfcb9f3
commit a71c037646

View File

@@ -103,7 +103,8 @@
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-22 button-primary" :class="{'button-info': !val2 || !val3}" :disabled="disabled" @tap="_generateStoreInTask">入库</button> <button class="zd-col-6 button-default" @tap="toCancel">取消</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val2 || !val3}" :disabled="disabled" @tap="_generateStoreInTask">入库</button>
</view> </view>
</view> </view>
<view v-show="show" class="msg_mask"></view> <view v-show="show" class="msg_mask"></view>
@@ -149,6 +150,9 @@
this.title = options.title this.title = options.title
}, },
methods: { methods: {
toCancel() {
this.show = false
},
handleChange (e) { handleChange (e) {
if (e) { if (e) {
this._checkTrayInfo(e) this._checkTrayInfo(e)
@@ -157,15 +161,12 @@
async _checkTrayInfo (e) { async _checkTrayInfo (e) {
try { try {
let res = await checkTrayInfo(e) let res = await checkTrayInfo(e)
if (this.pType === 0) { // pType: 控制输入框0是原始托盘, 1是目标托盘
this.oPallet = res.vehicle_code // oPallet 表格里的 原始托盘 , oPalletData 原始托盘grid
this.oPalletData = res.materials.map(item => ({ // tPallet 表格里的 目标托盘 , tPalletData 目标托盘gird
...item, if (this.pType === 1) {
selected: false // if (res.vehicle_code !== this.val1) {
})) if (res.vehicle_code !== this.oPallet) {
this.pType = 1
} else {
if (res.vehicle_code !== this.val1) {
this.tPallet = res.vehicle_code this.tPallet = res.vehicle_code
this.tPalletData = [...res.materials] this.tPalletData = [...res.materials]
this.pType = 0 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) { } catch (e) {
if (this.pType === 0) { if (this.pType === 0) {
this.oPallet = null this.oPallet = null
@@ -185,7 +196,9 @@
this.tPalletData = [] this.tPalletData = []
} }
} }
this.val1 = '' setTimeout(()=> {
this.val1 = ''
}, 1600)
}, },
toggleSelect(index) { toggleSelect(index) {
this.$set(this.oPalletData, index, { this.$set(this.oPalletData, index, {
@@ -293,11 +306,14 @@
title: res.message, title: res.message,
icon: 'none' 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.val2 = ''
this.val3 = '' this.val3 = ''
this.times = 1 this.times = 1
this.message = '请等待AGV取走第一个托盘后再将另一个托盘放置在SD01点位扫描托盘码进行入库。'
} }
} else { } else {
if (res.is_second_store_in) { if (res.is_second_store_in) {