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