1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| layui.define([ 'form', 'laydate', 'table','${entity.code}Api'], function(exports) {
| var form = layui.form;
| var ${entity.code}Api = layui.${entity.code}Api;
| var index = layui.index;
| var view = {
| init:function(){
| Lib.initGenrealForm($("#updateForm"),form);
| this.initSubmit();
| },
| initSubmit:function(){
| $("#updateButton").click(function(){
| form.on('submit(form)', function(){
| ${entity.code}Api.update${upperFirst(entity.code)}($('#updateForm'),function(){
| parent.window.dataReload();
| Common.info("更新成功");
| Lib.closeFrame();
| });
| });
| });
| $("#updateButton-cancel").click(function(){
| Lib.closeFrame();
| });
| }
|
| }
| exports('edit',view);
|
| });
|
|