| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544 | <template>	<view class="page">		<public-module></public-module>		<view class="flexd">			<view class="headerFilter dis a-c j-s">				<view class="drop dis a-c j-s" @tap="searchPopup">					<image src="/static/image/addStaff/screen.png" mode="" style="width: 18px;height: 18px;"></image>					<text>全部筛选</text>					<u-icon name="arrow-down-fill" color="#9A9A9A" size="16"></u-icon>				</view>				<text>收入¥{{sumAmountSR?sumAmountSR:0}}</text>				<text>支出¥{{sumAmountZC?sumAmountZC:0}}</text>			</view>			<view :class="['dropdown-content', { 'show': showDropdown }]" @tap="searchPopup">				<view :class="['dropdown-content1','dis','f-c','j-s', { 'show1': showDropdown }]" @tap.stop.prevent>					<view style="padding: 0 16px; box-sizing: border-box;">						<view class="term">							<text>业务板块</text>							<view class="dis  a-c f-wrap j-start" style="margin-top: 5px;">								<view class="status-data"									:class="{'active':item.dictValue==pageRequest.businessSegmentsType}"									v-for="(item,index) in businessSegmentsSZTypeList"									@tap.stop.prevent="statusclick('businessSegmentsType',item.dictValue)" :key="index">									{{item.dictTag}}								</view>							</view>						</view>						<view class="term">							<text>收支类型</text>							<view class="dis  a-c f-wrap j-start" style="margin-top: 5px;">								<view class="status-data "									:class="{'active':item.dictValue==pageRequest.incomeAndExpensesType,'disableSelection':!incomeAndExpensesDisabled.includes(item.dictValue)}"									v-for="(item,index) in incomeAndExpensesTypeList"									@tap.stop.prevent="statusclick('incomeAndExpensesType',item.dictValue)"									:key="index">									{{item.dictTag}}								</view>							</view>						</view>						<view class="term">							<text>交易类型</text>							<view class="dis  a-c f-wrap j-start" style="margin-top: 5px;">								<view class="status-data"									:class="{'active':item.dictValue==pageRequest.transactionType,'disableSelection':!transactionDisabled.includes(item.dictValue)}"									v-for="(item,index) in moneyAttrTypeList"									@tap.stop.prevent="statusclick('transactionType',item.dictValue)" :key="index">									{{item.dictTag}}								</view>							</view>						</view>						<view class="term">							<text>筛选日期</text>							<view class="dis  a-c f-wrap j-start" style="margin-top: 5px;">								<view class="status-data" :class="item.value==pageRequest.dateQueryType? 'active':''"									v-for="(item,index) in dateList" @tap="dateclick(index)" :key="index">									{{item.label}}								</view>								<view class="dis a-c">									<view class="status-data" :class="startShow? 'active' :''" @tap="startShowmethod()">										<text v-if="pageRequest.startDate!=''">{{pageRequest.startDate}}</text>										<text v-else>{{transformTime()}}</text>									</view>									<text style="margin: 0 8px;font-size: 12px;">至</text>									<view class="status-data" :class="endShow? 'active' :''" @tap="endShowmethod()">										<text v-if="pageRequest.endDate!=''">{{pageRequest.endDate}}</text>										<text v-else>{{transformTime()}}</text>									</view>								</view>							</view>						</view>					</view>					<view class="operateBtn dis ">						<view class="cancel dis a-c j-c" @click="showDropdown=false">							取消						</view>						<view class="confirm dis a-c j-c" @click="querysearch">							确定						</view>					</view>				</view>			</view>		</view>		<view class="" style="padding-top: 52px;">			<view class="yshoudata" v-for="(item,index) in dataList" :key="index" @click="details(item)">				<view class=" dis f-c content">					<view class="dis a-c j-s">						<view class="dis a-c" v-if="item.transactionType==1">							<image src="/static/image/wallet/shouxu.png" mode="">							</image>							<text style="margin-left: 5px;font-size: 14px;color: #333;">车险</text>							<image v-if="item.checkStatus==1" src="/static/image/wallet/zidong.png" mode=""								style="margin-left: 20px;width: 20px;height: 20px;">							</image>							<image v-else src="/static/image/wallet/rengong.png" mode=""								style="margin-left: 20px;width: 20px;height: 20px;">							</image>						</view>						<view class="dis a-c" v-if="item.transactionType==2">							<image src="/static/image/wallet/tuiguang.png" mode="">							</image>							<text style="margin-left: 5px;font-size: 14px;color: #333;">推广</text>							<image v-if="item.checkStatus==1" src="/static/image/wallet/zidong.png" mode=""								style="margin-left: 20px;width: 20px;height: 20px;">							</image>							<image v-else src="/static/image/wallet/rengong.png" mode=""								style="margin-left: 20px;width: 20px;height: 20px;">							</image>						</view>						<view class="dis a-c" v-if="item.transactionType==3">							<image src="/static/image/wallet/tixian.png" mode="">							</image>							<text style="margin-left: 5px;font-size: 14px;color: #333;">提现</text>							<text style="margin-left: 5px;font-size: 24rpx;color: #118A3F;"								v-if="item.auditingStatus!='驳回'">{{item.auditingStatus}}</text>							<text style="margin-left: 5px;font-size: 24rpx;color: #FF5600;"								v-if="item.auditingStatus=='驳回'">{{item.auditingStatus}}</text>						</view>						<view class="dis a-c" v-if="item.transactionType==4">							<image src="/static/image/wallet/tuikuan.png" mode="">							</image>							<text style="margin-left: 5px;font-size: 14px;color: #333;">退款</text>						</view>						<text style="font-size: 14px;font-weight: bold;"							:style="{ color: item.transactionType == 3 ? '#333' : '#FF5600' }">{{item.transactionType==3?'-':'+'}}¥{{item.amount}}</text>					</view>					<text v-if="!['3','4'].includes(item.transactionType)">订单号:{{item.subOrderNo}}</text>					<text v-if="['3','4'].includes(item.transactionType)">交易号:{{item.auditiingId}}</text>					<view class="dis a-c j-s">						<text>{{item.createTime}}</text>						<text v-if="!['3','4'].includes(item.transactionType)">车牌号:{{item.licenseNo}}</text>					</view>				</view>			</view>		</view>		<!-- 回到顶部 -->		<u-picker v-model="startShow" mode="time" :params="params" @confirm="startconfirm"></u-picker>		<u-picker v-model="endShow" mode="time" :params="params" @confirm="endconfirm"></u-picker>	</view></template><script>	import {		mapState	} from "vuex"	export default {		data() {			return {				params: {					year: true, //年					month: true, //月					day: true, //日					hour: false,					minute: false,					second: false,				},				sumAmountSR: 0, //总收入				sumAmountZC: 0, //总支出				dataList: [],				startShow: false,				endShow: false,				timespecifications: null,				pageRequest: {					businessSegmentsType: 0, //业务板块					dateQueryType: 0, //日期类型					incomeAndExpensesType: 0, //收支类型					transactionType: 0, //交易类型					userId: "",					endDate: "",					startDate: "",					pageNum: 1,					pageSize: 20,				},				showDropdown: false,				businessSegmentsSZTypeList: [],				incomeAndExpensesTypeList: [],				//交易类型字典				moneyAttrTypeList: [],				jiaoyiList: [{						label: '车险',						value: 1,						src: "/static/image/wallet/shouxu.png"					},					{						label: '推广费',						value: 2,						src: "/static/image/wallet/tuiguang.png"					},					{						label: '提现',						value: 3,						src: "/static/image/wallet/tixian.png"					}				],				//日期筛选list				dateList: [{						label: '全部',						value: 0,					},					{						label: '一周内',						value: 1,					},					{						label: '一个月内',						value: 2,					},					{						label: '三个月内',						value: 3,					},					{						label: '六个月内',						value: 4,					},				],				incomeAndExpensesDisabled: ['0', '1', '2'],				transactionDisabled: ['0', '1', '2', '3', '4'],			}		},		computed: {			...mapState(['userInfo'])		},		onShow() {},		onLoad() {			this.pageRequest.userId = this.userInfo.sysUser.id;			this.getDictionary('businessSegmentsSZType'); //业务板块			this.getDictionary('incomeAndExpensesType'); //收支类型			this.getDictionary('moneyAttrType'); //交易类型			this.queryList();		},		methods: {			details(item) {				switch (item.transactionType) {					case '1':						this.navigate({								url: "/pages/wallet/billInfo1?companyId=" + item.subOrderNo,							},							"navigateTo", true);						break;					case '2':					case '3':					case '4':						this.navigate({								url: "/pages/wallet/billInfo?type=" + item.transactionType + '&id=' + item.id +									'&subOrderNo=' + item.subOrderNo + '&amount=' + item.amount,							},							"navigateTo", true);						break;					default:				}			},			//状态筛选			statusclick(filed, e) {				this.pageRequest[filed] = e;				if (filed == 'businessSegmentsType') { //业务板块					switch (e) {						case '0':							this.pageRequest.incomeAndExpensesType = '0';							this.pageRequest.transactionType = "0";							this.incomeAndExpensesDisabled = ['0', '1', '2'];							this.transactionDisabled = ['0', '1', '2', '3', '4'];							break;						case '1':							this.pageRequest.incomeAndExpensesType = '0';							this.pageRequest.transactionType = "0";							this.incomeAndExpensesDisabled = ['0', '1', '2'];							this.transactionDisabled = ['0', '1', '2', '3'];							break;						case '2':							this.pageRequest.incomeAndExpensesType = '1';							this.pageRequest.transactionType = "4";							this.incomeAndExpensesDisabled = ['1'];							this.transactionDisabled = ['4'];							break;					}				}				if (filed == 'incomeAndExpensesType') { //收支类型					switch (e) {						case '0':							this.pageRequest.transactionType = "0";							this.transactionDisabled = ['0', '1', '2', '3', '4'];							break;						case '1':							if (this.pageRequest.businessSegmentsType == '2') {								this.pageRequest.transactionType = "4";								this.transactionDisabled = ['4'];							} else {								this.pageRequest.transactionType = "0";								this.transactionDisabled = ['0', '1', '2', '4'];							}							break;						case '2':							this.pageRequest.transactionType = "3";							this.transactionDisabled = ['3'];							break;					}				}			},			//查询事件			querysearch() {				this.queryList();				this.showDropdown = false;			},			async getDictionary(type) {				let res = await this.$http.get('/sysDict/dictDetails/' + type);				if (res.code == '200') {					this[type + 'List'] = res.data.ddList;				}			},			async queryList() {				let res = await this.$http.post('/sysUserAccount/findMyIncomeAndExpensesByUserId', this.pageRequest);				if (res.code == '200') {					this.dataList = res.data.data.content;					this.sumAmountSR = res.data.sumAmountSR;					this.sumAmountZC = res.data.sumAmountZC;				} else {					uni.showToast({						title: data.msg,						icon: 'none',					});				}			},			searchPopup() {				this.showDropdown = !this.showDropdown;			},			//日期筛选			dateclick(e) {				this.pageRequest.dateQueryType = e;			},			startShowmethod() {				this.startShow = true;			},			startconfirm(e) {				this.pageRequest.startDate = e.year + '-' + e.month + '-' + e.day;			},			endShowmethod() {				this.endShow = true;			},			endconfirm(e) {				this.pageRequest.endDate = e.year + '-' + e.month + '-' + e.day;			},			//当前时间			transformTime(day) {				var date = new Date();				date.setFullYear(date.getFullYear());				date.setTime(date.getTime());				var strYear = date.getFullYear();				var strDay = day ? date.getDate() - day : date.getDate();				var strMonth = date.getMonth() + 1;				if (strMonth < 10) {					strMonth = "0" + strMonth;				}				if (strDay < 10) {					strDay = "0" + strDay;				}				var datastr = strYear + "-" + strMonth + "-" + strDay;				return datastr;			},			transformTime1(month) {				var date = new Date();				date.setFullYear(date.getFullYear());				date.setTime(date.getTime());				var strYear = date.getFullYear();				var strDay = date.getDate();				var strMonth = month ? (date.getMonth() + 1) - month : date.getMonth() + 1;				if (strMonth < 10) {					strMonth = "0" + strMonth;				}				if (strDay < 10) {					strDay = "0" + strDay;				}				var datastr = strYear + "-" + strMonth + "-" + strDay;				return datastr;			},		}	}</script><style lang="scss" scoped>	.disableSelection {		color: rgba(51, 51, 51, 0.2);		pointer-events: none;		/* 禁用点击事件 */	}	.dropdown-content {		background-color: rgba(0, 0, 0, 0.6);		height: 0px;		opacity: 0;		transition: opacity 0.3s ease;		.title {			font-size: 14px;			color: #232832;			font-weight: bold;			border-bottom: 1px solid #E1E1E1;		}		.term {			padding-top: 10px;			>text {				color: #232832;				font-weight: bold;				font-size: 13px;			}		}		.operateBtn {			font-weight: bold;			font-size: 16px;			.cancel {				width: 50%;				height: 46px;				color: #0052FF;				background-color: #EAEAEA;			}			.confirm {				width: 50%;				height: 46px;				color: #fff;				background-color: #0052FF;			}		}	}	.dropdown-content1 {		background-color: #fff;		height: 0px;		overflow: hidden;		transition: height 0.4s ease;	}	.show {		height: 100vh;		opacity: 1;		/* 下拉菜单内容的最大高度 */	}	.show1 {		height: 400px;		/* 下拉菜单遮罩最大高度 */	}	.status-data {		padding: 4px 10px;		box-sizing: border-box;		margin: 0 8px 5px 0;		font-size: 12px;		border: 1px solid #eee;		cursor: pointer;	}	.active {		position: relative;		background: rgba(0, 82, 255, 0.1);		color: #0052FF;		border: 1px solid #0052FF;		font-weight: 700;	}	.active::before {		content: "";		position: absolute;		top: 0;		left: 0;		width: 10px;		height: 10px;		background-image: url("/static/image/car-insure/before.png");		background-size: cover;	}	.page {		background: #F8FAFE;	}	.flexd {		position: fixed;		left: 0;		right: 0;		z-index: 9999;	}	.yshoudata {		padding: 8px 16px;		background-color: #fff;		.content {			border-bottom: 1px solid #CFCFCF;			padding: 8px 0;			>text:nth-child(2) {				font-size: 13px;				color: #333;				margin: 4px 0;			}			>view:nth-child(3) {				color: rgba(51, 51, 51, 0.8);				font-size: 12px;			}		}		image {			width: 20px;			height: 20px;		}	}	.headerFilter {		padding: 8px 16px;		background: #F8FAFE;		z-index: 99;		.drop {			width: 106px;			height: 100%;			background: #EAEEF5;			border-radius: 6px;			padding: 5px;			text {				color: rgba(51, 51, 51, 0.8);				font-size: 14px;			}		}		>text {			color: rgba(51, 51, 51, 0.8);			font-size: 14px;		}	}</style>
 |