From baddb052ccd4a91ef1881ba663e6a4e55b05f4fb Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 14 十月 2026 15:51:55 +0800
Subject: [PATCH] feat(hrm): 社保公积金方案表单加「适用部门」与默认缴费基数,修比例输入精度

---
 src/views/mes/qc/oqc/data.ts |  144 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 113 insertions(+), 31 deletions(-)

diff --git a/src/views/mes/qc/oqc/data.ts b/src/views/mes/qc/oqc/data.ts
index 08ddd90..ac71c9e 100644
--- a/src/views/mes/qc/oqc/data.ts
+++ b/src/views/mes/qc/oqc/data.ts
@@ -11,8 +11,10 @@
 import { Button } from 'ant-design-vue';
 
 import { generateAutoCode } from '#/api/mes/md/autocode/record';
+import { getTemplateItemOptionList } from '#/api/mes/qc/template/item';
 import { getSimpleUserList } from '#/api/system/user';
-import { MdClientSelect } from '#/views/mes/md/client/components';
+import { getRangePickerDefaultProps } from '#/utils';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
 import { MdmItemSelect } from '#/views/basicData/mdm/components';
 
 /** 琛ㄥ崟绫诲瀷 */
@@ -133,13 +135,39 @@
       },
     },
     {
+      fieldName: 'templateId',
+      label: '璐ㄦ鏂规',
+      component: 'ApiSelect',
+      componentProps: {
+        api: getTemplateItemOptionList,
+        autoSelect: 'first',
+        labelField: 'templateName',
+        valueField: 'templateId',
+        placeholder: '璇烽�夋嫨璐ㄦ鏂规',
+      },
+      rules: 'selectRequired',
+      dependencies: {
+        triggerFields: ['itemId'],
+        componentProps: (values) => ({
+          api: getTemplateItemOptionList,
+          autoSelect: 'first',
+          labelField: 'templateName',
+          valueField: 'templateId',
+          disabled: formType !== 'create' || !values.itemId,
+          params: values.itemId
+            ? { itemId: values.itemId, qcType: 3 }
+            : {},
+          placeholder: values.itemId ? '璇烽�夋嫨璐ㄦ鏂规' : '璇峰厛閫夋嫨浜у搧鐗╂枡',
+        }),
+      },
+    },
+    {
       fieldName: 'clientId',
       label: '瀹㈡埛',
-      component: markRaw(MdClientSelect),
+      component: markRaw(CrmCustomerSelect),
       componentProps: {
         placeholder: '璇烽�夋嫨瀹㈡埛',
       },
-      rules: 'selectRequired',
       dependencies: {
         triggerFields: ['sourceDocId'],
         componentProps: (values) => ({
@@ -174,7 +202,6 @@
           }
         },
       },
-      rules: 'required',
       dependencies: {
         triggerFields: ['sourceDocId'],
         componentProps: (values) => ({
@@ -233,6 +260,7 @@
         placeholder: '璇疯緭鍏ヤ笉鍚堟牸鍝佹暟閲�',
       },
       rules: 'required',
+      help: '涓嶅悎鏍煎搧鏁伴噺澶т簬0鏃讹紝淇濆瓨鍚庡皢鑷姩鐢熸垚涓嶅悎鏍煎鐞嗗崟',
     },
     {
       fieldName: 'inspectorUserId',
@@ -254,9 +282,8 @@
       componentProps: {
         format: 'YYYY-MM-DD',
         placeholder: '璇烽�夋嫨鍑鸿揣鏃ユ湡',
-        valueFormat: 'x',
+        valueFormat: 'YYYY-MM-DD',
       },
-      rules: 'required',
     },
     {
       fieldName: 'inspectDate',
@@ -265,9 +292,60 @@
       componentProps: {
         format: 'YYYY-MM-DD',
         placeholder: '璇烽�夋嫨妫�娴嬫棩鏈�',
-        valueFormat: 'x',
+        valueFormat: 'YYYY-MM-DD',
       },
       rules: 'required',
+    },
+    {
+      fieldName: 'samplingLocation',
+      label: '閲囨牱鍦扮偣',
+      component: 'Input',
+      componentProps: {
+        maxlength: 100,
+        placeholder: '璇疯緭鍏ラ噰鏍峰湴鐐�',
+      },
+    },
+    {
+      fieldName: 'certificateNo',
+      label: '璇佷功缂栧彿',
+      component: 'Input',
+      componentProps: {
+        maxlength: 50,
+        placeholder: '璇疯緭鍏ヨ瘉涔︾紪鍙�',
+      },
+    },
+    {
+      fieldName: 'executeStandard',
+      label: '鎵ц鏍囧噯',
+      component: 'Input',
+      componentProps: {
+        maxlength: 50,
+        placeholder: '濡� GB/T 6027锛岄�夋嫨璐ㄦ鏂规鍚庤嚜鍔ㄥ甫鍏�',
+      },
+    },
+    {
+      fieldName: 'auditUserId',
+      label: '澶嶆牳浜�',
+      component: 'ApiSelect',
+      componentProps: {
+        allowClear: true,
+        api: getSimpleUserList,
+        labelField: 'nickname',
+        placeholder: '璇烽�夋嫨澶嶆牳浜�',
+        valueField: 'id',
+      },
+    },
+    {
+      fieldName: 'approveUserId',
+      label: '瀹℃牳浜�',
+      component: 'ApiSelect',
+      componentProps: {
+        allowClear: true,
+        api: getSimpleUserList,
+        labelField: 'nickname',
+        placeholder: '璇烽�夋嫨瀹℃牳浜�',
+        valueField: 'id',
+      },
     },
     {
       fieldName: 'checkResult',
@@ -275,9 +353,10 @@
       component: 'Select',
       componentProps: {
         allowClear: true,
-        options: getDictOptions(DICT_TYPE.MES_QC_CHECK_RESULT, 'number'),
+        options: getDictOptions(DICT_TYPE.MES_OQC_CHECK_RESULT, 'number'),
         placeholder: '璇烽�夋嫨妫�娴嬬粨鏋�',
       },
+      rules: 'selectRequired',
     },
     {
       fieldName: 'remark',
@@ -307,7 +386,7 @@
     {
       fieldName: 'clientId',
       label: '瀹㈡埛',
-      component: markRaw(MdClientSelect),
+      component: markRaw(CrmCustomerSelect),
       componentProps: {
         placeholder: '璇烽�夋嫨瀹㈡埛',
       },
@@ -335,8 +414,16 @@
       component: 'Select',
       componentProps: {
         allowClear: true,
-        options: getDictOptions(DICT_TYPE.MES_QC_CHECK_RESULT, 'number'),
+        options: getDictOptions(DICT_TYPE.MES_OQC_CHECK_RESULT, 'number'),
         placeholder: '璇烽�夋嫨妫�娴嬬粨鏋�',
+      },
+    },
+    {
+      fieldName: 'inspectDate',
+      label: '妫�娴嬫棩鏈�',
+      component: 'RangePicker',
+      componentProps: {
+        ...getRangePickerDefaultProps(),
       },
     },
   ];
@@ -355,16 +442,6 @@
       field: 'name',
       title: '妫�楠屽崟鍚嶇О',
       minWidth: 180,
-    },
-    {
-      field: 'clientNickname',
-      title: '瀹㈡埛鍚嶇О',
-      width: 120,
-    },
-    {
-      field: 'batchCode',
-      title: '鎵规鍙�',
-      width: 130,
     },
     {
       field: 'itemCode',
@@ -387,11 +464,6 @@
       width: 80,
     },
     {
-      field: 'outQuantity',
-      title: '鍙戣揣鏁伴噺',
-      width: 100,
-    },
-    {
       field: 'checkQuantity',
       title: '妫�娴嬫暟閲�',
       width: 100,
@@ -407,14 +479,14 @@
       width: 110,
       cellRender: {
         name: 'CellDict',
-        props: { type: DICT_TYPE.MES_QC_CHECK_RESULT },
+        props: { type: DICT_TYPE.MES_OQC_CHECK_RESULT },
       },
     },
     {
-      field: 'outDate',
-      title: '鍑鸿揣鏃ユ湡',
-      width: 120,
-      formatter: 'formatDate',
+      field: 'indicatorResultSummary',
+      title: '妫�娴嬬粨鏋滐紙妫�楠岄」锛�',
+      minWidth: 200,
+      showOverflow: 'tooltip',
     },
     {
       field: 'inspectDate',
@@ -428,6 +500,16 @@
       width: 100,
     },
     {
+      field: 'auditNickname',
+      title: '澶嶆牳浜�',
+      width: 100,
+    },
+    {
+      field: 'approveNickname',
+      title: '瀹℃牳浜�',
+      width: 100,
+    },
+    {
       field: 'status',
       title: '鍗曟嵁鐘舵��',
       width: 100,
@@ -438,7 +520,7 @@
     },
     {
       title: '鎿嶄綔',
-      width: 220,
+      width: 420,
       fixed: 'right',
       slots: { default: 'actions' },
     },

--
Gitblit v1.9.3