|
|
@@ -83,6 +83,7 @@ export default {
|
|
|
let bigLength = 0;
|
|
|
let smallLength = 0;
|
|
|
let weight = 0
|
|
|
+ let cost = 0
|
|
|
if (this.selectList) {
|
|
|
for (const item of this.selectList) {
|
|
|
bigLength += Number(item.bigCount)
|
|
|
@@ -90,11 +91,18 @@ export default {
|
|
|
let thisWeight = item.weight ? item.weight : 0
|
|
|
let currentWeight = Number(thisWeight)*Number(item.bigCount)
|
|
|
weight = Number(weight) + Number(currentWeight)
|
|
|
+
|
|
|
+ let thisCost = item.cost ? item.cost : 0
|
|
|
+ let currentCost = Number(thisCost)*Number(item.bigCount)
|
|
|
+ cost = Number(currentCost) + Number(currentCost)
|
|
|
}
|
|
|
weight = weight.toFixed(2)
|
|
|
weight = parseFloat(weight)
|
|
|
+
|
|
|
+ cost = cost.toFixed(2)
|
|
|
+ cost = parseFloat(cost)
|
|
|
}
|
|
|
- return {bigLength:bigLength,smallLength:smallLength,weight:weight};
|
|
|
+ return {bigLength:bigLength,smallLength:smallLength,weight:weight,cost:cost};
|
|
|
},
|
|
|
//当前选中商品列表中是否有没有库存的商品
|
|
|
hasNoStock() {
|