From d438dd5eb6b86997c4c527b15fe5beef14fae74a Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Thu, 14 Nov 2024 13:08:59 +0800 Subject: [PATCH] =?UTF-8?q?YT-507=E5=A4=87=E6=96=99=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../preparetoissueMain/index.vue | 18 ++++++++++++++++-- .../preparetoissueMain.data.ts | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index f74e4883a..761c02b4b 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -119,8 +119,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => message.warning(`物料${val[0]['componentItemCode']}已经存在`) return } - row['itemCode'] = val[0]['componentItemCode'] - row['uom'] = val[0]['componentUom'] + val.forEach((item, index)=>{ + let tableForm = JSON.parse(JSON.stringify(tableFormKeys)) + if(index == 0){ + row['itemCode'] = item['componentItemCode'] + row['uom'] = item['componentUom'] + }else{ + const newRow = JSON.parse(JSON.stringify({...tableForm,...item})) + newRow['itemCode'] = item['componentItemCode'] + newRow['uom'] = item['componentUom'] + newRow['workStation'] = row['workStation'] + newRow['toLocationCode'] = row['toLocationCode'] + newRow['remark'] = '' + tableData.value.push(newRow) + } + }) + } else if(formField == 'workStation'){ if(isShowButton.value){ val.forEach(item=>{ diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts index 016dd1a3f..1b17e5e4f 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts @@ -617,6 +617,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '物料清单信息', // 查询弹窗标题 + multiple: true, searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法 searchCondition: [{ @@ -642,6 +643,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '物料清单信息', // 查询弹窗标题 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 + multiple: true, searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法 searchCondition: [{ key: 'productionLineCode',