Commit 2c75d509 by zhangzhen

功能完善

parent 98e45b11
......@@ -213,6 +213,30 @@
<text>/小时</text>
</view>
</view>
<view v-if="userInfo && (userInfo.secondaryCardList || userInfo.monthlyCardList) && radioChecked" class="flex-col card-use">
<text class="text-black text-left">专属权益</text>
<view class="radio-group-box">
<radio-group class="radio-group" @change="onRadioChange">
<label v-if="userInfo.secondaryCardList" class="flex-between">
<view>次卡(剩余{{userInfo.secondaryCardList[0].number}}次)</view>
<view class="flex-row-center" >
<text>请选择</text>
<radio class='pink radio' value="secondaryCard" :checked="radioChecked=='secondaryCard'?true:false" style="transform:scale(0.7)" />
</view>
</label >
<label v-if="userInfo.monthlyCardList" class="flex-between">
<view>月卡</view>
<view class="flex-row-center" >
<text>请选择</text>
<radio class='pink radio' value="monthlyCard" :checked="radioChecked=='monthlyCard'?true:false" style="transform:scale(0.7)" />
</view>
</label >
</radio-group>
</view>
</view>
<view class="flex-between price use-coupon-box">
<text
class="text-black text-left">{{useCouponList[selectCouponIndex].couponType==2? '团购券':'优惠券'}}</text>
......@@ -441,6 +465,7 @@
images: [],
status: 0
},
userInfo:'',
startTime: moment().format("HH:mm"),
endTime: '',
dateIndex: 0,
......@@ -561,7 +586,8 @@
tipErrMsg: '',
warnTip:'',
activityDate:{},
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30,
radioChecked:''
};
},
filters: {
......@@ -608,6 +634,11 @@
}
},
methods: {
onRadioChange(e){
console.log(e,9999)
this.radioChecked = e.target.value;
this.onComputePrice();
},
// 日期切换
onDateChange(k) {
if (this.dateIndex === k || this.orderType ==2) return;
......@@ -1222,6 +1253,9 @@
// uni.showLoading({
// title: "加载中..."
// })
this.userInfo = uni.getStorageSync("userInfo")||''
let params = {
storeId: this.roomInfo.storeId,
roomId: this.roomInfo.id,
......@@ -1233,6 +1267,8 @@
orderMode: this.modeIndex2 >= 0 || (this.modeIndex>=0 && this.roomLabelList.length && this.roomLabelList[this.modeIndex].openPack==1)? 1 : 0,
packId: this.modeIndex2 >= 0 ? this.packageMode[this.modeIndex2].id : this.modeIndex>=0 && this.roomLabelList.length && this.roomLabelList[this.modeIndex].openPack==1? this.roomLabelList[this.modeIndex].packId : '',
roomLabelId : this.modeIndex >= 0 ? this.roomLabelList[this.modeIndex].id : '',
secondaryCardId: this.userInfo && this.userInfo.secondaryCardList && this.userInfo.secondaryCardList.length && (!this.radioChecked || this.radioChecked==='secondaryCard') ? this.userInfo.secondaryCardList[0].id:'',
monthlyCardId: this.userInfo && this.userInfo.monthlyCardList && this.userInfo.monthlyCardList.length && (!this.radioChecked || this.radioChecked==='monthlyCard')? this.userInfo.monthlyCardList[0].id:''
}
computePrice(params).then(res => {
......@@ -1250,7 +1286,12 @@
this.computePriceInfo = {
...obj,
discountText
} ;
};
if(!this.radioChecked && this.computePriceInfo.secondaryCardId){
this.radioChecked = "secondaryCard"
}else if(!this.radioChecked && this.computePriceInfo.monthlyCardId){
this.radioChecked = "monthlyCard"
}
} else {
uni.showToast({
icon: "none",
......@@ -1456,7 +1497,9 @@
roomLabelId: this.modeIndex >= 0 ? this.roomLabelList[this.modeIndex].id : '',
discountRatio: this.computePriceInfo.discountRatio,
balance: this.computePriceInfo.balance,
duration: this.computePriceInfo.duration
duration: this.computePriceInfo.duration,
secondaryCardId: this.userInfo && this.userInfo.secondaryCardList && this.userInfo.secondaryCardList.length && this.radioChecked==='secondaryCard' ? this.userInfo.secondaryCardList[0].id:'',
monthlyCardId: this.userInfo && this.userInfo.monthlyCardList && this.userInfo.monthlyCardList.length && this.radioChecked==='monthlyCard'? this.userInfo.monthlyCardList[0].id:''
}
if (this.orderType === 2 && this.preOrderNo) {
params.preOrderNo = this.preOrderNo
......@@ -2699,4 +2742,20 @@
}
}
}
.card-use{
display: flex;
flex-direction: column;
width: 100%;
padding: 15upx 30upx;
.radio-group-box{
width: 100%;
margin-top: 15upx;
border-radius: 12upx;
padding: 15upx 24upx;
box-shadow: 0 0 12upx rgba(255, 170, 255, 0.8);
.radio-group{
width: 100%;
}
}
}
</style>
\ No newline at end of file
......@@ -79,19 +79,19 @@
</view>
</view>
<view class="flex-col">
<text class="text-black text-bold">用户充值</text>
<text class="text-black text-xl text-bold">{{statisticsData.rechargeFee || 0}}</text>
<text class="text-black text-bold">充值余额消费</text>
<text class="text-black text-xl text-bold">{{statisticsData.rechargeBalance || 0}}</text>
<view class="flex-row-center">
<text class="text-black">退款</text>
<text class="text-pink text-lg">{{statisticsData.rechargeRefundFee || 0}}</text>
<text class="text-pink text-lg">{{statisticsData.rechargeBalanceRefundFee || 0}}</text>
</view>
</view>
<view class="flex-col">
<text class="text-black text-bold">充值余额支付</text>
<text class="text-black text-xl text-bold">{{statisticsData.rechargeBalance || 0}}</text>
<text class="text-gray text-bold">赠送余额消费</text>
<text class="text-black text-xl text-bold">{{statisticsData.rechargeFee || 0}}</text>
<view class="flex-row-center">
<text class="text-black">退款</text>
<text class="text-pink text-lg">{{statisticsData.rechargeBalanceRefundFee || 0}}</text>
<text class="text-blue text-lg">{{statisticsData.rechargeRefundFee || 0}}</text>
</view>
</view>
<view class="flex-col">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment