import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter2 } from '@/utils/formatTime' import { validateHanset, validateEmail } from '@/utils/validator' import { dateFormatter } from '@/utils/formatTime' import {validateTwoNum } from '@/utils/validator' const { t } = useI18n() // 国际化 /** * @returns {Array}质量通知主表 */ export const QualityNoticeMain = useCrudSchemas(reactive([ { label: '编码', field: 'number', sort: 'custom', isSearch: true, isForm:false, table: { width: 150, fixed: 'left' } }, { label: '类型', field: 'type', sort: 'custom', isSearch: true, isForm:false, table: { width: 150 } }, { label: '描述', field: 'description', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '详情', field: 'detail', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } },{ label: '优先级', field: 'priority', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 }, form: { componentProps:{ disabled:true } }, }, { label: '状态', field: 'status', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 }, form: { componentProps:{ disabled:true } }, }, { label: '报告人', field: 'reporter', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 }, form: { componentProps:{ disabled:true } }, }, { label: '报告时间', field: 'reportTime', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '要求开始时间', field: 'requestStartTime', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '要求结束时间', field: 'requestEndTime', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '是否造成停机', field: 'whetherCausesMachineHalt', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '停机开始时间', field: 'machineHaltStartTime', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '停机结束时间', field: 'machineHaltEndTime', dictType: DICT_TYPE.INSPECTION_TYPE, sort: 'custom', isSearch: false, isForm:false, form: { component: 'Select' }, table: { width: 150 } }, { label: '协调人', field: 'coordinator', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '任务模板编号', field: 'taskTemplateCode', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { label: '完成时间', field: 'finishTime', sort: 'custom', isSearch: false, isForm:false, table: { width: 150 } }, { // reference_certificate_row label: '参考通知编号', field: 'referenceNoticeCode', sort: 'custom', isSearch: false, isForm:false, form: { component: 'InputNumber', value: 0 }, table: { width: 150 } }, ])) //表单校验 export const QualityNoticeMainRules = reactive({ useDecision: [required], })