From 9343bd4c71c55bde7b5e82b84d1e127de09e0447 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 30 三月 2026 09:19:38 +0800
Subject: [PATCH] 军泰伟业 1.生产订单销售台账带出的生产订单绑定工艺路线时,无法选择
---
src/views/productionManagement/productionOrder/New.vue | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/New.vue b/src/views/productionManagement/productionOrder/New.vue
index 500145d..2109385 100644
--- a/src/views/productionManagement/productionOrder/New.vue
+++ b/src/views/productionManagement/productionOrder/New.vue
@@ -426,7 +426,8 @@
const items = res.data || [];
processRouteItemsOptions.value = items;
- // 鑷姩娣诲姞宸ュ簭
+ // 鑷姩娣诲姞宸ュ簭锛岃鍒掓暟浣跨敤鍩烘湰淇℃伅鐨勯渶姹傛暟閲�
+ const demandQty = formState.value.quantity || 1;
processRouteItems.value = items.map(item => ({
processId: item.processId,
processName: item.processName,
@@ -434,7 +435,7 @@
userPower: item.userPower ? item.userPower.split(',') : [],
planStartTime: "",
planEndTime: "",
- planNum: 1,
+ planNum: demandQty,
isQuality: item.isQuality || false,
}));
});
@@ -496,13 +497,20 @@
}
}, { deep: true });
-// 鐩戝惉闇�姹傛暟閲忓彉鍖栵紝閲嶆柊璁$畻鐗╂枡闇�姹傛暟閲�
+// 鐩戝惉闇�姹傛暟閲忓彉鍖栵紝閲嶆柊璁$畻鐗╂枡闇�姹傛暟閲忓拰宸ュ簭璁″垝鏁�
watch(() => formState.value.quantity, (newQty) => {
+ // 鏇存柊鐗╂枡娓呭崟鐨勯渶姹傛暟閲�
if (productStructureRecords.value.length > 0 && newQty) {
productStructureRecords.value.forEach(item => {
item.demandedQuantity = (item.unitQuantity || 1) * newQty;
});
}
+ // 鏇存柊宸ュ簭鐨勮鍒掓暟
+ if (processRouteItems.value.length > 0 && newQty) {
+ processRouteItems.value.forEach(item => {
+ item.planNum = newQty;
+ });
+ }
});
// 鍗曚綅浜у嚭闇�瑕佹暟閲忓彉鍖栧鐞�
--
Gitblit v1.9.3