修复订单列表切换日期价格显示问题
This commit is contained in:
@@ -126,7 +126,21 @@
|
|||||||
let $goodsMap = {}
|
let $goodsMap = {}
|
||||||
let goosZhonglei = ref(0)
|
let goosZhonglei = ref(0)
|
||||||
let goodsNumber = ref(0)
|
let goodsNumber = ref(0)
|
||||||
let originAmount = ref(0)
|
let originAmount = computed(()=>{
|
||||||
|
let total=0;
|
||||||
|
for (let i in props.data.goods) {
|
||||||
|
const goods = props.data.goods[i]
|
||||||
|
if ($goodsMap.hasOwnProperty(goods.productId)) {
|
||||||
|
$goodsMap[goods.productId] += goods.num * 1
|
||||||
|
goodsNumber.value += goods.num * 1
|
||||||
|
} else {
|
||||||
|
$goodsMap[goods.productId] = goods.num * 1
|
||||||
|
goosZhonglei.value += 1
|
||||||
|
}
|
||||||
|
total += goods.payAmount
|
||||||
|
}
|
||||||
|
return total
|
||||||
|
})
|
||||||
const priceSize = 9
|
const priceSize = 9
|
||||||
let minWidth=ref(36)
|
let minWidth=ref(36)
|
||||||
|
|
||||||
@@ -138,17 +152,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function goodsMapInit() {
|
function goodsMapInit() {
|
||||||
for (let i in props.data.goods) {
|
|
||||||
const goods = props.data.goods[i]
|
|
||||||
if ($goodsMap.hasOwnProperty(goods.productId)) {
|
|
||||||
$goodsMap[goods.productId] += goods.num * 1
|
|
||||||
goodsNumber.value += goods.num * 1
|
|
||||||
} else {
|
|
||||||
$goodsMap[goods.productId] = goods.num * 1
|
|
||||||
goosZhonglei.value += 1
|
|
||||||
}
|
|
||||||
originAmount.value += goods.payAmount
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
goodsMapInit()
|
goodsMapInit()
|
||||||
watch(() => props.data.goods.length, (newval) => {
|
watch(() => props.data.goods.length, (newval) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user