diff --git a/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js b/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js index d77d9c4c..d9d7edf2 100644 --- a/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js +++ b/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js @@ -118,7 +118,7 @@ function beforeSend() { var zlydbh = $("#TB_ZLYDBH").val(); if (jsbzxybh !== undefined && jsbzxybh !== null) { if (zlydbh !== undefined && zlydbh !== null) { - var JSXYSP = "SELECT JSBZXYBH,ZLYDBH FROM Frm_JiShuXieYiShenPi WHERE JSBZXYBH='" + jsbzxybh.trim() + "' AND ZLYDBH='" + zlydbh.trim() + "' AND WFState = '2'"; + var JSXYSP = "SELECT JSBZXYBH,ZLYDBH FROM Frm_JiShuXieYiShenPi WHERE JSBZXYBH='" + jsbzxybh.trim() + "'AND OID !=" + workid + " AND ZLYDBH='" + zlydbh.trim() + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(JSXYSP); if (isHave.length > 0) { alert("该技术协议编号:“" + jsbzxybh.trim() + "”与质量要点编号:“" + zlydbh.trim() + "”已经发起审批。"); @@ -126,7 +126,7 @@ function beforeSend() { } } else { - var JSXYSP = "SELECT JSBZXYBH,ZLYDBH FROM Frm_JiShuXieYiShenPi WHERE JSBZXYBH='" + jsbzxybh.trim() + "' AND WFState = '2'"; + var JSXYSP = "SELECT JSBZXYBH,ZLYDBH FROM Frm_JiShuXieYiShenPi WHERE JSBZXYBH='" + jsbzxybh.trim() + "' AND OID !=" + workid + " AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(JSXYSP); if (isHave.length > 0) { alert("该技术协议编号:“" + jsbzxybh.trim() + "”已经发起审批。"); @@ -136,7 +136,7 @@ function beforeSend() { } else { if (zlydbh !== undefined && zlydbh !== null) { - var JSXYSP = "SELECT JSBZXYBH,ZLYDBH FROM Frm_JiShuXieYiShenPi WHERE ZLYDBH='" + zlydbh.trim() + "' AND WFState = '2'"; + var JSXYSP = "SELECT JSBZXYBH,ZLYDBH FROM Frm_JiShuXieYiShenPi WHERE ZLYDBH='" + zlydbh.trim() + "' AND OID !=" + workid + " AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(JSXYSP); if (isHave.length > 0) { alert("该质量要点编号:“" + zlydbh.trim() + "”已经发起审批。"); @@ -277,7 +277,7 @@ function beforeSend() { var bh = ccfrom["TB_PC_NO"].value; //大棒轧钢工艺卡 - if (fk_flow == '004') { + if (fk_flow == '004' && nodeID == '401') { var JSXYSP = "SELECT PC_NO FROM Frm_DBZGGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(JSXYSP); if (isHave.length > 0) { @@ -289,7 +289,7 @@ function beforeSend() { } //219钢管厂轧管工艺卡 - if (fk_flow == '013') { + if (fk_flow == '013' && nodeID == '1301') { var GYKSP = "SELECT PC_NO FROM Frm_F219GGCZGGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -298,7 +298,7 @@ function beforeSend() { } } //460钢管厂轧管工艺卡 - if (fk_flow == '015') { + if (fk_flow == '015' && nodeID == '1501') { var GYKSP = "SELECT PC_NO FROM Frm_F460GGCZGGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -307,7 +307,7 @@ function beforeSend() { } } //170钢管厂热处理工艺卡 - if (fk_flow == '014') { + if (fk_flow == '014' && nodeID == '1401') { var GYKSP = "SELECT PC_NO FROM Frm_F170GGCRCLGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -316,7 +316,7 @@ function beforeSend() { } } //170钢管厂轧管工艺卡 - if (fk_flow == '010') { + if (fk_flow == '010' && nodeID == '1001') { var GYKSP = "SELECT PC_NO FROM Frm_F170GGCZGGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -325,7 +325,7 @@ function beforeSend() { } } //扁棒厂轧钢工艺卡 - if (fk_flow == '038') { + if (fk_flow == '038' && nodeID == '3801') { var GYKSP = "SELECT PC_NO FROM FB_STEEL_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -334,7 +334,7 @@ function beforeSend() { } } //小棒厂热处理(调质)工艺卡 - if (fk_flow == '032') { + if (fk_flow == '032' && nodeID == '3201') { var GYKSP = "SELECT PC_NO FROM SS_TEMPER_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -343,7 +343,7 @@ function beforeSend() { } } //大棒厂轧钢工艺卡 - if (fk_flow == '004') { + if (fk_flow == '004' && nodeID == '401') { var GYKSP = "SELECT PC_NO FROM Frm_DBZGGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -352,7 +352,7 @@ function beforeSend() { } } //中棒厂轧钢工艺卡 - if (fk_flow == '019') { + if (fk_flow == '019' && nodeID == '1901') { var GYKSP = "SELECT PC_NO FROM Frm_ZBCZGGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -361,7 +361,7 @@ function beforeSend() { } } //小棒厂轧钢工艺卡 - if (fk_flow == '020') { + if (fk_flow == '020' && nodeID == '2001') { var GYKSP = "SELECT PC_NO FROM Frm_XBCZGGYK WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -370,7 +370,7 @@ function beforeSend() { } } //小棒厂热处理工艺卡 - if (fk_flow == '031') { + if (fk_flow == '031' && nodeID == '3101') { var GYKSP = "SELECT PC_NO FROM SS_HEATT_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -379,7 +379,7 @@ function beforeSend() { } } //特冶厂真空自耗炼钢工艺卡 - if (fk_flow == '047') { + if (fk_flow == '047' && nodeID == '4701') { var GYKSP = "SELECT PC_NO FROM SSP_VIM_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -388,7 +388,7 @@ function beforeSend() { } } //特冶厂电渣炼钢工艺卡 - if (fk_flow == '044') { + if (fk_flow == '044' && nodeID == '4401') { var GYKSP = "SELECT PC_NO FROM SSP_ES_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -397,7 +397,7 @@ function beforeSend() { } } //特冶厂真空感应炼钢工艺卡 - if (fk_flow == '048') { + if (fk_flow == '048' && nodeID == '4801') { var GYKSP = "SELECT PC_NO FROM SSP_VI_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -406,7 +406,7 @@ function beforeSend() { } } //电炉厂连铸炼钢工艺卡 - if (fk_flow == '028') { + if (fk_flow == '028' && nodeID == '2801') { var GYKSP = "SELECT PC_NO FROM EFF_CCS_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -415,7 +415,7 @@ function beforeSend() { } } //电炉厂自耗母材炼钢工艺卡 - if (fk_flow == '046') { + if (fk_flow == '046' && nodeID == '4601') { var GYKSP = "SELECT PC_NO FROM SSP_CBM_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -424,7 +424,7 @@ function beforeSend() { } } //电炉厂电渣母材炼钢工艺卡 - if (fk_flow == '045') { + if (fk_flow == '045' && nodeID == '4501') { var GYKSP = "SELECT PC_NO FROM SSP_EBM_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -433,7 +433,7 @@ function beforeSend() { } } //电炉厂模铸炼钢工艺卡 - if (fk_flow == '043') { + if (fk_flow == '043' && nodeID == '4301') { var GYKSP = "SELECT PC_NO FROM EFF_DCS_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -442,7 +442,7 @@ function beforeSend() { } } //电炉系列连铸工艺卡 - if (fk_flow == '050') { + if (fk_flow == '050' && nodeID == '5001') { var GYKSP = "SELECT PC_NO FROM EFF_CC_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -451,7 +451,7 @@ function beforeSend() { } } //电炉厂钢锭炼钢工艺卡 - if (fk_flow == '023') { + if (fk_flow == '023' && nodeID == '2301') { var GYKSP = "SELECT PC_NO FROM SSP_SIR_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -460,7 +460,7 @@ function beforeSend() { } } //转炉厂炼钢工艺卡 - if (fk_flow == '025') { + if (fk_flow == '025' && nodeID == '2501') { var GYKSP = "SELECT PC_NO FROM CP_SM_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -469,7 +469,7 @@ function beforeSend() { } } //转炉系列连铸工艺卡 - if (fk_flow == '049') { + if (fk_flow == '049' && nodeID == '4901') { var GYKSP = "SELECT PC_NO FROM CS_CC_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -478,7 +478,7 @@ function beforeSend() { } } //锻造厂锻造工艺卡 - if (fk_flow == '024') { + if (fk_flow == '024' && nodeID == '2401') { var GYKSP = "SELECT PC_NO FROM TF_FORGING_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -487,7 +487,7 @@ function beforeSend() { } } //锻造厂热处理工艺卡 - if (fk_flow == '033') { + if (fk_flow == '033' && nodeID == '3301') { var GYKSP = "SELECT PC_NO FROM TF_HEATT_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -496,7 +496,7 @@ function beforeSend() { } } //锻造厂调质工艺卡 - if (fk_flow == '040') { + if (fk_flow == '040' && nodeID == '4001') { var GYKSP = "SELECT PC_NO FROM TF_TEMPER_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -505,7 +505,7 @@ function beforeSend() { } } //锻造厂固溶时效工艺卡 - if (fk_flow == '041') { + if (fk_flow == '041' && nodeID == '4101') { var GYKSP = "SELECT PC_NO FROM TF_SA_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { @@ -514,7 +514,7 @@ function beforeSend() { } } //锻造厂固溶球化退火工艺卡 - if (fk_flow == '062') { + if (fk_flow == '062' && nodeID == '6201') { var GYKSP = "SELECT PC_NO FROM TF_SSA_PC WHERE PC_NO='" + bh + "' AND WFState = '2'"; var isHave = DBAccess.RunSQLReturnTable(GYKSP); if (isHave.length > 0) { diff --git a/CCFlow/CCFlow/WF/CCForm/Ath.js b/CCFlow/CCFlow/WF/CCForm/Ath.js index b0342853..9c43a3d5 100644 --- a/CCFlow/CCFlow/WF/CCForm/Ath.js +++ b/CCFlow/CCFlow/WF/CCForm/Ath.js @@ -640,11 +640,27 @@ function GetSortLenth_FromDB(sort, dbs) { //文件数据流 function GetFileStream(mypk, FK_FrmAttachment) { var Url = ""; + //if (plant == "CCFlow") { + // Url = basePath + "/WF/Comm/ProcessRequest?DoType=HttpHandler&DoMethod=AttachmentUpload_Down&HttpHandlerName=BP.WF.HttpHandler.WF_CCForm&WorkID=" + GetQueryString("WorkID") + "&FK_Node=" + GetQueryString("FK_Node") + "&MyPK=" + mypk; + //} else { + // //按照数据流模式下载。 + // Url = basePath + "/WF/Ath/downLoad.do?MyPK=" + mypk + "&FK_FrmAttachment=" + FK_FrmAttachment; + //} + var nodeID = GetQueryString("FK_Node"); + var workID = GetQueryString("WorkID"); if (plant == "CCFlow") { - Url = basePath + "/WF/Comm/ProcessRequest?DoType=HttpHandler&DoMethod=AttachmentUpload_Down&HttpHandlerName=BP.WF.HttpHandler.WF_CCForm&WorkID=" + GetQueryString("WorkID") + "&FK_Node=" + GetQueryString("FK_Node") + "&MyPK=" + mypk; - } else { - //按照数据流模式下载。 - Url = basePath + "/WF/Ath/downLoad.do?MyPK=" + mypk + "&FK_FrmAttachment=" + FK_FrmAttachment; + var handler = new HttpHandler("BP.WF.HttpHandler.WF_CCForm"); + handler.AddPara("WorkID", workID); + handler.AddPara("FK_Node", nodeID); + handler.AddPara("MyPK", mypk); + var fileUrl = handler.DoMethodReturnString("AttachmentUpload_Down"); + if (typeof fileUrl === "string" && fileUrl.indexOf("/DataUser/") != -1 && fileUrl.indexOf("url@") == 0) { + var url = fileUrl.replace("url@", ""); + //window.open(window.location.origin + url); + return url; + } + SetHref(basePath + "/WF/Comm/ProcessRequest?DoType=HttpHandler&DoMethod=AttachmentUpload_Down&HttpHandlerName=BP.WF.HttpHandler.WF_CCForm&WorkID=" + workID + "&FK_Node=" + nodeID + "&MyPK=" + mypk); + return; } return Url; diff --git a/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm b/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm index 1dc85cbd..fa5c750c 100644 --- a/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm +++ b/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm @@ -114,10 +114,10 @@ var iframes = $(thisForm).find("iframe"); for (var j = 0; j < iframes.length; j++) { - $(iframes[j]).load(function () { - var mainheight = $(this).contents().find("body").height(); - $(this).height(mainheight); - }); + //$(iframes[j]).load(function () { + // var mainheight = $(this).contents().find("body").height() + 15; + // $(this).height(mainheight); + //}); } loadData(group, 1); return; @@ -246,8 +246,8 @@ htm += ''; } else if (list[i].CtrlType == "Ath") { var url = basePath + "/WF/CCForm/Ath.htm?1=1&AthPK=" + list[i].CtrlID + "&OID=" + oid + "&FK_MapData=" + frmID + "&FK_Node=" + GetQueryString("FK_Node") + "&IsReadonly=1"; - htm += '