var participanttype = ""; // 市场成员类型 /** * 初始化参数 */ function init() { // if ("91812" == para_value) { // document.getElementById("content").style.display = "none"; // } else { // document.getElementById("content1").style.display = "none"; // } initParams(); // 获取地址栏传过来的参 } /** * 点击下一步 */ function next() { if($('#u4').attr('checked') == 'checked') { if(participanttype == "0" || participanttype == "2") { window.location.href = "registAccount/registAccount.jsp?participantType=" + participanttype; } else if (participanttype == "99") {//能源消纳 $.ajax({ url : "/pmos/rest/renewable/energySubject?participantType=" + participanttype, type : "GET", dataType : "json", success : function(rc) { window.location.href = "/RenewableEnergySubject/index/registAccount/registAccount.jsp?participantType=" + participanttype; }, error : function(event, request, settings) { top.$.messager.alert("消息", "消纳责任主体生成失败!"); } }); } else if(participanttype == "6") {//售电公司 if(registOnNewPlatform == "1") { window.location.href = "registSdgsOnNewPlatform.jsp"; } else { $.ajax({ url: "/pmos/rest/regist/marketparticipant?participantType=" + participanttype, type: "GET", dataType: "json", success: function(rc) { var flag = rc.resultValue; if(flag == 'legacy') { window.location.href = "../index/participantInfosdgs.jsp?participantType=" + participanttype; } else { window.location.href = "registTop.jsp" } }, error: function(event, request, settings) { top.$.messager.alert('消息', '市场成员信息生成失败'); } }); } } // location = "selectParticipantType.jsp"; } else { $.messager.alert("提示", "请选择同意条款!", "warning"); } } var mark = 0; function ty() { if("91812" == para_value) { var clientHeight = document.getElementById('content1').clientHeight; var scrollTop = document.getElementById('content1').scrollTop; var scrollHeight = document.getElementById('content1').scrollHeight; if(clientHeight + scrollTop < scrollHeight) { if(mark == 0) { $.messager.alert("提示", "请完整阅读平台使用协议!", "warning"); $('#u4').removeAttr("checked"); } } else { mark = 1; } } } /** * 下载发电企业信用承诺书 */ function downLoad() { $.ajax({ url: "/pmos/rest/historical/queryFile", type: "post", dataType: "json", data: queryCondition("guid=" + guid), success: function(data, request, settings) { if(data.successful) { var itemData = data.resultValue.items; for(var i = 0; i < itemData.length; i++) { var tableName = itemData[i][0]; var pkVal = itemData[i][1]; var colName = itemData[i][2]; var fileName = itemData[i][3]; var option = "option=download&uploadMode=blob&bName=" + tableName + "&pkVal=" + pkVal + "&cName=" + colName + "&fileName=" + fileName; var url = '/ETradePublicUtils/easyUiDataFileUploadServlet?' + encodeURI(option); $("#hidden_frame")[0].src = url; } } }, error: function(event, request, settings) { top.$.messager.alert('消息', '文件下载失败'); return true; } }); } /** * 获取地址栏传过来的参 */ function initParams() { var Params = window.location.search; if(Params != null && Params.length > 0) { var ppp = Params.split("&"); for(i = 0; i < ppp.length; i++) { if(ppp[i].indexOf("participantType") != -1) { participanttype = ppp[i].substring(ppp[i].indexOf("participantType") + 16, ppp[i].length); } } } if(participanttype == null || participanttype == "") { participanttype = participanttypebase; } }