提交 | 用户 | 时间
|
71e81e
|
1 |
/** |
懒 |
2 |
* 添加或者修改页面 |
|
3 |
*/ |
|
4 |
var BatchCodeStorageInfoDlg = { |
|
5 |
data: { |
|
6 |
id: "", |
|
7 |
materialCode: "", |
|
8 |
materialName: "", |
|
9 |
batchCode: "", |
|
10 |
workOrderNo: "", |
|
11 |
productionLine: "", |
|
12 |
locationCode: "", |
|
13 |
isScan: "", |
|
14 |
quantity: "", |
|
15 |
spareField1: "", |
|
16 |
spareField2: "", |
|
17 |
remarks: "", |
|
18 |
createUser: "", |
|
19 |
createTime: "", |
|
20 |
erpSpec: "" |
|
21 |
} |
|
22 |
}; |
|
23 |
|
|
24 |
layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
|
25 |
var $ = layui.jquery; |
|
26 |
var $ax = layui.ax; |
|
27 |
var form = layui.form; |
|
28 |
var admin = layui.admin; |
|
29 |
|
|
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 |
form.on('submit(btnSubmit)', function (data) { |
|
69 |
var ajax = new $ax(Feng.ctxPath + "/batchCodeStorage/addItem", function (data) { |
|
70 |
Feng.success("添加成功!"); |
|
71 |
window.location.href = Feng.ctxPath + '/batchCodeStorage' |
|
72 |
}, function (data) { |
|
73 |
Feng.error("添加失败!" + data.responseJSON.message) |
|
74 |
}); |
|
75 |
ajax.set(data.field); |
|
76 |
ajax.start(); |
|
77 |
|
|
78 |
return false; |
|
79 |
}); |
|
80 |
|
|
81 |
$('#cancel').click(function(){ |
|
82 |
window.location.href = Feng.ctxPath + '/batchCodeStorage' |
|
83 |
}); |
|
84 |
|
|
85 |
}); |