|
@@ -3,52 +3,148 @@
|
|
|
<u-navbar :is-back="false" :border-bottom="false" :background="background">
|
|
|
<view class="navbar-tit">{{title}}</view>
|
|
|
</u-navbar>
|
|
|
- <view class="statisticsData" >
|
|
|
- <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 class="statisticsData" >
|
|
|
+ <view class="statisticsData-item">
|
|
|
+ <h3 style="font-size: 20px;">{{info.merchantAccountName}}</h3>
|
|
|
+ </view>
|
|
|
+ <view class="statisticsDataMain">
|
|
|
+ <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="#637AA2" size="36"></u-icon>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="statisticsData-main">
|
|
|
+ <h2>{{indexData.todayAmount}}元</h2>
|
|
|
+ </view>
|
|
|
+ <view class="statisticsData-foot">
|
|
|
+ <p>昨日流水</p>
|
|
|
+ <h4>{{indexData.yesterdayAmount}}元</h4>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="statisticsData-main">
|
|
|
- <h2>{{indexData.todayAmount}}</h2>
|
|
|
+ <view class="statisticsData-item">
|
|
|
+ <view >
|
|
|
+ <h3> </h3>
|
|
|
+ </view>
|
|
|
+ <view class="statisticsData-head">
|
|
|
+ <p>今日充电笔数</p>
|
|
|
+ </view>
|
|
|
+ <view class="statisticsData-main">
|
|
|
+ <h2>{{indexData.todayEQNum}}</h2>
|
|
|
+ </view>
|
|
|
+ <view class="statisticsData-foot">
|
|
|
+ <p>本月流水</p>
|
|
|
+ <h4>{{indexData.thisMonthAmount}}元</h4>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="statisticsData-foot">
|
|
|
- <p>昨日流水</p>
|
|
|
- <h4>{{indexData.yesterdayAmount}}</h4>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="statisticsData-item">
|
|
|
- <view class="statisticsData-head">
|
|
|
- <p>今日充电笔数</p>
|
|
|
- </view>
|
|
|
- <view class="statisticsData-main">
|
|
|
- <h2>{{indexData.todayEQNum}}</h2>
|
|
|
- </view>
|
|
|
- <view class="statisticsData-foot">
|
|
|
- <p>本月流水</p>
|
|
|
- <h4>{{indexData.thisMonthAmount}}</h4>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
+ <u-popup v-model="popupShow" mode="top" height="80%">
|
|
|
+ <view class="popup-screen">
|
|
|
+ <view class="screen">
|
|
|
+ <view class="screen-item">
|
|
|
+ <view class="screen-head">查询日期</view>
|
|
|
+ <view class="screen-main2">
|
|
|
+
|
|
|
+ <u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
|
|
|
+
|
|
|
+ <u-input :value="startTime?startTime+'至'+endTime:'选择时间筛选'" :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.deviceNo
|
|
|
+ }"
|
|
|
+
|
|
|
+ @click="selectdeviceNo=item.deviceNo"
|
|
|
+ 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="statisticsChart">
|
|
|
<view class="statisticsChart-head">
|
|
|
- <h4 >充电桩收益占比</h4>
|
|
|
+ <h4 >流水占比</h4>
|
|
|
+ <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>
|
|
|
<view class="statisticsChart-main" >
|
|
|
- <u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
|
|
|
-
|
|
|
+<!-- <u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
|
|
|
+ -->
|
|
|
<view class="statisticsChart-time" style="
|
|
|
text-align: center; margin-bottom: 5px;
|
|
|
">
|
|
|
- <p @click="showdate = true">{{startTime}} 至 {{endTime}}
|
|
|
- <u-icon name="arrow-down-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
|
|
|
-</p>
|
|
|
+ <p >{{startTime}} 至 {{endTime}} </p>
|
|
|
|
|
|
</view>
|
|
|
<u-subsection :list="subsection" @change="changesub" :current="current" button-color="#2E7Dff"
|
|
@@ -61,7 +157,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <Tabbar :current="0"></Tabbar>
|
|
|
+ <Tabbar :current="0" ref="tabbarMain" ></Tabbar>
|
|
|
<!-- <u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
|
|
|
--> </view>
|
|
|
</template>
|
|
@@ -79,6 +175,13 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ form:{},
|
|
|
+ selecttype:"",
|
|
|
+ selectstationId:"",
|
|
|
+ selectdeviceNo:"",
|
|
|
+
|
|
|
+ popupShow:false,
|
|
|
+ info:{},
|
|
|
title:"",
|
|
|
showdate: false,
|
|
|
startTime: "",
|
|
@@ -92,7 +195,8 @@
|
|
|
name: '笔数'
|
|
|
}
|
|
|
],
|
|
|
-
|
|
|
+ stationList:[],
|
|
|
+ stationListSon:[],
|
|
|
tabbarList: [{
|
|
|
iconPath: "bar-chart-box-fill",
|
|
|
selectedIconPath: "bar-chart-box-fill",
|
|
@@ -122,12 +226,20 @@
|
|
|
background: {
|
|
|
background: 'none'
|
|
|
},
|
|
|
-
|
|
|
+ value: '',
|
|
|
+ type: 'select',
|
|
|
+ show: false,
|
|
|
+ border: true,
|
|
|
}
|
|
|
+ },
|
|
|
+ onShow(){
|
|
|
+ if(this.$refs.tabbarMain){
|
|
|
+ this.$refs.tabbarMain.setcount(0);
|
|
|
+ }
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.title="收益统计"
|
|
|
- var obj=this.carhelp.getPersonInfoPlus("merchantUser");
|
|
|
+ this.info=this.carhelp.getPersonInfo("merchantUser")
|
|
|
|
|
|
},
|
|
|
components: {
|
|
@@ -137,9 +249,61 @@
|
|
|
onReady() {
|
|
|
this.startTime = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
|
|
|
this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
|
|
|
- this.getData()
|
|
|
+ this.getData()
|
|
|
+ this.getStation()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getStation(bl) {
|
|
|
+
|
|
|
+ API.stationList().then((res) => {
|
|
|
+
|
|
|
+ this.stationList = res.data.stationList
|
|
|
+ this.stationListSon=res.data.deviceList
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+
|
|
|
+ title: error
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ resetBtn(){
|
|
|
+ this.startTime = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
|
|
|
+ this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ this.selecttype=""
|
|
|
+ this.selectstationId=""
|
|
|
+ this.selectdeviceNo=""
|
|
|
+ this.pageIndex = 1;
|
|
|
+ this.form = {
|
|
|
+
|
|
|
+
|
|
|
+ pageIndex: this.pageIndex,
|
|
|
+ type:this.selecttype,
|
|
|
+ stationId:this.selectstationId,
|
|
|
+ deviceNo:this.selectdeviceNo,
|
|
|
+ };
|
|
|
+ this.popupShow=false;
|
|
|
+ this.list = [];
|
|
|
+ this.getData()
|
|
|
+
|
|
|
+ },
|
|
|
+ okbtn(){
|
|
|
+ this.popupShow=false;
|
|
|
+ this.pageIndex = 1;
|
|
|
+
|
|
|
+ this.form = {
|
|
|
+
|
|
|
+
|
|
|
+ pageIndex: this.pageIndex,
|
|
|
+ type:this.selecttype,
|
|
|
+ stationId:this.selectstationId,
|
|
|
+ deviceNo:this.selectdeviceNo,
|
|
|
+ };
|
|
|
+ this.list = [];
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
getData(){
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
@@ -147,10 +311,10 @@
|
|
|
})
|
|
|
//this.form.pageIndex=this.pageIndex
|
|
|
|
|
|
- API.spIncomeStatistics({
|
|
|
- startDate:this.startTime,
|
|
|
- endDate:this.endTime
|
|
|
- }).then((res) => {
|
|
|
+ this.form.startDate=this.startTime,
|
|
|
+ this.form.endDate=this.endTime
|
|
|
+
|
|
|
+ API.spIncomeStatistics(this.form).then((res) => {
|
|
|
|
|
|
this.indexData = res.data
|
|
|
|
|
@@ -173,7 +337,7 @@
|
|
|
changedate(e) {
|
|
|
this.startTime = e.startDate
|
|
|
this.endTime = e.endDate
|
|
|
- this.getData()
|
|
|
+
|
|
|
|
|
|
},
|
|
|
getPie() {
|
|
@@ -259,7 +423,69 @@
|
|
|
background-size: 100%;
|
|
|
}
|
|
|
</style>
|
|
|
-<style lang="scss" scoped>
|
|
|
+<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;
|
|
|
+ // display: -webkit-box;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ }
|
|
|
+ .screen-entry{
|
|
|
+ width: 29%;
|
|
|
+ padding:6px 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+
|
|
|
+ background-color: #F2F5FA ;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ border-radius: 3px;
|
|
|
+
|
|
|
+ margin-right: 6px;
|
|
|
+
|
|
|
+ }
|
|
|
+ .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{
|
|
|
+ background-color: #fff;
|
|
|
+ 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-tit {
|
|
|
color: #fff;
|
|
|
font-size: 20px;
|
|
@@ -271,10 +497,15 @@
|
|
|
margin: 16px;
|
|
|
padding: 16px;
|
|
|
border-radius: 8px;
|
|
|
- display: flex;
|
|
|
+
|
|
|
margin-top: 80px;
|
|
|
}
|
|
|
|
|
|
+ .statisticsDataMain {
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ }
|
|
|
.statisticsData-item {
|
|
|
flex: 1;
|
|
|
|