|
@@ -1,38 +1,46 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<car-common ref="common" ></car-common>
|
|
|
+
|
|
|
+ <u-picker v-model="show1" mode="selector" @confirm="show1confirm" :default-selector="[selectForm.select1Index]" :range="selectList1" range-key="licensePlateNumber"></u-picker>
|
|
|
+ <u-picker v-model="show3" mode="time" @confirm="show3confirm" @cancel="show3cancel" :default-time="selectForm.select3" range-key="name" :end-year="thisyear"></u-picker>
|
|
|
+
|
|
|
<u-navbar title="班次统计" :is-back="true" >
|
|
|
<view class="slot-wrap"></view>
|
|
|
</u-navbar>
|
|
|
<view class="von-sy">
|
|
|
<view class="von-sy-select flex-sp" style="background-color: white;">
|
|
|
- <navigator>全部车辆<text class="icon iconfont icon-xiajiantou"></text></navigator>
|
|
|
- <navigator>全部日期<text class="icon iconfont icon-xiajiantou"></text></navigator>
|
|
|
+ <navigator @click="show1=true">{{selectForm.select1Name}}<text class="icon iconfont icon-xiajiantou"></text></navigator>
|
|
|
+ <navigator@click="show3=true" >{{selectForm.select3Name}}<text class="icon iconfont icon-xiajiantou"></text></navigator>
|
|
|
</view>
|
|
|
<view class="von-sy-content">
|
|
|
<view class="von-sy-area">
|
|
|
+ <scroll-view v-show="profitList.length" :style="'height: '+clientHeight+'px;'" scroll-y="true" @scrolltolower="lower">
|
|
|
|
|
|
<u-cell-group>
|
|
|
- <u-cell-item v-for="item,i in profitList.list" :key="i" :title="item.dateDesc" :value="'+'+item.revenue+'元'" @click="gotoUrl(item.dateDesc)" ></u-cell-item>
|
|
|
+ <u-cell-item v-for="item,i in profitList" :key="i" :title="item.carNum" :label="item.dateStr" :value="'+'+item.total" @click="gotoUrl(item.id)" ></u-cell-item>
|
|
|
</u-cell-group>
|
|
|
|
|
|
- <view v-if="isLoading&&profitList.list&&profitList.list.length==0" style="text-align:center;margin-top: 40px;" >
|
|
|
- <img src="static/img/null.png" style="width: 50%;" alt="" >
|
|
|
- <view>暂无数据</view>
|
|
|
-
|
|
|
- </view>
|
|
|
+ </scroll-view>
|
|
|
|
|
|
</view>
|
|
|
-
|
|
|
+ <view v-if="isLoading&&profitList&&profitList.length==0" style="text-align:center;margin-top: 80px;" >
|
|
|
+ <img src="static/img/null.png" style="width: 50%;" alt="" >
|
|
|
+ <view>暂无数据</view>
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as API from '@/apis/merchant.js'
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ clientHeight:0,
|
|
|
isLoading:false,
|
|
|
thisyear: 0,
|
|
|
params: {
|
|
@@ -57,7 +65,7 @@
|
|
|
select2: '',
|
|
|
select2Name: '全部车票',
|
|
|
select3: '',
|
|
|
- select3Name: '当前月份',
|
|
|
+ select3Name: '全部日期',
|
|
|
},
|
|
|
selectList1: [{
|
|
|
id: '',
|
|
@@ -86,16 +94,21 @@
|
|
|
name: '纸质车票'
|
|
|
},
|
|
|
],
|
|
|
-
|
|
|
+ listForm: {
|
|
|
+ totalPage: 1,
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 20
|
|
|
+ },
|
|
|
|
|
|
profitList: [],
|
|
|
mymap: {},
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- gotoUrl(data){
|
|
|
+ gotoUrl(id){
|
|
|
uni.navigateTo({
|
|
|
- url:"/pages/order/list?time="+data
|
|
|
+ url:"/pages/class/info?id="+id,
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
getMerchantVehicleList() {
|
|
@@ -110,22 +123,43 @@
|
|
|
// selectList1
|
|
|
this.selectList1 = selectList1;
|
|
|
this.$refs.common.showLoading(false);
|
|
|
+
|
|
|
this.getProfitList();
|
|
|
}).catch(error => {
|
|
|
this.$refs.common.showLoading(false, error);
|
|
|
})
|
|
|
},
|
|
|
+ lower() {
|
|
|
+ console.log("--------")
|
|
|
+ if (this.listForm.pageIndex <= this.listForm.totalPage ) {
|
|
|
+ this.getProfitList();
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ },
|
|
|
getProfitList() {
|
|
|
this.$refs.common.showLoading();
|
|
|
- var obj={
|
|
|
- vehicleId:this.selectForm.select1,
|
|
|
- payName:this.selectForm.select2,
|
|
|
- dateStr:this.selectForm.select3,
|
|
|
- }
|
|
|
- API.profitList(obj).then(response => {
|
|
|
+ this.listForm.vehicleId=this.selectForm.select1,
|
|
|
+
|
|
|
+ this.listForm.date=this.selectForm.select3,
|
|
|
+
|
|
|
+ API.vehicleShiftList(this.listForm).then(response => {
|
|
|
this.isLoading=true;
|
|
|
// selectList1
|
|
|
- this.profitList = response.data;
|
|
|
+ if (response.data) {
|
|
|
+ if (this.listForm.pageIndex == 1) {
|
|
|
+ this.profitList = response.data.data;
|
|
|
+ this.listForm.pageIndex = response.data.pageNumber;
|
|
|
+ this.listForm.totalPage = response.data.totalPage;
|
|
|
+ } else {
|
|
|
+ this.profitList = [
|
|
|
+ ...this.profitList,
|
|
|
+ ...response.data.data
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.listForm.pageIndex++;
|
|
|
this.$refs.common.showLoading(false);
|
|
|
|
|
|
}).catch(error => {
|
|
@@ -143,6 +177,7 @@
|
|
|
|
|
|
this.selectForm.select1 = obj.id;
|
|
|
this.selectForm.select1Name = obj.licensePlateNumber;
|
|
|
+ this.listForm.pageIndex=1;
|
|
|
this.getProfitList();
|
|
|
},
|
|
|
show2confirm(op) {
|
|
@@ -153,14 +188,16 @@
|
|
|
|
|
|
this.selectForm.select2 = obj.id;
|
|
|
this.selectForm.select2Name = obj.name;
|
|
|
+ this.listForm.pageIndex=1;
|
|
|
this.getProfitList();
|
|
|
},
|
|
|
show3confirm(op) {
|
|
|
console.log(op)
|
|
|
- var select = op.year + "-" + op.month;
|
|
|
- var selectName = op.year + "年" + op.month + "月";
|
|
|
+ var select = op.year + "-" + op.month+'-'+op.day;
|
|
|
+ var selectName = op.year + "年" + op.month + "月"+op.day+"日";
|
|
|
this.selectForm.select3 = select;
|
|
|
this.selectForm.select3Name = selectName;
|
|
|
+ this.listForm.pageIndex=1;
|
|
|
this.getProfitList();
|
|
|
},
|
|
|
},
|
|
@@ -168,7 +205,11 @@
|
|
|
var myDate = new Date();
|
|
|
var tYear = myDate.getFullYear();
|
|
|
this.thisyear = tYear
|
|
|
+ var tMonth = myDate.getMonth()+1;
|
|
|
+ //this.selectForm.select3= tYear+"-"+tMonth
|
|
|
//this.selectForm.select3
|
|
|
+ this.clientHeight = document.body.clientHeight;
|
|
|
+
|
|
|
|
|
|
},
|
|
|
onReady() {
|