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: '请选择物料代码、批次、从库位代码',