|
@ -722,10 +722,12 @@ const getGenerateLabelList = async (row) => { |
|
|
item.boxPackaging = item.boxPackaging ? item.boxPackaging : [] |
|
|
item.boxPackaging = item.boxPackaging ? item.boxPackaging : [] |
|
|
item.packUnitInitOptions = item.boxPackaging |
|
|
item.packUnitInitOptions = item.boxPackaging |
|
|
item.secondPackUnitInitOptions = item.palletPackaging || [] |
|
|
item.secondPackUnitInitOptions = item.palletPackaging || [] |
|
|
if (!Decimal(item.convertRate) || Decimal(item.convertRate) == 1) { |
|
|
if (item.convertRate==0 || item.convertRate == 1) { |
|
|
item.balanceQty = item.qty |
|
|
item.balanceQty = item.qty |
|
|
|
|
|
item.purchaseStdQty = row.packQty |
|
|
} else { |
|
|
} else { |
|
|
item.balanceQty = parseFloat(Decimal(item.qty).mul(Decimal(item.convertRate)).toNumber().toFixed(5)) |
|
|
item.balanceQty = parseFloat(Decimal(item.qty).mul(Decimal(item.convertRate)).toNumber().toFixed(5)) |
|
|
|
|
|
item.purchaseStdQty = parseFloat(Decimal(parseFloat(item.packQty)).div(Decimal(parseFloat(item.convertRate))).toNumber().toFixed(5)) |
|
|
} |
|
|
} |
|
|
let obj = item?.boxPackaging[0] |
|
|
let obj = item?.boxPackaging[0] |
|
|
if (obj) { |
|
|
if (obj) { |
|
@ -798,7 +800,7 @@ const formSelectChangeLabel = (field, val, row) => { |
|
|
let obj = row.boxPackaging.find((item) => item.packUnit == val) |
|
|
let obj = row.boxPackaging.find((item) => item.packUnit == val) |
|
|
if (obj) { |
|
|
if (obj) { |
|
|
row.packQty = obj.packQty |
|
|
row.packQty = obj.packQty |
|
|
if (!Decimal(row.convertRate) || Decimal(row.convertRate) == 1) { |
|
|
if (row.convertRate ==0 || row.convertRate == 1) { |
|
|
row.purchaseStdQty = row.packQty |
|
|
row.purchaseStdQty = row.packQty |
|
|
} else { |
|
|
} else { |
|
|
row.purchaseStdQty = parseFloat(Decimal(parseFloat(row.packQty)).div(Decimal(parseFloat(row.convertRate))).toNumber().toFixed(5)) |
|
|
row.purchaseStdQty = parseFloat(Decimal(parseFloat(row.packQty)).div(Decimal(parseFloat(row.convertRate))).toNumber().toFixed(5)) |
|
|