From 1c1af9b0fc10778ae5ac13cc68fd4030affbcfe1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 09 九月 2026 10:59:53 +0800
Subject: [PATCH] feat(wm): 新增SN码管理和设备入库功能
---
src/views/wls/stocktaking/plan/data.ts | 63 ++++++++++++++++++++++++++++---
1 files changed, 56 insertions(+), 7 deletions(-)
diff --git a/src/views/wls/stocktaking/plan/data.ts b/src/views/wls/stocktaking/plan/data.ts
index cfbc882..c301458 100644
--- a/src/views/wls/stocktaking/plan/data.ts
+++ b/src/views/wls/stocktaking/plan/data.ts
@@ -1,4 +1,4 @@
-import type { NumberDictDataType } from '../../../../packages/effects/hooks/src';
+import type { NumberDictDataType } from '@vben/hooks';
import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -12,8 +12,8 @@
DICT_TYPE,
MesAutoCodeRuleCode,
WlsStockTakingTypeEnum,
-} 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';
@@ -91,7 +91,7 @@
componentProps: {
placeholder: '璇烽�夋嫨寮�濮嬫椂闂�',
showTime: true,
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
dependencies: {
triggerFields: ['type'],
@@ -105,7 +105,7 @@
componentProps: {
placeholder: '璇烽�夋嫨缁撴潫鏃堕棿',
showTime: true,
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
dependencies: {
triggerFields: ['type'],
@@ -131,6 +131,40 @@
unCheckedChildren: '鍚�',
},
rules: z.boolean().default(false),
+ },
+ {
+ fieldName: 'autoGenerate',
+ label: '鑷姩鐢熸垚',
+ component: 'Switch',
+ componentProps: {
+ checkedChildren: '鏄�',
+ unCheckedChildren: '鍚�',
+ },
+ rules: z.boolean().default(false),
+ },
+ {
+ fieldName: 'generateCron',
+ label: '鐢熸垚鍛ㄦ湡(Cron)',
+ component: 'Input',
+ componentProps: {
+ placeholder: '璇疯緭鍏� Cron 琛ㄨ揪寮忥紝濡� 0 0 2 * * ?',
+ helpMessage:
+ '鍚敤鑷姩鐢熸垚鍚庯紝闇�鍦ㄣ�岀郴缁熺鐞�->瀹氭椂浠诲姟銆嶉厤缃� handler=MesWmStockTakingPlanAutoJob 鐨� cron 浠诲姟锛屽埌鏈熻嚜鍔ㄦ寜鏈柟妗堢敓鎴愮洏鐐逛换鍔�',
+ },
+ dependencies: {
+ triggerFields: ['autoGenerate'],
+ show: (values) => !!values.autoGenerate,
+ },
+ },
+ {
+ fieldName: 'lastGenerateTime',
+ label: '涓婃鐢熸垚鏃堕棿',
+ component: 'Input',
+ disabled: true,
+ dependencies: {
+ triggerFields: [''],
+ show: () => false,
+ },
},
{
fieldName: 'remark',
@@ -238,6 +272,21 @@
},
},
{
+ field: 'autoGenerate',
+ title: '鑷姩鐢熸垚',
+ width: 100,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
+ },
+ },
+ {
+ field: 'lastGenerateTime',
+ title: '涓婃鐢熸垚鏃堕棿',
+ width: 180,
+ formatter: 'formatDateTime',
+ },
+ {
field: 'status',
title: '鐘舵��',
width: 120,
@@ -326,8 +375,8 @@
component: markRaw(StockTakingPlanConditionValueInput),
// 鏉′欢鍊兼帶浠跺唴閮ㄦ寜鏉′欢绫诲瀷鍒囨崲閫夋嫨鍣紝浠呴�夋嫨绫诲瀷鍚庡睍绀�
dependencies: {
- triggerFields: ['type'],
- if: (values) => values.type !== null,
+ triggerFields: ['type', 'valueCode'],
+ show: (values) => values.type != null,
componentProps: (values) => ({
type: values.type,
valueCode: values.valueCode,
--
Gitblit v1.9.3