From 72d05df7e112f5f31f09e9f5c3592555c7a84040 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Mon, 24 Mar 2025 14:33:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=A3=E9=80=89=E5=8F=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/mork2.js | 79 +++++++++++++++++++----------------- src/pages/modules/index1.vue | 12 ++++-- 2 files changed, 50 insertions(+), 41 deletions(-) diff --git a/src/config/mork2.js b/src/config/mork2.js index 318865e..babdebd 100644 --- a/src/config/mork2.js +++ b/src/config/mork2.js @@ -262,44 +262,49 @@ export const queryPickingPoint = () => { } export const pickingInfo = () => { - let res = [ - { - "qty": 26, - "vehicle_code": "Z00017", - "create_time": null, - "update_time": null, - "stor_code": null, - "task_type": "PK20240909006", - "material_name": "测试物料33fdfdff测试物料33", - "material_code": null, - "material_spec": "test_zz", - "assign_qty": 7, - "single_weight": 15.70, - "theory_qty": 0, - "actual_weight": 0, - "remaining_qty": 26, - "form_data": "{\"stor_code\": \"FStockId\", \"point_code\": \"1311\", \"product_area\": \"A1\", \"vehicle_code\": \"Z00017\"}", - "product_area": "A1" - }, - { - "qty": 200, - "vehicle_code": "X00021", - "create_time": null, - "update_time": null, - "stor_code": null, - "task_type": "PK20241017002", - "material_name": "测试物料", - "material_code": null, - "material_spec": "test_zz", - "assign_qty": 4, - "single_weight": 15.70, - "theory_qty": 0, - "actual_weight": 0, - "remaining_qty": 200, - "form_data": "{\"stor_code\": \"FStockId\", \"point_code\": \"1311\", \"product_area\": \"A1\", \"vehicle_code\": \"X00021\"}", - "product_area": "A1" + let res = { + taskList: [ + { + "qty": 26, + "vehicle_code": "Z00017", + "create_time": null, + "update_time": null, + "stor_code": null, + "task_type": "PK20240909006", + "material_name": "测试物料33fdfdff测试物料33", + "material_code": null, + "material_spec": "test_zz", + "assign_qty": 7, + "single_weight": 15.70, + "theory_qty": 0, + "actual_weight": 0, + "remaining_qty": 26, + "form_data": "{\"stor_code\": \"FStockId\", \"point_code\": \"1311\", \"product_area\": \"A1\", \"vehicle_code\": \"Z00017\"}", + "product_area": "A1" + }, + { + "qty": 200, + "vehicle_code": "X00021", + "create_time": null, + "update_time": null, + "stor_code": null, + "task_type": "PK20241017002", + "material_name": "测试物料", + "material_code": null, + "material_spec": "test_zz", + "assign_qty": 4, + "single_weight": 15.70, + "theory_qty": 0, + "actual_weight": 0, + "remaining_qty": 200, + "form_data": "{\"stor_code\": \"FStockId\", \"point_code\": \"1311\", \"product_area\": \"A1\", \"vehicle_code\": \"X00021\"}", + "product_area": "A1" + } + ], + pointInfo: { + is_used: false } - ] + } return res } diff --git a/src/pages/modules/index1.vue b/src/pages/modules/index1.vue index 590fa43..589b218 100644 --- a/src/pages/modules/index1.vue +++ b/src/pages/modules/index1.vue @@ -193,22 +193,26 @@ export default { }, async _pickingInfo () { 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 () { let res = await queryPickingPoint() this.options = [...res] if (res.length > 0) { this.value = res[0].code - this.isUsed = res[0].is_used this._pickingInfo() this.timerFun(this._pickingInfo, this.interTime)() } }, change (e) { if (e) { - const item = this.options.find(item => item.code === e) - this.isUsed = item.is_used if (this.intervalId !== null) { clearTimeout(this.intervalId) this.intervalId = null