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