Browse Source

详情,筛选

zhengkaixin 3 years ago
parent
commit
ae82eb9204
2 changed files with 145 additions and 26 deletions
  1. 9 4
      pagesFinance/recordOfInvoice/applicationDetails.vue
  2. 136 22
      pagesFinance/statistics/index.vue

+ 9 - 4
pagesFinance/recordOfInvoice/applicationDetails.vue

@@ -22,10 +22,15 @@
 				</u-cell-item>
 			<!-- 	<u-cell-item  title="发票代码" :arrow="false" :value="invoiceInfo.code"></u-cell-item>
 				<u-cell-item  title="发票号码" :arrow="false" :value="invoiceInfo.number"></u-cell-item>
-			 -->	<u-cell-item  title="发票类型":arrow="false" :value="invoiceInfo.headerType=='1'?'企业单位':'个人/非企业单位'"></u-cell-item>
-				<u-cell-item  title="发票抬头" :arrow="false"  :value="invoiceInfo.title"></u-cell-item>
-				<u-cell-item  title="发票税号" :arrow="false" :value="invoiceInfo.companyTaxNo?invoiceInfo.companyTaxNo:'--'"></u-cell-item>
-				<u-cell-item  title="开票时间" :arrow="false"  :value="invoiceInfo.invoicingTime"></u-cell-item>
+			 --><u-cell-item  title="所属站点" :arrow="false" :value="invoiceInfo.stationName"></u-cell-item>
+					<u-cell-item  title="充电度数" :arrow="false" :value="invoiceInfo.totalElectricQuantity/10000+'度'"></u-cell-item>
+				<u-cell-item  title="充电笔数" :arrow="false" :value="invoiceInfo.recordNum+'笔'"></u-cell-item>
+				
+				
+					<u-cell-item  title="发票类型":arrow="false" :value="invoiceInfo.headerType=='1'?'企业单位':'个人/非企业单位'"></u-cell-item>
+					<u-cell-item  title="发票抬头" :arrow="false"  :value="invoiceInfo.title"></u-cell-item>
+					<u-cell-item  title="发票税号" :arrow="false" :value="invoiceInfo.companyTaxNo?invoiceInfo.companyTaxNo:'--'"></u-cell-item>
+					<u-cell-item  title="开票时间" :arrow="false"  :value="invoiceInfo.invoicingTime"></u-cell-item>
 			</u-cell-group>
 		<!-- 	<u-cell-item style="background-color: #fff;"  title="发票预览":arrow="false">
 				<text class="success">查看</text>

+ 136 - 22
pagesFinance/statistics/index.vue

@@ -130,6 +130,51 @@
 				</view>
 			</view>
 		</u-popup>
+		
+		<u-calendar v-model="showdate2" mode="range" @change="changedate2"></u-calendar>
+		
+		<u-popup v-model="popupShow2" mode="top" height="50%">
+			<view class="popup-screen">
+				<view class="screen">
+					<view class="screen-item">
+						<view class="screen-head">查询日期</view>
+						<view class="screen-main2">
+							
+							
+							<u-input :value="startTime2?startTime2+'至'+endTime2:'选择时间筛选'" :type="type" :border="border" @click="showdate2 = true,popupShow2=false" />
+						<!-- 	
+							<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="screen-entry  "
+							:class="{
+								active:selectstationId2==''
+							}"
+							 @click="selectstationId2=''"
+							>全部</view>
+							<view 
+							v-for="(item,i) in stationList" :key="i"
+							:class="{
+								active:selectstationId2==item.id
+							}"
+							 @click="selectstationId2=item.id,selectdeviceNo=''"
+							class="screen-entry" >{{item.name}}</view>
+						
+						</view>
+					</view>
+					 
+				</view>
+				<view class="screen-foot">
+					<view class="screen-btn-l"
+					 @click="resetBtn2" >重置</view>
+					<view class="screen-btn-r" @click="okbtn2" >确定</view>
+				</view>
+			</view>
+		</u-popup>
 		
 		<view class="statisticsChart">
 			<view class="statisticsChart-head">
@@ -161,27 +206,28 @@
 				<!-- <view class="navbar-screen" >
 					 {{startTime}}至{{endTime}}
 				 </view> -->
+				 <view class="navbar-screen" @click="popupShow2 = true"><span>筛选</span><u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon></view>
 				 
 				
 			</view>
 		
-			<view class="details" v-if="indexData.incomeMap" >
-				<p style="text-align: center; margin-bottom: 5px;" >{{startTime}}至{{endTime}} </p>
+			<view class="details" v-if="indexData2.incomeMap" >
+				<p style="text-align: center; margin-bottom: 5px;" >{{startTime2}}至{{endTime2}} </p>
 				<view class="details-row" >
 					<p>投资人收入</p>
-					<span>{{indexData.incomeMap.incomeAmount}}元</span>
+					<span>{{indexData2.incomeMap.incomeAmount}}元</span>
 				</view>
 				<view class="details-row" >
 					<p>用电度数</p>
-					<span>{{indexData.incomeMap.electricQuantity/10000}}度</span>
+					<span>{{indexData2.incomeMap.electricQuantity/10000}}度</span>
 				</view>
 				<view class="details-row" >
 					<p>电费收益</p>
-					<span>{{indexData.incomeMap.costAmount}}元</span>
+					<span>{{indexData2.incomeMap.costAmount}}元</span>
 				</view>
 				<view class="details-row" >
 					<p>服务费收益</p>
-					<span><b>{{indexData.incomeMap.serviceAmount}}元</b></span>
+					<span><b>{{indexData2.incomeMap.serviceAmount}}元</b></span>
 				</view>
 			</view>
 			
@@ -205,18 +251,29 @@
 	export default {
 		data() {
 			return {
+				isinit:true,
 				form:{},
+				form2:{},
 				selecttype:"",
 				selectstationId:"",
 				selectdeviceNo:"",
-				
+				popupShow2:false,
 				popupShow:false,
+				
+				selectstationId2:"",
 				info:{},
 				title:"",
-				showdate: false,
+				showdate: false,
+				showdate2: false,
+				
 				startTime: "",
 				indexData:{},
 				endTime: "",
+				
+				startTime2: "",
+				indexData2:{},
+				endTime2: "",
+				
 				myChart: null,
 				subsection: [{
 						name: '金额'
@@ -278,7 +335,9 @@
 		},
 		onReady() {
 			this.startTime = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
-			this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+			this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+			this.startTime2 = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
+			this.endTime2 = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
 			this.getData()
 			this.getStation()
 		},
@@ -305,11 +364,11 @@
 				this.selecttype=""
 				this.selectstationId=""
 				this.selectdeviceNo=""
-				this.pageIndex = 1;
+			 
 				this.form = {
 				 
 				 
-					pageIndex: this.pageIndex,
+				 
 					type:this.selecttype,
 					stationId:this.selectstationId,
 					deviceNo:this.selectdeviceNo,
@@ -321,12 +380,9 @@
 			},
 			okbtn(){
 				this.popupShow=false;
-				this.pageIndex = 1;
-				
+				 
 				this.form = {
 				 
-					
-					pageIndex: this.pageIndex,
 					type:this.selecttype,
 					stationId:this.selectstationId,
 					deviceNo:this.selectdeviceNo,
@@ -334,19 +390,51 @@
 				this.list = [];
 					this.getData()
 			},
+			resetBtn2(){
+				this.startTime2 = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
+				this.endTime2 = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+				
+			 
+			 
+ 				this.selectstationId2=""
+ 				 
+				this.form2 = {
+				 
+					stationId:this.selectstationId2,
+				
+				};
+				this.popupShow2=false;
+			
+					this.getData2()
+				
+			},
+			okbtn2(){
+				this.popupShow2=false;
+ 				
+				this.form2 = {
+				 
+					stationId:this.selectstationId2,
+				
+				};
+			
+				this.getData2()
+			},
 			getData(){
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
-				//this.form.pageIndex=this.pageIndex
-				
+ 				
 				this.form.startDate=this.startTime,
 				this.form.endDate=this.endTime 
 				
 				API.spIncomeStatistics(this.form).then((res) => {
 					 
 					this.indexData = res.data
+					if(this.isinit){
+						this.isinit=false;
+						this.indexData2=res.data
+					}
 					this.getPie()
 				
 					
@@ -359,6 +447,27 @@
 					})
 				})
 			},
+			getData2(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+ 				
+				this.form2.startDate=this.startTime2,
+				this.form2.endDate=this.endTime2 
+				
+				API.spIncomeStatistics(this.form2).then((res) => {
+					 this.indexData2=res.data
+					
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
 			changesub(e){
 				console.log(e)
 				this.current=e
@@ -367,8 +476,12 @@
 			changedate(e) {
 				this.startTime = e.startDate
 				this.endTime = e.endDate
-			
-				 
+			},
+			changedate2(e) {
+				this.startTime2 = e.startDate
+				this.endTime2= e.endDate
+				this.popupShow2=true
+				 
 			},
 			getPie() {
 				
@@ -536,8 +649,9 @@
 	}
 	.navbar-tit {
 		color: #fff;
-		font-size: 20px;
-		padding-left: 15px;
+		font-size: 24px;
+		padding-left: 15px;
+		    padding-top: 10px;
 	}
 
 	.statisticsData {
@@ -547,7 +661,7 @@
 		padding: 12px;
 		border-radius: 8px;
 	
-		margin-top: 80px;
+		margin-top: 60px;
 	}
 
 	.statisticsDataMain {