From 997e14fa01e48da5f6efcdf78c7951fb1b5a8f2e Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 18 Nov 2024 09:36:33 +0800 Subject: [PATCH] =?UTF-8?q?YT-1002=EF=BC=8CYT-683=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=96=87=E4=BB=B6=E5=A4=A7=E5=B0=8F=E5=86=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=92=8C=E5=88=B0=E4=BB=93=E5=BA=93=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=8F=AF=E7=BC=96=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deliverRecordMain.data.ts | 872 ++++++++++++++++++ .../deliverRecordMain/index.vue | 238 +++++ .../productionreturnRequestMain/index.vue | 4 +- .../productionreturnRequestMain.data.ts | 45 +- 4 files changed, 1133 insertions(+), 26 deletions(-) create mode 100644 src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/deliverRecordMain.data.ts create mode 100644 src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/index.vue diff --git a/src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/deliverRecordMain.data.ts new file mode 100644 index 000000000..ddb992a1d --- /dev/null +++ b/src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/deliverRecordMain.data.ts @@ -0,0 +1,872 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 发货记录主表 + */ +export const DeliverRecordMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '发货记录单号', + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '发货计划单号', + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + isDetail: true + }, + // { + // label: '客户发货单号', + // field: 'customerDeliverNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '客户订单号', + field: 'customerOrderNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + isTable: true, + isForm: true, + search: { + component: 'Input', + } + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '发货类型', + field: 'deliverType', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.DELIVER_TYPE, + dictClass: 'string', + table: { + width: 150 + } + }, + { + label: '客户月台代码', + field: 'customerDockCode', + 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: '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: '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: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + 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: 'fromDockCode', + 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: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + 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' + } + }, + isSearch: false, + 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: false + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + } + ]) +) + +//表单校验 +export const DeliverRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { 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: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 发货记录子表 + */ +export const DeliverRecordDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTable: false + }, + // { + // label: '销售订单号', + // field: 'soNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '销售订单行', + // field: 'soLine', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '父包装号', + field: 'parentPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装规格', + field: 'packUnit', + isSearch: false, + isTable: false, + isForm:false, + isDetail:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + form: { + component: 'InputNumber', + } + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + form: { + component: 'InputNumber', + } + }, + { + label: '在途库库位', + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位组', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '到库位组', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '从库区', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '到库区', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, +])) + +//表单校验 +export const DeliverRecordDetailRules = reactive({ + // soNumber: [ + // { required: true, message: '请选择销售订单号', trigger: 'change' } + // ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) diff --git a/src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/index.vue b/src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/index.vue new file mode 100644 index 000000000..5fc5f52a7 --- /dev/null +++ b/src/views/wms/deliversettlementManage/directSupplyRecordMain/deliverRecordMain/index.vue @@ -0,0 +1,238 @@ + + + \ No newline at end of file diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 60718f2d8..b34096e2f 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -327,8 +327,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // 来源工位代码 setV['workStationCode'] = val[0]['code'] setV['fromLocationCode'] = val[0]['rawLocationCode'] - let locationInfo = await LocationApi.getFromWarehouseCode(val[0]['rawLocationCode']) - setV['toWarehouseCode'] = locationInfo.warehouseCode + // let locationInfo = await LocationApi.getFromWarehouseCode(val[0]['rawLocationCode']) + // setV['toWarehouseCode'] = locationInfo.warehouseCode tableData.value = [] // 重置明细数据 } formRef.setValues(setV) diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 39dc6d432..2c8645582 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -297,32 +297,29 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive isForm:true, form: { component: 'Input', + // labelMessage: '可与上架策略不同!!!', componentProps: { - disabled: true + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择仓库代码', + searchField: 'code', + searchTitle: '仓库信息', + searchAllSchemas: Warehouse.allSchemas, + searchPage: WarehouseApi.getWarehousePage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } - // labelMessage: '信息提示说明!!!', - // componentProps: { - // enterSearch: true, - // isSearchList: true, - // searchListPlaceholder: '请选择仓库代码', - // searchField: 'code', - // searchTitle: '仓库信息', - // searchAllSchemas: Warehouse.allSchemas, - // searchPage: WarehouseApi.getWarehousePage, - // searchCondition: [{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // }], - // verificationParams: [{ - // key: 'code', - // action: '==', - // value: '', - // isMainValue: false, - // isSearch: true, - // isFormModel: true, - // }], // 失去焦点校验参数 - // } } }, {