import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { formatDate } from '@/utils/formatTime' // 表单校验 export const SupplierDeliMainRules = reactive({ supplierCode: [required], supplierAddress: [required], yearAndMonth: [required], }) export const SupplierDeliMain = useCrudSchemas(reactive([ { label: '供应商代码', field: 'supplierCode', sort: 'custom', isSearch: true, table:{ width : 180 } }, { label: '供应商地点', field: 'supplierAddress', sort: 'custom', isSearch: true, table:{ width : 180 } }, { label: '受入号', field: 'model', sort: 'custom', isSearch: true, table:{ width : 180 } }, { label: '延迟便次', field: 'delayDeli', sort: 'custom', isSearch: false, table:{ width : 180 } }, { label: '年月', field: 'yearAndMonth', sort: 'custom', isTable: false, isSearch: true, search: { component: 'DatePicker', value: formatDate(new Date(),'YYYY-MM'), componentProps: { type: 'month', valueFormat: 'YYYY-MM', } } }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))