From 8a899e63502939dbf034b90ba46741e0faa9023c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 08 五月 2026 18:49:32 +0800
Subject: [PATCH] 管理端bug修改

---
 app/pages/wallet/wallet.vue |   59 +++++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/app/pages/wallet/wallet.vue b/app/pages/wallet/wallet.vue
index de6359a..73b9bc2 100644
--- a/app/pages/wallet/wallet.vue
+++ b/app/pages/wallet/wallet.vue
@@ -109,10 +109,10 @@
 				<view class="sear-item">
 					<view class="sear-item-label">浜ゆ槗绫诲瀷</view>
 					<view class="sear-item-list">
-						<view  @click="checkType(0)" :class="tempType == 0?'sear-item-list-item active':'sear-item-list-item'">鍏ㄩ儴</view>
-						<view  @click="checkType(1)" :class="tempType == 1?'sear-item-list-item active':'sear-item-list-item'">璁㈠崟缁撶畻</view>
-						<view  @click="checkType(2)" :class="tempType == 2?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇</view>
-						<view  @click="checkType(4)" :class="tempType == 4?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇閫�鍥�</view>
+						<view  @click="checkType('')" :class="tempType === '' ? 'sear-item-list-item active':'sear-item-list-item'">鍏ㄩ儴</view>
+						<view  @click="checkType(0)" :class="tempType === 0 ?'sear-item-list-item active':'sear-item-list-item'">璁㈠崟缁撶畻</view>
+						<view  @click="checkType(1)" :class="tempType === 1?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇</view>
+						<view  @click="checkType(2)" :class="tempType === 2?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇閫�鍥�</view>
 						<view style="width: 216rpx; height: 0;"></view>
 					</view>
 				</view>
@@ -169,9 +169,9 @@
 				active:0,
 				wordsWidth:250,
 				tempActive :0,
-				type:0,
+				type:'',
 				words:'鍏ㄩ儴',
-				tempType :0,
+				tempType :'',
 				dateType :0,
 				dataList:[],
 				startDate:null,
@@ -196,7 +196,7 @@
 			this.active=0
 			this.wordsWidth=250
 			this.words='鍏ㄩ儴'
-			this.tempActive=0
+			this.tempActive=''
 			this.dateType=0
 			this.countData={}
 			this.tempStartDate=null
@@ -209,9 +209,21 @@
 		methods:{
 			bindChange1 (e) {
 				this.tempStartDate = e.detail.value || null
+				if (this.tempStartDate && this.tempEndDate) {
+					if (new Date(this.tempStartDate + ' 00:00:00') > new Date(this.tempEndDate + ' 00:00:00')) {
+						this.tempStartDate = this.tempEndDate
+						uni.showToast({ title: '寮�濮嬫棩鏈熶笉鑳藉ぇ浜庣粨鏉熸棩鏈�', icon: 'none' })
+					}
+				}
 			},
 			bindChange2 (e) {
-				this.tempEndDate= e.detail.value || null
+				this.tempEndDate = e.detail.value || null
+				if (this.tempStartDate && this.tempEndDate) {
+					if (new Date(this.tempStartDate + ' 00:00:00') > new Date(this.tempEndDate + ' 00:00:00')) {
+						this.tempEndDate = this.tempStartDate
+						uni.showToast({ title: '寮�濮嬫棩鏈熶笉鑳藉ぇ浜庣粨鏉熸棩鏈�', icon: 'none' })
+					}
+				}
 			},
 			formatter(type, value) {
                 if (type === 'year') {
@@ -231,14 +243,19 @@
 					this.hasNext = true
 					this.dataList=[]
 				}
-				console.log('page')
+				console.log({
+						startTime: this.startDate || this.defaultStartDate,
+						endTime: this.endDate || this.defaultEndDate,
+						type: this.type,
+						optType: this.active === 1?1:(this.active === 2?-1:'')
+					})
 				this.$u.api.driverPage({
 					capacity: 10,
 					model: {
 						startTime: this.startDate || this.defaultStartDate,
 						endTime: this.endDate || this.defaultEndDate,
-						type: this.active === 1?0:(this.active===2?1:''), 
-						objType: this.type === 1?16:( this.type === 2?17:( this.type === 3?25: (this.type === 4?1: ''))), 
+						type: this.type,
+						optType: this.active === 1?1:(this.active === 2?-1:'')
 					},
 					page: this.currentPage
 				}).then(res => {
@@ -276,6 +293,12 @@
 			},
 			comfirmDate(flag){
 				if (flag) {
+					if (!this.tempStartDate || !this.tempEndDate) {
+						return uni.showToast({
+							title: '璇烽�夋嫨璧锋鏃ユ湡',
+							icon: 'none'
+						})
+					}
 					if(new Date(this.tempEndDate+" 00:00:00").getTime() < new Date(this.tempStartDate+" 00:00:00").getTime()){
 						return uni.showToast({
 							title:'鏃ユ湡鑼冨洿涓嶆纭�',
@@ -287,8 +310,8 @@
 				} else {
 					this.startDate = null
 					this.endDate = null
-					this.tempStartDate = this.defaultStartDate
-					this.tempEndDate = this.defaultEndDate
+					this.tempStartDate = null
+					this.tempEndDate = null
 				}
 				this.getFirstPageData()
 				this.getShopSummary()
@@ -305,11 +328,11 @@
 					this.type = this.tempType
 					this.show = false
 					this.wordsWidth = 250
-					if(this.active === 0 && this.type === 0){
+					if(this.active === 0 && this.type === ''){
 						this.words = '鍏ㄩ儴'
 					}else {
 						let t1 = this.active === 1 ? '鏀跺叆 ':(this.active === 2 ? '鏀嚭 ' : '');
-						let t2 = this.type === 1 ? '璁㈠崟缁撶畻' : (this.type === 2 ? '鎻愮幇': (this.type === 3 ? '璁㈠崟缁撶畻閫�鍥�' : (this.type === 4 ? '鎻愮幇閫�鍥�' : '')))
+						let t2 = this.type === 0 ? '璁㈠崟缁撶畻' : (this.type === 1 ? '鎻愮幇': (this.type === 2 ? '鎻愮幇閫�鍥�' : ''))
 						if(t1 !='' && t2 !=''){
 							this.wordsWidth = 350
 						}
@@ -317,9 +340,9 @@
 					}
 				} else {
 					this.tempActive = 0
-					this.tempType = 0
+					this.tempType = ''
 					this.active = 0
-					this.type = 0
+					this.type = ''
 					this.words = '鍏ㄩ儴'
 					this.wordsWidth = 250
 					this.show = false
@@ -355,7 +378,7 @@
 				this.tempActive =index
 			},
 			checkType(index){
-				this.tempType =index
+				this.tempType = index
 			},
 			getFirstPageData(){
 				this.currentPage = 0

--
Gitblit v1.9.3