diff --git a/CCFlow/.vs/CCFlowCloud/v17/.suo b/CCFlow/.vs/CCFlowCloud/v17/.suo
index 22a78622..71254a03 100644
Binary files a/CCFlow/.vs/CCFlowCloud/v17/.suo and b/CCFlow/.vs/CCFlowCloud/v17/.suo differ
diff --git a/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js b/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js
index d1734657..c16ec16c 100644
--- a/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js
+++ b/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js
@@ -212,6 +212,72 @@ function chart() {
}
+var mypk = "";
+var dataDoc = "";
+//ForBKGY
+function printDocFor002() {
+ var oldOID = $("#TB_OLDOID").val();
+ var nodeID = parseInt($("#TB_OLDFLOW").val() + '01');
+ var workID = oldOID;
+ var flowNo = $("#TB_OLDFLOW").val();
+ var fid = GetQueryString("FID");
+ var printType = "YuLan";
+ //初始化页面信息
+ var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
+ handler.AddPara("FK_Node", nodeID);
+ handler.AddPara("WorkID", workID);
+ handler.AddPara("FK_Node", nodeID);
+ handler.AddPara("FK_Flow", flowNo);
+ handler.AddPara("FID", fid);
+ handler.AddPara("PrintFor", "View");
+ var data = handler.DoMethodReturnString("PrintDoc_Init");
+ if (data.indexOf('err@') == 0) {
+ alert(data);
+ return;
+ }
+ //如果是一个url.
+ if (data.indexOf('file@') == 0) {
+ data = data.replace('file@', '');
+ if (data.indexOf('rtf@') != -1) {
+ data = filterXSS(data).replace('rtf@', '');
+ var fileName = data.substring(data.lastIndexOf('/') + 1);
+ var filePath = data.substring(0, data.lastIndexOf('/') + 1);
+ fileName = ReplaceName(fileName);
+ data = filePath + fileName;
+ }
+ }
+ if (data.indexOf('url@') == 0) {
+ data = data.replace('url@', '');
+ if (data.indexOf('rtf@') != -1) {
+ data = filterXSS(data).replace('rtf@', '');
+ var fileName = data.substring(data.lastIndexOf('/') + 1);
+ var filePath = data.substring(0, data.lastIndexOf('/') + 1);
+ fileName = ReplaceName(fileName);
+ data = filePath + fileName;
+ }
+ }
+ $("#TB_WenJianLuJing").val(data);
+ Save(1);
+ dataDoc = data;
+}
+function ReplaceName(fileName) {
+ fileName = fileName.replace(/%/g, "%25");
+ fileName = fileName.replace(/\+/g, "%2B");
+ fileName = fileName.replace(/ /g, "%20");
+ fileName = fileName.replace(/\//g, "%2F");
+ fileName = fileName.replace(/\?/g, "%3F");
+ fileName = fileName.replace(/#/g, "%23");
+ fileName = fileName.replace(/&/g, "%26");
+ fileName = fileName.replace(/=/g, "%3D");
+ return fileName;
+}
+
+function openView() {
+ var data = $("#TB_WenJianLuJing").val();
+ Skip.addJs("../../WF/CCForm/Ath.js?t=" + Math.random());
+ AthView("", data);
+}
+
function GongCheng() {
//TB_BeiZhu
var W = document.body.clientWidth - 150;
diff --git a/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js b/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js
index 90628e0f..f3ec7332 100644
--- a/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js
+++ b/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js
@@ -80,7 +80,10 @@ function refreshDiv(divId, fast) {
//div.innerHTML = getNewContent(fast);
div.innerHTML = fast;
}
-
+function openView() {
+ var data = $("#TB_WenJianLuJing").val();
+ AthView("", data);
+}
//发生前事件
function beforeSend() {
diff --git a/CCFlow/CCFlow/WF/CCForm/Ath.js b/CCFlow/CCFlow/WF/CCForm/Ath.js
index 1ea9e766..f6402440 100644
--- a/CCFlow/CCFlow/WF/CCForm/Ath.js
+++ b/CCFlow/CCFlow/WF/CCForm/Ath.js
@@ -892,12 +892,12 @@ function AthView(mypk, filePath) {
var exts = 'doc';
//附件的后缀
- if (exts != "*.*" && filePath.indexOf(exts) != -1) {
+ if (exts != "*.*" && filePath.indexOf(exts) != -1 && filePath.indexOf("/DataUser/Bill") == -1) {
Down2018(mypk);
return;
}
- window.open(fileServerHost + '/onlinePreview?url=' + url);
+ window.open(fileServerHost + 'preview/onlinePreview?url=' + url);
return;
}
diff --git a/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm b/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm
index 735a4620..ae73c50f 100644
--- a/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm
+++ b/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm
@@ -37,8 +37,10 @@
+
+
@@ -763,7 +765,7 @@
function analysis(Tip) {
let tipArr = Tip.split("@");
let tempul = `
- ${tipArr.map(item => {
+ ${tipArr.map(item => {
if (item.includes('###')) {
return `${item.split("###").join('')}
`
} else if (item.includes(')')) {
@@ -773,7 +775,7 @@
}
}).join('')}
-
`
+ `
Tip = tempul;
return Tip;
}
@@ -1031,14 +1033,62 @@
}
+ //预览表单
+ //$('#View').click(function () {
+ // var url = "ChapterFrmView.htm?FrmID=" + frmID + "&OID=" + oid + "&IsReadonly=1" + "&FK_Flow=" + GetQueryString("FK_Flow") + "&WorkID=" + GetQueryString("WorkID") + "&FK_Node=" + GetQueryString("FK_Node");
+ // //WinOpenFull(url);
+ // OpenLayuiDialog(url, '查看表单', '1200', '', '', false)
+
+
+ //})
+ //结束
+ //预览打印模板
$('#View').click(function () {
- var url = "ChapterFrmView.htm?FrmID=" + frmID + "&OID=" + oid + "&IsReadonly=1" + "&FK_Flow=" + GetQueryString("FK_Flow") + "&WorkID=" + GetQueryString("WorkID") + "&FK_Node=" + GetQueryString("FK_Node");
+ var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
+ handler.AddPara("FK_Node", GetQueryString("FK_Node"));
+ handler.AddPara("WorkID", GetQueryString("WorkID"));
+ handler.AddPara("FK_Flow", GetQueryString("FK_Flow"));
+ handler.AddPara("FID", GetQueryString("FID"));
+ handler.AddPara("PrintFor", "View");
+
+ var data = handler.DoMethodReturnString("PrintDoc_Init");
+ if (data.indexOf('err@') == 0) {
+ alert(data);
+ return;
+ }
+ //如果是一个url.
+ //如果是一个url.
+ if (data.indexOf('file@') == 0) {
+ data = data.replace('file@', '');
+ if (data.indexOf('rtf@') != -1) {
+ data = filterXSS(data).replace('rtf@', '');
+ data = ReplaceName(data);
+ }
+ }
+ if (data.indexOf('url@') == 0) {
+ data = data.replace('url@', '');
+ if (data.indexOf('rtf@') != -1) {
+ data = filterXSS(data).replace('rtf@', '');
+ var fileName = data.substring(data.lastIndexOf('/') + 1);
+ var filePath = data.substring(0, data.lastIndexOf('/') + 1);
+ fileName = ReplaceName(fileName);
+ data = filePath + fileName;
+ }
+ }
+ var host = window.location.protocol + "//" + window.location.host;
+ var url = host + data;
+ url = encodeURIComponent(base64Encode(url));
+ var fileServerHost = getConfigByKey("PreviewPathOfAth", "");
+ url = fileServerHost + '/preview/onlinePreview?url=' + url;
+ //var url = "ChapterFrmView.htm?FrmID=" + frmID + "&OID=" + oid + "&IsReadonly=1" + "&FK_Flow=" + GetQueryString("FK_Flow") + "&WorkID=" + GetQueryString("WorkID") + "&FK_Node=" + GetQueryString("FK_Node");
//WinOpenFull(url);
OpenLayuiDialog(url, '查看表单', '1200', '', '', false)
})
+ //结束
+
$('#Exp').click(function () {
var url = "ChapterFrmExp.htm?FrmID=" + frmID + "&OID=" + oid + "&attrKey=" + key;
@@ -1056,6 +1106,63 @@
}
});
})
+
+ function ReplaceName(fileName) {
+ fileName = fileName.replace(/%/g, "%25");
+ fileName = fileName.replace(/\+/g, "%2B");
+ fileName = fileName.replace(/ /g, "%20");
+ fileName = fileName.replace(/\//g, "%2F");
+ fileName = fileName.replace(/\?/g, "%3F");
+ fileName = fileName.replace(/#/g, "%23");
+ fileName = fileName.replace(/&/g, "%26");
+ fileName = fileName.replace(/=/g, "%3D");
+ return fileName;
+ }
+ function base64Encode(input) {
+ let _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+ let output = "";
+ let chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ let i = 0;
+ input = utf8_encode(input);
+ while (i < input.length) {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+ enc1 = chr1 >> 2;
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+ enc4 = chr3 & 63;
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+ output = output +
+ _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
+ _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
+ }
+ return output;
+ }
+ function utf8_encode(input) {
+ input = input.replace(/\r\n/g, "\n");
+ let utftext = "";
+ for (let n = 0; n < input.length; n++) {
+ let c = input.charCodeAt(n);
+ if (c < 128) {
+ utftext += String.fromCharCode(c);
+ } else if ((c > 127) && (c < 2048)) {
+ utftext += String.fromCharCode((c >> 6) | 192);
+ utftext += String.fromCharCode((c & 63) | 128);
+ } else {
+ utftext += String.fromCharCode((c >> 12) | 224);
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+
+ }
+ return utftext;
+ }
+
//富文本编辑器
function getContent(KeyOfEn) {
//var cdata = ChapterFrmShow(KeyOfEn);
diff --git a/CCFlow/CCFlow/WF/CCForm/ForBKGYTableSearch.htm b/CCFlow/CCFlow/WF/CCForm/ForBKGYTableSearch.htm
new file mode 100644
index 00000000..133f1d4b
--- /dev/null
+++ b/CCFlow/CCFlow/WF/CCForm/ForBKGYTableSearch.htm
@@ -0,0 +1,604 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CCFlow/CCFlow/WF/CCForm/JS/Pop.js b/CCFlow/CCFlow/WF/CCForm/JS/Pop.js
index e8aeaf1e..34070075 100644
--- a/CCFlow/CCFlow/WF/CCForm/JS/Pop.js
+++ b/CCFlow/CCFlow/WF/CCForm/JS/Pop.js
@@ -480,7 +480,7 @@ function PopTableSearch(mapExt, val, targetId, index, oid, objtr) {
//解项羽 这里需要相对路径.
var localHref = GetLocalWFPreHref();
- var url = localHref + "/WF/CCForm/Pop/TableSearch.htm?MyPK=" + mapExt.MyPK + "&FK_MapData=" + mapExt.FK_MapData + "&OID=" + oid + "&KeyOfEn=" + mapExt.AttrOfOper;
+ var url = localHref + "/WF/CCForm/ForBKGYTableSearch.htm?MyPK=" + mapExt.MyPK + "&FK_MapData=" + mapExt.FK_MapData + "&OID=" + oid + "&KeyOfEn=" + mapExt.AttrOfOper;
if (isEnter == false)
container.on("dblclick", function () {
diff --git a/CCFlow/CCFlow/WF/CCForm/JS/Pop2021.js b/CCFlow/CCFlow/WF/CCForm/JS/Pop2021.js
index 93cde33a..cc6abfa4 100644
--- a/CCFlow/CCFlow/WF/CCForm/JS/Pop2021.js
+++ b/CCFlow/CCFlow/WF/CCForm/JS/Pop2021.js
@@ -214,7 +214,7 @@ function OpenPopFunction(mapExt, mapExts, mtagsId, target, targetID, pkval, popt
url += url + '&BackBtn=' + 0;
break;
case "PopTableSearch": //表格查询.
- url = baseUrl + "Pop/TableSearch.htm?MyPK=" + mapExt.MyPK + "&oid=" + pkval + "&m=" + Math.random();
+ url = baseUrl + "ForBKGYTableSearch.htm?MyPK=" + mapExt.MyPK + "&oid=" + pkval + "&m=" + Math.random();
break;
case "PopSelfUrl":
url = mapExt.Tag;
diff --git a/CCFlow/CCFlow/WF/CCForm/MapExt2021.js b/CCFlow/CCFlow/WF/CCForm/MapExt2021.js
index 1f1858af..e07a3b58 100644
--- a/CCFlow/CCFlow/WF/CCForm/MapExt2021.js
+++ b/CCFlow/CCFlow/WF/CCForm/MapExt2021.js
@@ -409,9 +409,16 @@ function FullIt(selectVal, refPK, elementId) {
mapExt.SetPKVal(refPK);
var i = mapExt.RetrieveFromDBSources();
- var backFunc = mapExt.Tag2;
- if (backFunc != null && backFunc != "" && backFunc != undefined)
- DBAccess.RunFunctionReturnStr(DealSQL(backFunc, selectVal));
+ if (CustomerNo != "BKGY") {
+ backFunc = mapExt.Tag2;
+ if (backFunc != null && backFunc != "" && backFunc != undefined)
+ DBAccess.RunFunctionReturnStr(DealSQL(backFunc, selectVal));
+
+ } else {
+ backFunc = mapExt.Tag5;
+ if (backFunc != null && backFunc != "" && backFunc != undefined)
+ DBAccess.RunFunctionReturnStr(DealSQL(backFunc, selectVal));
+ }
var mypk = "";
if (refPK.indexOf("FullData") != -1)
diff --git a/CCFlow/Components/BP.WF/Glo.cs b/CCFlow/Components/BP.WF/Glo.cs
index 981bb6c2..739ca9a0 100644
--- a/CCFlow/Components/BP.WF/Glo.cs
+++ b/CCFlow/Components/BP.WF/Glo.cs
@@ -221,7 +221,7 @@ namespace BP.WF
{
string s = BP.Difference.SystemConfig.AppSettings["PrintBackgroundWord"];
if (string.IsNullOrEmpty(s))
- s = "驰骋工作流引擎@开源驰骋 - ccflow@openc";
+ s = "";
return s;
}
}
@@ -1706,7 +1706,7 @@ namespace BP.WF
DBAccess.RunSQL(sql);
}
- string info = "驰骋工作流引擎 - 检查数据库安装权限出现错误:";
+ string info = "检查数据库安装权限出现错误:";
info += "\t\n1. 当前登录的数据库帐号,必须有创建、删除视图或者table的权限。";
info += "\t\n2. 必须对表有增、删、改、查的权限。 ";
info += "\t\n3. 必须有删除创建索引主键的权限。 ";
diff --git a/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs b/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs
index 70c3ca07..fccbfd45 100644
--- a/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs
+++ b/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs
@@ -848,10 +848,21 @@ namespace BP.WF.HttpHandler
if ((int)func.TemplateFileModel == 1)
fileModelT = "word";
#region BKGY替换word名称 20231026 sunliang
- string sql = "select TITLE from WF_GENERWORKFLOW where workid='" + WorkID + "'";
- string da = DBAccess.RunSQLReturnString(sql);
- var s = da.Split('_');
- da = s[0] + ".doc";
+ string da = "";
+ if (DataType.IsNullOrEmpty(GetRequestVal("PrintFor")))
+ {
+ string sql = "select TITLE from WF_GENERWORKFLOW where workid='" + WorkID + "'";
+ da = DBAccess.RunSQLReturnString(sql);
+ var s = da.Split('_');
+ da = s[0] + ".doc";
+ }
+ else {
+ string sql = "select TITLE from WF_GENERWORKFLOW where workid='" + WorkID + "'";
+ da = DBAccess.RunSQLReturnString(sql);
+ var s = da.Split('_');
+ da = s[0]+ DateTime.Now.ToString("yyyyMMddHHmmss") + ".doc";
+ }
+
//string da = s[0].ToString().Replace("#", "号") + ".doc";
//da = da.Replace("+", "、");
diff --git a/CCFlow/Components/BP.WF/WF/WorkReturn.cs b/CCFlow/Components/BP.WF/WF/WorkReturn.cs
index ccf50f34..18509090 100644
--- a/CCFlow/Components/BP.WF/WF/WorkReturn.cs
+++ b/CCFlow/Components/BP.WF/WF/WorkReturn.cs
@@ -136,8 +136,24 @@ namespace BP.WF
ps.Add("FID", this.WorkID);
DBAccess.RunSQL(ps);
- /*如果退回到了开始的节点,就删除出开始节点以外的数据,不要删除节点表单数据,这样会导致流程轨迹打不开.*/
- ps.Clear();
+ string sql = "SELECT WorkID,FK_Emp FROM WF_GenerWorkerlist WHERE (WorkID=" + this.WorkID + " OR FID=" + this.WorkID + ")AND FK_Node !=" + this.ReturnToNode.NodeID;
+ DataTable dtList = DBAccess.RunSQLReturnTable(sql);
+ if (dtList.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dtList.Rows)
+ {
+ int nums = BP.WF.Dev2Interface.EmpWorksNums(dr[1].ToString()) - 1;
+ //退回后写入最新待办@BKGY
+ sql = "";
+ sql = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) ";
+ sql += "VALUES(S_WEB_SOCKET.NEXTVAL,'" + dr[1].ToString() + "','" + nums + "','0'," + this.WorkID + ")";
+ DBAccess.RunSQL(sql);
+ }
+ }
+
+
+ /*如果退回到了开始的节点,就删除出开始节点以外的数据,不要删除节点表单数据,这样会导致流程轨迹打不开.*/
+ ps.Clear();
ps.SQL = "DELETE FROM WF_GenerWorkerlist WHERE FK_Node!=" + dbStr + "FK_Node AND (WorkID=" + dbStr + "WorkID1 OR FID=" + dbStr + "WorkID2)";
ps.Add(GenerWorkerListAttr.FK_Node, this.ReturnToNode.NodeID);
ps.Add("WorkID1", this.WorkID);
diff --git a/CCFlow/Components/BP.WF/WF/WorkUnSend.cs b/CCFlow/Components/BP.WF/WF/WorkUnSend.cs
index 0707e742..60b08fe0 100644
--- a/CCFlow/Components/BP.WF/WF/WorkUnSend.cs
+++ b/CCFlow/Components/BP.WF/WF/WorkUnSend.cs
@@ -797,6 +797,21 @@ namespace BP.WF
GenerWorkerLists wls = new GenerWorkerLists();
wls.Delete(GenerWorkerListAttr.WorkID, this.WorkID, GenerWorkerListAttr.FK_Node, gwf.NodeID);
+ sql = "SELECT WorkID,FK_Emp FROM WF_GenerWorkerlist WHERE WorkID=" + this.WorkID + " AND FK_Node =" + gwf.NodeID;
+ DataTable dtList = DBAccess.RunSQLReturnTable(sql);
+ if (dtList.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dtList.Rows)
+ {
+ int nums = BP.WF.Dev2Interface.EmpWorksNums(dr[1].ToString()) - 1;
+ //退回后写入最新待办@BKGY
+ sql = "";
+ sql = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) ";
+ sql += "VALUES(S_WEB_SOCKET.NEXTVAL,'" + dr[1].ToString() + "','" + nums + "','0'," + this.WorkID + ")";
+ DBAccess.RunSQL(sql);
+ }
+ }
+
// 删除附件信息。
DBAccess.RunSQL("DELETE FROM Sys_FrmAttachmentDB WHERE FK_MapData='ND" + gwf.NodeID + "' AND RefPKVal='" + this.WorkID + "'");