cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
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     form.on('submit(btnSubmit)', function (data) {
103         var ajax = new $ax(Feng.ctxPath + "/materialTraceability/addItem", function (data) {
104             Feng.success("添加成功!");
105             window.location.href = Feng.ctxPath + '/materialTraceability'
106         }, function (data) {
107             Feng.error("添加失败!" + data.responseJSON.message)
108         });
109         ajax.set(data.field);
110         ajax.start();
111
112         return false;
113     });
114
115     $('#cancel').click(function(){
116         window.location.href = Feng.ctxPath + '/materialTraceability'
117     });
118
119 });