|
|
@ -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 = { |
|
|
|