cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 /**
2  * 详情对话框
3  */
4 var ScrapCategoryRecordInfoDlg = {
5     data: {
6         id: "",
7         workOrderNo: "",
8         sfcCode: "",
9         lineCode: "",
10         lineName: "",
11         locationCode: "",
12         locationName: "",
13         scrapCategory: "",
14         scrapQuantity: "",
15         scrapReason: "",
16         operateUser: "",
17         spareField1: "",
18         spareField2: "",
19         remarks: "",
20         createUser: "",
21         updateUser: "",
22         updateTime: "",
23         createTime: "",
24         scrapTime: ""
25     }
26 };
27
28 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
29     var $ = layui.jquery;
30     var $ax = layui.ax;
31     var form = layui.form;
32     var admin = layui.admin;
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 + "/scrapCategoryRecord/detail?id=" + Feng.getUrlParam("id"));
79     var result = ajax.start();
80     form.val('scrapCategoryRecordForm', result.data);
81
82     //表单提交事件
83     form.on('submit(btnSubmit)', function (data) {
84         var ajax = new $ax(Feng.ctxPath + "/scrapCategoryRecord/editItem", function (data) {
85             Feng.success("更新成功!");
86             //传给上个页面,刷新table用
87             admin.putTempData('formOk', true);
88             //关掉对话框
89             admin.closeThisDialog();
90         }, function (data) {
91             Feng.error("更新失败!" + data.responseJSON.message)
92         });
93         ajax.set(data.field);
94         ajax.start();
95
96         return false;
97     });
98
99 });