From 66e943c91e133eec5a0822ea22fd92cbc04bc9f3 Mon Sep 17 00:00:00 2001
From: zhuguifei <312353457@qq.com>
Date: 星期三, 12 三月 2025 16:04:14 +0800
Subject: [PATCH] 保养工单汇总
---
eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx | 93 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 91 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..4946d81 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',
},
{
@@ -74,6 +79,23 @@
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60, fixed: 'left' },
{
+ title: '璁惧(宸ュ叿)鍚嶇О',
+ sortable: true,
+ minWidth: 150,
+ fixed: 'left',
+ 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: '鎶ヤ慨鍗曞彿',
field: 'code',
minWidth: 160,
@@ -89,6 +111,11 @@
return renderDict(row.status, DictEnum.REPAIR_REQ_STATUS);
}
}
+ },
+ {
+ title: '缁翠慨鍗曞彿',
+ field: 'resCode',
+ minWidth: 200
},
{
title: '鎶ヤ慨绫诲瀷',
@@ -153,7 +180,7 @@
{
component: 'Select',
componentProps: {
- getPopupContainer,
+ getPopupContainer
},
fieldName: 'reqType',
label: '鎶ヤ慨绫诲瀷',
@@ -183,12 +210,35 @@
}
},
{
+ 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)
},
+ dependencies: {
+ show: () => false,
+ triggerFields: ['']
+ },
fieldName: 'status',
+ defaultValue: '0',
label: '澶勭悊鐘舵��'
},
{
@@ -199,6 +249,7 @@
valueFormat: 'YYYY-MM-DD HH:mm:ss',
getPopupContainer
},
+ defaultValue: curDateTime,
fieldName: 'reqTime',
label: '鎶ヤ慨鏃堕棿'
},
@@ -257,3 +308,41 @@
label: '鎶ヤ慨浜�'
}
];
+
+export const modalSchema: FormSchemaGetter = () => [
+ {
+ component: 'Input',
+ dependencies: {
+ show: () => false,
+ triggerFields: ['']
+ },
+ fieldName: 'id'
+ },
+ {
+ component: 'Input',
+ dependencies: {
+ show: () => false,
+ triggerFields: ['']
+ },
+ fieldName: 'batchReqIds'
+ },
+ {
+ component: 'TreeSelect',
+ // 鍦╠rawer閲屾洿鏂� 杩欓噷涓嶉渶瑕侀粯璁ょ殑componentProps
+ defaultValue: undefined,
+ fieldName: 'resDept',
+ label: '缁翠慨閮ㄩ棬',
+ help: `鎶ヤ慨浜哄憳鎵�灞為儴闂╜
+ // rules: 'selectRequired',
+ },
+ {
+ component: 'Select',
+ componentProps: {
+ showSearch: true,
+ allowClear: true,
+ getPopupContainer
+ },
+ fieldName: 'resUser',
+ label: '缁翠慨浜�'
+ }
+];
--
Gitblit v1.9.3