|
@@ -13,6 +13,7 @@
|
|
|
<link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
|
|
|
<link href="{{Msg "seo" "cdn"}}/css/dev2/biddingSearch.css?v={{Msg "seo" "version"}}" rel="stylesheet">
|
|
|
<link href="{{Msg "seo" "cdn"}}/css/dev2/superSearch.css?v={{Msg "seo" "version"}}" rel="stylesheet">
|
|
|
+<link href="{{Msg "seo" "cdn"}}/css/dev2/newBidSearch.css?v={{Msg "seo" "version"}}" rel="stylesheet">
|
|
|
<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
|
|
|
<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
|
|
|
<script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
|
|
@@ -238,6 +239,10 @@
|
|
|
}
|
|
|
</style>
|
|
|
<script>
|
|
|
+var buyclassArr = {
|
|
|
+ "党政机关事业单位": ['人大', '政协', '党委办','组织', '宣传', '统战', '纪委', '政府办', '发改委','财政','教育','科技','工信','民政', '民宗', '人社', '公安', '检察院','法院', '司法', '应急管理', '军队', '自然资源', '生态环境','住建', '市政', '城管', '交通', '水利','农业','文旅', '卫健委','医疗','学校','档案', '体育', '政务中心', '机关事务', '国资委','海关','税务', '市场监管', '商务','人行', '银保监', '证监', '审计', '出版广电','统计', '公共资源交易', '社会团体','气象'],
|
|
|
+ "企业": ['传媒','采矿业', '电信行业', '金融业', '建筑业', '能源化工', '农林牧渔','批发零售', '信息技术', '运输物流', '制造业', '住宿餐饮']
|
|
|
+}
|
|
|
var areas = {{.T.area}}!=null?{{.T.area}}:"";
|
|
|
var selectPublishtime = {{.T.publishtime}}!=null?{{.T.publishtime}}:"";
|
|
|
var selectTimeslot = {{.T.timeslot}}!=null?{{.T.timeslot}}:"";
|
|
@@ -271,7 +276,7 @@ $(function(){
|
|
|
moveEnd(oInput)
|
|
|
|
|
|
$(".working").show();
|
|
|
- $(document).keydown(function(e){
|
|
|
+ $('.searchname').keydown(function(e){
|
|
|
if(e.keyCode == "13"){
|
|
|
if($("#bidLogin").is(":visible")){
|
|
|
return;
|
|
@@ -352,7 +357,7 @@ $(function(){
|
|
|
}
|
|
|
$(".industry-content").html(industryhtml)
|
|
|
}
|
|
|
- //
|
|
|
+ //
|
|
|
if(industry!=""){
|
|
|
$("#induAll").removeClass("active");
|
|
|
industry = industry.split(",");
|
|
@@ -540,7 +545,23 @@ $(function(){
|
|
|
}else{
|
|
|
maxnum = maxp;
|
|
|
}
|
|
|
- })
|
|
|
+ })
|
|
|
+
|
|
|
+ // 采购单位类型
|
|
|
+ if (buyclassArr) {
|
|
|
+ var buyhtml = '';
|
|
|
+ for(var i in buyclassArr){
|
|
|
+ buyhtml+='<div class="clearfix">'
|
|
|
+ buyhtml+= '<span class="buy-list buy-type">'+ i +'</span>'
|
|
|
+ var childlist = buyclassArr[i]
|
|
|
+ childlist.forEach(function(v,i) {
|
|
|
+ buyhtml+='<span class="buy-list">'+ v +'</span>'
|
|
|
+ });
|
|
|
+ buyhtml+="</div>"
|
|
|
+ }
|
|
|
+ $(".buyclass-content").html(buyhtml)
|
|
|
+
|
|
|
+ }
|
|
|
/**
|
|
|
//ie11 backspace禁止
|
|
|
window.onload=function(){
|
|
@@ -579,6 +600,29 @@ $(function(){
|
|
|
</script>
|
|
|
<script src="/js/biddingSearch.js?v={{Msg "seo" "version"}}"></script>
|
|
|
<script src="/js/superSearch.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+<style>
|
|
|
+ .control-tabBtn{
|
|
|
+ margin-top: 0;
|
|
|
+ padding: 8px;
|
|
|
+ height: auto!important;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ .control-tabBtn a{
|
|
|
+ margin-top: 0!important;
|
|
|
+ }
|
|
|
+ .bidbutdir{
|
|
|
+ border: none;
|
|
|
+ top: 36px;
|
|
|
+ left: 8px;
|
|
|
+ display: inline-block;
|
|
|
+ width: 56px;
|
|
|
+ height: 2px;
|
|
|
+ background-color: #2cb7ca;
|
|
|
+ }
|
|
|
+ .on{
|
|
|
+ color: #2cb7ca!important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
{{include "/common/pchead.html"}}
|
|
@@ -635,7 +679,10 @@ $(function(){
|
|
|
<input type="hidden" name="minprice" value="{{.T.minprice}}">
|
|
|
<input type="hidden" name="maxprice" value="{{.T.maxprice}}">
|
|
|
<input type="hidden" name="industry" value="{{.T.industry}}">
|
|
|
- <input type="hidden" name="selectType" value="all">
|
|
|
+ <input type="hidden" name="selectType" value="all">
|
|
|
+ <input type="hidden" name="buyerclass " value="">
|
|
|
+ <input type="hidden" name="buyertel" value="">
|
|
|
+ <input type="hidden" name="winnertel" value="">
|
|
|
</form>
|
|
|
<!--筛选-->
|
|
|
<div id="screenBtn" class="screen down">
|
|
@@ -661,14 +708,22 @@ $(function(){
|
|
|
<!--整体页面切换tab-->
|
|
|
<div class="control-tabBtn">
|
|
|
<span class="bidbutdir"></span>
|
|
|
- <a href="#" class="on" left="50">
|
|
|
- <i></i><font>招标搜索</font>
|
|
|
+ <a href="#" class="on" left="8">
|
|
|
+ <!-- <i></i> -->
|
|
|
+ <font>招标搜索</font>
|
|
|
</a>
|
|
|
- <a id="entsearch" href="javascript:" left="170" datahref="/jylab/entSearch/index.html">
|
|
|
- <i></i>企业搜索
|
|
|
+ <a id="entsearch" href="javascript:" left="98" datahref="/jylab/bidsearchforent/index.html">
|
|
|
+ <!-- <i></i> -->
|
|
|
+ 企业搜索
|
|
|
</a>
|
|
|
- <a href="{{Msg "seo" "url.portrait_winner"}}"{{if not .T.portraitpower}} class="hidden"{{end}} left="305"><i></i>中标企业画像</a>
|
|
|
- <a href="{{Msg "seo" "url.portrait_buyer"}}"{{if not .T.portraitpower}} class="hidden"{{end}} left="455"><i></i>采购单位画像</a>
|
|
|
+ <a href="{{Msg "seo" "url.portrait_winner"}}"{{if not .T.portraitpower}} class="hidden"{{end}} left="335">
|
|
|
+ <!-- <i></i> -->
|
|
|
+ 中标企业画像
|
|
|
+ </a>
|
|
|
+ <a href="{{Msg "seo" "url.portrait_buyer"}}"{{if not .T.portraitpower}} class="hidden"{{end}} left="485">
|
|
|
+ <!-- <i></i> -->
|
|
|
+ 采购单位画像
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -833,12 +888,57 @@ $(function(){
|
|
|
<span class="remindonebak"></span>
|
|
|
<span class="remindtwo"><span>"拟建项目"</span>是指那些处于前期立项、审批阶段的项目。供应商应在立项阶段掌握项目信息,做到早介入,稳拿单。</span>
|
|
|
</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <!-- 高级筛选 -->
|
|
|
+ <div class="advanced-filter clearfix">
|
|
|
+ <div class="advanced-title">
|
|
|
+ <strong>高级筛选</strong>
|
|
|
+ <img class="icon-vip" src="{{Msg "seo" "cdn"}}/images/biddingSearch/VIP.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="leftTitle" style="width: 116px;">采购单位类型:</div>
|
|
|
+ <div class="buyclass">
|
|
|
+ <span class="buyclass-all active">全部</span>
|
|
|
+ <div class="buyclass-content" style="display: none;"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 其他筛选条件 -->
|
|
|
+ <div class="other-filter clearfix">
|
|
|
+ <div class="leftTitle" style="width: 116px;">其他筛选条件:</div>
|
|
|
+ <div class="other-content">
|
|
|
+ <div class="buy-select">
|
|
|
+ <div class="custom-select">
|
|
|
+ <input class="custom-input" name="buyertel" data-value="" type="text" readonly placeholder="采购单位联系方式" />
|
|
|
+ <i class="icon-arrow"></i>
|
|
|
+ </div>
|
|
|
+ <ol class="custom-option" style="display:none;">
|
|
|
+ <li data-value="y">有联系方式</li>
|
|
|
+ <li data-value="n">无联系方式</li>
|
|
|
+ </ol>
|
|
|
+ </div>
|
|
|
+ <div class="bid-select">
|
|
|
+ <div class="custom-select">
|
|
|
+ <input class="custom-input" name="winnertel" data-value="" type="text" readonly placeholder="中标企业联系方式" />
|
|
|
+ <i class="icon-arrow"></i>
|
|
|
+ </div>
|
|
|
+ <ol class="custom-option" style="display:none;">
|
|
|
+ <li data-value="y">有联系方式</li>
|
|
|
+ <li data-value="n">无联系方式</li>
|
|
|
+ </ol>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 展开收起 -->
|
|
|
+ <div class="w" style="text-align: center;">
|
|
|
+ <div class="fold" id="fold">
|
|
|
+ <i class="icon-arrow"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!--招标搜索列表内容-->
|
|
|
- <div class="seaTender-inner w">
|
|
|
+ <div class="seaTender-inner w" style="position: relative;">
|
|
|
<!--招标tab切换-->
|
|
|
<div class="tabTitle clearfix">
|
|
|
+ <input class="custom-checkbox check-all" type="checkbox" />
|
|
|
<ul id="newsclass" style="display:none;">
|
|
|
<li>
|
|
|
<a class="active" href="javascript:;" style="width:70px;">标题搜索</a>
|
|
@@ -852,11 +952,13 @@ $(function(){
|
|
|
<a class="active" href="javascript:;" style="width:100px;">最新招标信息</a>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <div class="right-tabBtn right-tabBtn-superSearch">
|
|
|
+ <div class="right-tabBtn right-tabBtn-superSearch" style="width: 370px;">
|
|
|
<button class="active" id="right-list">列表</button>
|
|
|
<button id="right-table">表格</button>
|
|
|
<div class="split-line"></div>
|
|
|
- <button id="right-export" data-need-bind-phone>数据导出</button>
|
|
|
+ <button id="right-export" data-need-bind-phone>数据导出</button>
|
|
|
+ <div class="split-line"></div>
|
|
|
+ <button id="bid-collect">标讯收藏</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--tab切换内容-->
|
|
@@ -951,7 +1053,23 @@ $(function(){
|
|
|
<div class="working" style="display: none;">
|
|
|
<img style="width: 216px;margin: 45px auto;" src="{{Msg "seo" "cdn"}}/images/wx/working.gif">
|
|
|
<div style="color:#2cb7ca;">剑鱼标讯正在努力工作中···</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <!-- 自定义标签弹框 -->
|
|
|
+ <div class="tags-box">
|
|
|
+ <!-- <div class="tags-textarea" id="tags-textarea">
|
|
|
+ <pre><span></span><br></pre>
|
|
|
+ <textarea name="" id="" rows="1" placeholder="新增或搜索标签"></textarea>
|
|
|
+ </div> -->
|
|
|
+ <div class="tags-inputs">
|
|
|
+ <input type="hidden" class="tag-input-hidden" value="">
|
|
|
+ <div class="tag-input">
|
|
|
+ <div class="tag-labels"></div>
|
|
|
+ <input type="text" class="clear-input">
|
|
|
+ <div class="tag-placeholder">新增或搜索标签</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tags-list"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!--分页-->
|
|
|
<div class="pagination clearfix w" style="display: none;">
|
|
@@ -960,7 +1078,42 @@ $(function(){
|
|
|
<span>1</span>
|
|
|
<a class="nbnext">下一页<i>></i></a>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <!-- 暂无权限、开通提醒弹框弹框 -->
|
|
|
+ <div class="custom-dialog auth-dialog">
|
|
|
+ <div class="mask"></div>
|
|
|
+ <div class="dialog-container">
|
|
|
+ <div class="dialog-header">
|
|
|
+ <h3 class="dialog-title">您暂无使用权限</h3>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-content">开通超级订阅,搜索招标采购项目更精准,300万+投标人都在用!</div>
|
|
|
+ <div class="dialog-footer clearfix">
|
|
|
+ <a href="#" class="dialog-btn confirm-btn">去开通</a>
|
|
|
+ <a href="javascript:;" class="dialog-btn default-btn">取消</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 升级弹框 -->
|
|
|
+ <div class="custom-dialog update-dialog">
|
|
|
+ <div class="mask"></div>
|
|
|
+ <div class="dialog-container">
|
|
|
+ <div class="dialog-header">
|
|
|
+ <h3 class="dialog-title">提示信息</h3>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-content">您的标讯收藏上限为100条,请升级为会员服务。</div>
|
|
|
+ <div class="dialog-footer clearfix">
|
|
|
+ <a href="#" class="dialog-btn confirm-btn">去升级</a>
|
|
|
+ <a href="javascript:;" class="dialog-btn default-btn">取消</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- toast提醒 -->
|
|
|
+ <div class="custom-toast">
|
|
|
+ <div class="mask" style="background-color: transparent;"></div>
|
|
|
+ <div class="toast-container">
|
|
|
+ <span></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!--广告-->
|
|
|
<div onclick="adv_statistics(this)" adv_name="PC搜索列表页-底部" class="adv-pcsearch-bottom" id="A1" style="cursor:default;">
|
|
|
<script>
|
|
@@ -984,7 +1137,7 @@ $(function(){
|
|
|
$("#A1").html(ADHtml);
|
|
|
}
|
|
|
</script>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!--招标搜索页面 END-->
|
|
|
|
|
@@ -993,6 +1146,7 @@ $(function(){
|
|
|
{{include "/common/baiducc.html"}}
|
|
|
<script type="text/javascript">
|
|
|
$(function(){
|
|
|
+ var vipState = {{.T.portraitpower}};
|
|
|
$(".shade_table .more").on('click', toPaydataExport)
|
|
|
$(".control-tabBtn>a").hover(function(){
|
|
|
$(".control-tabBtn>a").removeClass("on");
|
|
@@ -1041,8 +1195,329 @@ $(function(){
|
|
|
}else{
|
|
|
$("#backTop").hide();
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
+ /*
|
|
|
+ dev4.5新增需求(高级筛选、标讯收藏、自定义标签)
|
|
|
+ */
|
|
|
+ // 采购单位行业选择
|
|
|
+ buyClassFn()
|
|
|
+ function buyClassFn() {
|
|
|
+ // 采购单位类型全部点击事件
|
|
|
+ $('.buyclass-all').click(function() {
|
|
|
+ // if (!vipState) {
|
|
|
+ // openVipDialog()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ $(this).addClass('active').siblings('.buyclass-content').find('.buy-list').removeClass('active')
|
|
|
+ })
|
|
|
+ // 采购单位类型子分类点击事件
|
|
|
+ $('.buyclass-content .buy-list:not(.buy-type)').click(function() {
|
|
|
+ // if (!vipState) {
|
|
|
+ // openVipDialog()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ $(this).toggleClass('active').parents('.buyclass').children('.buyclass-all').removeClass('active')
|
|
|
+ $(this).siblings('.buy-type').removeClass('active')
|
|
|
+ var activeLen = $('.buyclass-content .buy-list:not(.buy-type)').filter(".active").length;
|
|
|
+ var listLen = $('.buyclass-content .buy-list:not(.buy-type)').length;
|
|
|
+ var curListLen = $(this).parent('.clearfix').find('.buy-list:not(.buy-type)').length;
|
|
|
+ var curActiveLen = $(this).parent('.clearfix').find(".active").length;
|
|
|
+ console.log(curListLen,curActiveLen)
|
|
|
+ console.log(listLen, activeLen)
|
|
|
+ if (activeLen === listLen || activeLen === 0) {
|
|
|
+ $('.buyclass-content .buy-list').removeClass('active')
|
|
|
+ $('.buyclass-all').addClass('active')
|
|
|
+ } else if (curListLen === curActiveLen) {
|
|
|
+ $(this).siblings('.buy-type').addClass('active')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 采购单位类型大分类点击事件
|
|
|
+ $('.buyclass-content .buy-list.buy-type').click(function() {
|
|
|
+ $(this).toggleClass('active').parents('.buyclass').children('.buyclass-all').removeClass('active')
|
|
|
+ if ($(this).hasClass('active')) {
|
|
|
+ $(this).siblings('.buy-list').addClass('active')
|
|
|
+ }
|
|
|
+ var activeLen = $('.buyclass-content .buy-type').filter(".active").length;
|
|
|
+ var listLen = $('.buyclass-content .buy-type').length;
|
|
|
+ console.log(activeLen,listLen)
|
|
|
+ if (activeLen === listLen || activeLen === 0) {
|
|
|
+ $('.buyclass-content .buy-list').removeClass('active')
|
|
|
+ $('.buyclass-all').addClass('active')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 展开收起高级筛选
|
|
|
+ $('#fold').on('click', function() {
|
|
|
+ $(this).children('.icon-arrow').toggleClass('down')
|
|
|
+ $('.buyclass-content').slideToggle()
|
|
|
+ // $('.other-filter').slideToggle()
|
|
|
+ })
|
|
|
+ // 其他筛选条件
|
|
|
+ $('.custom-select').off('click').bind('click',function(e) {
|
|
|
+ if (!vipState) {
|
|
|
+ openVipDialog()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ e.stopPropagation()
|
|
|
+ $(this).css("border-color", '#2cb7ca').siblings().show()
|
|
|
+ $(this).children('.icon-arrow').addClass('up')
|
|
|
+ $('.custom-option li').off('click').bind('click',function(e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ $(this).parent().hide().siblings().children('.icon-arrow').removeClass('up')
|
|
|
+ $(this).parent().hide().siblings().css("border-color", '#e0e0e0')
|
|
|
+ var val = $(this).attr('data-value')
|
|
|
+ var text = $(this).text()
|
|
|
+ $(this).parent().siblings().children('.custom-input').val(text).attr('data-value', val)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // 点击其他区域 隐藏其他筛选条件下拉框
|
|
|
+ $(document).click(function() {
|
|
|
+ $('.custom-select').css("border-color", '#e0e0e0').children('.icon-arrow').removeClass('up')
|
|
|
+ $('.custom-select').siblings().hide()
|
|
|
+ $('.tags-box').hide()
|
|
|
+ })
|
|
|
+ // 全选
|
|
|
+ $('.custom-checkbox.check-all').on('change', function() {
|
|
|
+ var state = $(this).is(":checked")
|
|
|
+ if (state) {
|
|
|
+ $('.custom-checkbox').prop("checked",true)
|
|
|
+ } else {
|
|
|
+ // 将非收藏过的选项取消
|
|
|
+ $('.custom-checkbox:not(:disabled)').prop("checked",false)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 单个收藏
|
|
|
+ $('.icon-collect').click(function(e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ var checked = $(this).hasClass('checked')
|
|
|
+ var len = 1
|
|
|
+ if (checked) {
|
|
|
+ $(this).removeClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",false).removeAttr('disabled')
|
|
|
+ } else {
|
|
|
+ // 如果不是会员 收藏上限为100条
|
|
|
+ if (!vipState) {
|
|
|
+ if (len > 100) {
|
|
|
+ updateVipDialog()
|
|
|
+ } else {
|
|
|
+ $(this).addClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",true).attr('disabled', true)
|
|
|
+ var top = (parseInt($(this).position().top) + 60 ) + 'px';
|
|
|
+ console.log(top, 'top')
|
|
|
+ $('.tags-box').show().css('top', top)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 如果是会员 判断收藏上限有没有达到5000
|
|
|
+ if (len > 5000) {
|
|
|
+ toastFn('您的标讯收藏上限为5000条,请联系客服人员。')
|
|
|
+ } else {
|
|
|
+ $(this).addClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",true).attr('disabled', true)
|
|
|
+ var top = (parseInt($(this).position().top) + 60 ) + 'px';
|
|
|
+ console.log(top, 'top')
|
|
|
+ $('.tags-box').show().css('top', top)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 批量收藏
|
|
|
+ $('#bid-collect').off('click').bind('click',function(e){
|
|
|
+ e.stopPropagation()
|
|
|
+ var top = (parseInt($(this).position().top) + 60 ) + 'px';
|
|
|
+ var len = $('.custom-checkbox:not(".check-all"):checked:not(:disabled)').length;
|
|
|
+ console.log(len)
|
|
|
+ // 判断有无选中的标讯信息
|
|
|
+ if (len > 0) {
|
|
|
+ $('.custom-checkbox:not(".check-all"):checked').attr('disabled', true).siblings().children('.icon-collect').addClass('checked')
|
|
|
+ $('.tags-box').show().css('top', top)
|
|
|
+ } else {
|
|
|
+ toastFn('尚未选择标讯,请选择')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 自定义标签
|
|
|
+ // 渲染标签列表
|
|
|
+ var tagsArr = [{
|
|
|
+ "lid": "RQ==",
|
|
|
+ "lanme": "测试"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "lid": "RA==",
|
|
|
+ "lanme": "医疗"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "lid": "RE==",
|
|
|
+ "lanme": "政府"
|
|
|
+ }]
|
|
|
+ renderTagsList(tagsArr)
|
|
|
+ // 标签输入框事件
|
|
|
+ $('.tags-box').click(function(e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.tag-input').click(function(e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ $(this).children('.tag-placeholder').hide()
|
|
|
+ $(this).children('input').focus()
|
|
|
+ })
|
|
|
+ // 标签输入框回车事件
|
|
|
+ $('.tag-input .clear-input').keydown(function(event){
|
|
|
+ event.stopPropagation()
|
|
|
+ if (event.keyCode == 13) {
|
|
|
+ if($(this).val().length >= 2 && $(this).val().length < 6) {
|
|
|
+ // ajax提交自定义标签
|
|
|
+ inputTagList()
|
|
|
+ tagsArr.push({
|
|
|
+ lid: '',
|
|
|
+ lanme: $(this).val()
|
|
|
+ })
|
|
|
+ renderTagsList(tagsArr)
|
|
|
+ $(this).val('')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 标签输入框失去焦点事件
|
|
|
+ $('.tag-input .clear-input').blur(function() {
|
|
|
+ if($('.tag-labels').children().length == 0) {
|
|
|
+ $('.tag-placeholder').show()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
})
|
|
|
+var activeTags = []
|
|
|
+function deleteInputTag(index) {
|
|
|
+ activeTags.splice(index, 1)
|
|
|
+ // inputTagList()
|
|
|
+ $('.tag-label').eq(index).remove()
|
|
|
+}
|
|
|
+function inputTagList () {
|
|
|
+ var ht = '';
|
|
|
+ activeTags.push({
|
|
|
+ lid: '',
|
|
|
+ lanme: $('.tag-input .clear-input').val()
|
|
|
+ })
|
|
|
+ activeTags.forEach(function(v,i) {
|
|
|
+ ht+='<span class="tag-label" data-id=' + v.lid + '>'+ v.lanme + '<i class="tag-close" onclick="deleteInputTag(' + i + ')"></i>' + '</span>'
|
|
|
+ });
|
|
|
+ $('.tag-labels').html(ht)
|
|
|
+}
|
|
|
+// 渲染标签列表数据
|
|
|
+function renderTagsList (data) {
|
|
|
+ if (data && data.length > 0) {
|
|
|
+ var ht = '';
|
|
|
+ data.forEach(function(v,i) {
|
|
|
+ ht+='<span class="tags-item" data-id=' + v.lid + '>'+ v.lanme +'</span>'
|
|
|
+ });
|
|
|
+ $(".tags-list").html(ht)
|
|
|
+ $('.tags-item').click(function(e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ $(this).toggleClass('tags-active')
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+// 获取用户自定义标签
|
|
|
+function getUserTags () {
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/publicapply/bidcoll/getLabel?t=' + Date.now(),
|
|
|
+ success: function(r){
|
|
|
+ if (r.error_code == 0 && r.data) {
|
|
|
+ renderTagsList(r.data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+/*
|
|
|
+ 保存或清除标签 ajax
|
|
|
+ params: {
|
|
|
+ lids: String 标签id(加密后), 非必传
|
|
|
+ lname: String 标签名称, 非必传
|
|
|
+ laction: String 用户行为:S添加或绑定标签;D删除标签 非必传
|
|
|
+ binfo: Array 招标信息数组(已收藏的招标信息) 非必传
|
|
|
+ bid: String 招标信息加密后id 必传
|
|
|
+ buyerclass: String 采购单位类型 非必传
|
|
|
+ buyerinfo: Boolean 有无采购单位联系方式 非必传
|
|
|
+ winnerinfo: Boolean 有无中标单位联系方式 非必传
|
|
|
+ }
|
|
|
+ 1:lids为空;lname不为空;laction=”S”;binfo数组为空->新增标签
|
|
|
+ 2:lids为空;lname不为空;laction=”S”;binfo数组不为空->新增标签并且绑定收藏信息
|
|
|
+ 3:lids不为空;laction=”S”;binfo数组不为空->收藏信息绑定标签
|
|
|
+ 3:lids不为空;laction=”D”;->删除标签 并解绑收藏的信息
|
|
|
+*/
|
|
|
+function editTags(params) {
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/publicapply/bidcoll/label',
|
|
|
+ data: params,
|
|
|
+ dataType:'json',
|
|
|
+ success: function(r){
|
|
|
+ if (r.data) {
|
|
|
+ toastFn("操作成功")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+// 自定义标签输入框自适应高度
|
|
|
+function autoTextarea(container) {
|
|
|
+ var textarea = container.getElementsByTagName('textarea')[0] ;
|
|
|
+ var span = container.getElementsByTagName('span')[0] ;
|
|
|
+ textarea.addEventListener('input', function() {
|
|
|
+ span.textContent = textarea.value;
|
|
|
+ }, false);
|
|
|
+ span.textContent = textarea.value;
|
|
|
+}
|
|
|
+// var tagsVal = document.getElementById('tags-textarea');
|
|
|
+// autoTextarea(tagsVal);
|
|
|
+/*
|
|
|
+ 收藏或取消收藏ajax
|
|
|
+ params: {
|
|
|
+ baction: String, //用户行为:R:移除收藏;C:收藏(默认)非必填
|
|
|
+ binfo: Array, // 招标信息数组 必填
|
|
|
+ bid: String, // 招标信息加密后id 必填
|
|
|
+ buyerclass: String, // 采购单位类型 必填
|
|
|
+ buyerinfo: Boolean, // 有无采购单位联系方式 必填
|
|
|
+ winnerinfo: Boolean // 有无中标单位联系方式 必填
|
|
|
+ }
|
|
|
+ 参数示例 (baction=R binfo数组只需要bid即可)
|
|
|
+*/
|
|
|
+function collectBidInfo (params) {
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/publicapply/bidcoll/action',
|
|
|
+ data: params,
|
|
|
+ dataType:'json',
|
|
|
+ success: function(r){
|
|
|
+ if (r.data) {
|
|
|
+ toastFn("操作成功")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+// 开通提醒弹框
|
|
|
+function openVipDialog() {
|
|
|
+ $('.auth-dialog').show()
|
|
|
+ $('.auth-dialog .default-btn').click(function () {
|
|
|
+ $('.auth-dialog').hide(300)
|
|
|
+ })
|
|
|
+}
|
|
|
+// 升级提醒弹框
|
|
|
+function updateVipDialog() {
|
|
|
+ $('.update-dialog').show()
|
|
|
+ $('.update-dialog .default-btn').click(function () {
|
|
|
+ $('.update-dialog').hide(300)
|
|
|
+ })
|
|
|
+}
|
|
|
+// 开通vip提醒
|
|
|
+function openVipDialog() {
|
|
|
+ $('.auth-dialog').show()
|
|
|
+ $('.dialog-footer .default-btn').click(function () {
|
|
|
+ $('.auth-dialog').hide()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// toast上限提示
|
|
|
+function toastFn (text) {
|
|
|
+ $(".custom-toast").fadeIn().find("span").html(text);
|
|
|
+ setTimeout(function(){
|
|
|
+ $(".custom-toast").fadeOut();
|
|
|
+ },2000)
|
|
|
+}
|
|
|
//
|
|
|
function NullSuperSearch(){
|
|
|
$("#newsclass li:nth-child(2) a").click();
|
|
@@ -1104,7 +1579,6 @@ function priceCss(){
|
|
|
$(".pricefat").removeClass("customtime-active");
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
//关闭遮罩层
|
|
|
function labClose(){
|
|
|
$("#labModal").modal("hide");
|