Browse Source

commit - 分配协销

zhengjinyi 2 years ago
parent
commit
93b316351a

+ 16 - 8
components/cm-module/headerNavbar/header-back.vue

@@ -12,6 +12,7 @@
 		<view class="navbar-icon" v-if="navbarData.showSearch == 1 ? true : false"
 			  :style="{top:navbarBtn.top + statusBarHeight+'px;',right:(navbarBtn.width)+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}">
 			  <text @click.stop="_goSearchPath" class="iconfont icon-iconfonticonfontsousuo1"></text>
+			  <text v-if="manager && manager > 0" @click.stop="_showRightDrawer" class="iconfont icon-shaixuan"></text>
 	  	</view>
 	</view>
 </template>
@@ -38,6 +39,9 @@
 			},
 			isUsertype:{
 				type:Number
+			},
+			manager:{
+				type:Number
 			}
 		},
 		data() {
@@ -95,12 +99,9 @@
 		    this.statusBarHeight=statusBarHeight,
 		    this.navbarHeight= headerPosi.bottom + btnPosi.bottom, // 原胶囊bottom + 现胶囊bottom
 		    this.navbarBtn=btnPosi
-		},
-		onLoad(){
-			
 		},
 		methods:{
-			_goBack: function () {
+			_goBack() {
 				if(this.isShare){
 					this._goHome()
 				}else if(this.isDelete){
@@ -111,19 +112,23 @@
 			      	})
 				}
 		    },
-		    _goHome: function () {
+		    _goHome() {
 		      	uni.switchTab({
 		        	url: '/pages/tabBar/home/index'
 		      	})
 		    },
-		    _goUser: function () {
+		    _goUser() {
 		      	uni.switchTab({
 		        	url: '/pages/tabBar/user/user'
 		      	})
 		    },
-			_goSearchPath:function () {
+			_goSearchPath() {
 				this.$emit('goSearchPath')
-			}
+			},
+			_showRightDrawer() {
+				//显示筛选抽屉
+				this.$parent.rightDrawer = true
+			},
 		},
 		onShow(){
 	
@@ -167,6 +172,9 @@
 	.navbar-icon .icon-iconfonticonfontsousuo1 {
 		color: #000000;
 	}
+	.navbar-icon .icon-shaixuan {
+		color: #000000;
+	}
 	.navbar-icon view {
 		 height: 18px;
 		 border-left: 0.5px solid rgba(0,0,0, 0.3);

+ 95 - 10
pages/seller/club/club-info.vue

@@ -67,38 +67,67 @@
 						>主营内容:<text>{{ clubInfo.mainProduct }}</text></view
 					>
 				</view>
-				<view class="info-main">
+				<view class="info-main" v-if="clubInfo.contractPhone || clubInfo.fax || clubInfo.profile">
 					<view class="info-h1">其他信息</view>
-					<view class="info-p"
+					<view class="info-p" v-if="clubInfo.contractPhone"
 						>固定电话:<text>{{ clubInfo.contractPhone ? clubInfo.contractPhone : '无' }}</text></view
 					>
-					<view class="info-p"
+					<view class="info-p" v-if="clubInfo.fax"
 						>传真:<text>{{ clubInfo.fax ? clubInfo.fax : '无' }}</text></view
 					>
-					<view class="info-p"
+					<view class="info-p" v-if="clubInfo.profile"
 						>公司介绍:<text>{{ clubInfo.profile ? clubInfo.profile : '无' }}</text></view
 					>
 				</view>
 			</view>
 		</template>
+		<!-- 按钮 -->
+		<template v-if="clubInfo.serviceProviderId">
+			<tui-bottom-popup :radius="false" :mask="false" :show="true">
+				<view class="tui-popup-box clearfix">
+					<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+						<view class="tui-flex-1">
+							<view class="tui-button" @click="handleShowSellerpopup">分配销售</view>
+						</view>
+					</view>
+				</view>
+			</tui-bottom-popup>
+		</template>
+		<!-- 选择弹窗 -->
+		<cm-seller-popup
+			ref="cmresellerpopup"
+			v-if="isSellerpopup"
+			:show="isSellerpopup"
+			@handleChoiceaSeller="handleChoiceaSellerData"
+		>
+		</cm-seller-popup>
 	</view>
 </template>
 
 <script>
 import { mapState, mapMutations } from 'vuex'
+import cmSellerPopup from '../components/cm-seller-popup'
 export default {
+	components: {
+		cmSellerPopup
+	},
 	data() {
 		return {
 			skeletonShow: true,
-			clubId: 0,
 			saleName: '',
-			clubInfo:{}
+			clubInfo: {},
+			isSellerpopup: false,
+			isIphoneX: this.$store.state.isIphoneX,
+			salesParams: {
+				clubId: 0,
+				spId: 0
+			}
 		}
 	},
 	filters: {},
 	onLoad(option) {
-		this.clubId = option.clubId
-		this.userClubRecordLinkage(this.clubId)
+		this.salesParams.clubId = option.clubId
+		this.userClubRecordLinkage({ clubId: this.salesParams.clubId })
 	},
 	filters: {
 		FirstFormat: function(type) {
@@ -141,10 +170,10 @@ export default {
 		}
 	},
 	methods: {
-		userClubRecordLinkage() {
+		userClubRecordLinkage(param) {
 			//查询机构信息
 			console.log('=========<查询机构信息>===========')
-			this.SellerService.userClubRecordLinkage({ clubId: this.clubId })
+			this.SellerService.userClubRecordLinkage(param)
 				.then(response => {
 					this.clubInfo = response.data.club
 					this.saleName = response.data.saleName
@@ -155,6 +184,28 @@ export default {
 				.catch(error => {
 					this.isInvalid = true
 				})
+		},
+		userClubChoseSales(param) {
+			//分配或更换协销
+			this.SellerService.userClubChoseSales(param)
+				.then(response => {
+					this.$util.msg('分配成功', 2000, true, 'success')
+					setTimeout(() => {
+						this.userClubRecordLinkage({ clubId: this.salesParams.clubId })
+					}, 1000)
+				})
+				.catch(error => {
+					console.log('分配协销异常')
+				})
+		},
+		handleChoiceaSellerData(data) {
+			// 确定搜索
+			this.salesParams.spId = data.serviceProviderId
+			this.userClubChoseSales(this.salesParams)
+		},
+		handleShowSellerpopup() {
+			//显示选择协销弹窗
+			this.isSellerpopup = true
 		}
 	},
 	onShow() {}
@@ -195,6 +246,7 @@ page {
 		box-sizing: border-box;
 		padding: 0 24rpx;
 		background-color: #ffffff;
+		padding-bottom: 240rpx;
 		.info-title {
 			width: 100%;
 			height: 68rpx;
@@ -277,4 +329,37 @@ page {
 		}
 	}
 }
+.tui-popup-box {
+	position: relative;
+	box-sizing: border-box;
+	min-height: 100rpx;
+	padding: 6rpx 24rpx;
+	.tui-popup-content {
+		padding-top: 30rpx;
+	}
+}
+.tui-popup-btn {
+	width: 100%;
+	height: auto;
+	float: left;
+	box-sizing: border-box;
+	margin-top: 30rpx;
+	.tui-flex-1 {
+		width: 100%;
+		height: 84rpx;
+		display: flex;
+		.tui-button {
+			flex: 1;
+			line-height: 84rpx;
+			font-size: $font-size-28;
+			text-align: center;
+			border-radius: 42rpx;
+			padding: 0;
+			margin: 0 15rpx;
+			box-sizing: border-box;
+			background: $btn-confirm;
+			color: #ffffff;
+		}
+	}
+}
 </style>

+ 98 - 73
pages/seller/club/list.vue

@@ -28,7 +28,7 @@
 						class="input"
 						type="text"
 						confirm-type="search"
-						v-model="searchInputVal"
+						v-model="listQuery.name"
 						@input="onShowClose"
 						@confirm="GetSellerClubList()"
 						placeholder="机构名称/联系人"
@@ -44,6 +44,8 @@
 						height: capsule.height + 'px',
 						lineHeight: capsule.height + 'px;'
 					}"
+					v-if="listQuery.manager > 0"
+					@click="showRightDrawer"
 				>
 					<text class="iconfont icon-shaixuan"></text>
 				</view>
@@ -59,7 +61,7 @@
 					<text class="item-text">{{ item.name }}<text class="line"></text></text>
 				</view>
 			</view>
-			<view class="search-smalltab">
+			<view class="search-smalltab" v-if="listQuery.manager > 0">
 				<view
 					class="tab-item"
 					v-for="(item, index) in listItemTab"
@@ -71,7 +73,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="club-main">
+		<view class="club-main" :style="{ paddingTop: listQuery.manager > 0 ? '374rpx' : '268rpx' }">
 			<view v-if="isEmpty" class="empty-container">
 				<image
 					class="club-empty-image"
@@ -119,7 +121,7 @@
 									{{ showBadge(club.orderNum) }}
 								</text>
 							</view>
-							<view class="btn" @click.stop="checkData(club)">更换协销</view>
+							<view class="btn" @click.stop="handleReplaceClub(club)">更换协销</view>
 							<view class="btn" @click.stop="handleClubinfo(club)" v-if="club.recordCount === 1"
 								>注册行为记录</view
 							>
@@ -144,8 +146,21 @@
 				</view>
 			</view>
 		</view>
-		<!-- 分享弹窗 -->
-		<shareModel v-if="isShareModal" :orderID="shareClubUseId" @shareConfirm="onShareAppMessage"></shareModel>
+		<!-- 筛选抽屉 -->
+		<cm-clubDrawer
+			ref="screendrawer"
+			:rightDrawer="rightDrawer"
+			@handSearchConfirm="handSearchConfirmData"
+		>
+		</cm-clubDrawer>
+		<!-- 选择弹窗 -->
+		<cm-seller-popup
+			ref="cmresellerpopup"
+			v-if="isSellerpopup"
+			:show="isSellerpopup"
+			@handleChoiceaSeller="handleChoiceaSellerData"
+		>
+		</cm-seller-popup>
 	</view>
 </template>
 
@@ -153,78 +168,67 @@
 import authorize from '@/common/config/authorize.js'
 import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
 import tuiNomore from '@/components/tui-components/nomore/nomore'
-import shareModel from '@/components/cm-module/modelAlert/shareModel.vue' //分享弹窗
+import cmClubDrawer from '../components/cm-club-drawer'
+import cmSellerPopup from '../components/cm-seller-popup'
 
+const defaultListQuery = {
+	userIdentity: 4,
+	name: '',
+	pageNum: 1,
+	pageSize: 10,
+	spId: 0,
+	status: 90,
+	manager:0,
+	leaderId:0
+}
 export default {
 	components: {
 		tuiLoadmore,
 		tuiNomore,
-		shareModel
+		cmClubDrawer,
+		cmSellerPopup
 	},
 	data() {
 		return {
 			listTab: [{ name: '个人机构' }, { name: '资质机构' }],
 			listItemTab: [{ name: '我的机构' }, { name: '组员机构' }, { name: '待分配机构' }],
-			serviceProviderId: '',
-			shareClubUseId: 0,
-			shareIdentity: 0,
+			listQuery: Object.assign({}, defaultListQuery),
 			isShowClose: false,
-			searchInputVal: '',
 			isEmpty: false,
-			isShareModal: false,
 			nomoreText: '上拉显示更多',
-			userIdentity: 4,
 			pageNum: 1,
 			pageSize: 10,
 			hasNextPage: false,
 			loadding: false,
 			pullUpOn: true,
 			pullFlag: true,
-			allowDataStatus: true,
-			wrapperHeight: '100%',
-			scrollHeight: '',
-			deleteAddressId: '',
-			currPage: '', //当前页面
-			prevPage: '', //上一个页面
 			tabCurrentNum: 0,
 			tabCurrentIndex: 0,
 			tabSmallCurrentIndex:0,
-			listStatus: 90,
 			clubList: [],
 			isIphoneX: this.$store.state.isIphoneX,
 			CustomBar: this.CustomBar,
 			StatusBar: this.StatusBar,
 			capsule: this.capsule,
-			show_index: 0 //控制显示那个组件
+			show_index: 0 ,//控制显示那个组件
+			rightDrawer:false,
+			isSellerpopup:false,
+			salesParams: {
+				clubId: 0,
+				spId: 0
+			}
 		}
 	},
-	onLoad() {
-		this.setScrollHeight()
-	},
+	onLoad() {},
 	methods: {
-		setScrollHeight() {
-			// 窗口高度 - 底部距离
-			setTimeout(() => {
-				const query = wx.createSelectorQuery().in(this)
-				query.selectAll('.add-btn').boundingClientRect()
-				query.exec(res => {
-					if (res[0][0]) {
-						let winHeight = this.$api.getWindowHeight(),
-							eleTop = res[0][0].top - 1
-						this.scrollHeight = eleTop
-					}
-				})
-			}, 500)
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.listQuery.spId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
+			this.listQuery.manager = userInfo.manager ? userInfo.manager : 0
+			this.GetSellerClubList()
 		},
 		GetSellerClubList() {
-			this.SellerService.GetSellerClubList({
-				userIdentity: this.userIdentity,
-				name: this.searchInputVal,
-				pageNum: 1,
-				pageSize: this.pageSize,
-				spId: this.serviceProviderId,
-				status: this.listStatus
-			})
+			this.SellerService.GetSellerClubList(this.listQuery)
 				.then(response => {
 					let data = response.data
 					if (data.list && data.list.length > 0) {
@@ -252,15 +256,8 @@ export default {
 				})
 		},
 		getOnReachBottomData() {
-			this.pageNum += 1
-			this.SellerService.GetSellerClubList({
-				userIdentity: this.userIdentity,
-				name: this.searchInputVal,
-				pageNum: this.pageNum,
-				pageSize: this.pageSize,
-				spId: this.serviceProviderId,
-				status: this.listStatus
-			})
+			this.listQuery.pageNum += 1
+			this.SellerService.GetSellerClubList(this.listQuery)
 				.then(response => {
 					let data = response.data
 					if (data.list && data.list.length > 0) {
@@ -284,18 +281,31 @@ export default {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
+		userClubChoseSales(param) {
+			//分配或更换协销
+			this.SellerService.userClubChoseSales(param)
+				.then(response => {
+					this.$util.msg('操作成功~', 2000, true, 'success')
+					setTimeout(() => {
+						this.GetSellerClubList()
+					}, 1000)
+				})
+				.catch(error => {
+					console.log('分配协销异常')
+				})
+		},
 		tabClick(index) {
 			//tab切换
 			this.tabCurrentIndex = index
 			switch (index) {
 				case 0:
-					this.listStatus = 90
+					this.listQuery.listStatus = 90
 					break
 				case 1:
-					this.listStatus = 1
+					this.listQuery.listStatus = 1
 					break
 				case 2:
-					this.listStatus = 92
+					this.listQuery.listStatus = 92
 					break
 			}
 			this.GetSellerClubList()
@@ -306,15 +316,15 @@ export default {
 			switch (index) {
 				case 0:
 					this.tabCurrentIndex = 0
-					this.userIdentity = 4
-					this.listStatus = 90
-					this.pageNum = 1
+					this.listQuery.userIdentity = 4
+					this.listQuery.listStatus = 90
+					this.listQuery.pageNum = 1
 					this.GetSellerClubList()
 					break
 				case 1:
-					this.pageNum = 1
-					this.userIdentity = 2
-					this.listStatus = 90
+					this.listQuery.pageNum = 1
+					this.listQuery.userIdentity = 2
+					this.listQuery.listStatus = 90
 					this.GetSellerClubList()
 					break
 			}
@@ -323,6 +333,26 @@ export default {
 			//商品详情&&供应商信息tab切换
 			this.tabSmallCurrentIndex = index
 		},
+		handSearchConfirmData(data) {
+			console.log('确定筛选', data)
+			//确定筛选
+			this.listQuery.startAddTime = data.startAddTime
+			this.GetSellerClubList()
+		},
+		handleChoiceaSellerData(data) {
+			// 确定搜索
+			this.salesParams.spId = data.serviceProviderId
+			this.userClubChoseSales(this.salesParams)
+		},
+		handleReplaceClub(club){
+			//更换协销
+			this.salesParams.clubId = club.clubId
+			this.isSellerpopup = true
+		},
+		showRightDrawer() {
+			//显示筛选抽屉
+			this.rightDrawer = true
+		},
 		checkData(club) {
 			//修改机构资料
 			switch (this.tabCurrentNum) {
@@ -345,7 +375,7 @@ export default {
 		},
 		onShowClose() {
 			//输入框失去焦点时触发
-			if (this.searchInputVal != '') {
+			if (this.listQuery.name != '') {
 				this.isShowClose = true
 			} else {
 				this.isShowClose = false
@@ -353,7 +383,7 @@ export default {
 		},
 		delInputText() {
 			//清除输入框内容
-			this.searchInputVal = ''
+			this.listQuery.name = ''
 			this.isShowClose = false
 		},
 		showBadge(n) {
@@ -377,11 +407,7 @@ export default {
 		}
 	},
 	onShow() {
-		this.$api.getStorage().then(response => {
-			this.serviceProviderId = response.serviceProviderId
-			this.pageNum = 1
-			this.GetSellerClubList()
-		})
+		this.initGetStotage()
 	}
 }
 </script>
@@ -407,7 +433,7 @@ page,
 	position: fixed;
 	top: 0;
 	left: 0;
-	z-index: 999;
+	z-index: 99;
 	.search-top {
 		flex: 1;
 		display: flex;
@@ -522,7 +548,6 @@ page,
 	}
 }
 .club-main {
-	padding-top: 374rpx;
 	.list {
 		width: 100%;
 		height: 268rpx;

+ 253 - 0
pages/seller/components/cm-club-drawer.vue

@@ -0,0 +1,253 @@
+<template>
+	<view class="drawer-content">
+		<!--右抽屉-->
+		<tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
+			<view
+				class="drawer-container clearfix"
+				scroll-y
+				:style="{ paddingTop: (CustomBar-StatusBar+8) +'px', paddingBottom: isIphoneX ? '180rpx' : '146rpx' }"
+			>
+				<scroll-view class="tui-drawer-scroll" scroll-y :style="{ height: drawerH + 'px' }">
+					<view class="drawer-title">更多筛选</view>
+					<view class="drawer-main">
+						<view class="drawer-main-name">组员:</view>
+						<view class="drawer-main-radiov">
+							<view class="drawer-main-radio">
+								<picker @change="bindPickerChange(1,$event)" :value="index" :range="priceActions" range-key="name">
+									<input class="input" type="text" disabled="false" v-model="priceFlagText" value="" placeholder="请选择"/>
+									<text class="iconfont icon-xiangyou"></text>
+								</picker>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<view class="drawer-input btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+					<view class="drawer-btn clear" @click="closeDrawer">取消</view>
+					<view class="drawer-btn comfrim" @click="handSearchConfirm">确定</view>
+				</view>
+			</view>
+		</tui-drawer>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'rightDrawer',
+	props: {
+		rightDrawer: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			StatusBar: this.StatusBar,
+			isIphoneX: this.$store.state.isIphoneX,
+			manager:0,
+			leaderId:0,
+			height: 0,
+			drawerH: 0 ,// 抽屉内部scrollview高度
+			categorys:[],
+			checkedCategorysList:[],
+			priceFlagText:'',
+			queryData:{
+				endAddTime:'',
+				consult:'',
+				leaderId:0,
+				groupId:0,
+				newDeal:0,
+				status:0,
+				pinceSensitve:0,//价格敏感度
+				satisfied:0,// 意向程度
+				followup:0,// 跟进状态
+			},
+			priceActions:[
+				{name:'全部',value:0},
+				{name:'敏感',value:1},
+				{name: '适中',value:2},
+				{name: '不敏感',value:3},
+				{name: '不明确',value:4}
+			],
+		}
+	},
+	created() {
+		this.SetScrollHeight()
+		this.getUserClubConsults()
+	},
+	computed: {},
+	methods: {
+		async getUserClubConsults() {
+			const userInfo = await this.$api.getStorage()
+			this.manager = userInfo.manager ? userInfo.manager : 0
+			this.leaderId = userInfo.leaderId ? userInfo.leaderId : 0
+			//查询咨询类别
+			this.UserService.getUserClubConsults()
+				.then(response => {
+					this.categorys = response.data.map((el, index) => {
+						el.isChecked = false
+						return el
+					})
+					if(this.manager > 0){
+						this.getUserClubTeams()
+					}
+					if(this.leaderId > 0){
+						this.getUserClubTeamsRroups(this.leaderId)
+					}
+				})
+				.catch(error => {
+					console.log('=========>获取咨询类别列表失败')
+				})
+		},
+		bindPickerChange(type,e) {//选择筛选条件
+			switch(type){
+				case 1:
+					this.priceFlagText = this.priceActions[e.target.value].name
+					this.queryData.pinceSensitve = this.priceActions[e.target.value].value
+					break
+			}
+		},
+		closeDrawer(){
+			this.$parent.rightDrawer = false
+		},
+		handSearchConfirm(){
+			//确定筛选
+			this.$emit('handSearchConfirm', this.queryData)
+			this.$parent.rightDrawer = false
+		},
+		SetScrollHeight() {
+			let obj = {}
+			const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
+			uni.getSystemInfo({
+				success: res => {
+					this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
+					this.drawerH = res.windowHeight - uni.upx2px(180) - this.height
+				}
+			})
+			this.windowHeight = windowHeight - 1
+			this.scrollHeight = windowHeight - 1
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+/*screen*/
+.drawer-container {
+	width: 580rpx;
+	height: 100%;
+	padding: 80rpx 0;
+	overflow: hidden;
+	box-sizing: border-box;
+	background-color: #FFFFFF;
+	.drawer-title {
+		width: 100%;
+		height: 72rpx;
+		line-height: 72rpx;
+		box-sizing: border-box;
+		padding: 0 30rpx;
+		float: left;
+		background-color: #f7f7f7;
+		font-size: $font-size-26;
+		color: #333333;
+		font-weight: bold;
+		text-align: left;
+	}
+	.drawer-main {
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+		float: left;
+		.drawer-main-name{
+			width: 100%;
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: left;
+			font-size: $font-size-26;
+			color: #333333;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			font-weight: bold;
+		}
+		.drawer-main-radiov{
+			width: 100%;
+			height: auto;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			.drawer-main-radio{
+				width: 100%;
+				height: 80rpx;
+				box-sizing: border-box;
+				padding: 0 10rpx;
+				border: 1px solid rgba(0,0,0,0.2);
+				border-radius: 6rpx;
+				margin-bottom: 30rpx;
+				position: relative;
+				&.btn{
+					border: none;
+					margin-top: 40rpx;
+				}
+				.input{
+					width: 100%;
+					height: 80rpx;
+					line-height: 80rpx;
+					float: left;
+					box-sizing: border-box;
+					font-size: $font-size-24;
+					color: #333333;
+					padding: 0 10rpx;
+					padding-right: 68rpx;
+				}
+				.iconfont{
+					width: 50rpx;
+					height: 80rpx;
+					display: block;
+					line-height: 80rpx;
+					text-align: center;
+					font-size: 30rpx;
+					color: #999999;
+					position: absolute;
+					right: 0;
+					top: 0;
+				}
+			}
+		}
+	}
+	.drawer-input {
+		width: 100%;
+		float: left;
+		box-sizing: border-box;
+		padding: 24rpx 10rpx 0 10rpx;
+		border: 1px solid rgba(0, 0, 0, 0.2);
+		border-radius: 4rpx;
+		position: relative;
+		background-color: #ffffff;
+		&.btn {
+			border: none;
+			display: flex;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+		}
+		.drawer-btn {
+			width: 210rpx;
+			height: 84rpx;
+			border-radius: 42rpx;
+			background: $btn-confirm;
+			line-height: 84rpx;
+			text-align: center;
+			font-size: $font-size-26;
+			color: #ffffff;
+			flex: 1;
+			margin: 0 10rpx;
+			&.comfrim {
+				background: $btn-confirm;
+			}
+			&.clear {
+				background: #FFE6DC;
+				color: $color-system;
+			}
+		}
+	}
+}
+</style>

+ 253 - 0
pages/seller/components/cm-order-drawer.vue

@@ -0,0 +1,253 @@
+<template>
+	<view class="drawer-content">
+		<!--右抽屉-->
+		<tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
+			<view
+				class="drawer-container clearfix"
+				scroll-y
+				:style="{ paddingTop: (CustomBar-StatusBar+8) +'px', paddingBottom: isIphoneX ? '180rpx' : '146rpx' }"
+			>
+				<scroll-view class="tui-drawer-scroll" scroll-y :style="{ height: drawerH + 'px' }">
+					<view class="drawer-title">更多筛选</view>
+					<view class="drawer-main">
+						<view class="drawer-main-name">组员:</view>
+						<view class="drawer-main-radiov">
+							<view class="drawer-main-radio">
+								<picker @change="bindPickerChange(1,$event)" :value="index" :range="priceActions" range-key="name">
+									<input class="input" type="text" disabled="false" v-model="priceFlagText" value="" placeholder="请选择"/>
+									<text class="iconfont icon-xiangyou"></text>
+								</picker>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<view class="drawer-input btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+					<view class="drawer-btn clear" @click="closeDrawer">取消</view>
+					<view class="drawer-btn comfrim" @click="handSearchConfirm">确定</view>
+				</view>
+			</view>
+		</tui-drawer>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'rightDrawer',
+	props: {
+		rightDrawer: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			StatusBar: this.StatusBar,
+			isIphoneX: this.$store.state.isIphoneX,
+			manager:0,
+			leaderId:0,
+			height: 0,
+			drawerH: 0 ,// 抽屉内部scrollview高度
+			categorys:[],
+			checkedCategorysList:[],
+			priceFlagText:'',
+			queryData:{
+				endAddTime:'',
+				consult:'',
+				leaderId:0,
+				groupId:0,
+				newDeal:0,
+				status:0,
+				pinceSensitve:0,//价格敏感度
+				satisfied:0,// 意向程度
+				followup:0,// 跟进状态
+			},
+			priceActions:[
+				{name:'全部',value:0},
+				{name:'敏感',value:1},
+				{name: '适中',value:2},
+				{name: '不敏感',value:3},
+				{name: '不明确',value:4}
+			],
+		}
+	},
+	created() {
+		this.SetScrollHeight()
+		this.getUserClubConsults()
+	},
+	computed: {},
+	methods: {
+		async getUserClubConsults() {
+			const userInfo = await this.$api.getStorage()
+			this.manager = userInfo.manager ? userInfo.manager : 0
+			this.leaderId = userInfo.leaderId ? userInfo.leaderId : 0
+			//查询咨询类别
+			this.UserService.getUserClubConsults()
+				.then(response => {
+					this.categorys = response.data.map((el, index) => {
+						el.isChecked = false
+						return el
+					})
+					if(this.manager > 0){
+						this.getUserClubTeams()
+					}
+					if(this.leaderId > 0){
+						this.getUserClubTeamsRroups(this.leaderId)
+					}
+				})
+				.catch(error => {
+					console.log('=========>获取咨询类别列表失败')
+				})
+		},
+		bindPickerChange(type,e) {//选择筛选条件
+			switch(type){
+				case 1:
+					this.priceFlagText = this.priceActions[e.target.value].name
+					this.queryData.pinceSensitve = this.priceActions[e.target.value].value
+					break
+			}
+		},
+		closeDrawer(){
+			this.$parent.rightDrawer = false
+		},
+		handSearchConfirm(){
+			//确定筛选
+			this.$emit('handSearchConfirm', this.queryData)
+			this.$parent.rightDrawer = false
+		},
+		SetScrollHeight() {
+			let obj = {}
+			const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
+			uni.getSystemInfo({
+				success: res => {
+					this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
+					this.drawerH = res.windowHeight - uni.upx2px(180) - this.height
+				}
+			})
+			this.windowHeight = windowHeight - 1
+			this.scrollHeight = windowHeight - 1
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+/*screen*/
+.drawer-container {
+	width: 580rpx;
+	height: 100%;
+	padding: 80rpx 0;
+	overflow: hidden;
+	box-sizing: border-box;
+	background-color: #FFFFFF;
+	.drawer-title {
+		width: 100%;
+		height: 72rpx;
+		line-height: 72rpx;
+		box-sizing: border-box;
+		padding: 0 30rpx;
+		float: left;
+		background-color: #f7f7f7;
+		font-size: $font-size-26;
+		color: #333333;
+		font-weight: bold;
+		text-align: left;
+	}
+	.drawer-main {
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+		float: left;
+		.drawer-main-name{
+			width: 100%;
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: left;
+			font-size: $font-size-26;
+			color: #333333;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			font-weight: bold;
+		}
+		.drawer-main-radiov{
+			width: 100%;
+			height: auto;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			.drawer-main-radio{
+				width: 100%;
+				height: 80rpx;
+				box-sizing: border-box;
+				padding: 0 10rpx;
+				border: 1px solid rgba(0,0,0,0.2);
+				border-radius: 6rpx;
+				margin-bottom: 30rpx;
+				position: relative;
+				&.btn{
+					border: none;
+					margin-top: 40rpx;
+				}
+				.input{
+					width: 100%;
+					height: 80rpx;
+					line-height: 80rpx;
+					float: left;
+					box-sizing: border-box;
+					font-size: $font-size-24;
+					color: #333333;
+					padding: 0 10rpx;
+					padding-right: 68rpx;
+				}
+				.iconfont{
+					width: 50rpx;
+					height: 80rpx;
+					display: block;
+					line-height: 80rpx;
+					text-align: center;
+					font-size: 30rpx;
+					color: #999999;
+					position: absolute;
+					right: 0;
+					top: 0;
+				}
+			}
+		}
+	}
+	.drawer-input {
+		width: 100%;
+		float: left;
+		box-sizing: border-box;
+		padding: 24rpx 10rpx 0 10rpx;
+		border: 1px solid rgba(0, 0, 0, 0.2);
+		border-radius: 4rpx;
+		position: relative;
+		background-color: #ffffff;
+		&.btn {
+			border: none;
+			display: flex;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+		}
+		.drawer-btn {
+			width: 210rpx;
+			height: 84rpx;
+			border-radius: 42rpx;
+			background: $btn-confirm;
+			line-height: 84rpx;
+			text-align: center;
+			font-size: $font-size-26;
+			color: #ffffff;
+			flex: 1;
+			margin: 0 10rpx;
+			&.comfrim {
+				background: $btn-confirm;
+			}
+			&.clear {
+				background: #FFE6DC;
+				color: $color-system;
+			}
+		}
+	}
+}
+</style>

+ 264 - 0
pages/seller/components/cm-seller-popup.vue

@@ -0,0 +1,264 @@
+<template name="coupon">
+	<view class="coupon-template">
+		<!-- 选择机构 -->
+		<tui-bottom-popup :radius="true" :show="show" @close="hidePopup">
+			<view class="tui-popup-box clearfix">
+				<view class="title">分配销售</view>
+				<view class="title-text">请选择一个销售人员进行分配</view>
+				<view class="tui-popup-main coupon">
+					<scroll-view class="tui-popup-scroll" scroll-y="true">
+						<view
+							v-for="(seller, index) in dataList"
+							:key="index"
+							class="list"
+							@click.stop="checkedSeller(index)"
+						>
+							<view class="list-cell-le">
+								{{ seller.name  }}
+							</view>
+							<view class="list-cell-btn">
+								<view
+									class="checkbox iconfont"
+									:class="[seller.ischecked ? 'icon-yixuanze' : 'icon-weixuanze']"
+								>
+								</view>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
+				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+					<view class="tui-flex-1"> <view class="tui-button" @click="hidePopup">确定</view> </view>
+				</view>
+			</view>
+		</tui-bottom-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'cm-goods-popup',
+	props: {
+		show: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			isIphoneX: this.$store.state.isIphoneX,
+			checkedIndex: 0,
+			isShowClose: false,
+			dataList: []
+		}
+	},
+	created() {
+		this.userClubChoseList()
+	},
+	methods: {
+		async userClubChoseList() {
+			const userInfo = await this.$api.getStorage()
+			this.SellerService.userClubChoseList()
+				.then(response => {
+					let data = response.data
+					if (data && data.length > 0) {
+						 this.dataList = data.map((el,index)=>{
+							el.ischecked = false
+							return el
+						})
+					}
+					
+				})
+				.catch(error => {
+					console.log('获取可分配协销列表异常')
+				})
+		},
+		checkedSeller(idx) {
+			// 选择协销
+			this.checkedIndex = idx
+			this.dataList.forEach((el, index) => {
+				if (this.checkedIndex == index) {
+					el.ischecked = !el.ischecked
+				} else {
+					el.ischecked = false
+				}
+			})
+		},
+		hidePopup() {
+			let sellerData = null
+			let checkedData = false
+			this.dataList.forEach((el, index) => {
+				if (el.ischecked) {
+					sellerData = el
+					checkedData = true
+				}
+			})
+			if (checkedData) {
+				this.$emit('handleChoiceaSeller', sellerData)
+			}
+			this.$parent.isSellerpopup = false
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.coupon-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.coupon-title {
+		width: 702rpx;
+		padding: 0 24rpx;
+		height: 88rpx;
+		line-height: 88rpx;
+		position: relative;
+		.text {
+			font-size: $font-size-28;
+			color: $text-color;
+		}
+		.text-coupon {
+			display: inline-block;
+			float: right;
+			padding-right: 30rpx;
+			line-height: 88rpx;
+			font-size: 28rpx;
+			color: #f94b4b;
+		}
+		.iconfont {
+			width: 50rpx;
+			height: 88rpx;
+			line-height: 88rpx;
+			color: #999999;
+			display: block;
+			position: absolute;
+			right: 0;
+			top: 0;
+		}
+	}
+}
+.tui-popup-box {
+	position: relative;
+	box-sizing: border-box;
+	min-height: 220rpx;
+	padding: 24rpx 32rpx 0 32rpx;
+	.title {
+		font-size: $font-size-32;
+		color: $text-color;
+		line-height: 68rpx;
+		text-align: center;
+		float: left;
+		width: 100%;
+		height: 68rpx;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+	}
+	.title-text {
+		width: 100%;
+		height: 66rpx;
+		line-height: 66rpx;
+		padding: 0 15rpx;
+		background: #FEF6F1;
+		box-sizing: border-box;
+		float: left;
+		font-size: 26rpx;
+		color: #e15616;
+	}
+	.tui-popup-main {
+		width: 100%;
+		float: left;
+		padding-top: 10rpx;
+		.tui-popup-scroll {
+			width: 100%;
+			height: 660rpx;
+			.list {
+				width: 100%;
+				height: 100rpx;
+				box-sizing: border-box;
+				background-size: cover;
+				border-bottom: 1px solid #e1e1e1;
+				.list-cell-le {
+					height: 100%;
+					line-height: 100rpx;
+					box-sizing: border-box;
+					float: left;
+					text-align: left;
+					font-size: $font-size-26;
+					color: #333333;
+				}
+				.list-cell-btn {
+					width: 40rpx;
+					height: 100rpx;
+					line-height: 100rpx;
+					float: right;
+					.checkbox {
+						width: 40rpx;
+						line-height: 128rpx;
+						float: right;
+						box-sizing: border-box;
+						text-align: center;
+						text-decoration: none;
+						-webkit-tap-highlight-color: transparent;
+						overflow: hidden;
+						font-size: $font-size-34;
+						&.icon-weixuanze {
+							color: #b2b2b2;
+						}
+						&.icon-yixuanze {
+							color: #e15616;
+						}
+					}
+				}
+			}
+		}
+		.tui-popup-coupon {
+			width: 100%;
+			height: 500rpx;
+			box-sizing: border-box;
+			padding: 30rpx 20rpx;
+			.tui-popup-h1 {
+				width: 100%;
+				height: 66rpx;
+				display: flex;
+				align-items: center;
+				.tui-popup-text {
+					flex: 1;
+					height: 66rpx;
+					line-height: 66rpx;
+					font-size: $font-size-30;
+					color: #333333;
+					&.red {
+						color: #f94b4b;
+					}
+					&.bold {
+						font-weight: bold;
+					}
+					&.left {
+						text-align: left;
+					}
+					&.right {
+						text-align: right;
+					}
+				}
+			}
+		}
+	}
+	.tui-popup-btn {
+		width: 100%;
+		height: auto;
+		float: left;
+		margin-top: 24rpx;
+		.tui-button {
+			width: 100%;
+			height: 88rpx;
+			background: $btn-confirm;
+			line-height: 88rpx;
+			text-align: center;
+			color: #ffffff;
+			font-size: $font-size-28;
+			border-radius: 44rpx;
+		}
+	}
+}
+</style>

+ 8 - 0
pages/seller/order/order-details.vue

@@ -12,6 +12,7 @@
 				<view class="view-type">{{ information.status | TextFormat }}</view>
 				<view class="status-visible"> {{ information.orderSeen == 2 ? '订单对机构不可见' : '订单对机构可见' }} </view>
 				<view class="Rebate " v-if="information.rebateFlag == 1">返佣</view>
+				<text class="bage-name">【高琳琳】</text>
 				<text class="bage-buss btn" v-if="information.orderSubmitType == 3 || information.orderSubmitType == 4"
 					>协销</text
 				>
@@ -628,6 +629,13 @@ page {
 		float: right;
 		font-size: $font-size-24;
 	}
+	.bage-name{
+		line-height: 32rpx;
+		display: inline-block;
+		color: #999999;
+		float: right;
+		font-size: $font-size-24;
+	}
 	.Rebate {
 		display: inline-block;
 		width: 72rpx;

+ 64 - 30
pages/seller/order/order-list.vue

@@ -7,6 +7,7 @@
 			:headerBtnPosi="headerBtnPosi"
 			:isDelete="isDelete"
 			:isUsertype="1"
+			:manager="manager"
 			@goSearchPath="handlSearchPath"
 		>
 		</header-back>
@@ -23,7 +24,7 @@
 					<text class="tab-bar-title">{{ item.text }}</text>
 				</view>
 			</scroll-view>
-			<view class="tab-screen">
+			<scroll-view scroll-x scroll-with-animation class="tab-screen" :scroll-left="scrollLeft">
 				<view
 					v-for="(item, index) in screenTabBar"
 					:key="index"
@@ -33,7 +34,15 @@
 					@tap.stop="onClickScreenTab(index)"
 					>{{ item.text }}</view
 				>
-			</view>
+				<view
+					class="tab-screen-item"
+					v-if="manager > 0"
+					:data-current="3"
+					:class="[screenTab == 3 ? 'active' : '']"
+					@tap.stop="onClickScreenTab(3)"
+					>组员订单</view
+				>
+			</scroll-view>
 		</view>
 		<swiper
 			class="tab-content"
@@ -74,8 +83,11 @@
 								<view class="order-title">
 									<view class="order-title-name">
 										<text>{{ order.clubName ? order.clubName : '' }}</text>
-										<text class="tags" v-if="order.svipUserFlag == 0 && order.userIdentity === 2 ">VIP</text>
+										<text class="tags" v-if="order.svipUserFlag == 0 && order.userIdentity === 2"
+											>VIP</text
+										>
 										<text class="tags sv" v-if="order.svipUserFlag == 1">SVIP</text>
+										<view class="name">【高琳琳】</view>
 									</view>
 									<view class="order-title-t">
 										<view class="Rebate " v-if="order.rebateFlag == 1">返佣</view>
@@ -245,10 +257,12 @@
 			</swiper-item>
 		</swiper>
 		<!-- 分享弹窗 -->
-		<share-alert v-if="isShareModal" 
-					:orderId="btnoRderID" 
-					:shareType="isShareType"
-					@shareConfirm="onShareAppMessage">
+		<share-alert
+			v-if="isShareModal"
+			:orderId="btnoRderID"
+			:shareType="isShareType"
+			@shareConfirm="onShareAppMessage"
+		>
 		</share-alert>
 		<!-- 透明模态层 -->
 		<modal-layer v-if="isModalLayer"></modal-layer>
@@ -267,6 +281,9 @@
 				</view>
 			</view>
 		</view>
+		<!-- 筛选抽屉 -->
+		<cm-orderDrawer ref="screendrawer" :rightDrawer="rightDrawer" @handSearchConfirm="handSearchConfirmData">
+		</cm-orderDrawer>
 	</view>
 </template>
 
@@ -280,6 +297,7 @@ import orderButton from './components/sellerOrderButton' //操作按钮
 import modalLayer from '@/components/modal-layer'
 import empty from '@/components/empty'
 import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert' //分享弹窗
+import cmOrderDrawer from '../components/cm-order-drawer' //筛选抽屉
 
 export default {
 	components: {
@@ -291,7 +309,8 @@ export default {
 		orderButton,
 		tuiSkeleton,
 		modalLayer,
-		shareAlert
+		shareAlert,
+		cmOrderDrawer
 	},
 	data() {
 		return {
@@ -304,9 +323,9 @@ export default {
 				{ listType: 5, text: '退货/款', orderList: [] }
 			],
 			screenTabBar: [
-				{ type: 0, text: '全部订单' },
-				{ type: 1, text: '机构自主订单' },
-				{ type: 2, text: '协销订单' }
+				{ type: 0, text: '全部订单(我的)' },
+				{ type: 1, text: '自主订单(我的)' },
+				{ type: 2, text: '协销订单(我的)' }
 			],
 			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
 			systeminfo: this.setSysteminfo(), //获取设备信息
@@ -314,7 +333,7 @@ export default {
 				//顶部自定义导航
 				showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
 				showSearch: 1,
-				title: '我的订单 ' // 导航栏中间的标题
+				title: ' ' // 导航栏中间的标题
 			},
 			CustomBar: this.CustomBar, // 顶部导航栏高度
 			winHeight: '', //窗口高度
@@ -332,7 +351,7 @@ export default {
 			skeletonShow: true,
 			isClickChange: false,
 			isShareModal: false, //控制分享弹窗
-			isShareType:2,
+			isShareType: 2,
 			isSeller: false,
 			isModalLayer: false,
 			loadding: false,
@@ -345,7 +364,9 @@ export default {
 			failList: [], // 再来一单可购买商品
 			promptitle: '',
 			aganOrderId: 0, // 再来一单商品id
-			userId: 0
+			userId: 0,
+			manager: 0,
+			rightDrawer: false //控制筛选抽屉
 		}
 	},
 	onLoad(option) {
@@ -362,9 +383,6 @@ export default {
 				self.winHeight = calc - self.CustomBar - 82
 			}
 		})
-		this.$api.getStorage().then(resolve => {
-			this.userId = resolve.userId ? resolve.userId : 0
-		})
 	},
 	filters: {
 		NumFormat(value) {
@@ -373,6 +391,11 @@ export default {
 		}
 	},
 	methods: {
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.manager = userInfo.manager ? userInfo.manager : 0
+			this.getOrderDatainit(this.currentTab)
+		},
 		// 滚动切换标签样式
 		onChange(e) {
 			let index = e.target.current || e.detail.current
@@ -640,6 +663,12 @@ export default {
 					})
 			})
 		},
+		handSearchConfirmData(data) {
+			console.log('确定筛选', data)
+			//确定筛选
+			this.listQuery.startAddTime = data.startAddTime
+			this.getOrderDatainit(this.currentTab)
+		},
 		handlSearchPath() {
 			this.$api.navigateTo('/pages/seller/order/search-order')
 		},
@@ -740,7 +769,7 @@ export default {
 	},
 	onShow() {
 		this.isModalLayer = false
-		this.getOrderDatainit(this.currentTab)
+		this.initGetStotage()
 	}
 }
 </script>
@@ -763,30 +792,30 @@ page {
 	z-index: 99;
 	background: #ffffff;
 	.tab-screen {
-		height: 60rpx;
-		width: 702rpx;
-		padding: 10rpx 24rpx;
+		width: 100%;
+		box-sizing: border-box;
+		background: #fff;
+		white-space: nowrap;
+		height: 80rpx;
+		padding: 10rpx 0;
 		border-top: 1px solid #f7f7f7;
 		border-bottom: 1px solid #f7f7f7;
-		display: flex;
-		justify-content: center;
-		justify-items: center;
+		overflow: hidden;
 		.tab-screen-item {
-			flex: 1;
+			min-width: 100rpx;
 			height: 60rpx;
 			border-radius: 10rpx;
 			background: #f7f7f7;
-			margin-right: 22rpx;
-			line-height: 66rpx;
+			margin: 0 15rpx;
+			padding: 0 15rpx;
+			line-height: 60rpx;
 			font-size: $font-size-28;
 			color: #333333;
 			text-align: center;
+			display: inline-block;
 			&.active {
 				color: $color-system;
 			}
-			&:last-child {
-				margin-right: 0;
-			}
 		}
 	}
 }
@@ -879,6 +908,11 @@ page {
 				color: #f0cb72;
 			}
 		}
+		.name{
+			float: right;
+			font-size: 26rpx;
+			color: #999999;
+		}
 	}
 	.order-title-t {
 		width: 100%;

+ 27 - 2
services/sellse.service.js

@@ -114,7 +114,7 @@ export default class SellerService {
         return this.AjaxService.get({ 
             url:'/user/club/recordLinkage', 
             data, 
-            isLoading: true ,
+            isLoading: false ,
         })
     }
     /**
@@ -336,6 +336,31 @@ export default class SellerService {
     }
     // 协销购物车清空失效列表
     SellerCartdelete (data = {}) {
-        return this.AjaxService.post({ url:'/seller/deleteSellerCart', data, isLoading: true })
+        return this.AjaxService.post({ 
+            url:'/seller/deleteSellerCart', 
+            data, isLoading: true ,
+        })
     }
+    /**
+	 *@获取可分配协销列表
+	 */
+    userClubChoseList (data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/user/club/chose/list', 
+	        data, 
+	        isLoading: false ,
+	    })
+    }
+    /**
+	 *@分配协销
+	 */
+    userClubChoseSales (data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/user/club/chose/sales', 
+	        data, 
+	        isLoading: true ,
+	           
+	    })
+    }
+	
 }