zhengkaixin il y a 3 ans
Parent
commit
d73557864b

+ 24 - 3
apis/finance.js

@@ -140,13 +140,13 @@ export function logout(data) {
 }
 
 
-export function spIncomeStatistics (bl,data) {
+export function spIncomeStatistics (data) {
 	 
 	return request({
 		method: 'post',
 		jp_identity:"merchantUser",// 分润接口
 		data:data ,
-		url: '/mobile/roleSharing/'+(bl?"costIncomeStatistics":"spIncomeStatistics")
+		url: "/mobile/roleSharing/spIncomeStatistics"
 	})
 } 
 
@@ -171,4 +171,25 @@ export function priceList(data) {
 		data: data,
 		url: url
 	})
-}
+}
+
+
+export function recordMonthData (data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/recordMonthData"
+	})
+} 
+
+export function recordMonthDetailData (data) {
+	 
+	return request({
+		method: 'get',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/recordMonthDetailData"
+	})
+} 

+ 10 - 6
assets/font/iconfont.css

@@ -1,11 +1,10 @@
+
 @font-face {
-  font-family: "custom-icon"; /* Project id 3365301 */
-  src: url('//at.alicdn.com/t/font_3365301_ziwsue40v4d.woff2?t=1652856491588') format('woff2'),
-       url('//at.alicdn.com/t/font_3365301_ziwsue40v4d.woff?t=1652856491588') format('woff'),
-       url('//at.alicdn.com/t/font_3365301_ziwsue40v4d.ttf?t=1652856491588') format('truetype');
+  font-family: 'custom-icon';  /* Project id 3365301 */
+  src: url('//at.alicdn.com/t/font_3365301_kdd2kr5j2qg.woff2?t=1653536218510') format('woff2'),
+       url('//at.alicdn.com/t/font_3365301_kdd2kr5j2qg.woff?t=1653536218510') format('woff'),
+       url('//at.alicdn.com/t/font_3365301_kdd2kr5j2qg.ttf?t=1653536218510') format('truetype');
 }
-
-
 .custom-icon {
   font-family: "custom-icon" !important;
   font-size: 16px;
@@ -14,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.custom-icon-money-cny-box-fill:before {
+  content: "\e627";
+}
+
 .custom-icon-jiagebaohu:before {
   content: "\e61e";
 }
@@ -205,3 +208,4 @@
 .custom-icon-arrow-drop-left-line:before {
   content: "\e61c";
 }
+

+ 17 - 7
components/TabbarFinance.vue

@@ -30,15 +30,25 @@
 						pagePath2:"/pagesFinance/statistics/index",
 						
 				 	},
-				 	{
-				 		iconPath: "article-fill",
-				 		selectedIconPath: "article-fill",
-				 		text: '明细',
-				 		midButton: true,
-				 		customIcon: true,
+				 
+					{
+						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",
+						text: '分润',
+						midButton: true,
+						customIcon: true,
+						pagePath2:"/pagesFinance/share/index",
+						
+					},
 				 	{
 				 		iconPath: "account-pin-box-fill",
 				 		selectedIconPath: "account-pin-box-fill",

+ 16 - 0
pages.json

@@ -105,6 +105,22 @@
 			
 				//"navigationStyle": "custom" // 隐藏系统导航栏
 			}
+		},
+		{
+			"name":"分润明细",
+			"path": "pagesFinance/share/index",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"分润详情",
+			"path": "pagesFinance/share/details",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
 		},
 		{
 			"name":"收益统计",

+ 25 - 21
pagesFinance/detailed/details.vue

@@ -1,27 +1,37 @@
 <template>
 	<view>
-		<u-navbar :title="title"></u-navbar>
+		<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.deviceNo}}</h4>
+				<h4>{{detail.stationName}}/{{detail.deviceName}}</h4>
 			</view>
 			<view class="details-main">
 				<view class="details-price">
-					<span>¥</span><h3>{{iswuye?detail.costAmount:detail.shareProfitAmount}}</h3><span>元</span>
+					<span>¥</span><h3>{{detail.income}}</h3><span>元</span>
 				</view>
 				<p>本单收益</p>
 			</view>
-			<view class="details-row" v-if="!iswuye" ><p>电费(元)</p><span>¥{{detail.costAmount}}</span></view>
-			<view class="details-row" v-if="!iswuye"><p>服务费(元)</p><span>¥{{detail.surplusAmount}}</span></view>
-			<view class="details-row" v-if="!iswuye"><p>桩号</p><span>{{detail.deviceNo}}</span></view>
-			<view class="details-row" v-if="!iswuye"><p>分润标准</p><span>{{detail.disProportion}}%</span></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.deviceNo}}</span></view>
+ 		</view>
+		<view class="details">
+			<view class="details-title">
+				<h4>分润比例</h4>
+			</view>
+			<view class="details-row" v-for="(item,i) in sprList" :key="i">
+				<p>{{item.name}}</p>
+				<span>{{item.describe}}</span>
+			</view>
+		
 		</view>
+		
 		<view class="details">
 			<view class="details-title">
 				<h4>充电详情</h4>
 			</view>
-			<view class="details-row"><p>消费电量(kW-h)</p><span>{{detail.electricQuantity/10000}}</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>
@@ -39,25 +49,19 @@
 		data() {
 			return {
 				id:'',
-				
+				sprList:[
+					
+				],
 				detail:{
 					
 				},
 				title:"",
-				iswuye:false
+				 
 			}
 		},
 		onLoad(op){
 			
-			this.title="收益详情"
-			var obj=this.carhelp.getPersonInfoPlus("merchantUser");
-			if(obj&&obj.role){
-				var  role=obj.role;
-				if(role.id=="4"){
-					this.title="电费详情"
-					this.iswuye=true;
-				}
-			}
+			 		
 			
 			this.id=op.id;
 			this.getInfo()
@@ -87,8 +91,8 @@
 				API.incomeDetails({
 					detailId:this.id
 				}).then((res) => {
-					this.detail=res.data.detail	 
-					
+					this.detail=res.data	 
+					this.sprList=res.data.sprList	 
 					uni.hideLoading()
 					 
 				}).catch(error => {

+ 7 - 15
pagesFinance/detailed/index.vue

@@ -2,7 +2,7 @@
 	<view>
 		<u-navbar :is-back="false">
 			<view class="navbar">
-				<view class="navbar-tit" v-text="title" >收益明细</view>
+				<view class="navbar-tit"  >充电明细</view>
 				<view class="navbar-screen" @click="popupShow = true"><span>筛选</span><u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon></view>
 			</view>
 		</u-navbar>
@@ -104,16 +104,16 @@
 				: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.deviceNo}}</h4>
+							<h4>{{item.stationName}}/{{item.deviceName}}</h4>
 							<p>{{item.createTime}}</p>
 						</view>
 						<view class="detailed-item-num">
-							<h2>{{iswuye?item.costAmount:item.shareProfitAmount}}</h2>
+							<h2>{{item.actualFee}}</h2>
 							<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
 						</view>
 					</view>
@@ -146,7 +146,7 @@
 				selectstationId:"",
 				selectdeviceNo:"",
 				title:"",
-				iswuye:false,
+			 
 				form:{
 					
 				},
@@ -210,15 +210,7 @@
 			}
 		},
 		onLoad() {
-			this.title="收益明细"
-			var obj=this.carhelp.getPersonInfoPlus("merchantUser");
-			if(obj&&obj.role){
-				var  role=obj.role;
-				if(role.id=="4"){
-					this.title="电费明细"
-					this.iswuye=true;
-				}
-			}
+			
 		},
 		onReady() {
 			// this.startDate=parseUnixTime(beforeTimeStamp(5),"{y}-{m}-{d}")
@@ -291,7 +283,7 @@
 						
 							
 						}else{
-							var Amount=this.iswuye?item.todayCostAmount:item.todaySPAmount
+							var Amount=item.totalAmount 
 							
 							showMap.set(ktime,Amount)
 							

+ 197 - 0
pagesFinance/share/details.vue

@@ -0,0 +1,197 @@
+<template>
+	<view>
+		<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>{{data.shareProfitDate}}</h4>
+			</view>
+			<view class="details-main">
+				<view class="details-price">
+					<span>¥</span><h3>{{detail.shareProfitAllAmount}}</h3><span></span>
+				</view>
+				<p>分润金额(元)</p>
+			</view>
+		</view>
+		
+		<view class="details">
+			<view class="details-title">
+				<h4>充电桩月收入明细</h4>
+			</view>
+			<view class="details-row" >
+				<p>电费</p>
+				<span>¥{{detail.costAmount}}</span>
+			</view>
+			<view class="details-row" >
+				<p>服务费</p>
+				<span>¥{{detail.shareProfitAmount}}</span>
+			</view>
+		</view>
+		
+		<view class="details">
+			<view class="details-title">
+				<h4>分润明细</h4>
+			</view>
+			<view class="details-row" v-for="(item,i) in frmxList" :key="i">
+				<p>{{item.describe}}</p>
+				<span>¥{{item.shareProfitAmount}}</span>
+			</view>
+		
+		</view>
+		
+		<view class="details">
+			<view class="details-title">
+				<h4>更多信息</h4>
+			</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.createTime}}</span></view>
+ 		</view>
+		<view class="detailsBtn">
+			<u-button class="detailsBtn-btn" @click="back" type="primary" plain>返回</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				data:{},
+				id:'',
+				frmxList:[
+					
+				],
+				detail:{
+					
+				},
+				title:"",
+				 
+			}
+		},
+		onLoad(op){
+			
+			this.data=op;
+			this.getInfo()
+		},
+		methods: {
+			getPercent(estimateMinute) {
+				var value="";
+				 
+				var ms =estimateMinute
+				if (ms > 0) {
+					var Hour = parseInt(Math.floor(ms / 60 ));
+					var Fen = parseInt(Math.floor(ms % 60 ));	
+					value = Hour + "小时"  + Fen+"分钟"
+				}
+			
+				return value;
+			},
+			back(){
+				uni.navigateBack({
+					
+				})
+			},
+			getInfo(){
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.recordMonthDetailData(this.data).then((res) => {
+					this.detail=res.data.myMonth	 
+					this.frmxList=res.data.frmxList	 
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.detailsBtn{
+		margin: 16px;
+		.detailsBtn-btn{
+			border-color:#185AC6!important;
+			border-radius: 8px!important;
+			background: none!important;
+			color:#185AC6!important;
+		}
+	}
+	.details-title{
+		margin-bottom: 16px;
+		h4{
+			font-weight: normal;
+			font-size: 16px;
+			position: relative;
+			padding-left:10px;
+			&::after{
+				content: '';
+				position: absolute;
+				height: 12px;
+				width: 4px;
+				background-color: #27B148;
+				left: 0;
+				top:5px;
+			}
+		}
+	}
+	.details-row{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-top: 15px;
+		p{color:#888}
+	}
+	.details{
+		margin: 16px;
+		padding: 20px;
+		background-color: #fff;
+		border-radius: 8px;
+		.details-head{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			h4{
+				font-size: 18px;
+				font-weight: normal;
+				margin-left: 4px;
+			}
+		}
+		.details-price{
+			margin-top: 28px;
+			display: flex;
+			align-items: flex-end;
+			justify-content: center;
+			h3{
+				font-size: 36px;
+				color:#27B148;
+				line-height: 36px;
+				margin: 0  4px;
+				font-weight: normal;
+			}
+			span{
+				font-size: 20px;
+				color:#27B148;
+			}
+		}
+		.details-main{
+			text-align: center;
+			margin-bottom: 20px;
+			p{
+				color:#777;
+				margin-top: 4px;
+			}
+		}
+	}
+</style>

+ 435 - 0
pagesFinance/share/index.vue

@@ -0,0 +1,435 @@
+<template>
+	<view>
+		<u-navbar :is-back="false">
+			<view class="navbar">
+				<view class="navbar-tit"  >分润记录</view>
+				<view class="navbar-screen" @click="popupShow = true"><span>筛选</span><u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon></view>
+			</view>
+		</u-navbar>
+		<u-popup v-model="popupShow" mode="top">
+			<view class="popup-screen">
+				<view class="screen">
+					<view class="screen-item">
+						<view class="screen-head">查询年份</view>
+						<view class="screen-main">
+							
+							<u-picker  v-model="showdate" mode="time" :start-year="endyear" :end-year="startyear" :params="params"  @confirm="changedate"></u-picker >
+							
+							<u-input :value="year?year+'年':'选择年份筛选'" :type="type" :border="border" @click="showdate = true" />
+						<!-- 	
+							<u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback"></u-action-sheet>
+						 --></view>
+					</view>
+					<view class="screen-item">
+						<view class="screen-head">充电桩类型</view>
+						<view class="screen-main">
+							<view 
+							:class="{
+								active:selecttype==''
+							}" @click="selecttype=''"
+							class="screen-entry ">全部</view>
+							<view 
+							:class="{
+								active:selecttype=='0'
+							}" @click="selecttype='0'"
+							
+							class="screen-entry type1">自行车充电</view>
+							<view 
+							:class="{
+								active:selecttype=='2'
+							}" @click="selecttype='2'"
+							class="screen-entry type3">交流慢充</view>
+							<view 
+							:class="{
+								active:selecttype=='1'
+							}" @click="selecttype='1'"
+							class="screen-entry type2">直流快充</view>
+						</view>
+					</view>
+					<view class="screen-item">
+						<view class="screen-head">站点</view>
+						<view class="screen-main">
+							<view class="screen-entry  "
+							:class="{
+								active:selectstationId==''
+							}"
+							 @click="selectstationId=''"
+							>全部</view>
+							<view 
+							v-for="(item,i) in stationList" :key="i"
+							:class="{
+								active:selectstationId==item.id
+							}"
+							 @click="selectstationId=item.id,selectdeviceNo=''"
+							class="screen-entry" >{{item.name}}</view>
+						
+						</view>
+					</view>
+					<view class="screen-item">
+						<view class="screen-head">桩号</view>
+						<view class="screen-main">
+							 
+							<view class="screen-entry  "
+							:class="{
+								active:selectdeviceNo==''
+							}"
+							 @click="selectdeviceNo=''"
+							>全部</view>
+							<view 
+							v-for="(item,i) in stationListSon" :key="i"
+							v-show="selectstationId?(selectstationId==item.stationId):true"
+							:class="{
+								active:selectdeviceNo==item.id
+							}"
+							
+							 @click="selectdeviceNo=item.id"
+							class="screen-entry" >{{item.name}}</view>
+						</view>
+					</view>
+				</view>
+				<view class="screen-foot">
+					<view class="screen-btn-l" @click="resetBtn" >重置</view>
+					<view class="screen-btn-r" @click="okbtn" >确定</view>
+				</view>
+			</view>
+		</u-popup>
+		<view class="detailed">
+				<view style="text-align: center;margin-top: 100px" v-if="!list.length">
+					<img src="@/assets/img/blankpage.png">
+					<view>查询为空</view>
+				</view>
+				
+				<view class="detailed-list" v-for="(item ,index) in list"
+				@click="gotoUrl('pagesFinance/share/details?accountId='+item.merchantAccountId+'&deviceId='+item.deviceId+'&shareProfitDate='+item.shareProfitDate)"
+				:key="index">
+			 
+				
+					<view class="detailed-item">
+						<view class="detailed-item-name">
+							<h2>{{item.shareProfitDate}}分润收益</h2>
+							<p>{{item.stationName}}/{{item.deviceName}}</p>
+						</view>
+						<view class="detailed-item-name">
+							
+							<h2 style="   text-align: end;">{{item.shareProfitAllAmount}}</h2>
+							<p>{{item.createTime}}</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="2"></Tabbar>
+ 	</view>
+</template>
+
+<script>
+	import Tabbar from '@/components/TabbarFinance.vue'
+	import * as API from '@/apis/finance.js'
+	// import {
+	// 	beforeTimeStamp,
+	// 	currentTimeStamp,
+	// 	parseUnixTime
+	// } from '@/utils'
+	
+	export default {
+		data() {
+			return {
+				showdate: false,
+				startTime: "",
+							
+				endTime: "",
+				selecttype:"",
+				selectstationId:"",
+				selectdeviceNo:"",
+				title:"",
+				year:"",
+				startyear:"",
+				endyear:"",
+				params: {
+			 					year: true,
+			 					month: false,
+			 					day: false,
+			 					hour: false,
+			 					minute: false,
+			 					second: false,
+								// timestamp: true,
+			 	},
+				form:{
+					
+				},
+				 
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
+				popupShow: false,
+				tabbarList: [{
+						iconPath: "bar-chart-box-fill",
+						selectedIconPath: "bar-chart-box-fill",
+						text: '统计',
+						count: 0,
+						isDot: true,
+						customIcon: true,
+					},
+					{
+						iconPath: "article-fill",
+						selectedIconPath: "article-fill",
+						text: '明细',
+						midButton: true,
+						customIcon: true,
+					},
+					{
+						iconPath: "account-pin-box-fill",
+						selectedIconPath: "account-pin-box-fill",
+						text: '我的',
+						count: 0,
+						isDot: false,
+						customIcon: true,
+					},
+				],
+				showMap:null,
+				current: 0,
+				value: '',
+				type: 'select',
+				show: false,
+				border: true,
+				stationList:[],
+				stationListSon:[],
+				actionSheetList: [
+					{
+						text: '男'
+					},
+					{
+						text: '女'
+					},
+					{
+						text: '保密'
+					}
+				],
+			}
+		},
+		components: {
+			Tabbar
+		
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		onLoad() {
+			this.startyear=new Date().getFullYear()
+			console.log(this.startyear)
+			this.endyear=this.startyear-3
+			console.log(this.endyear)
+		},
+		onReady() {
+			
+			this.getList()
+			this.getStation()
+			
+		},
+		methods: {
+			changedate(e) {
+				console.log(e)
+				this.year=e.year
+				
+				
+			},
+			resetBtn(){
+				this.year=""
+			 
+				this.selecttype=""
+				this.selectstationId=""
+				this.selectdeviceNo=""
+				this.pageIndex = 1;
+				this.form = {
+					year:"",
+				 
+					pageIndex: this.pageIndex,
+					type:this.selecttype,
+					stationId:this.selectstationId,
+					deviceNo:this.selectdeviceNo,
+				};
+				this.popupShow=false;
+				this.list = [];
+				this.getList()
+				
+			},
+			okbtn(){
+				this.popupShow=false;
+				this.pageIndex = 1;
+				
+				this.form = {
+					year:this.year,
+					
+					pageIndex: this.pageIndex,
+					type:this.selecttype,
+					stationId:this.selectstationId,
+					deviceNo:this.selectdeviceNo,
+				};
+				this.list = [];
+				this.getList()
+			},
+			getList() {
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				this.form.pageIndex=this.pageIndex
+				
+				API.recordMonthData(this.form).then((res) => {
+					
+					this.list = [
+						...this.list,
+						...res.data.data
+					];
+				
+					this.recordsTotal = res.data.recordsTotal
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+		
+			getStation(bl) {
+				
+				API.stationList().then((res) => {
+					
+					this.stationList = res.data.stationList
+					this.stationListSon=res.data.deviceList	
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+			myLoadmore() {
+					
+				this.pageIndex += 1;
+				this.getList()
+				
+			},
+			// 点击actionSheet回调
+			actionSheetCallback(index) {
+				this.value = this.actionSheetList[index].text;
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.popup-screen{
+		padding: 20px;
+		position: relative;
+		.screen{
+			padding-bottom: 30px;
+		}
+		.screen-item{
+			margin-bottom: 20px;
+			.screen-head{
+				margin-bottom: 8px;
+				font-size: 16px;
+			}
+			.screen-main{
+				display: flex;
+				flex-wrap: wrap;
+				justify-content: space-between;
+			}
+			.screen-entry{
+				width: 31%;
+				padding:6px 0;
+				background-color: #F2F5FA ;
+				text-align: center;
+				margin-bottom: 10px;
+				border-radius: 3px;
+			}
+			.screen-entry.active{
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+		.screen-foot{
+			position: fixed;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			display: flex;
+			height:50px;
+			border-top: 1px solid #ededed;
+			.screen-btn-l{
+				flex: 0.2;
+				text-align: center;
+				line-height: 50px;
+			}
+			.screen-btn-r{
+				flex: 0.8;
+				text-align: center;
+				line-height: 50px;
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+	}
+	.navbar{
+		display: flex;
+		justify-content: space-between;
+		flex: 1;
+		padding: 0 15px;
+	}
+	.navbar-tit{
+		font-size: 20px;
+	}
+	.navbar-screen{
+		display: flex;
+		align-items: center;
+		span{
+			margin-right: 2px;
+			color:#999;
+		}
+	}
+	.detailed-time{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 10px 20px;
+		p{
+			color:#666;
+		}
+	}
+	.detailed-item{
+		background-color: #fff;
+		display: flex;
+		justify-content: space-between;
+		padding: 10px 20px;
+		border-bottom: 1px solid #ededed;
+		.detailed-item-name{
+			h4{
+				font-weight: normal;
+			}
+			p{
+				font-size: 12px;
+				margin-top: 4px;
+				color:#A2A9B5;
+			}
+		}
+		.detailed-item-num{
+			display: flex;
+			align-items: center;
+			h2{
+				margin-right: 4px;
+			}
+		}
+	}
+</style>

+ 23 - 63
pagesFinance/statistics/index.vue

@@ -3,10 +3,10 @@
 		<u-navbar :is-back="false" :border-bottom="false" :background="background">
 			<view class="navbar-tit">{{title}}</view>
 		</u-navbar>
-		<view class="statisticsData" v-if="!iswuye">
+		<view class="statisticsData"  >
 			<view class="statisticsData-item">
 				<view class="statisticsData-head" @click="gotoUrl('pagesFinance/detailed/index')">
-					<p>今日充电收益(元)</p>
+					<p>今日充电流水(元)</p>
 					<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="24"></u-icon>
 					
 				</view>
@@ -14,56 +14,30 @@
 					<h2>{{indexData.todayAmount}}</h2>
 				</view>
 				<view class="statisticsData-foot">
-					<p>昨日收益</p>
+					<p>昨日流水</p>
 					<h4>{{indexData.yesterdayAmount}}</h4>
 				</view>
 			</view>
 			<view class="statisticsData-item">
 				<view class="statisticsData-head">
-					<p>今日充电单量(笔)</p>
+					<p>今日充电笔数</p>
 				</view>
 				<view class="statisticsData-main">
-					<h2>{{indexData.todayNum}}</h2>
+					<h2>{{indexData.todayEQNum}}</h2>
 				</view>
 				<view class="statisticsData-foot">
-					<p>累计收益</p>
-					<h4>{{indexData.withdrawnAmount}}</h4>
+					<p>本月流水</p>
+					<h4>{{indexData.thisMonthAmount}}</h4>
 				</view>
 			</view>
 		</view>
 		
-		<view class="statisticsData" v-if="iswuye">
-			<view class="statisticsData-item">
-				<view class="statisticsData-head"  @click="gotoUrl('pagesFinance/detailed/index')" >
-					<p>今日充电电费(元)</p>
-					<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="24"></u-icon>
-				</view>
-				<view class="statisticsData-main">
-					<h2>{{indexData.todayCost}}</h2>
-				</view>
-				<view class="statisticsData-foot">
-					<p>昨日电费</p>
-					<h4>{{indexData.yesterdayCost}}</h4>
-				</view>
-			</view>
-			<view class="statisticsData-item">
-				<view class="statisticsData-head">
-					<p>今日充电度数(kW/h)</p>
-				</view>
-				<view class="statisticsData-main">
-					<h2>{{indexData.todayElectricity/10000}}</h2>
-				</view>
-				<view class="statisticsData-foot">
-					<p>累计收益</p>
-					<h4>{{indexData.withdrawnAmount}}</h4>
-				</view>
-			</view>
-		</view>
+		
 		
 		<view class="statisticsChart">
 			<view class="statisticsChart-head">
-				<h4 v-if="!iswuye">充电桩收益占比</h4>
-				<h4 v-if="iswuye">充电桩电费占比</h4>
+				<h4  >充电桩收益占比</h4>
+				 
 				<view class="statisticsChart-time">
 					<u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
 					<p @click="showdate = true">{{startTime}} 至 {{endTime}}</p>
@@ -73,12 +47,10 @@
 			</view>
 			<view class="statisticsChart-main" >
 				
-					<u-subsection v-if="!iswuye" :list="subsection" @change="changesub" :current="current" button-color="#2E7Dff"
+					<u-subsection   :list="subsection" @change="changesub" :current="current" button-color="#2E7Dff"
 						active-color="#fff"></u-subsection>
 						
-						<u-subsection v-if="iswuye" :list="subsection2" @change="changesub" :current="current" button-color="#2E7Dff"
-							active-color="#fff"></u-subsection>
-			
+				 
 		
 				<view id="pieEcharts" style="min-height:250px;">
 
@@ -113,17 +85,10 @@
 						name: '金额'
 					},
 					{
-						name: '单量'
+						name: '笔数'
 					}
 				],
-				 
-				subsection2: [{
-						name: '金额'
-					},
-					{
-						name: '电量'
-					}
-				],
+			
 				tabbarList: [{
 						iconPath: "bar-chart-box-fill",
 						selectedIconPath: "bar-chart-box-fill",
@@ -153,21 +118,13 @@
 				background: {
 					background: 'none'
 				},
-				iswuye:false,
+			 
 			}
 		},
 		onLoad() {
 			this.title="收益统计"
 			var obj=this.carhelp.getPersonInfoPlus("merchantUser");
-			
-			if(obj&&obj.role){
-				var  role=obj.role;
-				if(role.id=="4"){
-					this.title="电费统计"
-					this.iswuye=true;
-				
- 				}
-			} 
+			 
 		},
 		components: {
 			Tabbar
@@ -186,7 +143,7 @@
 				})
 				//this.form.pageIndex=this.pageIndex
 				
-				API.spIncomeStatistics(this.iswuye,{
+				API.spIncomeStatistics({
 					startDate:this.startTime,
 					endDate:this.endTime 
 				}).then((res) => {
@@ -219,10 +176,11 @@
 				
 				var list=this.indexData.pieChart;
 				var getData=[];
+				var unit=this.current?'笔':'元'
 				list.forEach(item=>{
-					 var value=(this.iswuye?(item.electricity/10000):item.amountNums)
+					 var value=this.current?item.eqNum:item.amount
 					getData.push({
-						value: this.current?value:item.amount,
+						value: value,
 						name: item.deviceName
 					})
 				})
@@ -235,7 +193,9 @@
 				var option = {
 					
 					tooltip: {
-						trigger: 'item'
+						trigger: 'item',
+					  formatter: '{b} : {c}'+unit
+
 					},
 					legend: {
 

+ 1 - 1
pagesFinance/user/index.vue

@@ -84,7 +84,7 @@
 			</view>
 		</view>
 		
-			<Tabbar :current="2"></Tabbar>
+			<Tabbar :current="3"></Tabbar>
  	</view>
 </template>