|
@@ -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>
|