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.
231 lines
10 KiB
Plaintext
231 lines
10 KiB
Plaintext
11 months ago
|
<!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>
|
||
|
<meta charset="UTF-8" />
|
||
|
<title>考核规则</title>
|
||
|
<link href="../../Scripts/easyUI145/themes/default/easyui.css" rel="stylesheet" />
|
||
|
<script language="JavaScript" src="../../Comm/JScript.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
|
||
|
<script src="../../Scripts/QueryString.js" type="text/javascript"></script>
|
||
|
<link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
|
||
|
<!-- 引用通用的js文件. -->
|
||
|
<script type="text/javascript" src="../../Scripts/config.js"></script>
|
||
|
<script type="text/javascript" src="../../Comm/Gener.js"></script>
|
||
|
|
||
|
<link href="../../Style/skin/css/Default.css" rel="stylesheet" />
|
||
|
<link href="../../Style/skin/adminfont/iconfont.css" rel="stylesheet" />
|
||
|
<link href="../../Scripts/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||
|
|
||
|
<script src="../Admin.js"></script>
|
||
|
|
||
|
<script type="text/javascript" language="javascript">
|
||
|
//页面启动函数.
|
||
|
$(function () {
|
||
|
|
||
|
$("#Msg").html("正在加载,请稍后......");
|
||
|
|
||
|
//初始化groupID.
|
||
|
var nodeID = GetQueryString("FK_Node");
|
||
|
|
||
|
//调用公共类库的方法.
|
||
|
GenerBindEnumKey("DDL_TWay", "TWay", "1");
|
||
|
|
||
|
|
||
|
//执行.
|
||
|
var node = new Entity("BP.WF.Node", nodeID);
|
||
|
|
||
|
var fk_flow = node.FK_Flow.replace(/^0+/, "")
|
||
|
var FK_MapData = "ND" + fk_flow + "Rpt";
|
||
|
|
||
|
var mapAttrs = new Entities("BP.Sys.MapAttrs");
|
||
|
mapAttrs.Retrieve("FK_MapData", FK_MapData);
|
||
|
//按照时间点的考核方式
|
||
|
var CHWayOfTimeRole = node.GetPara("CHWayOfTimeRole");
|
||
|
if (CHWayOfTimeRole == null || CHWayOfTimeRole == undefined || CHWayOfTimeRole == '') {
|
||
|
$("input[name='RB_CHWayOfTimeRole'][value='0']").attr("checked", true);
|
||
|
|
||
|
} else {
|
||
|
$("input[name='RB_CHWayOfTimeRole'][value=" + CHWayOfTimeRole + "]").attr("checked", true);
|
||
|
|
||
|
}
|
||
|
//查询日期字段下拉框所有值
|
||
|
for (var i = 0; i < mapAttrs.length; i++) {
|
||
|
if (mapAttrs[i].MyDataType != 6 && mapAttrs[i].MyDataType != 7)
|
||
|
continue;
|
||
|
if (mapAttrs[i].KeyOfEn == "RDT" || mapAttrs[i].KeyOfEn == "CDT" || mapAttrs[i].KeyOfEn == "FlowEnderRDT" || mapAttrs[i].KeyOfEn == "FlowStartRDT")
|
||
|
continue;
|
||
|
$("#DDL_Fields").append("<option value=" + mapAttrs[i].KeyOfEn + ">" + mapAttrs[i].Name + "</option>");
|
||
|
}
|
||
|
//日期字段下拉框赋值
|
||
|
var CHWayOfTimeRoleField = node.GetPara("CHWayOfTimeRoleField");
|
||
|
if (CHWayOfTimeRoleField == null || CHWayOfTimeRoleField == undefined || CHWayOfTimeRoleField == '') {
|
||
|
$("#DDL_Fields").val(0);
|
||
|
} else {
|
||
|
$("#DDL_Fields").val(CHWayOfTimeRoleField);
|
||
|
}
|
||
|
//调用公共类库的方法:执行批量主表赋值
|
||
|
GenerFullAllCtrlsVal(node);
|
||
|
|
||
|
//
|
||
|
var str = $("#TB_TimeLimit").val();
|
||
|
if (str == null || str == "")
|
||
|
$("#TB_TimeLimit").val(0);
|
||
|
|
||
|
str = $("#TBPara_TimeLimitHH").val();
|
||
|
if (str == null || str == "")
|
||
|
$("#TBPara_TimeLimitHH").val(0);
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
function Save() {
|
||
|
|
||
|
var nodeID = GetQueryString("FK_Node");
|
||
|
|
||
|
//执行查询.
|
||
|
var node = new Entity("BP.WF.Node", nodeID);
|
||
|
node.CopyForm(); //复制表单数据.
|
||
|
|
||
|
var CHWayOfTimeRole = $('input:radio[name="RB_CHWayOfTimeRole"]:checked').val();
|
||
|
if (CHWayOfTimeRole == 0) {
|
||
|
var TimeLimit = $("#TB_TimeLimit").val();
|
||
|
var TimeLimitHH = $("#TBPara_TimeLimitHH").val();
|
||
|
var TimeLimitMM = $("#TBPara_TimeLimitMM").val();
|
||
|
if (isNaN(TimeLimit) || (TimeLimit % 1 !== 0)) {
|
||
|
alert("天数请输入整数!");
|
||
|
return;
|
||
|
}
|
||
|
if (isNaN(TimeLimitHH) || (TimeLimitHH % 1 !== 0)) {
|
||
|
alert("小时请输入整数!");
|
||
|
return;
|
||
|
}
|
||
|
if (isNaN(TimeLimitMM) || (TimeLimitMM % 1 !== 0)) {
|
||
|
alert("分钟请输入整数!");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
node.SetPara("CHWayOfTimeRole", CHWayOfTimeRole); //时间点考核方式
|
||
|
|
||
|
var CHWayOfTimeRoleField = $("#DDL_Fields").val();
|
||
|
|
||
|
node.SetPara("CHWayOfTimeRoleField", CHWayOfTimeRoleField); //按表单字段的字段
|
||
|
|
||
|
//节假日计算方式.
|
||
|
node.TWay = $("#DDL_TWay").val(); //节假日考核方式.
|
||
|
|
||
|
node.Update();
|
||
|
Reload();
|
||
|
|
||
|
}
|
||
|
function Back() {
|
||
|
SetHref( "EvaluationRole/1.ByTime.htm?FK_Node=" + GetQueryString("FK_Node"));
|
||
|
}
|
||
|
function testInt(obj) {
|
||
|
//var value = $("#TBPara_TimeLimitHH").val();
|
||
|
if (isNaN(obj.value) || (obj.value % 1 !== 0)) {
|
||
|
alert("请输入整数!");
|
||
|
};
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="container-full">
|
||
|
|
||
|
<div id="titleH4" class="attrnode-bar-header">
|
||
|
<span class="pull-right">
|
||
|
<button id="Btn_Save" class="cc-btn-tab btn-new" onclick="Save()">保存</button>
|
||
|
<button id="Btn_Back" class="cc-btn-tab btn-hlep" onclick="Back()">返回</button>
|
||
|
</span>
|
||
|
<strong>设置按照时间点的考核方式 </strong>
|
||
|
</div>
|
||
|
<form id="cc">
|
||
|
<table style="width: 100%;">
|
||
|
|
||
|
<tr>
|
||
|
<td>
|
||
|
<fieldset>
|
||
|
<legend style="display:flex;">
|
||
|
<input type="radio" value="0" id="RB_CHWayOfTimeRole_0" name="RB_CHWayOfTimeRole" />
|
||
|
<div for="RB_CHWayOfTimeRole_0">按时效考核</div>
|
||
|
</legend>
|
||
|
<!-- *********************************8 按时效考核 &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -->
|
||
|
|
||
|
|
||
|
<table style="width: 100%;">
|
||
|
<tr>
|
||
|
<td nowarp="true">
|
||
|
限期完成时限:
|
||
|
</td>
|
||
|
<td colspan="2">
|
||
|
<input type="text" id="TB_TimeLimit" name="TB_TimeLimit" style="width: 60px;border: none;border-bottom: thin solid #827c7ccc;border-radius: 0px;" min="0" onblur="testInt(this)" />天,
|
||
|
|
||
|
<input type="text" id="TBPara_TimeLimitHH" name="TBPara_TimeLimitHH" style="width: 60px;border: none;border-bottom: thin solid #827c7ccc;border-radius: 0px;" min="0" onblur="testInt(this)" />小时,
|
||
|
|
||
|
<input type="text" id="TBPara_TimeLimitMM" name="TBPara_TimeLimitMM" style="width: 60px;border: none;border-bottom: thin solid #827c7ccc;border-radius: 0px;" onblur="testInt(this)" />分钟
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
节假日
|
||
|
</td>
|
||
|
<td>
|
||
|
<select name="DDL_TWay" id="DDL_TWay">
|
||
|
</select>
|
||
|
</td>
|
||
|
<td>
|
||
|
<a href="javascript:WinOpen('../../Comm/Sys/Holiday.htm');">节假日维护</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan="4">
|
||
|
说明: WF_CH 这个表用于存储时效考核数据,您可以仔细研究该表的结构并做想用的考核数据的使用.
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
</fieldset>
|
||
|
|
||
|
|
||
|
<fieldset>
|
||
|
<legend style="display:flex;">
|
||
|
<input type="radio" value="1" id="RB_CHWayOfTimeRole_1" name="RB_CHWayOfTimeRole" />
|
||
|
<div for="RB_CHWayOfTimeRole_1">
|
||
|
按表单的表单字段计算.
|
||
|
</div>
|
||
|
</legend>
|
||
|
|
||
|
|
||
|
请选择日期字段:
|
||
|
|
||
|
<select id="DDL_Fields">
|
||
|
<option value="0">请选择</option>
|
||
|
</select>
|
||
|
|
||
|
<ul>
|
||
|
<li style="color: Gray"> 选择表单中的日期时间字段来计算。</li>
|
||
|
</ul>
|
||
|
</fieldset>
|
||
|
<!--<fieldset>
|
||
|
<legend>
|
||
|
<input type="radio" value="2" id="RB_CHWayOfTimeRole_2" name="RB_CHWayOfTimeRole">
|
||
|
<label for="RB_CHWayOfTimeRole_2">
|
||
|
流转自定义.
|
||
|
</label>
|
||
|
</legend>
|
||
|
<ul style="color: Gray">
|
||
|
<li>启用流转自定义时间点考核,则按照流转自定义设置的时间来计算节点完成时间。</li>
|
||
|
|
||
|
</ul>
|
||
|
</fieldset>-->
|
||
|
|
||
|
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</form>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|