import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const BackflushDetailbQadRules = reactive({ qty: [required], productreceiptNumber: [required], parentItemCode: [required], itemCode: [required], status: [required], }) export const BackflushDetailbQad = useCrudSchemas(reactive([ { label: '数量', field: 'qty', sort: 'custom', }, { label: '制品收货记录单据号', field: 'productreceiptNumber', sort: 'custom', isSearch: true, }, { label: '父物品代码', field: 'parentItemCode', sort: 'custom', isSearch: true, }, { label: '物品代码', field: 'itemCode', sort: 'custom', 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')] } }, isForm: false, }, { label: '创建者Id', field: 'creator', sort: 'custom', isForm: false, }, { label: '执行状态0未执行1成功2失败', field: 'status', sort: 'custom', isSearch: true, form: { component: 'SelectV2' }, }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))