From 1e4c2ac1c135fb368f18adad269f988accb94f3d Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 22 Jul 2024 17:40:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=94=AF=E4=B8=80=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itemManage/relegate/relegateRequest/index.vue | 7 +++++++ .../containermanage/initialContainerMainRequest/index.vue | 7 +++++++ .../initialContainerMainRequest.data.ts | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue index ce621fe3f..17c8549b7 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue @@ -95,6 +95,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => nextTick(() => { if (type == 'tableForm') { if (formField == 'itemCode') { + let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['itemCode'])) + if(itemCodes.length>0){ + itemCodes = itemCodes.map(item=>(item['itemCode'])) + message.warning(`物料${itemCodes.join(',')}已经存在`) + } + val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode'])) + if(val.length==0) return val.forEach(item=>{ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow['itemCode'] = item['itemCode'] diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue index 6024c640f..20028f7e2 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue @@ -132,6 +132,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => nextTick(() => { if (type == 'tableForm') { if(formField == 'containerNumber') { + let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['containerNumber']==item['code'])) + if(itemCodes.length>0){ + itemCodes = itemCodes.map(item=>(item['code'])) + message.warning(`器具号${itemCodes.join(',')}已经存在`) + } + val = val.filter(item=>!tableData.value.find(item1=>item1['containerNumber']==item['code'])) + if(val.length==0) return val.forEach(item=>{ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow['containerNumber'] = item['code'] diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts index 97a6dc837..766ad8056 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts @@ -359,7 +359,8 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ sort: 'custom', tableForm:{ multiple:true, - isInpuFocusShow: true, // 开启查询弹窗 + isInpuFocusShow: false, // 开启查询弹窗 + disabled: true, searchListPlaceholder: '请选择器具号', searchField: 'itemCode', searchTitle: '器具信息',