cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 /**
2  * 详情对话框
3  */
4 var EquipmentMaintainContentPlanInfoDlg = {
5     data: {
6         id: "",
7         maintainContentCode: "",
8         maintainContentName: "",
9         maintainContentType: "",
10         maintainContent: "",
11         spareField1: "",
12         spareField2: "",
13         remarks: "",
14         planNo: ""
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
39
40
41
42
43
44
45
46
47
48
49     //获取详情信息,填充表单
50     var ajax = new $ax(Feng.ctxPath + "/equipmentMaintainContentPlan/detail?id=" + Feng.getUrlParam("id"));
51     var result = ajax.start();
52     form.val('equipmentMaintainContentPlanForm', result.data);
53
54     //表单提交事件
55     form.on('submit(btnSubmit)', function (data) {
56         var ajax = new $ax(Feng.ctxPath + "/equipmentMaintainContentPlan/editItem", function (data) {
57             Feng.success("更新成功!");
58             window.location.href = Feng.ctxPath + '/equipmentMaintainContentPlan'
59
60         }, function (data) {
61             Feng.error("更新失败!" + data.responseJSON.message)
62         });
63         ajax.set(data.field);
64         ajax.start();
65
66         return false;
67     });
68
69
70     $('#cancel').click(function(){
71         window.location.href = Feng.ctxPath + '/equipmentMaintainContentPlan'
72     });
73
74 });