From fc76b6c4a7ccd2d875b0fb998a868fe4bea188f7 Mon Sep 17 00:00:00 2001
From: 朱桂飞 <zhuguifei@zhuguifeideMacBook-Air.local>
Date: 星期五, 14 二月 2025 09:19:18 +0800
Subject: [PATCH] 新增设备台账导入

---
 eims-ui/apps/web-antd/src/views/eims/equ/data.tsx |  125 +++++++++++++++++++++++++++++++----------
 1 files changed, 94 insertions(+), 31 deletions(-)

diff --git a/eims-ui/apps/web-antd/src/views/eims/equ/data.tsx b/eims-ui/apps/web-antd/src/views/eims/equ/data.tsx
index 1dcafcf..f973b4a 100644
--- a/eims-ui/apps/web-antd/src/views/eims/equ/data.tsx
+++ b/eims-ui/apps/web-antd/src/views/eims/equ/data.tsx
@@ -3,10 +3,9 @@
 import { DictEnum } from '@vben/constants';
 import { getPopupContainer } from '@vben/utils';
 
-import { Tag } from 'ant-design-vue';
-
 import { type FormSchemaGetter, z } from '#/adapter/form';
 import { getDictOptions } from '#/utils/dict';
+import { renderDict } from '#/utils/render';
 
 export const querySchema: FormSchemaGetter = () => [
   {
@@ -29,7 +28,7 @@
   },
   {
     component: 'RangePicker',
-    fieldName: 'createTime',
+    fieldName: 'deployDate',
     label: '浣跨敤鏃ユ湡'
   }
 ];
@@ -39,7 +38,7 @@
   {
     title: '璁惧鍚嶇О',
     field: 'equName',
-    minWidth: 100,
+    minWidth: 140,
     fixed: 'left',
     slots: { default: 'equName' }
   },
@@ -47,28 +46,13 @@
   {
     title: '鐘舵��',
     field: 'status',
+    sortable: true,
     slots: {
       default: ({ row }) => {
-        const statu = row.status;
-        switch (statu) {
-          case '0': {
-            return <Tag color="cyan">璇曠敤</Tag>;
-          }
-          case '1': {
-            return <Tag color="green">鍏ュ浐</Tag>;
-          }
-          case '2': {
-            return <Tag color="orange">杩佺Щ</Tag>;
-          }
-          case '3': {
-            return <Tag color="red">鎶ュ簾</Tag>;
-          }
-          case null: {
-            return '';
-          }
-          // No default
+        if (row.status === null || row.status === '') {
+          return '';
         }
-        return '';
+        return renderDict(row.status, DictEnum.SYS_EQU_STATUS);
       }
     },
     minWidth: 80,
@@ -77,17 +61,44 @@
   {
     title: '璧勪骇缂栧彿',
     field: 'assetNo',
-    minWidth: 100,
+    sortable: true,
+    minWidth: 140,
     fixed: 'left'
   },
   {
-    title: '璁惧缂栧彿',
+    title: '璁惧缂栫爜',
     field: 'equCode',
+    sortable: true,
     minWidth: 100
   },
   {
     title: '璁惧绫诲瀷',
     field: 'equTypeName',
+    minWidth: 100
+  },
+  {
+    title: '閿�鍞晢',
+    field: 'seller',
+    minWidth: 100
+  },
+  {
+    title: '鍗曚綅',
+    field: 'unit',
+    minWidth: 60
+  },
+  {
+    title: '閲囪喘浜�',
+    field: 'purchaseUser',
+    minWidth: 100
+  },
+  {
+    title: '缁忔墜浜�',
+    field: 'handleUser',
+    minWidth: 100
+  },
+  {
+    title: '璧勬枡',
+    field: 'profile',
     minWidth: 100
   },
   {
@@ -133,6 +144,7 @@
   {
     title: '閲囪喘鏃ユ湡',
     field: 'purchaseDate',
+    sortable: true,
     minWidth: 120
   },
   {
@@ -158,11 +170,21 @@
   {
     title: '瀵煎叆鐘舵��',
     field: 'importStatus',
+    slots: {
+      default: ({ row }) => {
+        return row.importStatus === null || row.importStatus === '' ? '' : renderDict(row.importStatus, DictEnum.EQU_IMPORT_STATU);
+      }
+    },
     minWidth: 100
   },
   {
     title: '鐩樼偣鏍囧織',
     field: 'inventoryFlag',
+    slots: {
+      default: ({ row }) => {
+        return row.inventoryFlag === null || row.inventoryFlag === '' ? '' : renderDict(row.inventoryFlag, DictEnum.EIMS_INVENTORY_STATU);
+      }
+    },
     minWidth: 100
   },
   {
@@ -185,7 +207,7 @@
     fixed: 'right',
     slots: { default: 'action' },
     title: '鎿嶄綔',
-    width: 180
+    width: 200
   }
 ];
 
@@ -223,6 +245,42 @@
     label: '璧勪骇缂栧彿'
   },
   {
+    component: 'Select',
+    componentProps: {
+      options: getDictOptions(DictEnum.EIMS_EQU_UNIT)
+    },
+    fieldName: 'unit',
+    label: '鍗曚綅'
+  },
+  {
+    component: 'Input',
+    fieldName: 'purchaseUserName',
+    label: '閲囪喘浜�'
+  },
+  {
+    component: 'Input',
+    fieldName: 'purchaseUser',
+    label: '閲囪喘浜�',
+    dependencies: {
+      show: () => false,
+      triggerFields: ['']
+    }
+  },
+  {
+    component: 'Input',
+    fieldName: 'handleUserName',
+    label: '缁忔墜浜�'
+  },
+  {
+    component: 'Input',
+    fieldName: 'handleUser',
+    label: '缁忔墜浜�',
+    dependencies: {
+      show: () => false,
+      triggerFields: ['']
+    }
+  },
+  {
     component: 'Input',
     fieldName: 'modelNo',
     label: '鍨嬪彿'
@@ -231,6 +289,11 @@
     component: 'Input',
     fieldName: 'madeIn',
     label: '鍒堕�犲晢'
+  },
+  {
+    component: 'Input',
+    fieldName: 'seller',
+    label: '閿�鍞晢'
   },
   {
     component: 'Input',
@@ -260,7 +323,7 @@
       options: getDictOptions(DictEnum.SYS_EQU_STATUS),
       optionType: 'button'
     },
-    defaultValue: '0',
+    defaultValue: '5',
     fieldName: 'status',
     label: '鐘舵��'
   },
@@ -282,8 +345,8 @@
   {
     component: 'Select',
     componentProps: {
-      // 閫変腑浜嗗氨鍙兘淇敼 涓嶈兘閲嶇疆涓烘棤璐熻矗浜�
       allowClear: true,
+      showSearch: true,
       getPopupContainer
     },
     fieldName: 'respPerson',
@@ -349,7 +412,7 @@
     component: 'RadioGroup',
     componentProps: {
       buttonStyle: 'solid',
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
+      options: getDictOptions(DictEnum.EQU_IMPORT_STATU),
       optionType: 'button'
     },
     defaultValue: '0',
@@ -367,12 +430,12 @@
     component: 'RadioGroup',
     componentProps: {
       buttonStyle: 'solid',
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
+      options: getDictOptions(DictEnum.EIMS_INVENTORY_STATU),
       optionType: 'button'
     },
     defaultValue: '0',
     fieldName: 'inventoryFlag',
-    formItemClass: 'col-span-2 lg:col-span-1',
+    formItemClass: 'col-span-2',
     label: '鐩樼偣鏍囧織'
   },
   {

--
Gitblit v1.9.3