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