You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
344 lines
16 KiB
344 lines
16 KiB
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>
|
||
|
<meta name="renderer" content="webkit" />
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||
|
<meta name="format-detection" content="telephone=no" />
|
||
|
<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
|
||
|
<link rel="stylesheet" href="/css/public.css" media="all" />
|
||
|
<link rel="stylesheet" href="../../css/bulletframe.css" media="all" />
|
||
|
<script type="text/javascript" src="/js/jquery-2.1.3.min.js"></script>
|
||
|
<script type="text/javascript" src="/js/jq_extend.js"></script>
|
||
|
<script src="/js/websocket/mqttws31.js" type="text/javascript"></script>
|
||
|
<script src="/js/websocket/iotpush.js" type="text/javascript"></script>
|
||
|
|
||
|
<style>
|
||
|
.layui-timeline-item:before {
|
||
|
width: 0 !important
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body class="childrenBody">
|
||
|
<div style="float:left;width:49%;height:100%;">
|
||
|
<fieldset class="layui-elem-field layui-field-title">
|
||
|
<legend>人员信息</legend>
|
||
|
</fieldset>
|
||
|
<form class="layui-form" style="width: 90%;">
|
||
|
<input class="layui-input ID" type="hidden" />
|
||
|
<input class="layui-input Action" type="hidden" />
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
姓名
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<input class="layui-input" id="ipt_Name" disabled=disabled />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
类型
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<input class="layui-input" id="ipt_Type" disabled=disabled />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
提交时间
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<input class="layui-input" id="ipt_Time" disabled=disabled />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
身份证号
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<input class="layui-input" id="ipt_ID" disabled=disabled />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
单位
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<input class="layui-input" id="ipt_OrgName" disabled=disabled />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
部门
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<input class="layui-input" id="ipt_DeptName" disabled=disabled />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
说明
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<span id="ipt_Remark"></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
|
||
|
<div class="layui-center">
|
||
|
<a class="layui-btn layui-btn-normal addNews_btn" style="margin-top:20px;" onclick="approval('1')" lay-submit=lay-submit>同意</a>
|
||
|
<a class="layui-btn layui-btn-danger addNews_btn" style="margin-top:20px;" onclick="approval('3')" lay-submit=lay-submit>拒绝</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="float:left;position: absolute;left: 50%;top: 0;z-index: 0;width: 2px;height: 100%;background: linear-gradient(rgba(52, 1, 255, .8), rgba(255,1,255,.8));"></div>
|
||
|
<div style="float:right;width:48%;height:100%;padding-left:20px">
|
||
|
<fieldset class="layui-elem-field layui-field-title">
|
||
|
<legend>流转信息</legend>
|
||
|
</fieldset>
|
||
|
<ul id="stepMsg" class="layui-timeline"></ul>
|
||
|
</div>
|
||
|
<script type="text/javascript" src="/layui/layui.js"></script>
|
||
|
<script src="/js/remsg.js" type="text/javascript"></script>
|
||
|
<link rel="stylesheet" href="../../css/bulletframebg.css" media="all" />
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
layui.use(['form', 'layer', 'table', 'laytpl', 'laydate'], function () {
|
||
|
var form = layui.form,
|
||
|
layer = parent.layer === undefined ? layui.layer : top.layer,
|
||
|
$ = layui.jquery,
|
||
|
laytpl = layui.laytpl,
|
||
|
table = layui.table;
|
||
|
laydate = layui.laydate;
|
||
|
|
||
|
var userInfo = JSON.parse(window.sessionStorage.getItem("userInfo"));
|
||
|
var userUid = userInfo.UserCode;
|
||
|
var empId = userInfo.EmpId;
|
||
|
var userName = userInfo.USERS_NAME;
|
||
|
var orgId = userInfo.OrgID;
|
||
|
var orgName = userInfo.OrgName;
|
||
|
|
||
|
// 信息ID
|
||
|
var cid = $.getUrlVar("cid");
|
||
|
var mid = $.getUrlVar("mid");
|
||
|
var type = $.getUrlVar("type");
|
||
|
var item = null;
|
||
|
|
||
|
var cacheOrgArr = [];
|
||
|
// 获取所有组织机构
|
||
|
$.ajax({
|
||
|
type: "post",
|
||
|
url: "/ashx/OAEmpApprovalHandler.ashx",
|
||
|
async: false,
|
||
|
data: { Action: "GetAllOrg" },
|
||
|
dataType: "json",
|
||
|
success: function (result) {
|
||
|
console.log('获取组织机构信息');
|
||
|
// console.log(result);
|
||
|
cacheOrgArr = result.data;
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
$.ajax({
|
||
|
type: "post",
|
||
|
url: "/ashx/OAEmpApprovalHandler.ashx",
|
||
|
data: { Action: "GetApprovalDetails", mId: cid },
|
||
|
dataType: "json",
|
||
|
success: function (res) {
|
||
|
|
||
|
console.log(res);
|
||
|
|
||
|
var leaveData = res.data1;
|
||
|
if (leaveData.length > 0) {
|
||
|
item = leaveData[0];
|
||
|
$("#ipt_Name").val(leaveData[0].EMP_NAME);
|
||
|
//缓存数据信息类型:1、新增;2、跨区调整;3、删除;
|
||
|
switch (leaveData[0].CACHE_TYPE) {
|
||
|
case "1":
|
||
|
$("#ipt_Type").val("新增审批");
|
||
|
break;
|
||
|
case "2":
|
||
|
$("#ipt_Type").val("调整审批");
|
||
|
break;
|
||
|
case "3":
|
||
|
$("#ipt_Type").val("删除审批");
|
||
|
break;
|
||
|
}
|
||
|
$("#ipt_Time").val(leaveData[0].CREATETIME);
|
||
|
$("#ipt_ID").val(leaveData[0].IDNUMBER);
|
||
|
|
||
|
for (var i = 0; i < cacheOrgArr.length; i++) {
|
||
|
if (cacheOrgArr[i].ORG_ID == leaveData[0].ORG_ID) {
|
||
|
$("#ipt_OrgName").val(cacheOrgArr[i].ORG_NAME);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
for (var i = 0; i < cacheOrgArr.length; i++) {
|
||
|
if (cacheOrgArr[i].ORG_ID == leaveData[0].DEPT_ID) {
|
||
|
$("#ipt_DeptName").val(cacheOrgArr[i].ORG_NAME);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
$("#ipt_Remark").text(leaveData[0].CACHE_REMARK);
|
||
|
}
|
||
|
|
||
|
var waitData = res.data2;
|
||
|
waitData.forEach(function (obj, index, arr) {
|
||
|
countSum = index;
|
||
|
var color = "", state = "";
|
||
|
var li = "<li class='layui-timeline-item'>";
|
||
|
// 状态: 0、待审批;1、审批中;2、同意;3、不同意
|
||
|
switch (obj.OP_STATUS) {
|
||
|
case "0":
|
||
|
li += "<i class='layui-icon layui-icon-circle' style='color:black'></i>";
|
||
|
color = "black";
|
||
|
state = "待处理"
|
||
|
break;
|
||
|
case "2":
|
||
|
li += "<i class='layui-icon layui-icon-ok-circle' style='color:green;font-size:30px'></i>";
|
||
|
color = "green";
|
||
|
state = "同意"
|
||
|
break;
|
||
|
case "3":
|
||
|
li += "<i class='layui-icon layui-icon-close-fill' style='color:red;font-size:30px'></i>";
|
||
|
color = "red";
|
||
|
state = "不同意"
|
||
|
break;
|
||
|
}
|
||
|
li += "<div class='layui-timeline-content layui-text'>";
|
||
|
li += "<h4 class='layui-timeline-title' style='font-size: 16px;'><span style='color:" + color + "'>【" + state + "】</span></h4>";
|
||
|
if (obj.OP_STATUS == "0") {
|
||
|
li += "<p>处理人:" + obj.JS_NAME + "</p>";
|
||
|
} else {
|
||
|
li += "<p>处理人:" + obj.CL_NAME + "</p>";
|
||
|
}
|
||
|
if (obj.OP_STATUS != "0") {
|
||
|
li += "<p>审批时间:" + obj.COMPLETEDTIME + "</p>";
|
||
|
li += "<p>审批意见:" + obj.OP_COMMENT + "</p>";
|
||
|
}
|
||
|
li += "</div></li>"
|
||
|
//if (obj.TASK_TYPE == 'oaLeave') {
|
||
|
$("#stepMsg").append(li);
|
||
|
//} else if (obj.TASK_TYPE == 'oaLeaveCancel') {
|
||
|
// $("#stepMsg2").append(li);
|
||
|
//}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
approval = function (status) {
|
||
|
if (status != "3") {
|
||
|
status = type + "";
|
||
|
}
|
||
|
if (item != null) {
|
||
|
var tips1 = status == "3" ? "不同意" : "同意";
|
||
|
var tips2 = "新增";
|
||
|
switch (item.CACHE_TYPE) {
|
||
|
case "2":
|
||
|
tips2 = "跨区调整";
|
||
|
break;
|
||
|
case "3":
|
||
|
tips2 = "删除";
|
||
|
break;
|
||
|
}
|
||
|
layer.confirm(tips1 + '【' + item.EMP_NAME + '】的' + tips2 + '操作申请?', { icon: 3, title: '提示信息' }, function (index) {
|
||
|
layer.close(index);
|
||
|
layui.layer.open({
|
||
|
type: 2,
|
||
|
title: '审批人选择',
|
||
|
area: ['460px', '300px'],
|
||
|
content: 'Approver.html',
|
||
|
btn: ['确定'],
|
||
|
end: function () {//弹出层关闭事件
|
||
|
layui.layer.closeAll();
|
||
|
},
|
||
|
success: function (layero, index) {
|
||
|
if (status == "1") {
|
||
|
var body = layui.layer.getChildFrame('body', index);
|
||
|
body.find("#isShow").show();
|
||
|
}
|
||
|
},
|
||
|
yes: function (index, layero) {
|
||
|
var body = layui.layer.getChildFrame('body', index);
|
||
|
var nextStepUid = "", nextStepName = "", nextStepOrgId = "";
|
||
|
if (status == "1") {
|
||
|
var nextStepInfo = body.find("#cert").val().split(",");
|
||
|
var nextStepUid = nextStepInfo[0];
|
||
|
var nextStepName = nextStepInfo[1];
|
||
|
var nextStepOrgId = nextStepInfo[2];
|
||
|
if (nextStepUid == null || nextStepUid == ""
|
||
|
|| nextStepName == null || nextStepName == "") {
|
||
|
layer.msg("请选择审批人!", { icon: 2 });
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
var opComment = body.find("#opComment").val();
|
||
|
if (opComment == null || opComment == "") {
|
||
|
layer.msg("请填写审批意见!", { icon: 2 });
|
||
|
return false;
|
||
|
}
|
||
|
approvalRes = "";
|
||
|
|
||
|
var htmlstr = '<div style="max-height:500px;"><span style="color:#eaa230;">请注意:仔细确认审批情况!</span><br>';
|
||
|
ajaxApproval(item, nextStepUid, nextStepName, nextStepOrgId, opComment, status);
|
||
|
|
||
|
htmlstr += approvalRes + '</div>';
|
||
|
layer.confirm(htmlstr, { icon: 3, title: '提示' }, function (index) {
|
||
|
parent.layer.closeAll();
|
||
|
layui.layer.closeAll();
|
||
|
layer.closeAll();
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
} else {
|
||
|
top.layer.msg("数据异常,无法审批!", { icon: 2, time: 1800 });
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function ajaxApproval(item, nextStepUid, nextStepName, nextStepOrgId, opComment, status) {
|
||
|
$.ajax({
|
||
|
type: "post",
|
||
|
url: "../../ashx/SysEmpMoveHandle.ashx",
|
||
|
async: false,
|
||
|
data: {
|
||
|
Action: "approval",
|
||
|
cid: cid,
|
||
|
mid: mid,
|
||
|
userUid: userUid,
|
||
|
empId: empId,
|
||
|
userName: userName,
|
||
|
opComment: opComment,
|
||
|
opStatus: status,
|
||
|
nextStepUid: nextStepUid,
|
||
|
nextStepName: nextStepName,
|
||
|
nextStepOrgId: nextStepOrgId,
|
||
|
nextStepOrgName: '',
|
||
|
orgId: orgId,
|
||
|
orgName: orgName,
|
||
|
cacheType: item.CACHE_TYPE,
|
||
|
empName: item.EMP_NAME
|
||
|
},
|
||
|
dataType: "json",
|
||
|
success: function (res) {
|
||
|
if (res.code == 0) {
|
||
|
approvalRes += '<div>' + res.msg + '</div><br>';
|
||
|
} else {
|
||
|
approvalRes += '<div style="color:red;">' + res.msg + '</div><br>';
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
})
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
</html>
|