|
@@ -163,6 +163,9 @@
|
|
<div id="jyKeepComponent">
|
|
<div id="jyKeepComponent">
|
|
<keep-component ref="vKeepComponent" @on-save-tag="getKeepList" @on-change-keep="changeKeepStatus" :bid="nowOpenBid" :first="false"></keep-component>
|
|
<keep-component ref="vKeepComponent" @on-save-tag="getKeepList" @on-change-keep="changeKeepStatus" :bid="nowOpenBid" :first="false"></keep-component>
|
|
</div>
|
|
</div>
|
|
|
|
+<div id="jyKeepEntComponent">
|
|
|
|
+ <keep-ent-component ref="vKeepComponent" @on-save-tag="onSaveTag" :bid="nowOpenBid" :first="false"></keep-ent-component>
|
|
|
|
+</div>
|
|
<div class="share1">
|
|
<div class="share1">
|
|
|
|
|
|
<!-- 复制提示 star -->
|
|
<!-- 复制提示 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/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=//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-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>
|
|
<script>
|
|
var shareimgflag = true;
|
|
var shareimgflag = true;
|
|
var area = {{.T.obj.area}}
|
|
var area = {{.T.obj.area}}
|
|
@@ -1302,16 +1308,12 @@
|
|
contentType: 'application/json',
|
|
contentType: 'application/json',
|
|
data: JSON.stringify(params),
|
|
data: JSON.stringify(params),
|
|
success: function(res) {
|
|
success: function(res) {
|
|
- console.log(res)
|
|
|
|
- if(res.data.iscoll) {
|
|
|
|
|
|
+ if(res.data && res.data.iscoll) {
|
|
claimData = true
|
|
claimData = true
|
|
- // $('.icon_state').removeClass('icon-claim').addClass('icon-add-claim')
|
|
|
|
- $('.icon-claim-text').text('已认领')
|
|
|
|
} else {
|
|
} else {
|
|
claimData = false
|
|
claimData = false
|
|
- // $('.icon_state').removeClass('icon-add-claim').addClass('icon-claim')
|
|
|
|
- $('.icon-claim-text').text('认领客户')
|
|
|
|
}
|
|
}
|
|
|
|
+ changeClaimState(claimData)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else if (str == 'g') {
|
|
} else if (str == 'g') {
|
|
@@ -1343,41 +1345,84 @@
|
|
// 商机管理---认领
|
|
// 商机管理---认领
|
|
function setClientClaim (e) {
|
|
function setClientClaim (e) {
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
- if(claimData) {
|
|
|
|
- EasyAlert.show("不支持在该页面进行退回");
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ // if(claimData) {
|
|
|
|
+ // EasyAlert.show("不支持在该页面进行退回");
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // claimData:true则当前为已认领
|
|
if(window.entniche) {
|
|
if(window.entniche) {
|
|
params = {
|
|
params = {
|
|
- "userId": 123,
|
|
|
|
"name": {{.T.obj.buyer}}, //采购单位名称
|
|
"name": {{.T.obj.buyer}}, //采购单位名称
|
|
"province": {{.T.obj.area}}, //省份
|
|
"province": {{.T.obj.area}}, //省份
|
|
"city": {{.T.obj.city}}, //区域
|
|
"city": {{.T.obj.city}}, //区域
|
|
"mold": 1, //1 认领;默认 0关注
|
|
"mold": 1, //1 认领;默认 0关注
|
|
"D": claimData, //true 取关;默认 false 关注
|
|
"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) {
|
|
function setportain (e) {
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
location.href = '/jyapp/big/page/client_portrayal?entName=' + encodeURIComponent({{.T.obj.buyer}}) + '&from=client'
|
|
location.href = '/jyapp/big/page/client_portrayal?entName=' + encodeURIComponent({{.T.obj.buyer}}) + '&from=client'
|
|
@@ -1942,7 +1987,7 @@
|
|
buyertel_show = "hide"
|
|
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="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>'+
|
|
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>'
|
|
'<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==""){
|
|
if(packageCon==""){
|
|
@@ -2049,7 +2094,7 @@
|
|
}
|
|
}
|
|
*/
|
|
*/
|
|
// 大会员用户、非大会员用户都可跳转采购单位画像
|
|
// 大会员用户、非大会员用户都可跳转采购单位画像
|
|
- if(window.entniche) { return }
|
|
|
|
|
|
+ if(newEntNiche) { return }
|
|
location.href = "/jyapp/big/page/unit_portrayal?entName="+encodeURIComponent(rerbuyer)
|
|
location.href = "/jyapp/big/page/unit_portrayal?entName="+encodeURIComponent(rerbuyer)
|
|
}
|
|
}
|
|
|
|
|