|
@@ -163,6 +163,9 @@
|
|
|
<div id="jyKeepComponent">
|
|
|
<keep-component ref="vKeepComponent" @on-save-tag="getKeepList" @on-change-keep="changeKeepStatus" :bid="nowOpenBid" :first="false"></keep-component>
|
|
|
</div>
|
|
|
+<div id="jyKeepEntComponent">
|
|
|
+ <keep-ent-component ref="vKeepComponent" @on-save-tag="onSaveTag" :bid="nowOpenBid" :first="false"></keep-ent-component>
|
|
|
+</div>
|
|
|
<div class="share1">
|
|
|
|
|
|
<!-- 复制提示 star -->
|
|
@@ -844,6 +847,9 @@
|
|
|
<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
|
|
|
<script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
|
|
|
<script src='/common-module/keep-tags/keep-tags-template.js?v={{Msg "seo" "version"}}'></script>
|
|
|
+<script src='/common-module/keep-tags/keep-ent-tags-template.js?v={{Msg "seo" "version"}}'></script>
|
|
|
+<!-- <script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>
|
|
|
+<script> new VConsole(); </script> -->
|
|
|
<script>
|
|
|
var shareimgflag = true;
|
|
|
var area = {{.T.obj.area}}
|
|
@@ -1092,7 +1098,6 @@
|
|
|
window.fileNum = res.data.fileNum // 超级订阅用户可下载附件次数
|
|
|
bigstatus = res.data.memberStatus
|
|
|
hasServiceArr = res.data.power ? res.data.power : []
|
|
|
- $('.commonUser').show()
|
|
|
isFollow()
|
|
|
if (window.isFree){
|
|
|
checkShowDialog()
|
|
@@ -1157,12 +1162,16 @@
|
|
|
$('.icon-help').css('display', 'inline-block')
|
|
|
$('.file-count').html(res.data.fileNum)
|
|
|
}
|
|
|
+ getNewEntRoot()
|
|
|
},
|
|
|
error:function(err) {
|
|
|
console.log(err)
|
|
|
}
|
|
|
})
|
|
|
- $.ajax({
|
|
|
+ }
|
|
|
+
|
|
|
+ function getNewEntRoot () {
|
|
|
+ $.ajax({
|
|
|
type: "post",
|
|
|
url: '/entnicheNew/buy/whetherbuy',
|
|
|
success: function(res) {
|
|
@@ -1172,6 +1181,9 @@
|
|
|
if(res.data.isNew) {
|
|
|
$('.commonUser').hide()
|
|
|
$('.entnicheUser').show()
|
|
|
+ if(!{{.T.obj.buyer}}) {
|
|
|
+ $('.entnicheUser .sum_right').hide()
|
|
|
+ }
|
|
|
getActionState ({{.T.obj.buyer}}, 'g')
|
|
|
getActionState ({{.T.obj.buyer}}, 'r')
|
|
|
} else {
|
|
@@ -1182,6 +1194,7 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ getNewEntRoot()
|
|
|
//isOpening()
|
|
|
// 大会员引流文案
|
|
|
function getDrainInfo () {
|
|
@@ -1298,20 +1311,16 @@
|
|
|
contentType: 'application/json',
|
|
|
data: JSON.stringify(params),
|
|
|
success: function(res) {
|
|
|
- console.log(res)
|
|
|
- if(res.data.iscoll) {
|
|
|
+ if(res.data && res.data.iscoll) {
|
|
|
claimData = true
|
|
|
- // $('.icon_state').removeClass('icon-claim').addClass('icon-add-claim')
|
|
|
- $('.icon-claim-text').text('已认领')
|
|
|
} else {
|
|
|
claimData = false
|
|
|
- // $('.icon_state').removeClass('icon-add-claim').addClass('icon-claim')
|
|
|
- $('.icon-claim-text').text('认领客户')
|
|
|
}
|
|
|
+ changeClaimState(claimData)
|
|
|
}
|
|
|
})
|
|
|
} else if (str == 'g') {
|
|
|
- $(".follow").css("display","")
|
|
|
+
|
|
|
// 关注
|
|
|
let param = {
|
|
|
sid:id
|
|
@@ -1321,8 +1330,8 @@
|
|
|
url: '/entnicheNew/follow/project/check',
|
|
|
data: param,
|
|
|
success: function(res) {
|
|
|
- console.log(res)
|
|
|
- if(res.error_code == 0) {
|
|
|
+ if(res.error_code == 0 &&res.data&& res.data.showFollow) {
|
|
|
+ $(".follow").css("display","")
|
|
|
if(res.data.flag) {
|
|
|
followFlag = true
|
|
|
$(".follow").addClass('follow_vip').html('<i class="glyphicon yiguanzhu"></i>已关注');
|
|
@@ -1339,41 +1348,84 @@
|
|
|
// 商机管理---认领
|
|
|
function setClientClaim (e) {
|
|
|
e.preventDefault()
|
|
|
- if(claimData) {
|
|
|
- EasyAlert.show("不支持在该页面进行退回");
|
|
|
- return
|
|
|
- }
|
|
|
+ // if(claimData) {
|
|
|
+ // EasyAlert.show("不支持在该页面进行退回");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // claimData:true则当前为已认领
|
|
|
if(window.entniche) {
|
|
|
params = {
|
|
|
- "userId": 123,
|
|
|
"name": {{.T.obj.buyer}}, //采购单位名称
|
|
|
"province": {{.T.obj.area}}, //省份
|
|
|
"city": {{.T.obj.city}}, //区域
|
|
|
"mold": 1, //1 认领;默认 0关注
|
|
|
"D": claimData, //true 取关;默认 false 关注
|
|
|
}
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/entnicheNew/customer/attention',
|
|
|
- contentType: 'application/json',
|
|
|
- data: JSON.stringify(params),
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- if(res.error_code == 0) {
|
|
|
- if(res.data) {
|
|
|
- if(claimData) {
|
|
|
- // $('.icon_state').removeClass('icon-add-claim').addClass('icon-claim')
|
|
|
- } else {
|
|
|
- $('.icon-claim-text').text('已认领')
|
|
|
- // $('.icon_state').removeClass('icon-claim').addClass('icon-add-claim')
|
|
|
- }
|
|
|
+
|
|
|
+ sessionStorage.setItem('setClientInfo', JSON.stringify(params))
|
|
|
+ if (!claimData) {
|
|
|
+ vKeepEntComponent.changeBid(params.name, !claimData)
|
|
|
+ } else {
|
|
|
+ // 取消认领
|
|
|
+ setClaimState(params)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function setClaimState (params) {
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/entnicheNew/customer/attention',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(res) {
|
|
|
+ if(res.error_code == 0) {
|
|
|
+ if(res.data) {
|
|
|
+ claimData = !claimData
|
|
|
+ changeClaimState(claimData)
|
|
|
+ if (claimData) {
|
|
|
+ EasyAlert.show('认领成功')
|
|
|
+ } else {
|
|
|
+ EasyAlert.show('取消认领成功')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ function changeClaimState (f) {
|
|
|
+ if (f) {
|
|
|
+ $('.icon-claim-text').text('已认领')
|
|
|
+ $('.icon_state').removeClass('icon-claim').addClass('icon-add-claim')
|
|
|
+ } else {
|
|
|
+ $('.icon-claim-text').text('认领客户')
|
|
|
+ $('.icon_state').removeClass('icon-add-claim').addClass('icon-claim')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 商机管理-认领客户
|
|
|
+ var vKeepEntComponent = new Vue({
|
|
|
+ delimiters: ['${', '}'],
|
|
|
+ el: '#jyKeepEntComponent',
|
|
|
+ data: {
|
|
|
+ nowOpenBid: ''
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ changeBid (id, type) {
|
|
|
+ this.nowOpenBid = id
|
|
|
+ this.$refs.vKeepComponent.ajaxAddKeep(id, type)
|
|
|
+ },
|
|
|
+ onSaveTag (data) {
|
|
|
+ var getclient = sessionStorage.getItem('setClientInfo')
|
|
|
+ if(getclient) {
|
|
|
+ getclient = JSON.parse(getclient)
|
|
|
+ getclient.label = data
|
|
|
+ setClaimState(getclient)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
function setportain (e) {
|
|
|
e.preventDefault()
|
|
|
location.href = '/jyapp/big/page/client_portrayal?entName=' + encodeURIComponent({{.T.obj.buyer}}) + '&from=client'
|
|
@@ -1762,7 +1814,7 @@
|
|
|
}
|
|
|
if(res.data.memberStatus <= 0 || hasServiceArr.indexOf(14) == -1){
|
|
|
if (newEntNiche) {
|
|
|
- return goMemberFollowPage('/jyapp/big/page/client_follow_detail')
|
|
|
+ return goMemberFollowPage('/jyapp/big/page/client_follow_detail?from=client')
|
|
|
}
|
|
|
if (hsn){
|
|
|
if (projectname != "" || projectcode != "" ){
|
|
@@ -1938,7 +1990,7 @@
|
|
|
buyertel_show = "hide"
|
|
|
}
|
|
|
outhtml +='<li class="caigouunit commonUser"><p class="name">采购单位</p><div class="unitcenter"><p class="textcontent">'+rerbuyer+'</p><div class="unitbtn '+rerbuyer_show+'">立即查看<span class="iconunit" style="display:none;"></span></div></div></li>'
|
|
|
- outhtml +='<li class="entnicheUser"><p class="name">采购单位</p><div class="unitcenter sum_caigou client_caigou"><p class="textcontent">'+rerbuyer+'</p><div class="sum_right"><div class="claim" onClick="setportain(event)"><span class="j-icon icon-porait"></span><span class="getproit" style="color:#2ABED1">查看画像</span></div><span class="columnLine"></span><div class="claim clientClaim" onClick="setClientClaim(event)"><span class="j-icon icon_state icon-add-claim"></span><span class="icon-claim-text" style="color:#2ABED1;font-size: .26rem;">认领客户</span></div></div></div></li>'
|
|
|
+ outhtml +='<li class="entnicheUser"><p class="name">采购单位</p><div class="unitcenter sum_caigou client_caigou"><p class="textcontent">'+rerbuyer+'</p><div class="sum_right"><div class="claim" onClick="setportain(event)"><span class="j-icon icon-porait"></span><span class="getproit" style="color:#2ABED1">查看画像</span></div><span class="columnLine"></span><div class="claim clientClaim" onClick="setClientClaim(event)"><span class="j-icon icon_state icon-claim"></span><span class="icon-claim-text" style="color:#2ABED1;font-size: .26rem;">认领客户</span></div></div></div></li>'
|
|
|
outhtml +='<li><p class="name">采购联系人</p><p class="textcontent">'+rerbuyerperson+'</p></li>'+
|
|
|
'<li class="bbm0"><p class="name">采购电话</p><p class="textcontent">'+rerbuyertel+'</p><a class="border-tel_ '+buyertel_show+'" style="position: static;display:block" datalink="/jyapp/vipsubscribe/introducePage"><div class="tel"></div></a></li>'
|
|
|
if(packageCon==""){
|
|
@@ -2045,7 +2097,7 @@
|
|
|
}
|
|
|
*/
|
|
|
// 大会员用户、非大会员用户都可跳转采购单位画像
|
|
|
- if(window.entniche) { return }
|
|
|
+ if(newEntNiche) { return }
|
|
|
location.href = "/jyapp/big/page/unit_portrayal?entName="+encodeURIComponent(rerbuyer)
|
|
|
}
|
|
|
|
|
@@ -2392,7 +2444,7 @@
|
|
|
// 添加关注的项目
|
|
|
let cancelurl = '/bigmember/follow/project/cancel'
|
|
|
let confirmurl = '/bigmember/follow/project/add'
|
|
|
- if(window.entniche) {
|
|
|
+ if(newEntNiche) {
|
|
|
cancelurl = '/entnicheNew/follow/project/cancel'
|
|
|
confirmurl = '/entnicheNew/follow/project/add'
|
|
|
}
|