提交 | 用户 | 时间
|
b26949
|
1 |
/** |
懒 |
2 |
* 添加或者修改页面 |
|
3 |
*/ |
|
4 |
var GreaseManageInfoDlg = { |
|
5 |
data: { |
|
6 |
id: "", |
|
7 |
barcode: "", |
|
8 |
locationCode: "", |
|
9 |
duaDate: "", |
|
10 |
state: "", |
|
11 |
createUser: "", |
|
12 |
createTime: "", |
|
13 |
remarks: "", |
|
14 |
spareField1: "", |
|
15 |
spareField2: "" |
|
16 |
} |
|
17 |
}; |
|
18 |
|
|
19 |
layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
|
20 |
var $ = layui.jquery; |
|
21 |
var $ax = layui.ax; |
|
22 |
var form = layui.form; |
|
23 |
var admin = layui.admin; |
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
//表单提交事件 |
|
48 |
form.on('submit(btnSubmit)', function (data) { |
|
49 |
var ajax = new $ax(Feng.ctxPath + "/greaseManage/addItem", function (data) { |
|
50 |
Feng.success("添加成功!"); |
|
51 |
window.location.href = Feng.ctxPath + '/greaseManage' |
|
52 |
}, function (data) { |
|
53 |
Feng.error("添加失败!" + data.responseJSON.message) |
|
54 |
}); |
|
55 |
ajax.set(data.field); |
|
56 |
ajax.start(); |
|
57 |
|
|
58 |
return false; |
|
59 |
}); |
|
60 |
|
|
61 |
$('#cancel').click(function(){ |
|
62 |
window.location.href = Feng.ctxPath + '/greaseManage' |
|
63 |
}); |
|
64 |
|
|
65 |
}); |