From 5c243d9d05da668a32b1bc9a4f543ea081488d11 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期四, 20 八月 2026 14:08:03 +0800
Subject: [PATCH] feat 功能变更
---
src/views/mes/md/item/data.ts | 38 ++++++++++++++++++++++++--------------
1 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/src/views/mes/md/item/data.ts b/src/views/mes/md/item/data.ts
index 5425bc8..6893c75 100644
--- a/src/views/mes/md/item/data.ts
+++ b/src/views/mes/md/item/data.ts
@@ -111,7 +111,7 @@
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
- disabled: false,
+ disabled: true,
optionType: 'button',
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
},
@@ -176,6 +176,15 @@
show: (values) => Boolean(values.safeStockFlag),
},
rules: z.number().default(0),
+ },
+ {
+ fieldName: 'materialCategory',
+ label: '鐗╄祫鍒嗙被',
+ component: 'Select',
+ componentProps: {
+ options: getDictOptions(DICT_TYPE.MES_MATERIAL_CATEGORY, 'number'),
+ placeholder: '璇烽�夋嫨鐗╄祫鍒嗙被',
+ },
},
{
fieldName: 'remark',
@@ -257,12 +266,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',
@@ -303,6 +307,16 @@
},
},
{
+ field: 'materialCategory',
+ title: '鐗╄祫鍒嗙被',
+ width: 120,
+ align: 'center',
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.MES_MATERIAL_CATEGORY },
+ },
+ },
+ {
field: 'safeStockFlag',
title: '瀹夊叏搴撳瓨',
width: 120,
@@ -315,15 +329,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 },
},
},
{
--
Gitblit v1.9.3