123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- /**
- *用户管理
- *
- */
- $.namespace("user.main");
- user.main.init=function(){
- //把form传入,构造翻页控件
- pageinfo($("#userform"));
- };
- user.main.search=function(){
- $('#pagejump').val(1);
- $("#userform").submit();
- };
- user.main.del=function(data){
- $.confirm({
- title: '确认框',
- content: '确认删除吗',
- confirm: function(){
- $.post($.app + "/user/delete", {
- id : data
- }, function(data) {
- if (data.success) {
- $.alert({
- title: '提示',
- content: '操作成功',
- confirm: function(){
- $("#userform").submit();
- }
- });
- } else {
- $.alert({
- title: '提示',
- content: data.message,
- confirm: function(){
-
- }
- });
- }
- }, "json");
- },
- cancel: function(){
-
- }
- });
- }
- user.main.edit=function(data){
- location.href=$.app+"/user/edit?id="+data;
- }
- user.main.view=function(data){
- location.href=$.app+"/user/view?id="+data;
- }
- /**
- * 弹出新增页面
- * */
- user.main.add=function(){
- location.href=$.app+"/user/add";
- }
- user.main.reset=function(data){
- debugger;
- $.confirm({
- title: '提示框',
- content: '您是否重置密码?',
- confirm: function(){
- $.post($.app + "/user/reset?id="+data, {}, function(data, status) {
- if (data.success) {
- $.alert({
- title: '提示',
- content: '操作成功',
- confirm: function(){
- location.href=$.app+'/user/main';
- }
- });
- } else {
- $.alert({
- title: '提示',
- content: data.message,
- confirm: function(){
- }
- });
- }
- }, "json");
-
- },
- cancel: function(){
- }
- });
- }
|