import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' // 表单校验 export const PackageoverRetrospectRules = reactive({ }) export const PackageoverRetrospect = useCrudSchemas(reactive([ { label: '单据号', field: 'number', sort: 'custom', isSearch: true, table: { width: 180 }, }, { label: '任务单据号', field: 'jobNumber', sort: 'custom', table: { width: 180 }, }, { label: '仓库代码', field: 'warehouseCode', sort: 'custom', table: { width: 120 }, }, { label: '库区代码', field: 'areaCode', sort: 'custom', table: { width: 150 }, }, { label: '库位组代码', field: 'locationGroupCode', sort: 'custom', table: { width: 150 }, }, { label: '库位代码', field: 'locationCode', sort: 'custom', table: { width: 150 }, }, { label: '物品代码', field: 'itemCode', sort: 'custom', isSearch: true, table: { width: 150 }, }, { label: '物品名称', field: 'itemName', sort: 'custom', table: { width: 150 }, }, { label: '物品描述1', field: 'itemDesc1', sort: 'custom', table: { width: 150 }, }, { label: '物品描述2', field: 'itemDesc2', sort: 'custom', table: { width: 150 }, }, { label: '项目代码', field: 'projectCode', sort: 'custom', table: { width: 150 }, }, { label: '数量', field: 'qty', sort: 'custom', table: { width: 150 }, }, { label: '计量单位', field: 'uom', sort: 'custom', table: { width: 150 }, }, { label: '申请时间', field: 'requestTime', sort: 'custom', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, table: { width: 180 }, form: { component: 'DatePicker', componentProps: { style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, isForm: false }, { label: '截止时间', field: 'dueTime', sort: 'custom', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, table: { width: 180 }, form: { component: 'DatePicker', componentProps: { style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, isForm: false }, { label: '从包装号', field: 'fromPackingNumber', sort: 'custom', isSearch: true, table: { width: 200 }, }, { label: '到包装号', field: 'toPackingNumber', sort: 'custom', isSearch: true, table: { width: 200 }, }, { label: '从批次', field: 'fromBatch', sort: 'custom', table: { width: 150 }, }, { label: '到批次', field: 'toBatch', sort: 'custom', table: { width: 150 }, }, { label: '从包装规格', field: 'fromPackUnit', sort: 'custom', table: { width: 150 }, }, { label: '到包装规格', field: 'toPackUnit', sort: 'custom', table: { width: 150 }, }, { label: '从标包数量', field: 'fromPackQty', sort: 'custom', table: { width: 150 }, }, { label: '到标包数量', field: 'toPackQty', sort: 'custom', table: { width: 150 }, }, { label: '从库存状态', field: 'fromInventoryStatus', dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isTable: true, sort: 'custom', table: { width: 150 }, }, { label: '到库存状态', field: 'toInventoryStatus', dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isTable: true, sort: 'custom', table: { width: 150 }, }, { label: '部门', field: 'departmentCode', sort: 'custom', isTable:false }, { label: '接口类型', field: 'interfaceType', sort: 'custom', isTable:false }, { label: '业务类型', field: 'businessType', sort: 'custom', isTable:false }, { label: '出库事务类型', field: 'outTransactionType', sort: 'custom', table: { width: 150 }, isTable:false }, { label: '入库事务类型', field: 'inTransactionType', sort: 'custom', table: { width: 150 }, isTable:false }, { label: '执行时间', field: 'executeTime', sort: 'custom', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, table: { width: 180 }, form: { component: 'DatePicker', componentProps: { style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, isForm: false }, { label: '生效日期', field: 'activeDate', sort: 'custom', formatter: dateFormatter2, detail: { dateFormat: 'YYYY-MM-DD' }, table: { width: 180 }, form: { component: 'DatePicker', componentProps: { style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD', valueFormat: 'x', } }, isForm: false }, { label: '备注', field: 'remark', sort: 'custom', isTable:false }, { label: '是否可用', field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isTable: true, sort: 'custom', table: { width: 150 }, form: { component: 'Switch', value: 'TRUE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' } }, }, { label: '创建者', field: 'creator', sort: 'custom', table: { width: 150 }, }, { label: '创建时间', field: 'createTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', table: { width: 180 }, form: { component: 'DatePicker', componentProps: { type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, }, { label: '最后更新者', field: 'update', sort: 'custom', table: { width: 150 }, }, { label: '最后更新时间', field: 'updateTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', table: { width: 180 }, form: { component: 'DatePicker', componentProps: { type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, }, { label: '操作', field: 'action', isDetail: false, isForm: false , table: { width: 150, fixed: 'right' } } ]))