提交 | 用户 | 时间
|
1ac2bc
|
1 |
/** |
懒 |
2 |
* 添加或者修改页面 |
|
3 |
*/ |
|
4 |
var TranslationInfoDlg = { |
|
5 |
data: { |
|
6 |
tranCode: "", |
|
7 |
tranName: "", |
|
8 |
languages: "", |
|
9 |
tranValue: "", |
|
10 |
createTime: "", |
|
11 |
createUser: "", |
|
12 |
updateTime: "", |
|
13 |
updateUser: "" |
|
14 |
} |
|
15 |
}; |
|
16 |
|
|
17 |
layui.use(['form', 'admin', 'ax'], function () { |
|
18 |
var $ = layui.jquery; |
|
19 |
var $ax = layui.ax; |
|
20 |
var form = layui.form; |
|
21 |
var admin = layui.admin; |
|
22 |
|
|
23 |
//让当前iframe弹层高度适应 |
|
24 |
admin.iframeAuto(); |
|
25 |
|
|
26 |
//表单提交事件 |
|
27 |
form.on('submit(btnSubmit)', function (data) { |
|
28 |
var ajax = new $ax(Feng.ctxPath + "/translation/addItem", function (data) { |
|
29 |
Feng.success("添加成功!"); |
|
30 |
|
|
31 |
//传给上个页面,刷新table用 |
|
32 |
admin.putTempData('formOk', true); |
|
33 |
|
|
34 |
//关掉对话框 |
|
35 |
admin.closeThisDialog(); |
|
36 |
|
|
37 |
}, function (data) { |
|
38 |
Feng.error("添加失败!" + data.responseJSON.message) |
|
39 |
}); |
|
40 |
ajax.set(data.field); |
|
41 |
ajax.start(); |
|
42 |
|
|
43 |
return false; |
|
44 |
}); |
|
45 |
|
|
46 |
}); |