fix: 应付金额动态
This commit is contained in:
parent
ff7aa74ab1
commit
72443535cf
|
|
@ -107,7 +107,7 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="text-wrapper_4 itemamount">
|
<view class="text-wrapper_4 itemamount">
|
||||||
<text lines="1" class="text_24">实际付款:</text>
|
<text lines="1" class="text_24">实际付款:</text>
|
||||||
<text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">¥{{computedTotal.real_pay_price}}</text>
|
<text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">¥{{realPayment}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_4 itemamount">
|
<view class="text-wrapper_4 itemamount">
|
||||||
<text lines="1" class="text_24">积分:</text>
|
<text lines="1" class="text_24">积分:</text>
|
||||||
|
|
@ -284,7 +284,8 @@
|
||||||
use_broker: false,
|
use_broker: false,
|
||||||
|
|
||||||
hasAssigned: false, // 标志变量
|
hasAssigned: false, // 标志变量
|
||||||
YingPrice: 0 // 应付
|
YingPrice: 0 ,// 应付
|
||||||
|
realPayment: 0, // 实际付款
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -351,20 +352,6 @@
|
||||||
};
|
};
|
||||||
// 获取余额
|
// 获取余额
|
||||||
console.log('初始化', newobj);
|
console.log('初始化', newobj);
|
||||||
|
|
||||||
// 好像是查询补贴卡的
|
|
||||||
// conWalletInfoAPI().then(res => {
|
|
||||||
// this['amount'] = res['data']['amount'];
|
|
||||||
// // this['amount'] = 4076;
|
|
||||||
// this['FormInfor']['brand_id'] = this['BrandInfor']['brand_id'];
|
|
||||||
// this['FormInfor']['restaurant_id'] = this['GetShopInfor']['restaurant_id'];
|
|
||||||
// this['FormInfor']['restaurant_name'] = this['GetShopInfor']['restaurant_name'];
|
|
||||||
// this['FormInfor']['lat'] = this['GetShopInfor']['latitude'];
|
|
||||||
// this['FormInfor']['lng'] = this['GetShopInfor']['longitude'];
|
|
||||||
// this['FormInfor']['restaurant_address'] = this['GetShopInfor']['restaurant_address'];
|
|
||||||
// this['FormInfor']['products'] = products;
|
|
||||||
// console.log(this['FormInfor'], 'FormInfor')
|
|
||||||
// })
|
|
||||||
|
|
||||||
// 计算点餐金额
|
// 计算点餐金额
|
||||||
this['FormInfor']['use_coin'] = this.use_coin? 1 : 0;
|
this['FormInfor']['use_coin'] = this.use_coin? 1 : 0;
|
||||||
|
|
@ -385,10 +372,12 @@
|
||||||
// 是否使用券
|
// 是否使用券
|
||||||
isCoin() {
|
isCoin() {
|
||||||
this.use_coin = !this.use_coin;
|
this.use_coin = !this.use_coin;
|
||||||
|
this.getCart();
|
||||||
},
|
},
|
||||||
|
|
||||||
isBroker() {
|
isBroker() {
|
||||||
this.use_broker = !this.use_broker;
|
this.use_broker = !this.use_broker;
|
||||||
|
this.getCart();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -501,8 +490,7 @@
|
||||||
// 保存当前点击商品的指定数据,用于计算金额(新值)
|
// 保存当前点击商品的指定数据,用于计算金额(新值)
|
||||||
current['newvalue'] = current['is_deduction'];
|
current['newvalue'] = current['is_deduction'];
|
||||||
}, 500, true)
|
}, 500, true)
|
||||||
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -311,18 +311,13 @@ const restaurantmixins = {
|
||||||
// 佣金计算
|
// 佣金计算
|
||||||
computedOfflineOrder(this.FormInfor).then(res => {
|
computedOfflineOrder(this.FormInfor).then(res => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.computedTotal = res.data;
|
this.realPayment = res.data.real_pay_price;
|
||||||
if (!res.data.used_broker) {
|
|
||||||
this.use_broker = false
|
|
||||||
};
|
|
||||||
if (!res.data.used_coin) {
|
|
||||||
this.use_coin = false
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 仅赋值一次
|
* 仅赋值一次
|
||||||
*/
|
*/
|
||||||
if (this.hasAssigned) return;
|
if (this.hasAssigned) return;
|
||||||
|
this.computedTotal = res.data;
|
||||||
this.YingPrice = res.data.real_pay_price;
|
this.YingPrice = res.data.real_pay_price;
|
||||||
this.hasAssigned = true;
|
this.hasAssigned = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue