Browse Source

共省钱xx元,退款控制

zhengkaixin 1 month ago
parent
commit
5807dcd5b7

+ 2 - 2
pages/cardBag/cardBag.vue

@@ -80,8 +80,8 @@
 							</view>
 							</view>
 							
 							
 							<view class="electric-quantity" v-if="item.classify==2&&(item.chargeDegreeLimit==0)">
 							<view class="electric-quantity" v-if="item.classify==2&&(item.chargeDegreeLimit==0)">
-								已用x次 /
-								共省x
+								已用{{item.saveInformation.num}}次 /
+								共省{{item.saveInformation.saveMoney}}
 							</view>
 							</view>
 						</template>
 						</template>
 
 

+ 4 - 3
pages/cardBag/cardDetail.vue

@@ -96,9 +96,10 @@
 					<view class="electric-quantity" v-if="regUserCard.classify==2&&(regUserCard.chargeDegreeLimit!=0)">
 					<view class="electric-quantity" v-if="regUserCard.classify==2&&(regUserCard.chargeDegreeLimit!=0)">
 						已用{{regUserCard.chargedDegree}}度 / 共{{regUserCard.chargeDegreeLimit}}度
 						已用{{regUserCard.chargedDegree}}度 / 共{{regUserCard.chargeDegreeLimit}}度
 					</view>
 					</view>
-					<view class="electric-quantity" v-if="item.classify==2&&(regUserCard.chargeDegreeLimit==0)">
-						已用x次 /
-						共省x元
+					<view class="electric-quantity" v-if="item.classify==2&&(regUserCard.chargeDegreeLimit==0)&&regUserCard.saveInformation">
+						
+						已用{{regUserCard.saveInformation.num}}次 /
+						共省{{regUserCard.saveInformation.saveMoney}}元
 					</view>
 					</view>
 					
 					
 				</view>
 				</view>

+ 6 - 1
pages/searchPile/chargeProcess/charge.vue

@@ -288,9 +288,14 @@
 					</view>
 					</view>
 					<view  class="cardListText" v-if="item.classify==2" >
 					<view  class="cardListText" v-if="item.classify==2" >
 						
 						
-						<view>
+						<view v-if="item.chargeDegreeLimit">
 							已用{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度 / 共{{item.chargeDegreeLimit}}度
 							已用{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度 / 共{{item.chargeDegreeLimit}}度
 						</view>
 						</view>
+						<view  v-if="item.chargeDegreeLimit==0&&item.saveInformation">
+							已用{{item.saveInformation.num}}次 /
+							共省{{item.saveInformation.saveMoney}}元
+						</view>
+						
 						<view>
 						<view>
 							{{thisendTime(item.endTime)}}到期
 							{{thisendTime(item.endTime)}}到期
 						</view>
 						</view>

+ 25 - 9
pages/searchPile/stationAndPile/charging/chargingPileDetails.vue

@@ -341,10 +341,14 @@
 							<view class="time">
 							<view class="time">
 								{{thisendTime(userCard.endTime)}}到期 | 剩余{{setValidity(thisdaysDistance(userCard.endTime))}}
 								{{thisendTime(userCard.endTime)}}到期 | 剩余{{setValidity(thisdaysDistance(userCard.endTime))}}
 							</view>
 							</view>
-							<view class="electric-quantity">
+							<view class="electric-quantity" v-if="userCard.chargeDegreeLimit">
 								已用{{userCard.chargedDegree?userCard.chargedDegree.toFixed(0):0.00}}度 /
 								已用{{userCard.chargedDegree?userCard.chargedDegree.toFixed(0):0.00}}度 /
 								共{{userCard.chargeDegreeLimit}}度
 								共{{userCard.chargeDegreeLimit}}度
 							</view>
 							</view>
+							<view class="electric-quantity" v-if="userCard.chargeDegreeLimit==0&&userCard.saveInformation">
+								已用{{userCard.saveInformation.num}}次 /
+								共省{{userCard.saveInformation.saveMoney}}元
+							</view>
 						</view>
 						</view>
 						<u-line-progress :show-percent="false" active-color="#2979ff" :percent="thispercent(userCard)">
 						<u-line-progress :show-percent="false" active-color="#2979ff" :percent="thispercent(userCard)">
 						</u-line-progress>
 						</u-line-progress>
@@ -1275,15 +1279,27 @@
 				return ''
 				return ''
 			},
 			},
 			thispercent(userCard) {
 			thispercent(userCard) {
-				var p = 0
-
-				if (userCard && userCard.chargeDegreeLimit) {
-					p = userCard.chargedDegree / userCard.chargeDegreeLimit * 100
-				}
-				if (p > 100) {
-					p = 100
+				if(userCard.classify==1||(userCard.classify==2&&userCard.chargeDegreeLimit==0)){
+					var k1=daysDistance(userCard.startTime, userCard.endTime)
+					var k2=this.thisdaysDistance(userCard.endTime)
+					var p=(k1-k2)/k2* 100
+					if (p > 100) {
+						p = 100
+					}
+					return p.toFixed(0)
+				}else if(userCard.classify==2){
+					var p = 0
+					
+					if (userCard && userCard.chargeDegreeLimit) {
+						p = userCard.chargedDegree / userCard.chargeDegreeLimit * 100
+					}
+					if (p > 100) {
+						p = 100
+					}
+					return p.toFixed(0)
+				}else{
+					return 0
 				}
 				}
-				return p.toFixed(0)
 			},
 			},
 			carTempBlInit() {
 			carTempBlInit() {
 				var aaa = this.$refs.uKeyboard.changeCarInputValue();
 				var aaa = this.$refs.uKeyboard.changeCarInputValue();

+ 26 - 9
pages/searchPile/stationAndPile/stationDetails.vue

@@ -567,9 +567,14 @@
 
 
 								<view class="unit"><span>{{thisendTime(userCard.endTime)}} 到期</span></view>
 								<view class="unit"><span>{{thisendTime(userCard.endTime)}} 到期</span></view>
 
 
-								<view class="unit">
+								<view class="unit" v-if="userCard.chargeDegreeLimit">
 									<span>已用{{userCard.chargedDegree?userCard.chargedDegree.toFixed(0):0.00}}度 /
 									<span>已用{{userCard.chargedDegree?userCard.chargedDegree.toFixed(0):0.00}}度 /
 										共{{userCard.chargeDegreeLimit}}度</span></view>
 										共{{userCard.chargeDegreeLimit}}度</span></view>
+										
+								<view class="unit" v-if="userCard.chargeDegreeLimit==0&&userCard.saveInformation">
+											<span>已用{{userCard.saveInformation.num}}次 /
+											共省{{userCard.saveInformation.saveMoney}}元</span>
+								</view>
 								<u-line-progress :show-percent="false" active-color="#2979ff"
 								<u-line-progress :show-percent="false" active-color="#2979ff"
 									:percent="thispercent(userCard)"></u-line-progress>
 									:percent="thispercent(userCard)"></u-line-progress>
 
 
@@ -1166,15 +1171,27 @@
 				return ''
 				return ''
 			},
 			},
 			thispercent(userCard) {
 			thispercent(userCard) {
-				var p = 0
-
-				if (userCard && userCard.chargeDegreeLimit) {
-					p = userCard.chargedDegree / userCard.chargeDegreeLimit * 100
-				}
-				if (p > 100) {
-					p = 100
+				if(userCard.classify==1||(userCard.classify==2&&userCard.chargeDegreeLimit==0)){
+					var k1=daysDistance(userCard.startTime, userCard.endTime)
+					var k2=this.thisdaysDistance(userCard.endTime)
+					var p=(k1-k2)/k2* 100
+					if (p > 100) {
+						p = 100
+					}
+					return p.toFixed(0)
+				}else if(userCard.classify==2){
+					var p = 0
+					
+					if (userCard && userCard.chargeDegreeLimit) {
+						p = userCard.chargedDegree / userCard.chargeDegreeLimit * 100
+					}
+					if (p > 100) {
+						p = 100
+					}
+					return p.toFixed(0)
+				}else{
+					return 0
 				}
 				}
-				return p.toFixed(0)
 			},
 			},
 			getpilestate() {
 			getpilestate() {
 				var num1 = 0
 				var num1 = 0

+ 14 - 11
pages/temporary/activity20250501.vue

@@ -21,9 +21,9 @@
 
 
 
 
 								<view class="view312">
 								<view class="view312">
-									{{item.numz}}折
+									{{item.numz/10}}折
 								</view>
 								</view>
-								<view class="view311">
+								<view class="view311" v-if="item.giftMemberLevelDuration==180">
 									半年卡
 									半年卡
 								</view>
 								</view>
 								<view class="view311">
 								<view class="view311">
@@ -31,7 +31,7 @@
 								</view>
 								</view>
 							</view>
 							</view>
 
 
-							<view class="view33">
+							<view class="view33" v-if="item.giftMemberLevelDuration==180">
 								有效期180天
 								有效期180天
 							</view>
 							</view>
 						</view>
 						</view>
@@ -56,7 +56,7 @@
 					<tr v-for="(item,i) in moneyList" :key="i">
 					<tr v-for="(item,i) in moneyList" :key="i">
 						<td >{{item.amountDesc}}</td>
 						<td >{{item.amountDesc}}</td>
 						<td>{{item.amountRemark}}</td>
 						<td>{{item.amountRemark}}</td>
-						<td class="jz">180天</td>
+						<td class="jz">{{item.giftMemberLevelDuration}}天</td>
 					</tr>
 					</tr>
 				
 				
 
 
@@ -148,13 +148,16 @@
 					var list= res.data.chargingMarketingList
 					var list= res.data.chargingMarketingList
 					for(var i in list){
 					for(var i in list){
 						var item=list[i]
 						var item=list[i]
-						if(item.amountRemark){
-							item.numz=item.amountRemark.substring(1,item.amountRemark.indexOf('折'))
-							if(item.amountRemark.indexOf('、')!=-1){
-								item.text=item.amountRemark.substring(item.amountRemark.indexOf('、')+1)
-							}else{
-								item.text=""
-							}
+						if(item.amountRemark&&item.marketingCardList.length){
+							var mk=item.marketingCardList[0]
+							item.numz=mk.serviceFeeDiscountRate
+							item.text=mk.giftMemberLevelStr
+							item.giftMemberLevelDuration=mk.giftMemberLevelDuration;
+							// if(item.amountRemark.indexOf('、')!=-1){
+							// 	item.text=item.amountRemark.substring(item.amountRemark.indexOf('、')+1)
+							// }else{
+							// 	item.text=""
+							// }
 							
 							
 							
 							
 							this.moneyList.push(item)
 							this.moneyList.push(item)

+ 5 - 7
pages/user/finance/recharge.vue

@@ -365,15 +365,13 @@
 							// this.moneyActiveClass = this.moneyList[i].id
 							// this.moneyActiveClass = this.moneyList[i].id
 							this.moneyClick(item.id,item)
 							this.moneyClick(item.id,item)
 						}
 						}
-						if(item.amountRemark){
-							item.amountRemarkNum=item.amountRemark.substring(1,item.amountRemark.indexOf('折'))
+						if(item.amountRemark&&item.marketingCardList.length){
+							var mk=item.marketingCardList[0]
+							
+							item.amountRemarkNum=mk.serviceFeeDiscountRate/10
 							item.amountRemarkHtml=item.amountRemark.substring(item.amountRemark.indexOf('折'))
 							item.amountRemarkHtml=item.amountRemark.substring(item.amountRemark.indexOf('折'))
+							item.amountRemarkSf=mk.giftMemberLevelStr
 							
 							
-							if(item.amountRemark.indexOf('、')!=-1){
-								item.amountRemarkSf=item.amountRemark.substring(item.amountRemark.indexOf('、')+1)
-							}else{
-								item.amountRemarkSf=""
-							}
 							
 							
 						}
 						}
 						
 						

+ 32 - 8
pages/user/finance/refundList.vue

@@ -59,15 +59,19 @@
 				<view class="slot-content">
 				<view class="slot-content">
 					<rich-text :nodes="content2"></rich-text>
 					<rich-text :nodes="content2"></rich-text>
 				</view>
 				</view>
+			</u-modal> 
+			<u-modal v-model="showtip3" :title="title" :show-confirm-button="true" confirm-text="知道了" confirm-color="#00B962">
+				<view class="slot-content">
+					<rich-text :nodes="content3"></rich-text>
+				</view>
 			</u-modal> 
 			</u-modal> 
 		</view>
 		</view>
 				
 				
 		<view style="bottom:0;position:absolute;width: 100%;padding: 40rpx;" v-show="account.availableAmount>0">
 		<view style="bottom:0;position:absolute;width: 100%;padding: 40rpx;" v-show="account.availableAmount>0">
 			
 			
-			<u-button shape="circle"  v-if="account.availableAmountIncome"
+			<u-button shape="circle" 
 			  style="background-color:#00b962;color:white" @click="gotoRefundInfo()">申请退款</u-button>
 			  style="background-color:#00b962;color:white" @click="gotoRefundInfo()">申请退款</u-button>
 			  
 			  
-			<u-button shape="circle" v-else   style="background-color:#00b962;color:white" @click="show=true">申请退款</u-button>
 			  
 			  
 		</view>
 		</view>
 	</view>
 	</view>
@@ -79,7 +83,9 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				elderMode:false,
+				elderMode:false,
+				content3:`当前金额不可退,原因:活动充值金额未清空`,
+				
 				content2:`首次申请现金分红退费需填写收款人账户信息,申请成功后工作人员将在5~10个工作日内完成转账打款。`,
 				content2:`首次申请现金分红退费需填写收款人账户信息,申请成功后工作人员将在5~10个工作日内完成转账打款。`,
 				
 				
 				content1:`本平台仅支持充值金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费.<br />退费成功后,您可以在退费记录查看退费信息和审核进度.`,
 				content1:`本平台仅支持充值金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费.<br />退费成功后,您可以在退费记录查看退费信息和审核进度.`,
@@ -87,7 +93,8 @@
 				content:'是否确定提交退费申请?申请成功后退费金额将于5个工作日内退还至您的充值账户',
 				content:'是否确定提交退费申请?申请成功后退费金额将于5个工作日内退还至您的充值账户',
 				show:false,
 				show:false,
 				showtip:false,
 				showtip:false,
-				showtip2:false,
+				showtip2:false,
+				showtip3:false,
 				userId:'',
 				userId:'',
 				account:{},
 				account:{},
 				items:[],
 				items:[],
@@ -158,10 +165,27 @@
 			});
 			});
 		},
 		},
 		methods: {
 		methods: {
-			gotoRefundInfo(){
-				uni.redirectTo({
-					url:'/pages/user/finance/refundInfo'
-				})
+			gotoRefundInfo(){
+				if(this.account.availableAmount<=0){
+					uni.showToast({
+						title: "当前可退金额为0",
+						icon: "none"
+					})
+					return
+				}
+				if(!this.account.canRefund){
+					this.showtip3=true
+					return
+				}
+				
+				if(this.account.availableAmountIncome){
+					uni.redirectTo({
+						url:'/pages/user/finance/refundInfo'
+					})
+				}else{
+					this.show=true
+				}
+				
 			},
 			},
 			theme(type) {
 			theme(type) {
 			  if(type == 'elder')	
 			  if(type == 'elder')