| | |
| | | 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 = () => [ |
| | | { |
| | |
| | | { |
| | | title: '报修单号', |
| | | field: 'reqCode', |
| | | minWidth: 160, |
| | | minWidth: 160 |
| | | }, |
| | | { |
| | | title: '维修部门', |
| | |
| | | fixed: 'right', |
| | | slots: { default: 'action' }, |
| | | title: '操作', |
| | | width: 130 |
| | | width: 200 |
| | | } |
| | | ]; |
| | | |
| | |
| | | show: () => false, |
| | | triggerFields: [''] |
| | | }, |
| | | label: '报修id' |
| | | label: '报修id', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | |
| | | show: () => false, |
| | | triggerFields: [''] |
| | | }, |
| | | label: '报修人' |
| | | label: '报修人', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | |
| | | show: () => false, |
| | | triggerFields: [''] |
| | | }, |
| | | label: '报修部门' |
| | | label: '报修部门', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'reqCode', |
| | | label: '报修单号' |
| | | label: '报修单号', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'resCode', |
| | | label: '维修单号' |
| | | label: '维修单号', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Textarea', |
| | | formItemClass: 'items-baseline', |
| | | fieldName: 'resReason', |
| | | label: '原因分析' |
| | | label: '原因分析', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Textarea', |
| | | formItemClass: 'items-baseline', |
| | | fieldName: 'resHandle', |
| | | label: '处理措施' |
| | | label: '处理措施', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Textarea', |
| | | formItemClass: 'items-baseline', |
| | | fieldName: 'resPrevent', |
| | | label: '预防措施' |
| | | label: '预防措施', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | |
| | | options: getDictOptions(DictEnum.REPAIR_RES_STATUS) |
| | | }, |
| | | fieldName: 'status', |
| | | defaultValue: '0', |
| | | label: '维修状态' |
| | | defaultValue: '1', |
| | | label: '维修状态', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'DatePicker', |
| | |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | getPopupContainer |
| | | }, |
| | | defaultValue: curDateTime, |
| | | fieldName: 'startTime', |
| | | label: '开始时间' |
| | | label: '开始时间', |
| | | rules: 'required' |
| | | }, |
| | | { |
| | | component: 'DatePicker', |
| | |
| | | defaultValue: undefined, |
| | | fieldName: 'resDept', |
| | | label: '维修部门', |
| | | help: `报修人员所属部门` |
| | | // rules: 'selectRequired', |
| | | help: `报修人员所属部门`, |
| | | rules: 'selectRequired' |
| | | }, |
| | | { |
| | | component: 'Select', |
| | |
| | | getPopupContainer |
| | | }, |
| | | fieldName: 'resUser', |
| | | label: '维修人' |
| | | label: '维修人', |
| | | rules: 'selectRequired' |
| | | }, |
| | | { |
| | | component: 'Textarea', |
| | | formItemClass: 'items-baseline', |
| | | fieldName: 'remark', |
| | | label: '备注' |
| | | }, |
| | | } |
| | | ]; |
| | | |
| | | |