Browse Source

采购单位\企业画像添加历史项目联系方式

TANGSHIZHE 4 years ago
parent
commit
27cd1cb1cf

+ 2 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -2,7 +2,8 @@ var vNode = {
     delimiters: ['${', '}'],
     el: '#ent-portrait',
     components: {
-        vipComponent: vipComponent
+        vipComponent: vipComponent,
+        hisproComponent: hisproComponent
     },
     data () {
         // 修改柱状条颜色为渐变色

+ 3 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -3,6 +3,9 @@ var pieChart = null;
 var vNode = {
     delimiters: ['${', '}'],
     el: '#unit_portrayal',
+    components: {
+      hisproComponent: hisproComponent
+    },
     data() {
         // 修改柱状条颜色为渐变色
         this.colorGreen = [new echarts.graphic.LinearGradient(

+ 7 - 0
src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html

@@ -228,6 +228,12 @@
                     <div class="j-img img-empty empty-img"></div>
                     <p class="empty-text">暂无项目动态</p>
                 </div>
+                <div class="bg-white tab-card cell-list history-list" v-if="conf._4 && tabActiveName == '2' && !getStatus">
+                    <hispro-component type="winner" :id="entInfo.id"></hispro-component>
+                </div>
+                <div class="vip_component" v-if="getStatus" style="height:11.36rem;background:url('/common-module/collection/image/bg/vip_bg_9.png') no-repeat;background-size:100% 100%">
+                    <vip-component type="item_9" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_9.png'></vip-component>
+                </div>
                 <div class="bg-white tab-card cell-list" v-show="conf._13 && topProject.list.length !== 0 && !getStatus">
                     <div class="tab-card-title">项目动态</div>
                     <div class="tab-card-content">
@@ -409,6 +415,7 @@
 {{include "/big-member/commonjs.html"}}
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/vip-dialog.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/history-project.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/echarts_option.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/chart_options.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/ent_portrait.js?v={{Msg "seo" "version"}}'></script>

+ 6 - 0
src/jfw/modules/app/src/web/templates/big-member/page_unit_portrayal.html

@@ -19,6 +19,7 @@
     <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/v-charts@1.19.0/lib/style.min.css />
     <!--E-当前页面的css资源-->
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/css/index.css?v={{Msg "seo" "version"}}' />
     <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/unit_portrayal.css?v={{Msg "seo" "version"}}' />
     <style>
         .skeleton{
@@ -84,6 +85,10 @@
                 <div class="j-img img-empty empty-img"></div>
                 <p class="empty-text">暂无画像信息</p>
             </div>
+            <!-- 历史项目联系人 -->
+            <div class="history-list">
+                <hispro-component type="buyer" :buyer="buyer.name"></hispro-component>
+            </div>
             <!-- 招标动态 -->
             <div class="dynamic" v-if="isShow.showDynamic">
                 <div class="d_title">招标动态</div>
@@ -302,6 +307,7 @@
 {{include "/big-member/commonjs.html"}}
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/echarts_option.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/chart_options.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/history-project.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/unit_portrayal.js?v={{Msg "seo" "version"}}'></script>
 {{include "/common/baiducc.html"}}
 </body>

+ 84 - 0
src/web/staticres/common-module/collection/css/index.css

@@ -816,3 +816,87 @@
     font-size: .2rem;
     color: #fb483d;
 }
+
+/* 企业画像历史项目联系人 */
+
+.history-list .project-info-item .his-pro-title{
+    width: 100%;
+    font-size: .28rem;
+    font-weight: 500;
+    text-align: LEFT;
+    color: #171826;
+    line-height: .4rem;
+}
+.history-list .project-info-item .his-contact-list{
+    margin-bottom: .16rem;
+}
+.history-list .project-info-item .his-contact{
+    padding: .16rem;
+    margin-top: .44rem;
+    width: 100%;
+    min-height: 1.6rem;
+    background: #f7f9fa;
+    border-radius: .16rem;
+}
+.history-list .his-contact .contact-top {
+    display: flex;
+    align-items: center;
+    font-size: .26rem;
+    font-weight: 500;
+    color: #5f5e64;
+    line-height: .4rem;
+}
+.history-list .his-contact .contact-bot {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    height: .4rem;
+    font-size: .22rem;
+    font-weight: 500;
+    color: #9B9CA3;
+    line-height: .36rem;
+}
+.con-right{
+    width: .24rem;
+    height: .24rem;
+    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIlSURBVEhLtZRNaxNRFIb9PX6jYlVQ8AMXogtFcSXYhaA/oBsXrkREhAoqgoiKCxciahF0IVibRm3UVtOkaZukzbTJ5GMSk0k6ySRuXs8ZnEvu3ElnunDxLGaY95l7zzn3brJ7f/A/EOJM08KYXsWLVUPwVq857/sDYRHiW+kChiYS2PwxLjgQSeLGQl4JhUGIT3ydx5Y+qcvByTnUO10lGIQQnxwg3v1pFlNVUwkGIcSXf2axzUe8Y3wWt6lM/aEwCPHdrI6dJPGKtxLDMxklGIQQx2i7+yNy85jt43GMJHJKMAghNqlBZ2ILivjCjwwmKnUlGIQQM3cyuiJ+vmJIgbBI4lyzjaOfU5L4WmoV1bYthcIgiZkHS0VJvJcOzaPlMky7J30XhCIurHWcurpinm3exTOtsiG5ImYmDVMqCcuP0DOvvPavLE27i6jRwBOtTHdMDcnGGkpWRzh8xczLvIF9nvHju2M0rSNWa+INyc5/T2OIvjn+JYVLdMBGEhpGaQDi9dZgMa/o4XLJCXrlF6ezOB1blN677KGe3FwsDBYzPA33qJnHPJOyHly24Zns+mKmbNl4Vag6q/QT+cHNDxQzVreHaarrfVr9qSn1dHoJLWY6JDeoNB9KdVyfz+PsN/8a8w155ddSeLELr15rtRGpNPA4V8bVpIZz9JND0SR20d19ODqHpzSCGxa78A4adHGlTcuZ53fFGl5TL94Xf2Ol1cZftHixocrkQqwAAAAASUVORK5CYII=) no-repeat;
+    background-size: contain;
+}
+.history-list .his-contact .contact-bot .con-left{
+    display: flex;
+    align-items: center;
+}
+.contact-phone{
+    color: #2ABED1;
+}
+.his-deal{
+    display: flex;
+    align-items: center;
+    margin-top: .16rem;
+    font-size: .22rem;
+    color: #9b9ca3;
+    line-height: .36rem;
+}
+.history-list {
+    margin-top: .16rem;
+    padding: .24rem .32rem;
+    background: #fff;
+}
+
+.history-list .tab-card-title {
+    padding: .32rem 0 .12rem;
+    width: 100%;
+    font-size: .36rem;
+    font-weight: 700;
+    line-height: .52rem;
+    color: #171826;
+}
+.history-list .show-more {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    height: .96rem;
+    font-size: .28rem;
+    line-height: .4rem;
+    color: #2ABED1;
+}

BIN
src/web/staticres/common-module/collection/image/bg/vip_bg_9.png


BIN
src/web/staticres/common-module/collection/image/bg/vip_ex_9.png


BIN
src/web/staticres/common-module/collection/image/tel.png


+ 6 - 4
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -2,7 +2,8 @@ var vNode = {
     delimiters: ['${', '}'],
     el: '#ent-portrait',
     components: {
-        vipComponent: vipComponent
+        vipComponent: vipComponent,
+        hisproComponent: hisproComponent
     },
     data () {
         // 修改柱状条颜色为渐变色
@@ -111,9 +112,9 @@ var vNode = {
                 btntext: '去开通'
             },
             entvisit: {
-                total: 0, // 本月画像次数总量
-                usage: 0, // 本月已使用次数
-                provin: 0 // 购买省份数量
+                total: 150, // 本月画像次数总量
+                usage: 10, // 本月已使用次数
+                provin: -1 // 购买省份数量
             }
         }
     },
@@ -135,6 +136,7 @@ var vNode = {
             this.getPowerInfo()
             // 获取企业基本信息
             this.getEntBaseInfo()
+            this.getEntVisits()
         }
 
     },

+ 152 - 0
src/web/staticres/common-module/collection/js/history-project.js

@@ -0,0 +1,152 @@
+var historyProTemplate = `
+<div style="width:100%" v-if="list.length !== 0">
+  <div class="tab-card-title">历史项目联系方式</div>
+  <div class="tab-card-content">
+      <ul class="project-info-list">
+          <li
+              v-for="(item, index) in list.slice(0, hisData.end)"
+              class="project-info-item border-line-b"
+          >
+              <div class="his-pro-title">{{item.projectname}}</div>
+              <div class="his-contact">
+                  <div class="his-contact-list" v-for="(data,index) in item.contacts">
+                      <div class="contact-top">
+                          <div class="contactlabel">联系人:</div>
+                          <div class="contact-name">{{data[Object.keys(data)]}}</div>
+                      </div>
+                      <a :href="'tel:'+Object.keys(data)[0]" class="contact-bot" v-if="Object.keys(data)[0]!==''" @click="telPhoneClick($event,Object.keys(data)[0])">
+                          <div class="con-left">
+                              <div class="contact-phonelabel">联系方式:</div>
+                              <div class="contact-phone">{{Object.keys(data)[0]}}</div>
+                          </div>
+                          <div class="con-right"></div>
+                      </a>
+                  </div>
+                  <div class="his-deal">
+                      <div class="deallabel">成交时间:</div>
+                      <div class="deal-time">{{item.date}}</div>
+                  </div>
+              </div>
+          </li>
+          <li
+              class="show-more"
+              v-if="hisData.showMoreBtn"
+              @click="getHisProjectNews">查看更多</li>
+      </ul>
+  </div>
+  </div>
+`
+
+var hisproComponent = {
+  name: 'history-project',
+  template: historyProTemplate,
+  props: {
+    "type": {
+      type: String,
+      default: function() {
+        return 'winner'
+      }
+    },
+    'id': {
+      type: String,
+      default: function() {
+        return ''
+      }
+    },
+    'buyer': {
+      type: String,
+      default: function() {
+        return ''
+      }
+    }
+  },
+  data: function () {
+    return {
+      list:  [],
+      hisData: {
+        end: 3,
+        showMoreBtn: false
+      }
+    }
+  },
+  created () {
+    this.getData()
+  },
+  methods: {
+    getData: function() {
+      var loading = this.showLoading()
+      let _this = this
+      let item = {
+        url: '',
+        datas: {}
+      }
+      if(this.type == 'winner') {
+        item.url = '/bigmember/portrait/winner/contacts'
+        item.datas.entId = this.id
+      } else {
+        item.url = '/bigmember/portrait/buyer/contacts'
+        item.datas.buyer = this.buyer
+      }
+      $.ajax({
+        type: "POST",
+        url: item.url,
+        data:item.datas,
+        success: function(res) {
+          if(res.error_code == 0) {
+            loading.clear()
+            if(res.data && res.data.list && res.data.list.length !== 0) {
+              res.data.list.forEach(function(item, i) {
+                item.date = new Date(item.date * 1000).pattern('yyyy-MM-dd')
+                item.contacts = [
+                  {[Object.keys(item.contacts)[0].split(',')[0]]: item.contacts[Object.keys(item.contacts)]},
+                  {[Object.keys(item.contacts)[0].split(',')[1]]: item.contacts[Object.keys(item.contacts)]}
+                ]
+              })
+              if(res.data.list.length <= 3) {
+                _this.hisData.showMoreBtn = false
+                _this.list = res.data.list
+              } else {
+                if(res.data.list.length <= _this.hisData.end) {
+                  _this.hisData.showMoreBtn = false
+                } else {
+                  _this.hisData.showMoreBtn = true
+                }
+                _this.list = res.data.list
+              }
+            }
+          }
+        }
+      })
+    },
+    // 点击查看更多
+    getHisProjectNews() {
+      if(this.list.length < this.hisData.end + 3) {
+        this.hisData.end = this.list.length
+        this.hisData.showMoreBtn = false
+      } else {
+        this.hisData.end = this.hisData.end + 3
+        this.hisData.showMoreBtn = true
+      }
+      this.getData()
+    },
+    // 拨打电话
+    telPhoneClick: function(e,tel) {
+      if(!utils.isWeiXinBrowser) {
+        e.preventDefault()
+        try {
+          JyObj.callPhone(tel);
+        } catch (error) {
+          
+        }
+      }
+    },
+    showLoading: function() {
+      var loading = this.$toast.loading({
+          duration: 0,
+          forbidClick: true,
+          message: '',
+      })
+      return loading
+    },
+  }
+}

+ 21 - 2
src/web/staticres/common-module/collection/js/vip-dialog.js

@@ -124,6 +124,13 @@ var vipComponent = {
           this.headText.bot = '联系方式,全面掌控企业动态!'
           break
         }
+        // 历史项目联系方式
+        case 'item_9': {
+          this.titleText = '开通大会员'
+          this.headText.top = '获取企业历史项目联系人信息,'
+          this.headText.bot = '直接与甲方或渠道商项目负责人对接!'
+          break
+        }
         default: {
           this.headText.top = '通过实时监控项目的招标、中标、合同等'
           this.headText.bot = '信息,全面挖掘更多潜在商机!'
@@ -135,7 +142,13 @@ var vipComponent = {
       let isWeixin = utils.isWeiXinBrowser
       if(!isWeixin) {
         if (this.btnText == '去开通') {
-          location.href = '/jyapp/vipsubscribe/vipsubscribe_new'
+          if(this.type == 'item_9') {
+            // 跳转到大会员
+            location.href = '/jyapp/big/page/landingPage'
+          } else {
+            // 跳转到超级订阅
+            location.href = '/jyapp/vipsubscribe/vipsubscribe_new'
+          }
         } else if (this.btnText == '去升级') {
           location.href = '/jyapp/vipsubscribe/upgradePage'
         } else if(this.btnText == '联系客服') {
@@ -145,7 +158,13 @@ var vipComponent = {
         }
       } else {
         if (this.btnText == '去开通') {
-          location.href = '/front/vipsubscribe/vipsubscribe_new'
+          if(this.type == 'item_9') {
+            // 跳转到大会员
+            location.href = '/big/wx/page/landingPage'
+          } else {
+            // 跳转到超级订阅
+            location.href = '/front/vipsubscribe/vipsubscribe_new'
+          }
         } else if (this.btnText == '去升级') {
           location.href = '/front/vipsubscribe/upgradePage'
         } else if(this.btnText == '联系客服') {

+ 7 - 0
src/web/templates/frontRouter/wx/collection/sess/ent_portrait.html

@@ -232,6 +232,12 @@
                     <div class="j-img img-empty empty-img"></div>
                     <p class="empty-text">暂无项目动态</p>
                 </div>
+                <div class="bg-white tab-card cell-list history-list" v-if="conf._4 && tabActiveName == '2' && !getStatus">
+                    <hispro-component type="winner" :id="entInfo.id"></hispro-component>
+                </div>
+                <div class="vip_component" v-if="getStatus" style="height:11.36rem;background:url('/common-module/collection/image/bg/vip_bg_9.png') no-repeat;background-size:100% 100%">
+                    <vip-component type="item_9" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_9.png'></vip-component>
+                </div>
                 <div class="bg-white tab-card cell-list" v-show="conf._13 && topProject.list.length !== 0  && !getStatus">
                     <div class="tab-card-title">项目动态</div>
                     <div class="tab-card-content">
@@ -414,6 +420,7 @@
 {{include "/big-member/commonjs.html"}}
 <script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/collection/js/vip-dialog.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/collection/js/history-project.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/collection/js/echarts_option.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/collection/js/chart_options.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/collection/js/ent_portrait.js?v={{Msg "seo" "version"}}'></script>