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 |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/src/views/wls/stocktaking/plan/data.ts b/src/views/wls/stocktaking/plan/data.ts
index cd3059b..c301458 100644
--- a/src/views/wls/stocktaking/plan/data.ts
+++ b/src/views/wls/stocktaking/plan/data.ts
@@ -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