From a241b66efcc41e973290a6722fb7a4d79b833ea1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 13 十月 2026 09:54:32 +0800
Subject: [PATCH] feat(bi): 为图表配置接口添加名称字段
---
src/views/mes/md/item/data.ts | 41 ++++++++++++++++++++++-------------------
1 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/src/views/mes/md/item/data.ts b/src/views/mes/md/item/data.ts
index 19b364c..bf649b1 100644
--- a/src/views/mes/md/item/data.ts
+++ b/src/views/mes/md/item/data.ts
@@ -9,8 +9,8 @@
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
-} 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';
@@ -96,7 +96,7 @@
label: '鐗╂枡鍒嗙被',
component: markRaw(MdItemTypeSelect),
componentProps: {
- onChange: async (itemType: any) => {
+ onChange: async (itemType: { itemOrProduct?: string }) => {
await formApi?.setFieldValue(
'itemOrProduct',
itemType?.itemOrProduct,
@@ -111,7 +111,7 @@
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
- disabled: false,
+ disabled: true,
optionType: 'button',
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
},
@@ -216,8 +216,14 @@
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ョ墿鏂欏悕绉�',
+ placeholder: '鏀寔鍚嶇О涓庤鏍肩粍鍚堟煡璇�',
},
+ },
+ {
+ fieldName: 'specification',
+ label: '瑙勬牸鍨嬪彿',
+ component: 'Input',
+ componentProps: { allowClear: true, placeholder: '璇疯緭鍏ヨ鏍煎瀷鍙�' },
},
{
fieldName: 'status',
@@ -257,12 +263,7 @@
}
/** 鍒楄〃鐨勫瓧娈� */
-export function useGridColumns(
- onStatusChange?: (
- newStatus: number,
- row: MesMdItemApi.Item,
- ) => PromiseLike<boolean | undefined>,
-): VxeTableGridOptions<MesMdItemApi.Item>['columns'] {
+export function useGridColumns(): VxeTableGridOptions<MesMdItemApi.Item>['columns'] {
return [
{
field: 'code',
@@ -315,15 +316,11 @@
{
field: 'status',
title: '鐘舵��',
- width: 120,
+ width: 100,
align: 'center',
cellRender: {
- attrs: { beforeChange: onStatusChange },
- name: 'CellSwitch',
- props: {
- checkedValue: CommonStatusEnum.ENABLE,
- unCheckedValue: CommonStatusEnum.DISABLE,
- },
+ name: 'CellDict',
+ props: { type: DICT_TYPE.COMMON_STATUS },
},
},
{
@@ -359,9 +356,15 @@
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ョ墿鏂欏悕绉�',
+ placeholder: '鏀寔鍚嶇О涓庤鏍肩粍鍚堟煡璇�',
},
},
+ {
+ fieldName: 'specification',
+ label: '瑙勬牸鍨嬪彿',
+ component: 'Input',
+ componentProps: { allowClear: true, placeholder: '璇疯緭鍏ヨ鏍煎瀷鍙�' },
+ },
];
}
--
Gitblit v1.9.3