From af06b4d2623314446670ea9f0f1ff44b40c9d036 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 20 四月 2026 17:24:11 +0800
Subject: [PATCH] 工序管理模块完善

---
 src/views/productionManagement/productionProcess/index.vue |   59 +++++++----------------------
 src/api/productionManagement/productionProcess.js          |   12 +++---
 2 files changed, 21 insertions(+), 50 deletions(-)

diff --git a/src/api/productionManagement/productionProcess.js b/src/api/productionManagement/productionProcess.js
index 50f756e..7eda917 100644
--- a/src/api/productionManagement/productionProcess.js
+++ b/src/api/productionManagement/productionProcess.js
@@ -70,9 +70,9 @@
 }
 
 // 鑾峰彇宸ュ簭鍙傛暟鍒楄〃
-export function getProcessParamList(processId, params) {
+export function getProcessParamList(params) {
   return request({
-    url: `/productProcessParam/list/${processId}`,
+    url: `/technologyOperationParam/list`,
     method: "get",
     params,
   });
@@ -81,7 +81,7 @@
 // 娣诲姞宸ュ簭鍙傛暟
 export function addProcessParam(data) {
   return request({
-    url: "/productProcessParam/add",
+    url: "/technologyOperationParam/",
     method: "post",
     data: data,
   });
@@ -90,8 +90,8 @@
 // 缂栬緫宸ュ簭鍙傛暟
 export function editProcessParam(data) {
   return request({
-    url: "/productProcessParam/edit",
-    method: "put",
+    url: "/technologyOperationParam/",
+    method: "post",
     data: data,
   });
 }
@@ -99,7 +99,7 @@
 // 鍒犻櫎宸ュ簭鍙傛暟
 export function deleteProcessParam(id) {
   return request({
-    url: `/productProcessParam/${id}`,
+    url: `/technologyOperationParam/batchDelete/${id}`,
     method: "delete",
   });
 }
diff --git a/src/views/productionManagement/productionProcess/index.vue b/src/views/productionManagement/productionProcess/index.vue
index c52fa65..e4a1348 100644
--- a/src/views/productionManagement/productionProcess/index.vue
+++ b/src/views/productionManagement/productionProcess/index.vue
@@ -44,16 +44,12 @@
             <div class="card-body">
               <!-- <div class="process-name">{{ process.name }}</div> -->
               <div class="process-desc">{{ process.remark || '鏆傛棤鎻忚堪' }}</div>
-              <div class="process-device">鍏宠仈璁惧: {{ process.deviceName || '鏈叧鑱�' }}</div>
+              <div class="process-device">鍏宠仈璁惧: {{ deviceOptions.find(item => item.id === Number(process.deviceLedgerId)).deviceName|| '鏈叧鑱�' }}</div>
             </div>
             <div class="card-footer">
-              <div class="status-tag"> <el-tag size="small"
-                        :type="process.status ? 'success' : 'info'">
-                  {{ process.status ? '鍚敤' : '鍋滅敤' }}
-                </el-tag>
+              <div class="status-tag">
                 <el-tag size="small"
-                        :type="process.isQuality ? 'warning' : 'info'"
-                        style="margin-left: 8px">
+                        :type="process.isQuality ? 'warning' : 'info'">
                   {{ process.isQuality ? '璐ㄦ' : '闈炶川妫�' }}
                 </el-tag>
                 <el-tag v-if="process.type !== null && process.type !== undefined"
@@ -154,13 +150,6 @@
                     :rows="3"
                     placeholder="璇疯緭鍏ュ伐搴忔弿杩�" />
         </el-form-item>
-        <el-form-item label="鐘舵��"
-                      prop="status">
-          <el-radio-group v-model="processForm.status">
-            <el-radio :label="true">鍚敤</el-radio>
-            <el-radio :label="false">鍋滅敤</el-radio>
-          </el-radio-group>
-        </el-form-item>
       </el-form>
       <template #footer>
         <span class="dialog-footer">
@@ -245,7 +234,6 @@
             </el-form-item>
             <el-form-item label="鏍囧噯鍊�">
               <el-input v-model="selectedParam.standardValue"
-                        type="number"
                         placeholder="璇疯緭鍏ラ粯璁ゅ��" />
             </el-form-item>
           </el-form>
@@ -276,7 +264,6 @@
         <el-form-item label="鏍囧噯鍊�"
                       prop="standardValue">
           <el-input v-model="editParamForm.standardValue"
-                    type="number"
                     placeholder="璇疯緭鍏ユ爣鍑嗗��" />
         </el-form-item>
       </el-form>
@@ -335,7 +322,6 @@
     salaryQuota: null,
     isQuality: false,
     remark: "",
-    status: true,
     deviceLedgerId: null,
     type: 0,
   });
@@ -381,11 +367,10 @@
   const editParamFormRef = ref(null);
   const editParamForm = reactive({
     id: null,
-    processId: null,
-    paramId: null,
+    technologyOperationId: null,
+    technologyParamId: null,
     paramName: "",
     standardValue: null,
-    tenantId: 1,
   });
   const editParamRules = {
     standardValue: [
@@ -436,13 +421,6 @@
     {
       label: "鍙栧�兼牸寮�",
       prop: "paramFormat",
-      formatData: (val, row) => {
-        if (row.paramType == "3") {
-          const dict = dictTypes.value.find(item => item.dictType === val);
-          return dict ? "瀛楀吀:" + dict.dictName : val;
-        }
-        return val;
-      },
     },
     {
       label: "鏍囧噯鍊�",
@@ -472,7 +450,7 @@
   // 鑾峰彇宸ュ簭鍒楄〃
   const getProcessList = () => {
     processLoading.value = true;
-    getProcessListApi()
+    getProcessListApi({ size: -1, current: -1 })
       .then(res => {
         processValueList.value = res.data.records || [];
       })
@@ -503,13 +481,11 @@
   const getParamList = processId => {
     paramLoading.value = true;
     console.log(paramPage2.value, "paramPage2.value");
-    getProcessParamList(processId, {
-      current: paramPage2.value.current,
-      size: paramPage2.value.size,
-    })
+    getProcessParamList({ technologyOperationId: processId })
       .then(res => {
-        paramList.value = res.data.records || [];
-        paramPage2.value.total = res.data.total;
+        console.log(res, "res");
+        paramList.value = res.data || [];
+        paramPage2.value.total = 0;
       })
       .catch(() => {
         ElMessage.error("鑾峰彇鍙傛暟鍒楄〃澶辫触");
@@ -534,23 +510,19 @@
     processForm.salaryQuota = null;
     processForm.isQuality = false;
     processForm.remark = "";
-    processForm.status = true;
     processForm.deviceLedgerId = null;
     processForm.type = 0;
-    loadDeviceName();
     processDialogVisible.value = true;
   };
 
   const handleEditProcess = async process => {
     isProcessEdit.value = true;
-    await loadDeviceName(); // Ensure deviceOptions is loaded before setting deviceLedgerId
     processForm.id = process.id;
     processForm.no = process.no;
     processForm.name = process.name;
     processForm.salaryQuota = process.salaryQuota;
     processForm.isQuality = !!process.isQuality;
     processForm.remark = process.remark || "";
-    processForm.status = process.status;
     processForm.deviceLedgerId = Number(process.deviceLedgerId);
     processForm.type = process.type;
     processDialogVisible.value = true;
@@ -712,11 +684,10 @@
 
   const handleEditParam = row => {
     editParamForm.id = row.id;
-    editParamForm.processId = row.processId;
-    editParamForm.paramId = row.paramId;
+    editParamForm.technologyOperationId = row.technologyOperationId;
+    editParamForm.technologyParamId = row.technologyParamId;
     editParamForm.paramName = row.paramName;
     editParamForm.standardValue = row.standardValue;
-    editParamForm.tenantId = 1;
     editParamDialogVisible.value = true;
   };
 
@@ -742,10 +713,9 @@
       return;
     }
     addProcessParam({
-      processId: selectedProcess.value.id,
-      paramId: selectedParam.value.id,
+      technologyOperationId: selectedProcess.value.id,
+      technologyParamId: selectedParam.value.id,
       standardValue: selectedParam.value.standardValue,
-      tenantId: 1,
     })
       .then(() => {
         ElMessage.success("娣诲姞鎴愬姛");
@@ -772,6 +742,7 @@
   };
 
   onMounted(() => {
+    loadDeviceName();
     getProcessList();
     getDictTypes();
   });

--
Gitblit v1.9.3