import $API from '@/api' import $CONFIG from '@/config' export default { name: "processMaterialRequisition", dec: "材料生产领料", list: "list", del: "del", add: "save", edit: "edit", detail: "detail", importExcel: "importExcel", upload: "upload", config: { formIdKey: "id", preId: "id", remoteFilter: true, scFilterBar: false, add: true, bathDel: false, option: { edit: true, del: true, }, filter: { isFixed: true } }, options: [], column: [ { label: "", prop: "id", width: "200", hide: true }, { label: "领料编号", prop: "documentNumber", width: "200" }, { label: "仓库", prop: "warehouseName", width: "200" }, { label: "领用人", prop: "recipient", width: "200" }, { label: "领料部门", prop: "department", width: "200" }, { label: "领料日期", prop: "requisitionDate", width: "200", formatter: (row) => { return row.date ? (() => { const date = new Date(row.date); const offset = date.getTimezoneOffset() * 60000; // 获取本地时区偏移 const localDate = new Date(date.getTime() - offset); return localDate.toISOString().split('T')[0]; // 格式化为 YYYY-MM-DD })() : ''; // 如果 row.deliveryDate 为 null 或其他假值,返回空字符串 } }, ], formOption: { labelWidth: '100px', labelPosition: 'center', panelWidth: "1000px", size: 'medium', formItems: [ { label: "完成数量", name: "productionNumber", value: "", component: "other", span: 24, options: { maxlength: "256", placeholder: "请输入完成数量" }, rules: [{ required: true, message: "请输入完成数量", trigger: "blur" }] }, { label: "完成重量", name: "productionWeight", value: "", component: "other", span: 24, options: { maxlength: "256", placeholder: "请输入完成重量" }, rules: [{ required: true, message: "请输入完成重量", trigger: "blur" }] }, { label: "报废支数", name: "scrapNumber", value: "", component: "other", span: 24, options: { maxlength: "256", placeholder: "请输入报废支数" }, rules: [{ required: false, message: "请输入报废支数", trigger: "blur" }] }, { label: "报废原因", name: "scrapReason", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入报废原因" }, rules: [{ required: false, message: "请输入报废原因", trigger: "blur" }] }, { label: "框号", name: "frameNumber", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入框号" }, rules: [{ required: false, message: "请输入框号", trigger: "blur" }] }, { label: "下一工序", name: "nextProcess", value: "", component: "dic", span: 24, options: { group: "working", placeholder: "请输入下一工序" }, rules: [{ required: true, message: "请输入下一工序", trigger: "blur" }], hideHandle: "$.currentProcess == 'bz'" }, { label: "是否完成", name: "isCompleted", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入是否完成" }, rules: [{ required: false, message: "请输入是否完成", trigger: "blur" }], hideHandle: "$.currentProcess != 'bz'" }, { label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { maxlength: "500", placeholder: "请输入备注" } } ] }, finishFormOption: { labelWidth: '100px', labelPosition: 'center', panelWidth: "800", size: 'medium', formItems: [ { label: "完成数量", name: "completionQuantity", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入完成数量" }, rules: [{ required: true, message: "请输入完成数量", trigger: "blur" }] }, { label: "完成重量", name: "completionWeight", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入完成重量" }, rules: [{ required: true, message: "请输入完成重量", trigger: "blur" }] }, { label: "报废支数", name: "scrapPieces", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入报废支数" }, rules: [{ required: false, message: "请输入报废支数", trigger: "blur" }] }, { label: "报废原因", name: "scrapReason", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入报废原因" }, rules: [{ required: false, message: "请输入报废原因", trigger: "blur" }] }, { label: "框号", name: "frameNumber", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入框号" }, rules: [{ required: false, message: "请输入框号", trigger: "blur" }] }, { label: "下一工序", name: "nextProcess", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入下一工序" }, rules: [{ required: false, message: "请输入下一工序", trigger: "blur" }] }, { label: "是否完成", name: "isCompleted", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入是否完成" }, rules: [{ required: false, message: "请输入是否完成", trigger: "blur" }] }, { label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { maxlength: "500", placeholder: "请输入备注" } } ] }, pageForm: { title: "材料生产领料", form: { labelWidth: '100px', labelPosition: 'center', size: 'small', optionHide: true, formItems: [ { label: "领料编号", name: "documentNumber", value: "", component: "input", span: 6, options: { editdisable: true, maxlength: "256", placeholder: "请输入单据编号" }, rules: [{ required: true, message: "请输入单据编号", trigger: "blur" }] }, { label: "仓库", name: "warehouse", value: "", component: "thirdselect", span: 6, options: {editdisable: true, tb: "warehouses", placeholder: "请输入" } }, { label: "领用人", name: "recipient", value: "", component: "input", span: 6, options: {editdisable: true, maxlength: "256", placeholder: "请输入" } }, { label: "领料部门", name: "department", value: "", component: "input", span: 6, options: { editdisable: true,maxlength: "256", placeholder: "请输入" } }, { label: "领料日期", name: "requisitionDate", value: "", component: "date", span: 6, options: { editdisable: true,valueFormat: "YYYY-MM-DD", placeholder: "请选择领料日期" }, rules: [{ required: true, message: "请选择领料日期", trigger: "change" }] }, { label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { editdisable: true,maxlength: "500", placeholder: "请输入备注" } }, ] }, computed: { requisitionNumber: 0, requisitionWeight: 0 }, column: [ { label: "领用数量", prop: "requisitionNumber", width: "200" }, { label: "实际重量", prop: "requisitionWeight", width: "200" }, { label: "物料编号", prop: "materialCode", width: "200" }, { label: "物料名称", prop: "materialName", width: "200" }, { label: "仓库", prop: "warehouse", width: "200" }, { label: "型材型号", prop: "profileModel", width: "200" }, { label: "米重 (kg/m)", prop: "weight", width: "100" }, { label: "长度 (m)", prop: "defaultLength", width: "100" }, { label: "理论重量 (kg)", prop: "theoreticalWeight", width: "150" }, ] }, tableSelect: { "title": "排产选择", "panelWidth": "1000px", "api": "currentInventory.list", "params": { "status": 1 }, "column": [ { label: "物料编号", prop: "materialCode", width: "200" }, { label: "物料名称", prop: "materialName", width: "200" }, { label: "型材型号", prop: "profileModel", width: "200" }, { label: "米重 (kg/m)", prop: "weight", width: "100" }, { label: "长度 (m)", prop: "defaultLength", width: "100" }, { label: "理论重量 (kg)", prop: "theoreticalWeight", width: "150" }, ], } }