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.
49 lines
1.9 KiB
49 lines
1.9 KiB
11 months ago
|
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;
|
||
|
var OrgId = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgID;
|
||
|
var OrgName = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgName;
|
||
|
|
||
|
form.verify({
|
||
|
//经度,整数部分为0-90小数部分为0到6位
|
||
|
lat: [/^[-]?[0-9]+\.?[0-9]+?$/ || /^[0-9]+$/, '请输入正确的格式'],
|
||
|
//纬度,整数部分为0-90小数部分为0到6位
|
||
|
lon: [/^[-]?[0-9]+\.?[0-9]+?$/ || /^[0-9]+$/, '请输入正确的格式']
|
||
|
});
|
||
|
|
||
|
form.on("submit(AddEdit)", function (data) {
|
||
|
//alert($("#SERVER_NAME").val());
|
||
|
//load提交
|
||
|
var index = layer.msg('数据提交中,请稍候', { icon: 16, time: false, shade: 0.8 });
|
||
|
$.post("/ashx/HumanFaceHandler.ashx", {
|
||
|
Action: $(".Action").val(),
|
||
|
id: $(".ID").val(), //ID
|
||
|
REMARK: $("#REMARK").val(), //备注
|
||
|
SERVER_IP: $("#SERVER_IP").val(), //设备IP
|
||
|
s_Name: $("#SERVER_NAME").val(), //设备名称
|
||
|
org_id: OrgId, //机构id
|
||
|
org_name: OrgName, //机构名称
|
||
|
random: new Date().getTime() //随机参数
|
||
|
}, function (res) {
|
||
|
console.log(res);
|
||
|
layer.close(index);
|
||
|
res = $.parseJSON(res);
|
||
|
if (res.code == 1) {
|
||
|
// parent.layer.msg(res.msg);
|
||
|
top.layer.msg(res.msg);
|
||
|
parent.location.reload();
|
||
|
} else {
|
||
|
layer.close(index);
|
||
|
layer.msg(res.msg);
|
||
|
}
|
||
|
});
|
||
|
layer.close(index);
|
||
|
return false;
|
||
|
})
|
||
|
|
||
|
})
|