Commit fb01fe3b authored by zhoutong's avatar zhoutong

生产反馈】排单页面,箱数汇总没有了

parent c03b1e17
......@@ -563,14 +563,24 @@ export default {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (column.property === "brandType") {
if (column.property === "feeType") {
sums[index] = this.$t("合计");
return;
}
if (column.property === "num") {
sums[index] = new Decimal(
this.calcSum(column.property, data)
).toNumber();
if (column.property === "warehouseInInfoVO.cartonsNum") {
var num = 0
let values = data?.map((item) => Number(item.warehouseInInfoVO.cartonsNum)) ?? [];
if (!values.every((value) => isNaN(value))) {
num = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
}
sums[index] = num
}
if (column.property === "volumeWeight") {
let volume = this.calcSum("volume", data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment