From 5e94a2858a40bc32f3b0369172e16ce17597714a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 16 一月 2026 16:28:29 +0800
Subject: [PATCH] fix: 同步军泰伟业生产模块变更

---
 src/views/productionManagement/productionProcess/Edit.vue |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/src/views/productionManagement/productionProcess/Edit.vue b/src/views/productionManagement/productionProcess/Edit.vue
index 31e3109..f979d51 100644
--- a/src/views/productionManagement/productionProcess/Edit.vue
+++ b/src/views/productionManagement/productionProcess/Edit.vue
@@ -22,6 +22,9 @@
             ]">
           <el-input v-model="formState.name" />
         </el-form-item>
+        <el-form-item label="宸ュ簭缂栧彿" prop="no">
+          <el-input v-model="formState.no"  />
+        </el-form-item>
         <el-form-item label="宸ヨ祫瀹氶" prop="salaryQuota">
           <el-input v-model="formState.salaryQuota" type="number" :step="0.001" />
         </el-form-item>
@@ -40,7 +43,7 @@
 </template>
 
 <script setup>
-import { ref, computed, getCurrentInstance } from "vue";
+import { ref, computed, getCurrentInstance, watch } from "vue";
 import {update} from "@/api/productionManagement/productionProcess.js";
 
 const props = defineProps({
@@ -61,6 +64,7 @@
 const formState = ref({
   id: props.record.id,
   name: props.record.name,
+  no: props.record.no,
   remark: props.record.remark,
   salaryQuota: props.record.salaryQuota,
 });
@@ -74,6 +78,32 @@
   },
 });
 
+// 鐩戝惉 record 鍙樺寲锛屾洿鏂拌〃鍗曟暟鎹�
+watch(() => props.record, (newRecord) => {
+  if (newRecord && isShow.value) {
+    formState.value = {
+      id: newRecord.id,
+      name: newRecord.name || '',
+      no: newRecord.no || '',
+      remark: newRecord.remark || '',
+      salaryQuota: newRecord.salaryQuota || '',
+    };
+  }
+}, { immediate: true, deep: true });
+
+// 鐩戝惉寮圭獥鎵撳紑锛岄噸鏂板垵濮嬪寲琛ㄥ崟鏁版嵁
+watch(() => props.visible, (visible) => {
+  if (visible && props.record) {
+    formState.value = {
+      id: props.record.id,
+      name: props.record.name || '',
+      no: props.record.no || '',
+      remark: props.record.remark || '',
+      salaryQuota: props.record.salaryQuota || '',
+    };
+  }
+});
+
 let { proxy } = getCurrentInstance()
 
 const closeModal = () => {

--
Gitblit v1.9.3