提交 | 用户 | 时间
|
8286c6
|
1 |
/** |
懒 |
2 |
* 详情对话框 |
|
3 |
*/ |
|
4 |
var ScannerConfigInfoDlg = { |
|
5 |
data: { |
|
6 |
id: "", |
|
7 |
locationCode: "", |
|
8 |
ipAddress: "", |
|
9 |
createUser: "", |
|
10 |
createTime: "" |
|
11 |
} |
|
12 |
}; |
|
13 |
|
|
14 |
layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
|
15 |
var $ = layui.jquery; |
|
16 |
var $ax = layui.ax; |
|
17 |
var form = layui.form; |
|
18 |
var admin = layui.admin; |
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
//获取详情信息,填充表单 |
|
28 |
var ajax = new $ax(Feng.ctxPath + "/scannerConfig/detail?id=" + Feng.getUrlParam("id")); |
|
29 |
var result = ajax.start(); |
|
30 |
form.val('scannerConfigForm', result.data); |
|
31 |
|
|
32 |
//表单提交事件 |
|
33 |
form.on('submit(btnSubmit)', function (data) { |
|
34 |
var ajax = new $ax(Feng.ctxPath + "/scannerConfig/editItem", function (data) { |
|
35 |
Feng.success("更新成功!"); |
|
36 |
window.location.href = Feng.ctxPath + '/scannerConfig' |
|
37 |
}, function (data) { |
|
38 |
Feng.error("更新失败!" + data.responseJSON.message) |
|
39 |
}); |
|
40 |
ajax.set(data.field); |
|
41 |
ajax.start(); |
|
42 |
|
|
43 |
return false; |
|
44 |
}); |
|
45 |
|
|
46 |
$('#cancel').click(function(){ |
|
47 |
window.location.href = Feng.ctxPath + '/scannerConfig' |
|
48 |
}); |
|
49 |
}); |