|
|
@ -128,22 +128,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
// tableData.value.push(newRow) |
|
|
|
// }) |
|
|
|
// 查询标准价格 |
|
|
|
let param = {'itemCodes':val.map(item=>item.itemCode).join(',') as string} |
|
|
|
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => { |
|
|
|
val.forEach(item=>{ |
|
|
|
const itemCode = res.find(item1=>item1['itemCode']==item['itemCode']) |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow[formField] = item[searchField] |
|
|
|
newRow['packingNumber'] = item['packingNumber'] |
|
|
|
newRow['batch'] = item['batch'] |
|
|
|
newRow['fromLocationCode'] = item['locationCode'] |
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['singlePrice'] = itemCode?itemCode['price']:'' |
|
|
|
tableData.value.push(newRow) |
|
|
|
if(formField == 'packingNumber'){ |
|
|
|
let param = {'itemCodes':val.map(item=>item.itemCode).join(',') as string} |
|
|
|
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => { |
|
|
|
val.forEach(item=>{ |
|
|
|
const itemCode = res.find(item1=>item1['itemCode']==item['itemCode']) |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow[formField] = item[searchField] |
|
|
|
newRow['packingNumber'] = item['packingNumber'] |
|
|
|
newRow['batch'] = item['batch'] |
|
|
|
newRow['fromLocationCode'] = item['locationCode'] |
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['singlePrice'] = itemCode?itemCode['price']:'' |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
// row['singlePrice'] = res.price |
|
|
|
}) |
|
|
|
// row['singlePrice'] = res.price |
|
|
|
}) |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|