This commit is contained in:
齐天大圣 2024-06-06 11:35:37 +08:00
parent c18c1f976b
commit 866748d6e6

View File

@ -195,10 +195,10 @@
</div>
<div class="bottom-posi">
<div class="center-left-wrap">
<div class="wrap-box" value="oilCard"
<!-- <div class="wrap-box" value="oilCard"
:class="{ 'wrap-box2': 'oilCard' == payType }" >
<span @click="payMethod('oilCard')">囤油卡</span>
</div>
</div>-->
<div class="wrap-box" value="balance"
:class="{ 'wrap-box2': 'balance' == payType }" >
<span @click="payMethod('balance')">储值卡</span>
@ -218,7 +218,7 @@
<div class="center-left-bottom">
<div>
<div class="bottom-price">{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}</div>
<div class="price-red">优惠合计{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}/{{consumeRefuelMoney.toFixed(2)}}L</div>
<div class="price-red">优惠合计{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}<!--/{{consumeRefuelMoney.toFixed(2)}}L--></div>
</div>
<el-button class="center-left-lv" :disabled="(oilAmount + goodsAmount)==0" @click="settlement">立即结算</el-button>
</div>
@ -1126,7 +1126,7 @@
<div v-else-if="payType == 'ALIPAY'">支付宝</div>
<div v-else-if="payType == 'UNIONPAY'">银联二维码</div>
<div v-else-if="payType == 'credit'">挂账</div>
<div v-else-if="payType == 'oilCard'">囤油卡</div>
<!-- <div v-else-if="payType == 'oilCard'">囤油卡</div>-->
<div v-else-if="payType == 'balance'">储值卡</div>
<div v-else>小程序码</div>
</div>
@ -1147,10 +1147,10 @@
<div>储值卡付款</div>
<div>{{ consumeAmount }}</div>
</div>
<div class="input-box" v-if="isMember && consumeRefuelMoney>0">
<!-- <div class="input-box" v-if="isMember && consumeRefuelMoney>0">
<div>囤油卡付款</div>
<div>{{ consumeRefuelMoney.toFixed(2) }}</div>
</div>
</div>-->
<div class="input-box">
<div>实付款</div>
<div v-if="payType == 'credit'">0.00</div>
@ -3167,15 +3167,15 @@
})
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
},
getOilCoupon(){
async getOilCoupon() {
let type = 0;
// if (this.consumeAmount==0){
if (this.consumeRefuelMoney>0){
if (this.consumeRefuelMoney > 0) {
type = 1;
}else {
if (this.consumeAmount>0){
} else {
if (this.consumeAmount > 0) {
type = 0;
}else {
} else {
type = 2;
}
}
@ -3192,12 +3192,12 @@
this.paymentActive.mtUserLevel = this.member.gradeId
this.paymentActive.userId = this.member.id
let _this = this
this.oilOrder.forEach(item => {
for (const item of this.oilOrder) {
_this.paymentActive.amount = item.amount
_this.paymentActive.oilId = item.oilName
_this.paymentActive.storeId = item.storeId
getPaymentActive(_this.paymentActive).then(async res => {
await getPaymentActive(_this.paymentActive).then(async res => {
item.activeId = res.data.activeId
item.type = res.data.type
let discount = { type: "", discount: 0, oilName: item.oilName, gunName: item.gunName }
@ -3236,7 +3236,7 @@
}
}
// }
console.log(_this.oilDiscount, 111)
console.log(_this.oilDiscount, _this.couponAmount, _this.fullReduction, 3239)
this.countAmountFull()
if (this.isOilStorageCard) {
await this.countAmountFull()
@ -3248,7 +3248,7 @@
await this.countAmountFull()
}
})
})
}
},
//
getCoupon(){
@ -3877,6 +3877,7 @@
},
//
changeRefuelMoney(){
this.isOilStorageCard = false
getRecord({mtUserId:this.member.id}).then(res => {
this.oilCardAmount = 0
let oilAmount = 0
@ -3889,7 +3890,7 @@
if (item.oilName==i.oilType){
item.lockupPrice = i.lockupPrice
amount = item.lockupPrice * item.liters
this.isOilStorageCard = true
if (amount>0) this.isOilStorageCard = true
flag = false
}else {
flag = true
@ -3899,6 +3900,7 @@
if (flag) amount = item.amount
oilAmount += amount
})
console.log("3903", this.isOilStorageCard)
if (oilAmount>0) this.oilCardAmount = this.oilAmount - oilAmount
this.countAmountFull()
})