|
|
@ -81,23 +81,39 @@ |
|
|
|
row['itemCode'] = val[0]['code'] |
|
|
|
row['poNumber'] = val[0]['number'] |
|
|
|
row['poLine'] = val[0]['lineNumber'] |
|
|
|
|
|
|
|
await PurchaseDetailApi.getPurchaseDetailPage({ |
|
|
|
number: row['poNumber'], |
|
|
|
available: 'TRUE', |
|
|
|
// poLine: row['lineNumber'], |
|
|
|
}).then(res => { |
|
|
|
if (formField == 'poLine') { |
|
|
|
row['itemCode'] = res.list[0].itemCode |
|
|
|
row['uom'] = res.list[0].uom |
|
|
|
row['orderQty'] = res.list[0].orderQty |
|
|
|
row['planQty'] = res.list[0].orderQty-res.list[0].plannedQty |
|
|
|
row['available'] = res.list[0].available |
|
|
|
} |
|
|
|
}) |
|
|
|
if (formField == 'poLine') { |
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
row['orderQty'] = val[0]['orderQty'] |
|
|
|
row['planQty'] = val[0]['orderQty']-val[0]['plannedQty'] |
|
|
|
row['available'] = val[0]['available'] |
|
|
|
} |
|
|
|
// await PurchaseDetailApi.getPurchaseDetailPage({ |
|
|
|
// number: row['poNumber'], |
|
|
|
// available: 'TRUE', |
|
|
|
// // poLine: row['lineNumber'], |
|
|
|
// }).then(res => { |
|
|
|
// if (formField == 'poLine') { |
|
|
|
// row['itemCode'] = res.list[0].itemCode |
|
|
|
// row['uom'] = res.list[0].uom |
|
|
|
// row['orderQty'] = res.list[0].orderQty |
|
|
|
// row['planQty'] = res.list[0].orderQty-res.list[0].plannedQty |
|
|
|
// row['available'] = res.list[0].available |
|
|
|
// } |
|
|
|
// }) |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['itemCode'] = val[0]['code'] |
|
|
|
setV['poNumber'] = val[0]['number'] |
|
|
|
setV['poLine'] = val[0]['lineNumber'] |
|
|
|
if (formField == 'poLine') { |
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
setV['uom'] = val[0]['uom'] |
|
|
|
setV['orderQty'] = val[0]['orderQty'] |
|
|
|
setV['planQty'] = val[0]['orderQty']-val[0]['plannedQty'] |
|
|
|
setV['available'] = val[0]['available'] |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
@ -109,16 +125,23 @@ |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['poNumber'] = val[0]['number'] |
|
|
|
setV['poLine'] = val[0]['lineNumber'] |
|
|
|
if (formField == 'poLine') { |
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
setV['uom'] = val[0]['uom'] |
|
|
|
setV['orderQty'] = val[0]['orderQty'] |
|
|
|
setV['planQty'] = val[0]['orderQty']-val[0]['plannedQty'] |
|
|
|
setV['available'] = val[0]['available'] |
|
|
|
} |
|
|
|
// await PurchaseDetailApi.getPurchaseDetailPage({ |
|
|
|
// number: setV['poNumber'], |
|
|
|
// lineNumber: setV['poLine'], |
|
|
|
// }).then(res => { |
|
|
|
// if (res.list.length == 1) { |
|
|
|
// // 叶佳兴 |
|
|
|
// setV['itemCode'] = res.list[0].itemCode |
|
|
|
// } |
|
|
|
// }) |
|
|
|
formRef.setValues(setV) |
|
|
|
await PurchaseDetailApi.getPurchaseDetailPage({ |
|
|
|
number: setV['poNumber'], |
|
|
|
lineNumber: setV['poLine'], |
|
|
|
}).then(res => { |
|
|
|
if (res.list.length == 1) { |
|
|
|
// 叶佳兴 |
|
|
|
setV['itemCode'] = res.list[0].itemCode |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|