From f063fdb79367d4c51a6da1541ff55833d2c49a38 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 22 九月 2026 17:37:49 +0800
Subject: [PATCH] feat(mes): 更新IPQC过程检验功能

---
 src/views/mes/qc/oqc/modules/form.vue      |    2 
 src/views/hrm/salary/payment/index.vue     |    6 
 src/api/mes/qc/template/item/index.ts      |    4 
 src/api/mes/qc/pendinginspect/index.ts     |    1 
 src/views/mes/qc/ipqc/data.ts              |  101 +++++++------------------
 src/views/mes/qc/iqc/data.ts               |   10 --
 src/api/mes/qc/ipqc/index.ts               |   11 --
 src/views/hrm/salary/calculation/index.vue |   14 +-
 src/views/mes/qc/rqc/data.ts               |   19 ----
 src/views/mes/qc/pendinginspect/index.vue  |    4 
 src/views/mes/qc/oqc/data.ts               |   30 -------
 11 files changed, 44 insertions(+), 158 deletions(-)

diff --git a/src/api/mes/qc/ipqc/index.ts b/src/api/mes/qc/ipqc/index.ts
index 72c0e49..cd9390a 100644
--- a/src/api/mes/qc/ipqc/index.ts
+++ b/src/api/mes/qc/ipqc/index.ts
@@ -14,15 +14,8 @@
     sourceDocId?: number; // 鏉ユ簮鍗曟嵁 ID
     sourceLineId?: number; // 鏉ユ簮鍗曟嵁琛� ID
     sourceDocCode?: string; // 鏉ユ簮鍗曟嵁缂栧彿锛堝叧鑱旀煡璇級
-    workOrderId?: number; // 鐢熶骇璁㈠崟 ID
-    workOrderCode?: string; // 璁㈠崟缂栧彿锛堝叧鑱旀煡璇級
-    workOrderName?: string; // 璁㈠崟鍚嶇О锛堝叧鑱旀煡璇級
-    taskId?: number; // 鐢熶骇浠诲姟 ID
-    workstationId?: number; // 宸ヤ綅 ID
-    workstationName?: string; // 宸ヤ綅鍚嶇О锛堝叧鑱旀煡璇級
-    processId?: number; // 宸ュ簭 ID
-    processName?: string; // 宸ュ簭鍚嶇О锛堝叧鑱旀煡璇級
-    itemId?: number; // 浜у搧鐗╂枡 ID
+    batchCode?: string; // 鎵瑰彿锛堝繀濉級
+    itemId?: number; // 浜у搧鐗╂枡 ID锛圡DM 鐗╂枡锛�
     itemCode?: string; // 浜у搧鐗╂枡缂栫爜锛堝叧鑱旀煡璇級
     itemName?: string; // 浜у搧鐗╂枡鍚嶇О锛堝叧鑱旀煡璇級
     itemSpecification?: string; // 瑙勬牸鍨嬪彿锛堝叧鑱旀煡璇級
diff --git a/src/api/mes/qc/pendinginspect/index.ts b/src/api/mes/qc/pendinginspect/index.ts
index cbfbe7f..bc37f0b 100644
--- a/src/api/mes/qc/pendinginspect/index.ts
+++ b/src/api/mes/qc/pendinginspect/index.ts
@@ -9,6 +9,7 @@
     sourceDocId?: number; // 鏉ユ簮鍗曟嵁 ID
     sourceLineId?: number; // 鏉ユ簮鍗曟嵁琛� ID
     sourceDocCode?: string; // 鏉ユ簮鍗曟嵁缂栧彿
+    batchCode?: string; // 鎵瑰彿锛堜粎 IPQC/OQC/RQC 鏉ユ簮鏈夊�硷級
     qcType?: number; // 妫�楠岀被鍨嬶紙MesQcTypeEnum锛�
     itemId?: number; // 鐗╂枡 ID
     itemCode?: string; // 鐗╂枡缂栫爜
diff --git a/src/api/mes/qc/template/item/index.ts b/src/api/mes/qc/template/item/index.ts
index d10c641..8c9d360 100644
--- a/src/api/mes/qc/template/item/index.ts
+++ b/src/api/mes/qc/template/item/index.ts
@@ -68,12 +68,10 @@
   return requestClient.delete(`/mes/qc/template/item/delete?id=${id}`);
 }
 
-/** 鏍规嵁鐗╂枡鎴栧伐鍗�/浠诲姟鍜屾娴嬬绫昏幏鍙栧彲鐢ㄨ川妫�鏂规鍒楄〃 */
+/** 鏍规嵁鐗╂枡鍜屾娴嬬绫昏幏鍙栧彲鐢ㄨ川妫�鏂规鍒楄〃锛坕temId 涓� MDM 鐗╂枡 ID锛� */
 export function getTemplateItemOptionList(params: {
   itemId?: number;
   qcType: number;
-  taskId?: number;
-  workOrderId?: number;
 }) {
   return requestClient.get<MesQcTemplateItemOptionApi.Option[]>(
     '/mes/qc/template/item/list-by-item-and-type',
diff --git a/src/views/hrm/salary/calculation/index.vue b/src/views/hrm/salary/calculation/index.vue
index 33a1f36..9dbef3e 100644
--- a/src/views/hrm/salary/calculation/index.vue
+++ b/src/views/hrm/salary/calculation/index.vue
@@ -477,26 +477,26 @@
               label: '鏍哥畻',
               type: 'primary',
               icon: ACTION_ICON.EDIT,
-              auth: ['hrm:salary-calculation:calculate'],
+              auth: ['hrm:salary:calculate'],
               onClick: openCalculateModal,
             },
             {
               label: '鎵归噺纭',
               type: 'primary',
-              auth: ['hrm:salary-calculation:confirm'],
+              auth: ['hrm:salary:confirm'],
               onClick: handleBatchConfirm,
             },
             {
               label: '鎵归噺淇濆瓨',
               type: 'primary',
-              auth: ['hrm:salary-calculation:save'],
+              auth: ['hrm:salary:calculate'],
               onClick: handleBatchSave,
             },
             {
               label: $t('ui.actionTitle.export'),
               type: 'primary',
               icon: ACTION_ICON.DOWNLOAD,
-              auth: ['hrm:salary-calculation:export'],
+              auth: ['hrm:salary:export'],
               onClick: handleExport,
             },
           ]"
@@ -513,7 +513,7 @@
             {
               label: '纭',
               type: 'link',
-              auth: ['hrm:salary-calculation:confirm'],
+              auth: ['hrm:salary:confirm'],
               ifShow: row.status === 0,
               onClick: handleConfirm.bind(null, row),
             },
@@ -521,14 +521,14 @@
               label: '鍒犻櫎',
               type: 'link',
               danger: true,
-              auth: ['hrm:salary-calculation:delete'],
+              auth: ['hrm:salary:delete'],
               ifShow: row.status === 0,
               onClick: handleDelete.bind(null, row),
             },
             {
               label: '鎾ら攢纭',
               type: 'link',
-              auth: ['hrm:salary-calculation:confirm'],
+              auth: ['hrm:salary:confirm'],
               ifShow: row.status === 10,
               onClick: handleRevoke.bind(null, row),
             },
diff --git a/src/views/hrm/salary/payment/index.vue b/src/views/hrm/salary/payment/index.vue
index 4520c4b..f462f27 100644
--- a/src/views/hrm/salary/payment/index.vue
+++ b/src/views/hrm/salary/payment/index.vue
@@ -146,14 +146,14 @@
               label: '鐢熸垚鍙拌处',
               type: 'primary',
               icon: ACTION_ICON.ADD,
-              auth: ['hrm:salary-payment:generate'],
+              auth: ['hrm:salary:generate'],
               onClick: openGenerateModal,
             },
             {
               label: $t('ui.actionTitle.export'),
               type: 'primary',
               icon: ACTION_ICON.DOWNLOAD,
-              auth: ['hrm:salary-payment:export'],
+              auth: ['hrm:salary:export'],
               onClick: handleExport,
             },
           ]"
@@ -176,7 +176,7 @@
               label: '鍙戞斁',
               type: 'link',
               icon: ACTION_ICON.EDIT,
-              auth: ['hrm:salary-payment:pay'],
+              auth: ['hrm:salary:pay'],
               ifShow: row.status === 0,
               popConfirm: {
                 title: '纭鍙戞斁璇ュ懆鏈熺殑钖祫鍚楋紵',
diff --git a/src/views/mes/qc/ipqc/data.ts b/src/views/mes/qc/ipqc/data.ts
index 86522b9..afb351c 100644
--- a/src/views/mes/qc/ipqc/data.ts
+++ b/src/views/mes/qc/ipqc/data.ts
@@ -5,12 +5,7 @@
 
 import { h, markRaw } from 'vue';
 
-import {
-  DICT_TYPE,
-  MesAutoCodeRuleCode,
-  MesProTaskStatusEnum,
-  MesProWorkOrderStatusEnum,
-} from '@vben/constants';
+import { DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
 import { getDictOptions } from '@vben/hooks';
 
 import { Button } from 'ant-design-vue';
@@ -19,10 +14,7 @@
 import { getTemplateItemOptionList } from '#/api/mes/qc/template/item';
 import { getSimpleUserList } from '#/api/system/user';
 import { getRangePickerDefaultProps } from '#/utils';
-import { MdItemSelect } from '#/views/mes/md/item/components';
-import { MdWorkstationSelect } from '#/views/mes/md/workstation/components';
-import { ProTaskSelect } from '#/views/mes/pro/task/components';
-import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components';
+import { MdmItemSelect } from '#/views/basicData/mdm/components';
 
 /** 琛ㄥ崟绫诲瀷 */
 export type FormType = 'create' | 'detail' | 'update';
@@ -152,60 +144,30 @@
       },
     },
     {
-      fieldName: 'workOrderId',
-      label: '鐢熶骇璁㈠崟',
-      component: markRaw(ProWorkOrderSelect),
+      fieldName: 'itemId',
+      label: '浜у搧鐗╂枡',
+      component: markRaw(MdmItemSelect),
       componentProps: {
-        placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
-        status: MesProWorkOrderStatusEnum.CONFIRMED,
-        // 璁㈠崟鍙樻洿鏃舵竻绌虹敓浜т换鍔�
-        onChange: () => formApi?.setFieldValue('taskId', undefined),
+        placeholder: '璇烽�夋嫨浜у搧鐗╂枡',
       },
       rules: 'selectRequired',
       dependencies: {
         triggerFields: ['sourceDocId'],
         componentProps: (values) => ({
           disabled: !!values.sourceDocId,
-          placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
-          status: MesProWorkOrderStatusEnum.CONFIRMED,
-          onChange: () => formApi?.setFieldValue('taskId', undefined),
+          placeholder: '璇烽�夋嫨浜у搧鐗╂枡',
         }),
       },
     },
     {
-      fieldName: 'workstationId',
-      label: '宸ヤ綅',
-      component: markRaw(MdWorkstationSelect),
+      fieldName: 'batchCode',
+      label: '鎵瑰彿',
+      component: 'Input',
       componentProps: {
-        placeholder: '璇烽�夋嫨宸ヤ綅',
+        maxlength: 100,
+        placeholder: '璇疯緭鍏ユ壒鍙�',
       },
-      rules: 'selectRequired',
-      dependencies: {
-        triggerFields: ['sourceDocId'],
-        componentProps: (values) => ({
-          disabled: !!values.sourceDocId,
-          placeholder: '璇烽�夋嫨宸ヤ綅',
-        }),
-      },
-    },
-    {
-      fieldName: 'taskId',
-      label: '鐢熶骇浠诲姟',
-      component: markRaw(ProTaskSelect),
-      componentProps: {
-        placeholder: '璇烽�夋嫨鐢熶骇浠诲姟',
-        statuses: [MesProTaskStatusEnum.PREPARE],
-      },
-      dependencies: {
-        triggerFields: ['sourceDocId', 'workOrderId', 'workstationId'],
-        componentProps: (values) => ({
-          disabled: !!values.sourceDocId || !values.workOrderId,
-          placeholder: '璇烽�夋嫨鐢熶骇浠诲姟',
-          statuses: [MesProTaskStatusEnum.PREPARE],
-          workOrderId: values.workOrderId,
-          workstationId: values.workstationId,
-        }),
-      },
+      rules: 'required',
     },
     {
       fieldName: 'templateId',
@@ -220,23 +182,15 @@
       },
       rules: 'selectRequired',
       dependencies: {
-        triggerFields: ['workOrderId', 'taskId'],
+        triggerFields: ['itemId'],
         componentProps: (values) => ({
           api: getTemplateItemOptionList,
           autoSelect: 'first',
           labelField: 'templateName',
           valueField: 'templateId',
-          disabled: formType !== 'create' || !values.workOrderId,
-          params: values.workOrderId
-            ? {
-                qcType: 2,
-                workOrderId: values.workOrderId,
-                taskId: values.taskId,
-              }
-            : {},
-          placeholder: values.workOrderId
-            ? '璇烽�夋嫨璐ㄦ鏂规'
-            : '璇峰厛閫夋嫨鐢熶骇璁㈠崟',
+          disabled: formType !== 'create' || !values.itemId,
+          params: values.itemId ? { itemId: values.itemId, qcType: 2 } : {},
+          placeholder: values.itemId ? '璇烽�夋嫨璐ㄦ鏂规' : '璇峰厛閫夋嫨浜у搧鐗╂枡',
         }),
       },
     },
@@ -414,17 +368,18 @@
       },
     },
     {
-      fieldName: 'workOrderId',
-      label: '鐢熶骇璁㈠崟',
-      component: markRaw(ProWorkOrderSelect),
+      fieldName: 'batchCode',
+      label: '鎵瑰彿',
+      component: 'Input',
       componentProps: {
-        placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
+        allowClear: true,
+        placeholder: '璇疯緭鍏ユ壒鍙�',
       },
     },
     {
       fieldName: 'itemId',
       label: '浜у搧鐗╂枡',
-      component: markRaw(MdItemSelect),
+      component: markRaw(MdmItemSelect),
       componentProps: {
         placeholder: '璇烽�夋嫨浜у搧鐗╂枡',
       },
@@ -474,11 +429,6 @@
       },
     },
     {
-      field: 'workOrderCode',
-      title: '鐢熶骇璁㈠崟缂栧彿',
-      width: 140,
-    },
-    {
       field: 'itemCode',
       title: '浜у搧鐗╂枡缂栫爜',
       width: 130,
@@ -494,6 +444,11 @@
       width: 130,
     },
     {
+      field: 'batchCode',
+      title: '鎵瑰彿',
+      width: 140,
+    },
+    {
       field: 'unitName',
       title: '鍗曚綅',
       width: 80,
diff --git a/src/views/mes/qc/iqc/data.ts b/src/views/mes/qc/iqc/data.ts
index a59f777..63ff5f1 100644
--- a/src/views/mes/qc/iqc/data.ts
+++ b/src/views/mes/qc/iqc/data.ts
@@ -393,16 +393,6 @@
       minWidth: 180,
     },
     {
-      field: 'vendorNickname',
-      title: '渚涘簲鍟嗙畝绉�',
-      width: 120,
-    },
-    {
-      field: 'vendorBatch',
-      title: '渚涘簲鍟嗘壒娆″彿',
-      width: 130,
-    },
-    {
       field: 'itemCode',
       title: '浜у搧鐗╂枡缂栫爜',
       width: 130,
diff --git a/src/views/mes/qc/oqc/data.ts b/src/views/mes/qc/oqc/data.ts
index 54b6766..b457b34 100644
--- a/src/views/mes/qc/oqc/data.ts
+++ b/src/views/mes/qc/oqc/data.ts
@@ -168,7 +168,6 @@
       componentProps: {
         placeholder: '璇烽�夋嫨瀹㈡埛',
       },
-      rules: 'selectRequired',
       dependencies: {
         triggerFields: ['sourceDocId'],
         componentProps: (values) => ({
@@ -203,7 +202,6 @@
           }
         },
       },
-      rules: 'required',
       dependencies: {
         triggerFields: ['sourceDocId'],
         componentProps: (values) => ({
@@ -239,7 +237,6 @@
           }
         },
       },
-      rules: 'required',
     },
     {
       fieldName: 'qualifiedQuantity',
@@ -286,7 +283,6 @@
         placeholder: '璇烽�夋嫨鍑鸿揣鏃ユ湡',
         valueFormat: 'YYYY-MM-DD',
       },
-      rules: 'required',
     },
     {
       fieldName: 'inspectDate',
@@ -395,16 +391,6 @@
       minWidth: 180,
     },
     {
-      field: 'clientNickname',
-      title: '瀹㈡埛鍚嶇О',
-      width: 120,
-    },
-    {
-      field: 'batchCode',
-      title: '鎵规鍙�',
-      width: 130,
-    },
-    {
       field: 'itemCode',
       title: '浜у搧鐗╂枡缂栫爜',
       width: 130,
@@ -425,16 +411,6 @@
       width: 80,
     },
     {
-      field: 'outQuantity',
-      title: '鍙戣揣鏁伴噺',
-      width: 100,
-    },
-    {
-      field: 'checkQuantity',
-      title: '妫�娴嬫暟閲�',
-      width: 100,
-    },
-    {
       field: 'unqualifiedQuantity',
       title: '涓嶅悎鏍兼暟',
       width: 100,
@@ -447,12 +423,6 @@
         name: 'CellDict',
         props: { type: DICT_TYPE.MES_QC_CHECK_RESULT },
       },
-    },
-    {
-      field: 'outDate',
-      title: '鍑鸿揣鏃ユ湡',
-      width: 120,
-      formatter: 'formatDate',
     },
     {
       field: 'inspectDate',
diff --git a/src/views/mes/qc/oqc/modules/form.vue b/src/views/mes/qc/oqc/modules/form.vue
index e9e7258..d111608 100644
--- a/src/views/mes/qc/oqc/modules/form.vue
+++ b/src/views/mes/qc/oqc/modules/form.vue
@@ -183,7 +183,7 @@
       }
     } else if (data?.prefill) {
       // 棰勫~妯″紡锛氭潵鑷緟妫�浠诲姟銆傛簮椤圭洰闈� watcher 鑷姩鎶� outQuantity 鍚屾鍒�
-      // checkQuantity锛岃繖閲屾樉寮忚ˉ榻愶紝閬垮厤蹇呭~鐨勬娴嬫暟閲忎负绌�
+      // checkQuantity锛岃繖閲屾樉寮忚ˉ榻�
       const prefill = {
         ...data.prefill,
         checkQuantity: data.prefill.checkQuantity ?? data.prefill.outQuantity,
diff --git a/src/views/mes/qc/pendinginspect/index.vue b/src/views/mes/qc/pendinginspect/index.vue
index cc33a44..92bcd25 100644
--- a/src/views/mes/qc/pendinginspect/index.vue
+++ b/src/views/mes/qc/pendinginspect/index.vue
@@ -59,6 +59,7 @@
 /** 鍒涘缓杩囩▼妫�楠屽崟锛圛PQC锛� */
 function handleCreateIpqc(row: MesQcPendingInspectApi.PendingInspect) {
   const prefill: MesQcIpqcApi.Ipqc = {
+    batchCode: row.batchCode,
     checkQuantity: row.quantity,
     inspectDate: row.recordTime,
     itemId: row.itemId,
@@ -67,9 +68,6 @@
     sourceDocId: row.sourceDocId,
     sourceDocType: row.sourceDocType,
     sourceLineId: row.sourceLineId,
-    taskId: row.taskId,
-    workOrderId: row.workOrderId,
-    workstationId: row.workstationId,
   };
   ipqcFormModalApi.setData({ formType: 'create', prefill }).open();
 }
diff --git a/src/views/mes/qc/rqc/data.ts b/src/views/mes/qc/rqc/data.ts
index ab9af37..749a23d 100644
--- a/src/views/mes/qc/rqc/data.ts
+++ b/src/views/mes/qc/rqc/data.ts
@@ -385,20 +385,6 @@
       minWidth: 180,
     },
     {
-      field: 'sourceDocType',
-      title: '鏉ユ簮鍗曟嵁绫诲瀷',
-      width: 120,
-      cellRender: {
-        name: 'CellDict',
-        props: { type: DICT_TYPE.MES_QC_SOURCE_DOC_TYPE },
-      },
-    },
-    {
-      field: 'sourceDocCode',
-      title: '鏉ユ簮鍗曟嵁缂栫爜',
-      width: 160,
-    },
-    {
       field: 'itemCode',
       title: '浜у搧鐗╂枡缂栫爜',
       width: 130,
@@ -417,11 +403,6 @@
       field: 'unitName',
       title: '鍗曚綅',
       width: 80,
-    },
-    {
-      field: 'batchCode',
-      title: '鎵规鍙�',
-      width: 130,
     },
     {
       field: 'checkResult',

--
Gitblit v1.9.3