import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const MstrRules = reactive({ hflccHflcd: [required], plProdLine: [required], plMvarAcct: [required], plCchgAcct: [required], concurrencyStamp: [required], }) export const Mstr = useCrudSchemas(reactive([ { label: '域代码', field: 'plDomain', sort: 'custom', isSearch: true, }, { label: '产品类', field: 'plProdLine', sort: 'custom', isSearch: true, }, { label: '产品描述', field: 'plDesc', sort: 'custom', }, { label: '物料差异账户', field: 'plMvarAcct', sort: 'custom', isSearch: true, }, { label: '成本重估账户', field: 'plCchgAcct', sort: 'custom', isSearch: true, }, { label: '废品账户', field: 'plScrpAcct', sort: 'custom', isSearch: true, }, { label: '盘点差异账户', field: 'plDscrAcct', sort: 'custom', isSearch: true, }, { label: '创建时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, 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: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))