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.
223 lines
8.3 KiB
223 lines
8.3 KiB
<!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" />
|
|
|
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
<meta http-equiv="Pragma" content="no-cache" />
|
|
<meta http-equiv="Expires" content="0" />
|
|
<meta http-equiv="Cache" content="no-cache" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
|
<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
|
|
<link rel="stylesheet" href="/css/public.css" media="all" />
|
|
<link rel="stylesheet" href="/iconfont/iconfont.css" media="all" />
|
|
<link rel="stylesheet" href="/css/bulletframe.css" media="all" />
|
|
<script src="/js/jquery-2.1.3.min.js" type="text/javascript"></script>
|
|
<script src="/js/jquery.cookie.js" type="text/javascript"></script>
|
|
<script type="text/javascript" src="/js/jq_extend.js"></script>
|
|
|
|
|
|
<style>
|
|
|
|
.layui-input-inline {
|
|
width: 360px;
|
|
}
|
|
|
|
.layui-inline {
|
|
line-height: 50px;
|
|
}
|
|
|
|
.driverdisplay {
|
|
display: none;
|
|
}
|
|
|
|
.redflag {
|
|
color: red;
|
|
}
|
|
|
|
.layui-upload-list {
|
|
margin: 10px 40px;
|
|
}
|
|
|
|
.layui-form-checkbox[lay-skin=primary] span {
|
|
color: #fff;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="childrenBody">
|
|
<form class="layui-form" style=" width: 100%;">
|
|
<input class="layui-input ID" type="hidden" />
|
|
<input class="layui-input Action" type="hidden" />
|
|
<input id="during_access_period_hidden" class="layui-input" type="hidden" />
|
|
<br />
|
|
|
|
<div style="width:95%;">
|
|
<div class="layui-form-item layui-row layui-col-xs12">
|
|
<label class="layui-form-label">
|
|
审批人
|
|
</label>
|
|
<div class="layui-input-block">
|
|
<select id="spEmp" lay-search="" class="ipttycls">
|
|
<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">
|
|
<textarea placeholder="请输入内容" class="layui-textarea" id="ipt_remark" maxlength="80" style="height:40px;"></textarea>
|
|
</div>
|
|
</div>-->
|
|
</div>
|
|
<div style="clear: both;"></div>
|
|
<!--<div class="layui-center">
|
|
<a class="layui-btn layui-btn-normal addNews_btn ipttycls btntycls" style="margin-top:20px;" lay-filter="AddEdit" lay-submit=lay-submit>提交</a>
|
|
</div>-->
|
|
<div style="text-align:center;">
|
|
<a class="layui-btn layui-btn-normal import_btn" id="import_btn1">上传文件</a>
|
|
</div>
|
|
<br />
|
|
</form>
|
|
<script type="text/javascript" src="/layui/layui.js"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
layui.config({
|
|
base: './'
|
|
}).extend({
|
|
selectM: '../../layui/layui_extends/selectM',
|
|
}).use(['form', 'layer', 'table', 'laytpl', 'laydate', 'upload', 'selectM'], function () {
|
|
var form = layui.form,
|
|
layer = parent.layer === undefined ? layui.layer : top.layer,
|
|
$ = layui.jquery,
|
|
laytpl = layui.laytpl,
|
|
table = layui.table,
|
|
upload = layui.upload,
|
|
laydate = layui.laydate;
|
|
selectM = layui.selectM;
|
|
|
|
|
|
var userModel = JSON.parse(window.sessionStorage.getItem("userInfo"));
|
|
var OpEid = userModel.EmpId;
|
|
var OrgId = userModel.OrgID;
|
|
|
|
|
|
// 上级管理员审批
|
|
$.ajax({
|
|
type: "post",
|
|
url: "/ashx/OAEmpApprovalHandler.ashx",
|
|
async: false,
|
|
data: { Action: "GetUpLevelEmp", OrgId: OrgId, ADMIN_LEVEL: 3, random: new Date().getTime() },
|
|
dataType: "json",
|
|
success: function (result) {
|
|
var htmlStr = "";
|
|
result.data.forEach(function (value, index, array) {
|
|
// var showName = value.EMP_NAME + '(' + value.ORG_NAME + ')';
|
|
//htmlStr += '<div id="' + value.ID + '" class="divLi" empId="' + value.ID + '" empName="' + showName + '">' + showName + '</div>';
|
|
htmlStr += "<option value='" + value.ID + "'>" + value.EMP_NAME + "</option>";
|
|
|
|
});
|
|
$("#spEmp").append(htmlStr);
|
|
|
|
form.render('select');
|
|
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
form.on("submit(AddEdit)", function (data) {
|
|
var d_a_p_s = "";
|
|
for (var i = 0; i < d_a_p_arr.length; i++) {
|
|
if (i == 0) {
|
|
d_a_p_s = d_a_p_arr[i];
|
|
} else {
|
|
d_a_p_s += "," + d_a_p_arr[i];
|
|
}
|
|
}
|
|
// 判断是否选择审批人员
|
|
if (RECEIVEID.length < 1) {
|
|
layer.open({ title: '信息提示', content: "请选择审批人员" });
|
|
return;
|
|
}
|
|
// 判断是否输入操作说明
|
|
if (Cache_Remark.length < 1) {
|
|
layer.open({ title: '信息提示', content: "请输入操作说明" });
|
|
return;
|
|
}
|
|
//load提交
|
|
var index = layer.msg('数据提交中,请稍候', { icon: 16, time: false, shade: 0.8 });
|
|
|
|
|
|
|
|
//layer.close(index);
|
|
return false;
|
|
})
|
|
|
|
//备注
|
|
var Cache_Remark = $("#ipt_remark").val();
|
|
//上传excel数据
|
|
upload.render({ //允许上传的文件后缀
|
|
elem: '#import_btn1'
|
|
, url: '/ashx/OAEmpApprovalHandler.ashx' //改成您自己的上传接口
|
|
, accept: 'file' //普通文件
|
|
, exts: 'xls|excel|xlsx' //只允许上传excel
|
|
, before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
|
|
this.data = {
|
|
Action: "AddImpExcel",
|
|
//操作用户机构ID
|
|
OpOrgId: OrgId,
|
|
//操作用户信息ID
|
|
OpEid: OpEid,
|
|
//审批人
|
|
ApprovalEid: $("#spEmp").val(),
|
|
random: new Date().getTime() //随机参数
|
|
}
|
|
indexload = layer.load(3); //换了种风格
|
|
}
|
|
, done: function (res) {
|
|
|
|
console.log(res);
|
|
layer.close(indexload);
|
|
if (res.code == 0) {
|
|
layer.msg(res.msg);
|
|
} else {
|
|
layer.msg('上传成功');
|
|
}
|
|
//var suc = res.successInfo;
|
|
//var err = res.errInfo;
|
|
//var upd = res.updateInfo;
|
|
|
|
//var sucarr = suc.split('*');
|
|
//var htmlstr = '<div style="max-height:500px;"><span style="color:#eaa230;">请注意仔细确认导入情况!</span><br>';
|
|
//sucarr.forEach(function (value, index, array) {
|
|
// htmlstr += '<div>' + value + '</div><br>'
|
|
//})
|
|
//htmlstr += '</div>';
|
|
//layer.confirm(htmlstr, { icon: 3, title: '提示' }, function (index) {
|
|
|
|
// layer.close(index);
|
|
//});
|
|
|
|
//console.log(res)
|
|
}
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|