From c93eff979aba7e4e071b3363f9146d5b4d49996e Mon Sep 17 00:00:00 2001
From: li-guang <153605324@qq.com>
Date: Mon, 21 Dec 2020 14:47:43 +0800
Subject: [PATCH] 服务单

---
 hive-app/pages/member/index.vue |  175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 170 insertions(+), 5 deletions(-)

diff --git a/hive-app/pages/member/index.vue b/hive-app/pages/member/index.vue
index c25ef37..e92d9e2 100644
--- a/hive-app/pages/member/index.vue
+++ b/hive-app/pages/member/index.vue
@@ -1,28 +1,193 @@
 <template>
 	<view class="container">
+		<!-- #ifndef H5 -->
+		<view class="status_bar"></view>
+		<!-- #endif -->
 		<search-bar></search-bar>
+		<view class="sort-wrap">
+			<view @click="filterCustom(1)">
+				<text>本月到店次数</text>
+				<text class="iconfont iconjiantouarrow486 gray"></text>
+			</view>
+			<view @click="filterCustom(3)">
+				<text>筛选</text>
+				<text class="iconfont iconshaixuan gray"></text>
+			</view>
+		</view>
+		<filter-dropdown ref="filterDropdownEl" :list="filterList" :type="filterType"></filter-dropdown>
+		<view class="flex justify-between" @click="toDetail">
+			<view class="flex-1 mr-10">
+				<view class="member-list flex align-center" v-for="(item, index) in 15">
+					<text class="first-name" :style="{background: caculateBgcolor(index)}">李</text>
+					<view class="flex-1 flex align-center justify-between member-list-con">
+						<view>
+							<text>李广</text>
+							<text class="ml-10">152****9645</text>
+						</view>
+						<view>
+							<text class="blue">30天未到店</text>
+							<text class="iconfont iconarrow-backimg gray"></text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<indexed-list></indexed-list>
+		</view>
+		<view class="quick-entry">
+			<navigator url="./editMember" hover-class="navigator-hover">
+				<text class="iconfont iconjia"></text>
+			</navigator>
+		</view>
 	</view>
 </template>
 
 <script>
 	import searchBar from '../../components/searchBar/index.vue';
+	import indexedList from '../../components/indexedList/index.vue';
+	import filterDropdown from '../../components/filterDropdown/index.vue';
 	export default {
 		components:{
-			searchBar
+			searchBar,
+			indexedList,
+			filterDropdown
 		},
 		data() {
 			return {
-				
+				colors: ['#CCC6B4', '#C0CCB4', '#B4C2CC', '#BEB4CC', '#B4CCBE', '#B4CCCA', '#CCB4C6', '#CCB4B4'],
+				filterType: 1,
+				filterList: [],
+				filter1: ['本月到店次数(由低到高)','本月到店次数(由高到低)','本年到店次数(由低到高)','本年到店次数(由高到低)','本月消费(由高到低)','本月消费(由低到高)','本月消耗(由高到低)','本月消耗(由低到高)'],
+				filter2: ['7天内卡项到期','15天内卡项到期','30天内卡项到期'],
+				filter3: [{
+					title: '到店途径',
+					list: [
+						{
+							'title': '美团预约',
+							'value': ''
+						},
+						{
+							'title': '网络预约',
+							'value': ''
+						}
+					]
+				},
+				{
+					title: '会员等级',
+					list: [
+						{
+							'title': '一级会员',
+							'value': ''
+						},
+						{
+							'title': '二级会员',
+							'value': ''
+						},
+						{
+							'title': '三级会员',
+							'value': ''
+						}
+					]
+				},
+				{
+					title: '活跃度',
+					list: [
+						{
+							'title': '活跃',
+							'value': ''
+						},
+						{
+							'title': '不活跃',
+							'value': ''
+						},
+						{
+							'title': '睡眠',
+							'value': ''
+						},
+						{
+							'title': '沉睡',
+							'value': ''
+						}
+					]
+				}]
 			};
 		},
+		onHide(){
+			this.$refs.filterDropdownEl.hide();
+		},
 		methods:{
-			
+			caculateBgcolor(index){
+				return this.colors[index%8];
+			},
+			toDetail(){
+				uni.navigateTo({
+					url:'./detail'
+				})
+			},
+			filterCustom(type){
+				this.$refs.filterDropdownEl.show();
+				if(type===1){
+					this.filterList = this.filter1;
+					this.filterType = 1;
+				} else if(type===2){
+					this.filterList = this.filter2;
+					this.filterType = 1;
+				} else {
+					this.filterList = this.filter3;
+					this.filterType = 0;
+				}
+			}
 		}
 	}
 </script>
 
-<style>
+<style scoped>
 	.container{
-		padding: 0 10px;
+		padding: 10px 10px 0;
+	}
+	.sort-wrap{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		font-size: 14px;
+	}
+	.sort-wrap .iconfont{
+		font-size: 14px;
+		padding-left: 4px;
+	}
+	.first-name{
+		display: inline-block;
+		width: 38px;
+		height: 38px;
+		line-height: 38px;
+		margin-right: 10px;
+		border-radius: 50%;
+		text-align: center;
+		color: #FFFFFF;
+	}
+	.member-list{
+		font-size: 15px;
+	}
+	.member-list-con{
+		padding: 20px 0 20px 5px;
+		border-bottom: 1px solid #EDEAF4;
+	}
+	.quick-entry{
+		position: fixed;
+		bottom: 80px;
+		right: 15px;
+		width: 50px;
+		height: 50px;
+		line-height: 50px;
+		text-align: center;
+		border-radius: 50%;
+		background: #518EFF;
+		color: #FFFFFF;
+		box-shadow: 4px 4px 5px #ddd;
+	}
+	.quick-entry .iconfont{
+		font-size: 24px;
+	}
+	.navigator-hover{
+		border-radius: 50%;
 	}
 </style>

--
Gitblit v1.9.1