<template>
	<view class="box">
		<view style="flex-shrink: 0;">
			<view class="search-box">
				<view class="search" @click="goSearch">
					<view class="search-img">
						<image class="search-img1" src="../../../static/images/search.png" mode=""></image>
					</view>
					<view class="search-text">输入客户姓名/手机号</view>
				</view>
				<!-- <image @click="filterFun" class="filter" src="../../../static/images/filter.png" mode="" /> -->
			</view>
		</view>

		<!-- 选择器 -->
		<view class="boxtittab">
			<view class="tabbox" :class="{activeColor: sortFilter!=='排序'}" @click="tapsoltishow">
				{{ sortFilter }}
				<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
			</view>
			<view class="tabbox" :class="{activeColor: arriveFilter!=='到访时间'}" @click="taptimeisshow">
				{{ arriveFilter }}
				<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
			</view>
			<view class="tabbox" :class="{activeColor: receptionDuration!=='接待时长'}" @click="taptimetuisshow">
				{{ receptionDuration }}
				<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
			</view>
			<view class="tabbox" @click="screenshow">
				更多筛选<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
			</view>
		</view>

		<!-- 筛选后的数量 -->
		<view class="count" v-if="recordList.length > 0">
			筛选结果：<text>{{totalRecords}} </text>条
		</view>

		<view class="content">
			<view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;">
				<view style="width: 100%;height: 100%;padding-top: 200rpx;">
					<view style="width: 100%;text-align: center;">
						<image style="width: 220rpx;height: 200rpx;"
							src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
					</view>
					<view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
				</view>
			</view>
			<view v-if="recordList.length" class="content-tips" v-for="(item,index) in recordList" :key='index'
				@click="gotoDetail(item.id)">
				<view class="content-first">
					<view class="left">
						<view class="test">{{item.name}}</view>
						<template v-if="item.level > 0">
							<view class="img" :class="colorName[item.level]">{{ item.level | levelText }}</view>
						</template>
						<view v-if="item.clientStageName" class="clientStageName">{{ item.clientStageName }}</view>
					</view>
					<view class="right">
						<image class="right-img" src="../../../static/images/arrow-right.png" mode=""></image>
					</view>
				</view>

				<view class="content-sec">
					<view class="content-sec-lab">
						客户手机：<view class="content-sec-lab1">{{item.phone | phoneText}}</view>
					</view>

					<view class="content-sec-lab">
						负责顾问：<view class="content-sec-lab1">{{item.agentName || ''}}</view>
					</view>

					<view class="content-sec-lab"  style="line-height: 46rpx;">
						客户意向：
						<text v-if="item.demand.cusSemanticWordsList==null">暂无</text>
						<template v-else>
							<block v-for="(che,ind) in item.demand.cusSemanticWordsList" :key='ind'>
								<view class="content-sec-tips" v-if="ind<=3">{{che.name}}</view>
							</block>
						</template>
					</view>
					<view class="content-sec-lab">
						添加时间：<view class="content-sec-lab1">{{item.createTime | formatTime}}</view>
					</view>
					<view class="content-sec-num">
						<view>到访{{item.visitRecord || '--'}}次</view>
						<view>
								{{item.mm || '0'}}min/{{item.fraction || '0'}}%
						</view>
					</view>
				</view>
				<template v-if="permissions.commonly2">
					<view class="content-last">
							<!-- <view class="content-last-tab">
								<image src="/static/images/genjin-icon.png" mode="" />添加提醒</view>
						<view class="content-last-tab">
							<image src="/static/images/genjin-icon.png" mode="" />
							打电话</view> -->
						<view class="content-last-tab" @click.stop="gotoFollowUp(item)">
							<image src="/static/images/genjin-icon.png" mode="" />
							写跟进</view>
					</view>
				</template>

			</view>
		</view>
		<u-popup v-model="screenShow" mode="top">
			<view class="screen">
				<!-- 顾问选择 -->
				<view class="screen-counselor">
					<view class="screen-text">
						所属顾问
					</view>
					<view class="screen-sel" @tap="selectshow = true">
						<input v-model="screen.agentIdtext" type="text" placeholder="请选择" class="screen-inp" disabled />
						<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
					</view>
				</view>
				<view class="screen-counselor">
					<view class="screen-text">
						客户标签
					</view>
					<view class="screen-sel" @tap="selectTipshow = true">
						<input v-model="screen.cunsumerTips" type="text" placeholder="请选择" class="screen-inp"
							disabled />
						<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
					</view>
				</view>
				<!-- 录音标示 -->
				<view class="screen-record">
					<view class="screen-record-text">
						客户等级
					</view>
					<view class="screen-record-tab">
						<block v-for="(item,index) in levelList" :key="index">
							<view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
								@click="choiceLevel(index,item.value)">
								{{item.label}}
							</view>
						</block>
					</view>
				</view>
				<!-- 客户来源 -->
				<template v-if="list.length > 0">
					<view class="screen-record">
						<view class="screen-record-text">
							客户来源
						</view>
						<view class="screen-record-tab">
							<block v-for="(item, index) in list" :key="index">
								<view @tap="sourceId = item.id; sourceIndex = index "
									:class="[sourceIndex == index ? 'screen-record-chose':'screen-record-nochose']">
									{{ item.sourceName }}
								</view>
							</block>
						</view>
					</view>
				</template>
				<view class="screen-record">
					<view class="screen-record-text">
						到访次数
					</view>
					<view class="screen-record-tab">
						<block v-for="(item,index) in visitList" :key="index">
							<view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
								@click="choice(index, item.value)">
								{{item.label}}
							</view>
						</block>
						<!-- <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']"
							@click="screenvisitRecord(1)">
							首次到访
						</view>
						<view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']"
							@click="screenvisitRecord(2)">
							2次到访
						</view>
						<view :class="[screen.visitRecord==3?'screen-record-chose':'screen-record-nochose']"
							@click="screenvisitRecord(3)">
							3次到访
						</view>
						<view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']"
							@click="screenvisitRecord(4)">
							3次以上
						</view> -->
					</view>
				</view>
				<view class="screen-foot">
					<view class="screen-foot-reset" @click="reset">
						重置
					</view>
					<view class="screen-foot-sure" @click="screensure">
						确定
					</view>
				</view>
			</view>
		</u-popup>
		<!-- 选择顾问的选择框 -->
		<u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
		<!-- 客户标签 -->
		<u-select v-model="selectTipshow" :list="findKeywordsList" @confirm="selectCallback"></u-select>

		<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>

		<u-popup v-model="timeshow" mode="bottom">
			<view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
				@click="tabtimetap(5, '到访时间')">
				全部</view>
			<view class="timeview" :style="{ color: activeTotal == 0 ? '#2B6EFF' : '#333333' }"
				@click="tabtimetap(0, '今天')">
				今天</view>
			<view class="timeview" :style="{ color: activeTotal == 1 ? '#2B6EFF' : '#333333' }"
				@click="tabtimetap(1, '昨天')">
				昨天</view>
			<view class="timeview" :style="{ color: activeTotal == 2 ? '#2B6EFF' : '#333333' }"
				@click="tabtimetap(2, '近7天')">
				近7天</view>
			<view class="timeview" :style="{ color: activeTotal == 3 ? '#2B6EFF' : '#333333' }"
				@click="tabtimetap(3, '近30天')">
				近30天</view>
			<view class="timeview" :style="{ color: activeTotal == 4 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(4)">
				自定义</view>
		</u-popup>
		<u-popup v-model="timetushow" mode="bottom">
			<view class="timeview" :style="{ color: activeTotal2 == 0 ? '#2B6EFF' : '#333333' }"
				@click="timetap(0, '接待时长')">全部
			</view>
			<view class="timeview" :style="{ color: activeTotal2 == 1 ? '#2B6EFF' : '#333333' }"
				@click="timetap(1, '0~15min')">
				0~15min</view>
			<view class="timeview" :style="{ color: activeTotal2 == 2 ? '#2B6EFF' : '#333333' }"
				@click="timetap(2, '15~30min')">
				15~30min</view>
			<view class="timeview" :style="{ color: activeTotal2 == 3 ? '#2B6EFF' : '#333333' }"
				@click="timetap(3, '30~60min')">
				30~60min</view>
			<view class="timeview" :style="{ color: activeTotal2 == 4 ? '#2B6EFF' : '#333333' }"
				@click="timetap(4, '60~90min')">
				60~90min</view>
			<view class="timeview" :style="{ color: activeTotal2 == 5 ? '#2B6EFF' : '#333333' }"
				@click="timetap(5, '90min以上')">
				90min以上</view>
		</u-popup>

		<u-popup v-model="soltishow" mode="bottom">
			<view class="soltishow" @tap.stop @touchmove.stop>
				<block v-for="(item, index) in orderBylist" :key="index">
					<view class="soltishow-item" 
					:style="orderBy==item.value?'color: #2B6EFF':''" @click="selectCallback2(item)">
						{{ item.label }}
					</view>
				</block>
			</view>
		</u-popup>
		<!-- <u-select v-model="soltishow" :list="orderBylist" @confirm="selectCallback2"></u-select> -->

		<!-- 底部导航栏 -->
<!-- 		<u-tabbar :mid-button="true" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList">
		</u-tabbar> -->
	</view>

</template>

<script>
	import tabbarList from '@/utils/tabbar.js'
	let _this
	export default {
		data() {
			return {
				// tabbar配置项
				current: 1,
				tabbarList: tabbarList,
				//--- end --- tabbar配置项
				orderBylist: [{
						label: '创建时间倒序',
						value: '1'
					},
					{
						label: '创建时间正序',
						value: '2'
					},
					{
						label: '接待时间倒序',
						value: '3'
					},
					{
						label: '接待时间正序',
						value: '4'
					},
					{
						label: '执行率正序',
						value: '5'
					},
					{
						label: '执行率倒序',
						value: '6'
					},
					{
						label: '接访次数正序',
						value: '7'
					},
					{
						label: '接访次数倒序',
						value: '8'
					},
				],
				value: '',
				screenShow: false,
				selectshow: false,
				selectTipshow: false,
				buildingID: '',
				screen: {
					agentId: '',
					agentIdtext: '',
					visitRecord: [],
					record: [],
					cunsumerTips: '',
					cunsumerTipsid: '',
				},
				stageList: ['未知', '到访', '意向', '定金', '成交'],
				recordList: [],
				nextPage: 1,
				totalRecord: '',
				totalRecords: '', // 总条数
				freeList: [],
				userInfo: {},
				findKeywordsList: [],
				isnorefresh: '',
				activeTotal: 5,
				activeTotal2: 0,
				totalTimeShow: false,
				timeshow: false,
				timetushow: false,
				soltishow: false,
				staTime: '',
				endtime: '',
				orderBy: '', // 排序的id
				permissions: {
					commonly1: false,
					commonly2: false
				},
				list: [], // 客户来源列表
				sourceId: '', // 选中的客户来源id
				sourceIndex: -1, // 选中项的下标

				// 不同等级之间的颜色
				colorName: [
					'', "A", "B", "C", "D"
				],


				// 筛选文字展示
				sortFilter: '排序',
				arriveFilter: '到访时间',
				receptionDuration: '接待时长',
				visitList: [{
					label: '首次到访',
					value: 1,
					isShow: false,
				}, {
					label: '2次到访',
					value: 2,
					isShow: false,
				}, {
					label: '3次到访',
					value: 3,
					isShow: false,
				}, {
					label: '3次以上',
					value: 4,
					isShow: false,
				}, ],
				levelList: [{
					label: 'A',
					value: 1,
					isShow: false,
				}, {
					label: 'B',
					value: 2,
					isShow: false,
				}, {
					label: 'C',
					value: 3,
					isShow: false,
				}, {
					label: 'D',
					value: 4,
					isShow: false,
				}, ],
				isRefresh: false
			}
		},


		onLoad(options) {
			// _this = this
			// this.isnorefresh = 'refresh';
			// this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
			// console.log(this.userInfo.showPhoneStatus)
			// if (this.isnorefresh == 'refresh') {
			// 	this.buildingID = uni.getStorageSync('buildingID').id;
			// 	this.nextPage = 1;
			// 	this.recordList = []
			// 	this.getFreeList()
			// 	this.getfindKeywordsList()
			// 	this.getFromSource();
			// 	this.isRefresh = false;
			// 	this.getMyCustom()
			// }
		},

		onPullDownRefresh() {
			this.nextPage = 1;
			this.isRefresh = true;
			this.resetFilter()
			this.reset()
			this.getFreeList()
			this.getfindKeywordsList()
			this.getFromSource();
			this.getMyCustom();

			setTimeout(() => {
				uni.stopPullDownRefresh()
			}, 2000)
		},

		onShow() {
			let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
			this.permissions.commonly1 = newmenulist.khgl_ck;
			this.permissions.commonly2 = newmenulist.khgl_gj;
			_this = this
			this.isnorefresh = 'refresh';
			this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
			// console.log(this.userInfo.showPhoneStatus)
			this.nextPage = 1;
			this.$forceUpdate()
			this.recordList = []
			this.buildingID = uni.getStorageSync('buildingID').id;
			this.getMyCustom()
			if (this.isnorefresh == 'refresh') {
				this.getFreeList()
				this.getfindKeywordsList()
				this.getFromSource();
				this.isRefresh = false;
				this.getMyCustom()
			}
		},
		onReachBottom() {
			if (this.totalRecord == this.nextPage) {
				uni.showToast({
					icon: 'none',
					title: '到底了',
					duration: 2000
				});
				return
			} else {
				this.isRefresh = false;
				this.nextPage += 1;
				this.getMyCustom();
			}
		},
		methods: {
			filterFun(){

			},
			//  过滤
			resetFilter() {
				this.sortFilter = '排序';
				this.orderBy = null;
				this.arriveFilter = '到访时间';
				this.staTime = '';
				this.endtime = '';
				this.nextPage = 1;
				this.activeTotal = 5;
				this.recordList = [];
				this.receptionDuration = '接待时长';
				this.activeTotal2 = 0;
			},


			// 获取客户来源
			getFromSource() {
				this.$u.get('customer/findCustomerSourceList', {
					houseId: this.buildingID
				}).then(res => {
					console.log('我进来了')
					this.list = res
				})
			},


			tapsoltishow() {
				this.soltishow = true;
			},
			taptimetuisshow() {
				this.timetushow = true;
			},
			taptimeisshow() {
				this.timeshow = true;
			},
			//选择标签
			selectCallback2(e) {
				this.sortFilter = e.label;
				this.orderBy = e.value;
				this.nextPage = 1;
				this.recordList = [];
				this.soltishow = false
				this.isRefresh = false;
				this.getMyCustom();
			},
			//选择录音时长
			timetap(index, text) {
				if (text) this.receptionDuration = text
				this.timetushow = false;
				this.activeTotal2 = index;
				this.nextPage = 1;
				this.recordList = [];
				this.isRefresh = false;
				this.getMyCustom();
			},
			//时间选择
			tabtimetap(index, text) {
				this.timeshow = false;
				if (text) this.arriveFilter = text
				if (index == 4) {
					this.totalTimeShow = true;
				} else {
					this.activeTotal = index;
					this.staTime = '';
					this.endtime = '';
					this.nextPage = 1;
					this.isRefresh = false;
					this.recordList = [];
					this.getMyCustom();
				}
			},
			//自定义时间
			totalTimeChange(e) {
				this.staTime = e.startDate;
				this.endtime = e.endDate;
				this.activeTotal = 4;
				this.nextPage = 1;
				this.recordList = [];
				this.isRefresh = false;
				this.arriveFilter = this.staTime + '-' + this.endtime
				this.getMyCustom();
			},
			recordclick(i) {
				if (this.screen.record == i) {
					this.screen.record = null
				} else {
					this.screen.record = i
				}
			},
			choice(index, e) {
				if (this.visitList[index].isShow == true) {
					this.visitList[index].isShow = false;
					for (var i = 0; i < this.screen.visitRecord.length; i++) {
						if (this.screen.visitRecord[i] === e) {
							this.screen.visitRecord.splice(i, 1);
						}
					}
				} else {
					this.visitList[index].isShow = true;
					console.log(this.screen)
					this.screen.visitRecord.push(e)
				}
			},
			choiceLevel(index, e) {
				if (this.levelList[index].isShow == true) {
					this.levelList[index].isShow = false;
					for (var i = 0; i < this.screen.record.length; i++) {
						if (this.screen.record[i] === e) {
							this.screen.record.splice(i, 1);
						}
					}
				} else {
					this.levelList[index].isShow = true;
					this.screen.record.push(e)
				}
			},
			screenvisitRecord(i) {
				if (this.screen.visitRecord == i) {
					this.screen.visitRecord = ''
				} else {
					this.screen.visitRecord = i
				}
			},
			// 客户详情
			gotoDetail(id) {
				if (this.permissions.commonly1 == true) {
					uni.navigateTo({
						url: `/pages/center/consumer/consumerDetail?id=${id}`
					})
				}
			},
			getMyCustom() {
				let dateType = 0;
				let recDurationInterval = 0;
				let orderBy = 0;
				if (this.activeTotal == 5) {
					dateType = null;
				} else if (this.activeTotal == 4) {
					dateType = null;
				} else {
					dateType = this.activeTotal;
				}

				if (this.activeTotal2 == 0) {
					recDurationInterval = null
				} else {
					recDurationInterval = this.activeTotal2
				}

				if (this.orderBy == 0) {
					orderBy = null;
				} else {
					orderBy = this.orderBy;
				}

				var parames = {
					pageNum: this.nextPage,
					pageSize: 10,
					query: {
						projectId: this.buildingID,
						keywordsId: this.screen.cunsumerTipsid,
						agentId: this.screen.agentId,
						dateType: dateType,
						staDate: this.staTime,
						endDate: this.endtime,
						recDurationInterval: recDurationInterval,
						orderBy: orderBy,
						sourceId: this.sourceId
					}
				};
				console.log(this.screen.visitRecord)
				if (this.screen.visitRecord.length > 0) {
					parames.query.visitRecords = this.screen.visitRecord.join(',');
				}
				if (this.screen.record.length > 0) {
					parames.query.level = this.screen.record.join(',');
				}
				this.$u.post("/customer/customerManagement", parames).then(data => {

					// if (this.staTime && this.endtime) {
					// 	this.receptionDuration = `${this.staTime}-${this.endtime}`
					// }
					var list = data.results || [];
					console.log(list)
					list.forEach(item => {
						if (item.demand.cusSemanticWordsList != null) {
							item.demand.cusSemanticWordsList.forEach(che => {
								if (che.isInterval == 0) {
									che.name = che.name + che.unit + '-' + che.endName + che.unit;
								}
							})
						}
					})
					if (this.isRefresh) {
						this.recordList = list;
					} else {
						this.recordList = [...this.recordList, ...list];
					}
					this.totalRecord = data.totalPage;
					this.totalRecords = data.totalRecord;
				})
			},
			//获取顾问列表
			getFreeList() {
				this.freeList = []
				this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
					houseId: this.buildingID
				}).then(res => {
					this.freeList = res;
					this.freeList.forEach(item => {
						item.label = item.name;
						item.value = item.accountId
					})
				})
			},
			//获取客户标签
			getfindKeywordsList() {
				this.findKeywordsList = []
				this.$u.post("/customer/findKeywords", {
					houseId: this.buildingID
				}).then(res => {
					res.forEach(item => {
						if (item.isInterval == 0) {
							item.label = item.name + item.unit + '-' + item.endName + item.unit;
						} else {
							item.label = item.name
						}
						item.value = item.id;
					})
					this.findKeywordsList = res;
				})
			},
			// 筛选
			screenshow() {
				this.screenShow = true
			},
			//选择顾问
			actionSelectCallback(e) {
				this.screen.agentId = e[0].value;
				this.screen.agentIdtext = e[0].label;
			},
			//选择标签
			selectCallback(e) {
				this.screen.cunsumerTips = e[0].label;
				this.screen.cunsumerTipsid = e[0].value;
			},
			//重置
			reset() {
				this.screen = {
					agentId: '',
					agentIdtext: '',
					visitRecord: [],
					record: [],
					cunsumerTips: '',
					cunsumerTipsid: '',
					level: ''
				}
				this.visitList.map(i => {
					i.isShow = false
				})
				this.levelList.map(i => {
					i.isShow = false
				})
				this.nextPage = 1;
				this.recordList = [];
				this.sourceId = '';
				this.sourceIndex = -1;
				this.isRefresh = false;
				this.getMyCustom();
			},
			//筛选确认
			screensure() {
				this.nextPage = 1;
				this.recordList = [];
				this.screenShow = false;
				this.isRefresh = false;
				this.getMyCustom();
			},
			goSearch() {
				uni.navigateTo({
					url: '/pages/center/consumer/consumerSearch'
				});
			},
			gotoFollowUp(item) {
				uni.navigateTo({
					url: `/pages/center/consumer/newFollowup/newFollowup?id=${item.id}&level=${item.level}&clientStageName=${item.clientStageName}`
				})
			},
		},

		filters: {
			// 筛选等级展示文字
			levelText(level) {
				let str = '';
				switch (Number(level)) {
					case 1:
						str = "A"
						break;
					case 2:
						str = "B"
						break;
					case 3:
						str = "C"
						break;
					case 4:
						str = "D"
						break;
					default:
						str = ''
						break;
				}
				return str
			},

			// 加密手机
			phoneText(mobile) {
				if (!mobile) return '--'
				if (_this.userInfo.showPhoneStatus == 1) return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
				else return mobile
			},

			// 格式化时间
			formatTime(time) {
				if (!time) return
				return time.substring(5, time.length)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		width: 100vw;
		min-height: calc(100vh - var(--window-top));
		background: #F8F8F8;
		display: flex;
		flex-direction: column;

		.content {
			flex-grow: 1;
		}
	}

	.timeview {
		height: 90rpx;
		line-height: 90rpx;
		width: 100%;
		text-align: center;
		border-bottom: 1rpx solid #F8F8F8;
	}

	//时间切换的样式
	.boxtittab {
		position: sticky;
		top: var(--window-top);
		z-index: 999;
		width: 100;
		height: 72rpx;
		background: #FFFFFF;
		flex-shrink: 0;
		display: flex;
		align-items: center;

		.tabbox {
			flex: 1;
			height: 100%;
			text-align: center;
			line-height: 72rpx;
			color: #666666;
			font-size: 28rpx;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			/* 将对象作为弹性伸缩盒子模型显示 */
			-webkit-line-clamp: 1;
			/* 控制最多显示几行 */
			-webkit-box-orient: vertical;
			/* 设置或检索伸缩盒对象的子元素的排列方式 */
		}
		.activeColor{
			color: #2671E2;
			font-weight: bold;
		}
	}

	.soltishow {
		width: 100%;
		min-height: 40vh;

		.soltishow-item {
			width: 100%;
			height: 80rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}

	.search-box {
		width: 100%;
		height: 102rpx;
		background: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		.filter{
			width: 40rpx;
			height: 40rpx;
			margin-left: 30rpx;
		}

		.search {
			width: 620rpx;
			height: 70rpx;
			display: flex;
			align-items: center;
			background: #F8F8F8;
			border-radius: 33rpx;

			.search-img {
				width: 26rpx;
				height: 30rpx;
				margin-left: 20rpx;

				.search-img1 {
					width: 100%;
					height: 100%;
					margin-top: 2rpx;
				}
			}

			.search-text {
				font-size: 28rpx;
				font-weight: 400;
				color: #999999;
				margin-left: 10rpx;
			}
		}

		.search-screen {
			width: 40rpx;
			height: 40rpx;
			margin-left: 30rpx;

			.search-screen1 {
				width: 100%;
				height: 100%;
			}
		}
	}



	.count {
		width: 100%;
		height: 82rpx;
		line-height: 82rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: #f8f8f8;
		font-size: 30rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;

		text {
			color: #E7483C;
		}
	}


	.content {
		.content-tips {
			background: #fff;
			margin-bottom: 20rpx;
			.content-first {
				padding: 19rpx 30rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				box-sizing: border-box;
				color: #292929;
				height: 90rpx;
				font-size: 30rpx;

				.left {
					display: flex;
					align-items: center;

					.img {
						width: 48rpx;
						height: 48rpx;
						line-height: 48rpx;
						text-align: center;
						margin-right: 16rpx;
						background: #E6625B;
						border-radius: 6rpx;
						font-size: 28rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #FFFFFF;
					}

					.clientStageName {
						margin-right: 20rpx;
						padding: 0 16rpx;
						font-size: 28rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #FF981E;
						height: 48rpx;
						line-height: 48rpx;
						background: #FFFFFF;
						border-radius: 4rpx;
						border: 1rpx solid #FF981E;
						box-sizing: border-box;
					}

					.A {
						background: #E6625B;
					}

					.B {
						background: #FF981E;
					}

					.C {
						background: #F6BD16;
					}

					.D {
						background: #E6625B;
					}


					.test {
						height: 42rpx;
						font-size: 30rpx;
						font-family: PingFangSC-Medium, PingFang SC;
						font-weight: 500;
						color: #333333;
						line-height: 42rpx;
						margin-right: 16rpx;
					}
				}

				.right {
					display: flex;
					align-items: center;
					color: #2671E2;
					font-size: 30rpx;

					.right-img {
						margin: 5rpx 0 0 10rpx;
						width: 14rpx;
						height: 30rpx;
					}
				}
			}

			.content-sec {
				border-top: 1rpx solid #E0E0E0;
				padding: 0 28rpx 28rpx;
				position: relative;

				.content-sec-lab {
					margin-top: 28rpx;
					display: flex;
					font-size: 30rpx;
					font-weight: 400;
					color: #333;
					line-height: 42rpx;

					.content-sec-lab1 {
						color: #333333;
					}

					.content-sec-tips {
						padding: 0 20rpx;
						height: 48rpx;
						background: #F4F8FD;
						border-radius: 6rpx;
						max-width: 160rpx;
						text-align: center;
						line-height: 48rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						font-weight: 400;
						margin-right: 12rpx;
						box-sizing: border-box;
						font-size: 28rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						color: #2671E2;
					}
				}

				.content-sec-num {
					position: absolute;
					width: 196rpx;
					height: 112rpx;
					border-radius: 8rpx;
					top: 28rpx;
					right: 30rpx;
					padding: 16rpx 20rpx;
					background: #F4F8FD;
					color: #2671E2;
					line-height: 40rpx;
					text-align: center;
				}
			}

			.content-last {
				display: flex;
				justify-content: flex-end;
				align-items: center;
				padding-bottom: 30rpx;

				.content-last-tab {
					width: 214rpx;
					height: 70rpx;
					line-height: 70rpx;
					background: #FFFFFF;
					border-radius: 8rpx;
					border: 1rpx solid #2671E2;
					box-sizing: border-box;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #2671E2;
					font-size: 30rpx;
					margin-right: 30rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					image{
						width: 40rpx;
						height: 40rpx;
						margin-right: 12rpx;
					}
				}
			}

		}
	}

	// 这是弹出层
	.screen {

		// box-sizing: border-box;
		// padding: 0 30rpx;
		.screen-counselor {
			display: flex;
			height: 106rpx;
			// padding: 40rpx 30rpx 36rpx 30rpx;
			padding: 0 30rpx;
			box-sizing: border-box;
			border-bottom: 1px solid #E0E0E0;

			.screen-text {
				flex-shrink: 0;
				margin: 40rpx 0 36rpx 0;
				font-size: 30rpx;
				font-weight: 400;
				color: #333333;
				line-height: 30rpx;
			}

			.screen-sel {
				flex-grow: 1;
				display: flex;
				justify-content: flex-end;
				align-items: center;
				margin-left: 60rpx;

				.screen-sel-img {
					flex-shrink: 0;
					margin: 40rpx 0 36rpx 0;
					width: 14rpx;
					height: 30rpx;
				}

				.screen-inp {
					padding: 0 20rpx;
					text-align: right;
				}
			}
		}

		.screen-record {
			height: 192rpx;
			// width: 100%;
			overflow: hidden;
			padding: 0 30rpx;
			box-sizing: border-box;
			border-bottom: 1px solid #E0E0E0;

			.screen-record-text {
				margin-top: 36rpx;
				font-size: 30rpx;
				font-weight: 400;
				color: #333333;
				line-height: 30rpx;
			}

			.screen-record-tab {
				margin-top: 30rpx;
				display: flex;

				// justify-content: space-around;
				.screen-record-chose {
					width: 156rpx;
					height: 60rpx;
					background: #2671E2;
					border-radius: 4rpx;
					border: 1px solid #2671E2;
					text-align: center;
					line-height: 60rpx;
					margin-right: 22rpx;
					color: #FFFFFF;
				}

				.screen-record-nochose {
					width: 156rpx;
					height: 60rpx;
					background: #FFFFFF;
					border-radius: 4rpx;
					border: 1px solid #C9C9C9;
					text-align: center;
					line-height: 60rpx;
					margin-right: 22rpx;
				}

			}
		}

		.screen-foot {
			width: 100%;
			height: 88rpx;
			display: flex;

			.screen-foot-reset {
				width: 50%;
				text-align: center;
				height: 88rpx;
				line-height: 88rpx;
				font-size: 30rpx;
				font-weight: 400;
				color: #666666;
			}

			.screen-foot-sure {
				width: 50%;
				text-align: center;
				line-height: 88rpx;
				height: 88rpx;
				font-size: 30rpx;
				font-weight: 400;
				color: #FFFFFF;
				background: #2671E2;
			}
		}
	}
</style>
