$(function(){ var titleTableTRDom="",_$w = $(window).width(),_inputW; _inputW = _$w<=640?22:40; var currentChannelCode = $("#currentChannelCode").val(); var parentChannelCode = $("#currentParentChannelCode").val(); var tableheaderList; if(tableData.hasOwnProperty(currentChannelCode)){ tableheaderList = tableData[currentChannelCode].code; } var tableheaderListInfo = []; tableheaderListInfo = tableheaderList?tableheaderList.split(","):[]; $(".selectBox .crm-search-right-top-table tbody").append(''); var baseUrl = '/rcms-external-rest'; var proId = $(".pro-tab-title").attr("data-id"); //当前栏目得id var searchCode = $(".crm-search-text").val(); var condition = {}; var wordList ={}; if(searchCode && searchCode.length>0){ wordList = { partNumber: searchCode, } } function getPushStatus (){ var isPub = $("#isPub").val(); if(isPub == 1 ){ //查已发布 传1 return 1 }else{ //查预览草稿 传0 return 0 } } var dataAddr = { channelId:proId, conditions:condition, words:JSON.stringify(wordList), pageNo:1, pageSize:20, isPublish:getPushStatus() } searchPro(dataAddr); $(".crm-search-but").off().on("click",function(){ searchCode = $(".crm-search-text").val(); var condWrap = $(".crm-cond-wrap"); condition = {}; var wordList ={}; if( parentChannelCode == 'LEDIC' || parentChannelCode == 'photoelectricSensor' ){ wordList = { productModel: searchCode, } }else{ wordList = { partNumber: searchCode, } } for(var i = 0;i '; leftHtml+='
'+ partNumberInfo +' '; if(tabList[i].specification && tabList[i].specification != '[]'){ var indexUrlStr = window.location.protocol+"//"+window.location.host+window.location.pathname var wUrl = removeIndexHtml(indexUrlStr); var inputStr = $(".pdfChannel").val() var itemUrl = JSON.parse(tabList[i].specification); var myurl = itemUrl[0]?itemUrl[0].url:""; var pdfStr = pdfName+","+ wUrl + myurl.slice(1) var pdfPage = inputStr+'?pdfData='+encodeURIComponent(pdfStr) // var itemUrl = JSON.parse(tabList[i].specification); // var myurl = itemUrl[0]?itemUrl[0].url:""; leftHtml+=''; } leftHtml+='
'; leftHtml+=''; } leftTable.html(leftHtml); /*在这里出来表格数据展示循序排序*/ let tabListSortInfo=[]; if(tabList){ var tabListData = JSON.parse(JSON.stringify(tabList)); for(var i = 0;i'+ tabListSortInfoValres +'' } else if(det=="application"){ rightDet+=''+ tabListSortInfoValres +'' } else{ rightDet+=''+ tabListSortInfoValres +'' } } else if(currentChannelCode =='MOSFET05'){ if(det=="vType25"){ rightDet+=''+ tabListSortInfoValres +'' } else{ rightDet+=''+ tabListSortInfoValres +'' } } else if(currentChannelCode =='MOSFET06' || currentChannelCode =='MOSFET06gj' ){ if(det=="vType25" || det == 'vType18' ){ rightDet+=''+ tabListSortInfoValres +'' } else{ rightDet+=''+ tabListSortInfoValres +'' } } else{ rightDet+=''+ tabListSortInfoValres+'' } } } rightList.html(rightDet); $("#pro-page").show(); $("#pro-page").sPage({ page:dataAddr.pageNo,//当前页码,必填 total:totalCountInfo,//数据总条数,必填 pageSize:20,//每页显示多少条数据,默认10条 showTotal:true,//是否显示总条数,默认关闭:false showSkip:false,//是否显示跳页,默认关闭:false showChange:true,//是否显示跳页,默认关闭:false totalTxt:"共{total}页",//数据总条数文字描述,{total}为占位符,默认"共{total}条" showCurNum: "当前{cur}页", noData: false,//没有数据时是否显示分页,默认false不显示,true显示第一页 showPN:true,//是否显示上下翻页,默认开启:true prevPage:"上一页",//上翻页文字描述,默认“上一页” nextPage:"下一页",//下翻页文字描述,默认“下一页” fastForward: 3,//快进快退页数,默认0表示不开启快进快退 backFun:function(nowPage){ dataAddr.pageNo = nowPage; searchPro(dataAddr); } }); } else{ $("#pro-page").hide(); $("#crm-search-right-table").html(""); $("#crm-code").html('
暂无数据!
'); } setTimeout(function(){ $(".crm-other-sub") .off() .on("keyup", function (e) { if (e.keyCode == 13) { $(".crm-search-but").trigger("click"); } }); }) } } }); $.ajax({ // http://rcmsuat.crc.com.cn/rcms-external-rest/content/getValList url:baseUrl+'/content/getValList?'+new Date().getTime(), type:'POST', dataType:'json', data:{ channelId:proId, modelId:$("#modelid").val() }, success:function(data){ /*表格查询条件循序重组*/ // debugger; var rightTable = $("#crm-cond-code"),rightCond = ''; if(data.code=='S1A00000'){ if(!($(".crm-cond-wrap").length!=0)){ let resPonseData = data.data; // console.log("resPonseData",resPonseData) // console.log("tableheaderListInfo-----",tableheaderListInfo) var tabCond ={}; if(tableheaderListInfo){ for(let j=0;j '; rightCond += '
' + '
输入关键字,按回车进行搜索
' }else{ rightCond+='
    '; if(tabCond[cond]){ for(var i = 0;i< (tabCond[cond]).length;i++){ rightCond+='
  • '+ '
  • ' } } rightCond+='
' } rightCond+='
' } rightTable.html(rightCond); setTimeout(function(){ $(".crm-cond-wrap").mCustomScrollbar("destroy"); $(".crm-cond-wrap").mCustomScrollbar({ axis: "y", // axis: "yx", scrollButtons: { enable: false }, // horizontalScroll: true }) },10) } }else{ console.log(data.msg); } } }) } } function checkOrNot(){ var check = $("#crm-check-all"); check.on("click",function(){ if($(this).is(":checked")){ $('.crm-left-check').each(function(){ $(this).prop("checked",true); }); } else{ $('.crm-left-check').each(function(){ $(this).prop("checked",false); }); } }); } function getData(){ var el = document.getElementsByName("cbox"); var url = $("#serviceandSupportId").val(); var urlData="?ud="; for(var i=0; i'+ trDom.partNumber +'' $(".crm-search-right .crm-search-right-top").html(creatTable(trDom)) setTimeout(function(){ checkOrNot(); },50) } $(".crm-search-left-top .titleTable tbody").html(titleTableTRDom) })