From 8cfc97a9c4dea258777400bb690830bd50b522bb Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 24 Jul 2024 16:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=94=AF=E4=B8=80=E6=80=A7?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E3=80=81=E7=89=A9=E6=96=99=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E5=8E=BB=E6=8E=89=E6=94=BE=E5=A4=A7=E9=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasereturnRequestSpareMain/index.vue | 26 ++++++++++++------- .../purchasereturnRequestSpareMain.data.ts | 4 ++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue index 7413219f4..7ca3471c4 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue @@ -235,16 +235,22 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro if (type == 'tableForm') { // 明细查询页赋值 if (formField == 'itemCode') { - let newRow = {...row} - newRow[formField] = val[0][searchField] - newRow['batch'] = val[0]['batch'] - newRow['itemCode'] = val[0]['itemCode'] - newRow['uom'] = val[0]['uom'] - newRow['itemName'] = val[0]['itemName'] - newRow['inventoryBalance'] = val[0]['qty'] - newRow['fromLocationCode'] = val[0]['locationCode'] - newRow['packingNumber'] = val[0]['packingNumber'] - tableData.value.push(newRow) + val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['batch']==item['batch']&&item1['packingNumber']==item['packingNumber']&&item1['fromLocationCode']==item['locationCode']&&item1['inventoryStatus']==item['inventoryStatus'])) + + val.forEach(item=>{ + let newRow = {...item} + newRow[formField] = item[searchField] + newRow['batch'] =item['batch'] + newRow['itemCode'] =item['itemCode'] + newRow['uom'] = item['uom'] + newRow['itemName'] = item['itemName'] + newRow['inventoryBalance'] = item['qty'] + newRow['fromLocationCode'] = item['locationCode'] + newRow['packingNumber'] = item['packingNumber'] + newRow['inventoryStatus'] = item['inventoryStatus'] + tableData.value.push(newRow) + }) + } else if (formField == 'fromLocationCode') { row[formField] = val[0][searchField] // let params = { diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts index dafa97872..456a626fb 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts @@ -735,7 +735,9 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm:{ - isInpuFocusShow: true, // 开启查询弹窗 + multiple:true, + disabled:true, + // isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择包装号', searchField: 'packingNumber', searchTitle: '库存余额信息',