zhengkaixin 2 years ago
parent
commit
9708b414a9
2 changed files with 49 additions and 5 deletions
  1. 2 2
      pagesFinance/statistics/index.vue
  2. 47 3
      pagesFinance/user/withdraw.vue

+ 2 - 2
pagesFinance/statistics/index.vue

@@ -19,7 +19,7 @@
 						<h2>{{indexData.todayAmount}}元</h2>
 					</view>
 					<view class="statisticsData-foot">
-						<p>昨日流水</p>
+						<p>昨日</p>
 						<h2 style="margin-left: 10px;">{{indexData.yesterdayAmount}}元</h2>
 					</view>
 				</view>
@@ -34,7 +34,7 @@
 						<h2>{{indexData.todayEQNum}}笔</h2>
 					</view>
 					<view class="statisticsData-foot">
-						<p>本月流水</p>
+						<p>本月</p>
 						<h2 style="margin-left: 10px;">{{indexData.thisMonthAmount}}元</h2>
 					</view>
 				</view>

+ 47 - 3
pagesFinance/user/withdraw.vue

@@ -20,7 +20,16 @@
 				<b>上次提现时间</b><span>{{info.startTime}}</span>
 			</view>
 			<view class="withdraw-head">
-				<b>本次提现时间</b><span>{{info.endTime}}</span>
+				<b>本次提现时间</b>
+					
+					<u-picker mode="time" v-model="showEndTime" :default-time="endTime" :params="params" @confirm="bindDateChange0"></u-picker>
+				<span @click="showEndTime=true">
+				
+				<view class="uni-input">{{info.endTime}} <text class="iconfont more">
+					&#xe600;
+				</text></view>
+			 
+				</span>
 			</view>
 			<view class="withdraw-head">
 				<b>此期间累计产生订单数</b><span>{{info.total}}笔</span>
@@ -117,8 +126,20 @@
 	export default {
 		data() {
 			return {
+				
+				params: {
+						year: true,
+						month: true,
+						day: true,
+						hour: true,
+						minute: true,
+						second: true,
+						timestamp: true, 
+				},
+								
 				info:{},
 				code:"",
+				showEndTime:false,
 				value: '',
 				type: 'number',
 				nowTime:"",
@@ -146,9 +167,11 @@
 					home:{
 						accountBalance:0
 					},
+					endTime:null
 			}
 		},
 		onReady() {
+			this.endTime=parseUnixTime(new Date(),"{y}-{m}-{d} 00:00:00")
 		
 			//this.getHomePage()
 		},
@@ -157,6 +180,24 @@
 			this.getHomePage()
 		},
 		methods: {
+			bindDateChange0(e){
+				console.log(e)
+				var key=e.year+"/"+e.month+"/"+e.day+" "+e.hour+":"+e.minute+":"+e.second;
+				var endTime=parseUnixTime(new Date(key))
+				
+				if(endTime<this.nowTime){
+					this.endTime=parseUnixTime(new Date(key))
+					
+					this.info.endTime=this.endTime
+					this.queryWithdrawInfo(this.stationObj.id)
+				}else{
+					uni.showToast({
+						title:"结束时间不能大于当前时间"
+					})
+				}
+				
+			},
+			
 			ckdownload(){
 				//this.value=this.info.amount
 				if(!this.stationObj.id){
@@ -168,7 +209,9 @@
 				}
 				
 				API.profitDetailsExcel({
-					stationId:this.stationObj.id
+					stationId:this.stationObj.id,
+					startTime:this.info.startTime,
+					endTime:this.info.endTime
 				}).then((resDown) => {
 					// uni.downloadFile({
 					// 	url: resDown.data, //仅为示例,并非真实的资源
@@ -253,7 +296,8 @@
 					mask: true,
 				})
 				API.queryWithdrawInfo({
-					stationId:id
+					stationId:id,
+					endTime:this.endTime
 				}).then((res) => {
 					this.info=res.data;