<template>
	<view>
		<z-paging ref="paging" v-model="list" @query="queryList">

		<template slot="top">
			<view class="head" style="background-color: rgb(255, 255, 255);">
				<view class="head-head df aic">
					<div class="input">
						<u-input placeholder="请输入店铺名称" v-model="saixuandin" @change="change">
							<div class="prefix" slot="prefix">
								<image :src="$util.img(`/upload/weapp/pageSalesman/search.png`)" mode=""></image>
							</div>
						</u-input>
					</div>
				</view>
			</view>
		</template>
		<view class="list" v-for="(item,index) in list" :key="item.id" @click="btn(item.id)">
			<div class="df aic jcsb">
				<div class="df aic">
					<image :src="$util.img(item.drugs_license)" mode="aspectFill"></image>
					<div style="margin-left: 24rpx;">{{item.title}}</div>
				</div>
				<div>{{item.store_type}}</div>
			</div>
			<div class="df aic jcsb">
				<!-- <image :src="$util.img(item.headimg)" mode=""></image> -->
				<div  class="name">{{item.contacts}}<span>{{item.phone}}</span></div>

				<div style="color: rgb(64, 158, 255);">去下单</div>
			</div>
		</view>
		<view class="list" v-for="(item,index) in lista" :key="item.id">
			<div class="df aic jcsb">
				<div class="df aic">
					<image :src="$util.img(item.drugs_license)" mode="aspectFill"></image>
					<div style="margin-left: 24rpx;">{{item.title}}</div>
				</div>
				<div>{{item.store_type}}</div>
			</div>
			<div class="df aic jcsb">
				<!-- <image :src="$util.img(item.headimg)" mode=""></image> -->
				<div  class="name">{{item.contacts}}<span>{{item.phone}}</span></div>

				<div style="color:red;">待审核</div>
			</div>
		</view>
		<view class="list" v-for="(item,index) in listb" :key="item.id">
			<div class="df aic jcsb">
				<div class="df aic">
					<image :src="$util.img(item.drugs_license)" mode="aspectFill"></image>
					<div style="margin-left: 24rpx;">{{item.title}}</div>
				</div>
				<div>{{item.store_type}}</div>
			</div>
			<div class="df aic jcsb">
				<!-- <image :src="$util.img(item.headimg)" mode=""></image> -->
				<div  class="name">{{item.contacts}}<span>{{item.phone}}</span></div>

				<div style="color: grey;">已驳回</div>
			</div>
		</view>
		</z-paging>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				id:'',
				lista:[],
				saixuandin:'',
				listb:[]
			};
		},
		onLoad(e) {
			console.log(e,'e');
			this.id=e.id
		},
		onShow() {
			this.$api.sendRequest({
				url: "/api/salasman/getStoreList",
				data: {
					member_id:this.id,
					status:1
				},
				success: res => {
					console.log(res,'客服');
					this.list=res.data
				}
			});
			this.$api.sendRequest({
				url: "/api/salasman/getStoreList",
				data: {
					member_id:this.id,
					status:0
				},
				success: res => {

					this.lista=res.data
				}
			});
			this.$api.sendRequest({
				url: "/api/salasman/getStoreList",
				data: {
					member_id:this.id,
					status:2
				},
				success: res => {

					this.listb=res.data
				}
			});
		},
		methods:{
			queryList(pageNo, pageSize) {
				// this.$refs.paging.complete(this.list);
			},
			change(value){
				console.log(value);
				this.$api.sendRequest({
					url: "/api/salasman/getStoreList",
					data: {
						keywords:value,
						member_id:this.id,
						status:2
					},
					success: res => {
						console.log(res,'客户筛选');
						this.listb=res.datas
					}
				});
				this.$api.sendRequest({
					url: "/api/salasman/getStoreList",
					data: {
						keywords:value,
						member_id:this.id,
						status:1
					},
					success: res => {
						console.log(res,'客服');
						this.list=res.data
					}
				});
				this.$api.sendRequest({
					url: "/api/salasman/getStoreList",
					data: {
						keywords:value,
						member_id:this.id,
						status:0
					},
					success: res => {
				
						this.lista=res.data
					}
				});
			},
			btn(di){
				console.log(di);
				uni.navigateTo({
					url: `/page_salesman_index/Valet_order/Valet_order?id=${this.id}&di=${di}`
				})
			}
		}
	}
</script>

<style lang="scss">
	.name{
			font-size: 24rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			color: #000 !important;
			span{
				margin-left: 24rpx;
			}
		}
	.input {
		flex:1;
		.prefix {
			image {
				width: 36rpx;
				height: 36rpx;
				position: relative;
				top: 8rpx;
				margin-right: 5rpx;
			}
		}
		::v-deep {
			.u-input--radius{
				border-radius: 16rpx;
				border: 2rpx solid #E8E8E8;
			}
		}

	}
.head{
	width: 750rpx;
	height: 120rpx;
	background-color: rgb(255, 255, 255);
	box-sizing: border-box;

	.head-head{
		width: 690rpx;
		height: 72rpx;
		position: absolute;
		margin: 0 auto;
		left: 50%;
		transform: translateX(-50%);
		margin: 24rpx 0;
		.placeholder{
			height: 100%;
		}


	}

}


.list{
	width: 702rpx;
	background: #FFFFFF;
	border-radius: 16rpx;
	margin: 0 auto;
	margin-top: 24rpx;
	box-sizing: border-box;
	padding: 32rpx;
	image{
		
			width: 80rpx;
			height: 80rpx;
			border-radius: 50%;
	
	}
	div:nth-child(1){

		div:nth-child(1){
			font-size: 30rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #222222;
			line-height: 44rpx;
			// margin-top: 32rpx;
		}
		div:nth-child(2){
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #585858;
			line-height: 40rpx;
			// margin-top: 32rpx;
		}
	}
	div:nth-child(2){
		div:nth-child(1){
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			line-height: 44rpx;
			margin-top: 32rpx;
		}
		div:nth-child(2){
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			line-height: 44rpx;
			margin-top: 32rpx;
		}
	}
}
</style>
