拣选台修改

This commit is contained in:
2025-03-24 14:33:41 +08:00
parent 4ecf794234
commit 72d05df7e1
2 changed files with 50 additions and 41 deletions

View File

@@ -262,7 +262,8 @@ export const queryPickingPoint = () => {
} }
export const pickingInfo = () => { export const pickingInfo = () => {
let res = [ let res = {
taskList: [
{ {
"qty": 26, "qty": 26,
"vehicle_code": "Z00017", "vehicle_code": "Z00017",
@@ -299,7 +300,11 @@ export const pickingInfo = () => {
"form_data": "{\"stor_code\": \"FStockId\", \"point_code\": \"1311\", \"product_area\": \"A1\", \"vehicle_code\": \"X00021\"}", "form_data": "{\"stor_code\": \"FStockId\", \"point_code\": \"1311\", \"product_area\": \"A1\", \"vehicle_code\": \"X00021\"}",
"product_area": "A1" "product_area": "A1"
} }
] ],
pointInfo: {
is_used: false
}
}
return res return res
} }

View File

@@ -193,22 +193,26 @@ export default {
}, },
async _pickingInfo () { async _pickingInfo () {
let res = await pickingInfo(this.value) let res = await pickingInfo(this.value)
this.itemData = [...res] if (res) {
if (res.taskList) {
this.itemData = [...res.taskList]
}
if (res.pointInfo) {
this.isUsed = res.pointInfo.is_used
}
}
}, },
async _queryPickingPoint () { async _queryPickingPoint () {
let res = await queryPickingPoint() let res = await queryPickingPoint()
this.options = [...res] this.options = [...res]
if (res.length > 0) { if (res.length > 0) {
this.value = res[0].code this.value = res[0].code
this.isUsed = res[0].is_used
this._pickingInfo() this._pickingInfo()
this.timerFun(this._pickingInfo, this.interTime)() this.timerFun(this._pickingInfo, this.interTime)()
} }
}, },
change (e) { change (e) {
if (e) { if (e) {
const item = this.options.find(item => item.code === e)
this.isUsed = item.is_used
if (this.intervalId !== null) { if (this.intervalId !== null) {
clearTimeout(this.intervalId) clearTimeout(this.intervalId)
this.intervalId = null this.intervalId = null