fix: 应付金额

This commit is contained in:
whitechiina 2025-04-07 18:16:18 +08:00
parent 02fb87bb48
commit 6b91cac242
11 changed files with 19 additions and 7 deletions

View File

@ -71,7 +71,7 @@
</view> --> </view> -->
<view class="Commodity"> <view class="Commodity">
<text lines="1" class="quantity">应付</text> <text lines="1" class="quantity">应付</text>
<text lines="1" class="amount">{{ calculationamount['prices'] }}</text> <text lines="1" class="amount">{{ (calculationamount.prices).toFixed(2) }}</text>
</view> </view>
<!-- 新增计算抵扣逻辑 --> <!-- 新增计算抵扣逻辑 -->
@ -88,7 +88,7 @@
<view class="discount" style="width: 100%; display: flex; justify-content: space-between"> <view class="discount" style="width: 100%; display: flex; justify-content: space-between">
<view> <view>
<text lines="1" class="quantity">抵用券</text> <text lines="1" class="quantity">抵用券</text>
<text lines="1" class="amount">({{ computedTotal.coin_balance }} )</text> <text lines="1" class="amount">({{ YingPrice }} )</text>
</view> </view>
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view> <view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
</view> </view>
@ -282,7 +282,9 @@
computedTotal: {}, computedTotal: {},
use_coin: false, use_coin: false,
use_broker: false, use_broker: false,
hasAssigned: false, //
YingPrice: 0 //
}; };
}, },
onLoad() { onLoad() {

View File

@ -243,7 +243,9 @@
computedTotal: {}, computedTotal: {},
use_coin: 0, use_coin: 0,
use_broker: 0, use_broker: 0,
hasAssigned: false, //
YingPrice: 0 //
}; };
}, },
onLoad() { onLoad() {

View File

@ -318,6 +318,14 @@ const restaurantmixins = {
if (!res.data.used_coin) { if (!res.data.used_coin) {
this.use_coin = false this.use_coin = false
} }
/*
* 仅赋值一次
*/
if (this.hasAssigned) return;
this.YingPrice = res.data.real_pay_price;
this.hasAssigned = true;
}).catch(res => { }).catch(res => {
this.loading = false; this.loading = false;
uni.showToast({ uni.showToast({

BIN
unpackage/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>消费补贴卡</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>消费补贴卡</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.2a9d3084.js></script><script src=/privilege/static/js/index.e3f766fd.js></script></body></html> document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.2a9d3084.js></script><script src=/privilege/static/js/index.58ad7669.js></script></body></html>

File diff suppressed because one or more lines are too long