diff --git a/CCFlow/CCFlow/DataUser/JSLibData/CommonShowConfig.js b/CCFlow/CCFlow/DataUser/JSLibData/CommonShowConfig.js index c042ba8f..cb08a5de 100644 --- a/CCFlow/CCFlow/DataUser/JSLibData/CommonShowConfig.js +++ b/CCFlow/CCFlow/DataUser/JSLibData/CommonShowConfig.js @@ -31,7 +31,7 @@ var CommonConfig = { //附件信息配置 IsOnlinePreviewOfAth: true, //是否在线预览 //@BKGY - PreviewPathOfAth: "http://172.15.89.222:8012",//附件预览服务器地址,在上传附件后预览时可配置此处的预览服务器地址 + PreviewPathOfAth: "https://craft.dayesteel.com.cn:8017/",//附件预览服务器地址,在上传附件后预览时可配置此处的预览服务器地址 IsHideMobileBack: false,//是否隐藏移动端返回标签 RichTextType: 'tinymce', IsClearSearchCond: true,//是否清空查询条件 diff --git a/CCFlow/CCFlow/WF/CCForm/Ath.js b/CCFlow/CCFlow/WF/CCForm/Ath.js index 8c7e6b1f..455f044b 100644 --- a/CCFlow/CCFlow/WF/CCForm/Ath.js +++ b/CCFlow/CCFlow/WF/CCForm/Ath.js @@ -17,6 +17,7 @@ var PreviewPathOfAth = getConfigByKey("PreviewPathOfAth", ""); */ function AthTable_Init(athchment, athDivID, refPKVal) { + debugger; if (typeof athchment != "object" && typeof athchment == "string") athchment = new Entity("BP.Sys.FrmAttachment", athchment); if (refPKVal == null || refPKVal == undefined || refPKVal == 0) @@ -199,6 +200,8 @@ function InitAthPage(athDivID, uploadUrl) { } $("#" + athDivID).show(); layui.form.render("select"); + layui.form.render('checkbox'); + } @@ -233,6 +236,7 @@ function FileShowWayTable(athDesc, dbs, uploadUrl) { var colstyle = "line-height:30px;border: 1px solid #ddd;background-color:white;"; colstyle = "background-color:#FAFAFA !important; "; + _html += ""; _html += "序号"; if (isHaveSort == true) _html += "" + sortColoum + ""; @@ -317,7 +321,9 @@ function FileShowWayTable(athDesc, dbs, uploadUrl) { athIdx++; _html += ""; - //①序号 + //①复选框 + _html += " "; + //序号 _html += "" + athIdx + ""; //增加类别列,有可能跨多行 @@ -395,6 +401,12 @@ function FileShowWayTable(athDesc, dbs, uploadUrl) { if (IsExistFile == false || (athDesc.IsExpCol == 1 && athDesc.IsUpload == true && pageData.IsReadonly != "1")) { athIdx++; + //复选框 + if (db != undefined && db != "") { + _html += " "; + + } + //①序号 _html += "" + athIdx + ""; @@ -493,6 +505,66 @@ function GFDoDown(mypk, fk_framAttachment) { AthTable_Init(fk_framAttachment, "Div_" + fk_framAttachment, pageData.WorkID); //Reload(); } +layui.use(['form', 'layer', 'laydate'], function () { + var form = layui.form, $ = layui.jquery, laydate = layui.laydate; + + form.on('checkbox(allChecks)', function (data) { + var child = $("input[type='checkbox']"); + child.each(function (index, item){ + item.checked = data.elem.checked; + }); + form.render('checkbox'); + }); + //选中子项 + form.on('checkbox(clickChild)', function (data) { + var childs = $(".fileId"); + for (var i = 0; i < childs.length; i++) { + if (childs[i].checked == false) { + $("#allChecks").prop("checked", false); + form.render('checkbox'); + break; + } + } + // + var all = childs.length; + for (var i = 0; i < childs.length;i++) { + if (childs[i].checked == true) { + all--; + } + + } + if (all == 0) { + $("#allChecks").prop("checked", true); + form.render('checkbox'); + } + }); +}); + +//全选 +function ckAll() { + var status = document.getElementById('allChecks').checked; + var childs = document.getElementById('child'); + for (var i = 0; i < childs.length; i++) { + childs[i].checked = status; + } +} +function clickChild() { + var childs = document.getElementByName('child'); + var count = childs.length; + var CheckedCount = 0; + for (var i = 0; i < childs.length; i++) { + if (childs[i].checked == true) { + CheckedCount++; + } + } + //若子选项全选,则全选也选中 + if (count == CheckedCount) { + document.getElementById('allChecks').checked == true; + } else { + document.getElementById('allChecks').checked == false; + } +} + // 修改文件名. function ChangeFileName(mypk) { @@ -624,16 +696,75 @@ function Down2018(mypk) { link.click(); } +//打包下载 +function DownZipBatch(fk_frmattachment, PKVal) { + var ids = new Array();//选中的附件 + //获取选中的附件复选框 + var childs = $(".fileId"); + for (var i = 0; i < childs.length; i++) { + if (childs[i].checked == true) { + var id = childs[i].value; + ids.push(id); + } + } + if (ids.length == 0) { + alert("请先选中要下载的文件。"); + return; + } + var httpHandler = new HttpHandler("BP.WF.HttpHandler.WF_CCForm"); + httpHandler.AddUrlData(); + httpHandler.AddPara("Ids", ids); + httpHandler.AddPara("FK_FrmAttachment", fk_frmattachment); + httpHandler.AddPara("PKVal", PKVal) + var data = httpHandler.DoMethodReturnString("AttachmentUpload_DownZip"); + + if (data.indexOf('err@') == 0) { + alert(data); //如果是异常,就提提示. + return; + } + + if (data.indexOf('url@') == 0) { + + data = data.replace('url@', ''); //如果返回url,就直接转向. + + var i = data.indexOf('\DataUser'); + var str = '/' + data.substring(i); + str = str.replace('\\\\', '\\'); + if (plant != 'CCFlow') { + var currentPath = GetHrefUrl(); + var path = currentPath.substring(0, currentPath.indexOf('/WF') + 1); + str = path + str; + } else { + str = basePath + str; + } + SetHref(str); + } + +} /** * 打包下载 * @param fk_frmattachment 附件属性MyPK * @param PKVal 附件控制权限的ID */ function DownZip(fk_frmattachment, PKVal) { + var ids = new Array();//选中的附件 + //获取选中的附件复选框 + var childs = $(".fileId"); + for (var i = 0; i < childs.length; i++) { + if (childs[i].checked == true) { + var id = childs[i].value; + ids.push(id); + } + } + if (ids.length == 0) { + alert("请先选中要下载的文件。"); + return; + } var httpHandler = new HttpHandler("BP.WF.HttpHandler.WF_CCForm"); httpHandler.AddUrlData(); + httpHandler.AddPara("Ids", ids); httpHandler.AddPara("FK_FrmAttachment", fk_frmattachment); httpHandler.AddPara("PKVal", PKVal) var data = httpHandler.DoMethodReturnString("AttachmentUpload_DownZip"); diff --git a/CCFlow/CCFlow/WF/MyFlowGener2021.js b/CCFlow/CCFlow/WF/MyFlowGener2021.js index cd793b1e..281e7251 100644 --- a/CCFlow/CCFlow/WF/MyFlowGener2021.js +++ b/CCFlow/CCFlow/WF/MyFlowGener2021.js @@ -694,6 +694,8 @@ function SetFrmReadonly() { $("#WorkCheck_Doc").removeAttr("readonly"); $("#WorkCheck_Doc").removeAttr("disabled"); } + $("#allChecks").attr('disabled', false);; + $(".fileId").attr('disabled', false);; $('#Btn_Save').attr('disabled', true); } diff --git a/CCFlow/CCFlow/WF/Toolbar.js b/CCFlow/CCFlow/WF/Toolbar.js index d7035930..149ec445 100644 --- a/CCFlow/CCFlow/WF/Toolbar.js +++ b/CCFlow/CCFlow/WF/Toolbar.js @@ -1588,11 +1588,11 @@ function SaveEnd(formType) { function FocusBtn(btn, workid) { btn = $('[name=Focus]'); if (btn.length == 1) { - if (btn[0].innerText.trim() == "关注") { - btn[0].innerHTML = " 取消关注"; + if (btn[0].innerText.trim() == "收藏") { + btn[0].innerHTML = " 取消收藏"; } else { - btn[0].innerHTML = " 关注"; + btn[0].innerHTML = " 收藏"; } var handler = new HttpHandler("BP.WF.HttpHandler.WF_MyFlow"); diff --git a/CCFlow/CCFlow/WF/WorkOpt/DBTemplate.htm b/CCFlow/CCFlow/WF/WorkOpt/DBTemplate.htm index 1d7f14e9..9e440d3b 100644 --- a/CCFlow/CCFlow/WF/WorkOpt/DBTemplate.htm +++ b/CCFlow/CCFlow/WF/WorkOpt/DBTemplate.htm @@ -46,10 +46,31 @@ function DBTemplate_Init(data, SeachType) { var dbTemplate = data['DBTemplate']; - var history = data['History']; + var history = data['History']; + var dbSeach = data['DBSeach']; + + if (dbSeach == undefined) { + dbSeach = []; + } var idx = 0; var html = ""; + + html += ""; + html += ""; + html += ""; + + + + for (var i = 0; i < dbSeach.length; i++) { + var en = dbSeach[i]; + var idx = i + 1; + html += ""; + html += ""; + html += ""; + html += ""; + } + html += ""; html += ""; html += ""; @@ -65,10 +86,7 @@ var idx = i + 1; html += ""; html += ""; - if (SeachType != "0") - html += ""; - else - html += ""; + html += ""; html += ""; html += ""; @@ -87,8 +105,9 @@ for (var i = 0; i < history.length; i++) { var en = history[i]; + var idx = i + 1; html += ""; - html += ""; + html += ""; html += ""; html += ""; html += ""; @@ -96,6 +115,12 @@ html += "
查询结果
" + idx + ". " + "" + en.Title + "
模版数据
" + idx + ". " + "" + en.Title + "" + en.Title + "" + en.Title + "删除
" + i + "" + idx + ". " + "" + en.Title + "设置模版
"; document.getElementById("Msg").innerHTML = html; + if (dbSeach.length == 0) { + var row = document.getElementById('dbSeach'); + row.style.display = 'none'; + + } + } function DBTemplate_DeleteDBTemplate(workid) { diff --git a/CCFlow/CCFlow/WF/WorkOpt/Shift.htm b/CCFlow/CCFlow/WF/WorkOpt/Shift.htm index d89ae074..f470a3ca 100644 --- a/CCFlow/CCFlow/WF/WorkOpt/Shift.htm +++ b/CCFlow/CCFlow/WF/WorkOpt/Shift.htm @@ -112,7 +112,7 @@ var u = new WebUser(); ccs_fk_dept = u.FK_Dept; } - $('#iframeSelectEmpsForm').attr('src', "SelectEmps.htm?FK_Dept=" + ccs_fk_dept + "&FK_Node=" + GetQueryString("FK_Node") + "&s=" + Math.random()); + $('#iframeSelectEmpsForm').attr('src', "SelectEmps.htm?IsSelectMore=1&FK_Dept=" + ccs_fk_dept + "&FK_Node=" + GetQueryString("FK_Node") + "&s=" + Math.random()); $('#BtnSelectEmps').bind('click', function () { $('#selectEmpsModal').modal().show(); }); $("section").show(); @@ -139,7 +139,9 @@ var data = handler.DoMethodReturnString("Shift_Save"); data = data.replace("@null", ""); - + if (data == "") { + alert("移交成功"); + } if (window.parent != null && window.parent.WindowCloseReloadPage != null && typeof window.parent.WindowCloseReloadPage === "function") { window.parent.WindowCloseReloadPage(data);