From 88b734d97cfd9e0e8b50b43c200ba76047eefd63 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 22 Jul 2024 17:27:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockup/stockupMainRequest/index.vue | 7 +++++++ .../stockup/stockupMainRequest/stockupMainRequest.data.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index 9cc571da8..3edbc9158 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -128,6 +128,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // row['uom'] = val[0]['uom'] // } if(formField == 'itemCode') { + let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==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['itemCode']==item['code'])) + if(val.length==0) return val.forEach(item=>{ if(tableData.value.find(item1=>item1['itemCode'] == item['code'])) return const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts index 373e50f03..26fb57890 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts @@ -649,6 +649,7 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ width: 150 }, tableForm:{ + multiple:true, isInpuFocusShow: false, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', searchField: 'code',