cl
2024-01-23 6dadf36ef118fbb3b2cd5aca94cde88e29fb55dc
提交 | 用户 | 时间
71e81e 1 /**
2  * 添加或者修改页面
3  */
4 var EquipmentStatusInfoDlg = {
5     data: {
6         id: "",
7         equipmentNo: "",
8         equipmentName: "",
9         workshopCode: "",
10         productionLineCode: "",
11         locationCode: "",
12         status: "",
13         spareField1: "",
14         spareField2: "",
15         remarks: "",
16         updateTime: ""
17     }
18 };
19
20 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
21     var $ = layui.jquery;
22     var $ax = layui.ax;
23     var form = layui.form;
24     var admin = layui.admin;
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
51
52
53
54     //表单提交事件
55     form.on('submit(btnSubmit)', function (data) {
56         var ajax = new $ax(Feng.ctxPath + "/equipmentStatus/addItem", function (data) {
57             Feng.success("添加成功!");
58             window.location.href = Feng.ctxPath + '/equipmentStatus'
59         }, function (data) {
60             Feng.error("添加失败!" + data.responseJSON.message)
61         });
62         ajax.set(data.field);
63         ajax.start();
64
65         return false;
66     });
67
68     $('#cancel').click(function(){
69         window.location.href = Feng.ctxPath + '/equipmentStatus'
70     });
71
72 });