import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive([ { label: '上传质量报告', field: 'uploadFile', sort: 'custom', isTable:false, isTableForm:false, form: { component: 'UploadFile', componentProps: { upData:{ tableId: '', tableName: 'SupplierdeliverInspectionDetail', }, fileType:['pdf'], fileSize:100, limit:20000 } }, }, { label: '物料代码', field: 'itemCode', sort: 'custom', isForm:false, isSearch: true, form: { componentProps: { disabled: true } }, tableForm: { disabled: true } }, { label: '供应商批次', field: 'batch', sort: 'custom', isForm:false, isSearch: true, form: { componentProps: { disabled: true } }, tableForm: { disabled: true } }, { label: '发货数量', field: 'planQty', sort: 'custom', isForm:false, isSearch: true, form: { componentProps: { disabled: true } }, tableForm: { disabled: true, type: 'InputNumber', min: 0, precision: 6 }, }, { label: '计量单位', field: 'uom', dictType: DICT_TYPE.UOM, dictClass: 'string', isTable: true, isForm:false, sort: 'custom', table: { width: 150 }, tableForm: { type: 'Select', disabled: true }, form: { componentProps: { disabled: true } }, }, { label: '备注', field: 'remark', sort: 'custom', isForm:false, isTable: false, isTableForm: false, isSearch: true, }, { label: '创建时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, isSearch: true, search: { component: 'DatePicker', componentProps: { valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, isTableForm: false, isForm: false, }, { label: '扩展属性', field: 'extraProperties', sort: 'custom', isSearch: true, isForm: false, isTable: false, isTableForm: false, }, { label: '操作', field: 'action', isForm: false, isTable: false, isTableForm: false, table: { width: 150, fixed: 'right' } } ])) //表单校验 export const SupplierdeliverInspectionDetailRules = reactive({ uploadFile: [ { required: true, message: '请上传文件', trigger: 'blur' } ], itemCode: [ { required: true, message: '请输入物料代码', trigger: 'blur' } ], uom: [ { required: true, message: '请输入计量单位', trigger: 'blur' } ], batch: [ { required: true, message: '请输入供应商批次', trigger: 'blur' } ], planQty: [ { required: true, message: '请输入发货数量', trigger: 'blur' } ], }) export const CurriculumVitae = useCrudSchemas(reactive([ { label: '上传履历表', field: 'uploadFile', sort: 'custom', isTable:false, isTableForm:false, form: { component: 'UploadFile', componentProps: { upData:{ tableId: '', tableName: 'SupplierdeliverInspectionDetail', }, fileType:['pdf'], fileSize:100, limit:20000 } }, } ])) //表单校验 export const CurriculumVitaeRules = reactive({ uploadFile: [ { required: true, message: '请上传文件', trigger: 'blur' } ] })