From c3c585edd4d3cf269a307ba48ac2abb11bf0b640 Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期二, 25 二月 2025 14:13:06 +0800
Subject: [PATCH] 故障报修添加工具类型选择,初步完成故障报修模块

---
 eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx |   27 ++++++++++++++++++++++-----
 1 files changed, 22 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..fd16d8a 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',
   },
   {
@@ -108,10 +113,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 +174,7 @@
   {
     component: 'Select',
     componentProps: {
-      getPopupContainer,
+      getPopupContainer
     },
     fieldName: 'reqType',
     label: '鎶ヤ慨绫诲瀷',
@@ -213,6 +228,7 @@
       options: getDictOptions(DictEnum.REPAIR_REQ_STATUS)
     },
     fieldName: 'status',
+    defaultValue: '0',
     label: '澶勭悊鐘舵��'
   },
   {
@@ -223,6 +239,7 @@
       valueFormat: 'YYYY-MM-DD HH:mm:ss',
       getPopupContainer
     },
+    defaultValue: curDateTime,
     fieldName: 'reqTime',
     label: '鎶ヤ慨鏃堕棿'
   },

--
Gitblit v1.9.3