import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const SupplierinvoiceInvoicedRules = reactive({ supplierCode: [required], poNumber: [required], currency: [required], concurrencyStamp: [required], }) export const SupplierinvoiceInvoiced = useCrudSchemas(reactive([ { label: '项目编码', field: 'projectCode', sort: 'custom', isSearch: true, table: { width: 150 }, }, { label: '单据类型', field: 'billType', sort: 'custom', form: { component: 'SelectV2' }, table: { width: 150 }, }, { label: '状态', field: 'status', dictType: DICT_TYPE.SUPPLIERINVOICE_STATUS, dictClass: 'string', isTable: true, isForm:false, sort: 'custom', table: { width: 150 }, isSearch: true, form: { value: '1', componentProps: { disabled: true } } }, { label: '单据号', field: 'recvBillNum', sort: 'custom', isSearch: true, table: { width: 150 }, }, { label: '发货单号', field: 'asnBillNum', sort: 'custom', table: { width: 150 }, }, { label: '供应商代码', field: 'supplierCode', sort: 'custom', table: { width: 150 }, }, { label: '订单号', field: 'poNumber', sort: 'custom', table: { width: 150 }, }, { label: '订单行', field: 'poLine', sort: 'custom', table: { width: 150 }, }, { label: '采购价格', field: 'purchasePrice', sort: 'custom', table: { width: 150 }, }, { label: '可开票数量', field: 'invoicableQuantity', sort: 'custom', table: { width: 150 }, }, { label: '零件号', field: 'itemCode', sort: 'custom', table: { width: 150 }, }, { label: '计量单位', field: 'uom', sort: 'custom', table: { width: 150 }, }, { label: '货币', field: 'currency', sort: 'custom', table: { width: 150 }, }, { label: '备注', field: 'remark', sort: 'custom', table: { width: 150 }, }, { 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')] } }, table: { width: 150 }, isForm: false, }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))