xhj 2 年 前
コミット
9f323088d7

+ 8 - 0
mine/clientDetail/clientDetail.css

@@ -30,7 +30,15 @@ page{
 	opacity: 1;
 	opacity: 1;
 	font-size: 22rpx;
 	font-size: 22rpx;
 	font-weight: 400;
 	font-weight: 400;
+	color: #A1A1A1;
+	border: 2rpx solid #DEDEDE;
+	margin-bottom: 6rpx;
+	margin-right: 10rpx;
+}
+.user-tag-t{
+	background: #FFE6E8;
 	color: #E95A64;
 	color: #E95A64;
+	border: 2rpx solid #FFE6E8;
 }
 }
 .form{
 .form{
 	padding: 30rpx;
 	padding: 30rpx;

+ 11 - 7
mine/clientDetail/clientDetail.vue

@@ -5,7 +5,9 @@
 			<view>
 			<view>
 				<view class="user-name">{{info.nickName}}</view>
 				<view class="user-name">{{info.nickName}}</view>
 				<view class="ddflex">
 				<view class="ddflex">
-					<view class="user-tag">高价值</view>
+					<block v-if="info.labelName&&info.labelName.length>0">
+						<view class="user-tag user-tag-t" v-for="it,idx in info.labelName" :key="idx+'l'">{{it}}</view>
+					</block>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -39,16 +41,18 @@
 			</view>
 			</view>
 			<view class="ddflex form-item">
 			<view class="ddflex form-item">
 				<view class="form-label">客户类别</view>
 				<view class="form-label">客户类别</view>
-				<view class="form-data fflex">客户</view>
+				<view class="form-data fflex">
+					<block v-if="info.customTypeName&&info.customTypeName.length>0">{{info.customTypeName.join(',')}}</block>
+				</view>
 			</view>
 			</view>
 			<view class="ddflex form-item">
 			<view class="ddflex form-item">
 				<view class="form-label">客户来源</view>
 				<view class="form-label">客户来源</view>
 				<view class="form-data fflex">小程序</view>
 				<view class="form-data fflex">小程序</view>
 			</view>
 			</view>
-			<view class="ddflex form-item">
+			<!-- <view class="ddflex form-item">
 				<view class="form-label">网格地址编码</view>
 				<view class="form-label">网格地址编码</view>
 				<view class="form-data fflex">-</view>
 				<view class="form-data fflex">-</view>
-			</view>
+			</view> -->
 			<view class="ddflex form-item">
 			<view class="ddflex form-item">
 				<view class="form-label">保单</view>
 				<view class="form-label">保单</view>
 				<view class="form-data fflex">{{info.warrantyCount?info.warrantyCount:0}}</view>
 				<view class="form-data fflex">{{info.warrantyCount?info.warrantyCount:0}}</view>
@@ -60,13 +64,13 @@
 			<view class="dflex form-item" v-if="info.associationProduct&&info.associationProduct.length>0">
 			<view class="dflex form-item" v-if="info.associationProduct&&info.associationProduct.length>0">
 				<view class="form-label">关联产品</view>
 				<view class="form-label">关联产品</view>
 				<view class="form-data fflex">
 				<view class="form-data fflex">
-					<view v-for="it,idx in info.associationProduct" :key="idx">{{it}}</view>
+					<view style="margin-bottom: 8rpx;" v-for="it,idx in info.associationProduct" :key="idx">{{it}}</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="form-title" style="margin-top: 50rpx;">经营服务策略</view>
+			<!-- <view class="form-title" style="margin-top: 50rpx;">经营服务策略</view>
 			<view class="c-info">
 			<view class="c-info">
 				刺激消费频率
 				刺激消费频率
-			</view>
+			</view> -->
 		</view>
 		</view>
 
 
 	</view>
 	</view>

+ 5 - 4
mine/clientManage/clientManage.css

@@ -91,7 +91,7 @@ page{
 	background: #FFFFFF;
 	background: #FFFFFF;
 	border-radius:10rpx;
 	border-radius:10rpx;
 	position: relative;
 	position: relative;
-	padding: 0 0rpx 30rpx;
+	/* padding: 0 0rpx 30rpx; */
 	margin: 30rpx;
 	margin: 30rpx;
 	overflow: hidden;
 	overflow: hidden;
 }
 }
@@ -100,9 +100,9 @@ page{
 	font-weight: bold;
 	font-weight: bold;
 	color: #999999;
 	color: #999999;
 	margin: 30rpx 30rpx;
 	margin: 30rpx 30rpx;
-	padding-bottom: 21rpx;
+	/* padding-bottom: 21rpx; */
 	flex-wrap: nowrap;
 	flex-wrap: nowrap;
-	border-bottom: 1rpx solid #EAEAEA;
+	/* border-bottom: 1rpx solid #EAEAEA; */
 }
 }
 .card-name{
 .card-name{
 	line-height: 45rpx;
 	line-height: 45rpx;
@@ -121,8 +121,9 @@ page{
 	font-weight: 400;
 	font-weight: 400;
 	text-align: center;
 	text-align: center;
 	margin-right: 10rpx;
 	margin-right: 10rpx;
+	margin-bottom: 6rpx;
 }
 }
-.card-tag:nth-child(2){
+.card-tag-t{
 	background: #FFE6E8;
 	background: #FFE6E8;
 	color: #E95A64;
 	color: #E95A64;
 	border: 2rpx solid #FFE6E8;
 	border: 2rpx solid #FFE6E8;

+ 78 - 35
mine/clientManage/clientManage.vue

@@ -5,7 +5,7 @@
 				<view class="search-input ddflex fflex">
 				<view class="search-input ddflex fflex">
 					<image src="/static/images/ssico.png"></image>
 					<image src="/static/images/ssico.png"></image>
 					<input @confirm="searchFn" confirm-type="search" @input="searchFn" v-model="searchVal" class="fflex"
 					<input @confirm="searchFn" confirm-type="search" @input="searchFn" v-model="searchVal" class="fflex"
-						placeholder="请输入关键词" />
+						placeholder="请输入客户昵称" />
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="filter ddflex">
 			<view class="filter ddflex">
@@ -58,10 +58,17 @@
 					<view class="flex" style="min-width: 0;">
 					<view class="flex" style="min-width: 0;">
 						<view class="ddflex">
 						<view class="ddflex">
 							<view class="card-name fflex tover">{{item.nickName?item.nickName:''}}</view>
 							<view class="card-name fflex tover">{{item.nickName?item.nickName:''}}</view>
+							<view v-if="item.mobile">
+								<image style="width: 140rpx;height: 64rpx;margin-left: 20rpx;" src="/mine/static/images/lx.png" @click.stop="goPhone(item.mobile)"></image>
+							</view>
 						</view>
 						</view>
 						<view class="ddflex" style="margin-top: 4rpx;">
 						<view class="ddflex" style="margin-top: 4rpx;">
-							<view class="card-tag">客户</view>
-							<view class="card-tag">高价值</view>
+							<block v-if="item.customTypeName&&item.customTypeName.length>0">
+								<view class="card-tag" v-for="it,idx in item.customTypeName" :key="idx+'s'">{{it}}</view>
+							</block>
+							<block v-if="item.labelName&&item.labelName.length>0">
+								<view class="card-tag card-tag-t" v-for="it,idx in item.labelName" :key="idx+'l'">{{it}}</view>
+							</block>
 						</view>
 						</view>
 						<view class="ddflex" style="font-size: 24rpx;color: #999;font-weight: 400;margin: 20rpx 0;">
 						<view class="ddflex" style="font-size: 24rpx;color: #999;font-weight: 400;margin: 20rpx 0;">
 							<text>保单</text><text style="color: #000000;">{{item.warrantyCount?item.warrantyCount:0}}</text>
 							<text>保单</text><text style="color: #000000;">{{item.warrantyCount?item.warrantyCount:0}}</text>
@@ -70,7 +77,7 @@
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="ddflex" style="margin-top: 41rpx;font-size: 24rpx;padding: 0 30rpx;">
+				<!-- <view class="ddflex" style="margin-top: 41rpx;font-size: 24rpx;padding: 0 30rpx;">
 					<view class="ddflex fflex">
 					<view class="ddflex fflex">
 						<view style="color: #999;margin-right: 16rpx;">服务策略</view>
 						<view style="color: #999;margin-right: 16rpx;">服务策略</view>
 						<view style="color: #333333;">刺激消费频率</view>
 						<view style="color: #333333;">刺激消费频率</view>
@@ -78,7 +85,7 @@
 					<view v-if="item.mobile">
 					<view v-if="item.mobile">
 						<image style="width: 140rpx;height: 64rpx;margin-left: 20rpx;" src="/mine/static/images/lx.png" @click.stop="goPhone(item.mobile)"></image>
 						<image style="width: 140rpx;height: 64rpx;margin-left: 20rpx;" src="/mine/static/images/lx.png" @click.stop="goPhone(item.mobile)"></image>
 					</view>
 					</view>
-				</view>
+				</view> -->
 			</view>
 			</view>
 		</view>
 		</view>
 		<view v-else class="nodata">
 		<view v-else class="nodata">
@@ -120,8 +127,12 @@
 							},
 							},
 						]
 						]
 					},{
 					},{
+						title:'客户类型',
+						key:'custom_type',
+						option:[]
+					},{
 						title:'客户标签',
 						title:'客户标签',
-						key:'job',
+						key:'custom_label',
 						option:[
 						option:[
 							{
 							{
 								label: '经理',
 								label: '经理',
@@ -144,21 +155,22 @@
 						value: null
 						value: null
 					},{
 					},{
 						label: '保费从高到低',
 						label: '保费从高到低',
-						value: 'avage'
+						value: 'warranty_money',
+						behavior:'desc'
 					},
 					},
 					{
 					{
 						label: '保费从低到高',
 						label: '保费从低到高',
-						value: 'bCount',
-						behavior:4
+						value: 'warranty_money',
+						behavior:'asc'
 					},
 					},
 					{
 					{
 						label: '保单从高到低',
 						label: '保单从高到低',
-						value: 'bCount',
-						behavior:3
+						value: 'warranty_count',
+						behavior:'desc'
 					},{
 					},{
 						label: '保单从低到高',
 						label: '保单从低到高',
-						value: 'bCount',
-						behavior:3
+						value: 'warranty_count',
+						behavior:'asc'
 					}],
 					}],
 				page: 1,
 				page: 1,
 				limit: 10,
 				limit: 10,
@@ -170,6 +182,7 @@
 		},
 		},
 		async onLoad(options) {
 		async onLoad(options) {
 			await this.getDict()
 			await this.getDict()
+			await this.getDictCustomType()
 			this.getDataList()
 			this.getDataList()
 		},
 		},
 		onShow() {
 		onShow() {
@@ -190,11 +203,31 @@
 					url: url
 					url: url
 				})
 				})
 			},
 			},
+			// 客户标签字典
 			getDict(){
 			getDict(){
 				return new Promise((r,j)=>{
 				return new Promise((r,j)=>{
-					req.getRequest('/api/other/dict/info',{dictType:'job'},res=>{
+					req.getRequest('/api/other/dict/info',{dictType:'custom_label'},res=>{
+						this.dateList.map(item=>{
+							if(item.key=='custom_label'){
+								item.option = []
+								res.map(it=>{
+									item.option.push({
+										label:it.dictName,
+										value:it.dictValue
+									})
+								})
+							}
+						})
+						r(res)
+					})
+				})
+			},
+			// 客户类型字典
+			getDictCustomType(){
+				return new Promise((r,j)=>{
+					req.getRequest('/api/other/dict/info',{dictType:'custom_type'},res=>{
 						this.dateList.map(item=>{
 						this.dateList.map(item=>{
-							if(item.key=='job'){
+							if(item.key=='custom_type'){
 								item.option = []
 								item.option = []
 								res.map(it=>{
 								res.map(it=>{
 									item.option.push({
 									item.option.push({
@@ -236,19 +269,30 @@
 				this.confirm()
 				this.confirm()
 			},
 			},
 			switchFilterType(index,idx) {
 			switchFilterType(index,idx) {
-				if(!this.dateList[index].option[idx].isActive){
-					this.dateList[index].option.map(item=>{
-						item.isActive = false
-					})
-					this.dateList[index].option[idx].isActive = true
+				// 可多选
+				if(this.dateList[index].key=='custom_label' || this.dateList[index].key=='custom_type'){
+					if(!this.dateList[index].option[idx].isActive){
+						this.dateList[index].option[idx].isActive = true
+					}else{
+						this.dateList[index].option[idx].isActive = false
+					}
 				}else{
 				}else{
-					this.dateList[index].option[idx].isActive = false
+					if(!this.dateList[index].option[idx].isActive){
+						this.dateList[index].option.map(item=>{
+							item.isActive = false
+						})
+						this.dateList[index].option[idx].isActive = true
+					}else{
+						this.dateList[index].option[idx].isActive = false
+					}
 				}
 				}
 				this.dateList = JSON.parse(JSON.stringify(this.dateList))
 				this.dateList = JSON.parse(JSON.stringify(this.dateList))
 			},
 			},
 			confirm() {
 			confirm() {
 				this.hidePop();
 				this.hidePop();
 				this.isLoad = true;
 				this.isLoad = true;
+				this.page=1;
+				this.isLoad = true
 				this.getDataList();
 				this.getDataList();
 			},
 			},
 			reset() {
 			reset() {
@@ -272,23 +316,14 @@
 					longitude: this.longitude,
 					longitude: this.longitude,
 				}
 				}
 				if (this.searchVal) {
 				if (this.searchVal) {
-					queryParams.realName = this.searchVal
-				}
-				// 筛选
-				if (this.dateIndex != -1) {
-					queryParams.dateType = this.dateList[this.dateIndex].value;
-				}else if (this.dateIndex == -1) {
-				} else {
-					queryParams.dateType = 8
-					queryParams.end = this.endTime?this.endTime:null;
-					queryParams.start = this.startTime?this.startTime:null;
+					queryParams.nickName = this.searchVal
 				}
 				}
 				
 				
 				// 状态筛选
 				// 状态筛选
 				if (this.stateIndex != -1) {
 				if (this.stateIndex != -1) {
-					queryParams.orderFiled = this.stateList[this.stateIndex].value;
+					queryParams.orderField = this.stateList[this.stateIndex].value;
 					if(this.stateList[this.stateIndex].behavior){
 					if(this.stateList[this.stateIndex].behavior){
-						queryParams.behavior = this.stateList[this.stateIndex].behavior;
+						queryParams.order = this.stateList[this.stateIndex].behavior;
 					}
 					}
 				}
 				}
 				this.dateList.map(item=>{
 				this.dateList.map(item=>{
@@ -298,10 +333,17 @@
 							queryParams.gender = sl[0].value
 							queryParams.gender = sl[0].value
 						}
 						}
 					}
 					}
-					if(item.key=="job"){
+					if(item.key=="custom_label"){
 						let jl = item.option.filter(it=>{return it.isActive})
 						let jl = item.option.filter(it=>{return it.isActive})
 						if(jl.length>0){
 						if(jl.length>0){
-							queryParams.job = jl[0].value
+							// queryParams.label = jl[0].value
+							queryParams.label = jl.map(item => {return item.value}).join(',')
+						}
+					}
+					if(item.key=="custom_type"){
+						let tl = item.option.filter(it=>{return it.isActive})
+						if(tl.length>0){
+							queryParams.type = tl.map(item => {return item.value}).join(',')
 						}
 						}
 					}
 					}
 				})
 				})
@@ -324,6 +366,7 @@
 			searchFn() {
 			searchFn() {
 				this.page = 1;
 				this.page = 1;
 				this.isLoad = true;
 				this.isLoad = true;
+				this.page=1;
 				this.getDataList();
 				this.getDataList();
 			},
 			},
 			// 拨打电话
 			// 拨打电话