cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 /**
2  * 详情对话框
3  */
4 var MaterialShortageAlarmInfoDlg = {
5     data: {
6         id: "",
7         workOrderNo: "",
8         productCode: "",
9         productionLine: "",
10         locationCode: "",
11         equipmentNo: "",
12         materialCode: "",
13         quantity: "",
14         badType: "",
15         badDesc: "",
16         callTime: "",
17         feedingTime: "",
18         whetherToHandle: "",
19         spareField1: "",
20         spareField2: "",
21         remarks: ""
22     }
23 };
24
25 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
26     var $ = layui.jquery;
27     var $ax = layui.ax;
28     var form = layui.form;
29     var admin = layui.admin;
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
71
72
73
74
75
76
77     //获取详情信息,填充表单
78     var ajax = new $ax(Feng.ctxPath + "/materialShortageAlarm/detail?id=" + Feng.getUrlParam("id"));
79     var result = ajax.start();
80     form.val('materialShortageAlarmForm', result.data);
81
82     //表单提交事件
83     form.on('submit(btnSubmit)', function (data) {
84         var ajax = new $ax(Feng.ctxPath + "/materialShortageAlarm/editItem", function (data) {
85             Feng.success("更新成功!");
86             window.location.href = Feng.ctxPath + '/materialShortageAlarm'
87
88         }, function (data) {
89             Feng.error("更新失败!" + data.responseJSON.message)
90         });
91         ajax.set(data.field);
92         ajax.start();
93
94         return false;
95     });
96
97     $('#cancel').click(function(){
98         window.location.href = Feng.ctxPath + '/materialShortageAlarm'
99     });
100
101 });