|
|
@@ -6,17 +6,23 @@
|
|
|
<div class="money card">
|
|
|
<div class="li flex_r flex_jb">
|
|
|
<span>消费金额</span>
|
|
|
- <span>¥{{ order.order_amount || 0 }}</span>
|
|
|
+ <span>¥{{ order.attachment.custom_price || 0 }}</span>
|
|
|
</div>
|
|
|
<div class="li flex_r flex_jb">
|
|
|
- <span>消费金抵扣<span class="corg">{{Integral}}%</span></span>
|
|
|
- <span class="corg">-¥{{ deduction || 0 }}</span>
|
|
|
+ <span>消费金抵扣</span>
|
|
|
+ <span class="corg">-¥{{ order.attachment.custom_integral || 0 }}</span>
|
|
|
</div>
|
|
|
<div class="li flex_r flex_jb">
|
|
|
<span>实付金额</span>
|
|
|
<span>¥{{ order.pay_amount || 0 }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="money card">
|
|
|
+ <div class="li flex_r flex_jb">
|
|
|
+ <span>赠送茶宝</span>
|
|
|
+ <span>{{ order.attachment.chabao || 0 }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="info card">
|
|
|
<p>产品品牌:{{ order.restaurant_name }}</p>
|
|
|
<p>产品名称:{{ order.product_name }}</p>
|
|
|
@@ -41,8 +47,8 @@ export default {
|
|
|
order: {},
|
|
|
orders: [],
|
|
|
pda: {},
|
|
|
- Integral: 0,
|
|
|
- deduction: 0,
|
|
|
+ // Integral: 0,
|
|
|
+ // deduction: 0,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -51,21 +57,24 @@ export default {
|
|
|
if (res.code == 0) {
|
|
|
let da = res.data.order
|
|
|
da.product_name = da.orderGoods[0].product_name;
|
|
|
+ if(da.orderGoods[0]?.attachment){
|
|
|
+ da.attachment = JSON.parse(da.orderGoods[0].attachment);
|
|
|
+ }
|
|
|
delete da.orderGoods;
|
|
|
this.order = da;
|
|
|
- this.getIntegral()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getIntegral() {
|
|
|
- post("local/getIntegral", { type: 6 }).then(res => {
|
|
|
- if (res.code == 0) {
|
|
|
- let i1 = res.data.integral;
|
|
|
- this.Integral = this.$h.Mul(i1, 100);
|
|
|
- this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
|
|
|
+ // this.getIntegral()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // getIntegral() {
|
|
|
+ // post("local/getIntegral", { type: 6 }).then(res => {
|
|
|
+ // if (res.code == 0) {
|
|
|
+ // let i1 = res.data.integral;
|
|
|
+ // this.Integral = this.$h.Mul(i1, 100);
|
|
|
+ // this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
pay() {
|
|
|
post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
|
|
|
if (res.code == 0 && res.data.data.prepayid) {
|