瀏覽代碼

commit -m 机构画像

zhengjinyi 1 年之前
父節點
當前提交
0750b37126

+ 1 - 1
pages/seller/club/club-info.vue

@@ -6,7 +6,7 @@
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
+		/>
 		<template v-else>
 			<view class="info-header-path" @click="handlePathVisit">
 				<view class="path-text">客户访问采美商城全部记录</view>

+ 12 - 2
pages/seller/club/club-portrait.vue

@@ -6,7 +6,7 @@
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
+		/>
 		<template v-else>
 			<!-- <view class="charts-navbar" id="topBar">
 				<view
@@ -22,7 +22,12 @@
 			<view class="charts-content">
 				<!-- 重点资料 -->
 				<view class="charts-box charts-box0" id="charts-box0">
-					<echartInfo ref="echart-info" :clubInfo="clubInfo" :clubId="clubInfo.clubId" v-if="isRequest" />
+					<echartInfo 
+						ref="echart-info" 
+						:clubInfo="clubInfo" 
+						:clubId="clubInfo.clubId" 
+						:clubUserInfo="clubUserInfo" 
+						v-if="isRequest" />
 				</view>
 				<!-- 用户需求 -->
 				<view class="charts-box charts-box0" id="charts-box0">
@@ -97,6 +102,7 @@ export default {
 			skeletonShow: true,
 			isRequest: false,
 			clubInfo: {},
+			clubUserInfo: {},
 			navBarList: [
 				{ name: '重点资料', index: 0 },
 				{ name: '订单数据', index: 1 },
@@ -130,6 +136,7 @@ export default {
 			try {
 				const clubRes = await this.UserService.OrganizationUpdateModifyInfo({ userId: userId })
 				this.clubInfo =  clubRes.data.club
+				this.clubUserInfo =  clubRes.data.user
 				const tialRes = await this.UserService.userClubInitial({ clubId: this.clubInfo.clubId })
 				this.totalData.orderTotal = tialRes.data.orderTotal
 				this.totalData.orderTotalAmount = tialRes.data.orderTotalAmount
@@ -439,6 +446,9 @@ page {
 			width: 100%;
 			min-height: 300rpx;
 			float: left;
+			&.demand{
+				min-height: 200rpx;
+			}
 			.echart-mains-none {
 				width: 100%;
 				height: 100%;

+ 44 - 83
pages/seller/club/components/echart-demand.vue

@@ -43,8 +43,19 @@
 				>
 			</view>
 		</view>
-		<view class="echart-mains">
-			<view class="echart-mains-none" v-if="isEmpty">
+		<view class="echart-mains demand">
+			<view class="echart-mains-data" v-if="labelsList.length > 0">
+				<view class="list-label-list">
+					<text class="list-label" 
+						  :class="item.isChecked ? 'active' : ''"
+						  v-for="(item, index) in labelsList" 
+						  :key="index"
+					>
+						  {{ item }}
+					</text>
+				</view>
+			</view>
+			<view class="echart-mains-none" v-else>
 				<image
 					class="none-image"
 					src="https://static.caimei365.com/app/img/bg/icon_echart_none@2x.png"
@@ -52,9 +63,6 @@
 				></image>
 				<view class="none-text">暂无数据</view>
 			</view>
-			<view class="echart-mains-data" v-else>
-				<qiun-data-charts type="column" :opts="opts" :chartData="contactChartData" :animation="false" />
-			</view>
 		</view>
 	</view>
 </template>
@@ -76,7 +84,6 @@ export default {
 	},
 	data() {
 		return {
-			isEmpty:false,
 			current: 0,
 			remarksTotal:0,
 			contactChartData:null,
@@ -90,59 +97,14 @@ export default {
 			    dateType:3,//   日期类别 0日 1月 2半年 3全年
 			    startTime:'',//   开始时间
 			    endTime:'',//   结束时间
-			    type:0	//  统计类别 0订单 1搜索关键词 2咨询记录 3访问记录 4初始状态
 			},
-			opts: {
-				legend: {
-					show: false
-				},
-				color: ['#81ecec'],
-				dataLabel: true,
-				padding: [15, 30, 0, 5],
-				enableScroll: false,
-				xAxis: {
-					disableGrid: true,
-					min: 0,
-					axisLine: false,
-					max: 40,
-					rotateLabel: true,
-					format: 'xAxisDemo3'
-				},
-				yAxis: {
-					fontSize: 12,
-					fontColor: '#CCCCCC',
-					axisLineColor: '#DCDCDC',
-					gridColor: '#DCDCDC',
-					boundaryGap: 'justify',
-					disabled: true,
-					axisLine: false,
-					min: 0,
-					max: 40
-				},
-				extra: {
-					column: {
-						type: 'group',
-						width: 20,
-						meterBorde: 1,
-						meterFillColor: '#FFFFFF',
-						activeBgColor: '#000000',
-						activeBgOpacity: 0.08,
-						seriesGap: 2,
-						categoryGap: 3,
-						barBorderCircle: false,
-						linearType: 'custom',
-						linearOpacity: 1,
-						customColor: ['#00cec9', '#81ecec'],
-						colorStop: 0
-					}
-				}
-			}
+			labelsList:[]
 		}
 	},
 	created() {
 		this.params.clubId = this.clubId
 		this.remarksTotal = this.totalNum
-		this.userClubPortrait(2)
+		this.getCustomDemand()
 	},
 	methods: {
 		handleTimeClick(dateType,index,type) {
@@ -152,47 +114,46 @@ export default {
 		    this.params.dateType = dateType
 			this.params.startTime = ''
 			this.params.endTime = ''
-		    this.userClubPortrait(type)
+		    this.getCustomDemand()
 		},
-		async userClubPortrait(type){
-			this.params.type = type
+		async getCustomDemand(){
 			this.contactData.startTime = this.params.startTime
 			this.contactData.endTime = this.params.endTime
 			try {
-				const res = await this.UserService.userClubPortrait(this.params)
+				const res = await this.UserService.getCustomDemand(this.params)
 				const data = res.data
-				this.contactData.remarksScopeNum = data.portrait.remarksScopeNum
-				this.contactData.startTime = this.params.startTime = data.portrait.startTime
-				this.contactData.endTime = this.params.endTime = data.portrait.endTime
-				if(data.remarks){
-					this.isEmpty = false  
-				    this.getSetContactData(data.remarks)
-				}else{
-					this.isEmpty = true  
-				}
-				console.log('contactData',this.contactData)
+				this.labelsList = data.list
+				this.contactData.startTime = this.params.startTime = data.startTime
+				this.contactData.endTime = this.params.endTime = data.endTime
 			} catch (error) {
 			   this.$util.msg(error.msg, 2000)
 			}
-		},
-		getSetContactData(data) {
-			setTimeout(() => {
-				//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
-				let res = {
-					categories:data.name,
-					series: [
-						{
-							name: '',
-							data: data.value
-						}
-					]
-				}
-				this.contactChartData = JSON.parse(JSON.stringify(res))
-			}, 500)
 		}
 	},
 	onShow() {}
 }
 </script>
 
-<style lang="scss"></style>
+<style lang="scss">
+	.list-label-list{
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+		.list-label{
+			display: inline-block;
+			padding: 0 20rpx;
+			height: 48rpx;
+			line-height: 48rpx;
+			background: #F7F7F7;
+			text-align: center;
+			margin-right: 30rpx;
+			margin-bottom: 30rpx;
+			font-size: 26rpx;
+			color: #666666;
+			&.active{
+				background: #FEF6F3;
+				color: #FF5B00;
+			}
+		}
+	}
+</style>

+ 50 - 21
pages/seller/club/components/echart-info.vue

@@ -12,13 +12,14 @@
 			<view class="echart-text">
 				<text class="label">联系人:</text>{{ data.linkMan ? data.linkMan :'无' }}
 			</view>
-			<view class="echart-text">
-				<text class="label">性别:</text>{{ data.linkMan ? data.linkMan :'无' }}
+			<view class="echart-text" v-if="data.customerGender">
+				<text class="label">性别:</text>
+				{{ data.customerGender === 0 ? '男' :'女' }}
 			</view>
-			<view class="echart-text">
-				<text class="label">年龄:</text>{{ data.linkMan ? data.linkMan :'无' }}
+			<view class="echart-text" v-if="data.customerAge">
+				<text class="label">年龄:</text>{{ data.customerAge}}
 			</view>
-			<view class="echart-text">
+			<view class="echart-text" v-if="data.contractMobile">
 				<text class="label">手机号:</text>{{ data.contractMobile }}
 			</view>
 			<view class="echart-text" v-if="data.linkManIdentity">
@@ -27,32 +28,41 @@
 			<view class="echart-text" v-if="data.addTime">
 				<text class="label">注册时间:</text> {{ data.addTime }}
 			</view>
-			<view class="echart-text">
-				<text class="label">客户价值:</text>{{ data.contractMobile }}
+			<view class="echart-text" v-if="data.customerValue">
+				<text class="label">客户价值:</text>
+				{{ data.customerValue }}
 			</view>
-			<view class="echart-text">
-				<text class="label">活跃状态:</text>{{ data.contractMobile }}
+			<view class="echart-text"  v-if="data.activeState">
+				<text class="label">活跃状态:</text>
+				{{ data.activeState }}
 			</view>
-			<view class="echart-text">
-				<text class="label">资料完整度:</text>{{ data.contractMobile }}
+			<view class="echart-text"  v-if="data.number">
+				<text class="label">资料完整度:</text>
+				{{ data.number }}%
 			</view>
-			<view class="echart-text">
-				<text class="label">客户来源:</text>{{ data.contractMobile }}
+			<view class="echart-text" v-if="data.customerSource">
+				<text class="label">客户来源:</text>
+				 {{ data.customerSource | sourceActionsFilters }}
 			</view>
 			<view class="echart-text">
-				<text class="label">机构级别:</text>{{ data.contractMobile }}
+				<text class="label">机构级别:</text>
+				{{ useInfo.userIdentity === 2 ? '资质机构' : '普通机构' }}
 			</view>
 			<view class="echart-text" v-if="data.firstClubType">
-				<text class="label">机构类型:</text>{{ data.firstClubType | FirstFormat }}-{{ data.secondClubType | TwoFormat }}
+				<text class="label">机构类型:</text>
+				{{ data.firstClubType | FirstFormat }}-{{ data.secondClubType | TwoFormat }}
 			</view>
 			<view class="echart-text">
-				<text class="label">入群状态:</text>{{ data.contractMobile }}
+				<text class="label">入群状态:</text>
+				{{ data.groupAddition === 0 ? '已入群' : '未入群' }}
 			</view>
-			<view class="echart-text">
-				<text class="label">微信触达:</text>{{ data.contractMobile }}
+			<view class="echart-text" v-if="data.wx">
+				<text class="label">微信触达:</text>
+				 {{ data.wx}}
 			</view>
-			<view class="echart-text">
-				<text class="label">电话触达:</text>{{ data.contractMobile }}
+			<view class="echart-text" v-if="data.mob">
+				<text class="label">电话触达:</text>
+				 {{ data.mob }}
 			</view>
 			<view class="echart-text" v-if="data.provincialAddress">
 				<text class="label">地址:</text>{{ data.provincialAddress }}
@@ -69,15 +79,21 @@ export default {
 		clubInfo:{
 			type:Object,
 			default:{}
+		},
+		clubUserInfo:{
+			type:Object,
+			default:{}
 		}
 	},
 	data() {
 		return {
-			data:{}
+			data:{},
+			useInfo:{}
 		}
 	},
 	created() {
 		this.data = this.clubInfo
+		this.useInfo = this.clubUserInfo
 	},
 	filters: {
 		FirstFormat(value) {
@@ -121,6 +137,19 @@ export default {
 				92: '审核未通过'
 			}
 			return map[value]
+		},
+		sourceActionsFilters(value) {
+		  // 客户来源
+		  const map = {
+			0: '网站',
+			1: '小程序',
+			2: '公众号',
+			3: '小红书',
+			4: '微博',
+			5: '搜狐',
+			6: '其他'
+		  }
+		  return map[value]
 		}
 	},
 	methods: {

+ 9 - 9
pages/seller/remarks/add-record.vue

@@ -52,7 +52,7 @@
 				</view>
 			</view>
 			<view class="list-view-title">
-				<view class="list-view-h1"><text>*</text>关键词记录:</view>
+				<view class="list-view-h1"><text>*</text>标签记录:</view>
 				<view class="list-view-p"
 					>(请总结客户的咨询内容,以商品或者服务的关键词形式填写,不需要填口语化的内容。)</view
 				>
@@ -64,7 +64,7 @@
 							class="input"
 							type="text"
 							v-model="item.label"
-							placeholder="请输入关键词,不超过10个汉字"
+							placeholder="请输入标签,不超过10个汉字"
 							maxlength="10"
 							@focus="hideAssAction(item, $event)"
 							@blur="hideAssAction(item, $event)"
@@ -76,8 +76,8 @@
 									class="ass-list"
 									v-for="(ass, assIndex) in assActionList"
 									:key="assIndex"
-									@click="SelectAssociationFn(ass.remarks,item)"
-									>{{ ass.remarks }}</view
+									@click="SelectAssociationFn(ass.label,item)"
+									>{{ ass.label }}</view
 								>
 							</scroll-view>
 						</view>
@@ -220,8 +220,7 @@
 			v-if="isGoodspopup"
 			:show="isGoodspopup"
 			@handleChoiceaGoods="handleChoiceaGoodsData"
-		>
-		</cm-goodspopup>
+		/>
 		<!-- 商品列表弹窗 -->
 		<cm-reportpopup
 			ref="cmreportpopup"
@@ -230,8 +229,7 @@
 			:popupType ="2"
 			:reportInfo="reportInfo"
 			@handleChoiceaReport="handleChoiceaReportData"
-		>
-		</cm-reportpopup>
+		/>
 	</view>
 </template>
 
@@ -260,6 +258,7 @@ export default {
 				extra: '',//额外说明
 				fileList: [],
 				imageList: [],
+				remarksId:0,
 				questionManId: 0,
 				serviceProviderId: 0,
 				consult:'',
@@ -319,6 +318,7 @@ export default {
 			uni.setNavigationBarTitle({title:'修改记录'})
 		} else {
 			this.questionMan = option.questionMan
+			this.remarksParams.remarksId = option.remarksId*1
 			this.remarksParams.questionManId = option.questionManId
 			this.reportInfo.questionMan = option.questionMan
 			this.reportInfo.questionManId = option.questionManId
@@ -405,7 +405,7 @@ export default {
 			this.checkRemarkIndex = index
 			this.assActionList = []
 			if (event.detail.value != '') {
-				this.UserService.getCmremarkslist({remarks : event.detail.value}).then(response => {
+				this.UserService.getCmremarkslist({remarks : event.detail.value,type:0}).then(response => {
 					if(response.data&&response.data.length>0){
 						this.assActionList = response.data
 						this.remarksList[index].isAssociation = true

+ 192 - 120
pages/seller/remarks/add.vue

@@ -36,12 +36,10 @@
 						</label>
 					</label>
 				</radio-group>
-				<checkbox-group v-if="current === 0" style="margin-top: 10rpx;">
-					<label class="label">
-						<checkbox value="cb" style="transform:scale(0.7)" color="#FF5B00" />电话
-					</label>
-					<label class="label">
-						<checkbox value="cb" style="transform:scale(0.7)" color="#FF5B00" />微信
+				<checkbox-group v-if="current === 0"  @change="checkboxChange" style="margin-top: 10rpx;">
+					<label class="label" v-for="item in checkboItems" :key="item.value">
+						<checkbox :value="item.value" :checked="item.checked" style="transform:scale(0.7)" color="#FF5B00" />
+						{{item.name}}
 					</label>
 				</checkbox-group>
 			</view>
@@ -89,7 +87,7 @@
 			<view class="list-view-title"> <view class="list-view-h1">客户年龄:</view> </view>
 			<view class="list-view-radio">
 				<picker @change="bindPickerChange(6, $event)" :value="index" :range="ageActions" range-key="name">
-					<input class="input" type="text" disabled="false" v-model="ageText" value="" placeholder="请选择" />
+					<input class="input" type="text" disabled="false" v-model="customerAge" value="" placeholder="请选择" />
 					<text class="iconfont icon-xiangyou"></text>
 				</picker>
 			</view>
@@ -107,10 +105,10 @@
 					<text class="iconfont icon-xiangyou"></text>
 				</picker>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="current === 0">
 				<view class="list-view-h1"><text>*</text>咨询类别:</view>
 			</view>
-			<view class="remarks-category">
+			<view class="remarks-category" v-if="current === 0">
 				<view
 					class="checkbox-list"
 					:class="category.isChecked ? 'checked' : ''"
@@ -122,7 +120,7 @@
 					{{ category.className }}
 				</view>
 			</view>
-			<!-- 			<view class="list-view-title"> <view class="list-view-h1">机构类型:</view> </view>
+<!-- 		<view class="list-view-title"> <view class="list-view-h1">机构类型:</view> </view>
 			<view class="remarks-input">
 				<input
 					class="input"
@@ -154,7 +152,7 @@
 				</view>
 			</view>
 			<view class="list-view-title">
-				<view class="list-view-h1"><text>*</text>标签记录:</view>
+				<view class="list-view-h1">标签记录:</view>
 				<view class="list-view-p">
 					请总结客户的个人画像和咨询内容,尽量使用简短的描述性词语,杜绝口语化的词语 (优先选择以下展示的标签)
 				</view>
@@ -167,7 +165,7 @@
 						  :key="index"
 						  @click="handleCheckedLabel(item,index)"
 					>
-						  {{ item.name }}
+						  {{ item.label }}
 					</text>
 				</view>
 			</view>
@@ -194,8 +192,8 @@
 									class="ass-list"
 									v-for="(ass, assIndex) in staticLabelsActionList"
 									:key="assIndex"
-									@click="handleSelectStaticLabels(ass.remarks, item)"
-									>{{ ass.remarks }}</view
+									@click="handleSelectStaticLabels(ass.label, item)"
+									>{{ ass.label }}</view
 								>
 							</scroll-view>
 						</view>
@@ -237,8 +235,8 @@
 									class="ass-list"
 									v-for="(ass, assIndex) in trendsLabelsActionList"
 									:key="assIndex"
-									@click="handleSelectTrendsLabels(ass.remarks, item)"
-									>{{ ass.remarks }}</view
+									@click="handleSelectTrendsLabels(ass.label, item)"
+									>{{ ass.label }}</view
 								>
 							</scroll-view>
 						</view>
@@ -272,10 +270,10 @@
 				/>
 				<text class="iconfont icon-xiangyou"></text>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="current === 0">
 				<view class="list-view-h1"><text>*</text>价格敏感度:</view>
 			</view>
-			<view class="list-view-radio">
+			<view class="list-view-radio" v-if="current === 0">
 				<picker @change="bindPickerChange(1, $event)" :value="index" :range="priceActions" range-key="name">
 					<input
 						class="input"
@@ -288,10 +286,10 @@
 					<text class="iconfont icon-xiangyou"></text>
 				</picker>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="current === 0">
 				<view class="list-view-h1"><text>*</text>意向程度:</view>
 			</view>
-			<view class="list-view-radio">
+			<view class="list-view-radio" v-if="current === 0">
 				<picker @change="bindPickerChange(2, $event)" :value="index" :range="intenActions" range-key="name">
 					<input
 						class="input"
@@ -304,10 +302,10 @@
 					<text class="iconfont icon-xiangyou"></text>
 				</picker>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="current === 0">
 				<view class="list-view-h1"><text>*</text>跟进状态:</view>
 			</view>
-			<view class="list-view-radio">
+			<view class="list-view-radio" v-if="current === 0">
 				<picker @change="bindPickerChange(3, $event)" :value="index" :range="stateActions" range-key="name">
 					<input
 						class="input"
@@ -379,8 +377,7 @@
 			v-if="isGoodspopup"
 			:show="isGoodspopup"
 			@handleChoiceaGoods="handleChoiceaGoodsData"
-		>
-		</cm-goodspopup>
+		/>
 		<!-- 机构报备弹窗 -->
 		<cm-reportpopup
 			ref="cmreportpopup"
@@ -389,8 +386,7 @@
 			:popupType="1"
 			:reportInfo="reportInfo"
 			@handleChoiceaReport="handleChoiceaReportData"
-		>
-		</cm-reportpopup>
+		/>
 	</view>
 </template>
 
@@ -420,7 +416,6 @@ export default {
 				clubId: 0,
 				questionMan: '',
 				clubType: '', //机构类型
-				remarks: [], // 关键词
 				extra: '', //额外说明
 				fileList: [],
 				imageList: [],
@@ -430,7 +425,17 @@ export default {
 				satisfied: 0, // 意向程度
 				followup: 0, // 跟进状态
 				productId: 0, // 商品Id
-				reportId: 0 // 报备Id
+				reportId: 0 ,// 报备Id
+				communicationSituation:'', // 沟通情况 0 已沟通 1联系不上
+				communicationMethods:'',  //沟通方式  1:电话 2:微信
+				customerSource:'',//客户来源 0 网址 1 小程序 2 公众号 3 小红书 4 微博 5 搜狐 6 其他
+				customerGender:'',// 客户性别 0 男 1 女
+				customerAge:'',// 客户年龄
+				groupAddition:''   ,// 加群情况 0 以加群 1 未加群
+				remarks: [], // 关键词
+				trendsKeyword:[],// 动态标签
+				stateKeyword:[]  // 静态标签
+				
 			},
 			min: 0,
 			max: 200,
@@ -442,12 +447,6 @@ export default {
 			categorys: [],
 			isConfirmLoding: false,
 			reportText: '',
-			remarksList: [
-				{
-					label: '',
-					isAssociation: false
-				}
-			],
 			checkRemarkIndex: 0,
 			assActionList: [],
 			isGoodspopup: false,
@@ -464,6 +463,7 @@ export default {
 	onLoad(option) {
 		console.log(option)
 		if (option.type == 'edit') {
+			this.getPriorKeyword()
 			this.getUserClubConsults()
 			this.getUserClubRemarksDetail(option.remarksId)
 			this.handleType = option.type
@@ -471,6 +471,8 @@ export default {
 		} else {
 			this.clubUserId = option.userId
 			this.getCulbInfo(option.userId)
+			this.getHistoryInfo(option.userId)
+			this.getPriorKeyword()
 			this.getUserClubConsults()
 		}
 	},
@@ -479,6 +481,7 @@ export default {
 		async getCulbInfo(userId) {
 			// 查询机构信息
 			try{
+				const userInfos = await this.$api.getStorage()
 				const res = await this.UserService.OrganizationUpdateModifyInfo({ userId: userId })
 				const data = res.data
 				this.clubInfo = data.club
@@ -486,6 +489,7 @@ export default {
 				this.reportInfo.name = this.clubInfo.name
 				this.reportInfo.linkMan = this.clubInfo.linkMan
 				this.remarksParams.clubId = this.reportInfo.clubId = this.clubInfo.clubId
+				this.remarksParams.serviceProviderId = userInfos.serviceProviderId ? userInfos.serviceProviderId : 0
 				if (this.handleType != 'edit') {
 					this.remarksParams.questionMan = this.clubInfo.linkMan
 				}
@@ -499,14 +503,29 @@ export default {
 				const res = await this.UserService.getUserClubRemarksDetail({ remarksId: remarksId })
 				const data = res.data
 				this.clubUserId = data.userId
-				this.remarksList = data.remarks.map((el, index) => {
-					el.isAssociation = false
-					return el
-				})
 				this.remarksParams.remarksId = data.remarksId
+				this.remarksParams.communicationSituation = this.current = data.communicationSituation
+				this.remarksParams.communicationMethods = data.communicationMethods
+				if(data.communicationMethods === '1,2'){
+					this.checkboItems = this.checkboItems.map(el => {
+						el.checked = true
+						return el
+					})
+				}else{
+					this.checkboItems = this.checkboItems.map(el => {
+						if (el.value*1 === data.communicationMethods) {
+						   el.checked = true
+						}
+						return el
+					})
+				}
 				this.remarksParams.extra = data.extra
 				this.remarksParams.clubType = data.clubType
 				this.remarksParams.pinceSensitve = data.pinceSensitve
+				this.remarksParams.customerSource = data.customerSource
+				this.remarksParams.customerGender = data.customerGender
+				this.remarksParams.customerAge = this.customerAge = data.customerAge
+				this.remarksParams.groupAddition = data.groupAddition
 				this.remarksParams.satisfied = data.satisfied
 				this.remarksParams.followup = data.followup
 				this.remarksParams.fileList = data.fileList
@@ -537,15 +556,68 @@ export default {
 					}
 					this.handleGoods.push(pro)
 				}
+				const remarks = data.remarks.map((el, index) => {
+					if (!this.contains(this.labelsList, el.label)) {
+						el.isChecked = true
+					}
+					return el
+				})
+				console.log('=========>remarks',remarks)
+				this.firstLabelList = data.remarks.map((el, index) => {
+					return el.label
+				})
+				console.log('=========>firstLabelList',this.firstLabelList)
+				this.labelsList = [...remarks ,...this.labelsList]
+				console.log('=========>labelsList',this.labelsList)
+				this.staticLabelsList = data.stateKeyword.map((el, index) => {
+					el.isAssociation = false
+					return el
+				})
+				this.trendsLabelsList = data.trendsKeyword.map((el, index) => {
+					el.isAssociation = false
+					return el
+				})
 				this.reportText = data.reportText ? data.reportText : ''
 				this.priceFlagText = this.pinceFilters(data.pinceSensitve)
 				this.intenFlagText = this.intenActionsFilters(data.satisfied)
 				this.followStateText = this.followupFilters(data.followup)
+				this.sourceStateText = this.sourceActionsFilters(data.customerSource)
+				this.genderText = this.genderActionsFilters(data.customerGender)
+				this.additiveText = this.additiveActionsFilters(data.groupAddition)
 				this.getCulbInfo(data.userId)
 			}catch(error){
 				this.$util.msg(error.msg, 2000)
 			}
 		},
+		async getHistoryInfo(userId) {
+			//查询机构历史填写信息
+			try{
+				const res = await this.UserService.getHistoryInfo({ userId:userId })
+				const data = res.data
+				this.remarksParams.customerSource = data.customerSource
+				this.remarksParams.customerGender = data.customerGender
+				this.remarksParams.customerAge = this.customerAge = data.customerAge
+				this.remarksParams.groupAddition = data.groupAddition
+				this.sourceStateText = this.sourceActionsFilters(data.customerSource)
+				this.genderText = this.genderActionsFilters(data.customerGender)
+				this.additiveText = this.additiveActionsFilters(data.groupAddition)
+			}catch(error){
+				console.log('=========>查询机构历史填写信息失败')
+			}
+		},
+		async getPriorKeyword() {
+			//查询优先展示标签
+			try{
+				const res = await this.UserService.getPriorKeyword()
+				const data = res.data
+				this.labelsList = data.map((el, index) => {
+					el.isChecked = false
+					return el
+				})
+			}catch(error){
+				console.log('=========>获取优先展示标签列表失败')
+			}
+		},
 		async getUserClubConsults() {
 			//查询咨询类别
 			try{
@@ -559,96 +631,66 @@ export default {
 				console.log('=========>获取咨询类别列表失败')
 			}
 		},
-		bindPickerChange(type, e) {
-			//选择筛选条件
-			switch (type) {
-				case 1:
-					this.priceFlagText = this.priceActions[e.target.value].name
-					this.remarksParams.pinceSensitve = this.priceActions[e.target.value].value
-					break
-				case 2:
-					this.intenFlagText = this.intenActions[e.target.value].name
-					this.remarksParams.satisfied = this.intenActions[e.target.value].value
-					break
-				case 3:
-					this.followStateText = this.stateActions[e.target.value].name
-					this.remarksParams.followup = this.stateActions[e.target.value].value
-					break
-				case 4: // 客户来源
-					this.sourceStateText = this.stateActions[e.target.value].name
-					this.remarksParams.followup = this.stateActions[e.target.value].value
-					break
-				case 5: // 客户性别
-					this.genderText = this.stateActions[e.target.value].name
-					this.remarksParams.followup = this.stateActions[e.target.value].value
-					break
-				case 6: // 客户年龄
-					this.ageText = this.stateActions[e.target.value].name
-					this.remarksParams.followup = this.stateActions[e.target.value].value
-					break
-				case 7: // 加群请假
-					this.additiveText = this.stateActions[e.target.value].name
-					this.remarksParams.followup = this.stateActions[e.target.value].value
-					break
-			}
-		},
 		async editButtonConfim() {
 			//保存资料备注
 			if (this.isConfirmLoding) {
 				return
 			}
-			const userInfo = await this.$api.getStorage()
-			if (this.remarksParams.questionMan == '') {
-				this.$util.msg('请输入咨询人姓名', 2000)
-				return
-			}
-			if (this.remarksParams.consult == '') {
-				this.$util.msg('请选择咨询类别', 2000)
-				return
-			}
-			//统一处理关键词
-			let staticLabelsList = []
-			for (const el of this.staticLabelsList) {
-				if (el.label != '') {
-					staticLabelsList.push(el.label)
+			if(this.current === 0){
+				if (this.remarksParams.questionMan == '') {
+					this.$util.msg('请输入咨询人姓名', 2000)
+					return
+				}
+				
+				if (this.remarksParams.consult == '') {
+					this.$util.msg('请选择咨询类别', 2000)
+					return
+				}
+				
+				if (!this.remarksParams.pinceSensitve) {
+					this.$util.msg('请选择价格敏感度', 2000)
+					return
+				}
+				
+				if (!this.remarksParams.satisfied) {
+					this.$util.msg('请选择意向程度', 2000)
+					return
+				}
+				
+				if (!this.remarksParams.followup) {
+					this.$util.msg('请选择跟进状态', 2000)
+					return
 				}
 			}
-			if (staticLabelsList.length == 0) {
-				this.$util.msg('请输入关键词记录', 2000)
-				return
-			}
-			if (!this.remarksParams.pinceSensitve) {
-				this.$util.msg('请选择价格敏感度', 2000)
-				return
-			}
-			if (!this.remarksParams.satisfied) {
-				this.$util.msg('请选择意向程度', 2000)
-				return
-			}
-			if (!this.remarksParams.followup) {
-				this.$util.msg('请选择跟进状态', 2000)
-				return
-			}
-			this.remarksParams.remarks = JSON.stringify(staticLabelsList)
+			//统一处理静态标签
+			let staticLabelsList = this.staticLabelsList.map( (el) =>{
+				return el.label
+			})
+			//统一处理动态标签
+			let trendsLabelsList = this.trendsLabelsList.map( (el) =>{
+				return el.label
+			})
+			this.remarksParams.remarks = JSON.stringify(this.firstLabelList)
+			this.remarksParams.trendsKeyword = JSON.stringify(trendsLabelsList)
+			this.remarksParams.stateKeyword = JSON.stringify(staticLabelsList)
 			console.log('remarksParams', this.remarksParams)
-			this.remarksParams.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
 			this.isConfirmLoding = true
-			this.UserService.getUserClubRemarksSave({
-				params: JSON.stringify(this.remarksParams)
-			})
-				.then(response => {
-					this.$util.msg('保存成功', 3000, true, 'success')
-					this.isConfirmLoding = false
-					setTimeout(() => {
-						uni.navigateBack({
-							delta: 1
-						})
-					}, 1000)
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-					this.isConfirmLoding = false
-				})
+			this.getUserClubRemarksSave({ params: JSON.stringify(this.remarksParams) })
+		},
+		async getUserClubRemarksSave(params){
+			try{
+				await this.UserService.getUserClubRemarksSave(params)
+				this.$util.msg('保存成功', 3000, true, 'success')
+				this.isConfirmLoding = false
+				setTimeout(() => {
+					uni.navigateBack({
+						delta: 1
+					})
+				}, 1000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+				this.isConfirmLoding = false
+			}
 		},
 		choiceCategorys(category, index) {
 			// 选择类别
@@ -790,7 +832,37 @@ export default {
 				4: '随便看看'
 			}
 			return map[value]
-		}
+		},
+		sourceActionsFilters(value) {
+			// 客户来源
+			const map = {
+				0: '网站',
+				1: '小程序',
+				2: '公众号',
+				3: '小红书',
+				4: '微博',
+				5: '搜狐',
+				6: '其他'
+				
+			}
+			return map[value]
+		},
+		genderActionsFilters(value) {
+			// 客户性别
+			const map = {
+				0: '男',
+				1: '女'
+			}
+			return map[value]
+		},
+		additiveActionsFilters(value) {
+			// 加群情况
+			const map = {
+				0: '已加群',
+				1: '未加群'
+			}
+			return map[value]
+		},
 	},
 	onShow() {}
 }

+ 77 - 15
pages/seller/remarks/details.vue

@@ -24,21 +24,49 @@
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
+		/>
 		<view class="remarks-content clearfix" v-else>
+			<view class="list-view-title">
+				<view class="list-view-h1">
+					沟通情况:
+					<text> {{ remarksParams.communicationSituation === 0 ? '已沟通' : '联系不上' }} </text>
+					<text v-if="remarksParams.communicationMethods === 1"> (电话) </text>
+					<text v-if="remarksParams.communicationMethods === 2"> (微信) </text>
+					<text v-if="remarksParams.communicationMethods ==='1,2'"> (电话,微信) </text>
+				</view>
+			</view>
 			<view class="list-view-title">
 				<view class="list-view-h1"
 					>咨询人:<text> {{ remarksParams.questionMan }} </text></view
 				>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="remarksParams.consultBack">
 				<view class="list-view-h1">
 					咨询类别:<text>{{ remarksParams.consultBack ? remarksParams.consultBack : '无' }}</text>
 				</view>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="remarksParams.customerSource">
+				<view class="list-view-h1">
+					客户来源:
+					<text>{{ remarksParams.customerSource | sourceActionsFilters }}</text>
+				</view>
+			</view>
+			<view class="list-view-title" v-if="remarksParams.customerGender">
 				<view class="list-view-h1">
-					机构类型:<text>{{ remarksParams.clubType ? remarksParams.clubType : '无' }}</text>
+					客户性别:
+					<text>{{ remarksParams.customerGender | genderActionsFilters }}</text>
+				</view>
+			</view>
+			<view class="list-view-title" v-if="remarksParams.customerAge">
+				<view class="list-view-h1">
+					客户年龄:
+					<text>{{ remarksParams.customerAge }}</text>
+				</view>
+			</view>
+			<view class="list-view-title" v-if="remarksParams.groupAddition">
+				<view class="list-view-h1">
+					加群情况:
+					<text>{{ remarksParams.groupAddition | additiveActionsFilters }}</text>
 				</view>
 			</view>
 			<view class="list-view-title" v-if="remarksParams.productName"> <view class="list-view-h1">咨询商品:</view> </view>
@@ -51,12 +79,14 @@
 					</view>
 				</view>
 			</view>
-			<view class="list-view-title"> <view class="list-view-h1">关键词记录:</view> </view>
-			<view class="tui-remarks-content">
-				<text class="tui-remarks-span" v-for="(label, labelIndex) in remarksParams.remarks" :key="labelIndex">
-					{{ label.label }}
-				</text>
-			</view>
+			<template v-if="labelsList.length>0">
+				<view class="list-view-title"> <view class="list-view-h1">标签记录:</view> </view>
+				<view class="tui-remarks-content">
+					<text class="tui-remarks-span" v-for="(label, labelIndex) in labelsList" :key="labelIndex">
+						{{ label.label }}
+					</text>
+				</view>
+			</template>
 			<view class="list-view-title" v-if="remarksParams.status">
 				<view class="list-view-h1"
 					>关联报备:<text>{{ remarksParams.reportText }}</text></view
@@ -76,22 +106,22 @@
 					<view class="txm" v-if="remarksParams.auditText">{{ remarksParams.auditText }}</view>
 				</view>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="remarksParams.pinceSensitve">
 				<view class="list-view-h1"
 					>价格敏感度:<text>{{ remarksParams.pinceSensitve | pinceFilters }}</text>
 				</view>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="remarksParams.satisfied">
 				<view class="list-view-h1"
 					>意向程度:<text>{{ remarksParams.satisfied | intenActionsFilters }}</text></view
 				>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="remarksParams.followup">
 				<view class="list-view-h1"
 					>跟进状态:<text>{{ remarksParams.followup | followupFilters }}</text></view
 				>
 			</view>
-			<view class="list-view-title">
+			<view class="list-view-title" v-if="remarksParams.extra">
 				<view class="list-view-h1"
 					>额外说明:<text>{{ remarksParams.extra ? remarksParams.extra : '无' }}</text></view
 				>
@@ -144,7 +174,8 @@ export default {
 			clubInfo: {},
 			userInfo: {},
 			categorys: '',
-			skeletonShow:true
+			skeletonShow:true,
+			labelsList:[]
 		}
 	},
 	onLoad(option) {
@@ -190,6 +221,36 @@ export default {
 				4: '随便看看'
 			}
 			return map[value]
+		},
+		sourceActionsFilters(value) {
+			// 客户来源
+			const map = {
+				0: '网站',
+				1: '小程序',
+				2: '公众号',
+				3: '小红书',
+				4: '微博',
+				5: '搜狐',
+				6: '其他'
+				
+			}
+			return map[value]
+		},
+		genderActionsFilters(value) {
+			// 客户性别
+			const map = {
+				0: '男',
+				1: '女'
+			}
+			return map[value]
+		},
+		additiveActionsFilters(value) {
+			// 加群情况
+			const map = {
+				0: '已加群',
+				1: '未加群'
+			}
+			return map[value]
 		}
 	},
 	methods: {
@@ -201,6 +262,7 @@ export default {
 			})
 				.then(response => {
 					this.remarksParams = response.data
+					this.labelsList = [...this.remarksParams.remarks,...this.remarksParams.stateKeyword,...this.remarksParams.trendsKeyword]
 					this.clubUserId = response.data.userId
 					this.getCulbInfo()
 					setTimeout(()=>{

+ 68 - 29
pages/seller/remarks/mixins/addMixins.js

@@ -3,8 +3,12 @@ const addMixins = {
     data() {
         return {
             items: [
-                { value: '1',name: '已沟通',checked: false},
-                { value: '2',name: '联系不上',checked: false}
+                { name: '已沟通',value: '0',checked: false,},
+                { name: '联系不上',value: '1',checked: false}
+            ],
+            checkboItems:[
+                { name: '电话',value: '1',checked: false,},
+                { name: '微信',value: '2',checked: false}
             ],
             current: '',
             priceFlagText: '',
@@ -29,20 +33,20 @@ const addMixins = {
             ],
             sourceStateText: '', // 客户来源
             sourceActions: [
-                { name: '网站', value: 1 },
-                { name: '小程序', value: 2 },
-                { name: '公众号', value: 3 },
-                { name: '小红书', value: 4 },
-                { name: '微博', value: 5 },
-                { name: '搜狐', value: 6 },
-                { name: '其他', value: 7 }
+                { name: '网站', value: 0 },
+                { name: '小程序', value: 1 },
+                { name: '公众号', value: 2 },
+                { name: '小红书', value: 3 },
+                { name: '微博', value: 4 },
+                { name: '搜狐', value: 5 },
+                { name: '其他', value: 6 }
             ],
             genderText: '', // 客户性别
             genderActions: [
-                { name: '男', value: 1 },
-                { name: '女', value: 2 }
+                { name: '男', value: 0 },
+                { name: '女', value: 1 }
             ],
-            ageText: '', // 客户年龄
+            customerAge: '', // 客户年龄
             ageActions: [
                 { name: '20-30', value: 1 },
                 { name: '30-40', value: 2 },
@@ -52,18 +56,11 @@ const addMixins = {
             ],
             additiveText: '', // 加群情况
             additiveActions: [
-                { name: '已加群', value: 1 },
-                { name: '未加群', value: 2 }
-            ],
-            labelsList: [
-                { name: '国产品牌', value: 1, isChecked: false },
-                { name: '国产品牌', value: 1, isChecked: false },
-                { name: '国产品牌', value: 1, isChecked: false },
-                { name: '国产品牌', value: 1, isChecked: false },
-                { name: '国产品牌', value: 1, isChecked: false },
-                { name: '国产品牌', value: 1, isChecked: false },
+                { name: '已加群', value: 0 },
+                { name: '未加群', value: 1 }
             ],
-            checkedLabelList: '',
+            labelsList: [],
+            firstLabelList: [],
             staticLabelsList: [{ // 静态标签
                 label: '',
                 isAssociation: false
@@ -84,29 +81,71 @@ const addMixins = {
     methods: {
         // 切换沟通情况
         radioChange(evt) {
+            console.log('evnt',evt.detail.value)
             for (let i = 0; i < this.items.length; i++) {
                 if (this.items[i].value === evt.detail.value) {
                     this.current = i
+                    this.remarksParams.communicationSituation = evt.detail.value*1
+                    console.log('communicationMethods',this.remarksParams.communicationSituation)
                     break
                 }
             }
         },
+        // 选择联系方式
+        checkboxChange(evnt){
+            let data  = evnt.detail.value
+            this.remarksParams.communicationMethods = data.join(',')
+            console.log('communicationMethods',this.remarksParams.communicationMethods)
+        },
+        bindPickerChange(type, e) {
+            //选择筛选条件
+            switch (type) {
+            case 1:
+                this.priceFlagText = this.priceActions[e.target.value].name
+                this.remarksParams.pinceSensitve = this.priceActions[e.target.value].value
+                break
+            case 2:
+                this.intenFlagText = this.intenActions[e.target.value].name
+                this.remarksParams.satisfied = this.intenActions[e.target.value].value
+                break
+            case 3:
+                this.followStateText = this.stateActions[e.target.value].name
+                this.remarksParams.followup = this.stateActions[e.target.value].value
+                break
+            case 4: // 客户来源
+                this.sourceStateText = this.sourceActions[e.target.value].name
+                this.remarksParams.customerSource = this.sourceActions[e.target.value].value
+                break
+            case 5: // 客户性别
+                this.genderText = this.genderActions[e.target.value].name
+                this.remarksParams.customerGender = this.genderActions[e.target.value].value
+                break
+            case 6: // 客户年龄
+                this.customerAge = this.ageActions[e.target.value].name
+                this.remarksParams.customerAge = this.ageActions[e.target.value].name
+                break
+            case 7: // 加群情况
+                this.additiveText = this.additiveActions[e.target.value].name
+                this.remarksParams.groupAddition = this.additiveActions[e.target.value].value
+                break
+            }
+        },
         handleCheckedLabel(label, index) {
             // 选择标签
             label.isChecked = !label.isChecked
             if (label.isChecked) {
-                if (!this.contains(this.checkedLabelList, label.id)) {
-                    this.checkedLabelList.push(label.id)
+                if (!this.contains(this.firstLabelList, label.label)) {
+                    this.firstLabelList.push(label.label)
                 }
             } else {
-                this.checkedLabelList.splice(this.checkedLabelList.indexOf(label.id), 1)
+                this.firstLabelList.splice(this.firstLabelList.indexOf(label.label), 1)
             }
-            this.remarksParams.labels = this.checkedLabelList.join(',')
+            console.log('firstLabelList', this.firstLabelList)
         },
         // 标签联动搜索
         async getCmremarkslist(index,value,type){
             try{
-                const res = await this.UserService.getCmremarkslist({ remarks: value })
+                const res = await this.UserService.getCmremarkslist({ remarks: value , type : type })
                 const data = res.data 
                 if(data && data.length > 0){
                     if(type === 1){
@@ -163,7 +202,7 @@ const addMixins = {
             this.trendsLabelsActionList = []
             this.checkTrendsLabelsIndex = index
             if (event.detail.value != '') {
-                this.getCmremarkslist(index,event.detail.value,2)
+                this.getCmremarkslist(index,event.detail.value,0)
             } else {
                 this.trendsLabelsList[index].isAssociation = false
             }

+ 1 - 1
pages/seller/remarks/record-details.vue

@@ -26,7 +26,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="list-view-title"> <view class="list-view-h1">关键词记录:</view> </view>
+			<view class="list-view-title"> <view class="list-view-h1">标签记录:</view> </view>
 			<view class="tui-remarks-content">
 				<text class="tui-remarks-span" v-for="(label, labelIndex) in remarksParams.remarks" :key="labelIndex">
 					{{ label.label }}

+ 17 - 9
pages/seller/remarks/record-list.vue

@@ -395,23 +395,31 @@ export default {
 			console.log('data',data)
 			this.handleSaveVisitor(data)
 		},
-		handleSaveVisitor(data) {
+		async handleSaveVisitor(name) {
 			// 添加咨询人
+			try{
+				let params = { name: name,serviceProviderId: this.listQuery.serviceProviderId }
+				const res = await this.UserService.getUserClubVisitorSave(params)
+				const data = res.data
+				setTimeout(() => {
+					this.$api.navigateTo(
+						`/pages/seller/remarks/add-record?questionManId=${data.questionManId}&questionMan=${
+							data.questionMan
+						}&remarksId=${data.remarksId}`
+					)
+				}, 1000)
+			}catch(error){
+				console.log('=======>添加咨询人失败~')
+			}
 			this.UserService.getUserClubVisitorSave({
 				name: data,
 				serviceProviderId: this.listQuery.serviceProviderId
 			})
 				.then(response => {
-					setTimeout(() => {
-						this.$api.navigateTo(
-							`/pages/seller/remarks/add-record?questionManId=${response.data.questionManId}&questionMan=${
-								response.data.questionMan
-							}`
-						)
-					}, 1000)
+					
 				})
 				.catch(error => {
-					console.log('=======>添加咨询人失败~')
+					
 				})
 		},
 		handleClick(e) {

+ 34 - 1
services/user.service.js

@@ -543,6 +543,39 @@ export default class UserService {
 	        isLoading: false
 	    })
     }
+    /**
+	 *@获取有限展示标签;
+	 *@param	
+	 */
+    getPriorKeyword (data = {}) {
+	    return this.AjaxService.get({
+	        url:'/user/club/remarks/getPriorKeyword',
+	        data,
+	        isLoading: false
+	    })
+    }
+    /**
+	 *@查询机构历史填写信息;
+	 *@param	
+	 */
+    getHistoryInfo (data = {}) {
+	    return this.AjaxService.get({
+	        url:'/user/club/remarks/getHistoryInfo',
+	        data,
+	        isLoading: false
+	    })
+    }
+    /**
+	 *@机构画像获取用户需求;
+	 *@param	
+	 */
+    getCustomDemand (data = {}) {
+	    return this.AjaxService.get({
+	        url:'/user/club/getCustomDemand',
+	        data,
+	        isLoading: false
+	    })
+    }
     /**
 	 *@获取协销组长列表
 	 */
@@ -951,7 +984,7 @@ export default class UserService {
 	        isLoading: false ,
 	    }) 
     } 
-	/**
+    /**
      * @param 供应商落地页  
      */
     supplierLoading(data = {}) {