123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- $.namespace("jghd.main");
- jghd.main.init=function(){
- //把form传入,构造翻页控件
- pageinfo($("#jghdform"));
- };
- jghd.main.search=function(){
- $('#pagejump').val(1);
- $("#jghdform").submit();
- };
- jghd.main.del=function(data){
- $.confirm({
- title: '确认框',
- content: '确认删除吗',
- confirm: function(){
- $.post($.app + "/jghd/delete", {
- id : data
- }, function(data) {
- if (data.success) {
- $.alert({
- title: '提示',
- content: '删除成功',
- confirm: function(){
- $("#jghdform").submit();
- }
- });
- } else {
- $.alert({
- title: '提示',
- content: data.message,
- confirm: function(){
-
- }
- });
- }
- }, "json");
- },
- cancel: function(){
-
- }
- });
- };
- jghd.main.edit=function(data){
- location.href=$.app+"/jghd/edit?id="+data;
- };
- jghd.main.view=function(data){
- location.href=$.app+"/jghd/view?id="+data;
- };
- /**
- * 弹出新增页面
- * */
- jghd.main.add=function(){
- location.href=$.app+"/jghd/add";
- };
|