Commit 874f144f authored by xiejb's avatar xiejb

商品清单页面金额合计

parent caa0dde8
......@@ -62,14 +62,15 @@ export default {
goodsName: '', // 商品名称
goodsSpec: '', // 商品规格
manufacturer: '', // 生产企业
}
},
totalAmount: 0
};
},
props: {
totalAmount: {
type: String,
default: '0.00'
}
// totalAmount: {
// type: String,
// default: '0.00'
// }
},
computed: {
// 总价格
......@@ -77,7 +78,8 @@ export default {
// if (this.detailData.orderTotalAmount) {
// return AmountNumFormat(this.detailData.orderTotalAmount)
// } else {
return this.orderItem.orderTotalAmount
// return this.orderItem.orderTotalAmount
return AmountNumFormat(this.totalAmount)
// }
}
},
......@@ -178,6 +180,7 @@ export default {
}
getMyOrderDetail(params).then(res => {
this.detailData = []
this.totalAmount = 0
if (res.code === 200 && res.data && res.data.code === '00000' &&
res.data.entity && res.data.entity.detailList && res.data.entity.detailList.length > 0) {
this.detailData = res.data.entity.detailList
......@@ -186,7 +189,9 @@ export default {
// array.push(this.detailData.goodsInfos[0])
// array.push(this.detailData.goodsInfos[1])
// }
// this.detailData.goodsInfos = array
this.detailData.forEach(item => {
this.totalAmount = this.totalAmount + parseFloat(item.taxAmount)
})
} else {
console.log('订单详情', '请求失败')
}
......
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