<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
+ path + "/";
|
%>
|
|
<!DOCTYPE HTML>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
<meta charset="UTF-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<title>选择相对关系</title>
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/styles/material-teal.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/common.css" type="text/css">
|
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
<style>
|
.item {
|
width: 50%;
|
float: left;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="" style="padding:10px 30px 0;">
|
<div style="margin-bottom:10px;" class="clear">
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER" labelPosition="after" labelWidth="250" label="起草人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DEPT_MEMBER" labelPosition="after" labelWidth="250"
|
label="起草人部门成员">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DEPT_FIRST" labelPosition="after" labelWidth="250"
|
label="起草人部门第一负责人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DEPT_SECOND" labelPosition="after" labelWidth="250"
|
label="起草人部门副职领导">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DEPT_ALL" labelPosition="after" labelWidth="250"
|
label="起草人部门全部领导">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DEPT_RECEIVER" labelPosition="after" labelWidth="250"
|
label="起草人部门文件接收人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" labelPosition="after" id="START_USER_UP_UP_DEPT_LEADER" labelWidth="250"
|
label="起草部门的上级分管领导">
|
</p>
|
<%-- <p class="item">--%>
|
<%-- <input class="easyui-checkbox" id="START_USER_UP_DEPT_LEADER" labelPosition="after" labelWidth="250"--%>
|
<%-- label="起草人的上级部门领导">--%>
|
<%-- </p>--%>
|
</div>
|
|
<div style="margin-bottom:10px;" class="clear">
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DIVISION_DEPT_FIRST" labelPosition="after" labelWidth="250"
|
label="起草人处室第一负责人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DIVISION_DEPT_SECOND" labelPosition="after" labelWidth="250"
|
label="起草人处室副职领导">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DIVISION_DEPT_ALL" labelPosition="after" labelWidth="250"
|
label="起草人处室全部领导">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_DIVISION_DEPT_RECEIVER" labelPosition="after" labelWidth="250"
|
label="起草人处室文件接收人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" labelPosition="after" id="START_USER_UP_UP_DIVISION_DEPT_LEADER"
|
labelWidth="250"
|
label="起草人处室上级分管领导">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="START_USER_UP_DIVISION_DEPT_LEADER" labelPosition="after"
|
labelWidth="280"
|
label="起草人处室上级部门领导(公司全部领导)">
|
</p>
|
</div>
|
|
<div style="margin-bottom:10px;" class="clear">
|
<p class="item">
|
<input class="easyui-checkbox" id="LAST_USER" labelPosition="after" labelWidth="250" label="上一节点处理人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="LAST_USER_DEPT_MEMBER" labelPosition="after" labelWidth="250"
|
label="上一节点处理人部门成员">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="LAST_USER_DEPT_FIRST" labelPosition="after" labelWidth="250"
|
label="上一节点处理人部门第一负责人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="LAST_USER_DEPT_SECOND" labelPosition="after" labelWidth="250"
|
label="上一节点处理人部门副职领导">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="LAST_USER_DEPT_ALL" labelPosition="after" labelWidth="250"
|
label="上一节点处理人部门全部领导">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="LAST_USER_DEPT_RECEIVER" labelPosition="after" labelWidth="250"
|
label="上一节点处理人部门文件接收人">
|
</p>
|
<p class="item">
|
<input class="easyui-checkbox" id="LAST_USER_UP_UP_DEPT_LEADER" labelPosition="after" labelWidth="250"
|
label="上一节点处理人部门的上级分管领导">
|
</p>
|
<%-- <p class="item">--%>
|
<%-- <input class="easyui-checkbox" id="LAST_USER_UP_DEPT_LEADER" labelPosition="after" labelWidth="250"--%>
|
<%-- label="上一节点处理人的上级部门领导">--%>
|
<%-- </p>--%>
|
</div>
|
<div style="margin: 15px 0px;">
|
<select id="RELATION_GROUP" class="easyui-combobox" name="" label="关联群组:" labelPosition="right" labelWidth="80"
|
panelHeight="150" labelAlign="right" style="width:270px;" editable="false">
|
<option value="" selected>无</option>
|
<option value="FIELD_DEPT">从字段中获取部门</option>
|
<option value="START_USER_DEPT">起草人所在部门</option>
|
<option value="LAST_USER_DEPT">上一节点处理人所在部门</option>
|
</select>
|
<select id="RELATION_GROUP_TYPE" class="easyui-combobox" name="" panelHeight="150" style="width:100px;"
|
editable="false">
|
<option value="GROUPNAME" selected>群组名称</option>
|
<option value="GROUPNUM">群组编码</option>
|
</select>
|
<input id="RELATION_GROUP_NAME" class="easyui-textbox" style="width:150px">
|
</div>
|
<div>
|
<select id="OTHER" class="easyui-combobox" name="" label="其他节点的办理人" labelPosition="right" labelWidth="180"
|
panelHeight="150" labelAlign="right" style="width:100%;" editable="false">
|
<option value="0" selected>无</option>
|
</select>
|
</div>
|
</div>
|
|
<div class="pt-form-btn" style="bottom:0;">
|
<div class="form-group">
|
<button class="pt-btn pt-btn-primary" onclick="save();">确定</button>
|
<button class="pt-btn pt-btn-default" onclick="cancel();">取消</button>
|
</div>
|
|
</div>
|
|
<script>
|
var params = {
|
idElement: null,
|
nameElement: null,
|
callback: null
|
};
|
|
$(function () {
|
var userTaskList = [{
|
"id": 0,
|
"text": "无"
|
}];
|
|
var uTlist = parent.document.getElementById("hide_uTlist").value;
|
uTlist = JSON.parse(uTlist);
|
userTaskList.push.apply(userTaskList, uTlist);
|
|
$("#OTHER").combobox({
|
data: userTaskList,
|
label: "其他节点的办理人",
|
labelPosition: "right",
|
labelWidth: 120,
|
panelHeight: 150,
|
labelAlign: "right",
|
valueField: 'id',
|
textField: 'text'
|
});
|
});
|
|
function initData(dealIdFromRelationship) {
|
//初始化数据
|
if (dealIdFromRelationship) {
|
var items = dealIdFromRelationship.split(',');
|
for (var i = 0; i < items.length; i++) {
|
if (items[i].indexOf("OTHER") > -1) {
|
var value = items[i].split('|')[1];
|
$("#OTHER").combobox("setValue", value);
|
} else if (items[i].indexOf("RELATIONGROUP") > -1) {
|
var value = items[i].split('|')[1];
|
var valArr = value.split("^");
|
|
if (valArr.length == 3) {
|
$("#RELATION_GROUP").combobox("setValue", valArr[0]);
|
$("#RELATION_GROUP_TYPE").combobox("setValue", valArr[1]);
|
$("#RELATION_GROUP_NAME").textbox("setValue", valArr[2]);
|
} else {
|
$("#RELATION_GROUP").combobox("setValue", "");
|
$("#RELATION_GROUP_TYPE").combobox("setValue", valArr[0]);
|
$("#RELATION_GROUP_NAME").textbox("setValue", valArr[1]);
|
}
|
} else {
|
$("#" + items[i]).checkbox("check");
|
}
|
}
|
}
|
}
|
|
function cancel() {
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
parent.layer.close(index);
|
}
|
|
//保存
|
function save() {
|
var value = "";
|
var text = "";
|
$(".easyui-checkbox").each(function (index, elem) {
|
if ($(elem).checkbox("options").checked) {
|
value += elem.id + ",";
|
text += $(elem).attr("label") + ",";
|
}
|
})
|
if (value != "") {
|
value = value.slice(0, -1);
|
text = text.slice(0, -1);
|
}
|
|
var comRelationGroupValue = $("#RELATION_GROUP").combobox("getValue");
|
var comRelationGroupText = $("#RELATION_GROUP").combobox("getText");
|
var comRelationGroupTypeValue = $("#RELATION_GROUP_TYPE").combobox("getValue");
|
var comRelationGroupTypeText = $("#RELATION_GROUP_TYPE").combobox("getText");
|
var relationGroupName = $("#RELATION_GROUP_NAME").textbox("getValue").trim();
|
if (relationGroupName != "") {
|
if (value != "") {
|
value += ",";
|
text += ",";
|
}
|
|
value += "RELATIONGROUP|";
|
if (comRelationGroupValue != "") {
|
value += comRelationGroupValue + "^";
|
text += comRelationGroupText + "的";
|
}
|
|
value += comRelationGroupTypeValue + "^" + relationGroupName;
|
text += comRelationGroupTypeText + "为“" + relationGroupName + "”的群组";
|
}
|
|
var comValue = $("#OTHER").combobox("getValue");
|
var comText = $("#OTHER").combobox("getText");
|
if (comValue != 0) {
|
if (value != "") {
|
value += ",";
|
text += ",";
|
}
|
|
value += "OTHER|" + comValue;
|
text += comText;
|
}
|
|
if (params.idElement != null) {
|
parent.document.getElementById(params.idElement).value = value;
|
}
|
if (params.nameElement != null) {
|
parent.$("#" + params.nameElement).textbox("setValue", text);
|
}
|
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
parent.layer.close(index);
|
}
|
</script>
|
</body>
|
</html>
|