Commit fb01fe3b authored by zhoutong's avatar zhoutong

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

parent c03b1e17
...@@ -563,14 +563,24 @@ export default { ...@@ -563,14 +563,24 @@ export default {
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (column.property === "brandType") { if (column.property === "feeType") {
sums[index] = this.$t("合计"); sums[index] = this.$t("合计");
return; return;
} }
if (column.property === "num") { if (column.property === "warehouseInInfoVO.cartonsNum") {
sums[index] = new Decimal( var num = 0
this.calcSum(column.property, data) let values = data?.map((item) => Number(item.warehouseInInfoVO.cartonsNum)) ?? [];
).toNumber(); 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") { if (column.property === "volumeWeight") {
let volume = this.calcSum("volume", data); 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