<template>
	<view>
		<u-navbar :is-back="false">
			<view class="navbar">
				<view class="navbar-tit">收益明细</view>
				<view class="navbar-screen" @click="popupShow = true"><span>筛选</span><u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon></view>
			</view>
		</u-navbar>
		<u-popup v-model="popupShow" mode="top">
			<view class="popup-screen">
				<view class="screen">
					<view class="screen-item">
						<view class="screen-head">查询日期</view>
						<view class="screen-main">
							<u-input v-model="value" :type="type" :border="border" @click="show = true" />
							<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 active">全部</view>
							<view class="screen-entry">自行车充电</view>
							<view class="screen-entry">交流慢充</view>
							<view class="screen-entry">直流快充</view>
						</view>
					</view>
					<view class="screen-item">
						<view class="screen-head">站点</view>
						<view class="screen-main">
							<view class="screen-entry active">全部</view>
							<view class="screen-entry">荆鹏</view>
							<view class="screen-entry">长大</view>
						</view>
					</view>
					<view class="screen-item">
						<view class="screen-head">桩号</view>
						<view class="screen-main">
							<view class="screen-entry active">全部</view>
							<view class="screen-entry">A0001</view>
							<view class="screen-entry">B0001</view>
							<view class="screen-entry">A0003</view>
						</view>
					</view>
				</view>
				<view class="screen-foot">
					<view class="screen-btn-l">重置</view>
					<view class="screen-btn-r">确定</view>
				</view>
			</view>
		</u-popup>
		<view class="detailed">
			<view class="detailed-time">
				<p>2020年5月1日</p>
				<p>共收入 178.00</p>
			</view>
			<view class="detailed-list">
				<view class="detailed-item">
					<view class="detailed-item-name">
						<h4>荆鹏软件园充电站/A0001</h4>
						<p>05-01 12:00</p>
					</view>
					<view class="detailed-item-num">
						<h2>61.50</h2>
						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
					</view>
				</view>
				<view class="detailed-item">
					<view class="detailed-item-name">
						<h4>荆鹏软件园充电站/A0001</h4>
						<p>05-01 12:00</p>
					</view>
					<view class="detailed-item-num">
						<h2>61.50</h2>
						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
					</view>
				</view>
				<view class="detailed-item">
					<view class="detailed-item-name">
						<h4>荆鹏软件园充电站/A0001</h4>
						<p>05-01 12:00</p>
					</view>
					<view class="detailed-item-num">
						<h2>61.50</h2>
						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
					</view>
				</view>
			</view>
			<view class="detailed-time">
				<p>2020年5月1日</p>
				<p>共收入 178.00</p>
			</view>
			<view class="detailed-list">
				<view class="detailed-item">
					<view class="detailed-item-name">
						<h4>荆鹏软件园充电站/A0001</h4>
						<p>05-01 12:00</p>
					</view>
					<view class="detailed-item-num">
						<h2>61.50</h2>
						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
					</view>
				</view>
				<view class="detailed-item">
					<view class="detailed-item-name">
						<h4>荆鹏软件园充电站/A0001</h4>
						<p>05-01 12:00</p>
					</view>
					<view class="detailed-item-num">
						<h2>61.50</h2>
						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
					</view>
				</view>
				<view class="detailed-item">
					<view class="detailed-item-name">
						<h4>荆鹏软件园充电站/A0001</h4>
						<p>05-01 12:00</p>
					</view>
					<view class="detailed-item-num">
						<h2>61.50</h2>
						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
					</view>
				</view>
			</view>	
		</view>
		<u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				popupShow: false,
				tabbarList: [{
						iconPath: "bar-chart-box-fill",
						selectedIconPath: "bar-chart-box-fill",
						text: '统计',
						count: 0,
						isDot: true,
						customIcon: true,
					},
					{
						iconPath: "article-fill",
						selectedIconPath: "article-fill",
						text: '明细',
						midButton: true,
						customIcon: true,
					},
					{
						iconPath: "account-pin-box-fill",
						selectedIconPath: "account-pin-box-fill",
						text: '我的',
						count: 0,
						isDot: false,
						customIcon: true,
					},
				],
				current: 0,
				value: '',
				type: 'select',
				show: false,
				border: true,
				actionSheetList: [
					{
						text: '男'
					},
					{
						text: '女'
					},
					{
						text: '保密'
					}
				],
			}
		},
		methods: {
			// 点击actionSheet回调
			actionSheetCallback(index) {
				this.value = this.actionSheetList[index].text;
			}
		}
	}
</script>
<style>
	page{
		background-color: #F7F7F7;
	}
</style>
<style lang="scss" scoped>
	.popup-screen{
		padding: 20px;
		position: relative;
		.screen{
			padding-bottom: 30px;
		}
		.screen-item{
			margin-bottom: 20px;
			.screen-head{
				margin-bottom: 8px;
				font-size: 16px;
			}
			.screen-main{
				display: flex;
				flex-wrap: wrap;
				justify-content: space-between;
			}
			.screen-entry{
				width: 31%;
				padding:6px 0;
				background-color: #F2F5FA ;
				text-align: center;
				margin-bottom: 10px;
				border-radius: 3px;
			}
			.screen-entry.active{
				background-color: #185AC6;
				color:#fff;
			}
		}
		.screen-foot{
			position: fixed;
			left: 0;
			right: 0;
			bottom: 0;
			display: flex;
			height:50px;
			border-top: 1px solid #ededed;
			.screen-btn-l{
				flex: 0.2;
				text-align: center;
				line-height: 50px;
			}
			.screen-btn-r{
				flex: 0.8;
				text-align: center;
				line-height: 50px;
				background-color: #185AC6;
				color:#fff;
			}
		}
	}
	.navbar{
		display: flex;
		justify-content: space-between;
		flex: 1;
		padding: 0 15px;
	}
	.navbar-tit{
		font-size: 20px;
	}
	.navbar-screen{
		display: flex;
		align-items: center;
		span{
			margin-right: 2px;
			color:#999;
		}
	}
	.detailed-time{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 10px 20px;
		p{
			color:#666;
		}
	}
	.detailed-item{
		background-color: #fff;
		display: flex;
		justify-content: space-between;
		padding: 10px 20px;
		border-bottom: 1px solid #ededed;
		.detailed-item-name{
			h4{
				font-weight: normal;
			}
			p{
				font-size: 12px;
				margin-top: 4px;
				color:#A2A9B5;
			}
		}
		.detailed-item-num{
			display: flex;
			align-items: center;
			h2{
				margin-right: 4px;
			}
		}
	}
</style>
