From 32e9f3b16859e66bdb874dcc2c6785163b240aa3 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 10 Jul 2024 14:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=8B=E9=B2=81=E9=B9=8F=E5=B8=8C=E6=9C=9B?= =?UTF-8?q?=EF=BC=9A=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=97=B6=E9=81=87=E5=88=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasereturnRequestMain/index.vue | 21 +++++++++++++++++-- .../purchasereturnRequestMain.data.ts | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index d09d0bc40..de668c94d 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -232,8 +232,9 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro nextTick(async () => { if (type == 'tableForm') { // 明细查询页赋值 - row[formField] = val[0][searchField] + if (formField == 'purchaseReceiptRecordNumber') { + row[formField] = val[0][searchField] //搜索记录单号--回显数据 row['supplierCode'] = val[0]['supplierCode'] row['poNumber'] = val[0]['poNumber'] @@ -271,6 +272,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro row['amount'] = val[0]['amount'] row['projectCode'] = val[0]['projectCode'] } else if (formField == 'itemCode') { + row[formField] = val[0][searchField] row['batch'] = val[0]['toBatch'] row['containerNumber'] = val[0]['toContainerNumber'] row['containerNumber'] = val[0]['containerNumber'] @@ -278,6 +280,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro // row['fromLocationCode'] = val[0]['fromLocationCode'] row['toLocationCode'] = val[0]['toLocationCode'] } else if (formField == 'fromLocationCode') { + row[formField] = val[0][searchField] // let params = { // itemCode: row.itemCode, // batch: row.batch, @@ -287,7 +290,21 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro // console.log('23423423',aa); // row['inventoryBalance'] = aa//库存余额 } else if (formField == 'packingNumber') { - row['inventoryBalance'] = val[0]['qty'] //库存余额 + // row[formField] = val[0][searchField] + val.forEach((item,index)=>{ + if(index==0){ + row[formField] = item[searchField] + row['inventoryBalance'] = item['qty'] //库存余额 + }else{ + let newRow = {...row} + newRow[formField] = item[searchField] + row['inventoryBalance'] = item['qty'] //库存余额 + tableData.value.push(newRow) + } + }) + // row['inventoryBalance'] = val[0]['qty'] //库存余额 + }else{ + row[formField] = val[0][searchField] } } else { const setV = {} diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index 1358415e2..f4a706b9c 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -982,6 +982,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive } }, tableForm:{ + multiple: true, // labelMessage: '信息提示说明!!!', isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码、批次、从库位代码',