diff --git a/pages/customer/detail/index.js b/pages/customer/detail/index.js
index 4990d3f..dbb0cf5 100644
--- a/pages/customer/detail/index.js
+++ b/pages/customer/detail/index.js
@@ -66,6 +66,11 @@ Page({
this.getAppCustomersTag()
//战败标签数据
this.getAppDefeatTag()
+ //意向标签-到店
+ this.getAppDaoDianTag()
+ //意向标签-购买
+ this.getAppGouMaiTag()
+
this.getAppCustomersFilter()
innerAudioContext.onEnded(() => {
@@ -511,12 +516,20 @@ Page({
if(this.data.nextIndex>-1){
params['visit_time'] = this.data.dateList[this.data.nextIndex].year +'-'+ this.data.dateList[this.data.nextIndex].month +'-'+ this.data.dateList[this.data.nextIndex].day;
}
+ if(this.data.statuskey == 0){
+ params['daodian_tag'] = this.data.daoDianTag;
+ }
+ if(this.data.statuskey == 1){
+ params['goumai_tag'] = this.data.gouMaiTag;
+ }
if(this.data.statuskey == 3){
params['invalid_tag'] = this.data.defeatTag;
}
if((this.data.statuskey == 0||this.data.statuskey == 1)&&this.data.wxgr==1){
params['wxgr'] = this.data.wxgr;
}
+ console.log(this.data.daodianTag)
+ console.log(params)
_.apiQuery.putAppCustomers(params).then(res=>{
this.setData({
isShowNote:false,//新增日志弹窗
@@ -1008,7 +1021,7 @@ Page({
})
},
- //跟进渠道
+ //战败理由标签选择
changeDefeat(e) {
if(this.data.defeatIndex != e.detail.value && e.detail.value >= 0){
this.setData({
@@ -1028,6 +1041,100 @@ Page({
}
},
+ //意向标签-到店
+ getAppDaoDianTag(){
+ let params = {};
+ params['id'] = this.data.id;
+ params['tag_type'] = '2';
+ params['tag_type2'] = '1';
+ _.apiQuery.getAppCustomersTag(params).then(res => {
+ this.setData({
+ daoDianTag:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
+ })
+ let that = this
+ if(res.data.tags&&res.data.tags.length>0){
+ let daoDianList = res.data.tags
+ daoDianList.forEach((itemA,index) => {
+ itemA.list.forEach(itemB => {
+ if(itemB.checked){
+ itemA.have=true
+ }
+ })
+ })
+ that.setData({
+ daoDianList,
+ })
+
+ }
+ });
+ },
+
+ //意向标签-到店-单选
+ daoDianRadioPicker(e){
+ let daoDianTag = this.data.daoDianTag
+ daoDianTag[e.currentTarget.dataset.i].list.forEach(item => {
+ item.checked=false
+ })
+ daoDianTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked=true
+ this.setData({
+ daoDianTag,
+ })
+ },
+
+ //意向标签-到店-多选
+ daoDianCheckPicker(e){
+ this.setData({
+ ['daoDianTag['+e.currentTarget.dataset.i+'].list['+e.currentTarget.dataset.j+'].checked']:!this.data.daoDianTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
+ })
+ },
+
+ //意向标签-购买
+ getAppGouMaiTag(){
+ let params = {};
+ params['id'] = this.data.id;
+ params['tag_type'] = '2';
+ params['tag_type2'] = '2';
+ _.apiQuery.getAppCustomersTag(params).then(res => {
+ this.setData({
+ gouMaiTag:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
+ })
+ let that = this
+ if(res.data.tags&&res.data.tags.length>0){
+ let gouMaiList = res.data.tags
+ gouMaiList.forEach((itemA,index) => {
+ itemA.list.forEach(itemB => {
+ if(itemB.checked){
+ itemA.have=true
+ }
+ })
+ })
+ that.setData({
+ gouMaiList,
+ })
+
+ }
+ });
+ },
+
+ //意向标签-购买-单选
+ gouMaiRadioPicker(e){
+ let gouMaiTag = this.data.gouMaiTag
+ gouMaiTag[e.currentTarget.dataset.i].list.forEach(item => {
+ item.checked=false
+ })
+ gouMaiTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked=true
+ this.setData({
+ gouMaiTag,
+ })
+ },
+
+ //意向标签-购买-多选
+ gouMaiCheckPicker(e){
+ this.setData({
+ ['gouMaiTag['+e.currentTarget.dataset.i+'].list['+e.currentTarget.dataset.j+'].checked']:!this.data.gouMaiTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
+ })
+ },
+
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
@@ -1044,6 +1151,10 @@ Page({
this.getAppCustomersTag()
//战败标签数据
this.getAppDefeatTag()
+ //意向标签-到店
+ this.getAppDaoDianTag()
+ //意向标签-购买
+ this.getAppGouMaiTag()
},
//页面上拉触底事件的处理函数
diff --git a/pages/customer/detail/index.wxml b/pages/customer/detail/index.wxml
index 68c67da..9edae5f 100644
--- a/pages/customer/detail/index.wxml
+++ b/pages/customer/detail/index.wxml
@@ -128,9 +128,7 @@
-
-
-
+
{{list.name}}
@@ -142,6 +140,38 @@
+
+
+ {{list.name}}
+
+
+
+ {{option.name}}
+
+
+
+
+
+
+
+
+ 战败理由
+
+ {{detailinfo.defeat.reason}}
+
+
+
@@ -266,6 +296,48 @@
+
+
+
+ {{list.name}}
+
+
+
+
+ {{option.name}}
+
+
+
+
+
+
+ {{option.name}}
+
+
+
+
+
+
+
+
+ {{list.name}}
+
+
+
+
+ {{option.name}}
+
+
+
+
+
+
+ {{option.name}}
+
+
+
+
+
计划回访时间