|
@@ -0,0 +1,2496 @@
|
|
|
+if(goTemplateData.params.obj.subtype=="中标"||goTemplateData.params.obj.subtype=="成交"||goTemplateData.params.obj.subtype=="合同"){
|
|
|
+ $('.bid_dev').hide()
|
|
|
+} else {
|
|
|
+ $('.bid_dev').show()
|
|
|
+}
|
|
|
+var keys = goTemplateData.params.obj.purchasing
|
|
|
+var bidNode = {
|
|
|
+ el: '#tab2',
|
|
|
+ data: {
|
|
|
+ bidnum: 0,
|
|
|
+ dialogVisible: false,
|
|
|
+ showClose: false,
|
|
|
+ optionType: 'hover',
|
|
|
+ bidinfo: {},
|
|
|
+ ruleForm: {
|
|
|
+ name: '',
|
|
|
+ region: '',
|
|
|
+ phone: '',
|
|
|
+ company: ''
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ name: [
|
|
|
+ { required: true, message: '请输入活动名称', trigger: 'blur' },
|
|
|
+ { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ phone: [
|
|
|
+ { required: true, message: '请输入手机号', trigger: 'blur' },
|
|
|
+ { min: 11, max: 11, message: '请输入正确格式的手机号', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ company: [
|
|
|
+ { required: true, message: '请输入公司名称', trigger: 'blur' },
|
|
|
+ { min: 1, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ region: [
|
|
|
+ { required: true, message: '请选择职位', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ buyerInfo: {},
|
|
|
+ winnerInfo: {}
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.getBidInfo()
|
|
|
+ // 判断大会员权限
|
|
|
+ let bidPower = sessionStorage.getItem('bidPower')
|
|
|
+ if(bidPower) {
|
|
|
+ bidPower = JSON.parse(bidPower)
|
|
|
+ if(bidPower.indexOf(6) != -1) {
|
|
|
+ this.optionType = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //console.log('大会员'+ goTemplateData.params.isMember, '超级订阅:' + goTemplateData.params.isVip,'商机管理:' + goTemplateData.params.isEntniche)
|
|
|
+ if(goTemplateData.params.obj.entId) {
|
|
|
+ this.getWinnerFreeData()
|
|
|
+ }
|
|
|
+ if (goTemplateData.params.obj.buyer) {
|
|
|
+ this.getBuyerFreeData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onFree(){
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ getBidInfo: function () {
|
|
|
+ let kds = this.getQueryVariable('kds')
|
|
|
+ let keyArr = []
|
|
|
+ if(kds) {
|
|
|
+ let buyerObj = {
|
|
|
+ "key": [kds],
|
|
|
+ "addKey":[],
|
|
|
+ "notKey":[]
|
|
|
+ }
|
|
|
+ keyArr.push(buyerObj)
|
|
|
+ } else if(keys) {
|
|
|
+ if(keys.indexOf(",") != -1) {
|
|
|
+ keys = keys.split(',')
|
|
|
+ } else if(keys.indexOf("+") != -1) {
|
|
|
+ keys = keys.split('+')
|
|
|
+ } else {
|
|
|
+ keys = keys.split(' ')
|
|
|
+ }
|
|
|
+ keys.forEach(function(item) {
|
|
|
+ let buyerObj = {
|
|
|
+ "key": [item],
|
|
|
+ "addKey":[],
|
|
|
+ "notKey":[]
|
|
|
+ }
|
|
|
+ keyArr.push(buyerObj)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.bidnum = 2
|
|
|
+ return
|
|
|
+ }
|
|
|
+ bidarea = {
|
|
|
+ [goTemplateData.params.obj.area]: [goTemplateData.params.obj.city]
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ buyerContent: keyArr,
|
|
|
+ sid: goTemplateData.params.obj._id,
|
|
|
+ pname: goTemplateData.params.obj.projectname,
|
|
|
+ area: bidarea,
|
|
|
+ industry: goTemplateData.params.obj.s_subscopeclass
|
|
|
+ // buyerClass:goTemplateData.params.obj.buyerclass
|
|
|
+ }
|
|
|
+ let _this = this
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/bigmember/decision/freeDecInfo',
|
|
|
+ contentType: "application/json",
|
|
|
+ data:JSON.stringify(params),
|
|
|
+ success: function(res) {
|
|
|
+ // console.log(res)
|
|
|
+ if(res.error_code == 0) {
|
|
|
+ if(res.data.all_counts == 0) {
|
|
|
+ _this.bidnum = _this.bidnum + 1
|
|
|
+ }
|
|
|
+ if(res.data.all_money == 0) {
|
|
|
+ _this.bidnum = _this.bidnum + 1
|
|
|
+ }
|
|
|
+ if(res.data.all_review_experts == 0) {
|
|
|
+ _this.bidnum = _this.bidnum + 1
|
|
|
+ }
|
|
|
+ if(res.data.all_winners == 0) {
|
|
|
+ _this.bidnum = _this.bidnum + 1
|
|
|
+ }
|
|
|
+ res.data.all_money = _this.formatNumber(res.data.all_money)
|
|
|
+ _this.bidinfo = res.data
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ formatNumber(num) {
|
|
|
+ num = Number(num);
|
|
|
+ if (num == 0) {
|
|
|
+ return num + '';
|
|
|
+ } else if (num > 1 && num < 10000) {
|
|
|
+ return num + '';
|
|
|
+ } else {
|
|
|
+ // console.log(num/10000)
|
|
|
+ return (num / 10000).toFixed(2);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 免费体验
|
|
|
+ freeUse: function() {
|
|
|
+ this.checkLogin()
|
|
|
+ this.sourceLogAjax('pc_analysis_detail_free')
|
|
|
+ vmbid.isNeedSubmit('pc_analysis_detail_free', function() {
|
|
|
+ vmbid.showSuccess = true
|
|
|
+ })
|
|
|
+ $('.el-popover.el-popper').hide()
|
|
|
+ },
|
|
|
+ checkLogin: function () {
|
|
|
+ var moduleOpen = $('body').hasClass('modal-open')
|
|
|
+ if (moduleOpen) return
|
|
|
+ if (!loginflag) {
|
|
|
+ $("#bidLogin").modal("show");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ sourceLogAjax (source) {
|
|
|
+ $.ajax({
|
|
|
+ type: 'get',
|
|
|
+ url: '/front/portraitClassify?source=' + source,
|
|
|
+ success: function(res) {
|
|
|
+ // console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onlineQue: function() {
|
|
|
+ $('.help-slide-zx.open-customer').trigger('click')
|
|
|
+ this.sourceLogAjax('pc_analysis_detail_kf')
|
|
|
+ },
|
|
|
+ getQueryVariable(variable){
|
|
|
+ var query = window.location.search.substring(1);
|
|
|
+ var vars = query.split("&");
|
|
|
+ for (var i=0;i<vars.length;i++) {
|
|
|
+ var pair = vars[i].split("=");
|
|
|
+ if(pair[0] == variable){
|
|
|
+ return decodeURIComponent(pair[1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return(false);
|
|
|
+ },
|
|
|
+ linkroute: function() {
|
|
|
+ let bidPower = sessionStorage.getItem('bidPower')
|
|
|
+ if(bidPower) {
|
|
|
+ bidPower = JSON.parse(bidPower)
|
|
|
+ if(bidPower.indexOf(6) != -1) {
|
|
|
+ location.href = '/swordfish/page_big_pc/analysis_result?sid=' + goTemplateData.params.obj._id
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClose(done) {
|
|
|
+ this.$confirm('确认关闭?')
|
|
|
+ .then(_ => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ .catch(_ => {});
|
|
|
+ },
|
|
|
+ submitForm(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ alert('submit!');
|
|
|
+ } else {
|
|
|
+ this.$confirm('我们会尽快联系您并预约演示时间,请耐心等待~您将获得免费体验大会员全部功能!', '提交成功', {
|
|
|
+ confirmButtonText: '我知道了',
|
|
|
+ center: true,
|
|
|
+ customClass: 'getbigmember',
|
|
|
+ showClose: false,
|
|
|
+ showCancelButton: false
|
|
|
+ }).then(() => {
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ resetForm(formName) {
|
|
|
+ this.$refs[formName].resetFields();
|
|
|
+ },
|
|
|
+ // 采购单位画像免费数据
|
|
|
+ getBuyerFreeData: function() {
|
|
|
+ if (goTemplateData.params.isVip || goTemplateData.params.isMember || goTemplateData.params.isEntniche){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var _this = this
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/bigmember/portrait/buyer/miniData',
|
|
|
+ data: {
|
|
|
+ buyer: goTemplateData.params.obj.buyer
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ if (res.data) {
|
|
|
+ if (!res.data.province && !res.data.city) {
|
|
|
+ res.data.province = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.buyerclass) {
|
|
|
+ res.data.buyerclass = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.biddingCount) {
|
|
|
+ res.data.biddingCount = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.contactCount) {
|
|
|
+ res.data.contactCount = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.project_count) {
|
|
|
+ res.data.project_count = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.bidamount_count) {
|
|
|
+ res.data.bidamount_count = '--'
|
|
|
+ } else{
|
|
|
+ var unit = moneyUnit(res.data.bidamount_count)
|
|
|
+ var reg = /[\u4e00-\u9fa5]/g;
|
|
|
+ var strs = unit.match(reg);
|
|
|
+ unit = strs.join('')
|
|
|
+ res.data.bidamount_count = moneyUnit(res.data.bidamount_count).replace(/[\u4e00-\u9fa5]/g, '')
|
|
|
+ res.data.unit = unit
|
|
|
+ }
|
|
|
+ if (res.data.contactList){
|
|
|
+ res.data.contactList.forEach(function(item,index){
|
|
|
+ if (item.date) {
|
|
|
+ item.date = new Date(Number(item.date + '000')).pattern('yyyy-MM-dd');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _this.buyerInfo = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 中标企业画像免费数据
|
|
|
+ getWinnerFreeData: function() {
|
|
|
+ if (goTemplateData.params.isVip || goTemplateData.params.isMember || goTemplateData.params.isEntniche){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var _this = this
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/bigmember/portrait/winner/miniData',
|
|
|
+ data: {
|
|
|
+ entId: goTemplateData.params.obj.entId
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ if (res.data) {
|
|
|
+ if (!res.data.biddingCount) {
|
|
|
+ res.data.biddingCount = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.contactCount) {
|
|
|
+ res.data.contactCount = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.project_count) {
|
|
|
+ res.data.project_count = '--'
|
|
|
+ }
|
|
|
+ if (!res.data.bidamount_count) {
|
|
|
+ res.data.bidamount_count = '--'
|
|
|
+ } else{
|
|
|
+ var unit = moneyUnit(res.data.bidamount_count)
|
|
|
+ var reg = /[\u4e00-\u9fa5]/g;
|
|
|
+ var strs = unit.match(reg);
|
|
|
+ unit = strs.join('')
|
|
|
+ res.data.bidamount_count = moneyUnit(res.data.bidamount_count).replace(/[\u4e00-\u9fa5]/g, '')
|
|
|
+ res.data.unit = unit
|
|
|
+ }
|
|
|
+ if (res.data.contactList){
|
|
|
+ res.data.contactList.forEach(function(item,index){
|
|
|
+ if (item.date) {
|
|
|
+ item.date = new Date(Number(item.date + '000')).pattern('yyyy-MM-dd');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _this.winnerInfo = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 采购单位画像、企业画像留资弹框
|
|
|
+ goCollect: function(source) {
|
|
|
+ $('.el-popover.el-popper').hide()
|
|
|
+ this.sourceLogAjax(source)
|
|
|
+ vm.isNeedSubmit(source, function() {
|
|
|
+ vm.showSuccess = true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+var bidVue = new Vue(bidNode)
|
|
|
+/*--E-*/
|
|
|
+
|
|
|
+
|
|
|
+var isMember = goTemplateData.params.isMember // 大会员
|
|
|
+var isVip = goTemplateData.params.isVip // 超级订阅
|
|
|
+var isEntniche = goTemplateData.params.isEntniche // 商机管理
|
|
|
+var hstShowFlag = false;
|
|
|
+var entProListShowFlag = false;
|
|
|
+var titleCopyDec = "";
|
|
|
+var cHeight = window.screen.height;
|
|
|
+var cWidth = window.screen.width;
|
|
|
+var m1 = 0; // 滚动的值
|
|
|
+var m2 = 0; // 对比时间的值
|
|
|
+var m3 = 0; //滚动开始的值
|
|
|
+var timer = null;
|
|
|
+var scrollflag = true;
|
|
|
+var packageCon = goTemplateData.params.obj.package
|
|
|
+var fwtscode = goTemplateData.params.obj.fwtscode
|
|
|
+var fwtsname = goTemplateData.params.obj.fwtsname
|
|
|
+var s_winner = goTemplateData.params.obj.winner;//
|
|
|
+var dataName = "";
|
|
|
+var dataCont = "";
|
|
|
+var dataCode = "";
|
|
|
+var originalCon = "";
|
|
|
+var originalTitle = "";
|
|
|
+var insertflog = true;
|
|
|
+var heightLight = 0
|
|
|
+var transmit = null;
|
|
|
+var projectName = goTemplateData.params.obj.projectname;
|
|
|
+var title = goTemplateData.params.obj.title//统计标识
|
|
|
+var projectname = goTemplateData.params.obj.projectname//统计标识
|
|
|
+var reg ="";
|
|
|
+var titleCopy ="";
|
|
|
+var tyflag = false;//纠错是否是金额
|
|
|
+var area_ = goTemplateData.params.obj.area;
|
|
|
+var city_ = goTemplateData.params.obj.city;
|
|
|
+var agency_ = goTemplateData.params.obj.agency;
|
|
|
+var projectname_ = goTemplateData.params.obj.projectname;
|
|
|
+var buyer_ = goTemplateData.params.obj.buyer;
|
|
|
+var buyerperson_ = goTemplateData.params.obj.buyerperson;
|
|
|
+var buyertel_ = goTemplateData.params.obj.buyertel;
|
|
|
+var isbid =false; //是否是中标,需要显示所有
|
|
|
+//拟建项目广告
|
|
|
+var nj_adv=["批量导出拟建项目"]
|
|
|
+//招标公告广告
|
|
|
+var zb_adv=[
|
|
|
+ "更多项目联系人、电话批量导出",
|
|
|
+ "采购单位招标数据批量导出",
|
|
|
+ "全面展示行业项目的数据字段"
|
|
|
+]
|
|
|
+//中标公告
|
|
|
+var win_adv=[
|
|
|
+ "中标项目信息字段全面展示",
|
|
|
+ "更多中标项目、业主、联系人数据批量导出",
|
|
|
+ "中标企业数据字段定制化导出"
|
|
|
+]
|
|
|
+//任意类型 --更多数据字段定制化导出,立即查看! 其他都是立即体验
|
|
|
+var any_adv=[
|
|
|
+ "更多数据字段定制化导出",
|
|
|
+ "导出数据,分析市场",
|
|
|
+ "导出数据,分析竞争对手",
|
|
|
+ "导出数据,分析合作伙伴",
|
|
|
+ "导出数据,分析客户"
|
|
|
+]
|
|
|
+
|
|
|
+var count=0;
|
|
|
+if (area_!=""&&area_!=null){
|
|
|
+ count++
|
|
|
+}
|
|
|
+if (city_!=""&&city_!=null){
|
|
|
+ count++
|
|
|
+}
|
|
|
+if (agency_!=""&&agency_!=null){
|
|
|
+ count++
|
|
|
+}
|
|
|
+if (projectname_!=""&&projectname_!=null){
|
|
|
+ count++
|
|
|
+}
|
|
|
+if (buyer_!=""&&buyer_!=null){
|
|
|
+ count++
|
|
|
+}
|
|
|
+if (buyerperson_!=""&&buyerperson_!=null){
|
|
|
+ count++
|
|
|
+}
|
|
|
+if (buyertel_!=""&&buyertel_!=null){
|
|
|
+ count++
|
|
|
+}
|
|
|
+//
|
|
|
+var isNumber = /^[0-9]+$/
|
|
|
+var isLetter = /^[a-zA-Z]+$/
|
|
|
+//
|
|
|
+function isWechat() {
|
|
|
+ var ua = navigator.userAgent.toLowerCase();
|
|
|
+ if(ua.match(/MicroMessenger/i)=="micromessenger"){
|
|
|
+ return true;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+}
|
|
|
+//
|
|
|
+function recoveryerr(ts,dcd,name){
|
|
|
+ transmit = ts;
|
|
|
+ if(name!=""){
|
|
|
+ dataName=name
|
|
|
+ }else{
|
|
|
+ dataName = $(ts).parent("td").prev("td").text();
|
|
|
+ }
|
|
|
+ if(dcd.indexOf("price")>-1||dcd.indexOf("bidamount")>-1||dcd.indexOf("budget")>-1){
|
|
|
+ tyflag = true;
|
|
|
+ }else{
|
|
|
+ tyflag = false;
|
|
|
+ }
|
|
|
+ dataCont = $(ts).prev().text();
|
|
|
+ dataCode = dcd;
|
|
|
+ var dtcontent = originalCon;
|
|
|
+ $("#fphl").removeClass("fphl");
|
|
|
+ $(".pop-head span").html("输入或选择正确的"+dataName+"并按“复制”");
|
|
|
+ $("#popup").removeClass("pop-up");
|
|
|
+ $("#pop-textarea").val("");
|
|
|
+ $(".pop-botton").css({"background":"#2cbfca"});
|
|
|
+ $(".tab1").addClass("active").siblings().removeClass("active");
|
|
|
+ var newdataCont= dataCont.replace(/\s/g," ")
|
|
|
+ reg = new RegExp(newdataCont+"|"+dataCont);
|
|
|
+ if(dataCont==""||!reg.test(dtcontent)){
|
|
|
+ $("html, body").stop(true,false).animate({
|
|
|
+ scrollTop: $("#tab1").offset().top-40 }, {duration: 500,easing: "swing"});
|
|
|
+ }else{
|
|
|
+ clearup("R");
|
|
|
+ companyAdd();
|
|
|
+ $("html, body").stop(true,false).animate({
|
|
|
+ scrollTop: $("#fphl").offset().top-cHeight/2+310>0?$("#fphl").offset().top-cHeight/2+310:0 }, {duration: 500,easing: "swing"});
|
|
|
+ }
|
|
|
+ $(".poperr").fadeIn();
|
|
|
+ //防止拖拽的是不跳动
|
|
|
+ $("#popup").css({"top":cHeight*0.6,"left":cWidth/2})
|
|
|
+ params.left=cWidth/2;
|
|
|
+ params.top=cHeight*0.6;
|
|
|
+}
|
|
|
+
|
|
|
+// 拟建项目免费用户体验点击留资
|
|
|
+$('.detail-nj-btn').click(function(){
|
|
|
+ var subType = goTemplateData.params.obj.subtype
|
|
|
+ var sourceKey = 'article_slogan'
|
|
|
+ if (subType == '拟建') {
|
|
|
+ sourceKey = 'article_proposed_project'
|
|
|
+ }
|
|
|
+ if (subType == '采购意向') {
|
|
|
+ sourceKey = 'article_purchase_intention'
|
|
|
+ }
|
|
|
+ bidVue.sourceLogAjax(sourceKey)
|
|
|
+ vm.isNeedSubmit(sourceKey,function(){
|
|
|
+ vm.showSuccess = true
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+//
|
|
|
+function clearup(rp){
|
|
|
+ var dtcontent = originalCon;
|
|
|
+ var dttitlecopy = originalTitle;
|
|
|
+ if(dataCode=="projectname"&&rp=="P"){
|
|
|
+ projectName=$.trim($("#pop-textarea").val());
|
|
|
+ }else if(rp=="R"){
|
|
|
+ if(dataCode=="projectname"){
|
|
|
+ projectName=dataCont;
|
|
|
+ }
|
|
|
+ dtcontent = dtcontent.replace(/fphl/g,"");
|
|
|
+ dtcontent = dtcontent.replace(reg,"<span id='fphl' class='fphl' dataCode='"+dataCode+"'>"+dataCont+"</span>");
|
|
|
+ //
|
|
|
+ }
|
|
|
+ if(projectName){
|
|
|
+ dtcontent = keyWordHighlight(dtcontent,projectName,"<span class='keyword' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ dttitlecopy = keyWordHighlight(dttitlecopy,projectName,"<span class='keyword' id='hst' style=\"border-bottom:1px solid #2cb7ca;cursor: pointer;\">$1</span>");
|
|
|
+
|
|
|
+ }
|
|
|
+ if(dataCode=="winner"&&rp=="P"){
|
|
|
+ s_winner=$.trim($("#pop-textarea").val());
|
|
|
+ }else if(dataCode=="winner"&&rp=="R"){
|
|
|
+ s_winner=dataCont;
|
|
|
+ }
|
|
|
+ if(s_winner){
|
|
|
+ for (var i=0;i<s_winner.split(",").length;i++){
|
|
|
+ var winner_con_i = s_winner.split(",")[i]
|
|
|
+ if(winner_con_i != "" && content.toLowerCase().indexOf(winner_con_i.toLowerCase()) > -1){
|
|
|
+ dtcontent = keyWordHighlight(content,winner_con_i,"<span class='keyword winner' data-val='winner__"+i+"' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //dtcontent = keyWordHighlight(dtcontent,s_winner,"<span class='keyword winner' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ }
|
|
|
+ var wordsArray = getQueryString("kds").split(" ");
|
|
|
+ if(wordsArray!=""&&wordsArray!="undefined"){
|
|
|
+ for(var i=0;i<wordsArray.length;i++){
|
|
|
+ dtcontent = keyWordHighlight(dtcontent,wordsArray[i],"<span class='jykeyword'>$1</span>");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(s_winner){
|
|
|
+ for (var i=0;i<s_winner.split(",").length;i++){
|
|
|
+ var winner_con_i = s_winner.split(",")[i]
|
|
|
+ if(winner_con_i != ""){
|
|
|
+ content = content.replace("winner__"+i,winner_con_i)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $(".com-detail").html(dtcontent);
|
|
|
+ $("#com-title").html(dttitlecopy);
|
|
|
+}
|
|
|
+//
|
|
|
+if(goTemplateData.params.obj.subtype=="中标"||goTemplateData.params.obj.subtype=="成交"||goTemplateData.params.obj.subtype=="合同"){
|
|
|
+ isbid=true
|
|
|
+ var winnertel = goTemplateData.params.obj.winnertel;
|
|
|
+ var winner_enttel=goTemplateData.params.obj.winner_enttel;
|
|
|
+ var tel_source="来源:招标公告网站";
|
|
|
+ if(winnertel==null){
|
|
|
+ if(winner_enttel==null){
|
|
|
+ winnertel=""
|
|
|
+ }else{
|
|
|
+ winnertel=winner_enttel
|
|
|
+ tel_source="来源:国家企业公示网站"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#tel_source").html(tel_source);
|
|
|
+ $("#winnertel").html(winnertel);
|
|
|
+ if(winnertel!=""){
|
|
|
+ $(".winnertel").show();
|
|
|
+ }
|
|
|
+ var winner_ =goTemplateData.params.obj.winner
|
|
|
+ var bidmt = goTemplateData.params.obj.bidamount
|
|
|
+ if(winner_!=""&&winner_!=null){
|
|
|
+ count++
|
|
|
+ }
|
|
|
+ if(bidmt!=""&&bidmt!=null){
|
|
|
+ count++
|
|
|
+ }
|
|
|
+ if(count>=5){
|
|
|
+ $("#bidamount").text(bidmt)
|
|
|
+ $("#bidInfoTitle").show();
|
|
|
+ $("#bidInfoCont").show();
|
|
|
+ }
|
|
|
+}
|
|
|
+var subtype=goTemplateData.params.obj.subtype;
|
|
|
+var adv_from=getinfotype(subtype);
|
|
|
+var adv=any_adv;
|
|
|
+if(adv_from=="中标公告"){
|
|
|
+ adv=adv.concat(win_adv);
|
|
|
+}else if(adv_from=="招标公告"){
|
|
|
+ adv=adv.concat(zb_adv);
|
|
|
+}else if(adv_from=="拟建项目"){
|
|
|
+ adv=adv.concat(nj_adv);
|
|
|
+}
|
|
|
+var x = Math.floor(Math.random()*adv.length)
|
|
|
+$(".adv_tosieve").text(adv[x])
|
|
|
+var btn_text="立即体验"
|
|
|
+if (adv[x]==any_adv[0]){
|
|
|
+ btn_text="立即查看";
|
|
|
+}
|
|
|
+$(".adv_tosieve-btn").text(btn_text)
|
|
|
+$(".join").attr("adv_name",fromwhere(adv[x]));
|
|
|
+$(".join > a").attr("dataHref","/front/dataExport/toSieve?adv_from="+fromwhere(adv[x]));
|
|
|
+// 如果有招标信息类型且不是大会员 再请求大会员引流语接口
|
|
|
+var userType;
|
|
|
+if (!isVip && !isEntniche && !isMember){
|
|
|
+ userType = '0'
|
|
|
+} else if (isVip && isEntniche) {
|
|
|
+ userType = '1,3'
|
|
|
+} else if (isVip && !isEntniche) {
|
|
|
+ userType = '1'
|
|
|
+} else if (!isVip && isEntniche) {
|
|
|
+ userType = '3'
|
|
|
+}
|
|
|
+if (subtype != '拟建' && !isMember) {
|
|
|
+ try {
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "/publicapply/drainage/copywriting",
|
|
|
+ data: {subtype: subtype},
|
|
|
+ success: function(r){
|
|
|
+ // console.log(r, 'rrrr')
|
|
|
+ if (r.data) {
|
|
|
+ $('.bigmember-slogan').show().find('.slogan-text').html(r.data.s_content)
|
|
|
+ // console.log(powerMap, 'map')
|
|
|
+ $('.bigmember-slogan .free-btn').click(function(){
|
|
|
+ bidVue.sourceLogAjax('article_slogan')
|
|
|
+ vm.isNeedSubmit('article_slogan',function(){
|
|
|
+ vm.showSuccess = true
|
|
|
+ })
|
|
|
+ })
|
|
|
+ $('.bigmember-slogan .more-btn').click(function() {
|
|
|
+ var params = {
|
|
|
+ drainageId: (r.data.id).toString(),
|
|
|
+ bigServiceId: r.data.s_serviceid,
|
|
|
+ userType: userType,
|
|
|
+ platform: 'P'
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "/publicapply/drainage/behaviorLog",
|
|
|
+ contentType: "application/json",
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(s){
|
|
|
+ var goURL = powerMap[r.data.s_serviceid] && powerMap[r.data.s_serviceid].info
|
|
|
+ if (goURL) {
|
|
|
+ window.open('/big/page/' + goURL)
|
|
|
+ } else {
|
|
|
+ window.open('/big/page/index')
|
|
|
+ }
|
|
|
+
|
|
|
+ // if (s.data) {
|
|
|
+ // if(r.data.s_serviceid == 8) {
|
|
|
+ // // 潜在合作伙伴挖掘
|
|
|
+ // window.open('/big/page/yw?name=qz_1&id=' + s.data + '#qz')
|
|
|
+ // } else if (r.data.s_serviceid == 5) {
|
|
|
+ // // 采购单位
|
|
|
+ // window.open('/big/page/cg?name=fx_2&id=' + s.data + '#fx')
|
|
|
+ // } else if (r.data.s_serviceid == 4) {
|
|
|
+ // // 企业画像
|
|
|
+ // window.open('/big/page/qy?id=' + s.data + '#fx')
|
|
|
+ // } else {
|
|
|
+ // window.open('/big/page/index?id=' + s.data + '#' + powerMap[r.data.s_serviceid].anchor)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+function getinfotype(subtype){
|
|
|
+ var infotype=""
|
|
|
+ switch (subtype){
|
|
|
+ case "拟建":
|
|
|
+ infotype="拟建项目"
|
|
|
+ break;
|
|
|
+ case "招标": case "邀标": case "询价": case "竞谈": case "变更": case "竞价": case "单一": case "其他":
|
|
|
+ infotype="招标公告"
|
|
|
+ break;
|
|
|
+ case "中标": case "成交": case "废标": case "流标":
|
|
|
+ infotype="中标公告"
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ infotype="其他"
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return infotype
|
|
|
+}
|
|
|
+function fromwhere(text){
|
|
|
+ var ad="pc_articel_";
|
|
|
+ if (getinfotype(subtype)=="拟建项目"){
|
|
|
+ ad+="nj"
|
|
|
+ }
|
|
|
+ if (getinfotype(subtype)=="招标公告"){
|
|
|
+ ad+="zb"
|
|
|
+ }
|
|
|
+ if (getinfotype(subtype)=="中标公告"){
|
|
|
+ ad+="win"
|
|
|
+ }
|
|
|
+ if (getinfotype(subtype)=="其他"){
|
|
|
+ ad+="qt"
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,zb_adv)!=-1){
|
|
|
+ ad+="_zb_"+(jQuery.inArray(text,zb_adv)+1);
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,win_adv)!=-1){
|
|
|
+ ad+="_win_"+(jQuery.inArray(text,win_adv)+1);
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,any_adv)!=-1){
|
|
|
+ ad+="_sj_"+(jQuery.inArray(text,any_adv)+1);
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,nj_adv)!=-1){
|
|
|
+ ad+="_nj_"+(jQuery.inArray(text,nj_adv)+1);
|
|
|
+ }
|
|
|
+ return ad
|
|
|
+}
|
|
|
+//
|
|
|
+$(window).scroll(function(event){
|
|
|
+ if(cHeight <= 0){
|
|
|
+ cHeight = 500;
|
|
|
+ }
|
|
|
+ var offsetTop = 0;
|
|
|
+ var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ var t1top = 0;
|
|
|
+ if(goTemplateData.params.obj.subtype!="拟建"&&goTemplateData.params.obj.subtype!="违规"){
|
|
|
+ offsetTop = $(".recoveryfat").offset().top;
|
|
|
+ t1top = $(".tab1").offset().top;
|
|
|
+ }
|
|
|
+ if(t1top<=(scrollTop+65)&&t1top!=0){
|
|
|
+ if(scrollflag){
|
|
|
+ $(".tab1").addClass("active").siblings().removeClass("active");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(scrollflag){
|
|
|
+ $(".tab2").addClass("active").siblings().removeClass("active");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(scrollTop >= offsetTop&&offsetTop!=0){
|
|
|
+ $(".recoveryhead").addClass("tabfix");
|
|
|
+ }else{
|
|
|
+ $(".recoveryhead").removeClass("tabfix");
|
|
|
+ }
|
|
|
+
|
|
|
+ //纠错高亮位置
|
|
|
+ if($(".com-detail .fphl").length>0){
|
|
|
+ heightLight = $(".com-detail .fphl").offset().top;
|
|
|
+ }
|
|
|
+ if(localStorage.getItem("ere-"+goTemplateData.params.obj._id)==null){
|
|
|
+ if(heightLight>(scrollTop+50)&&heightLight<(scrollTop+cHeight)){
|
|
|
+ $(".pop-up").fadeIn();
|
|
|
+ }else{
|
|
|
+ $(".pop-up").fadeOut();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ clearTimeout(timer) // 每次滚动前 清除一次
|
|
|
+ timer = setTimeout("pscp()", 200);
|
|
|
+ m1 = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+})
|
|
|
+//
|
|
|
+function pscp(){
|
|
|
+ m2 = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ if(m2 == m1){
|
|
|
+ scrollflag = true;
|
|
|
+ }
|
|
|
+}
|
|
|
+//
|
|
|
+function hmtab(Dirp){
|
|
|
+ var tabTwoHeight = $("#tab2").offset().top;
|
|
|
+ var scrollTop = document.body.scrollTop|| document.documentElement.scrollTop;
|
|
|
+ var pth = 22;
|
|
|
+ if(Dirp=="D"&&(scrollTop+pth)<tabTwoHeight&&tabTwoHeight<(scrollTop+cHeight-pth)){
|
|
|
+ $("html, body").stop(true,false).animate({scrollTop: $("#tab2").offset().top-inithgt }, {duration: 500,easing: "swing"});
|
|
|
+ }else if(Dirp=="U"&&(scrollTop+pth)<tabTwoHeight&&tabTwoHeight<(scrollTop+cHeight-pth)){
|
|
|
+ $("html, body").stop(true,false).animate({scrollTop: $("#tab2").offset().top-cHeight }, {duration: 500,easing: "swing"});
|
|
|
+ }
|
|
|
+}
|
|
|
+var inithgt = 60;//tab高度
|
|
|
+var reccont ="";
|
|
|
+var rhcontent = "";
|
|
|
+function subData(){
|
|
|
+ var fieldName = dataCode;
|
|
|
+ var originalcont = dataCont;
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "/front/recovery/info",
|
|
|
+ data: {id:goTemplateData.params.obj._id,fieldName:fieldName,fwtscode:fwtscode,reccont:reccont,originalcont:originalcont},
|
|
|
+ dataType: "json",
|
|
|
+ traditional: true,
|
|
|
+ success: function(r){
|
|
|
+ if(r.flag){
|
|
|
+ localStorage.setItem("ere-"+goTemplateData.params.obj._id,"T");
|
|
|
+ $(".rec-null").hide();
|
|
|
+ $(".poperr").hide();
|
|
|
+ clearup("P");
|
|
|
+ companyAdd();
|
|
|
+ $("#pop-textarea").val("");
|
|
|
+ $("#fphl").removeClass("fphl");
|
|
|
+ $(transmit).prev("div").text(reccont);
|
|
|
+ EasyAlert.show(r.msg,"",5000);
|
|
|
+ }else{
|
|
|
+ EasyAlert.show("您提交的信息有误,请确认后再提交!","",5000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+});
|
|
|
+}
|
|
|
+//
|
|
|
+function jumpTab(n){
|
|
|
+ if(n==1){
|
|
|
+ $(".tab1").addClass("active").siblings().removeClass("active");
|
|
|
+ $(window).scrollTop($("#tab"+n).offset().top-inithgt);
|
|
|
+ }else{
|
|
|
+ $(".tab2").addClass("active").siblings().removeClass("active");
|
|
|
+ $(window).scrollTop(0);
|
|
|
+ }
|
|
|
+ scrollflag = false;
|
|
|
+ return false;
|
|
|
+}
|
|
|
+$(function(){
|
|
|
+ if ($("#trwidth").find(".preb-exam").length>0){
|
|
|
+ $("#exaapprove").show();
|
|
|
+ }
|
|
|
+ $(document).on("click",function(e) {
|
|
|
+ if($(e.target).parents(".easyalert-mask").length == 0){
|
|
|
+ $("#easyalert-mask").remove();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $(".null-no").click(function(){
|
|
|
+ $(".rec-null").hide();
|
|
|
+ })
|
|
|
+ $(".null-yes").click(function(){
|
|
|
+ subData();
|
|
|
+ })
|
|
|
+ setTimeout(function(){
|
|
|
+ $(".tab2").click();
|
|
|
+ },700)
|
|
|
+ //提交纠错数据
|
|
|
+ $(".pop-botton").click(function(){
|
|
|
+ var animathistory_ent = $(".animathistory_ent").html();
|
|
|
+ $(".com-detail").find(".animathistory_ent").html("")
|
|
|
+ rhcontent = $(".com-detail").text().replace(/[^\{\u4e00-\u9fa5]{1,90}{[^\}\u4e00-\u9fa5]+?}/g,"");
|
|
|
+ $(".com-detail").find(".animathistory_ent").html(animathistory_ent)
|
|
|
+ reccont = $.trim($("#pop-textarea").val());
|
|
|
+ if(reccont!=""&&(tyflag||rhcontent.indexOf(reccont)>-1)){
|
|
|
+ subData();
|
|
|
+ }else if(reccont==""){
|
|
|
+ $(".null-cont").text("确认 "+dataName+" 为空?");
|
|
|
+ $(".rec-null").show();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //
|
|
|
+ document.addEventListener('copy', function(event){
|
|
|
+ var userSelection;
|
|
|
+ if (window.getSelection) { //
|
|
|
+ userSelection = window.getSelection();
|
|
|
+ } else if (document.selection) { //IE浏览器 考虑到Opera,应该放在后面
|
|
|
+ userSelection = document.selection.createRange();
|
|
|
+ }
|
|
|
+ var usesetcont = $.trim(userSelection)
|
|
|
+ if(usesetcont!=""){
|
|
|
+ rhcontent = $(".com-detail").text().replace(/[^\{\u4e00-\u9fa5]{1,90}{[^\}\u4e00-\u9fa5]+?}/g,"");
|
|
|
+ if(rhcontent.indexOf(usesetcont.replace(/\n/g,""))>-1){
|
|
|
+ $("#pop-textarea").val(usesetcont.replace(/\n/g,""));
|
|
|
+ $(".pop-botton").css({"background":"#2cbfca"})
|
|
|
+ }else{
|
|
|
+ $(".pop-botton").css({"background":"#d0d0d2"})
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $(".pop-botton").css({"background":"#2cbfca"})
|
|
|
+ }
|
|
|
+ var pathname_url=window.location.pathname+window.location.search;
|
|
|
+ $.get("/front/shorturl/replication");
|
|
|
+
|
|
|
+ });
|
|
|
+ //纠错输入框
|
|
|
+ $("#pop-textarea").on("input propertychange",function(){
|
|
|
+ if($.trim($(this).val())!=""){
|
|
|
+ var animathistory_ent = $(".animathistory_ent").html();
|
|
|
+ $(".com-detail").find(".animathistory_ent").html("")
|
|
|
+ rhcontent = $(".com-detail").text().replace(/[^\{\u4e00-\u9fa5]{1,90}{[^\}\u4e00-\u9fa5]+?}/g,"");
|
|
|
+ $(".com-detail").find(".animathistory_ent").html(animathistory_ent)
|
|
|
+ var ptval = $.trim($(this).val());
|
|
|
+ if(tyflag){
|
|
|
+ $(".pop-botton").css({"background":"#2cbfca"})
|
|
|
+ }else if(rhcontent.indexOf(ptval)>-1){
|
|
|
+ $(".pop-botton").css({"background":"#2cbfca"})
|
|
|
+ }else{
|
|
|
+ $(".pop-botton").css({"background":"#d0d0d2"})
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $(".pop-botton").css({"background":"#2cbfca"})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(packageCon==""){
|
|
|
+ $("#tdbudget").text("项目预算(元)");
|
|
|
+ $("#tdbudget").next("td").find("div").eq(0).text(goTemplateData.params.obj.budget)
|
|
|
+ $("#tdbudget").next("td").find("div").eq(1).text("纠错")
|
|
|
+ }
|
|
|
+ if(goTemplateData.params.obj.subtype=="单一"&&packageCon==""){
|
|
|
+ $("#baselast").show();
|
|
|
+ }
|
|
|
+ $(".pop-head img").click(function(){
|
|
|
+ $(".rec-null").hide();
|
|
|
+ $(".poperr").hide();
|
|
|
+ localStorage.setItem("ere-"+goTemplateData.params.obj._id,"T")
|
|
|
+ $("#fphl").removeClass("fphl");
|
|
|
+ $(".pop-botton").css({"background":"#d0d0d2"})
|
|
|
+ })
|
|
|
+ var rerwinnerorder = goTemplateData.params.obj.winnerorder//中标候选人
|
|
|
+ //分包信息
|
|
|
+ if(packageCon!=""){
|
|
|
+ var pkchtml = '';
|
|
|
+ for(n in packageCon){
|
|
|
+ var pckwinner = packageCon[n].winner;
|
|
|
+ if(pckwinner==undefined){
|
|
|
+ pckwinner=""
|
|
|
+ }
|
|
|
+ var pckorigin = packageCon[n].m_origin;
|
|
|
+ if(pckorigin==undefined){
|
|
|
+ pckorigin=packageCon[n].type+packageCon[n].origin
|
|
|
+ }
|
|
|
+ var pckbidamount = packageCon[n].bidamount;
|
|
|
+ if(pckbidamount==undefined){
|
|
|
+ pckbidamount=""
|
|
|
+ }
|
|
|
+ pkchtml+='<div class="baseInfo">分包</div>'
|
|
|
+ +'<div class="baseTable"><table>'
|
|
|
+ +'<tr id="left-three-gray">'
|
|
|
+ if(goTemplateData.params.obj.subtype=="招标"){
|
|
|
+ pkchtml+='<td class="tab-type">分包/标段</td>'
|
|
|
+ +'<td class="tab-cont">'
|
|
|
+ +'<div class="cont-cont">'+pckorigin+'</div>'
|
|
|
+ +'<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-m_origin\',\'\')">纠错</div>'
|
|
|
+ +'<div style="display:none;"></div>'
|
|
|
+ +'</td>'
|
|
|
+ pkchtml+='<td class="tab-type piddingfour">项目预算(元)</td>'
|
|
|
+ pkchtml+='<td class="tab-cont">'
|
|
|
+ +'<div class="cont-cont">'+pckbidamount+'</div>'
|
|
|
+ +'<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-bidamount\',\'\')">纠错</div>'
|
|
|
+ +'<div style="display:none;"></div>'
|
|
|
+ +'</td>'
|
|
|
+ +'</tr>'
|
|
|
+ }else{
|
|
|
+ var winnername = "";
|
|
|
+ var abountname = "";
|
|
|
+ pkchtml+='<td class="cd-type">分包/标段</td>'
|
|
|
+ if(goTemplateData.params.obj.subtype=="单一"){
|
|
|
+ pkchtml+='<td class="cd-type">拟定单一来源采购供应商</td>'
|
|
|
+ winnername = "拟定单一来源采购供应商"
|
|
|
+ }else{
|
|
|
+ pkchtml+='<td class="cd-type">中标单位</td>'
|
|
|
+ winnername = "中标单位"
|
|
|
+ }
|
|
|
+ if(goTemplateData.params.obj.subtype=="单一"){
|
|
|
+ pkchtml+='<td class="cd-type piddingfour">项目预算(元)</td>'
|
|
|
+ abountname = "项目预算(元)";
|
|
|
+ }else{
|
|
|
+ pkchtml+='<td class="cd-type piddingfour">中标金额(元)</td>'
|
|
|
+ abountname = "中标金额(元)";
|
|
|
+ }
|
|
|
+ pkchtml+='</tr>'
|
|
|
+ pkchtml+='<tr id="left-three-gray">'
|
|
|
+ +'<td class="cd-cont subpck">'
|
|
|
+ +'<div class="cont-cont">'+pckorigin+'</div>'
|
|
|
+ +'<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-m_origin\',\'分包/标段\')">纠错</div>'
|
|
|
+ +'<div style="display:none;"></div>'
|
|
|
+ +'</td>'
|
|
|
+ pkchtml+='<td class="cd-cont winpck">'
|
|
|
+ +'<div class="cont-cont">'+pckwinner+'</div>'
|
|
|
+ +'<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-winner\',\''+winnername+'\')">纠错</div>'
|
|
|
+ +'<div style="display:none;"></div>'
|
|
|
+ +'</td>'
|
|
|
+ pkchtml+='<td class="cd-cont amountpck">'
|
|
|
+ +'<div class="cont-cont">'+pckbidamount+'</div>'
|
|
|
+ +'<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-bidamount\',\''+abountname+'\')">纠错</div>'
|
|
|
+ +'<div style="display:none;"></div>'
|
|
|
+ +'</td>'
|
|
|
+ pkchtml+='</tr>'
|
|
|
+ }
|
|
|
+ pkchtml+='</table></div>'
|
|
|
+ var pckwinnerorder = packageCon[n].winnerorder;
|
|
|
+ if(pckwinnerorder!=undefined&&pckwinnerorder.length>0){
|
|
|
+ pkchtml+='<div class="baseTable"><table>'+
|
|
|
+ '<tr id="left-three-blue" style="border-top: 0px;">'+
|
|
|
+ '<td class="cd-type" colspan="3" id="candidate">候选人</td>'+
|
|
|
+ '</tr>'+
|
|
|
+ '<tr id="left-three-blue">'+
|
|
|
+ '<td class="cd-type">单位名称</td>'+
|
|
|
+ '<td class="cd-type">报价(元)</td>'+
|
|
|
+ '<td class="cd-type">名次</td>'+
|
|
|
+ '</tr>'
|
|
|
+ for(var i=0;i<pckwinnerorder.length;i++){
|
|
|
+ if(i>0){
|
|
|
+ //pkchtml+='<tr id="left-three-blue" class="cutoff"><td colspan="3"></td></tr>'
|
|
|
+ }
|
|
|
+ var pckentname = pckwinnerorder[i].entname;
|
|
|
+ if(pckentname==undefined){
|
|
|
+ pckentname=""
|
|
|
+ }
|
|
|
+ var pcksortstr = pckwinnerorder[i].sortstr;
|
|
|
+ if(pcksortstr==undefined){
|
|
|
+ pcksortstr=""
|
|
|
+ }
|
|
|
+ var pckprice = pckwinnerorder[i].price;
|
|
|
+ if(pckprice==undefined){
|
|
|
+ pckprice=""
|
|
|
+ }
|
|
|
+ pkchtml+='<tr id="left-three-blue">'+
|
|
|
+ '<td class="cd-cont entnamecont">'+
|
|
|
+ '<div class="cont-cont">'+pckentname+'</div>'+
|
|
|
+ '<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-'+i+'-entname\',\'单位名称\')">纠错</div>'+
|
|
|
+ '<div style="display:none;"></div>'+
|
|
|
+ '</td>'+
|
|
|
+ '<td class="cd-cont pricecont">'+
|
|
|
+ '<div class="cont-cont">'+pckprice+'</div>'+
|
|
|
+ '<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-'+i+'-price\',\'报价(元)\')">纠错</div>'+
|
|
|
+ '<div style="display:none;"></div>'+
|
|
|
+ '</td>'+
|
|
|
+ '<td class="cd-cont sortstrcont">'+
|
|
|
+ '<div class="cont-cont">'+pcksortstr+'</div>'+
|
|
|
+ '<div class="cont-recy" onclick="recoveryerr(this,\''+n+'-'+i+'-sortstr\',\'名次\')">纠错</div>'+
|
|
|
+ '<div style="display:none;"></div>'+
|
|
|
+ '</td>'+
|
|
|
+ '</tr>'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ pkchtml+='</table></div>'
|
|
|
+ }
|
|
|
+ $("#tab2").append(pkchtml)
|
|
|
+ }else if(packageCon==""&&rerwinnerorder!=""){
|
|
|
+ var pkchtml = '';
|
|
|
+ pkchtml+='<div class="baseTable"><table>'+
|
|
|
+ '<tr id="left-three-blue" style="border-top: 0px;">'+
|
|
|
+ '<td class="cd-type" colspan="3" id="candidate">候选人</td>'+
|
|
|
+ '</tr>'+
|
|
|
+ '<tr id="left-three-blue">'+
|
|
|
+ '<td class="cd-type">单位名称</td>'+
|
|
|
+ '<td class="cd-type">报价(元)</td>'+
|
|
|
+ '<td class="cd-type">名次</td>'+
|
|
|
+ '</tr>'
|
|
|
+ for(var i=0;i<rerwinnerorder.length;i++){
|
|
|
+ if(i>0){
|
|
|
+ //pkchtml+='<tr id="left-three-blue" class="cutoff"><td colspan="4"></td></tr>'
|
|
|
+ }
|
|
|
+ var pckentname = rerwinnerorder[i].entname;
|
|
|
+ if(pckentname==undefined){
|
|
|
+ pckentname=""
|
|
|
+ }
|
|
|
+ var pcksortstr = rerwinnerorder[i].sortstr;
|
|
|
+ if(pcksortstr==undefined){
|
|
|
+ pcksortstr=""
|
|
|
+ }
|
|
|
+ var pckprice = rerwinnerorder[i].price;
|
|
|
+ if(pckprice==undefined){
|
|
|
+ pckprice=""
|
|
|
+ }
|
|
|
+ pkchtml+='<tr id="left-three-blue">'+
|
|
|
+ '<td class="cd-cont entnamecont">'+
|
|
|
+ '<div class="cont-cont">'+pckentname+'</div>'+
|
|
|
+ '<div class="cont-recy" onclick="recoveryerr(this,\'winnerorder'+i+'-entname\',\'单位名称\')">纠错</div>'+
|
|
|
+ '<div style="display:none;"></div>'+
|
|
|
+ '</td>'+
|
|
|
+ '<td class="cd-cont pricecont">'+
|
|
|
+ '<div class="cont-cont">'+pckprice+'</div>'+
|
|
|
+ '<div class="cont-recy" onclick="recoveryerr(this,\'winnerorder'+i+'-price\',\'报价(元)\')">纠错</div>'+
|
|
|
+ '<div style="display:none;"></div>'+
|
|
|
+ '</td>'+
|
|
|
+ '<td class="cd-cont sortstrcont">'+
|
|
|
+ '<div class="cont-cont">'+pcksortstr+'</div>'+
|
|
|
+ '<div class="cont-recy" onclick="recoveryerr(this,\'winnerorder'+i+'-sortstr\',\'名次\')">纠错</div>'+
|
|
|
+ '<div style="display:none;"></div>'+
|
|
|
+ '</td>'+
|
|
|
+ '</tr>'
|
|
|
+
|
|
|
+ }
|
|
|
+ pkchtml+='</table></div>'
|
|
|
+ $("#tab2").append(pkchtml)
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
+ haslogin(goTemplateData.params.logid,goTemplateData.params.obj.projectname,"D");
|
|
|
+ JYLogin(goTemplateData.params.logid)
|
|
|
+ if (_loop){
|
|
|
+ //console.log("-",_loop)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ _loop = true;
|
|
|
+ var infoDetail = $(".com-detail").html();
|
|
|
+ if(infoDetail){
|
|
|
+ $(".com-detail").html(infoDetail.replace(/(<\/?br\/?>)+/ig,"<br>"));
|
|
|
+ }
|
|
|
+ $(".com-wxshare,.com-guanzhu").hover(function(){
|
|
|
+ $(this).children(".scanqr").show();
|
|
|
+ },function(){
|
|
|
+ $(this).children(".scanqr").hide();
|
|
|
+ });
|
|
|
+ //重新计算最新信息的发布时间
|
|
|
+ $(".otherinfo .com-time").each(function(){
|
|
|
+ var thisValue = $(this).attr("data-value");
|
|
|
+ if(thisValue != "" && thisValue != "0" && thisValue != 0){
|
|
|
+ var diff = timeDiff(new Date(Number(thisValue+"000")));
|
|
|
+ if(diff != null){
|
|
|
+ $(this).text(diff);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $.post("/front/rewardText",{},function(r){
|
|
|
+ $(".reward").prepend(r);
|
|
|
+ },"text");
|
|
|
+ $(".reward>div").click(function(){
|
|
|
+ $(".payQRcode").show();
|
|
|
+ });
|
|
|
+ $(".payQRcode .reward-close").click(function(){
|
|
|
+ $(".payQRcode").hide();
|
|
|
+ });
|
|
|
+ //
|
|
|
+ var uli = 960;
|
|
|
+ var tdno = $(".preb-list tr").eq(1);
|
|
|
+ if(tdno.find("td").length != 0){
|
|
|
+ var tdclass = "";
|
|
|
+ for(var i=0;i<tdno.find("td").length;i++){
|
|
|
+ var fsize = tdno.find("td").eq(i).find("div").attr("class")
|
|
|
+ if(i==0){
|
|
|
+ tdclass += fsize;
|
|
|
+ }else{
|
|
|
+ tdclass += ","+fsize;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var sparr = tdclass.split(",");
|
|
|
+ for(var m =0;m<sparr.length;m++ ){
|
|
|
+ var average = uli/tdno.find("td").length ;
|
|
|
+ $("#"+sparr[m]).parent("td").css("width",average);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if(goTemplateData.params.obj.subtype=="拟建"){
|
|
|
+ $('.lead-btn').hide()
|
|
|
+ $(".lead-btn-nj").hide();
|
|
|
+ }
|
|
|
+ var attaflag = false;
|
|
|
+
|
|
|
+ if (goTemplateData.params.obj.projectinfo && goTemplateData.params.obj.projectinfo.attachments) {
|
|
|
+ var attachments = goTemplateData.params.obj.projectinfo.attachments
|
|
|
+ var j = 0 ;
|
|
|
+ for(var m in attachments){
|
|
|
+ j += 1 ;
|
|
|
+ var arr = new Array()
|
|
|
+ arr = attachments[m]
|
|
|
+ $(".preb-enno").html('<img src="'+goTemplateData.cdn+'/images/wx/enclosure.png"/>附件('+j+'个)')
|
|
|
+ //for(var i in arr){
|
|
|
+ if((arr["ossid"]||arr["fid"])&&arr["filename"]&&arr["filename"].slice(-3).toLowerCase()=="pdf"){
|
|
|
+ attaflag = true;
|
|
|
+
|
|
|
+ if (arr["ossid"]!=undefined &&arr["ossid"]!=null){
|
|
|
+ arr["fid"]=arr["ossid"]
|
|
|
+ }else {
|
|
|
+ arr["fid"]
|
|
|
+ }
|
|
|
+ arr["fid"]="https://jy-datafile.oss-cn-beijing.aliyuncs.com/"+arr["fid"];
|
|
|
+ arr["url"]=arr["fid"]
|
|
|
+ var pdfshow = '<div class="approve">'+arr["filename"]+'</div><div id="preb-pdf'+j+'"></div>';
|
|
|
+ $(".pdf-div").html(pdfshow);
|
|
|
+ var pdfhtml = "";
|
|
|
+ pdfhtml = '<div class="preb-encont"><div style="float:left;"><img src="'+goTemplateData.cdn+'/images/wx/pdf.png"/></div><div style="float:left;line-height: 22px;">'+arr["filename"]+'<br><a style="color:blue;" href="'+arr["url"]+'">下载</a></div><div style="clear:both;"></div></div>';
|
|
|
+ PDFObject.embed(arr["url"], "#preb-pdf"+j);
|
|
|
+ }
|
|
|
+ //}
|
|
|
+ $(".preb-enclosure").append(pdfhtml)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(goTemplateData.params.obj.subtype=="拟建"||goTemplateData.params.obj.toptype=="拟建"||goTemplateData.params.obj.subtype=="违规"){
|
|
|
+ if(attaflag){
|
|
|
+ $(".preb-enclosure").removeClass("hidden");
|
|
|
+ $(".pdf-div").removeClass("hidden");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if((count>=4 && !isbid)||(count>=5&&isbid)){
|
|
|
+ $(".recoveryfat").show();
|
|
|
+ $("#tab2").show();
|
|
|
+ $(".explain").show();
|
|
|
+ $(".lead-btn").show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
+ if (goTemplateData.params.obj.infoformat && goTemplateData.params.obj.infoformat == 2) {
|
|
|
+ $(".com-prebuilt").removeClass("hidden")
|
|
|
+ }
|
|
|
+ if (goTemplateData.params.obj.href) {
|
|
|
+ $(".com-original").removeClass("hidden");
|
|
|
+ }
|
|
|
+ //
|
|
|
+ $(window).scroll(function(){
|
|
|
+ if($(this).scrollTop() > 0){
|
|
|
+ $("#backTop").show();
|
|
|
+ }else{
|
|
|
+ $("#backTop").hide();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //获取原文百度统计跳转
|
|
|
+ var originalhref;
|
|
|
+ var originalUrl = goTemplateData.params.obj.url;
|
|
|
+ if (originalUrl!=""){
|
|
|
+ originalUrl = originalUrl.replace("http://https://","https://");
|
|
|
+ if (window.location.href.indexOf("mailprivate")>0||isWechat()){
|
|
|
+ originalhref='/front/transfer?url='+encodeURIComponent(originalUrl);
|
|
|
+ }else{
|
|
|
+ var url =document.location.protocol+"//"+ window.location.host+"/front/transfer?url="+encodeURIComponent(originalUrl)
|
|
|
+ originalhref=url
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $(".com-original").hide();
|
|
|
+ }
|
|
|
+ // $(".com-original").attr("dataHref",originalhref);
|
|
|
+ // 点击阅读原文 用户留资
|
|
|
+ $(".com-original").on('click',function() {
|
|
|
+ if (!loginflag) {
|
|
|
+ openLoginDig()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log('三级页-阅读原文:article_original')
|
|
|
+ vm.dialogTitle = '为给您匹配精准的推荐信息,请完善个人信息,免费查看原文'
|
|
|
+ vm.isNeedSubmit('article_original', function() {
|
|
|
+ window.open(originalhref)
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ //var sds = goTemplateData.params.keywords;
|
|
|
+ var sds = getQueryString("kds");
|
|
|
+ sds = sds.replace(/\++/g," ");
|
|
|
+ var content = $(".com-detail").html();
|
|
|
+ titleCopy = $("#com-title").text();
|
|
|
+ titleCopyDec = $("#com-title").text();
|
|
|
+ //
|
|
|
+ var lsgim = localStorage.getItem("ere-"+goTemplateData.params.obj._id);
|
|
|
+ //if(lsgim!="T"&&fwtsname != "" && content.toLowerCase().indexOf(fwtsname.toLowerCase()) > -1){
|
|
|
+ //content = content.replace(fwtsname,"<span id='fphl' class='fphl' dataCode='"+fwtscode+"'>"+fwtsname+"</span>");
|
|
|
+ //}
|
|
|
+ $(".com-detail").html(content)
|
|
|
+ originalCon = content;
|
|
|
+ originalTitle = titleCopy;
|
|
|
+ //
|
|
|
+ if(projectName){
|
|
|
+ //if(projectname != "" && content.toLowerCase().indexOf(projectname.toLowerCase()) > -1){
|
|
|
+ // content = keyWordHighlight(content,projectname,"<span class='keyword myfollow' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ //}
|
|
|
+ content = keyWordHighlight(content,projectName,"<span class='keyword' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ //if(projectname != "" && titleCopy.toLowerCase().indexOf(projectname.toLowerCase()) > -1){
|
|
|
+ // titleCopy = keyWordHighlight(titleCopy,projectname,"<span class='keyword' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ //}
|
|
|
+ titleCopy = keyWordHighlight(titleCopy,projectName,"<span class='keyword' id='hst' style=\"border-bottom:1px solid #2cb7ca;cursor: pointer;\">$1</span>");
|
|
|
+ }else{
|
|
|
+ $(".com-guanzhu .scanqr>span:last").html("随时掌握招标信息");
|
|
|
+ $(".com-guanzhu>.scanqr>img").height(135);
|
|
|
+ $(".com-guanzhu>font").text("关注剑鱼标讯");
|
|
|
+ insertflog = false;
|
|
|
+ }
|
|
|
+ if(s_winner){
|
|
|
+ for (var i=0;i<s_winner.split(",").length;i++){
|
|
|
+ var winner_con_i = s_winner.split(",")[i]
|
|
|
+ if(winner_con_i != "" && content.toLowerCase().indexOf(winner_con_i.toLowerCase()) > -1){
|
|
|
+ content = keyWordHighlight(content,winner_con_i,"<span class='keyword winner' data-val='winner__"+i+"' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(sds){
|
|
|
+ if(!insertflog){
|
|
|
+ $(".com-guanzhu .scanqr>span:last").html("随时掌握招标信息");
|
|
|
+ $(".com-guanzhu>.scanqr>img").height(135);
|
|
|
+ $(".com-guanzhu>font").text("关注剑鱼标讯");
|
|
|
+ }
|
|
|
+ var wordsArray = sds.split(" ");
|
|
|
+ if(wordsArray!=""){
|
|
|
+ for(var i=0;i<wordsArray.length;i++){
|
|
|
+ if (isNumber.test(wordsArray[i])||isLetter.test(wordsArray[i])){
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ content = keyWordHighlight(content,wordsArray[i],"<span class='jykeyword'>$1</span>");
|
|
|
+ titleCopy = keyWordHighlight(titleCopy,wordsArray[i],"<span class='jykeyword'>$1</span>");
|
|
|
+ //项目基本信息 关键词高亮
|
|
|
+ $(".preb-cont").each(function(){
|
|
|
+ var prebCont = $(this).html();
|
|
|
+ prebCont = keyWordHighlight(prebCont,wordsArray[i],"<span class='jykeyword' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ $(this).html(prebCont);
|
|
|
+ })
|
|
|
+ //审批事项公示信息高亮
|
|
|
+ $(".preb-examcont").each(function(){
|
|
|
+ var prebExamcont = $(this).text();
|
|
|
+ prebExamcont = keyWordHighlight(prebExamcont,wordsArray[i],"<span class='jykeyword' style=\"border-bottom:1px solid #2cb7ca\">$1</span>");
|
|
|
+ $(this).html(prebExamcont);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(s_winner){
|
|
|
+ for (var i=0;i<s_winner.split(",").length;i++){
|
|
|
+ var winner_con_i = s_winner.split(",")[i]
|
|
|
+ if(winner_con_i != ""){
|
|
|
+ content = content.replace("winner__"+i,winner_con_i)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#ptname").html('<span id="a" style="border-bottom:1px solid #2cb7ca">'+$("#ptname").html()+'</span>')
|
|
|
+ $(".com-detail").html(content);
|
|
|
+
|
|
|
+ $("#com-title").html(titleCopy);
|
|
|
+ companyAdd();
|
|
|
+
|
|
|
+ //企业画像跳转
|
|
|
+ $(".portrait_img:not(.no-show-tip)").hover(function (){
|
|
|
+ if (!$(this).next().hasClass("portrait_tip")){
|
|
|
+ var tipMsg=$(this).attr("tip-data") || $(this).parents('.tab-cont').children('.cont-cont.portrait_img').attr("tip-data");
|
|
|
+ if (!tipMsg){
|
|
|
+ tipMsg="暂无画像数据"
|
|
|
+ }
|
|
|
+ $(this).after("<div class='portrait_tip' style='display:none; position: absolute;top: -27px;right: -13px;background: rgba(0,0,0,0.72);border-radius: 4px;opacity: 1;color: #fff;font-size: 13px;line-height: 20px;padding: 6px 10px;'>"+tipMsg+"</div>")
|
|
|
+ }
|
|
|
+ }).on("click",function (){
|
|
|
+ var toHref=$(this).attr("href-data") || $(this).parents('.tab-cont').children('.cont-cont.portrait_img').attr("href-data")
|
|
|
+ var memberLink = "/swordfish/page_big_pc/ent_portrait/" + goTemplateData.params.obj.entId
|
|
|
+ var vipLink = "/swordfish/page_big_pc/svip/ent_ser_portrait/" + goTemplateData.params.obj.entId
|
|
|
+ var tipMsg=$(this).attr("tip-data") || $(this).parents('.tab-cont').children('.cont-cont.portrait_img').attr("tip-data")
|
|
|
+ if (tipMsg == '查看采购单位画像') {
|
|
|
+ if (toHref){
|
|
|
+ window.open(toHref)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isMember) {
|
|
|
+ // 如果是专家版、智慧版 跳大会员页面
|
|
|
+ if(window.memberStatus > 0 && window.memberPower && window.memberPower.indexOf(4) !== -1) {
|
|
|
+ window.open(memberLink)
|
|
|
+ } else {
|
|
|
+ // 如果是商机版、自定义版
|
|
|
+ // 如果同时是超级订阅 判断有没有画像查看次数
|
|
|
+ if (isVip) {
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "/bigmember/portrait/subVipPortrait/usage",
|
|
|
+ data: {
|
|
|
+ entId:goTemplateData.params.obj.entId
|
|
|
+ },
|
|
|
+ success: function(r){
|
|
|
+ // 如果次数已用完 跳大会员企业画像页面
|
|
|
+ if (r.data.usage >= r.data.total) {
|
|
|
+ window.open(memberLink)
|
|
|
+ } else {
|
|
|
+ // 没用完 超级订阅跳企业画像页面
|
|
|
+ window.open(vipLink)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 不是超级订阅用户跳大会员企业画像页面
|
|
|
+ window.open(memberLink)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非大会员用户跳超级订阅企业画像页面
|
|
|
+ window.open(vipLink)
|
|
|
+ }
|
|
|
+ })
|
|
|
+})
|
|
|
+function companyAdd(){
|
|
|
+ if(s_winner){
|
|
|
+ var winner_con = $(".winner");
|
|
|
+ for(var i=0;i<winner_con.length;i++){
|
|
|
+ var top = getElementTop(winner_con[i]) - $(".public-nav")[0].offsetHeight - 30 + 10 + winner_con[i].offsetHeight;
|
|
|
+ var left = getElementLeft(winner_con[i])-getElementLeft($(".biddetail-content")[0])-110;
|
|
|
+ if(left>670){
|
|
|
+ left = 670;
|
|
|
+ }else if(left<-70){
|
|
|
+ left = -70;
|
|
|
+ }
|
|
|
+// var top = winner_con[i].offsetTop + winner_con[i].offsetHeight + 10;
|
|
|
+// var left = winner_con[i].offsetLeft;
|
|
|
+ $(winner_con[i]).attr("dataNum",(i+1));
|
|
|
+ $(winner_con[i]).append('<div id="outhistory"><div class="animathistory_ent" style="display:none;top:'+top+'px;left:'+left+'px;">'
|
|
|
+ +'<span class="hyone"></span>'
|
|
|
+ +'<span class="hytwo"></span>'
|
|
|
+ +'<div id="myhtlist" style="max-height: 500px;overflow-y: auto;">'
|
|
|
+ +'<div class="hthead">'
|
|
|
+ +'<span>企业最新信息</span><span onclick="htclosed_ent()"><img src="'+goTemplateData.cdn+'/images/wx/close.png"/></span>'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="htcontent">'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="htfoot">'
|
|
|
+ +''
|
|
|
+ +'</div>'
|
|
|
+ +'</div>'
|
|
|
+ +'</div></div>');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function getElementLeft(element){
|
|
|
+ var actualLeft = element.offsetLeft;
|
|
|
+ var current = element.offsetParent;
|
|
|
+ while (current !== null){
|
|
|
+ actualLeft += current.offsetLeft;
|
|
|
+ current = current.offsetParent;
|
|
|
+ }
|
|
|
+ return actualLeft;
|
|
|
+ }
|
|
|
+ function getElementTop(element){
|
|
|
+ var actualTop = element.offsetTop;
|
|
|
+ var current = element.offsetParent;
|
|
|
+ while (current !== null){
|
|
|
+ actualTop += current.offsetTop;
|
|
|
+ current = current.offsetParent;
|
|
|
+ }
|
|
|
+ return actualTop;
|
|
|
+ }
|
|
|
+
|
|
|
+ $(".winner").hover(function(){
|
|
|
+ thishtlists_ent();
|
|
|
+ entProListShowFlag = true;
|
|
|
+ var that = $(this);
|
|
|
+ $(".animathistory_ent").each(function(){
|
|
|
+ if($(this).parents(".winner").attr("dataNum") == that.attr("dataNum")){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ $(this).fadeOut(1000);
|
|
|
+ })
|
|
|
+ $(this).find(".animathistory_ent").fadeIn(1000);
|
|
|
+ },function(){
|
|
|
+ entProListShowFlag = false;
|
|
|
+ setTimeout(function(){
|
|
|
+ if(entProListShowFlag){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $(".animathistory_ent").fadeOut(250);
|
|
|
+ },250)
|
|
|
+ })
|
|
|
+
|
|
|
+ //
|
|
|
+ if(insertflog){
|
|
|
+ var titleCopyNew = $("#hst");
|
|
|
+ titleCopyNew.append('<div id="outhistory"><div class="animathistory" style="display:none;">'
|
|
|
+ +'<span class="hyone"></span>'
|
|
|
+ +'<span class="hytwo"></span>'
|
|
|
+ +'<div id="myhtlist" style="max-height: 500px;overflow-y: auto;">'
|
|
|
+ +'<div class="hthead">'
|
|
|
+ +'<span>项目公告</span><span onclick="htclosed()"><img src="'+goTemplateData.cdn+'/images/wx/close.png"/></span>'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="htcontent">'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="htfoot">'
|
|
|
+ +''
|
|
|
+ +'</div>'
|
|
|
+ +'</div>'
|
|
|
+ +'</div></div>');
|
|
|
+ }
|
|
|
+ $("#hst").hover(function(){
|
|
|
+ thishtlists();
|
|
|
+ hstShowFlag = true;
|
|
|
+ $(".animathistory").fadeIn(1000);
|
|
|
+ },function(){
|
|
|
+ hstShowFlag = false;
|
|
|
+ setTimeout(function(){
|
|
|
+ if(hstShowFlag){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $(".animathistory").fadeOut(250);
|
|
|
+ },250)
|
|
|
+ })
|
|
|
+}
|
|
|
+//
|
|
|
+var thishtlists_ent_hasLoad = false
|
|
|
+var thishtlists_ent = function(){
|
|
|
+ if (thishtlists_ent_hasLoad){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var _id = goTemplateData.params.obj._id;
|
|
|
+ //var s_winner = goTemplateData.params.obj.winner;
|
|
|
+ var _bidamount = goTemplateData.params.obj.bidamount;
|
|
|
+ var projectname = projectName;
|
|
|
+ $.post("/front/pcEntAllNotice",{entname:s_winner},function(D){
|
|
|
+ thishtlists_ent_hasLoad = true;
|
|
|
+ var noData = true;
|
|
|
+ if(D.data){
|
|
|
+ for (var n=0;n<s_winner.split(",").length;n++){
|
|
|
+ var thiswinner = s_winner.split(",")[n]
|
|
|
+ var data = D.data[thiswinner]
|
|
|
+ if (data){
|
|
|
+ noData = false;
|
|
|
+ for(var i = 0; i < data.length; i++){
|
|
|
+ var id = data[i]["_id"];
|
|
|
+ var noticetime = '';
|
|
|
+ var type = '';
|
|
|
+ var amountHtml = '';
|
|
|
+ var listhtml = '';
|
|
|
+ var typeStr = '';
|
|
|
+ var title = data[i]["title"];
|
|
|
+ var amount = data[i]["bidamount"];
|
|
|
+
|
|
|
+ if(data[i]["publishtime"]){
|
|
|
+ noticetime = new Date(Number(data[i]["publishtime"]+"000")).Format("MM-dd");
|
|
|
+ }
|
|
|
+ if(typeof(data[i]["subtype"]) != "undefined" && data[i]["subtype"] != "" && data[i]["subtype"] != null){
|
|
|
+ type = data[i]["subtype"];
|
|
|
+ typeStr = '<span class="type">'+type+'</span>';
|
|
|
+ }else if(typeof(data[i]["toptype"]) != "undefined" && data[i]["toptype"] != "" && data[i]["toptype"] != null){
|
|
|
+ type = data[i]["toptype"];
|
|
|
+ typeStr = '<span class="type">'+type+'</span>';
|
|
|
+ }else{
|
|
|
+ typeStr = '<span class="typenull">'+type+'</span>';
|
|
|
+ }
|
|
|
+ if(amount && !isNaN(amount)){
|
|
|
+ amount = parseInt(amount)/10000;
|
|
|
+ amountHtml = '<span class="priceStyle">'+amount+'万元中标</span>';
|
|
|
+ }
|
|
|
+ if(title){
|
|
|
+ title = keyWordHighlight(title,projectname,"<span style='color:#2cb7ca;'>$1</span>");
|
|
|
+ }else{
|
|
|
+ title = "";
|
|
|
+ }
|
|
|
+ var titleHtml = "";
|
|
|
+ if(id){
|
|
|
+ titleHtml = '<a target="_blank" href="/article/content/'+id+'.html" >'+title+'</a>';
|
|
|
+ }else{
|
|
|
+ titleHtml = '<a target="_blank" href="#" >'+title+'</a>';
|
|
|
+ }
|
|
|
+ listhtml = '<div class="htlist" style="padding-bottom: 30px;">'
|
|
|
+ +'<div style="width: 80px;text-align: right;">'
|
|
|
+ +'<span class="noticetime">'+noticetime+'</span>'
|
|
|
+ +typeStr
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="timeaxis">'
|
|
|
+ +'<span></span>'
|
|
|
+ +'</div>'
|
|
|
+ +'<div>'
|
|
|
+ +titleHtml
|
|
|
+ +amountHtml
|
|
|
+ +'</div>'
|
|
|
+ +'</div>'
|
|
|
+ $(".animathistory_ent").parents(".winner[data-val='"+thiswinner+"']").find(".htcontent").append(listhtml);
|
|
|
+ //$(".animathistory_ent .htcontent").append(listhtml);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (noData){
|
|
|
+ var hthtml = '<div class="htlist" style="padding-bottom: 30px;"><div style="width: 80px;text-align: right;">';
|
|
|
+ if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
|
|
|
+ hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>';
|
|
|
+ }else{
|
|
|
+ hthtml += '<span class="noticetime"></span>';
|
|
|
+ }
|
|
|
+ if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
|
|
|
+ hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>';
|
|
|
+ }
|
|
|
+ hthtml += '</div><div class="timeaxis"><span></span></div>';
|
|
|
+ if(_id){
|
|
|
+ hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">';
|
|
|
+ }else{
|
|
|
+ hthtml += '<div><a target="_blank" href="#">';
|
|
|
+ }
|
|
|
+ if(titleCopyDec!=""){
|
|
|
+ var listtitle = titleCopyDec;
|
|
|
+ listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
|
|
|
+ hthtml += listtitle;
|
|
|
+ }
|
|
|
+ hthtml +='</a>';
|
|
|
+ if(_bidamount && !isNaN(_bidamount)){
|
|
|
+ _bidamount = parseInt(_bidamount)/10000;
|
|
|
+ hthtml += '<span class="priceStyle">'+_bidamount+'万元中标</span>';
|
|
|
+ }
|
|
|
+ hthtml +='</div></div>';
|
|
|
+ $(".animathistory_ent .htcontent").append(hthtml);
|
|
|
+ }
|
|
|
+ $(".htlist").find("a").mouseover(function(){
|
|
|
+ $(this).find("span").css("color","#fe7379");
|
|
|
+ })
|
|
|
+ $(".htlist").find("a").mouseout(function(){
|
|
|
+ $(this).find("span").css("color","#2cb7ca");
|
|
|
+ })
|
|
|
+ });
|
|
|
+}
|
|
|
+//
|
|
|
+var thishtlists_hasLoad = false;
|
|
|
+var thishtlists = function(){
|
|
|
+ if (thishtlists_hasLoad){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var _id = goTemplateData.params.obj._id;
|
|
|
+ var projectname = projectName;
|
|
|
+ var projectcode = goTemplateData.params.obj.projectcode;
|
|
|
+ $.post("/front/pcAllNotice",{id:_id,projectname:projectname,projectcode:projectcode},function(D){
|
|
|
+ thishtlists_hasLoad=true;
|
|
|
+ var htdata = D.data["res"]
|
|
|
+ if(htdata&&htdata.length>0){
|
|
|
+ var htlist = D.data["res"];
|
|
|
+ var hthtml = '';
|
|
|
+ var myflag = true;
|
|
|
+ for(var i in htlist){
|
|
|
+ var listone = htlist[i]
|
|
|
+ var httime = listone["l_publishtime"];
|
|
|
+ var mytime = goTemplateData.params.obj.publishtime;
|
|
|
+ if(httime>mytime){
|
|
|
+ hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
|
|
|
+ if(htdiff!=""&&htdiff!=0){
|
|
|
+ var htdiff = timeDiff(new Date(Number(httime+"000")));
|
|
|
+ hthtml += '<span class="noticetime">'+htdiff+'</span>'
|
|
|
+ }else{
|
|
|
+ hthtml += '<span class="noticetime"></span>'
|
|
|
+ }
|
|
|
+ var httype = listone["s_subtype"]
|
|
|
+ if(typeof(httype) == "undefined" || httype == null || httype == ""){
|
|
|
+ httype = listone["s_toptype"]
|
|
|
+ }
|
|
|
+ if(typeof(httype) == "undefined" || httype == null || httype == ""){
|
|
|
+ httype = listone["s_type"];
|
|
|
+ if(httype == "bid"){
|
|
|
+ httype = "中标";
|
|
|
+ }else if(httype == "tender"){
|
|
|
+ httype = "招标";
|
|
|
+ }else{
|
|
|
+ httype = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(httype!=""){
|
|
|
+ hthtml += '<span class="type">'+httype+'</span>'
|
|
|
+ }
|
|
|
+ hthtml += '</div><div class="timeaxis"><span></span></div>'
|
|
|
+ if(typeof(listone["s_eid"])!=""){
|
|
|
+ hthtml += '<div><a target="_blank" href="/article/content/'+listone["s_eid"]+'.html">'
|
|
|
+ }else{
|
|
|
+ hthtml += '<div><a target="_blank" href="#">'
|
|
|
+ }
|
|
|
+ if(listone["s_title"]!=""){
|
|
|
+ var listtitle = listone["s_title"];
|
|
|
+ listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
|
|
|
+ hthtml += listtitle
|
|
|
+ }
|
|
|
+ hthtml +='</a></div></div>'
|
|
|
+ }else if(httime<=mytime){
|
|
|
+ if(myflag){
|
|
|
+ hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
|
|
|
+ if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
|
|
|
+ hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
|
|
|
+ }else{
|
|
|
+ hthtml += '<span class="noticetime"></span>'
|
|
|
+ }
|
|
|
+ if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
|
|
|
+ hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
|
|
|
+ }
|
|
|
+ hthtml += '</div><div class="timeaxis"><span></span></div>'
|
|
|
+ if(_id){
|
|
|
+ hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
|
|
|
+ }else{
|
|
|
+ hthtml += '<div><a target="_blank" href="#">'
|
|
|
+ }
|
|
|
+ if(titleCopyDec!=""){
|
|
|
+ var listtitle = titleCopyDec;
|
|
|
+ listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
|
|
|
+ hthtml += listtitle
|
|
|
+ }
|
|
|
+ hthtml +='</a></div></div>'
|
|
|
+ myflag = false;
|
|
|
+ }
|
|
|
+ hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
|
|
|
+ if(htdiff!=""&&httime!=0){
|
|
|
+ var htdiff = timeDiff(new Date(Number(httime+"000")));
|
|
|
+ hthtml += '<span class="noticetime">'+htdiff+'</span>'
|
|
|
+ }else{
|
|
|
+ hthtml += '<span class="noticetime"></span>'
|
|
|
+ }
|
|
|
+ var httype = listone["s_subtype"]
|
|
|
+ if(typeof(httype) == "undefined" || httype == null || httype == ""){
|
|
|
+ httype = listone["s_toptype"]
|
|
|
+ }
|
|
|
+ if(typeof(httype) == "undefined" || httype == null || httype == ""){
|
|
|
+ httype = listone["s_type"];
|
|
|
+ if(httype == "bid"){
|
|
|
+ httype = "中标";
|
|
|
+ }else if(httype == "tender"){
|
|
|
+ httype = "招标";
|
|
|
+ }else{
|
|
|
+ httype = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(httype!=""){
|
|
|
+ hthtml += '<span class="type">'+httype+'</span>'
|
|
|
+ }
|
|
|
+ hthtml += '</div><div class="timeaxis"><span></span></div>'
|
|
|
+ if(typeof(listone["s_eid"])!=""){
|
|
|
+ hthtml += '<div><a target="_blank" href="/article/content/'+listone["s_eid"]+'.html">'
|
|
|
+ }else{
|
|
|
+ hthtml += '<div><a target="_blank" href="#">'
|
|
|
+ }
|
|
|
+ if(listone["s_title"]!=""){
|
|
|
+ var listtitle = listone["s_title"];
|
|
|
+ listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
|
|
|
+ hthtml += listtitle
|
|
|
+ }
|
|
|
+ hthtml +='</a></div></div>'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(myflag){
|
|
|
+ hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
|
|
|
+ if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
|
|
|
+ hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
|
|
|
+ }else{
|
|
|
+ hthtml += '<span class="noticetime"></span>'
|
|
|
+ }
|
|
|
+ if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
|
|
|
+ hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
|
|
|
+ }
|
|
|
+ hthtml += '</div><div class="timeaxis"><span></span></div>'
|
|
|
+ if(_id){
|
|
|
+ hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
|
|
|
+ }else{
|
|
|
+ hthtml += '<div><a target="_blank" href="#">'
|
|
|
+ }
|
|
|
+ if(titleCopyDec!=""){
|
|
|
+ var listtitle = titleCopyDec;
|
|
|
+ listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
|
|
|
+ hthtml += listtitle
|
|
|
+ }
|
|
|
+ hthtml +='</a></div></div>'
|
|
|
+ myflag = false;
|
|
|
+ }
|
|
|
+ $(".animathistory .htcontent").append(hthtml);
|
|
|
+ }else{
|
|
|
+ var hthtml = '<div class="htlist"><div style="width: 80px;text-align: right;">'
|
|
|
+ if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
|
|
|
+ hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
|
|
|
+ }else{
|
|
|
+ hthtml += '<span class="noticetime"></span>'
|
|
|
+ }
|
|
|
+ if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
|
|
|
+ hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
|
|
|
+ }
|
|
|
+ hthtml += '</div><div class="timeaxis"><span></span></div>'
|
|
|
+ if(_id){
|
|
|
+ hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
|
|
|
+ }else{
|
|
|
+ hthtml += '<div><a target="_blank" href="#">'
|
|
|
+ }
|
|
|
+ if(titleCopyDec!=""){
|
|
|
+ var listtitle = titleCopyDec;
|
|
|
+ listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
|
|
|
+ hthtml += listtitle
|
|
|
+ }
|
|
|
+ hthtml +='</a></div></div>'
|
|
|
+
|
|
|
+ $(".animathistory .htcontent").append(hthtml);
|
|
|
+ }
|
|
|
+ $(".htlist").find("a").mouseover(function(){
|
|
|
+ $(this).find("span").css("color","#fe7379");
|
|
|
+ })
|
|
|
+ $(".htlist").find("a").mouseout(function(){
|
|
|
+ $(this).find("span").css("color","#2cb7ca");
|
|
|
+ })
|
|
|
+ });
|
|
|
+}
|
|
|
+var htclosed = function(){
|
|
|
+ $(".animathistory").fadeOut(1000);
|
|
|
+}
|
|
|
+var htclosed_ent = function(){
|
|
|
+ $(".animathistory_ent").fadeOut(1000);
|
|
|
+}
|
|
|
+var publishtime = goTemplateData.params.obj.publishtime;
|
|
|
+var type = goTemplateData.params.obj.subtype;
|
|
|
+var area = goTemplateData.params.obj.area;
|
|
|
+//var industry = goTemplateData.params.obj.industry;
|
|
|
+var industry = getQueryString("industry");
|
|
|
+var subscopeclass = goTemplateData.params.obj.s_subscopeclass;
|
|
|
+var buyerclass =goTemplateData.params.obj.buyerclass;
|
|
|
+
|
|
|
+if (area !="" && area != "A"){
|
|
|
+ $(".com-statusbar").append('<span class="com-area"><a href="/list/area/'+goTemplateData.params.obj.areaadd+'.html">'+area+'</a></span>');
|
|
|
+}
|
|
|
+if(typeof(type) == "undefined" || type == null || type == ""){
|
|
|
+ type = goTemplateData.params.obj.toptype;
|
|
|
+}
|
|
|
+if(typeof(type) == "undefined" || type == null || type == ""){
|
|
|
+ type = goTemplateData.params.obj.type;
|
|
|
+ if(type == "bid"){
|
|
|
+ type = "中标";
|
|
|
+ }else if(type == "tender"){
|
|
|
+ type = "招标";
|
|
|
+ }else{
|
|
|
+ type = "";
|
|
|
+ }
|
|
|
+}
|
|
|
+if(typeof(type) != "undefined" && type != null && type != ""){
|
|
|
+ $(".com-statusbar").append('<span class="com-type"><a href="/list/stype/'+goTemplateData.params.obj.stypeadd+'.html">'+type+'</a></span>');
|
|
|
+}
|
|
|
+//
|
|
|
+if(industry && industry!="undefined"){
|
|
|
+ $(".com-statusbar").append('<span class="com-industry"><a href="/list/industry/'+goTemplateData.params.obj.indadd+'.html">'+industry+'</a></span>');
|
|
|
+}else if(subscopeclass){
|
|
|
+ var suclass = subscopeclass.split(",")[0];
|
|
|
+ $(".com-statusbar").append('<span class="com-industry"><a href="/list/industry/'+goTemplateData.params.obj.indadd+'.html">'+suclass.split("_")[0]+'</a></span>');
|
|
|
+}
|
|
|
+//
|
|
|
+if (goTemplateData.params.isVip || goTemplateData.params.isMember || goTemplateData.params.isEntniche){
|
|
|
+ if(buyerclass){
|
|
|
+ $(".com-statusbar").append('<span class="com-buyerclass"><a>'+buyerclass+'</a></span>');
|
|
|
+ }
|
|
|
+}
|
|
|
+var bidamount_class=goTemplateData.params.obj.bidamount
|
|
|
+var budget_class=goTemplateData.params.obj.budget
|
|
|
+var amount=getacount(bidamount_class,budget_class)
|
|
|
+if (amount!=""){
|
|
|
+ $(".com-statusbar").append('<span class="com-amount"><a>'+conversionMoeny(amount)+'</a></span>');
|
|
|
+}
|
|
|
+//
|
|
|
+if(publishtime != ""){
|
|
|
+ var diff = utils.dateFromNow(Number(publishtime+"000"));
|
|
|
+ if(diff != null){
|
|
|
+ $(".com-statusbar").append('<span class="com-time"><i class="glyphicon bofangjilu"></i>'+diff+'</span>');
|
|
|
+ }
|
|
|
+}
|
|
|
+var upno = goTemplateData.params.obj.i_upno || 0
|
|
|
+var downno = goTemplateData.params.obj.i_downno || 0
|
|
|
+var cookieup = "";
|
|
|
+var cookiedown = "";
|
|
|
+var isReqing = false;
|
|
|
+cookiedown=$.cookie("down" + goTemplateData.params.obj._id);
|
|
|
+cookieup=$.cookie("up" + goTemplateData.params.obj._id);
|
|
|
+var cookieID = $.cookie("id" + goTemplateData.params.obj._id)
|
|
|
+if (cookieID != null && cookieID == id){
|
|
|
+ if(cookieup == "T"){
|
|
|
+ $(".jyuseless").removeClass("hidden");
|
|
|
+ $(".jyuseful").addClass("hidden");
|
|
|
+ }else if(cookiedown == "T"){
|
|
|
+ $(".jyuseful").removeClass("hidden");
|
|
|
+ $(".jyuseless").addClass("hidden");
|
|
|
+ }
|
|
|
+}
|
|
|
+$(".jyuseful").click(function(){
|
|
|
+ upordown("up");
|
|
|
+});
|
|
|
+$(".jyuseless").click(function(){
|
|
|
+ upordown("down");
|
|
|
+});
|
|
|
+//
|
|
|
+function upordown(type){
|
|
|
+ if(isReqing){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var aos = 0;
|
|
|
+ var aosup = 0;
|
|
|
+ var aosdown = 0;
|
|
|
+ cookiedown=$.cookie("down" + goTemplateData.params.obj._id);
|
|
|
+ cookieup=$.cookie("up" + goTemplateData.params.obj._id);
|
|
|
+ var cookieID = $.cookie("id" + goTemplateData.params.obj._id)
|
|
|
+ var praflag = false;
|
|
|
+ if (cookieID != null && cookieID == id){
|
|
|
+ if(type == "up"){
|
|
|
+ if(cookieup == "F"&& cookiedown == "T"){
|
|
|
+ cookieup = "T";
|
|
|
+ cookiedown = "F";
|
|
|
+ upno = Number(upno)+1;
|
|
|
+ $(".jyuseful span").html(upno);
|
|
|
+ downno = Number(downno)-1;
|
|
|
+ $(".jyuseless span").html(downno);
|
|
|
+ aosup = 1;
|
|
|
+ aosdown = -1;
|
|
|
+ praflag = true;
|
|
|
+ $(".jyuseless").removeClass("hidden");
|
|
|
+ $(".jyuseful").addClass("hidden");
|
|
|
+ }else if(cookieup == "T"){
|
|
|
+ cookieup = "F";
|
|
|
+ upno = Number(upno)-1;
|
|
|
+ $(".jyuseful span").html(upno);
|
|
|
+ aosup = -1;
|
|
|
+ praflag = true;
|
|
|
+ $(".jyuseless").addClass("hidden");
|
|
|
+ $(".jyuseful").removeClass("hidden");
|
|
|
+ }else if(cookieup == "F"&& cookiedown == "F"){
|
|
|
+ cookieup = "T";
|
|
|
+ upno = Number(upno)+1;
|
|
|
+ $(".jyuseful span").html(upno);
|
|
|
+ aosup = 1;
|
|
|
+ praflag = true;
|
|
|
+ $(".jyuseless").removeClass("hidden");
|
|
|
+ $(".jyuseful").addClass("hidden");
|
|
|
+ }
|
|
|
+ }else if(type == "down"){
|
|
|
+ if(cookieup == "T"&& cookiedown == "F"){
|
|
|
+ cookiedown = "T";
|
|
|
+ cookieup = "F";
|
|
|
+ upno = Number(upno)-1;
|
|
|
+ $(".jyuseful span").html(upno);
|
|
|
+ downno = Number(downno)+1;
|
|
|
+ $(".jyuseless span").html(downno);
|
|
|
+ aosup = -1;
|
|
|
+ aosdown = 1;
|
|
|
+ praflag = true;
|
|
|
+ $(".jyuseless").addClass("hidden");
|
|
|
+ $(".jyuseful").removeClass("hidden");
|
|
|
+ }else if(cookiedown == "T"){
|
|
|
+ cookiedown = "F";
|
|
|
+ downno = Number(downno)-1;
|
|
|
+ $(".jyuseless span").html(downno);
|
|
|
+ aosdown = -1;
|
|
|
+ praflag = true;
|
|
|
+ $(".jyuseful").addClass("hidden");
|
|
|
+ $(".jyuseless").removeClass("hidden");
|
|
|
+ }else if(cookieup == "F"&& cookiedown == "F"){
|
|
|
+ cookiedown = "T";
|
|
|
+ downno = Number(downno)+1;
|
|
|
+ $(".jyuseless span").html(downno);
|
|
|
+ aosdown = 1;
|
|
|
+ praflag = true;
|
|
|
+ $(".jyuseful").removeClass("hidden");
|
|
|
+ $(".jyuseless").addClass("hidden");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(praflag){
|
|
|
+ isReqing = true;
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/swordfish/praise',
|
|
|
+ data:{type:type,aosup:aosup,aosdown:aosdown,id:goTemplateData.params.obj._id},
|
|
|
+ cache:false,
|
|
|
+ dataType:'json',
|
|
|
+ success:function(data){
|
|
|
+ if(data.flag == "T"){
|
|
|
+ $.cookie("up" + goTemplateData.params.obj._id,'', { expires: -1 })
|
|
|
+ $.cookie("down" + goTemplateData.params.obj._id,'', { expires: -1 })
|
|
|
+ $.cookie("up" + goTemplateData.params.obj._id,cookieup,{expires:300});
|
|
|
+ $.cookie("down" + goTemplateData.params.obj._id,cookiedown,{expires:300});
|
|
|
+ praflag = false;
|
|
|
+ }
|
|
|
+ setTimeout(function(){
|
|
|
+ isReqing = false;
|
|
|
+ },500);
|
|
|
+ },
|
|
|
+ error: function(){
|
|
|
+ isReqing = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ cookieup = "F";
|
|
|
+ cookiedown = "F";
|
|
|
+ if (type == "up"){
|
|
|
+ cookieup = "T";
|
|
|
+ upno = Number(upno)+1;
|
|
|
+ $(".jyuseful span").html(upno);
|
|
|
+ praflag = true;
|
|
|
+ aosup = 1;
|
|
|
+ $(".jyuseless").removeClass("hidden");
|
|
|
+ $(".jyuseful").addClass("hidden");
|
|
|
+ }else if (type == "down"){
|
|
|
+ cookiedown = "T";
|
|
|
+ downno = Number(downno)+1;
|
|
|
+ $(".jyuseless span").html(downno);
|
|
|
+ praflag = true;
|
|
|
+ aosdown = 1;
|
|
|
+ $(".jyuseless").addClass("hidden");
|
|
|
+ $(".jyuseful").removeClass("hidden");
|
|
|
+ }
|
|
|
+ if(praflag){
|
|
|
+ isReqing = true;
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/swordfish/praise',
|
|
|
+ data:{type:type,aosup:aosup,aosdown:aosdown,id:goTemplateData.params.obj._id},
|
|
|
+ cache:false,
|
|
|
+ dataType:'json',
|
|
|
+ success:function(data){
|
|
|
+ if(data.flag == "T"){
|
|
|
+ $.cookie("up" + goTemplateData.params.obj._id,cookieup,{expires:300});
|
|
|
+ $.cookie("down" + goTemplateData.params.obj._id,cookiedown,{expires:300});
|
|
|
+ $.cookie("id" + goTemplateData.params.obj._id,id,{expires:300});
|
|
|
+ praflag = false;
|
|
|
+ }
|
|
|
+ setTimeout(function(){
|
|
|
+ isReqing = false;
|
|
|
+ },500);
|
|
|
+ },
|
|
|
+ error: function(){
|
|
|
+ isReqing = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+function getQueryString(name){
|
|
|
+ var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
|
|
|
+ var r = window.location.search.substr(1).match(reg);
|
|
|
+ if(r != null)
|
|
|
+ return decodeURIComponent(r[2]);
|
|
|
+ return "";
|
|
|
+}
|
|
|
+function getacount(bidamount,budget){
|
|
|
+ if(typeof(bidamount) != "undefined" && bidamount != null && bidamount != ""){
|
|
|
+ return bidamount
|
|
|
+ }
|
|
|
+ if(typeof(budget) != "undefined" && budget != null && budget != ""){
|
|
|
+ return budget
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+//金额转化 金额:0-万元以下单位为元 ,万元以上至亿元以下单位为万元 ,亿元以上单位为亿元。保留 小数点后 2 位,不进行四舍五入。
|
|
|
+function conversionMoeny(money){
|
|
|
+ var m = ""+money;
|
|
|
+ var m_arr = m.split(".")
|
|
|
+ var m_1 = m_arr[0]
|
|
|
+ var len_m1 = m_1.length;
|
|
|
+ if (len_m1 >= 9 ){
|
|
|
+ m = m_1.substring(0,len_m1-8) + "." + m_1.substring(len_m1-8,len_m1-6) + "亿元"
|
|
|
+ } else if (len_m1 >= 5) {
|
|
|
+ m =m_1.substring(0,len_m1-4) + "." + m_1.substring(len_m1-4,len_m1-2) + "万元"
|
|
|
+ } else {
|
|
|
+ if(m_arr.length == 1) {
|
|
|
+ return m + ".00元"
|
|
|
+ }
|
|
|
+ var m_2 = m_arr[1]
|
|
|
+ if (m_2.length > 1) {
|
|
|
+ m_2 = m_2.substring(0,2)
|
|
|
+ } else {
|
|
|
+ m_2 = m_2.substring(0,1) + "0"
|
|
|
+ }
|
|
|
+ m = m_1 + "." + m_2 + "元"
|
|
|
+ }
|
|
|
+ return m
|
|
|
+}
|
|
|
+function fromwhere(text){
|
|
|
+ var ad="pc_articel_";
|
|
|
+ if (getinfotype(subtype)=="拟建项目"){
|
|
|
+ ad+="nj"
|
|
|
+ }
|
|
|
+ if (getinfotype(subtype)=="招标公告"){
|
|
|
+ ad+="zb"
|
|
|
+ }
|
|
|
+ if (getinfotype(subtype)=="中标公告"){
|
|
|
+ ad+="win"
|
|
|
+ }
|
|
|
+ if (getinfotype(subtype)=="其他"){
|
|
|
+ ad+="qt"
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,zb_adv)!=-1){
|
|
|
+ ad+="_zb_"+(jQuery.inArray(text,zb_adv)+1);
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,win_adv)!=-1){
|
|
|
+ ad+="_win_"+(jQuery.inArray(text,win_adv)+1);
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,any_adv)!=-1){
|
|
|
+ ad+="_sj_"+(jQuery.inArray(text,any_adv)+1);
|
|
|
+ }
|
|
|
+ if (jQuery.inArray(text,nj_adv)!=-1){
|
|
|
+ ad+="_nj_"+(jQuery.inArray(text,nj_adv)+1);
|
|
|
+ }
|
|
|
+ return ad
|
|
|
+}
|
|
|
+
|
|
|
+// 附件下载
|
|
|
+function goDownload(url) {
|
|
|
+ if (!loginflag) {
|
|
|
+ openLoginDig()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 免费用户
|
|
|
+ if (window.isFree) {
|
|
|
+ // 判断有无体验过 0:未体验过
|
|
|
+ if (window.freeFile == 0) {
|
|
|
+ // 判断有无留过资 且未体验过 - 去留资
|
|
|
+ vm.source = 'article_attach_freeuser'
|
|
|
+ vm.calcTitleText('article_attach_freeuser')
|
|
|
+ vm.showForm = true
|
|
|
+ vm.getOldInfo()
|
|
|
+ // vm.isNeedSubmit('article_attach_freeuser', function() {})
|
|
|
+ } else if (window.freeFile > 0 ){
|
|
|
+ // 留过资 更新下载次数 进入附件下载页面
|
|
|
+ location.href = url
|
|
|
+ } else {
|
|
|
+ // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
|
|
|
+ bidVue.$alert('您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '去开通',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonClass: 'custom-cancel-btn'
|
|
|
+ }).then(function(){
|
|
|
+ location.href = '/swordfish/page_big_pc/free/svip/buy'
|
|
|
+ }).catch(function(){});
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 付费用户
|
|
|
+ // 大会员用户 有下载权限
|
|
|
+ if (window.memberPower.indexOf(3) > -1) {
|
|
|
+ location.href = url
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 超级订阅用户
|
|
|
+ if (window.vipStatus > 0) {
|
|
|
+ // 是新超级订阅用户
|
|
|
+ if (window.viper) {
|
|
|
+ // 有下载次数
|
|
|
+ if (window.fileNum > 0 ) {
|
|
|
+ location.href = url
|
|
|
+ } else {
|
|
|
+ // 次数用完提醒联系客服
|
|
|
+ bidVue.$confirm('您本月查看机会已经消耗完毕,如需要更多服务,请前往联系客服。', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '取消',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-cancel-btn',
|
|
|
+ cancelButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonText: '联系客服'
|
|
|
+ }).then(function(data){
|
|
|
+
|
|
|
+ }).catch(function(){
|
|
|
+ $('.open-customer').trigger('click')
|
|
|
+ $('body').trigger('click')
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 老超级订阅用户 提醒升级
|
|
|
+ bidVue.$alert('对不起,暂无权限,您可升级超级订阅解锁附件下载', '升级超级订阅', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '前往升级',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonClass: 'custom-cancel-btn'
|
|
|
+ }).then(function(){
|
|
|
+ location.href = '/swordfish/page_big_pc/free/svip/buy?type=upgrade'
|
|
|
+ }).catch(function(){});
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 是大会员自定义版本没有下载权限 或 非超级订阅的商机管理用户 (弹框提醒联系客服)
|
|
|
+ var memberNoVip = (window.memberStatus > 0 && window.memberPower.indexOf(3) == -1) && !(window.vipStatus > 0 && window.viper)
|
|
|
+ if (memberNoVip || (window.vipStatus <=0 && window.entniche)) {
|
|
|
+ bidVue.$alert('对不起,暂无权限,请联系客服', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '我知道了',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//超级订阅附件下载
|
|
|
+function cjdyDownload (fname) {
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ //url:'/publicapply/attachment/get',
|
|
|
+ url:'/jypay/resourcePack/consumePack',
|
|
|
+ data:{
|
|
|
+ id:goTemplateData.params.obj._id,
|
|
|
+ productName:"附件下载包",
|
|
|
+ platform:"PC",
|
|
|
+ fileName:fname,
|
|
|
+ title:goTemplateData.params.obj.title
|
|
|
+},
|
|
|
+ success:function(data){
|
|
|
+ if(data){
|
|
|
+ if (data.r&&data.r.code&&data.r.code<0&&window.vipStatus>0){
|
|
|
+ // 次数用完提醒去充值
|
|
|
+ bidVue.$confirm('您本月附件下载机会已消耗完毕,如需下载更多附件,请前往充值。', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '立即充值',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonClass: 'custom-cancel-btn',
|
|
|
+ cancelButtonText: '取消'
|
|
|
+ }).then(function(data){
|
|
|
+ location.href = '/swordfish/page_big_pc/free/filePack/buy'
|
|
|
+ }).catch(function(){
|
|
|
+ //$('.open-customer').trigger('click')
|
|
|
+ //$('body').trigger('click')
|
|
|
+ });
|
|
|
+ }else if ((data.m && data.m!="")||data.r["downUrl"]==undefined||data.r["downUrl"]==""){
|
|
|
+ bidVue.$confirm('附件下载异常,请前往联系客服。', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '取消',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-cancel-btn',
|
|
|
+ cancelButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonText: '联系客服'
|
|
|
+ }).then(function(data){
|
|
|
+
|
|
|
+ }).catch(function(){
|
|
|
+ $('.open-customer').trigger('click')
|
|
|
+ $('body').trigger('click')
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ if(data.r&&fname == data.r["fileName"]){
|
|
|
+ if (!data.r["isExists"]){
|
|
|
+ $(".file-count").text($(".file-count").text()-1);
|
|
|
+ }
|
|
|
+ location.href = data.r["downUrl"]
|
|
|
+ //goDownload(data.r["downUrl"])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+});
|
|
|
+}
|
|
|
+window.collectSubmitCallback = function (source, data) {
|
|
|
+ if (source === 'article_attach_freeuser') {
|
|
|
+ checkBigStatus()
|
|
|
+ }
|
|
|
+}
|
|
|
+// 获取附件内容
|
|
|
+function getFileData () {
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/bigmember/attachment/get',
|
|
|
+ data:{
|
|
|
+ infoId:goTemplateData.params.obj._id
|
|
|
+},
|
|
|
+ success:function(data){
|
|
|
+ // TODO 留资判断
|
|
|
+ if(data.data && data.data.attachment !=null && data.data.attachment.length!==0){
|
|
|
+ var html = ''
|
|
|
+ for(var i=0;i<data.data.attachment.length;i++) {
|
|
|
+ // html += "<div class='downs'>"+"<a class='menu_list' style='text-decoration:underline;color: #2CB7CA' onclick='goDownload(\""+data.data.attachment[i].downurl+"\")'>"+(i+1)+"."+data.data.attachment[i].filename+"</a></div>"
|
|
|
+ html += "<div class='downs'>"+"<a class='menu_list' style='text-decoration:underline;color: #2CB7CA'>"+(i+1)+"."+data.data.attachment[i].filename+"</a></div>"
|
|
|
+
|
|
|
+ }
|
|
|
+ if(html!==""){
|
|
|
+ $("#attach-list").css("display","").find(".download-list").html(html)
|
|
|
+ }
|
|
|
+ $(".downs").click(function (){
|
|
|
+ var name = $(this).find('a').text()
|
|
|
+ var fname = name.replace(/^\d+./, '')
|
|
|
+ if(window.isFree){
|
|
|
+ if(window.freeFile == 0){
|
|
|
+ // 判断有无留过资 且未体验过 - 去留资
|
|
|
+ // 弹窗留资弹框,第一个参数为source,第二个是留资成功后是否需要刷新页面 可不传,不传即为不刷新
|
|
|
+ vm.noCallApiFn('article_attach_freeuser', true)
|
|
|
+ }else if (window.freeFile > 0 ){
|
|
|
+ window.freeFile = -1
|
|
|
+ // 留过资 更新下载次数 进入附件下载页面
|
|
|
+ cjdyDownload(fname)
|
|
|
+ }else {
|
|
|
+ // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
|
|
|
+ bidVue.$alert('您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '去开通',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonClass: 'custom-cancel-btn'
|
|
|
+ }).then(function(){
|
|
|
+ location.href = '/swordfish/page_big_pc/free/svip/buy'
|
|
|
+ }).catch(function(){});
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ // 付费用户
|
|
|
+ // 大会员用户 有下载权限
|
|
|
+ if (window.memberPower.indexOf(3) > -1) {
|
|
|
+ cjdyDownload(fname)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 超级订阅用户
|
|
|
+ if (window.vipStatus > 0) {
|
|
|
+ // 是新超级订阅用户
|
|
|
+ if (window.viper) {
|
|
|
+ cjdyDownload(fname)
|
|
|
+ } else {
|
|
|
+ // 老超级订阅用户 提醒升级
|
|
|
+ bidVue.$alert('对不起,暂无权限,您可升级超级订阅解锁附件下载', '升级超级订阅', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '前往升级',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonClass: 'custom-cancel-btn'
|
|
|
+ }).then(function(){
|
|
|
+ location.href = '/swordfish/page_big_pc/free/svip/buy?type=upgrade'
|
|
|
+ }).catch(function(){});
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 是大会员自定义版本没有下载权限 或 非超级订阅的商机管理用户 (弹框提醒联系客服)
|
|
|
+ if ((window.memberStatus > 0 && window.memberPower.indexOf(3) == -1) || (window.vipStatus <=0 && window.entniche)) {
|
|
|
+ bidVue.$alert('对不起,暂无权限,请联系客服', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '我知道了',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }else if(window.memberStatus > 0 && window.memberPower.indexOf(3) == -1){
|
|
|
+ if(window.vipStatus > 0 && window.fileNum >0){
|
|
|
+ $('.super-vip-show').show()
|
|
|
+ cjdyDownload(fname)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // cjdyDownload()
|
|
|
+ })
|
|
|
+ // $(".downs").click(function (){
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ }
|
|
|
+});
|
|
|
+}
|
|
|
+
|
|
|
+// $(".menu_list").click(function (){
|
|
|
+//
|
|
|
+// })
|
|
|
+
|
|
|
+// 根据isAdd接口 展示附件部分dom
|
|
|
+function showFileSomeDom () {
|
|
|
+ // 免费用户展示可下载一次提示(免费用户且没有体验过附件下载权益的展示)
|
|
|
+ if (window.isFree) {
|
|
|
+ if (window.freeFile == 0) {
|
|
|
+ $('.free-download').css('display', 'inline-block')
|
|
|
+ $('.free-go-open').hide()
|
|
|
+ } else {
|
|
|
+ $('.free-go-open').css('display', 'inline-block')
|
|
|
+ $('.free-download').hide()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 新超级订阅用户
|
|
|
+ if (window.vipStatus > 0 && window.viper) {
|
|
|
+ $('.super-vip-show').show()
|
|
|
+ $('.super-vip-show .file-count').html(window.fileNum)
|
|
|
+ $('.recharge-new').unbind("click").bind("click",function(){
|
|
|
+ //超级订阅附件下载立即充值页面
|
|
|
+ window.open("/swordfish/page_big_pc/free/filePack/buy")
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 大会员隐藏次数
|
|
|
+ if(window.memberStatus >0 && window.memberPower.indexOf(3) >= 0){
|
|
|
+ $('.super-vip-show').hide()
|
|
|
+ }
|
|
|
+}
|
|
|
+var isEntnicheNew = goTemplateData.params.isEntnicheNew
|
|
|
+var isHasBuyer = goTemplateData.params.obj.buyer
|
|
|
+console.log(isEntnicheNew, isHasBuyer)
|
|
|
+// 新商机管理用户是否认领该采购单位
|
|
|
+function getClaimStatus() {
|
|
|
+ if (!isEntnicheNew || !isHasBuyer) return
|
|
|
+ var params = {
|
|
|
+ names:goTemplateData.params.obj.buyer
|
|
|
+}
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/entnicheNew/customer/claimcheck',
|
|
|
+ contentType: "application/json",
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(res){
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.iscoll) {
|
|
|
+ $('.claim').addClass('claim-yes').removeClass('claim-no').text('已认领')
|
|
|
+ // 认领
|
|
|
+ $('.claim-yes').unbind('click').click(function() {
|
|
|
+ cancelClaim()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ $('.claim').addClass('claim-no').removeClass('claim-yes').text('认领')
|
|
|
+ // 认领
|
|
|
+ $('.claim-no').unbind('click').click(function(e) {
|
|
|
+ var top = e.target.offsetParent.offsetTop + 50
|
|
|
+ var left = e.target.offsetLeft
|
|
|
+ $('#entNicheTags.tags-box').show().css({'top': top, 'left': left})
|
|
|
+ geEntNicheUserTags()
|
|
|
+ // 点击确定按钮,绑定标签
|
|
|
+ $('#entNicheTags .tags-footer .button-confirm').on('click', function () {
|
|
|
+ if (!$('#entNicheTags.tags-box').is(':hidden')){
|
|
|
+ var lids = ""
|
|
|
+ var lname = ""
|
|
|
+ $('#entNicheTags .tags-item.tags-active').each(function() {
|
|
|
+ if ($(this).attr('data-id')){
|
|
|
+ if(lids != ""){
|
|
|
+ lids += ",";
|
|
|
+ }
|
|
|
+ if(lname != "") {
|
|
|
+ lname+= ",";
|
|
|
+ }
|
|
|
+ lids += $(this).attr('data-id');
|
|
|
+ lname += $(this).text()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let lidArr = []
|
|
|
+ activeTags.forEach(v => {
|
|
|
+ lidArr.push(v.lid)
|
|
|
+ })
|
|
|
+ var params = {
|
|
|
+ name: goTemplateData.params.obj.buyer,
|
|
|
+ mold: 1,
|
|
|
+ D: false,
|
|
|
+ label: lidArr.toString()
|
|
|
+ }
|
|
|
+ console.log(params)
|
|
|
+ // 执行保存绑定标签操作
|
|
|
+ if (params.name !== '') {
|
|
|
+ confirmClaim(params, function(res) {
|
|
|
+ if (res.data) {
|
|
|
+ toastFn('认领成功', 1000)
|
|
|
+ $('.claim').addClass('claim-yes').removeClass('claim-no').text('已认领')
|
|
|
+ getClaimStatus()
|
|
|
+ } else {
|
|
|
+ toastFn(res.error_msg)
|
|
|
+ }
|
|
|
+ $('#entNicheTags .tags-footer .button-cancel').trigger('click')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // confirmClaim()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+// 新商机管理-认领采购单位
|
|
|
+function confirmClaim (params, callback) {
|
|
|
+ if (!isEntnicheNew || !isHasBuyer) return
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/entnicheNew/customer/attention',
|
|
|
+ contentType: "application/json",
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(res){
|
|
|
+ if (res.error_code == 0) {
|
|
|
+ callback && callback(res)
|
|
|
+ } else {
|
|
|
+ console.log(res.error_msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+// 新商机管理-取消认领采购单位
|
|
|
+function cancelClaim() {
|
|
|
+ if (!isEntnicheNew || !isHasBuyer) return
|
|
|
+ var params = {
|
|
|
+ name:goTemplateData.params.obj.buyer,
|
|
|
+ mold: 1,
|
|
|
+ D: true, // false:认领 true:取消认领
|
|
|
+}
|
|
|
+ $.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) {
|
|
|
+ toastFn('已取消认领', 1000)
|
|
|
+ $('.claim').addClass('claim-no').removeClass('claim-yes').text('认领')
|
|
|
+ getClaimStatus()
|
|
|
+ } else {
|
|
|
+ toastFn(res.error_msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+$(function() {
|
|
|
+ getClaimStatus()
|
|
|
+ getFileData();
|
|
|
+ // 定时取login.js里isAdd接口返回的用户身份(暴露给window变量) 取到清除定时器
|
|
|
+ var timer = null
|
|
|
+ clearInterval(timer)
|
|
|
+ timer = setInterval(() => {
|
|
|
+ if (window.isLogin) {
|
|
|
+ //console.log(window.vipStatus, window.isFree,window.freeFile,window.viper, window.entniche, window.memberStatus,window.memberPower,'11')
|
|
|
+ showFileSomeDom()
|
|
|
+ clearInterval(timer)
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
+ // 下载提示
|
|
|
+ $('.file-icon-help').click(function() {
|
|
|
+ bidVue.$alert('点击附件即为下载,系统会扣除当月附件下载个数;每月1号上月余额清零重新计算,请合理使用。', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '我知道了',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ confirmButtonClass: 'custom-confirm-btn'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ // 免费下载一次点击
|
|
|
+ $('.free-download').click(function() {
|
|
|
+ // 弹窗留资弹框,第一个参数为source,第二个是留资成功后是否需要刷新页面 可不传,不传即为不刷新
|
|
|
+ vm.noCallApiFn('article_attach_freeuser', true)
|
|
|
+ })
|
|
|
+ // 控制正文下table里没有内容 但有标签时取消其样式
|
|
|
+ $('.com-detail table').each(function(){
|
|
|
+ var tableText = $(this).text()
|
|
|
+ if (tableText.trim() == '') {
|
|
|
+ $(this).children().children().children('td').css({
|
|
|
+ 'padding': '0'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+})
|