|
@@ -1,46 +1,92 @@
|
|
|
<template>
|
|
|
<scroll-view scroll-y="true" class="scroll-Y">
|
|
|
- <van-checkbox-group v-model="active" checked-color="#064C8A" @change="checkboxChange">
|
|
|
+ <van-checkbox-group
|
|
|
+ v-model="active"
|
|
|
+ checked-color="#064C8A"
|
|
|
+ @change="checkboxChange"
|
|
|
+ >
|
|
|
<div class="container" v-if="false">
|
|
|
<!--todo: 杭州首停不显示暂时根据groupId写死-->
|
|
|
<div class="item">
|
|
|
<div class="title">首停优惠</div>
|
|
|
- <div class="content">首停减免{{parkInfoEntity.parkHour}}小时。可优惠{{firstParkDiscountFee}}元</div>
|
|
|
+ <div class="content">
|
|
|
+ 首停减免{{ parkInfoEntity.parkHour }}小时。可优惠{{
|
|
|
+ firstParkDiscountFee
|
|
|
+ }}元
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <van-checkbox value="firstPark" color="#fff" :checked="isCheck('firstPark')" />
|
|
|
+ <van-checkbox
|
|
|
+ value="firstPark"
|
|
|
+ color="#fff"
|
|
|
+ :checked="isCheck('firstPark')"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="container" v-if="parkInfoEntity.memberLevelReduce">
|
|
|
<div class="item">
|
|
|
<div class="title">会员等级减免</div>
|
|
|
- <div class="content">{{memberDiscount.memberOrderdesc || ''}}减免{{memberDiscount.reduceContent ||
|
|
|
- 0}}小时。可优惠{{memberDiscountFee || 0}}元</div>
|
|
|
+ <div class="content">
|
|
|
+ {{ memberDiscount.memberOrderdesc || '' }}减免{{
|
|
|
+ memberDiscount.reduceContent || 0
|
|
|
+ }}小时。可优惠{{ memberDiscountFee || 0 }}元
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-checkbox
|
|
|
+ value="member"
|
|
|
+ color="#fff"
|
|
|
+ name="a"
|
|
|
+ :disabled="
|
|
|
+ (!isCheck('member') && isDiscountDisabled) ||
|
|
|
+ isMemberDiscountDisabled ||
|
|
|
+ memberDiscount.reduceContent <= 0
|
|
|
+ "
|
|
|
+ :checked="isCheck('member')"
|
|
|
+ />
|
|
|
+ <div class="member-discount-info" v-if="isMemberDiscountDisabled">
|
|
|
+ 当日已使用
|
|
|
</div>
|
|
|
- <van-checkbox value="member" color="#fff"
|
|
|
- name="a"
|
|
|
- :disabled="(!isCheck('member') && isDiscountDisabled) || isMemberDiscountDisabled || memberDiscount.reduceContent <= 0"
|
|
|
- :checked="isCheck('member')" />
|
|
|
- <div class="member-discount-info" v-if="isMemberDiscountDisabled">当日已使用</div>
|
|
|
</div>
|
|
|
<div class="container" v-if="isShowReduceDiscount">
|
|
|
<div class="item">
|
|
|
<div class="title">消费减免</div>
|
|
|
<!-- <uni-view class="content" v-if="parkInfoEntity.parkMallCode === 1 && parkInfoEntity.expirationDate">{{reduceDiscountMessage}}</uni-view> -->
|
|
|
- <div class="content" v-if="parkInfoEntity.parkMallCode !== 1">{{todayReduceDiscountMessage}}</div>
|
|
|
- <uni-number-box v-if="parkInfoEntity.isSplit === 0 && maxReduceDiscount > 0" :min="1" :max="maxReduceDiscount"
|
|
|
- v-model="reduceHours" @input="reducesChange"></uni-number-box>
|
|
|
+ <div class="content" v-if="parkInfoEntity.parkMallCode !== 1">
|
|
|
+ {{ todayReduceDiscountMessage }}
|
|
|
+ </div>
|
|
|
+ <uni-number-box
|
|
|
+ v-if="parkInfoEntity.isSplit === 0 && maxReduceDiscount > 0"
|
|
|
+ :min="1"
|
|
|
+ :max="maxReduceDiscount"
|
|
|
+ v-model="reduceHours"
|
|
|
+ @input="reducesChange"
|
|
|
+ ></uni-number-box>
|
|
|
</div>
|
|
|
- <van-checkbox value="reduces" color="#fff"
|
|
|
- :disabled="(!isCheck('reduces') && isDiscountDisabled) || !reducesDiscount.recuceContent"
|
|
|
- :checked="isCheck('reduces')" />
|
|
|
+ <van-checkbox
|
|
|
+ value="reduces"
|
|
|
+ color="#fff"
|
|
|
+ :disabled="
|
|
|
+ (!isCheck('reduces') && isDiscountDisabled) ||
|
|
|
+ !reducesDiscount.recuceContent
|
|
|
+ "
|
|
|
+ :checked="isCheck('reduces')"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="flewx">
|
|
|
- <div class="flewx-content">合计<span style="color: #333;font-weight: 600; font-size: 36px;padding-left: 0px;">{{actualFee |
|
|
|
- currency}}</span> 元 <span style="color: #999;padding-left: 0px;font-size: 28px;">已优惠{{discountFee |
|
|
|
- currency}}元</span>
|
|
|
+ <div class="flewx-content">
|
|
|
+ 合计<span
|
|
|
+ style="
|
|
|
+ color: #333;
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 36px;
|
|
|
+ padding-left: 0px;
|
|
|
+ "
|
|
|
+ >{{ actualFee | currency }}</span
|
|
|
+ >
|
|
|
+ 元
|
|
|
+ <span style="color: #999; padding-left: 0px; font-size: 28px"
|
|
|
+ >已优惠{{ discountFee | currency }}元</span
|
|
|
+ >
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="flewx_index3"
|
|
|
- @click="confirm">确定</div>
|
|
|
+ <div class="flewx_index3" @click="confirm">确定</div>
|
|
|
</div>
|
|
|
</van-checkbox-group>
|
|
|
</scroll-view>
|
|
@@ -51,13 +97,13 @@ import { mapState } from 'vuex';
|
|
|
import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
|
|
|
import uni from '@/utils/uniHooks';
|
|
|
// const app = getApp()
|
|
|
-const app = {};
|
|
|
export default {
|
|
|
components: { uniNumberBox },
|
|
|
created() {
|
|
|
// 纸质优惠券
|
|
|
if (uni.getStorageSync('paperCouponInfo')) {
|
|
|
- this.paperCouponFee = uni.getStorageSync('paperCouponInfo').paperDiscountFee || 0;
|
|
|
+ this.paperCouponFee =
|
|
|
+ uni.getStorageSync('paperCouponInfo').paperDiscountFee || 0;
|
|
|
}
|
|
|
// 电子券
|
|
|
if (uni.getStorageSync('couponInfo')) {
|
|
@@ -72,38 +118,61 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.parkFee = JSON.parse(uni.getStorageSync('parkFee'));
|
|
|
- console.log(616161, this.parkFee)
|
|
|
+ console.log(616161, this.parkFee);
|
|
|
this.parkInfoEntity = this.parkFee.parkInfoEntity;
|
|
|
- this.parkInfoEntity.useReduceTime = this.parkInfoEntity.useReduceTime ? this.parkInfoEntity.useReduceTime : 0; // 已用优惠时长
|
|
|
- this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.remainReduceTime > 0 ? this.parkInfoEntity.remainReduceTime : 0; // 剩余可用优惠时长
|
|
|
+ this.parkInfoEntity.useReduceTime = this.parkInfoEntity.useReduceTime
|
|
|
+ ? this.parkInfoEntity.useReduceTime
|
|
|
+ : 0; // 已用优惠时长
|
|
|
+ this.parkInfoEntity.remainReduceTime =
|
|
|
+ this.parkInfoEntity.remainReduceTime > 0
|
|
|
+ ? this.parkInfoEntity.remainReduceTime
|
|
|
+ : 0; // 剩余可用优惠时长
|
|
|
this.parkMallCode = this.parkInfoEntity.parkMallCode;
|
|
|
// 浦东每次上限处理
|
|
|
- if (this.parkMallCode === 1 && this.parkInfoEntity.remainReduceTime > this.parkInfoEntity.maxonetimediscount) {
|
|
|
- this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxonetimediscount;
|
|
|
+ if (
|
|
|
+ this.parkMallCode === 1 &&
|
|
|
+ this.parkInfoEntity.remainReduceTime >
|
|
|
+ this.parkInfoEntity.maxonetimediscount
|
|
|
+ ) {
|
|
|
+ this.parkInfoEntity.remainReduceTime =
|
|
|
+ this.parkInfoEntity.maxonetimediscount;
|
|
|
}
|
|
|
|
|
|
// 沈阳上限处理
|
|
|
if (this.parkMallCode === 4) {
|
|
|
- this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour;
|
|
|
+ this.parkInfoEntity.remainReduceTime =
|
|
|
+ this.parkInfoEntity.maxOneDayHour -
|
|
|
+ this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour;
|
|
|
if (this.couponFee) {
|
|
|
- this.parkInfoEntity.remainReduceTime -= this.couponFee / this.parkInfoEntity.needmoney;
|
|
|
+ this.parkInfoEntity.remainReduceTime -=
|
|
|
+ this.couponFee / this.parkInfoEntity.needmoney;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 上限金额
|
|
|
- this.maxonetimediscountFee = this.parkInfoEntity.maxonetimediscount * this.parkInfoEntity.needmoney;
|
|
|
- this.maxonedaydiscountFee = (this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) * this.parkInfoEntity.needmoney || 0;
|
|
|
+ this.maxonetimediscountFee =
|
|
|
+ this.parkInfoEntity.maxonetimediscount * this.parkInfoEntity.needmoney;
|
|
|
+ this.maxonedaydiscountFee =
|
|
|
+ (this.parkInfoEntity.maxOneDayHour -
|
|
|
+ this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) *
|
|
|
+ this.parkInfoEntity.needmoney || 0;
|
|
|
if (this.maxonedaydiscountFee < 0) {
|
|
|
this.maxonedaydiscountFee = 0;
|
|
|
}
|
|
|
|
|
|
// 会员优惠
|
|
|
- if (this.parkFee.parkMemberOrderReducesEntityList && this.parkFee.parkMemberOrderReducesEntityList[0]) {
|
|
|
+ if (
|
|
|
+ this.parkFee.parkMemberOrderReducesEntityList &&
|
|
|
+ this.parkFee.parkMemberOrderReducesEntityList[0]
|
|
|
+ ) {
|
|
|
this.memberDiscount = this.parkFee.parkMemberOrderReducesEntityList[0];
|
|
|
}
|
|
|
|
|
|
// 消费减免
|
|
|
- if (this.parkFee.parkConsumeReducesEntityList && this.parkFee.parkConsumeReducesEntityList.length) {
|
|
|
+ if (
|
|
|
+ this.parkFee.parkConsumeReducesEntityList &&
|
|
|
+ this.parkFee.parkConsumeReducesEntityList.length
|
|
|
+ ) {
|
|
|
this.reducesDiscount = this.parkFee.parkConsumeReducesEntityList[0];
|
|
|
} else {
|
|
|
this.reducesDiscount = { consumerLimit: 0, recuceContent: 0 };
|
|
@@ -118,12 +187,13 @@ export default {
|
|
|
|
|
|
// 反显处理
|
|
|
if (this.discountTotal.consumeFee) {
|
|
|
- this.reduceHours = (this.discountTotal.consumeFee / this.parkInfoEntity.needmoney) || 0;
|
|
|
+ this.reduceHours =
|
|
|
+ this.discountTotal.consumeFee / this.parkInfoEntity.needmoney || 0;
|
|
|
}
|
|
|
const checkedList = uni.getStorageSync('checkedList');
|
|
|
if (checkedList && checkedList.length) {
|
|
|
this.checkedList = checkedList;
|
|
|
- }/* else {
|
|
|
+ } /* else {
|
|
|
if (this.memberDiscount.reduceContent > 0) {
|
|
|
// 浦东上限控制
|
|
|
if (this.parkMallCode === 1) {
|
|
@@ -147,8 +217,13 @@ export default {
|
|
|
// 浦东上限控制
|
|
|
if (this.parkMallCode === 1 || this.parkMallCode === 4) {
|
|
|
if (this.discountTotal.memberGradeFee) {
|
|
|
- this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - (this.discountTotal.memberGradeFee / this.parkInfoEntity.needmoney);
|
|
|
- if (this.parkMallCode === 4 && this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
|
|
|
+ this.maxReduceDiscount =
|
|
|
+ this.parkInfoEntity.remainReduceTime -
|
|
|
+ this.discountTotal.memberGradeFee / this.parkInfoEntity.needmoney;
|
|
|
+ if (
|
|
|
+ this.parkMallCode === 4 &&
|
|
|
+ this.maxReduceDiscount > this.reducesDiscount.recuceContent
|
|
|
+ ) {
|
|
|
this.maxReduceDiscount = this.reducesDiscount.recuceContent;
|
|
|
}
|
|
|
}
|
|
@@ -201,16 +276,22 @@ export default {
|
|
|
parkMallCode: 1, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
|
|
|
paperCouponFee: 0, // 纸质优惠金额
|
|
|
couponFee: 0, // 电子券优惠金额
|
|
|
- active: 'a'
|
|
|
- }
|
|
|
+ active: 'a',
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
// 是否显示消费减免
|
|
|
isShowReduceDiscount() {
|
|
|
- if (this.parkInfoEntity.parkMallCode === 0 || this.parkInfoEntity.parkMallCode === 1) {
|
|
|
- return this.parkInfoEntity.consumeReduce && this.reducesDiscount.consumerLimit
|
|
|
+ if (
|
|
|
+ this.parkInfoEntity.parkMallCode === 0 ||
|
|
|
+ this.parkInfoEntity.parkMallCode === 1
|
|
|
+ ) {
|
|
|
+ return (
|
|
|
+ this.parkInfoEntity.consumeReduce &&
|
|
|
+ this.reducesDiscount.consumerLimit
|
|
|
+ );
|
|
|
}
|
|
|
- return this.parkInfoEntity.consumeReduce
|
|
|
+ return this.parkInfoEntity.consumeReduce;
|
|
|
},
|
|
|
// 首停减免金额
|
|
|
firstParkDiscountFee() {
|
|
@@ -226,8 +307,16 @@ export default {
|
|
|
},
|
|
|
// 浦东有效期内消费提示
|
|
|
reduceDiscountMessage() {
|
|
|
- return this.parkInfoEntity.expirationDate + '日内消费了' + this.parkInfoEntity.totalAmont + '元,已使用' +
|
|
|
- parseInt(this.parkInfoEntity.useConsumeFee / this.parkInfoEntity.needmoney) + '小时满减抵扣。';
|
|
|
+ return (
|
|
|
+ this.parkInfoEntity.expirationDate +
|
|
|
+ '日内消费了' +
|
|
|
+ this.parkInfoEntity.totalAmont +
|
|
|
+ '元,已使用' +
|
|
|
+ parseInt(
|
|
|
+ this.parkInfoEntity.useConsumeFee / this.parkInfoEntity.needmoney
|
|
|
+ ) +
|
|
|
+ '小时满减抵扣。'
|
|
|
+ );
|
|
|
},
|
|
|
// 消费减免(拆分部分)提示文本
|
|
|
reduceSplitMessage() {
|
|
@@ -238,7 +327,11 @@ export default {
|
|
|
},
|
|
|
// 当日消费提示
|
|
|
todayReduceDiscountMessage() {
|
|
|
- if (this.parkInfoEntity.remainReduceTime || this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) {
|
|
|
+ if (
|
|
|
+ this.parkInfoEntity.remainReduceTime ||
|
|
|
+ this.parkInfoEntity.maxOneDayHour -
|
|
|
+ this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour
|
|
|
+ ) {
|
|
|
if (this.reducesDiscount.consumerLimit) {
|
|
|
if (this.parkMallCode === 0) {
|
|
|
return `今日可减免${this.reducesDiscount.recuceContent}小时`;
|
|
@@ -247,15 +340,18 @@ export default {
|
|
|
if (this.parkMallCode === 4) {
|
|
|
return `未达上限时今日可减免${this.reducesDiscount.recuceContent}小时`;
|
|
|
}
|
|
|
- if (this.reducesDiscount.recuceContent > this.parkInfoEntity.remainReduceTime) {
|
|
|
- return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。超出优惠上限,可减免${this.maxReduceDiscount}小时,${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
|
|
|
+ if (
|
|
|
+ this.reducesDiscount.recuceContent >
|
|
|
+ this.parkInfoEntity.remainReduceTime
|
|
|
+ ) {
|
|
|
+ return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。超出优惠上限,可减免${this.maxReduceDiscount}小时,${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`;
|
|
|
}
|
|
|
- return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
|
|
|
+ return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`;
|
|
|
}
|
|
|
- return '消费金额未达到最低优惠要求'
|
|
|
+ return '消费金额未达到最低优惠要求';
|
|
|
}
|
|
|
if (this.parkInfoEntity.dateReduceUpperliLimit) {
|
|
|
- return `您今日消费减免已达${this.parkInfoEntity.dateReduceUpperliLimit}小时上限`
|
|
|
+ return `您今日消费减免已达${this.parkInfoEntity.dateReduceUpperliLimit}小时上限`;
|
|
|
}
|
|
|
},
|
|
|
// 选择优惠数量
|
|
@@ -268,7 +364,7 @@ export default {
|
|
|
this.member = 0;
|
|
|
this.reduces = 0;
|
|
|
let total = 0;
|
|
|
- this.checkedList.forEach(item => {
|
|
|
+ this.checkedList.forEach((item) => {
|
|
|
this[item] = this[item + 'DiscountFee'];
|
|
|
total += this[item + 'DiscountFee'];
|
|
|
});
|
|
@@ -293,33 +389,48 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (this.parkMallCode === 4) {
|
|
|
- if (total - this.paperCouponFee - this.parkDiscountTotal.bonusfee > this.maxonedaydiscountFee) {
|
|
|
- total = this.maxonedaydiscountFee + this.parkDiscountTotal.bonusfee + this.paperCouponFee;
|
|
|
+ if (
|
|
|
+ total - this.paperCouponFee - this.parkDiscountTotal.bonusfee >
|
|
|
+ this.maxonedaydiscountFee
|
|
|
+ ) {
|
|
|
+ total =
|
|
|
+ this.maxonedaydiscountFee +
|
|
|
+ this.parkDiscountTotal.bonusfee +
|
|
|
+ this.paperCouponFee;
|
|
|
}
|
|
|
}
|
|
|
return total;
|
|
|
},
|
|
|
...mapState({
|
|
|
- custTypeId: state => state.custTypeId,
|
|
|
- groupId: state => state.groupId,
|
|
|
- })
|
|
|
+ custTypeId: (state) => state.custTypeId,
|
|
|
+ groupId: (state) => state.groupId,
|
|
|
+ }),
|
|
|
},
|
|
|
methods: {
|
|
|
// 选择回调
|
|
|
checkboxChange(e) {
|
|
|
- console.log('checkboxChange')
|
|
|
- console.log('paperCouponFee------>', this.paperCouponFee)
|
|
|
+ console.log('checkboxChange');
|
|
|
+ console.log('paperCouponFee------>', this.paperCouponFee);
|
|
|
this.checkedList = e.detail.value;
|
|
|
// 浦东上限控制
|
|
|
if (this.parkMallCode === 1) {
|
|
|
if (this.isCheck('member')) {
|
|
|
- this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
|
|
|
+ this.maxReduceDiscount =
|
|
|
+ this.parkInfoEntity.remainReduceTime -
|
|
|
+ (this.discountFee - this.paperCouponFee - this.reduces) /
|
|
|
+ this.parkInfoEntity.needmoney;
|
|
|
this.reduceHours = this.maxReduceDiscount;
|
|
|
} else {
|
|
|
if (this.isCheck('reduces')) {
|
|
|
- this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
|
|
|
+ this.maxReduceDiscount =
|
|
|
+ this.parkInfoEntity.remainReduceTime -
|
|
|
+ (this.discountFee - this.paperCouponFee - this.reduces) /
|
|
|
+ this.parkInfoEntity.needmoney;
|
|
|
} else {
|
|
|
- this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee) / this.parkInfoEntity.needmoney);
|
|
|
+ this.maxReduceDiscount =
|
|
|
+ this.parkInfoEntity.remainReduceTime -
|
|
|
+ (this.discountFee - this.paperCouponFee) /
|
|
|
+ this.parkInfoEntity.needmoney;
|
|
|
this.reduceHours = this.maxReduceDiscount;
|
|
|
}
|
|
|
}
|
|
@@ -327,7 +438,9 @@ export default {
|
|
|
// 沈阳上限控制
|
|
|
if (this.parkMallCode === 4) {
|
|
|
if (this.isCheck('member')) {
|
|
|
- this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - this.memberDiscount.reduceContent;
|
|
|
+ this.maxReduceDiscount =
|
|
|
+ this.parkInfoEntity.remainReduceTime -
|
|
|
+ this.memberDiscount.reduceContent;
|
|
|
if (this.maxReduceDiscount < 0) {
|
|
|
this.maxReduceDiscount = 0;
|
|
|
}
|
|
@@ -348,12 +461,12 @@ export default {
|
|
|
|
|
|
// 是否选中
|
|
|
isCheck(val) {
|
|
|
- return this.checkedList.findIndex(e => e == val) !== -1;
|
|
|
+ return this.checkedList.findIndex((e) => e == val) !== -1;
|
|
|
},
|
|
|
|
|
|
// 计数器回调
|
|
|
reducesChange() {
|
|
|
- console.log('reducesChange')
|
|
|
+ console.log('reducesChange');
|
|
|
if (this.isCheck('reduces')) {
|
|
|
this.crossMessage();
|
|
|
}
|
|
@@ -362,7 +475,8 @@ export default {
|
|
|
// 超限提示
|
|
|
crossMessage() {
|
|
|
let totalFee = this.parkDiscountTotal.feeCopy;
|
|
|
- const remainReduceFee = this.parkInfoEntity.remainReduceTime * this.parkInfoEntity.needmoney;
|
|
|
+ const remainReduceFee =
|
|
|
+ this.parkInfoEntity.remainReduceTime * this.parkInfoEntity.needmoney;
|
|
|
// if (this.discountTotal && this.discountTotal.fee !== 0) {
|
|
|
// totalFee += this.totalFee - this.discountTotal.fee;
|
|
|
// } else {
|
|
@@ -371,27 +485,38 @@ export default {
|
|
|
totalFee += this.totalFee;
|
|
|
// 浦东每次总优惠上限
|
|
|
this.isDiscountDisabled = false;
|
|
|
- if (this.parkMallCode === 1 && totalFee - this.paperCouponFee >= this.maxonetimediscountFee) {
|
|
|
+ if (
|
|
|
+ this.parkMallCode === 1 &&
|
|
|
+ totalFee - this.paperCouponFee >= this.maxonetimediscountFee
|
|
|
+ ) {
|
|
|
this.isDiscountDisabled = true;
|
|
|
return uni.showToast({
|
|
|
title: `超出抵扣上限,每次最高可抵扣${this.parkInfoEntity.maxonetimediscount}小时`,
|
|
|
- icon: 'none'
|
|
|
+ icon: 'none',
|
|
|
});
|
|
|
}
|
|
|
// 沈阳超限处理(maxonedaydiscountFee 会员、消费、电子券减免)
|
|
|
- if (this.parkMallCode === 4 && totalFee - this.paperCouponFee - this.parkDiscountTotal.bonusfee >= this.maxonedaydiscountFee) {
|
|
|
+ if (
|
|
|
+ this.parkMallCode === 4 &&
|
|
|
+ totalFee - this.paperCouponFee - this.parkDiscountTotal.bonusfee >=
|
|
|
+ this.maxonedaydiscountFee
|
|
|
+ ) {
|
|
|
this.isDiscountDisabled = true;
|
|
|
return uni.showToast({
|
|
|
title: `(会员等级、消费、电子券)每日最高可抵扣${this.parkInfoEntity.maxOneDayHour}小时`,
|
|
|
- icon: 'none'
|
|
|
+ icon: 'none',
|
|
|
});
|
|
|
}
|
|
|
// 消费每天优惠上限(非浦东、沈阳)
|
|
|
- if (this.parkMallCode !== 1 && this.parkMallCode !== 4 && this.reduces > remainReduceFee) {
|
|
|
+ if (
|
|
|
+ this.parkMallCode !== 1 &&
|
|
|
+ this.parkMallCode !== 4 &&
|
|
|
+ this.reduces > remainReduceFee
|
|
|
+ ) {
|
|
|
this.reduces = remainReduceFee;
|
|
|
return uni.showToast({
|
|
|
title: `超出抵扣上限,消费减免每天最高可抵扣${this.parkInfoEntity.dateReduceUpperliLimit}小时,可使用${this.parkInfoEntity.remainReduceTime}小时`,
|
|
|
- icon: 'none'
|
|
|
+ icon: 'none',
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -399,7 +524,8 @@ export default {
|
|
|
// 确认
|
|
|
confirm() {
|
|
|
// 计算单价
|
|
|
- const cost = this.reducesDiscount.consumerLimit / this.reducesDiscount.recuceContent;
|
|
|
+ const cost =
|
|
|
+ this.reducesDiscount.consumerLimit / this.reducesDiscount.recuceContent;
|
|
|
// 算出消费减免在哪个档
|
|
|
let useConsumeFee = 0;
|
|
|
if (this.reduces) {
|
|
@@ -417,13 +543,12 @@ export default {
|
|
|
consumeFee: this.reduces,
|
|
|
useConsumeFee: useConsumeFee,
|
|
|
time: this.totalTime,
|
|
|
- fee: this.totalFee
|
|
|
+ fee: this.totalFee,
|
|
|
});
|
|
|
this.$router.back();
|
|
|
},
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -434,11 +559,11 @@ export default {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
height: 100vh;
|
|
|
- background: #F4F7FF;
|
|
|
+ background: #f4f7ff;
|
|
|
}
|
|
|
|
|
|
.container {
|
|
|
- background-color: #FAFBFF;
|
|
|
+ background-color: #fafbff;
|
|
|
width: calc(100% - 100px);
|
|
|
margin: 30px;
|
|
|
padding-left: 40px;
|
|
@@ -448,7 +573,7 @@ export default {
|
|
|
line-height: 70px;
|
|
|
position: relative;
|
|
|
height: inherit;
|
|
|
- border: 1px solid #D8DAE0;
|
|
|
+ border: 1px solid #d8dae0;
|
|
|
|
|
|
.item {
|
|
|
width: 570px;
|
|
@@ -475,7 +600,7 @@ export default {
|
|
|
.page_img {
|
|
|
width: 49px;
|
|
|
height: 49px;
|
|
|
- border: 1px solid #E6E6E6;
|
|
|
+ border: 1px solid #e6e6e6;
|
|
|
border-radius: 50%;
|
|
|
overflow: hidden;
|
|
|
|
|
@@ -515,18 +640,18 @@ export default {
|
|
|
line-height: 70px;
|
|
|
color: #fff;
|
|
|
// background-image: linear-gradient(to right, #7e4fa1, #433c7f);
|
|
|
- background: #064C8A;
|
|
|
+ background: #064c8a;
|
|
|
box-shadow: 2px 3px 5px #888888;
|
|
|
position: absolute;
|
|
|
right: 16px;
|
|
|
}
|
|
|
|
|
|
.blue_flewx_index3 {
|
|
|
- .color-background-color('blue')
|
|
|
+ .color-background-color('blue');
|
|
|
}
|
|
|
|
|
|
.green_flewx_index3 {
|
|
|
- .color-background-color('green')
|
|
|
+ .color-background-color('green');
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -540,6 +665,3 @@ export default {
|
|
|
border-radius: 50% !important;
|
|
|
}
|
|
|
</style>
|
|
|
-
|
|
|
-
|
|
|
-
|