From 2e8df0f6054892ab2abde5c47d42f35dff096910 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期一, 09 三月 2026 09:36:57 +0800
Subject: [PATCH] 工序增加类型

---
 src/views/productionManagement/productionProcess/index.vue |    5 +++++
 src/views/productionManagement/productionProcess/Edit.vue  |   18 ++++++++++++++++++
 src/views/productionManagement/productionProcess/New.vue   |   16 ++++++++++++++++
 3 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/src/views/productionManagement/productionProcess/Edit.vue b/src/views/productionManagement/productionProcess/Edit.vue
index 8e92403..fb0ee74 100644
--- a/src/views/productionManagement/productionProcess/Edit.vue
+++ b/src/views/productionManagement/productionProcess/Edit.vue
@@ -25,6 +25,21 @@
         <el-form-item label="宸ュ簭缂栧彿" prop="no">
           <el-input v-model="formState.no"  />
         </el-form-item>
+        <el-form-item
+            label="宸ュ簭绫诲瀷"
+            prop="type"
+            :rules="[
+                {
+                required: true,
+                message: '璇烽�夋嫨宸ュ簭绫诲瀷',
+              }
+            ]"
+        >
+          <el-select v-model="formState.type" placeholder="璇烽�夋嫨宸ュ簭绫诲瀷">
+            <el-option label="璁℃椂" :value="0" />
+            <el-option label="璁′欢" :value="1" />
+          </el-select>
+        </el-form-item>
         <el-form-item label="宸ヨ祫瀹氶" prop="salaryQuota">
           <el-input v-model="formState.salaryQuota" type="number" :step="0.001" />
         </el-form-item>
@@ -67,6 +82,7 @@
 const formState = ref({
   id: props.record.id,
   name: props.record.name,
+  type: props.record.type,
   no: props.record.no,
   remark: props.record.remark,
   salaryQuota: props.record.salaryQuota,
@@ -89,6 +105,7 @@
       id: newRecord.id,
       name: newRecord.name || '',
       no: newRecord.no || '',
+      type: newRecord.type,
       remark: newRecord.remark || '',
       salaryQuota: newRecord.salaryQuota || '',
       isQuality: props.record.isQuality,
@@ -103,6 +120,7 @@
       id: props.record.id,
       name: props.record.name || '',
       no: props.record.no || '',
+      type: props.record.type,
       remark: props.record.remark || '',
       salaryQuota: props.record.salaryQuota || '',
       isQuality: props.record.isQuality,
diff --git a/src/views/productionManagement/productionProcess/New.vue b/src/views/productionManagement/productionProcess/New.vue
index 001e3b1..a5f00aa 100644
--- a/src/views/productionManagement/productionProcess/New.vue
+++ b/src/views/productionManagement/productionProcess/New.vue
@@ -25,6 +25,21 @@
         <el-form-item label="宸ュ簭缂栧彿" prop="no">
           <el-input v-model="formState.no"  />
         </el-form-item>
+        <el-form-item
+            label="宸ュ簭绫诲瀷"
+            prop="type"
+            :rules="[
+                {
+                required: true,
+                message: '璇烽�夋嫨宸ュ簭绫诲瀷',
+              }
+            ]"
+        >
+          <el-select v-model="formState.type" placeholder="璇烽�夋嫨宸ュ簭绫诲瀷">
+            <el-option label="璁℃椂" :value="0" />
+            <el-option label="璁′欢" :value="1" />
+          </el-select>
+        </el-form-item>
         <el-form-item label="宸ヨ祫瀹氶" prop="salaryQuota">
           <el-input v-model="formState.salaryQuota" type="number" :step="0.001">
             <template #append>鍏�</template>
@@ -63,6 +78,7 @@
 // 鍝嶅簲寮忔暟鎹紙鏇夸唬閫夐」寮忕殑 data锛�
 const formState = ref({
   name: '',
+  type: undefined,
   remark: '',
   salaryQuota:  '',
   isQuality: false,
diff --git a/src/views/productionManagement/productionProcess/index.vue b/src/views/productionManagement/productionProcess/index.vue
index 4f3f3ef..9761f25 100644
--- a/src/views/productionManagement/productionProcess/index.vue
+++ b/src/views/productionManagement/productionProcess/index.vue
@@ -99,6 +99,10 @@
       prop: "name",
     },
     {
+      label: "宸ュ簭绫诲瀷",
+      prop: "typeText",
+    },
+    {
       label: "宸ヨ祫瀹氶",
       prop: "salaryQuota",
     },
@@ -175,6 +179,7 @@
         tableLoading.value = false;
         tableData.value = res.data.records.map(item => ({
           ...item,
+          typeText: item.type ? (item.type === 0 ? "璁℃椂" : "璁′欢") : "",
         }));
         page.total = res.data.total;
       })

--
Gitblit v1.9.3