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