You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

819 lines
34 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>驰骋工作流</title>
<meta charset="UTF-8" />
<!-- 引用通用的js文件. -->
<script src="/WF/Scripts/QueryString.js"></script>
<script src="/WF/Scripts/jquery/jquery.min.js" type="text/javascript"></script>
<script src="/WF/Scripts/jquery/jquery.cookie.js" type="text/javascript"></script>
<link href="/WF/Scripts/bootstrap/css/bootstrap.css" rel="stylesheet" />
<link href="/WF/Scripts/bootstrap/css/font-awesome.css" rel="stylesheet" />
<link href="skin/css/style.css" rel="stylesheet" type="text/css" />
<link href="skin/css/animate.css" rel="stylesheet" type="text/css" />
<!-- 引入ccbpm 的sdk开发js. -->
<script src="/WF/config.js" type="text/javascript"></script>
<script src="/WF/Dev2Interface.js" type="text/javascript"></script>
<style>
#title {
margin-left: 20px;
color: #676A6C;
font-size: 18px;
}
#divCCForm{
padding: 10px 20px 20px 20px;
}
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .jqgrid-rownum {
border-color: #f0f0f0;
}
.table > thead > tr > th, .table > tbody > tr > td, .table > tbody > tr > th {
border-color: #f0f0f0;
}
.table > thead {
background: #f5f5f6;
}
td, th {
font-size: 13px;
}
th {
padding: 8px;
color: #676A6C;
}
td {
height: 39px;
color: rgb(103, 106, 108);
}
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .jqgrid-rownum {
border-color: #f0f0f0;
}
.table > thead > tr > th, .table > tbody > tr > td, .table > tbody > tr > th {
border-color: #f0f0f0;
}
td>input{
width:100px;
}
input[type="checkbox"]{
vertical-align:-1px;
}
a:hover{
color:#337ab7;
}
</style>
<script type="text/javascript" language="javascript">
var nodeID = GetQueryString("FK_Node");
var node = null;
//页面启动函数.
$(function () {
InitPage();
});
function InitPage() {
//var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_Batch");
//handler.AddPara("FK_Node", nodeID);
//var data = handler.DoMethodReturnString("WorkCheckModel_Init");
//if (data.indexOf("err@") != -1) {
// alert(data);
// return;
//}
//data = cceval('(' + data + ')');
data = WorkCheckModel_Init(nodeID);
var works = data.Works; //数据.
var mapAttrs = data.Sys_MapAttr; //要显示的字段.
node = Node(nodeID); // data.WF_Node[0]; // new Entity("BP.WF.Node", nodeID);
var BatchCheckNoteModel = "0";
if (node.AtPara.indexOf("BatchCheckNoteModel=1") >= 0)
BatchCheckNoteModel = "1";
//if (BatchCheckNoteModel == undefined)
// BatchCheckNoteModel = "0"; //审核意见填写方式,默认为选择的Item一个意见.
$("#title").html("流程:" + node.FlowName + " => 节点:" + node.Name);
var thead = ""; // 标题字段
var tbody = ""; //内容显示
thead += "<th style='width:50px;'>#</th>";
thead += "<th style='width:60px'><input type='checkbox' onclick='CheckAll(this)'/>选择</th>";
thead += "<th style='width: 150px'>标题</th>";
thead += "<th>发起人</th>";
thead += "<th style='width:90px'>接收日期</th>";
var files = GetPara("BatchFields", node.AtPara) || "";
var editFiles = GetPara("EditFields", node.AtPara) || "";
for (var i = 0; i < mapAttrs.length; i++) {
var attr = mapAttrs[i];
if (files == undefined)
continue;
if (files.indexOf(attr.KeyOfEn) == -1)
continue;
if (attr.Name == "审核意见")
continue;
thead += "<th>" + attr.Name + "</th>";
}
//判断该节点是否启用审核组件
var sta = node.FWCSta;
////启用审核组件并且可编辑 ,如果是:每个记录后面都有一个意见框.的模式.
if (sta == 1 && BatchCheckNoteModel == "1") {
thead += "<th>审核意见</th>";
}
//处理要显示数据
//var batchListCount = node.GetPara("BatchCheckListCount");
//if (batchListCount == 0)
batchListCount = 15;
for (var i = 0; i < works.length; i++) {
if (i + 1 == batchListCount)
break;
var wk = works[i];
tbody += "<tr>";
tbody += "<td>" + parseInt(i + 1) + "</td>";
tbody += "<td ><label><input type='checkbox' id='CB_" + wk.WorkID + "' name='CB_" + wk.WorkID + "'/>选择</label></td>";
tbody += "<td><a href=\"javascript:To('../../MyFlow.htm?WorkID=" + wk.WorkID + "&FK_Node=" + node.NodeID + "&FK_Flow=" + node.FK_Flow + "');\" >" + wk.Title + "</a></td>";
tbody += "<td>" + wk.StarterName + "</td>";
tbody += "<td>" + wk.ADT + "</td>";
//增加后台配置的显示的列.
for (var idx = 0; idx < mapAttrs.length; idx++) {
var mapAttr = mapAttrs[idx];
if (files == undefined)
continue;
if (files.indexOf(mapAttr.KeyOfEn) < 0)
continue;
if (mapAttr.Name == "审核意见")
continue;
if (editFiles.indexOf(mapAttr.KeyOfEn) < 0) {
if (parseInt(mapAttr.UIContralType) == 9) {
var val = mapAttr.Tag2;
//替换@符号的数据
val = DealJsonExp(wk, val);
tbody += "<td><a id='Link_" + mapAttr.KeyOfEn + "' href='" + val + "' target='" + mapAttr.Tag1 + "' name='Link_" + mapAttr.KeyOfEn + "' >" + mapAttr.Name + "</a></td>";
} else {
tbody += "<td>" + wk[mapAttr.KeyOfEn] + "</td>";
}
}
else
tbody += "<td><input type='text' id='TB_" + wk.WorkID + "_" + mapAttr.KeyOfEn + "' name='TB_" + wk.WorkID + "_" + mapAttr.KeyOfEn + "' value='" + wk[mapAttr.KeyOfEn] + "'></td>";
}
// 启用审核组件并且可编辑 ,如果是:每个记录后面都有一个意见框.的模式.
if (sta == 1 && BatchCheckNoteModel == "1") {
tbody += "<td><textarea class='form-control' style='height:50px;width:240px;' name='TB_" + works[i].OID + "_WorkCheck_Doc' id='TB_" + works[i].OID + "_WorkCheck_Doc' type='text' ></textarea></td>";
}
tbody += "</tr>";
} //end for works.
$("#Table1").append(thead);
$("#Table2").append(tbody);
//处理按钮权限。
var bar = "";
var btns = data.Sys_BtnLab[0];
bar += '<button type=button onclick="Send()" id=Btn_Send >' + btns.SendLab + '</button>';
//bar += '<div id=toNode />';
if (btns.ReturnRole != 0) {
bar += '<button type=button onclick="Btn_Return()" >' + btns.ReturnLab + '</button>';
}
if (btns.DelEnable != 0) {
bar += '<button type=button onclick="Btn_Delete()">' + btns.DelLab + '</button>';
}
if (sta == 1 && BatchCheckNoteModel == "1")
bar += '<button type=button onclick="Btn_BatchCheckMsg()">批量意见</button>';
bar += '<button type=button onclick="Btn_Back()">返回</button>';
$("#btnDiv").append(bar);
//处理下拉框, 到达方向.
var handler = new HttpHandler("BP.WF.HttpHandler.WF_MyFlow");
handler.AddUrlData();
data = handler.DoMethodReturnString("Batch_InitDDL");
if (data.indexOf("err@") != -1) {
alert(data);
console.log(data);
return;
}
var toNDS = JSON.parse(data);
if (toNDS != null && toNDS != undefined && toNDS != "") {
var toNodeDDL = $('<select style="width:auto;" id="DDL_ToNode"></select>');
$.each(toNDS, function (i, toNode) {
var opt = "";
if (toNode.IsSelected == "1") {
var opt = $("<option value='" + toNode.No + "' selected='true' >" + toNode.Name + "</option>");
opt.data(toNode);
} else {
var opt = $("<option value='" + toNode.No + "' data-info='" + toNode.IsSelected + "'>" + toNode.Name + "</option>");
opt.data(toNode);
}
toNodeDDL.append(opt);
});
$("#Btn_Send").after(toNodeDDL);
}
}
function Btn_BatchCheckMsg() {
$('#TextArea').val('');
$('#WorkCheckModal').modal('show');
$('#TextArea').focus();
}
function ShowCheckMsg() {
var text = $('#TextArea').val();
text = replaceTrim(text);
if (text == "") {
alert("请输入数据");
$('#TextArea').val('');
$('#TextArea').focus();
return;
}
$("textarea[name$='_WorkCheck_Doc']").val(text);
$('#WorkCheckModal').modal('hide');
}
function replaceTrim(val) {//去除空格
val = val.replace(/[ ]/g, "");
val = val.replace(/<\/?.+?>/g, "");
val = val.replace(/[\r\n]/g, "");
return val;
}
function To(url) {
WinOpen(url);
return;
SetHref(url);
return;
}
//选中/取消所有列表
function CheckAll(obj) {
if (obj.checked == true)
$.each($("input[type='checkbox']"), function (i, o) {
o.checked = true;
});
else
$.each($("input[type='checkbox']"), function (i, o) {
o.checked = false;
});
}
function Send() {
//获取选择的行数
var isHave = false;
var workid = 0;
$("input[type='checkbox']:checked").each(function () {
var id = $(this).attr('id');
if (id != null && id != undefined) {
isHave = true;
workid = id.replace("CB_", "");
return false;
}
});
if (isHave == false) {
alert("请选择批处理的待办数据");
return;
}
var BatchCheckNoteModel = node.GetPara("BatchCheckNoteModel")
//如果是 每条记录单独的意见,就提示一下。
if (BatchCheckNoteModel == "1") {
if (window.confirm('确定要执行吗?') == false)
return;
}
$("#Btn_Send").val("正在执行请稍候...");
var toNodeID = 0;
if ($("#DDL_ToNode").length > 0 && $("#ToEmps").html() == "") {
var selectToNode = $('#DDL_ToNode option:selected').data();
toNodeID = selectToNode.No;
//判断接收人
if (selectToNode.IsSelectEmps == "1") { //通用选择器
SelectEmps("Accepter", toNodeID, workid);
return;
}
if (selectToNode.IsSelectEmps == "2") {//按照自定义Url模式的人员选择器
var url = selectToNode.DeliveryParas;
if (url != null && url != undefined && url != "") {
url = url + "?FK_Node=" + GetQueryString("FK_Node") + "&WorkID=" + workid + "&ToNode=" + toNodeID + "&s=" + Math.random();
return;
}
}
if (selectToNode.IsSelectEmps == "3") {//按照组织模式人员选择器
SelectEmps("AccepterOfOrg", toNodeID, workid);
return;
}
}
//判断审核组件的状态,如果启用了. 并且审核意见填写模式为一个 统一 的意见.
var sta = node.FWCSta;
var checkNote = ""; //审核意见.
if (sta == 1 && BatchCheckNoteModel == "0") {
var checkNote = promptGener('请输入审核意见', "同意");
if (checkNote == null || checkNote == '' || checkNote == undefined)
return;
}
var toNodeID = $("#DDL_ToNode").val();
var toEmps = $("#ToEmps").val();
//var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_Batch");
//handler.AddFormData();
//handler.AddPara("FK_Node", nodeID);
//handler.AddPara("CheckNote", checkNote);
//var toNodeID = $("#DDL_ToNode").val();
////加入两个可选择参数.
//handler.AddPara("ToNode", toNodeID);
//handler.AddPara("ToEmps", $("#ToEmps").html());
//var data = handler.DoMethodReturnString("WorkCheckModel_Send");
var data = WorkCheckModel_Send(nodeID, checkNote, toNodeID, toEmps);
if (data.indexOf("err@") != -1) {
alert(data);
return;
}
$("#batchModal").modal().show();
// $("#batchModal").find('.modal-title').text("67");
data = data.replace(/@/g, '<br/>@');
$("#msgContent").html(data);
$('#batchModal').on('hidden.bs.modal', function () {
$("#Table1").html("");
$("#Table2").html("");
$("#btnDiv").html("");
Reload();
});
$("#batchModal").modal("hidden");
}
//选择接受人
function SelectEmps(OperHtml, nodeID, workid) {
toNodeID = nodeID;
$('#modalHeader').text("选择接受人");
modalIframeSrc = "../" + OperHtml + ".htm?FK_Node=" + GetQueryString("FK_Node") + "&WorkID=" + workid + "&ToNode=" + nodeID + "&IsSend=0&PageFrom=WorkCheckModel" + "&s=" + Math.random();
$('#iframeReturnWorkForm').attr('src', modalIframeSrc);
$('#returnWorkModal').modal().show();
}
function returnWorkWindowClose(data) {
document.getElementById("ToEmps").innerHTML = data;
$('#returnWorkModal').modal('hide');
if (data != "取消" && data != "")
Send();
return;
}
function Btn_Group() {
if (window.confirm('您确定要执行本次合卷批复操作吗?') == false)
return;
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_Batch");
handler.AddFormData();
handler.AddPara("FK_Node", GetQueryString("FK_Node"));
var data = handler.DoMethodReturnString("Batch_Group");
}
function Btn_Return() {
if (window.confirm('您确定要执行本次批处理退回操作吗?') == false)
return;
var workIds = GetWorkIDs();
if (workIds == "") {
alert("选择需要退回的流程数据");
return;
}
var url = "";
var fk_node = GetQueryString("FK_Node");
var isFrameCross = GetHrefUrl().indexOf(basePath) == -1 ? 1 : 0;
if (workIds.indexOf(",") == -1)
url = "../ReturnWork.htm?FK_Node=" + fk_node + "&WorkID=" + workIds + "&s=" + Math.random() + "&isFrameCross=" + isFrameCross;
else {
var workID = workIds.substring(0, workIds.indexOf(","));
url = "../ReturnWork.htm?FK_Node=" + fk_node + "&WorkID=" + workID + "&WorkIDs=" + workIds + "&s=" + Math.random() + "&isFrameCross=" + isFrameCross;
}
OpenBootStrapModal(url, "ReturnModel", "退回", 600, 400, null, null, null, null, function () {
SetHref(GetHrefUrl().replace("#", ""));
});
}
function Btn_Delete() {
if (window.confirm('您确定要执行本次批处理删除操作吗?') == false)
return;
var workIds = GetWorkIDs();
if (workIds == "") {
alert("选择需要退回的流程数据");
return;
}
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_Batch");
handler.AddPara("WorkIDs", workIds);
var data = handler.DoMethodReturnString("Batch_Delete");
if (data.indexOf("err@") != -1) {
alert(data);
return;
}
$("#batchModal").modal().show();
// $("#batchModal").find('.modal-title').text(label);
data = data.replace(/@/g, '<br/>@');
$("#msgContent").html(data);
$('#batchModal').on('hidden.bs.modal', function () {
Reload();
});
$("#batchModal").modal("hidden");
}
function GetWorkIDs() {
var workIds = "";
//获取退回数据的行数
$("input[type='checkbox']:checked").each(function () {
var id = $(this).attr('id');
if (id != null && id != undefined) {
isHave = true;
workid = id.replace("CB_", "");
workIds += workid + ",";
}
});
if (workIds != "")
workIds = workIds.substring(0, workIds.length - 1);
return workIds;
}
//返回上一级页面
function SetHref(url) {
window.location.href = url
}
function Btn_Back() {
var type = GetQueryString("Type");
if (type == 0)
SetHref("../../Batch.htm");
else if (type == 1)
SetHref("../../Batch.htm?FK_Node=" + GetQueryString("FK_Node"));
else
SetHref("../../Batch.htm");
}
function InitMapAttr(mapAttr) {
alert(mapAttr)
}
function InitMapAttrOfCtrl(mapAttr, dtl, pkval) {
var str = '';
var defValue = ConvertDefVal(mapAttr, dtl);
return defValue;
var isInOneRow = false; //是否占一整行
var islabelIsInEle = false; //
var eleHtml = '';
//外部数据源类型.
if (mapAttr.LGType == "0" && mapAttr.MyDataType == "1" && mapAttr.UIContralType == "1") {
//枚举类型.
if (mapAttr.UIIsEnable == 1)
enableAttr = "";
else
enableAttr = "disabled='disabled'";
return "<select style='width:" + mapAttr.UIWidth * 2 + "px' class='form-control' id='DDL_" + pkval + "_" + mapAttr.KeyOfEn + "' name='DDL_" + pkval + "_" + mapAttr.KeyOfEn + "' " + (mapAttr.UIIsEnable == 1 ? '' : 'disabled="disabled"') + ">" + InitDDLOperation(frmData, mapAttr, defValue) + "</select>";
}
//外键类型.
if (mapAttr.LGType == "2" && mapAttr.MyDataType == "1") {
//枚举类型.
if (mapAttr.UIIsEnable == 1)
enableAttr = "";
else
enableAttr = "disabled='disabled'";
return "<select style='width:" + mapAttr.UIWidth * 2 + "px' class='form-control' id='DDL_" + pkval + "_" + mapAttr.KeyOfEn + "' name='DDL_" + pkval + "_" + mapAttr.KeyOfEn + "' " + (mapAttr.UIIsEnable == 1 ? '' : 'disabled="disabled"') + ">" + InitDDLOperation(frmData, mapAttr, defValue) + "</select>";
}
//外部数据类型.
if (mapAttr.LGType == "0" && mapAttr.MyDataType == "1" && mapAttr.UIContral == 1) {
//枚举类型.
if (mapAttr.UIIsEnable == 1)
enableAttr = "";
else
enableAttr = "disabled='disabled'";
return "<select style='width:" + mapAttr.UIWidth * 2 + "px' class='form-control' id='DDL_" + pkval + "_" + mapAttr.KeyOfEn + "' name='DDL_" + pkval + "_" + mapAttr.KeyOfEn + "' " + (mapAttr.UIIsEnable == 1 ? '' : 'disabled="disabled"') + ">" + InitDDLOperation(frmData, mapAttr, defValue) + "</select>";
}
//添加文本框 ,日期控件等
//AppString
if (mapAttr.MyDataType == "1" && mapAttr.UIContralType == 0) { //不是外键
// alert(mapAttr.UIWidth);
if (mapAttr.UIHeight <= 40) //普通的文本框.
{
var enableAttr = '';
if (mapAttr.UIIsEnable == 0)
enableAttr = "disabled='disabled'";
return "<input class='form-control' maxlength=" + mapAttr.MaxLen + " name='TB_" + pkval + "_" + mapAttr.KeyOfEn + "' id='TB_" + pkval + "_" + mapAttr.KeyOfEn + "' value='" + defValue + "' style='width:" + mapAttr.UIWidth + "px;height:23px;' type='text' " + enableAttr + " />";
}
//普通的大块文本.
return "<textarea class='form-control' maxlength=" + mapAttr.MaxLen + " style='height:" + mapAttr.UIHeight + "px;width:" + mapAttr.UIWidth + "px;' name='TB_" + pkval + "_" + mapAttr.KeyOfEn + "' id='TB_" + pkval + "_" + mapAttr.KeyOfEn + "' type='text' " + (mapAttr.UIIsEnable == 1 ? '' : ' disabled="disabled"') + " >" + defValue + "</textarea>"
}
//日期类型.
if (mapAttr.MyDataType == 6) {
var enableAttr = '';
if (mapAttr.UIIsEnable == 1)
enableAttr = 'onfocus="WdatePicker({dateFmt:' + "'yyyy-MM-dd'})" + '";';
else
enableAttr = "disabled='disabled'";
return "<input class='form-control' " + enableAttr + " value='" + defValue + "' style='width:105px;' name='TB_" + pkval + "_" + mapAttr.KeyOfEn + "' type='text' />";
}
//时期时间类型.
if (mapAttr.MyDataType == 7) {
var enableAttr = '';
if (mapAttr.UIIsEnable == 1)
enableAttr = 'onfocus="WdatePicker({dateFmt:' + "'yyyy-MM-dd HH:mm'})" + '";';
else
enableAttr = "disabled='disabled'";
return "<input class='form-control' type='text' value='" + defValue + "' style='width:120px;' " + enableAttr + " name='TB_" + pkval + "_" + mapAttr.KeyOfEn + "' />";
}
// boolen 类型.
if (mapAttr.MyDataType == 4) { // AppBoolean = 7
if (mapAttr.UIIsEnable == 1)
enableAttr = "";
else
enableAttr = "disabled='disabled'";
//CHECKBOX 默认值
var checkedStr = '';
if (checkedStr != "true" && checkedStr != '1') {
checkedStr = ' checked="checked" ';
}
checkedStr = "";
return "<input " + enableAttr + " value='" + defValue + "' " + (defValue == 1 ? "checked='checked'" : "") + " type='checkbox' id='CB_" + pkval + "_" + mapAttr.KeyOfEn + "' name='CB_" + pkval + "_" + mapAttr.KeyOfEn + "' " + checkedStr + " /><span for='CB_" + pkval + "_" + mapAttr.KeyOfEn + "' >" + mapAttr.Name + "</span>";
}
//枚举类型.
if (mapAttr.MyDataType == 2 && mapAttr.LGType == 1) { //AppInt Enum
if (mapAttr.UIIsEnable == 1)
enableAttr = "";
else
enableAttr = "disabled='disabled'";
return "<select style='width:" + mapAttr.UIWidth * 2 + "px' class='form-control' name='DDL_" + pkval + "_" + mapAttr.KeyOfEn + "' " + (mapAttr.UIIsEnable == 1 ? '' : 'disabled="disabled"') + ">" + InitDDLOperation(frmData, mapAttr, defValue) + "</select>";
}
// AppDouble AppFloat
if (mapAttr.MyDataType == 5 || mapAttr.MyDataType == 3) {
var enableAttr = '';
if (mapAttr.UIIsEnable != 1)
enableAttr = "disabled='disabled'";
// alert(mapAttr.KeyOfEn);
return "<input class='form-control' style='text-align:right;width:80px;' value='" + defValue + "' onkeyup=" + '"' + "if(isNaN(value)) execCommand('undo')" + '"' + " onafterpaste=" + '"' + "if(isNaN(value))execCommand('undo')" + '"' + " maxlength=" + mapAttr.MaxLen / 2 + " type='text'" + enableAttr + " name='TB_" + pkval + "_" + mapAttr.KeyOfEn + "'/>";
}
if ((mapAttr.MyDataType == 2)) { //AppInt
var enableAttr = '';
if (mapAttr.UIIsEnable == 0 || mapAttr.KeyOfEn == "NodeID") {
enableAttr = "disabled='disabled'";
}
return "<input class='form-control' style='text-align:right;width:80px;' value='" + defValue + "' onkeyup=" + '"' + "if(isNaN(value) || (value%1 !== 0))execCommand('undo')" + '"' + " onafterpaste=" + '"' + "if(isNaN(value) || (value%1 !== 0))execCommand('undo')" + '"' + " maxlength=" + mapAttr.MaxLen / 2 + " type='text'" + enableAttr + " name='TB_" + pkval + "_" + mapAttr.KeyOfEn + "'/>";
}
//AppMoney AppRate
if (mapAttr.MyDataType == 8) {
var enableAttr = '';
if (mapAttr.UIIsEnable == 1) {
} else {
enableAttr = "disabled='disabled'";
}
return "<input class='form-control' style='text-align:right;width:80px;' value='" + defValue + "' onkeyup=" + '"' + "if(isNaN(value))execCommand('undo')" + '"' + " onafterpaste=" + '"' + "if(isNaN(value))execCommand('undo')" + '"' + " maxlength=" + mapAttr.MaxLen / 2 + " type='text'" + enableAttr + " name='TB_" + pkval + "_" + mapAttr.KeyOfEn + "'/>";
}
alert(mapAttr.Name + "的类型没有判断.");
return;
}
//填充默认数据
function ConvertDefVal(attr, dtl) {
//通过MAINTABLE返回的参数
for (var ele in dtl) {
if (attr.KeyOfEn == ele && dtl != '') {
result = dtl[ele];
break;
}
}
if (result != undefined && typeof (result) == 'string') {
//result = result.replace(//g, "{").replace(//g, "}").replace(//g, ":").replace(//g, ",").replace(/【/g, "[").replace(/】/g, "]").replace(//g, ";").replace(/~/g, "'").replace(//g, "'").replace(//g, "'");
}
return result = unescape(result);
}
//初始化下拉列表框的OPERATION
function InitDDLOperation(flowData, mapAttr, defVal) {
var operations = '';
var data = flowData[mapAttr.KeyOfEn];
if (data == undefined)
data = flowData[mapAttr.UIBindKey];
if (data != undefined) {
$.each(data, function (i, obj) {
operations += "<option " + (obj.No == defVal ? " selected='selected' " : "") + " value='" + obj.No + "'>" + obj.Name + "</option>";
});
return operations;
}
//外键类型.
if (mapAttr.LGType == 2) {
var data = frmData[mapAttr.KeyOfEn];
if (data == undefined)
data = frmData[mapAttr.UIBindKey];
if (data == undefined) {
alert('没有获得约定的数据源..' + mapAttr.KeyOfEn + " " + mapAttr.UIBindKey);
return;
}
$.each(data, function (i, obj) {
operations += "<option " + (obj.No == defVal ? " selected='selected' " : "") + " value='" + obj.No + "'>" + obj.Name + "</option>";
});
}
//枚举类型.
if (mapAttr.LGType == 1) {
var enums = frmData.Sys_Enum;
enums = $.grep(enums, function (value) {
return value.EnumKey == mapAttr.UIBindKey;
});
$.each(enums, function (i, obj) {
operations += "<option " + (obj.IntKey == defVal ? " selected='selected' " : "") + " value='" + obj.IntKey + "'>" + obj.Lab + "</option>";
});
}
//外部数据源类型 MyFlowGener.js.InitDDLOperation
if (mapAttr.LGType == 0) {
var fn;
try {
if (mapAttr.UIBindKey) {
fn = cceval(mapAttr.UIBindKey);
}
} catch (e) {
}
if (typeof fn == "function") {
$.each(fn.call(), function (i, obj) {
operations += "<option " + (obj.No == defVal ? " selected='selected' " : "") + " value='" + obj.No + "'>" + obj.Name + "</option>";
});
} else if (typeof CommonHandler == "function") {
CommonHandler.call("", mapAttr.UIBindKey, function (data) {
GenerBindDDL("DDL_" + mapAttr.KeyOfEn, data, "No", "Name");
})
} else {
alert('没有获得约定的数据源..' + mapAttr.KeyOfEn + " " + mapAttr.UIBindKey);
//alert('没有获得约定的数据源.');
}
}
return operations;
}
function ReloadPage() {
window.location.reload();
}
</script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<h3 id="title"> </h3>
<div class="ibox-content">
<form id="divCCForm" method="post">
<table class="table table-striped table-hover table-bordered ">
<thead id="Table1"></thead>
<tbody id="Table2"></tbody>
</table>
<span id="ToEmps" style="display:none"></span>
</form>
<div class="row">
<div class="col-sm-12">
<span id="btnDiv"></span>
</div>
</div>
</div>
</div>
<div class="modal fade" id="batchModal" data-backdrop="static">
<div class="modal-dialog">
<div class="modal-content" style="border-radius:0px;width:700px; height:600px;text-align:center;">
<div class="modal-header">
<button type="button" class="close" id="btnMsgModalOK1" aria-hidden="true" style="color: white; opacity: 1; display: none;"> ×</button>
<h4 class="modal-title" id="modalHeader">批量处理</h4>
</div>
<div class="modal-body" style="text-align: left; word-wrap: break-word;">
<div style="width:100%; border: 0px; height: 490px;overflow-y:scroll" id="msgContent" name="iframePopModalForm">
</div>
<div style="text-align: right; margin-bottom:10px">
<button type="button" id="BatchOK" class="btn" data-dismiss="modal" onclick="ReloadPage()">
确定
</button>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<div class="modal fade" id="returnWorkModal" data-backdrop="static">
<div class="modal-dialog" style="width:97%;height:90%">
<div class="modal-content" style="height:90%">
<div class="modal-header">
<button type="button" style="color:#333;border: solid 1px #ccc !important;width: 32px;height: 32px; border-radius:4px;margin-top:-6px; margin-right:-6px; float: right;background: #f5f5f5;border: none;" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="modalHeader">选择接收人</h4>
</div>
<div class="modal-body" style="margin:0px;padding:0px;height:100%;">
<iframe style="width:100%;border:0px;height:100%;" id="iframeReturnWorkForm" name="iframeReturnWorkForm"></iframe>
</div>
</div><!-- /.modal-content -->'
</div><!-- /.modal-dialog -->'
</div>
<!--批量增加审核意见-->
<div class="modal fade" id="WorkCheckModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">请输入审核意见</h4>
</div>
<div class="modal-body">
<textarea id="TextArea" cols="20" rows="2" style="width: 350px; height: 150px; margin-top: 5px; overflow: hidden;"></textarea>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal"><img src="../../Img/Btn/cancel_dafalut.png" /> 取消</button>
<button type="button" onclick="ShowCheckMsg()"><img src="../../Img/Btn/Save.png" /> 保存</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
</body>
</html>