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.
244 lines
8.9 KiB
244 lines
8.9 KiB
9 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" />
|
||
|
|
||
|
<script src="/js/jquery-2.1.3.min.js"></script>
|
||
|
<link rel="stylesheet" href="/css/ztree/metro/ztree.css" />
|
||
|
<link rel="stylesheet" href="/js/layui/css/layui.css" media="all" />
|
||
|
<link rel="stylesheet" href="/css/public.css" media="all" />
|
||
|
<link href="/Index/css/zhgl-style.css" rel="stylesheet" />
|
||
|
<link rel="stylesheet" href="/css/right-list.css" media="all" />
|
||
|
<link rel="stylesheet" href="/css/bulletframebg.css" media="all" />
|
||
|
<script type="text/javascript" src="/js/layui/layui.js"></script>
|
||
|
<style>
|
||
|
.searchVal {
|
||
|
width: 200px;
|
||
|
}
|
||
|
|
||
|
.layui-laypage {
|
||
|
margin: 10px 20%;
|
||
|
}
|
||
|
|
||
|
.ztree {
|
||
|
overflow: auto;
|
||
|
}
|
||
|
|
||
|
.layui-layer-btn {
|
||
|
background-color: #164D6A;
|
||
|
}
|
||
|
|
||
|
.layui-layer-content {
|
||
|
background-color: #164D6A;
|
||
|
}
|
||
|
|
||
|
.layui-form-label {
|
||
|
width: 100px;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body style="border: 1px solid #0c6f89;
|
||
|
background: rgba(12, 70, 100, 0.8);
|
||
|
padding: 20px;
|
||
|
box-sizing: border-box;
|
||
|
">
|
||
|
<div style="float:left;width:100%;height:100%;">
|
||
|
<form class="layui-form" style="width: 99%;">
|
||
|
<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">
|
||
|
<select id="pplName" lay-filter="pplName" lay-search="">
|
||
|
<option value="">---申请人---</option>
|
||
|
</select>
|
||
|
</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="pplId" readonly="readonly" />
|
||
|
</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="title" readonly="readonly" />
|
||
|
</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="sTime" />
|
||
|
</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="eTime" />
|
||
|
</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="lNum" />
|
||
|
</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="reason" />
|
||
|
</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="lOut" />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item layui-row layui-col-xs12">
|
||
|
<label class="layui-form-label">
|
||
|
审批人
|
||
|
</label>
|
||
|
<div class="layui-input-block">
|
||
|
<select id="app_pplId" lay-filter="app_pplId" lay-search="">
|
||
|
<option value="">---审批人---</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div class="layui-form-item">
|
||
|
<div class="layui-input-block">
|
||
|
<button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1" id="btn_save">保存</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
layui.config({
|
||
|
base: '/js/'
|
||
|
}).use(['ztree', 'form', 'layer', 'table', 'laytpl', 'laydate', 'laypage'], function () {
|
||
|
|
||
|
var form = layui.form;
|
||
|
var laydate = layui.laydate;
|
||
|
|
||
|
laydate.render({ elem: '#sTime', type: 'datetime', value: new Date() });
|
||
|
laydate.render({ elem: '#eTime', type: 'datetime', value: new Date() });
|
||
|
|
||
|
//获取Url参数
|
||
|
function getParameterByName(name) {
|
||
|
var params = {};
|
||
|
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
|
||
|
params[key] = value;
|
||
|
});
|
||
|
return params[name] || '';
|
||
|
}
|
||
|
|
||
|
var OrgId = getParameterByName('orgId');
|
||
|
//申请人切换
|
||
|
form.on('select(pplName)', function (data) {
|
||
|
//console.log(data);
|
||
|
$("#pplId").val(data.value);
|
||
|
//选择信息
|
||
|
var tag = $('#pplName option:selected').text();
|
||
|
if (tag == "---申请人---") {
|
||
|
$("#title").val("");
|
||
|
} else {
|
||
|
$("#title").val(tag + "的公差申请");
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
//初始化树
|
||
|
$(function () {
|
||
|
|
||
|
$.ajax({
|
||
|
type: "post",
|
||
|
url: "/ashx/SysEmpHandler.ashx",
|
||
|
data: { Action: 'OrgEmpList', random: new Date().getTime(), OrgId: OrgId, is_admin: 0, IsAdmin: 1, is_content: 1, limit: 999 },
|
||
|
dataType: "json",
|
||
|
success: function (res) {
|
||
|
//console.log(res);
|
||
|
var htmlStr = '';
|
||
|
res.data.forEach(function (obj, index, arr) {
|
||
|
htmlStr += "<option value='" + obj.EMP_MOBILE + "'>" + obj.EMP_NAME + "</option>";
|
||
|
});
|
||
|
$("#pplName").append(htmlStr);
|
||
|
$("#app_pplId").append(htmlStr);
|
||
|
|
||
|
form.render('select');
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
$("#btn_save").click(function () {
|
||
|
|
||
|
$.ajax({
|
||
|
type: "post",
|
||
|
url: "/ashx/AppFlowHandler.ashx",
|
||
|
data: {
|
||
|
Action: 'AppToleranceTaskApply'
|
||
|
, random: new Date().getTime()
|
||
|
, extend2: 1
|
||
|
, pplId: $("#pplId").val()
|
||
|
, pplName: $('#pplName option:selected').text()
|
||
|
, lType: "ee62a186-336f-4984-b650-fd9826ad82cd"
|
||
|
, sTime: $("#sTime").val()
|
||
|
, eTime: $("#eTime").val()
|
||
|
, lNum: $("#lNum").val()
|
||
|
, reason: $("#reason").val()
|
||
|
, title: $("#title").val()
|
||
|
, app_pplId: $("#app_pplId").val()
|
||
|
, opation: "apply"
|
||
|
, receiveId: $("#app_pplId").val()
|
||
|
, groupid: "734389c7ae364584aea9918693bba3de"
|
||
|
, issign: 0
|
||
|
, senderId: $("#pplId").val()
|
||
|
},
|
||
|
dataType: "json",
|
||
|
success: function (res) {
|
||
|
|
||
|
top.layer.msg("OK", { time: 1800 });
|
||
|
var index = parent.layer.getFrameIndex(window.name);
|
||
|
parent.layer.close(index);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
</html>
|