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.
37 lines
1.3 KiB
37 lines
1.3 KiB
layui.use(['form', 'layer', 'table', 'laytpl', 'laydate', 'upload'], 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;
|
|
var UserId = JSON.parse(window.sessionStorage.getItem("userInfo")).UserCode;
|
|
var OrgId = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgID;
|
|
|
|
form.on("submit(AddEdit)", function (data) {
|
|
//load提交
|
|
var index = layer.msg('数据提交中,请稍候', { icon: 16, time: false, shade: 0.8 });
|
|
$.post("../../ashx/FireShiftsHandler.ashx", {
|
|
Action: $(".Action").val(),
|
|
OrgId: OrgId,
|
|
ID: $(".ID").val(),
|
|
SENTRY: $("#SENTRY").val(),
|
|
ADDR: $("#ADDR").val(),
|
|
TO_STATE: $("#TO_STATE").val(),
|
|
random: new Date().getTime() //随机参数(员工表ID ","分割)
|
|
}, 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;
|
|
})
|
|
})
|