diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/index.vue new file mode 100644 index 000000000..ef04df445 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/index.vue @@ -0,0 +1,203 @@ + + + diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts new file mode 100644 index 000000000..241fbb540 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts @@ -0,0 +1,984 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' + +import * as InspectionQ2Api from '@/api/qms/inspectionQ2' +import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' + +/** + * @returns {Array} 采购退货记录主表 + */ +export const PurchasereturnRecordMOrderTypeMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + sortTableDefault: 1012, + sortSearchDefault: 1, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 1 + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + + sortTableDefault: 1 + }, + { + label: '采购收货记录单号', + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + sortTableDefault: 3, + sortSearchDefault: 5 + }, + { + label: 'qad采购退货记录单号', + field: 'qadPurchaseReturnRecordCode', + sort: 'custom', + table: { + width: 180 + }, + sortSearchDefault: 3, + sortTableDefault: 4, + isTable: true + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + sortSearchDefault: 3, + isSearch: true, + sortTableDefault: 2 + }, + { + label: '要货计划单号', + field: 'ppNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + isSearch: false, + isDetail: true, + sortTableDefault: 4, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + // multiple: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: 'Q2通知单号', // 查询弹窗标题 + searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类 + searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '0', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + sortSearchDefault: 2, + isSearch: true + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '运输方式', + field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '执行时间', + field: 'executeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + } + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + // { + // label: '原因', + // field: 'available', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: true, + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + 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')] + }, + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } + ]) +) + +//表单校验 +export const PurchasereturnRecordMOrderTypeMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请选择创建时间', trigger: 'change' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 采购退货记录子表 + */ +export const PurchasereturnRecordMOrderTypeDetail = useCrudSchemas(reactive([ + + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortTableDefault: 1001, + sortSearchDefault: 1001, + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + hiddenInMain: true, + sortSearchDefault: 1002, + sortTableDefault: 1001, + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1004, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1004, + form: { + component: 'InputNumber', + } + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + disabled:false + } + }, + sortTableDefault: 1004, + hiddenInMain:false, + isForm:false, + tableForm:{ + type:'InputNumber', + min:0, + precision: 6, + disabled:false + } + }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain: true + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain: true + // }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortTableDefault: 1000, + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortTableDefault: 1000, + hiddenInMain: true + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain: true + // }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1009, + hiddenInMain: true + }, + // { + // label: '到库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1009, + // hiddenInMain: true + // }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + // { + // label: '到库位组代码', + // field: 'toLocationGroupCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1010, + // hiddenInMain: true + // }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + // { + // label: '到库区代码', + // field: 'toAreaCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1010, + // hiddenInMain: true + // }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1008, + hiddenInMain: true + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 4, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 5, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + }, + sortTableDefault: 1013, + hiddenInMain: true, + isSearch: false + }, + + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault: 6, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 6, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 7, + hiddenInMain: true + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 7, + hiddenInMain: true + }, + // { + // label: '数量', + // field: 'qty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:true, + // sortTableDefault: 1005, + // form: { + // component: 'InputNumber', + // } + // }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sortTableDefault: 1006, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + sortTableDefault: 1006, + form: { + component: 'InputNumber', + } + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + sortTableDefault: 1006, + form: { + component: 'InputNumber', + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1011, + hiddenInMain: true + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '退货原因', + field: 'reasonType', + dictType: DICT_TYPE.RETURN_REASON_TYPE, + dictClass: 'string', + // isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + type: 'Select', + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '退货原因描述', + field: 'reason', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1007, + hiddenInMain: true + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: false, + sortTableDefault: 1014, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1014, + hiddenInMain: false, + }, + +])) + +//表单校验 +export const PurchasereturnRecordMOrderTypeDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + reason: [ + { required: true, message: '请选择原因', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poline: [ + { required: true, message: '请选择订单行', trigger: 'change' } + ], +})