cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
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     var ajax = new $ax(Feng.ctxPath + "/equipmentStatus/detail?id=" + Feng.getUrlParam("id"));
56     var result = ajax.start();
57     form.val('equipmentStatusForm', result.data);
58
59     //表单提交事件
60     form.on('submit(btnSubmit)', function (data) {
61         var ajax = new $ax(Feng.ctxPath + "/equipmentStatus/editItem", function (data) {
62             Feng.success("更新成功!");
63             window.location.href = Feng.ctxPath + '/equipmentStatus'
64         }, function (data) {
65             Feng.error("更新失败!" + data.responseJSON.message)
66         });
67         ajax.set(data.field);
68         ajax.start();
69
70         return false;
71     });
72
73     $('#cancel').click(function(){
74         window.location.href = Feng.ctxPath + '/equipmentStatus'
75     });
76 });