From 6397bd05a1ef803a6a6171720513d1493d769e37 Mon Sep 17 00:00:00 2001 From: sunliang <593170460@qq.com> Date: Mon, 15 Jul 2024 18:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A2=AB=E5=A7=94=E6=89=98?= =?UTF-8?q?=E4=BA=BA=E6=97=A0=E6=B3=95=E5=AE=A1=E6=89=B9=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8F=91=E8=B5=B7=E5=AE=A1=E6=89=B9=E5=90=8E=E6=92=A4?= =?UTF-8?q?=E5=9B=9E=E6=97=A0=E6=B3=95=E5=86=8D=E6=AC=A1=E5=8F=91=E8=B5=B7?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CCFlow/DataUser/JSLibData/MyFlowPublic.js | 60 +++++++++---------- CCFlow/CCFlow/WF/CCForm/Ath.js | 24 ++++++-- CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm | 12 ++-- .../CCForm/JS/FileUpload/css/fileUpload.css | 4 +- .../CCFlow/WF/Scripts/layui/style/admin.css | 5 +- CCFlow/Components/BP.WF/WF/WorkNode.cs | 2 +- 6 files changed, 62 insertions(+), 45 deletions(-) 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 += '
'; - htm += ''; + htm += '
'; + htm += ''; htm += '
'; } else if (list[i].CtrlType == "ChapterFrmLinkFrm") { var url = basePath + "/WF/CCForm/Frm.htm?IsReadonly=1&FrmID=" + list[i].CtrlID + "&OID=" + oid + "&FK_MapData=" + list[i].CtrlID + "&FK_Node=" + GetQueryString("FK_Node"); diff --git a/CCFlow/CCFlow/WF/CCForm/JS/FileUpload/css/fileUpload.css b/CCFlow/CCFlow/WF/CCForm/JS/FileUpload/css/fileUpload.css index 52f88db6..2f5f1405 100644 --- a/CCFlow/CCFlow/WF/CCForm/JS/FileUpload/css/fileUpload.css +++ b/CCFlow/CCFlow/WF/CCForm/JS/FileUpload/css/fileUpload.css @@ -141,8 +141,8 @@ } .image-item { - width: 75px !important; - height: 75px; + width: 400px !important; + height: 400px; background-image: url(./iconfont-tianjia.png); background-size: 100% 100%; display: inline-block; diff --git a/CCFlow/CCFlow/WF/Scripts/layui/style/admin.css b/CCFlow/CCFlow/WF/Scripts/layui/style/admin.css index 3e3e7e04..ea1de74a 100644 --- a/CCFlow/CCFlow/WF/Scripts/layui/style/admin.css +++ b/CCFlow/CCFlow/WF/Scripts/layui/style/admin.css @@ -624,8 +624,9 @@ html { .layui-fluid { padding: 15px; /*background:pink;*/ - height:100vh; - box-sizing:border-box; +/* height: 100vh; +*/ height: auto; + box-sizing: border-box; } .layadmin-header { diff --git a/CCFlow/Components/BP.WF/WF/WorkNode.cs b/CCFlow/Components/BP.WF/WF/WorkNode.cs index ce2a8f65..54e0fe3c 100644 --- a/CCFlow/Components/BP.WF/WF/WorkNode.cs +++ b/CCFlow/Components/BP.WF/WF/WorkNode.cs @@ -5617,7 +5617,7 @@ namespace BP.WF } - if ((userNo == null && userNo == "" )|| (gwl.EmpNo.Equals(WebUser.No) == false)) + if ((userNo == null && userNo == "" )&& (gwl.EmpNo.Equals(WebUser.No) == false)) continue; //设置当前不可以用.