|
|
@@ -1525,9 +1525,14 @@
|
|
|
let weight = 0;
|
|
|
if (row.measureUnit == row.weightUnit) {
|
|
|
weight = row.measureQuantity;
|
|
|
- row.singleWeight =
|
|
|
- Math.trunc((row.measureQuantity / row.packingQuantity) * 100) /
|
|
|
- 100;
|
|
|
+ // 如果重量单位和包装单位一致,则单重0
|
|
|
+ if (row.weightUnit == row.packageUnit) {
|
|
|
+ row.singleWeight = 0;
|
|
|
+ } else {
|
|
|
+ row.singleWeight =
|
|
|
+ Math.trunc((row.measureQuantity / row.packingQuantity) * 100) /
|
|
|
+ 100;
|
|
|
+ }
|
|
|
} else if (row.singleWeight) {
|
|
|
weight = row.measureQuantity * Number(row.singleWeight);
|
|
|
}
|
|
|
@@ -1774,8 +1779,8 @@
|
|
|
: '', // 颜色
|
|
|
measureType: item.measureType, // 计量方式
|
|
|
netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
|
|
|
- singleWeight: singleWeight||0, // 单重重量
|
|
|
- weight: weight||0, // 总重量
|
|
|
+ singleWeight: singleWeight || 0, // 单重重量
|
|
|
+ weight: weight || 0, // 总重量
|
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
|
totalMoney: totalMoney, // 总价
|
|
|
unitPrice: item.unitPrice || unitPrice, // 单价
|
|
|
@@ -3874,11 +3879,10 @@
|
|
|
.dictValue;
|
|
|
if (outBoolen) {
|
|
|
// 计量单位为KG类,直接替换
|
|
|
-
|
|
|
- item.weight = item.measureQuantity
|
|
|
- ? Number(item.measureQuantity)
|
|
|
- : 0;
|
|
|
-
|
|
|
+
|
|
|
+ item.weight = item.measureQuantity
|
|
|
+ ? Number(item.measureQuantity)
|
|
|
+ : 0;
|
|
|
} else {
|
|
|
console.log('计量单位为不为KG类======================');
|
|
|
// 计量单位为不为KG类,重新统计计算
|