Browse Source

细节调整

zhengkaixin 3 năm trước cách đây
mục cha
commit
e750bd52f0

+ 8 - 8
components/TabbarFinance.vue

@@ -31,15 +31,15 @@
 						
 				 	},
 				 
-					// {
-					// 	iconPath: "article-fill",
-					// 	selectedIconPath: "article-fill",
-					// 	text: '明细',
-					// 	midButton: true,
-					// 	customIcon: true,
-					// 	pagePath2:"/pagesFinance/detailed/index",
+					{
+						iconPath: "article-fill",
+						selectedIconPath: "article-fill",
+						text: '明细',
+						midButton: true,
+						customIcon: true,
+						pagePath2:"/pagesFinance/detailed/index",
 						
-					// },
+					},
 					{
 						iconPath: "money-cny-box-fill",
 						selectedIconPath: "money-cny-box-fill",

+ 38 - 11
pagesFinance/detailed/details.vue

@@ -3,17 +3,37 @@
 		<u-navbar >  充电详情</u-navbar>
 		<view class="details">
 			<view class="details-head">
-				<u-icon name="charging-pile-fill" custom-prefix="custom-icon" color="#27B148" size="48"></u-icon>
-				<h4>{{detail.stationName}}/{{detail.deviceName}}</h4>
+<!-- 				<u-icon name="charging-pile-fill" custom-prefix="custom-icon" color="#27B148" size="48"></u-icon>
+ -->			
+				
+				<h4>{{detail.flowNo?detail.flowNo:'无充电单号'}}</h4>
+				
 			</view>
 			<view class="details-main">
 				<view class="details-price">
-					<span>¥</span><h3>{{detail.income}}</h3><span>元</span>
+					<h3>{{detail.income}}</h3><span>元</span>
 				</view>
 				<p>本单收益</p>
 			</view>
-			<view class="details-row"   ><p>电费(元)</p><span>¥{{detail.electricityAmount}}</span></view>
-			<view class="details-row"   ><p>服务费(元)</p><span>¥{{detail.surplusAmount}}</span></view>
+			<view class="details-row"   ><p>电费 </p><span>{{detail.electricityAmount}}元</span></view>
+		
+			
+ 			<view class="details-row" >
+ 				<p>服务费</p>
+   				
+				<span>{{detail.surplusAmount-detail.record.discountAmount}}元
+				<span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.record.discountAmount}})</span>
+				
+ 				</span>
+ 			</view>
+ 			<view class="details-row" v-if="couponObj&&couponObj.status=='1'" >
+ 				<p>优惠券 </p>
+ 				<span>
+ 					{{couponObj.useText}}	
+ 				</span>
+ 			</view>
+			
+		
 			<view class="details-row" ><p>桩号</p><span>{{detail.deviceNo}}</span></view>
  		</view>
 		<view class="details">
@@ -21,8 +41,8 @@
 				<h4>分润比例</h4>
 			</view>
 			<view class="details-row" v-for="(item,i) in sprList" :key="i">
-			<p>{{item.merchantAccountName}}({{(item.disProportion*100).toFixed(2)}}%)</p>
-			<span>{{item.shareProfitAmount}}元</span>
+			<p>{{item.merchantAccountName}}</p>
+			<span>{{item.disProportion}}%</span>
 			</view>
 		
 		</view>
@@ -31,7 +51,12 @@
 			<view class="details-title">
 				<h4>充电详情</h4>
 			</view>
-			<view class="details-row"><p>消费电量(度)</p><span>{{detail.electricQuantity/10000}}</span></view>
+		
+			<view class="details-row"><p>来源站点</p><span>{{detail.stationName}}</span></view>
+			<view class="details-row"><p>来源充电桩</p><span>{{detail.deviceName}}</span></view>
+			
+			
+			<view class="details-row"><p>消费电量</p><span>{{detail.electricQuantity/10000}}度</span></view>
 			<view class="details-row"><p>开始时间</p><span>{{detail.startTime}}</span></view>
 			<view class="details-row"><p>结束时间</p><span>{{detail.endTime}}</span></view>
 			<view class="details-row"><p>充电时长</p><span>{{getPercent(detail.chargingMinute)}}</span></view>
@@ -56,7 +81,7 @@
 					
 				},
 				title:"",
-				 
+				 couponObj:null,
 			}
 		},
 		onLoad(op){
@@ -89,10 +114,11 @@
 					title:"加载中",mask:true,
 				})
 				API.incomeDetails({
-					detailId:this.id
+					recordId:this.id
 				}).then((res) => {
 					this.detail=res.data	 
-					this.sprList=res.data.detailList	 
+					this.sprList=res.data.cdmList	
+					this.couponObj=res.data.userCoupon;
 					uni.hideLoading()
 					 
 				}).catch(error => {
@@ -151,6 +177,7 @@
 		background-color: #fff;
 		border-radius: 8px;
 		.details-head{
+			text-align: center;
 			display: flex;
 			align-items: center;
 			justify-content: center;

+ 22 - 13
pagesFinance/detailed/index.vue

@@ -106,25 +106,29 @@
 				:key="index">
 				<view class="detailed-time"    v-if="item.show">
 					<p>{{item.showtime}}</p>
-					<p  >共收入 {{showMap.get(item.showtime)}}</p>
+					<p  >共收入 {{showMap.get(item.showtime)}}</p>
 				</view>
-				
-					<view class="detailed-item">
-						<view class="detailed-item-name">
-							<h4>{{item.stationName}}/{{item.deviceName}}</h4>
-							<p>{{item.createTime}}</p>
-						</view>
-						<view class="detailed-item-num" >
-							<h2>{{item.shareProfitAmount}}</h2>
-							<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
-						</view>
+				<view class="detailed-item">
+					<view class="detailed-item-name">
+						<h2>{{item.flowNo?item.flowNo:'无充电单号'}}</h2>
+						<p>{{item.stationName}}/{{item.deviceName}}</p>
+					</view>
+					<view class="detailed-item-name"  style="
+							width: 80px;
+						">
+						
+						<h2 style="   text-align: end;">{{item.actualFee}}元</h2>
+						<p style="   text-align: end;" >{{item.createTime?item.createTime.slice(10):''}}</p>
 					</view>
 				</view>
+				
+					
+				</view>
 			<u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
 			
 			 
 		</view>
-	<!-- 	<Tabbar :current="1"></Tabbar> -->
+		<Tabbar :current="1" ref="tabbarMain"></Tabbar>
  	</view>
 </template>
 
@@ -211,6 +215,11 @@
 				this.myLoadmore();
 			}
 		},
+		onShow() {
+			if(this.$refs.tabbarMain){
+				this.$refs.tabbarMain.setcount(1);
+			}
+		},
 		onLoad() {
 			
 		},
@@ -286,7 +295,7 @@
 						
 							
 						}else{
-							var Amount=item.todaySPAmount 
+							var Amount=item.totalAmount 
 							
 							showMap.set(ktime,Amount)
 							

+ 43 - 17
pagesFinance/share/details.vue

@@ -27,32 +27,48 @@
 				<span>{{detail.electricityAmount }}元</span>
 			</view>
 			<view class="details-row" >
-				<p>服务费金额</p>
-				<span>{{detail.surplusAmount}}元</span>
+				<p>服务费</p>
+				<span>{{detail.surplusAmount-detail.discountAmount}}元
+				<span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.discountAmount}})</span>
+				
+				</span>
+			</view>
+			<view class="details-row" v-if="couponObj&&couponObj.status=='1'" >
+				<p>优惠券 </p>
+				<span>
+					{{couponObj.useText}}	
+				</span>
+			</view>
+			
+		
+			
+		</view>
+		<view class="details">
+			<view class="details-title">
+				<h4>用电明细</h4>
 			</view>
 			<view class="details-row" >
 				<p>总充电量</p>
 				<span>{{detail.electricQuantity/10000}}度</span>
 			</view>
-		
+					
 				<view v-for="(item,i) in chargeDetails" :key="i">
-					<view class="details-row" >
+					<view class="details-row" style=" margin-top: 18px;" >
 						<p>区间充电量({{item.startTime}}-{{item.endTime}})</p>
-						<span>{{item.kwh }}度</span>
+						<span >{{item.kwh }}度</span>
 					</view>
-					<view class="details-row" >
-						<p>区间定价</p>
-						<span>{{(item.electricityPrice*100+item.servicePrice*100)/100}}元</span>
-					</view>
-					<view class="details-row" >
-						<p>区间定价组成</p>
-						<span>电价{{item.electricityPrice}}元/服务费{{item.servicePrice}}元</span>
+					
+					<view class="details-row" style="display: block;" >
+						<p>
+							<span style="    color: #888;">区间定价</span>
+							
+							<span style="float: right; color: #333;">{{(item.electricityPrice*100+item.servicePrice*100)/100}}元/度</span>
+							
+						</p>
+							<span class="details-row-sum">{{item.electricityPrice}}元/度(电费)+{{item.servicePrice}}元/度(服务费) </span>
+											
 					</view>
 				</view>
-			
-			
-			
-			
 		</view>
 		
 		<view class="details">
@@ -92,6 +108,7 @@
 				frmxList:[
 					
 				],
+				couponObj:null,
 				detail:{
 					
 				},
@@ -143,7 +160,9 @@
 					title:"加载中",mask:true,
 				})
 				API.recordDetailData(this.data).then((res) => {
-					this.detail=res.data	
+					this.detail=res.data
+						this.couponObj=res.data.userCoupon;
+						
 					 this.chargeDetails=JSON.parse(res.data.ChargeDetails)
 					 console.log( this.chargeDetails)
 					this.frmxList=res.data.detailList	 
@@ -199,12 +218,19 @@
 		margin-top: 15px;
 		p{color:#888}
 	}
+	.details-row-sum{
+		float: right;
+		color: #888;
+		font-size: 12px;
+	
+	}
 	.details{
 		margin: 16px;
 		padding: 20px;
 		background-color: #fff;
 		border-radius: 8px;
 		.details-head{
+			text-align: center;
 			display: flex;
 			align-items: center;
 			justify-content: center;

+ 3 - 3
pagesFinance/share/index.vue

@@ -120,7 +120,7 @@
 							">
 							
 							<h2 style="   text-align: end;">{{item.shareProfitAmount}}元</h2>
-							<p>{{item.createTime?item.createTime.slice(0,10):''}}</p>
+							<p style="   text-align: end;" >{{item.createTime?item.createTime.slice(10):''}}</p>
 						</view>
 					</view>
 				</view>
@@ -128,7 +128,7 @@
 			
 			 
 		</view>
-		<Tabbar  ref="tabbarMain" :current="1"></Tabbar>
+		<Tabbar  ref="tabbarMain" :current="2"></Tabbar>
  	</view>
 </template>
 
@@ -222,7 +222,7 @@
 		},
 		onShow(){
 			if(this.$refs.tabbarMain){
-				this.$refs.tabbarMain.setcount(1);
+				this.$refs.tabbarMain.setcount(2);
 			}
 		},
 		onReachBottom() {

+ 2 - 2
pagesFinance/user/index.vue

@@ -84,7 +84,7 @@
 			</view>
 		</view>
 		
-			<Tabbar :current="2"  ref="tabbarMain"></Tabbar>
+			<Tabbar :current="3"  ref="tabbarMain"></Tabbar>
  	</view>
 </template>
 
@@ -125,7 +125,7 @@
 		},
 		onShow() {
 			if(this.$refs.tabbarMain){
-				this.$refs.tabbarMain.setcount(2);
+				this.$refs.tabbarMain.setcount(3);
 			}
 			this.getHomePage()
 		},