zhengkaixin 1 år sedan
förälder
incheckning
2f99da80b0

+ 2 - 2
.env.dev.js

@@ -2,9 +2,9 @@ const UNI_APP = {
 	ProjectName :"51充电联盟",
 	BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
 
-	BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
 
-	//BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
+	BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
 	//PARK_URL: 'http://192.168.11.120:8082/charging-parking/' ,
 	PARK_URL: 'https://51team.xiaoxinda.com/charging-parking/' ,
 	XPGJ_URL: 'https://xpgjapi.xiaoxinda.com/' ,

+ 16 - 0
apis/index.js

@@ -224,4 +224,20 @@ export function changeQuickCharging(data) {
 		data: data,
 		url: '/mobile/regUser/changeQuickCharging'
 	})
+}
+
+
+export function rechargeAmountRecordList(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/accountRecord/rechargeAmountRecordList'
+	})
+}
+export function rechargeAmountRecordDetail(data) {
+	return request({
+		method: 'get',
+		data: data,
+		url: '/mobile/accountRecord/rechargeAmountRecordDetail'
+	})
 }

+ 8 - 0
pages.json

@@ -845,6 +845,14 @@
         	"style" : 
         	{
         		
+        		"enablePullDownRefresh" : false
+        	}
+        },
+        {
+        	"path" : "pages/user/finance/refundInfo",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "",
         		"enablePullDownRefresh" : false
         	}
         }

+ 85 - 21
pages/searchPile/chargeProcess/charge.vue

@@ -57,9 +57,9 @@
 
 
 
-			<view class="card" @click="paySelectMethod(1)" :class="{
-				cardselect:payValue==1,
-				cardno:payValue!=1
+			<view class="card" @click="paySelectMethod(paySelectMethodValue)" :class="{
+				cardselect:payValue==1||payValue==4,
+				cardno:!(payValue==1||payValue==4)
 			}">
 				<view class="cardgo">
 					<view class="cardinfo">
@@ -70,11 +70,35 @@
 				</view>
 				<view class="title">会员账户余额充电</view>
 
-				<p>当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元
+				<p v-show="!chargingFundsBl&&!(payValue==1||payValue==4)">当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元
 					<span @click="paySelectShow()" style="color:#00B962;margin-left: 20px; ">去充值></span>
 
-				</p>
-				<view class="rechargeMain" v-show="payValue==1">
+				</p>
+				<p  v-show="(payValue==1||payValue==4)">优先使用付款方式
+					<span @click="paySelectShow()" style="color:#00B962;margin-left: 20px; ">去充值></span>
+					
+					
+				</p>
+				<view class="rechargeBalance"  v-if="chargingFundsBl" >
+					<view class="rechargeBalanceItem">账户余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</view>
+					<view class="rechargeBalanceItem" v-if="chargingFundsBl">|</view>
+					<view class="rechargeBalanceItem"  v-if="chargingFundsBl" >充电金{{user.chargingFunds>0?user.chargingFunds.toFixed(2):'0.00'}}元</view>
+				</view>
+				<view class="rechargeMain" v-if="chargingFundsBl" v-show="payValue==1||payValue==4">
+					
+					<view 
+						class=" recharge-item  "   @click="paySelectMethodValue=1"  :class="payValue == 1? 'active' : ''" >
+						账户余额
+					</view>
+					<view
+						class=" recharge-item  "   @click="paySelectMethodValue=4"  :class="payValue == 4? 'active' : ''">
+						充电金
+					</view>
+				</view>
+				<p v-if="chargingFundsBl" v-show="(payValue==1||payValue==4)" >充电时长</p>
+				<view class="rechargeMain" v-show="payValue==1||payValue==4">
+					
+					
 					<view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''"
 						class=" recharge-item  ">
 						充满自停
@@ -205,8 +229,10 @@
 				</template>
 
 			</view>
-			<view v-if="cardList.length" class="cardListView">
-				<view  class="cardListItemTitle" v-if="cardList.length>1" >点击切换其他卡</view>
+
+			<view v-if="cardList.length&&userCard&&(payValue=='1'||payValue=='4')" class="cardListView">
+				<view  class="cardListItemTitle"  v-if="cardList.length>1" >点击切换其他卡</view>
+
 				<view  class="cardListItem" v-for="(item,i) in cardList" 
 				 :key="i"  :class="{
 					 select:userCard.id==item.id
@@ -220,7 +246,7 @@
 						<view>充电服务费全免</view>
 						
 						<view>
-							|{{thisendTime(item.endTime)}}到期
+							{{thisendTime(item.endTime)}}到期
 						</view>
 					</view>
 					<view  class="cardListText" v-if="item.classify==2" >
@@ -229,7 +255,7 @@
 							已用{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度 / 共{{item.chargeDegreeLimit}}度
 						</view>
 						<view>
-							|{{thisendTime(item.endTime)}}到期
+							{{thisendTime(item.endTime)}}到期
 						</view>
 					</view>
 				</view>
@@ -320,7 +346,7 @@
 
 		</u-popup>
 		<!-- 弹窗2 -->
-		<template>
+		<!-- <template>
 			<view>
 				<u-popup v-model="paySelect" mode="bottom">
 					<view class="paySelect">
@@ -361,7 +387,7 @@
 				</u-popup>
 
 			</view>
-		</template>
+		</template> -->
 		<!-- 弹窗 -->
 		<template>
 			<view>
@@ -441,6 +467,7 @@
 	} from '@/utils'
 	
 	import * as Pay from '@/apis/weixin.js'
+// import { contentStore } from 'core/core.model'
 
 
 
@@ -488,7 +515,7 @@
 				otherNum_f: '',
 				otherNum: '',
 				moneyList_f: [],
-				paySelect: false,
+				paySelect: true,
 				payName: "",
 				payValueTemp: 0,
 				payValue: 0,
@@ -507,6 +534,16 @@
 					tips: "账户余额:99999元",
 					value: "3",
 					select: false,
+				}, {
+					name: "充电金",
+					tips: "账户余额:99999元",
+					value: "4",
+					select: false,
+				}, {
+					name: "充电金",
+					tips: "账户余额:99999元",
+					value: "4",
+					select: false,
 				}],
 				moneyList: [
 
@@ -555,7 +592,12 @@
 				carNumber: "",
 				show3: false,
 				cardList:[],
+
 				startMode:"",
+
+				paySelectMethodValue:1,
+				chargingFundsBl:false,
+
 			}
 		},
 		computed: {
@@ -624,7 +666,14 @@
 				if (payValueDefault == "1" || payValueDefault == "0") {
 					this.payValue = payValueDefault;
 				}
-
+				if (payValueDefault == "1" || payValueDefault == "4") {
+					this.paySelectMethodValue = payValueDefault;
+					this.payValue = payValueDefault;
+				}
+				
+				if(payValueDefault==4){
+					this.chargingFundsBl=true;
+				}
 			}
 			this.payName = this.payList[this.payValue].name;
 
@@ -706,7 +755,8 @@
 			paySelectCompany() {
 
 			},
-			paySelectMethod(value, company) {
+			paySelectMethod(value, company) {
+				console.log(value)
 				if (this.personInfo.userType == "1") {
 					uni.showToast({
 						title: "游客模式只支持“先付后退”"
@@ -723,9 +773,10 @@
 
 							this.companyPaySelect.car = company.carList[0].carNum;
 						}
-					}
+					}
+					this.$forceUpdate()
 				}
-				console.log(this.companyPaySelect)
+				
 
 			},
 			moneyClick_f(index, item) {
@@ -1025,7 +1076,7 @@
 			confirm() {
 
 				////(JSON.stringify(this.submitForm))
-				if (this.payValue == 1) {
+				if (this.payValue == 1||this.payValue == 4) {
 					if (this.selectObj.id) {
 						this.submitForm.userCouponId = this.selectObj.id
 					}
@@ -1139,12 +1190,17 @@
 					this.userCard = res.data.regUserCard
 					this.canUse = res.data.canUse
 					//this.user = res.data
-
+				
 
 					API.personalCenter({
 						stationId: this.stationId
 					}).then((res2) => {
-						this.user = res2.data
+						this.user = res2.data
+						
+						if(this.user.chargingFunds){
+							this.chargingFundsBl=true;
+						}
+						
 						var entRegList = res2.data.entRegList;
 						this.companyList = []
 
@@ -1926,5 +1982,13 @@
 				background-color:  #00b962;
 				color:#fff;
 			}
-	}
+	}
+	.rechargeBalance{
+		display: flex;
+		.rechargeBalanceItem{
+			margin-right: 6px;
+			    color: #666;
+		}
+	}
+	
 </style>

+ 10 - 1
pages/searchPile/chargeProcess/dcCharging.vue

@@ -280,7 +280,16 @@
 							预充金额(元)
 						</view>
 					</view>
-
+					<view class="info-item" v-if="chargingRecord.payType==4">
+						<view class="content" v-if="detail.chargingFunds>0||detail.chargingFunds==0">
+						
+							{{detail.chargingFunds>0&&chargingRecord.dueFee?((detail.chargingFunds*1000-chargingRecord.dueFee*1000)/1000).toFixed(2):detail.chargingFunds.toFixed(2)}}
+						
+						</view>
+						<view class="name">
+							充电金(元)
+						</view>
+					</view>
 					<view class="info-item" v-else>
 						<view class="content" v-if="detail.balance>0||detail.balance==0">
 

+ 87 - 35
pages/user/finance/balance.vue

@@ -2,56 +2,78 @@
 	<view>
 		<ujp-navbar title="我的余额">
 			<view class="slot-wrap">
-				<span class="navBtn oldTextjp2" oldstyle="font-size: 16px;" @click="toRefundList">退余额</span>
+				<span class="navBtn oldTextjp222" oldstyle="font-size: 16px;" @click="toRefundList">退余额</span>
 			</view>
 		</ujp-navbar>
+		
+		<u-modal v-model="show" :confirm-text="confirmText" confirm-color="#00B962">
+			<view class="slot-content">
+				<rich-text :nodes="content"></rich-text>
+			</view>
+		</u-modal>
+		<u-modal v-model="show2" :confirm-text="confirmText" confirm-color="#00B962">
+			<view class="slot-content">
+				<rich-text :nodes="content2"></rich-text>
+			</view>
+		</u-modal>
 		<view class="balance">
 			<view class="balanceHead">
 				<view class="balanceCard">
 					<view class="balanceCard-head">
-						<font>总金额</font><u-icon name="question-line" custom-prefix="custom-icon" color="#fff" size="32" @click="show=true"></u-icon>
-					</view>
-					<view>
-						<u-modal v-model="show" :confirm-text="confirmText" confirm-color="#00B962">
-							<view class="slot-content">
-								<rich-text :nodes="content"></rich-text>
+						<view class="balanceCard-head-item">
+							<view>
+								总金额(元)<u-icon name="question-line" custom-prefix="custom-icon" color="#fff" size="36" @click="show=true"></u-icon>
+							</view>
+							<view class="h2" v-if="personAccount.availableAmount != null">{{personAccount.availableAmount.toFixed(2)}}</view>
+						</view>
+						<view  class="balanceCard-head-item"  v-if="personAccount.chargingFunds" >
+							<view>
+								充电金(元)<u-icon name="question-line" custom-prefix="custom-icon" color="#fff" size="36" @click="show2=true"></u-icon>
 							</view>
-						</u-modal>
+							
+							<view class="h2" v-if="personAccount.chargingFunds != null">{{personAccount.chargingFunds.toFixed(2)}}</view>
+							
+						</view>
 					</view>
-					<view class="balanceCard-main oldTextjp2" oldstyle="font-size: 16px;">
+				
+				<!-- 	<view class="balanceCard-main oldTextjp222" oldstyle="font-size: 16px;">
 						<h2 v-if="personAccount.availableAmount != null">{{personAccount.availableAmount.toFixed(2)}}元</h2>
 						<view class="balanceCard-btn" @click="rechargeNow">立即充值</view>
+					</view> -->
+					<view class="balanceCard-foot oldTextjp222" oldstyle="font-size: 16px;">
+						<view class="balanceCard-item" v-if="personAccount.availableAmount != null">可用余额{{personAccount.availableAmount.toFixed(2)}}</view>
+						<view class="balanceCard-item" v-if="personAccount.frozenTotal != null">冻结金额{{personAccount.frozenTotal.toFixed(2)}}</view>
 					</view>
-					<view class="balanceCard-foot oldTextjp2" oldstyle="font-size: 16px;">
-						<view class="balanceCard-item" v-if="personAccount.availableAmount != null">可用余额{{personAccount.availableAmount.toFixed(2)}}元</view>
-						<view class="balanceCard-item" v-if="personAccount.frozenTotal != null">冻结金额{{personAccount.frozenTotal.toFixed(2)}}元</view>
-					</view>
+					
+				</view>
+				<view class="new-balanceCard-foot" @click="rechargeNow">
+					立即充值
 				</view>
 			</view>
 			<view class="balanceMain">
 				<view class="balanceMain-title">
 					<view class="title">
 						<u-icon name="todo-fill" custom-prefix="custom-icon" color="#6BC6A7" size="40"></u-icon>
-						<span class="oldTextjp" oldstyle="font-size: 20px;">充值明细</span>
+						<span class="oldTextjp222" oldstyle="font-size: 20px;">充值明细</span>
 					</view>
-					<view class="more oldTextjp2" oldstyle="font-size: 16px;" @click="seeAll">
+					<view class="more oldTextjp222" oldstyle="font-size: 16px;" @click="seeAll">
 						<span>查看全部</span>
 						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
 					</view>
 				</view>
 				<view class="balanceMain-list" v-if="accountList.length > 0">
-					<view class="balanceMain-item" v-for="(item,index) in accountList" :key="item.id" @click="gotoUrl('pages/user/finance/rechargeDet?id=' + item.id)">
+					<view class="balanceMain-item" v-for="(item,index) in accountList " :key="item.id" @click="gotoUrl('pages/user/finance/rechargeDet?type='+item.type+'&id=' + item.id)">
 						<view class="title">
-							<font class="oldTextjp2" oldstyle="font-size: 18px;">{{item.payNameStr}}</font>
-							<p  class="oldTextjp2" oldstyle="font-size: 14px;">{{item.createTime}}</p>
+							<font class="oldTextjp222" oldstyle="font-size: 18px;">{{item.remark}}</font>
+							<p  class="oldTextjp222" oldstyle="font-size: 14px;">{{item.createTime}}</p>
 						</view>
-						<h4 class="oldTextjp2" oldstyle="font-size: 24px;">{{item.amount.toFixed(2)}}元</h4>
+						<h4 class="oldTextjp222" oldstyle="font-size: 24px;">{{item.amount?item.amount.toFixed(2):0}}元</h4>
 					</view>
 				</view>
 			</view>
 			<view class="carNone" v-if="accountList.length == 0">
 				<img src="static/img/暂无数据-缺省页.png" alt="">
-				<p class="oldTextjp2" oldstyle="font-size: 18px;">本月暂无充值记录</p>
+				<p class="oldTextjp222" oldstyle="font-size: 18px;">本月暂无充值记录</p>
 			</view>
 		</view>	
 	</view>
@@ -67,8 +89,10 @@
 				dateMonth: '',
 				userId: '',
 				show: false,
+				show2: false,
 				confirmText: '知道了',
 				content: `总金额=可用余额+冻结金额。使用预付费充电时,在充电过程中会冻结部分金额,充电完成后将剩余金额返还至余额账户,每笔预充金额的冻结时间不超过96小时。`,
+				content2:"充电金:只可用于平台内所有自营站充电使用,不能提现",
 				personAccount: {},
 				accountList: [],
 				elderStatus: false,
@@ -92,7 +116,7 @@
 				monthN = "0" + monthN;
 			}
 			this.dateMonth = year + '-' + monthN + '-01';
-			
+			//this.dateMonth = year + '-10-01';
 			this.getCarPersonAccount();
 			this.getAccountRecordData();
 				
@@ -108,7 +132,7 @@
 					title: "加载中",
 					mask: true,
 				})		
-				API.accountRecordData({
+				API.rechargeAmountRecordList({
 					queryDate: this.dateMonth
 				}).then((res) => {
 					uni.hideLoading();
@@ -152,6 +176,9 @@
 </script>
 
 <style lang="scss" scoped>
+	.oldTextClassF{
+		
+	}
 	.slot-content {
 		font-size: 28rpx;
 		color: $u-content-color;
@@ -164,6 +191,7 @@
 		flex: 1;
 	}
 	.navBtn{
+		font-size: 36rpx;
 		float: right;
 		margin-right: 15px;
 		color:#3fbd70;
@@ -183,16 +211,32 @@
 	}
 	.balanceHead{
 		background-color: #fff;
-		padding: 16px;
+		margin: 16px;
+		background-color: #00B962;
+		border-radius: 12px;
+		.new-balanceCard-foot{
+			font-size: 18px;
+			margin-top: 24rpx;
+			padding:4px;
+			color: rgba(84, 69, 47, 1);
+
+			border-radius:0 0 12px 12px;
+			text-align: center;
+			background: linear-gradient(88.81deg, rgba(224,207,180,1) 1.89%,rgba(207,167,106,1) 99.99%);
+		}
 		.balanceCard{
-			background-color: #00B962;
-			border-radius: 12px;
-			padding: 16px;
+			
+			padding: 16px 16px 0 16px;
 			.balanceCard-head{
-				font{
-					font-size: 18px;
-					color:#fff;
-					margin-right: 8px;
+				    display: flex;
+				    justify-content: flex-start;
+				font-size: 36rpx;
+				color:#fff;
+				.h2{
+					font-size:72rpx
+				}
+				.balanceCard-head-item{
+					width: 49%;
 				}
 			}
 			.balanceCard-main{
@@ -201,7 +245,7 @@
 				justify-content: space-between;
 				margin-top: 8px;
 				h2{
-					font-size: 40px;
+					font-size: 80rpx;
 					color:#fff;
 					font-weight: normal;
 				}
@@ -214,8 +258,9 @@
 			}
 			.balanceCard-foot{
 				display: flex;
-				margin-top: 16px;
+				margin-top: 8rpx;
 				.balanceCard-item{
+					font-size: 32rpx;
 					flex: 1;
 					color:#fff;
 				}
@@ -232,13 +277,17 @@
 			justify-content: space-between;
 			height: 48px;
 			border-bottom: 1px solid #f7f7f7;
-			padding: 0 16PX;
+			padding: 0 16px;
+		
 			.title{
+					font-weight: bold;
 				display: flex;
 				align-items: center;
+				
+
 				span{
 					margin-left: 8px;
-					font-size: 16px;
+					font-size: 36rpx;
 				}
 			}
 		}
@@ -247,8 +296,11 @@
 			align-items: center;
 			justify-content: space-between;
 			padding: 12px 16px;
+			font-size: 32rpx;
+			color: rgba(16, 16, 16, 1);
+
 			p{
-				font-size: 12px;
+				font-size: 32rpx;
 				color:#888;
 				margin-top: 3px;
 			}

+ 27 - 6
pages/user/finance/rechargeDet.vue

@@ -3,12 +3,29 @@
 	<view>
 		<ujp-navbar title="充值详情"></ujp-navbar>
 		<view class="rechargeDet-head">
-			<view class="payPrice">
+			<view class="payPrice" v-if="type==1">
 				<font>{{detail.payFee.toFixed(2)}}</font><span>元</span>
 			</view>
-			<p class="oldTextjp2" oldstyle="font-size: 16px;">充值金额(元)</p>
+			<view class="payPrice" v-if="type==2">
+				<font>{{detail.depositAmount.toFixed(2)}}</font><span>元</span>
+			</view>
+			<view class="payPrice" v-if="type==3">
+				<font>{{detail.depositAmount.toFixed(2)}}</font><span>元</span>
+			</view>
+			<p class="oldTextjp2" oldstyle="font-size: 16px;"  v-if="type==1">充值金额(元)</p>
+			<p class="oldTextjp2" oldstyle="font-size: 16px;"  v-if="type==2">充电金(元)</p>
+			
+			<p class="oldTextjp2" oldstyle="font-size: 16px;"  v-if="type==3">现金分红(元)</p>
+			
+		</view>
+		<view class="rechargeDet-main oldTextjp2" oldstyle="font-size: 18px;" v-if="type==3||type==2">
+		
+			<view class="rechargeDet-list">
+				<p>充值时间</p><span>{{detail.createTime}}</span>
+			</view>
+		
 		</view>
-		<view class="rechargeDet-main oldTextjp2" oldstyle="font-size: 18px;">
+		<view class="rechargeDet-main oldTextjp2" oldstyle="font-size: 18px;" v-if="type==1">
 			<view class="rechargeDet-list">
 				<p>充值订单</p><span>{{detail.outOrderNo}}</span>
 			</view>
@@ -27,7 +44,7 @@
 
 			</view>
 		</view>
-		<view class="rechargeDet-main">
+		<view class="rechargeDet-main" v-if="type==1">
 			<view class="rechargeDet-list oldTextjp2" oldstyle="font-size: 18px;">
 				<p>状态</p><span>{{detail.payStatusStr}}</span>
 			</view>
@@ -49,6 +66,7 @@
 		onLoad(op) {
 			if(op.id) {
 				this.id = op.id
+					this.type = op.type
 				this.getAccountDetail();
 			}
 			
@@ -64,10 +82,13 @@
 					title: "加载中",
 					mask: true,
 				})		
-				API.accountDetail(this.id).then((res) => {
+				API.rechargeAmountRecordDetail({
+				id:	this.id,
+				type:	this.type
+				}).then((res) => {
 					uni.hideLoading();
 					
-					this.detail = res.data.orderInfo;
+					this.detail = res.data.recordDetail;
 				}).catch(error => {
 					uni.showToast({
 						title: error,

+ 5 - 5
pages/user/finance/rechargeList.vue

@@ -11,13 +11,13 @@
 			<p class="oldTextjp2" oldstyle="font-size: 18px;">暂无充值记录</p>
 		</view>
 		<view class="rechargeList" v-if="accountList.length > 0">
-			<view class="rechargeList-item" v-for="(item,index) in accountList" :key="item.id" @click="gotoUrl('pages/user/finance/rechargeDet?id=' + item.id)">
+			<view class="rechargeList-item" v-for="(item,index) in accountList" :key="item.id" @click="gotoUrl('pages/user/finance/rechargeDet?type='+item.type+'&id=' + item.id)">
 				<view class="rechargeList-row">
-					<span class="oldTextjp" oldstyle="font-size: 18px;">{{item.payName == "give" ? '赠送金额' : '充值金额'}}</span>
-					<h4 class="oldTextjp2" oldstyle="font-size: 20px;">{{item.amount.toFixed(2)}}元</h4>
+					<span class="oldTextjp" oldstyle="font-size: 18px;">{{item.remark}}</span>
+					<h4 class="oldTextjp2" oldstyle="font-size: 20px;">{{item.amount?item.amount.toFixed(2):0}}元</h4>
 				</view>
 				<view class="rechargeList-row">
-					<p class="oldTextjp2" oldstyle="font-size: 14px;">{{item.payNameStr}}</p>
+					<p class="oldTextjp2" oldstyle="font-size: 14px;"></p>
 					<p class="oldTextjp2" oldstyle="font-size: 14px;">{{item.createTime}}</p>
 				</view>
 			</view>
@@ -93,7 +93,7 @@
 					this.accountList = [];
 					this.pageIndex = 1;
 				}
-				API.accountRecordData({
+				API.rechargeAmountRecordList({
 					pageIndex: this.pageIndex,
 					queryDate: this.dateMonth,
 				}).then((res) => {

+ 4 - 3
pages/user/finance/refundApp.vue

@@ -52,9 +52,10 @@
 				// uni.redirectTo({
 				// 	url:'refundList'
 				// })
-				uni.navigateBack({
-				//	delta:1
-				})
+				// uni.navigateTo({
+				// 	url:"pages/index/index"
+				// })
+				uni.navigateBack()
 			}
 		}
 	}

+ 2 - 2
pages/user/finance/refundDet.vue

@@ -4,7 +4,7 @@
 		<ujp-navbar title="退费详情"></ujp-navbar>
 		<view class="rechargeDet-head">
 			<view class="payPrice">
-				<font>{{refund.refundRealAmount!=null ? refund.refundRealAmount.toFixed(2) : '0.00'}}</font><span>元</span>
+				<font>{{refund.refundAmount!=null ? refund.refundAmount.toFixed(2) : '0.00'}}</font><span>元</span>
 			</view>
 			<p>退费金额(元)</p>
 		</view>
@@ -22,7 +22,7 @@
 				<p>退费渠道</p><span>{{refund.refundChannelText}}</span>
 			</view> -->
 			<view class="rechargeDet-list">
-				<p>退费金额</p><span>{{refund.refundRealAmount!=null?refund.refundRealAmount.toFixed(2):'0.00'}}元</span>
+				<p>退费金额</p><span>{{refund.refundAmount!=null?refund.refundAmount.toFixed(2):'0.00'}}元</span>
 			</view>
 		</view>
 		<view class="rechargeDet-main">

+ 226 - 0
pages/user/finance/refundInfo.vue

@@ -0,0 +1,226 @@
+<template>
+	<view>
+		<ujp-navbar title="收款人账户信息"></ujp-navbar>
+		<view class="withdraw">
+			<view class="withdraw-head ">
+				<b class="asterisk"><text>*</text>收款户名</b>
+				<u-input class="textarea" type="textarea" 
+				v-model="info.accountName"
+				placeholder="请填写收款户名" height="96" cursor-spacing="8" />
+		
+			</view>
+			<view class="withdraw-head ">
+				<b class="asterisk"><text>*</text>开户银行</b>
+				<u-input class="textarea" type="textarea"
+				v-model="info.bankName"
+				 placeholder="请填写收款银行全称" height="96" cursor-spacing="8" />
+		
+			</view>
+			<view class="withdraw-head border-n">
+				<b class="asterisk"><text>*</text>收款账号</b>
+				<u-input class="textarea" v-model="info.accountNo"
+				type="textarea" placeholder="请填写收款账号" height="96" cursor-spacing="8" />
+		
+			</view>
+			<view style="bottom:0;position:absolute;width: 100%;padding: 40rpx;" >
+				<u-button shape="circle" @click="submit()"   style="background-color:#00b962;color:white">申请退款</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as api from "@/apis/refund.js"
+	
+	export default {
+		data() {
+			return {
+					account:{},
+				info: {
+					accountName: '',
+					bankName: '',
+					accountNo: ""
+				},
+			}
+		},
+		onLoad(){
+			this.personAccount()
+		},
+		methods: {
+			submit(){
+				if(!this.info.accountName){
+						uni.showToast({
+							title: "请填写收款户名",
+							icon: "none"
+						})
+						return false
+				}
+				if(!this.info.bankName){
+						uni.showToast({
+							title: "请填写收款银行全称",
+							icon: "none"
+						})
+						return false
+				}
+				if(!this.info.accountNo){
+						uni.showToast({
+							title: "请填写收款账号",
+							icon: "none"
+						})
+						return false
+				}
+				
+				api.personAccountRefundApplication({
+					amount:this.info.availableAmount,
+					refundChannel:'wechat',
+					applicationChannel:"E",
+					bankName:this.info.bankName,
+					accountName:this.info.accountName,
+					accountNo:this.info.accountNo,
+				}).then((res) => {
+					uni.hideLoading()
+					if(res.result){
+						
+						//('personAccountRefundApplication'+JSON.stringify(res));
+						uni.redirectTo({
+							url:'refundApp'
+						})
+						
+					}
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+				
+			},
+			personAccount(){
+				api.personAccount({
+					
+				}).then((res) => {
+					this.info = res.data;				
+					
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+				
+			}
+		}
+	}
+</script>
+
+<style  lang="scss" scoped >
+	.asterisk {
+		position: relative;
+	
+		text {
+			position: absolute;
+			top: 0px;
+			left: -14rpx;
+			color: #EE3138;
+		}
+	}
+.textarea {
+		background-color:#f2f2f2;
+		margin-top: 12px;
+		line-height: 20px;
+		border-radius: 4px;
+		color: rgba(136, 136, 136, 100);
+
+		.uni-textarea-placeholder {
+			padding: 0 16rpx;
+
+		}
+
+		/deep/.uni-textarea-textarea {
+			width: 90%;
+			padding: 0 16rpx;
+
+		}
+	}
+	.withdraw {
+		margin-bottom: 8px;
+		background-color: #fff;
+		padding: 0px 16px 0 16px;
+
+		.withdraw-head {
+			padding: 16px 0;
+			border-bottom: 1px solid #E5E7EA;
+
+			align-items: center;
+			position: relative;
+
+			.unit {
+				position: absolute;
+				top: 34rpx;
+				right: 0;
+
+			}
+
+			.whthdraw-price {
+				font-size: 18px;
+				color: #101010;
+				font-weight: 600;
+			}
+
+			b {
+				color: rgba(119, 119, 119, 100);
+				font-size: 16px;
+			}
+
+			span {
+				width: 60%;
+				float: right;
+				text-align: left;
+				font-size: 16px;
+				color: #333333;
+			}
+
+			@media screen and (max-width:320px) {
+				span {
+					width: 55%;
+				}
+			}
+
+		}
+
+		.withdraw-main {
+			border-top: 1px solid #f7f7f7;
+			border-bottom: 1px solid #f7f7f7;
+
+			margin: 16px 0;
+			padding: 16px 0;
+
+			.withdraw-input {
+				margin-top: 32px;
+				display: flex;
+				align-items: center;
+				font-size: 28px;
+
+				/deep/.uni-input-input {
+					font-size: 28rpx;
+				}
+			}
+		}
+
+		.withdraw-foot {
+			display: flex;
+			align-items: center;
+
+			p {
+				color: #999
+			}
+
+			span {
+				color: #2979FF;
+				margin-left: 16px;
+
+			}
+		}
+	}
+</style>

+ 53 - 20
pages/user/finance/refundList.vue

@@ -3,11 +3,21 @@
 		<ujp-navbar title="退费记录"></ujp-navbar>
 		<view class="balance">
 			<view class="balanceHead">
-				<view class="payPrice">
-					<font>{{account.availableAmount!=null ? account.availableAmount.toFixed(2) : '0.00'}}</font><span>元</span>
+				<view>
+					<view class="payPrice">
+						<font>{{account.availableAmountSubIncome!=null ? account.availableAmountSubIncome.toFixed(2) : '0.00'}}</font><span>元</span>
+					</view>
+					<view class="tips">
+						<p>充值退款(元)</p><u-icon name="question-line" custom-prefix="custom-icon" color="#00B962" size="32" @click="showtip = true"></u-icon>
+					</view>
 				</view>
-				<view class="tips">
-					<p>可退费金额(元)</p><u-icon name="question-line" custom-prefix="custom-icon" color="#00B962" size="32" @click="showtip = true"></u-icon>
+				<view v-if="account.availableAmountIncome">
+					<view class="payPrice">
+						<font>{{account.availableAmountIncome!=null ? account.availableAmountIncome.toFixed(2) : '0.00'}}</font><span>元</span>
+					</view>
+					<view class="tips">
+						<p>现金分红(元)</p><u-icon name="question-line" custom-prefix="custom-icon" color="#00B962" size="32" @click="showtip2 = true"></u-icon>
+					</view>
 				</view>
 			</view>
 			<view class="balanceMain">
@@ -45,10 +55,20 @@
 					<rich-text :nodes="content1"></rich-text>
 				</view>
 			</u-modal> 
+			<u-modal v-model="showtip2" :title="title" :show-confirm-button="true" confirm-text="知道了" confirm-color="#00B962">
+				<view class="slot-content">
+					<rich-text :nodes="content2"></rich-text>
+				</view>
+			</u-modal> 
 		</view>
 				
 		<view style="bottom:0;position:absolute;width: 100%;padding: 40rpx;" v-show="account.availableAmount>0">
-			<u-button shape="circle"    style="background-color:#00b962;color:white" @click="show=true">申请退款</u-button>
+			
+			<u-button shape="circle"  v-if="account.availableAmountIncome"
+			  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>
 </template>
@@ -60,11 +80,14 @@
 		data() {
 			return {
 				elderMode:false,
-				content1:`本平台仅支持金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费.<br />退费成功后,您可以在退费记录查看退费信息和审核进度.`,
+				content2:`首次申请现金分红退费需填写收款人账户信息,申请成功后工作人员将在5~10个工作日内完成转账打款。`,
+				
+				content1:`本平台仅支持充值金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费.<br />退费成功后,您可以在退费记录查看退费信息和审核进度.`,
 				title:'提示',
 				content:'是否确定提交退费申请?申请成功后退费金额将于5个工作日内退还至您的充值账户',
 				show:false,
 				showtip:false,
+				showtip2:false,
 				userId:'',
 				account:{},
 				items:[],
@@ -73,19 +96,7 @@
 		onLoad(){
 			_self = this;
 		},
-		onReady(){
-		
-			this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
-			if(this.elderMode)
-				this.theme('elder')
-			else
-				this.theme('standard')
-
-			if (this.carhelp.getPersonInfo()) {
-				this.userId = this.carhelp.getPersonInfo().id;
-				//('userId'+this.userId)
-			}
- 
+		onShow(){
 			api.personAccount().then(function(res){
 				if(res.result)
 				{
@@ -100,6 +111,21 @@
 				})
 				////('err'+JSON.stringify(err));
 			});
+		},
+		onReady(){
+		
+			this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
+			if(this.elderMode)
+				this.theme('elder')
+			else
+				this.theme('standard')
+
+			if (this.carhelp.getPersonInfo()) {
+				this.userId = this.carhelp.getPersonInfo().id;
+				//('userId'+this.userId)
+			}
+ 
+		
 			let data = {pageIndex:1,pageSize:10};
 			api.personAccountRefundList(data).then(function(res){
 				if(res.result){
@@ -132,6 +158,11 @@
 			});
 		},
 		methods: {
+			gotoRefundInfo(){
+				uni.redirectTo({
+					url:'/pages/user/finance/refundInfo'
+				})
+			},
 			theme(type) {
 			  if(type == 'elder')	
 			  {
@@ -214,8 +245,10 @@
 		background-color: #fff;
 		padding: 48rpx 0;
 		display: flex;
-		flex-direction: column;
+		flex-direction: row;
 		align-items: center;
+		    justify-content: space-around;
+	
 		.payPrice{
 			display: flex;
 			align-items: flex-end;

+ 7 - 2
pages/user/index.vue

@@ -55,8 +55,13 @@
 			<!-- 卡包入口 -->
 			<view class="my-infos" v-if="(personInfo&&personInfo.userType==2)">
 				<view class="item">
-					<view class="item-value">
-						{{personAccount.availableAmount != null ? personAccount.availableAmount.toFixed(2) : '0.00'}}
+					<view class="item-value" v-if="personAccount.availableAmount||personAccount.chargingFunds ">
+						{{personAccount.chargingFunds != null ? (personAccount.availableAmount+personAccount.chargingFunds).toFixed(2) : personAccount.availableAmount.toFixed(2)}}
+						
+					</view>
+					<view class="item-value" v-else>
+						0.00
+						
 					</view>
 					<view class="item-title" @click="toBalance">
 						余额<u-icon name="arrow-right" color="#B8BDC4" size="2"></u-icon>