import type {CrudSchema} from '@/hooks/web/useCrudSchemas' import {dateFormatter} from '@/utils/formatTime' import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; import * as ItembasicApi from "@/api/wms/itembasic"; import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; import * as WorehouseApi from "@/api/wms/warehouse"; // 表单校验 export const MesOrderMonthSubRules = reactive({ productCode: [required], productName: [required], bomCode: [required], inStoreCode: [required], planBegin: [required], planEnd: [required], planCount: [required], productBatchcode: [required] }) export const MesOrderMonthSub = useCrudSchemas(reactive([ { label: '产品编码', field: 'productCode', sort: 'custom', isTable: false, isSearch: true, form: { // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '产品编码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '产品信息', // 查询弹窗标题 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 isHideFilterButton:true, searchCondition: [{ key: 'available', value: 'TRUE', isMainValue: false }, { key: 'type', action: 'in', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 value: 'CCP,BCP',//,SEMI] isMainValue: false }, ] } } }, { label: '产品名称', field: 'productName', sort: 'custom', isSearch: true, isForm: false }, { label: 'BOM编号', field: 'bomCode', sort: 'custom', isTable: false, isSearch: true, form: { component:'Select', componentProps: { options: [{lablel:'bom',value:'bom'}] } } }, { label: '入库仓库编码', field: 'inStoreCode', sort: 'custom', isSearch: true, form: { // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '仓库编码', // 查询弹窗标题 searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 searchPage: WorehouseApi.getWarehousePage, // 查询弹窗所需分页方法 isHideFilterButton:true, searchCondition: [{ key: 'available', value: 'TRUE', isMainValue: false } ] } } }, { label: '计划数量', field: 'planCount', sort: 'custom', isSearch: true, form: { component: 'InputNumber', value: 0 } }, { label: '完成数量', field: 'finishCount', sort: 'custom', isSearch: true, isForm: false }, { label: '合格数量', field: 'qualifiedCount', sort: 'custom', isSearch: true, isForm: false }, { label: '不合格数量', field: 'unqualifiedCount', sort: 'custom', isSearch: true, isForm: false }, { label: '是否回冲', field: 'flagBackwash', sort: 'custom', isSearch: true, isForm: false }, { label: '产品批次号', field: 'productBatchcode', 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: '计划开始日期', field: 'planBegin', sort: 'custom', isSearch: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, form: { component: 'DatePicker', componentProps: { style: {width: '100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, }, { label: '计划结束日期', field: 'planEnd', sort: 'custom', isSearch: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, form: { component: 'DatePicker', componentProps: { style: {width: '100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, }, { label: '实际开工日期', field: 'realStart', sort: 'custom', isSearch: true, isForm: false }, { label: '实际完工日期', field: 'realFinish', sort: 'custom', isSearch: true, isForm: false }, { label: '备注', field: 'remark', sort: 'custom', isTable: false }, { label: '状态', field: 'status', sort: 'custom', isSearch: true, isForm: false }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))