admin
2024-01-08 22f70cc8b2ba603e82bba058db320dced48f9470
提交 | 用户 | 时间
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     form.on('submit(btnSubmit)', function (data) {
51         var ajax = new $ax(Feng.ctxPath + "/equipmentMaintainContentPlan/addItem", function (data) {
52             Feng.success("添加成功!");
53             window.location.href = Feng.ctxPath + '/equipmentMaintainContentPlan'
54         }, function (data) {
55             Feng.error("添加失败!" + data.responseJSON.message)
56         });
57         ajax.set(data.field);
58         ajax.start();
59
60         return false;
61     });
62
63
64     $('#cancel').click(function(){
65         window.location.href = Feng.ctxPath + '/equipmentMaintainContentPlan'
66     });
67
68
69 });