From 9b22062e208f65b9c344f5c5a8891aea9b304c0f Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期六, 09 五月 2026 10:16:54 +0800
Subject: [PATCH] feat(生产订单): 在订单列表和合并下发表单中增加车间字段

---
 src/views/productionManagement/productionOrder/index.vue |    4 ++++
 src/views/productionPlan/productionPlan/index.vue        |   14 ++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 8d44b85..f0135a4 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -361,6 +361,10 @@
       width: 120,
     },
     {
+      label: "杞﹂棿鍚嶇О",
+      prop: "workshopName",
+    },
+    {
       dataType: "action",
       label: "鎿嶄綔",
       align: "center",
diff --git a/src/views/productionPlan/productionPlan/index.vue b/src/views/productionPlan/productionPlan/index.vue
index 589cbd5..78dca1f 100644
--- a/src/views/productionPlan/productionPlan/index.vue
+++ b/src/views/productionPlan/productionPlan/index.vue
@@ -102,7 +102,7 @@
                destroy-on-close
                title="鍚堝苟涓嬪彂"
                width="600px">
-      <el-form :model="mergeForm"
+      <el-form :model="mergeForm" :rules="mergeFormRules"
                label-width="120px">
         <el-row :gutter="20">
           <el-col :span="10">
@@ -131,7 +131,7 @@
                            @change="onBlur"
                            style="width: 100%" />
         </el-form-item>
-        <el-form-item label="杞﹂棿">
+        <el-form-item label="杞﹂棿" prop="workshopId" required>
           <el-select v-model="mergeForm.workshopId"
                      placeholder="璇烽�夋嫨杞﹂棿"
                      clearable
@@ -467,6 +467,12 @@
     total: 0,
   });
   const selectedRows = ref([]);
+
+  const mergeFormRules = {
+    workshopId: [
+      { required: true, message: '璇烽�夋嫨杞﹂棿', trigger: 'change' }
+    ]
+  }
 
   // 浜у搧绫诲埆姹囨�荤粺璁℃暟鎹�
   const categorySummary = ref([]);
@@ -812,6 +818,10 @@
       ElMessage.warning("璇疯緭鍏ョ敓浜ф暟閲�");
       return;
     }
+    if(!mergeForm.workshopId){
+      ElMessage.warning("璇烽�夋嫨杞﹂棿");
+      return;
+    }
     console.log(sumAssignedQuantity.value, "sumAssignedQuantity");
 
     // 楠岃瘉totalAssignedQuantity涓嶈兘澶т簬鎬绘柟鏁�

--
Gitblit v1.9.3