cl
2024-01-23 6dadf36ef118fbb3b2cd5aca94cde88e29fb55dc
提交 | 用户 | 时间
71e81e 1 /**
2  * 详情对话框
3  */
4 var MaterialTraceabilityInfoDlg = {
5     data: {
6         id: "",
7         productNo: "",
8         housingBarCode: "",
9         workOrderNo: "",
10         productCode: "",
11         productName: "",
12         lineCode: "",
13         lineName: "",
14         locationCode: "",
15         locationName: "",
16         materialCode: "",
17         materialName: "",
18         materialBatchNo: "",
19         materialSerialNo: "",
20         assemblyQty: "",
21         assemblyUser: "",
22         assemblyTime: "",
23         spareField1: "",
24         spareField2: "",
25         spareField3: "",
26         spareField4: "",
27         remarks: ""
28     }
29 };
30
31 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
32     var $ = layui.jquery;
33     var $ax = layui.ax;
34     var form = layui.form;
35     var admin = layui.admin;
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101     //获取详情信息,填充表单
102     var ajax = new $ax(Feng.ctxPath + "/materialTraceability/detail?id=" + Feng.getUrlParam("id"));
103     var result = ajax.start();
104     form.val('materialTraceabilityForm', result.data);
105
106     //表单提交事件
107     form.on('submit(btnSubmit)', function (data) {
108         var ajax = new $ax(Feng.ctxPath + "/materialTraceability/editItem", function (data) {
109             Feng.success("更新成功!");
110             window.location.href = Feng.ctxPath + '/materialTraceability'
111         }, function (data) {
112             Feng.error("更新失败!" + data.responseJSON.message)
113         });
114         ajax.set(data.field);
115         ajax.start();
116
117         return false;
118     });
119
120     $('#cancel').click(function(){
121         window.location.href = Feng.ctxPath + '/materialTraceability'
122     });
123 });