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/ipqc/data.ts | 190 +++++++++++++++++++++++++++++++++--------------
1 files changed, 132 insertions(+), 58 deletions(-)
diff --git a/src/views/mes/qc/ipqc/data.ts b/src/views/mes/qc/ipqc/data.ts
index d035a14..5103269 100644
--- a/src/views/mes/qc/ipqc/data.ts
+++ b/src/views/mes/qc/ipqc/data.ts
@@ -5,22 +5,16 @@
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';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
+import { getTemplateItemOptionList } from '#/api/mes/qc/template/item';
import { getSimpleUserList } from '#/api/system/user';
-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 { getRangePickerDefaultProps } from '#/utils';
+import { MdmItemSelect } from '#/views/basicData/mdm/components';
/** 琛ㄥ崟绫诲瀷 */
export type FormType = 'create' | 'detail' | 'update';
@@ -150,58 +144,61 @@
},
},
{
- 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: '璇烽�夋嫨宸ヤ綅',
+ allowClear: true,
+ maxlength: 100,
+ placeholder: '璇疯緭鍏ユ壒鍙�',
+ },
+ rules: 'required',
+ },
+ {
+ fieldName: 'templateId',
+ label: '璐ㄦ鏂规',
+ component: 'ApiSelect',
+ componentProps: {
+ api: getTemplateItemOptionList,
+ autoSelect: 'first',
+ labelField: 'templateName',
+ valueField: 'templateId',
+ placeholder: '璇烽�夋嫨璐ㄦ鏂规',
},
rules: 'selectRequired',
dependencies: {
- triggerFields: ['sourceDocId'],
+ triggerFields: ['itemId'],
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,
+ api: getTemplateItemOptionList,
+ autoSelect: 'first',
+ labelField: 'templateName',
+ valueField: 'templateId',
+ disabled: formType !== 'create' || !values.itemId,
+ params: values.itemId
+ ? {
+ qcType: 2,
+ itemId: values.itemId,
+ }
+ : {},
+ placeholder: values.itemId
+ ? '璇烽�夋嫨璐ㄦ鏂规'
+ : '璇峰厛閫夋嫨浜у搧鐗╂枡',
}),
},
},
@@ -250,6 +247,7 @@
precision: 2,
},
rules: 'required',
+ help: '涓嶅悎鏍煎搧鏁伴噺澶т簬0鏃讹紝淇濆瓨鍚庡皢鑷姩鐢熸垚涓嶅悎鏍煎鐞嗗崟',
},
{
fieldName: 'laborScrapQuantity',
@@ -328,9 +326,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',
@@ -378,17 +427,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: '璇烽�夋嫨浜у搧鐗╂枡',
},
@@ -401,6 +451,14 @@
allowClear: true,
options: getDictOptions(DICT_TYPE.MES_QC_CHECK_RESULT, 'number'),
placeholder: '璇烽�夋嫨妫�娴嬬粨鏋�',
+ },
+ },
+ {
+ fieldName: 'inspectDate',
+ label: '妫�娴嬫棩鏈�',
+ component: 'RangePicker',
+ componentProps: {
+ ...getRangePickerDefaultProps(),
},
},
];
@@ -430,11 +488,6 @@
},
},
{
- field: 'workOrderCode',
- title: '鐢熶骇璁㈠崟缂栧彿',
- width: 140,
- },
- {
field: 'itemCode',
title: '浜у搧鐗╂枡缂栫爜',
width: 130,
@@ -448,6 +501,11 @@
field: 'itemSpecification',
title: '瑙勬牸鍨嬪彿',
width: 130,
+ },
+ {
+ field: 'batchCode',
+ title: '鎵瑰彿',
+ width: 140,
},
{
field: 'unitName',
@@ -469,6 +527,12 @@
},
},
{
+ field: 'indicatorResultSummary',
+ title: '妫�娴嬬粨鏋滐紙妫�楠岄」锛�',
+ minWidth: 200,
+ showOverflow: 'tooltip',
+ },
+ {
field: 'inspectDate',
title: '妫�娴嬫棩鏈�',
width: 120,
@@ -477,6 +541,16 @@
{
field: 'inspectorNickname',
title: '妫�娴嬩汉鍛�',
+ width: 100,
+ },
+ {
+ field: 'auditNickname',
+ title: '澶嶆牳浜�',
+ width: 100,
+ },
+ {
+ field: 'approveNickname',
+ title: '瀹℃牳浜�',
width: 100,
},
{
@@ -490,7 +564,7 @@
},
{
title: '鎿嶄綔',
- width: 180,
+ width: 420,
fixed: 'right',
slots: { default: 'actions' },
},
--
Gitblit v1.9.3