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.
39 lines
1.3 KiB
39 lines
1.3 KiB
layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
|
var form = layui.form,
|
|
layer = parent.layer === undefined ? layui.layer : top.layer,
|
|
$ = layui.jquery,
|
|
table = layui.table,
|
|
laydate = layui.laydate;
|
|
//var OrgId = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgID;
|
|
//OrgId = "";
|
|
laydate.render({
|
|
elem: '#hdate', //指定元素
|
|
format: 'yyyy-MM-dd', //指定时间格式
|
|
trigger: 'click' //采用click弹出
|
|
});
|
|
|
|
form.on("submit(AddEdit)", function (data) {
|
|
//load提交
|
|
var index = layer.msg('数据提交中,请稍候', { icon: 16, time: false, shade: 0.8 });
|
|
$.post("../../ashx/OaHolidayHandler.ashx", {
|
|
Action: $(".Action").val(),
|
|
ID: $(".ID").val(),
|
|
hdate: $("#hdate").val(),
|
|
name: $("#name").val(),
|
|
rest: $("#rest").val(),
|
|
random: new Date().getTime()
|
|
}, function (res) {
|
|
layer.close(index);
|
|
res = $.parseJSON(res);
|
|
if (res.code == 1) {
|
|
top.layer.msg(res.msg);
|
|
parent.location.reload();
|
|
} else {
|
|
layer.close(index);
|
|
layer.msg(res.msg);
|
|
}
|
|
});
|
|
layer.close(index);
|
|
return false;
|
|
})
|
|
})
|