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 |   50 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 48 insertions(+), 2 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 3be5e5f..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,
@@ -106,6 +116,22 @@
     field: 'reqTime',
     sortable: true,
     minWidth: 200
+  },
+  {
+    title: '璁惧(宸ュ叿)鍚嶇О',
+    sortable: true,
+    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: '鏁呴殰绫诲埆',
@@ -153,7 +179,7 @@
   {
     component: 'Select',
     componentProps: {
-      getPopupContainer,
+      getPopupContainer
     },
     fieldName: 'reqType',
     label: '鎶ヤ慨绫诲瀷',
@@ -183,12 +209,31 @@
     }
   },
   {
+    component: 'Input',
+    fieldName: 'fixtureName',
+    label: '宸ュ叿鍚嶇О',
+    dependencies: {
+      show: () => false,
+      triggerFields: ['']
+    }
+  },
+  {
+    component: 'Input',
+    fieldName: 'fixtureId',
+    label: '宸ュ叿id',
+    dependencies: {
+      show: () => false,
+      triggerFields: ['']
+    }
+  },
+  {
     component: 'Select',
     componentProps: {
       getPopupContainer,
       options: getDictOptions(DictEnum.REPAIR_REQ_STATUS)
     },
     fieldName: 'status',
+    defaultValue: '0',
     label: '澶勭悊鐘舵��'
   },
   {
@@ -199,6 +244,7 @@
       valueFormat: 'YYYY-MM-DD HH:mm:ss',
       getPopupContainer
     },
+    defaultValue: curDateTime,
     fieldName: 'reqTime',
     label: '鎶ヤ慨鏃堕棿'
   },

--
Gitblit v1.9.3