|
|
@ -76,21 +76,27 @@ |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
|
nextTick(async () => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
|
|
|
|
// 明细查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
row['itemCode'] = val[0]['code'] |
|
|
|
row['poNumber'] = val[0]['number'] |
|
|
|
row['poLine'] = val[0]['lineNumber'] |
|
|
|
|
|
|
|
await PurchaseDetailApi.getPurchaseDetailPage({ |
|
|
|
number: row['poNumber'], |
|
|
|
poLine: row['lineNumber'], |
|
|
|
available: 'TRUE', |
|
|
|
// poLine: row['lineNumber'], |
|
|
|
}).then(res => { |
|
|
|
if (res.list.length == 1) { |
|
|
|
row['itemCode'] = res.list[0].itemCode |
|
|
|
row['poLine'] = res.list[0].lineNumber |
|
|
|
row['uom'] = res.list[0].uom |
|
|
|
} |
|
|
|
// if (formField == 'poLine') { |
|
|
|
// row['itemCode'] = res.list[0].itemCode |
|
|
|
// row['uom'] = res.list[0].uom |
|
|
|
// } |
|
|
|
if (res) tableData.value = res.list; |
|
|
|
tableData.value.forEach(item => { |
|
|
|
item.poNumber = item.number |
|
|
|
item.poLine = item.lineNumber |
|
|
|
item.planQty =item.orderQty-item.plannedQty |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
@ -112,7 +118,7 @@ |
|
|
|
lineNumber: setV['poLine'], |
|
|
|
}).then(res => { |
|
|
|
if (res.list.length == 1) { |
|
|
|
// 叶佳兴 |
|
|
|
// 叶佳兴 |
|
|
|
setV['itemCode'] = res.list[0].itemCode |
|
|
|
} |
|
|
|
}) |
|
|
|