提交 | 用户 | 时间
|
71e81e
|
1 |
/** |
懒 |
2 |
* 详情对话框 |
|
3 |
*/ |
|
4 |
var EquipmentAlarmInfoDlg = { |
|
5 |
data: { |
|
6 |
id: "", |
|
7 |
equipmentNo: "", |
|
8 |
equipmentName: "", |
|
9 |
workshopCode: "", |
|
10 |
productionLineCode: "", |
|
11 |
locationCode: "", |
|
12 |
errorNo: "", |
|
13 |
errorDesc: "", |
|
14 |
alarmTime: "", |
|
15 |
whetherRecovery: "", |
|
16 |
recoveryTime: "", |
|
17 |
spareField1: "", |
|
18 |
spareField2: "", |
|
19 |
remarks: "" |
|
20 |
} |
|
21 |
}; |
|
22 |
|
|
23 |
layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
|
24 |
var $ = layui.jquery; |
|
25 |
var $ax = layui.ax; |
|
26 |
var form = layui.form; |
|
27 |
var admin = layui.admin; |
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
//获取详情信息,填充表单 |
|
70 |
var ajax = new $ax(Feng.ctxPath + "/equipmentAlarm/detail?id=" + Feng.getUrlParam("id")); |
|
71 |
var result = ajax.start(); |
|
72 |
form.val('equipmentAlarmForm', result.data); |
|
73 |
|
|
74 |
//表单提交事件 |
|
75 |
form.on('submit(btnSubmit)', function (data) { |
|
76 |
var ajax = new $ax(Feng.ctxPath + "/equipmentAlarm/editItem", function (data) { |
|
77 |
Feng.success("更新成功!"); |
|
78 |
window.location.href = Feng.ctxPath + '/equipmentAlarm' |
|
79 |
}, function (data) { |
|
80 |
Feng.error("更新失败!" + data.responseJSON.message) |
|
81 |
}); |
|
82 |
ajax.set(data.field); |
|
83 |
ajax.start(); |
|
84 |
|
|
85 |
return false; |
|
86 |
}); |
|
87 |
|
|
88 |
$('#cancel').click(function(){ |
|
89 |
window.location.href = Feng.ctxPath + '/equipmentAlarm' |
|
90 |
}); |
|
91 |
}); |