From 9411998dd248fba03b64c3f2df876fc7718c7a77 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 21 九月 2026 15:33:42 +0800
Subject: [PATCH] fix(contract): 更新合同编号字段配置和API代理目标

---
 src/views/mes/qc/ipqc/data.ts |  117 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 106 insertions(+), 11 deletions(-)

diff --git a/src/views/mes/qc/ipqc/data.ts b/src/views/mes/qc/ipqc/data.ts
index 3cfe8e6..78363f1 100644
--- a/src/views/mes/qc/ipqc/data.ts
+++ b/src/views/mes/qc/ipqc/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { MesQcIpqcApi } from '#/api/mes/qc/ipqc';
 import type { MesQcIpqcLineApi } from '#/api/mes/qc/ipqc/line';
@@ -10,13 +10,15 @@
   MesAutoCodeRuleCode,
   MesProTaskStatusEnum,
   MesProWorkOrderStatusEnum,
-} from '../../../../packages/constants/src';
-import { getDictOptions } from '../../../../packages/effects/hooks/src';
+} from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
 
 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 { 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';
@@ -151,12 +153,12 @@
     },
     {
       fieldName: 'workOrderId',
-      label: '鐢熶骇宸ュ崟',
+      label: '鐢熶骇璁㈠崟',
       component: markRaw(ProWorkOrderSelect),
       componentProps: {
-        placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+        placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
         status: MesProWorkOrderStatusEnum.CONFIRMED,
-        // 宸ュ崟鍙樻洿鏃舵竻绌虹敓浜т换鍔�
+        // 璁㈠崟鍙樻洿鏃舵竻绌虹敓浜т换鍔�
         onChange: () => formApi?.setFieldValue('taskId', undefined),
       },
       rules: 'selectRequired',
@@ -164,7 +166,7 @@
         triggerFields: ['sourceDocId'],
         componentProps: (values) => ({
           disabled: !!values.sourceDocId,
-          placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+          placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
           status: MesProWorkOrderStatusEnum.CONFIRMED,
           onChange: () => formApi?.setFieldValue('taskId', undefined),
         }),
@@ -202,6 +204,39 @@
           statuses: [MesProTaskStatusEnum.PREPARE],
           workOrderId: values.workOrderId,
           workstationId: values.workstationId,
+        }),
+      },
+    },
+    {
+      fieldName: 'templateId',
+      label: '璐ㄦ鏂规',
+      component: 'ApiSelect',
+      componentProps: {
+        api: getTemplateItemOptionList,
+        autoSelect: 'first',
+        labelField: 'templateName',
+        valueField: 'templateId',
+        placeholder: '璇烽�夋嫨璐ㄦ鏂规',
+      },
+      rules: 'selectRequired',
+      dependencies: {
+        triggerFields: ['workOrderId', 'taskId'],
+        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
+            ? '璇烽�夋嫨璐ㄦ鏂规'
+            : '璇峰厛閫夋嫨鐢熶骇璁㈠崟',
         }),
       },
     },
@@ -250,6 +285,7 @@
         precision: 2,
       },
       rules: 'required',
+      help: '涓嶅悎鏍煎搧鏁伴噺澶т簬0鏃讹紝淇濆瓨鍚庡皢鑷姩鐢熸垚涓嶅悎鏍煎鐞嗗崟',
     },
     {
       fieldName: 'laborScrapQuantity',
@@ -328,9 +364,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',
@@ -379,10 +466,10 @@
     },
     {
       fieldName: 'workOrderId',
-      label: '鐢熶骇宸ュ崟',
+      label: '鐢熶骇璁㈠崟',
       component: markRaw(ProWorkOrderSelect),
       componentProps: {
-        placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+        placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
       },
     },
     {
@@ -401,6 +488,14 @@
         allowClear: true,
         options: getDictOptions(DICT_TYPE.MES_QC_CHECK_RESULT, 'number'),
         placeholder: '璇烽�夋嫨妫�娴嬬粨鏋�',
+      },
+    },
+    {
+      fieldName: 'inspectDate',
+      label: '妫�娴嬫棩鏈�',
+      component: 'RangePicker',
+      componentProps: {
+        ...getRangePickerDefaultProps(),
       },
     },
   ];
@@ -431,7 +526,7 @@
     },
     {
       field: 'workOrderCode',
-      title: '鐢熶骇宸ュ崟缂栧彿',
+      title: '鐢熶骇璁㈠崟缂栧彿',
       width: 140,
     },
     {

--
Gitblit v1.9.3