Commit b2f20ed0 authored by 黄奎's avatar 黄奎

11

parent 0c8b6b81
This diff is collapsed.
......@@ -2,85 +2,74 @@
</style>
<template>
<div>
<div class="row q-mb-sm items-center">
<div class="q-mr-lg">總金額</div>
<div class="text-subtitle2 text-weight-bolder ">
CNY {{ moneyFormat(sumPrice, 2) }}
</div>
</div>
<div class="row q-mb-sm items-center">
<div class="q-mr-lg">優惠金額</div>
<div
class="text-subtitle2 text-weight-bolder text-teal"
v-if="DiscountMoney > 0"
>
CNY - {{ moneyFormat(DiscountMoney, 2) }}
</div>
<div class="text-grey-5" v-else>暫無優惠</div>
</div>
<!-- <div class="row q-mb-sm items-center">
<div class="q-mr-lg">支付金額</div>
<div class="text-h6 text-weight-bolder product-price">
CNY {{ moneyFormat(TotalPrice, 2) }}
</div>
</div> -->
<div>
<div class="row q-mb-sm items-center">
<div class="q-mr-lg">總金額</div>
<div class="text-subtitle2 text-weight-bolder ">
CNY {{ moneyFormat(sumPrice, 2) }}
</div>
</div>
<div class="row q-mb-sm items-center">
<div class="q-mr-lg">優惠金額</div>
<div class="text-subtitle2 text-weight-bolder text-teal" v-if="DiscountMoney > 0">
CNY - {{ moneyFormat(DiscountMoney, 2) }}
</div>
<div class="text-grey-5" v-else>暫無優惠</div>
</div>
</div>
</template>
<script>
export default {
export default {
props: {
orderInfo: {
type: Object,
default: () => ({})
}
orderInfo: {
type: Object,
default: () => ({})
}
},
data() {
return {
details: null,
sumPrice: 0,//总金额
DiscountMoney: 0,//优惠金额
TotalPrice: 0, // 支付金額
sumPrice: 0, //总金额
DiscountMoney: 0, //优惠金额
TotalPrice: 0, // 支付金額
}
},
mounted() {
this.getGroupData()
this.getGroupData()
},
methods: {
// 获取团的详情
getGroupData() {
// this.$q.loading.show();
if(!this.orderInfo.ErpOrderId) return this.sumPrice = this.orderInfo.TotalPrice
this.apipost(
"dmc_post_GetThirdHotelOrder",
{ OrderID: this.orderInfo.ErpOrderId },
(r) => {
if (r.data.resultCode == 1) {
this.dataList = r.data.data;
const {DiscountMoney,TotalPrice} = r.data.data;
// sumPrice: 0,//总金额
// DiscountMoney: 0,//优惠金额
// TotalPrice: 0, // 支付金額
// MailingState: '',//邮寄状态 1自取 2邮寄
this.TotalPrice = TotalPrice;
this.DiscountMoney = DiscountMoney
this.sumPrice = TotalPrice + DiscountMoney
// this.sumPrice = this.moneyFormat(this.sumPrice, 2)
// this.TotalPrice = this.moneyFormat(this.TotalPrice, 2)
// this.DiscountMoney = this.moneyFormat(this.DiscountMoney, 2)
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
// this.$q.loading.hide();
},
null
);
},
// 获取团的详情
getGroupData() {
if (!this.orderInfo.ErpOrderId) return this.sumPrice = this.orderInfo.TotalPrice
this.apipost(
"dmc_post_GetThirdHotelOrder", {
OrderID: this.orderInfo.ErpOrderId
},
(r) => {
if (r.data.resultCode == 1) {
this.dataList = r.data.data;
const {
DiscountMoney,
TotalPrice
} = r.data.data;
this.TotalPrice = TotalPrice;
this.DiscountMoney = DiscountMoney
this.sumPrice = TotalPrice + DiscountMoney
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
}
}
</script>
\ No newline at end of file
}
</script>
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