|
@@ -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() {}
|
|
|
}
|