From 4825f11b443241becd2695c030215ca319bfb190 Mon Sep 17 00:00:00 2001 From: chenfang <1057876684@qq.com> Date: Wed, 30 Oct 2024 15:53:02 +0800 Subject: [PATCH] =?UTF-8?q?HL-6311=20=E6=8C=89=E6=9C=80=E6=96=B0=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E4=BF=AE=E6=94=B9=E3=80=8A=E5=99=A8=E5=85=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/containerMainRequest/index.ts | 28 ++++++++--- .../createContainerMainRequest.data.ts | 46 +++++++++---------- .../createContainerMainRequest/index.vue | 2 +- .../initialContainerMainRequest/index.vue | 2 +- .../moveContainerMainRequest/index.vue | 7 ++- .../returnContainerMainRequest/index.vue | 2 +- .../scrapContainerMainRequest/index.vue | 2 +- .../scrapContainerMainRequest.data.ts | 32 ++++++------- 8 files changed, 70 insertions(+), 51 deletions(-) diff --git a/src/api/wms/containerMainRequest/index.ts b/src/api/wms/containerMainRequest/index.ts index 681b93c3e..3544598de 100644 --- a/src/api/wms/containerMainRequest/index.ts +++ b/src/api/wms/containerMainRequest/index.ts @@ -113,14 +113,30 @@ export const exportDeliverContainerMainRequest = async (params) => { } } -// 下载用户导入模板(器具初始化/新增) -export const importTemplate = () => { - return request.download({ url: '/wms/container-main-request/get-import-template' }) + +// 下载用户导入模板(器具初始化) +export const importTemplateInitial = () => { + return request.download({ url: '/wms/container-main-request/get-import-template-initial' }) +} +// 下载用户导入模板(器具新增) +export const importTemplateCreate = () => { + return request.download({ url: '/wms/container-main-request/get-import-template-create' }) +} + +// 下载用户导入模板(器具报废) +export const importTemplateScrap = () => { + return request.download({ url: '/wms/container-main-request/get-import-template-scrap' }) } -// 下载用户导入模板(器具返回/移动/报废) -export const importTemplateReturnAndMove = () => { - return request.download({ url: '/wms/container-main-request/get-import-template-returnAndMove' }) +// 下载用户导入模板(器具移动) +export const importTemplateMove = () => { + return request.download({ url: '/wms/container-main-request/get-import-template-move' }) +} + + +// 下载用户导入模板(器具返回) +export const importTemplateReturn = () => { + return request.download({ url: '/wms/container-main-request/get-import-template-return' }) } // 关闭 diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts index dc83cbc1d..b01f5420e 100644 --- a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts @@ -79,7 +79,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ } }, { - label: '初始化库位代码', + label: '到库位代码', field: 'toLocationCode', sort: 'custom', table: { @@ -87,7 +87,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ }, tableForm:{ isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择初始化库位代码', + searchListPlaceholder: '请选择到库位代码', searchField: 'code', searchTitle: '库位信息', searchAllSchemas: Location.allSchemas, @@ -105,7 +105,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择初始化库位代码', + searchListPlaceholder: '请选择到库位代码', searchField: 'code', searchTitle: '库位信息', searchAllSchemas: Location.allSchemas, @@ -465,6 +465,26 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ } } }, + { + label: '库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + componentProps: { + disabled: true + } + } + }, { label: '数量', field: 'toQty', @@ -503,26 +523,6 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ } } }, - { - label: '库存状态', - field: 'toInventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true, - type: 'Select' - }, - form: { - componentProps: { - disabled: true - } - } - }, { label: '子备注', field: 'remark', diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue index 109951619..de6baf2ea 100644 --- a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue @@ -534,7 +534,7 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplate() + importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateCreate() }) diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue index 4889d5dcb..9f883e7bf 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue @@ -534,7 +534,7 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplate() + importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateInitial() }) \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue index 89f39d8a3..d70759d59 100644 --- a/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue @@ -433,6 +433,11 @@ const submitForm = async (formType,submitData) => { if(data.masterId){ data.id = data.masterId } + let findLocation = tableData.value.find(item=>item.fromLocationCode==item.toLocationCode&&item.fromInventoryStatus==item.toInventoryStatus) + if(findLocation){ + message.warning('从库位和到库位不能相同') + return + } data.subList = tableData.value // 拼接子表数据参数 data.subList.forEach(item => { if(item.qty == 0){ @@ -535,7 +540,7 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateReturnAndMove() + importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateMove() }) diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue index 835adfc5f..6aefd24e0 100644 --- a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue @@ -535,7 +535,7 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateReturnAndMove() + importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateReturn() }) diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue index c8c79b8b8..ce2b89d73 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -557,7 +557,7 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateReturnAndMove() + importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateScrap() }) diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts index 5d2c76d4b..fa9c45a11 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts @@ -533,6 +533,21 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ // disabled: true, // }, // }, + { + label: '库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + }, { label: '数量', field: 'toQty', @@ -566,23 +581,6 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ type: 'Select' } }, - { - label: '到库存状态', - field: 'toInventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isForm: false, - isTableForm: false, - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true - }, - }, { label: '子备注', field: 'remark',