From 2c354c2d7ea51b0f78c858fef1edd93354405c6b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 12 十月 2026 18:20:16 +0800
Subject: [PATCH] fix(erp): 单据明细单价口径由「不含税单价」改为「含税单价」(前端)
---
src/views/mes/qc/ipqc/data.ts | 121 +++++++++++++++++++++-------------------
1 files changed, 63 insertions(+), 58 deletions(-)
diff --git a/src/views/mes/qc/ipqc/data.ts b/src/views/mes/qc/ipqc/data.ts
index 60836e7..8a422f4 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 '../../../../packages/constants/src';
-import { getDictOptions } from '../../../../packages/effects/hooks/src';
+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,53 @@
},
},
{
- 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: '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 ? { itemId: values.itemId, qcType: 2 } : {},
+ placeholder: values.itemId ? '璇烽�夋嫨璐ㄦ鏂规' : '璇峰厛閫夋嫨浜у搧鐗╂枡',
}),
},
},
@@ -250,6 +239,7 @@
precision: 2,
},
rules: 'required',
+ help: '涓嶅悎鏍煎搧鏁伴噺澶т簬0鏃讹紝淇濆瓨鍚庡皢鑷姩鐢熸垚涓嶅悎鏍煎鐞嗗崟',
},
{
fieldName: 'laborScrapQuantity',
@@ -328,7 +318,7 @@
componentProps: {
format: 'YYYY-MM-DD',
placeholder: '璇烽�夋嫨妫�娴嬫棩鏈�',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD',
},
rules: 'required',
},
@@ -378,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: '璇烽�夋嫨浜у搧鐗╂枡',
},
@@ -401,6 +392,14 @@
allowClear: true,
options: getDictOptions(DICT_TYPE.MES_QC_CHECK_RESULT, 'number'),
placeholder: '璇烽�夋嫨妫�娴嬬粨鏋�',
+ },
+ },
+ {
+ fieldName: 'inspectDate',
+ label: '妫�娴嬫棩鏈�',
+ component: 'RangePicker',
+ componentProps: {
+ ...getRangePickerDefaultProps(),
},
},
];
@@ -430,11 +429,6 @@
},
},
{
- field: 'workOrderCode',
- title: '鐢熶骇璁㈠崟缂栧彿',
- width: 140,
- },
- {
field: 'itemCode',
title: '浜у搧鐗╂枡缂栫爜',
width: 130,
@@ -448,6 +442,11 @@
field: 'itemSpecification',
title: '瑙勬牸鍨嬪彿',
width: 130,
+ },
+ {
+ field: 'batchCode',
+ title: '鎵瑰彿',
+ width: 140,
},
{
field: 'unitName',
@@ -469,6 +468,12 @@
},
},
{
+ field: 'indicatorResultSummary',
+ title: '妫�娴嬬粨鏋滐紙妫�楠岄」锛�',
+ minWidth: 200,
+ showOverflow: 'tooltip',
+ },
+ {
field: 'inspectDate',
title: '妫�娴嬫棩鏈�',
width: 120,
--
Gitblit v1.9.3