From d85cb9da90d1dd24f6ecfa187aa8c4198394c29a Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期三, 26 二月 2025 15:41:05 +0800
Subject: [PATCH] 开发维修工单

---
 eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx |   32 +++++++++++++++++++++++++++-----
 1 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx b/eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx
index 329226a..972afef 100644
--- a/eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx
+++ b/eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx
@@ -3,9 +3,14 @@
 import { DictEnum } from '@vben/constants';
 import { getPopupContainer } from '@vben/utils';
 
+import dayjs from 'dayjs';
+
 import { type FormSchemaGetter } from '#/adapter/form';
+import { REPAIR_REQ_TYPE } from '#/constants/dict';
 import { getDictOptions } from '#/utils/dict';
 import { renderDict } from '#/utils/render';
+
+const curDateTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
 
 export const querySchema: FormSchemaGetter = () => [
   {
@@ -27,7 +32,7 @@
     // 鍦╠rawer閲屾洿鏂� 杩欓噷涓嶉渶瑕侀粯璁ょ殑componentProps
     defaultValue: undefined,
     fieldName: 'reqDept',
-    label: '鎶ヤ慨閮ㄩ棬',
+    label: '鎶ヤ慨閮ㄩ棬'
     // rules: 'selectRequired',
   },
   {
@@ -91,6 +96,11 @@
     }
   },
   {
+    title: '缁翠慨鍗曞彿',
+    field: 'resCode',
+    minWidth: 200
+  },
+  {
     title: '鎶ヤ慨绫诲瀷',
     field: 'reqType',
     sortable: true,
@@ -108,10 +118,20 @@
     minWidth: 200
   },
   {
-    title: '璁惧鍚嶇О',
-    field: 'equName',
+    title: '璁惧(宸ュ叿)鍚嶇О',
     sortable: true,
-    minWidth: 120
+    minWidth: 150,
+    slots: {
+      default: ({ row }) => {
+        if (row.reqType === REPAIR_REQ_TYPE.EQU) {
+          return row.equName;
+        } else if (row.reqType === REPAIR_REQ_TYPE.FIXTURE) {
+          return row.fixtureName;
+        } else {
+          return '';
+        }
+      }
+    }
   },
   {
     title: '鏁呴殰绫诲埆',
@@ -159,7 +179,7 @@
   {
     component: 'Select',
     componentProps: {
-      getPopupContainer,
+      getPopupContainer
     },
     fieldName: 'reqType',
     label: '鎶ヤ慨绫诲瀷',
@@ -213,6 +233,7 @@
       options: getDictOptions(DictEnum.REPAIR_REQ_STATUS)
     },
     fieldName: 'status',
+    defaultValue: '0',
     label: '澶勭悊鐘舵��'
   },
   {
@@ -223,6 +244,7 @@
       valueFormat: 'YYYY-MM-DD HH:mm:ss',
       getPopupContainer
     },
+    defaultValue: curDateTime,
     fieldName: 'reqTime',
     label: '鎶ヤ慨鏃堕棿'
   },

--
Gitblit v1.9.3