From ec4d16c8a630960a4671a60f4d1957fd3de9def3 Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期四, 27 二月 2025 16:53:59 +0800 Subject: [PATCH] 完成维修工单查看维修记录子表 --- eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx | 88 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 86 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..a2afe69 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: '鎶ヤ慨鏃堕棿' }, @@ -257,3 +303,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