From bf1ac5ed2e52fb5c1860abbbddc29b7c968ff352 Mon Sep 17 00:00:00 2001 From: jhd <1684074631@qq.com> Date: Fri, 10 Jul 2026 09:41:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms):=20=E4=B8=BA=E4=BA=A7=E9=9C=80?= =?UTF-8?q?=E5=8D=95=E7=BB=91=E5=AE=9A=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在绑定产需单表格区域添加v-loading指令显示加载状态 - 新增boundReqLoading数据属性控制加载状态 - 在loadBoundRequirements方法开始时设置加载状态为true - 在各种返回条件下正确重置加载状态为false - 确保异步操作完成后始终关闭加载状态 --- klp-ui/src/views/wms/post/aps/order.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/klp-ui/src/views/wms/post/aps/order.vue b/klp-ui/src/views/wms/post/aps/order.vue index 957ebb91a..d4837993c 100644 --- a/klp-ui/src/views/wms/post/aps/order.vue +++ b/klp-ui/src/views/wms/post/aps/order.vue @@ -192,7 +192,7 @@
已绑定的产需单({{ boundReqList.length }} 条)
-
+
@@ -266,6 +266,7 @@ export default { total: 0, currentOrder: null, boundReqList: [], + boundReqLoading: false, productList: [], productName: '', totalQuantity: 0, @@ -347,10 +348,11 @@ export default { /** 加载已绑定的产需单 */ loadBoundRequirements(orderId) { this.boundReqList = [] - if (!orderId) return + this.boundReqLoading = true + if (!orderId) { this.boundReqLoading = false; return } listRel({ orderId }).then(relRes => { const rels = (relRes.rows || []).filter(r => r.scheduleId) - if (rels.length === 0) return + if (rels.length === 0) { this.boundReqLoading = false; return } const scheduleIds = [...new Set(rels.map(r => r.scheduleId))] Promise.all(scheduleIds.map(id => getRequirement(id).catch(() => null))).then(reqs => { const reqMap = {} @@ -370,9 +372,11 @@ export default { } return arr }, []) + this.boundReqLoading = false }) }).catch(() => { this.boundReqList = [] + this.boundReqLoading = false }) }, reqStatusTag(status) {