添加提示

dev
曾超新 5 years ago
parent c4791e42c9
commit 90d6b8f0f2
  1. 24
      frontend/views/database/a-index.php

@ -235,15 +235,19 @@ use \common\libs\MyLib;
},'json'); },'json');
}); });
$('.btn-a-b-all').click(function() { $('.btn-a-b-all').click(function() {
layer.confirm('是否确认批量移动?', { parent.layer.confirm('是否确认批量移动?', {
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮
shade: false //不显示遮罩 shade: false //不显示遮罩
}, function(){ }, function(){
var index = parent.layer.load(1, {
shade: [0.1,'#fff'] //0.1透明度的白色背景
});
var params = o; var params = o;
$.post('/database/a-b-all',params,function(obj){ $.post('/database/a-b-all',params,function(obj){
layer.msg(obj.msg); parent.layer.close(index);
parent.layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
layer.msg('保存成功'); parent.layer.msg('保存成功');
search(); search();
} }
},'json'); },'json');
@ -257,7 +261,11 @@ use \common\libs\MyLib;
rows.forEach(function(item,index,array){ rows.forEach(function(item,index,array){
params.push(item.id); params.push(item.id);
}); });
var index = parent.layer.load(1, {
shade: [0.1,'#fff'] //0.1透明度的白色背景
});
$.post('/database/a-c', {ids:params.join(',')}, function(data) { $.post('/database/a-c', {ids:params.join(',')}, function(data) {
parent.layer.close(index);
parent.layer.msg(data.msg); parent.layer.msg(data.msg);
if(data.success == true) { if(data.success == true) {
refreshList(); refreshList();
@ -265,7 +273,7 @@ use \common\libs\MyLib;
},'json'); },'json');
}); });
$('.btn-a-invalid').click(function() { $('.btn-a-invalid').click(function() {
layer.confirm('是否确认移动?', { parent.layer.confirm('是否确认移动?', {
btn: ['确认','取消'], //按钮 btn: ['确认','取消'], //按钮
shade: false //不显示遮罩 shade: false //不显示遮罩
}, function(){ }, function(){
@ -275,10 +283,14 @@ use \common\libs\MyLib;
rows.forEach(function(item,index,array){ rows.forEach(function(item,index,array){
params.push(item.id); params.push(item.id);
}); });
var index = parent.layer.load(1, {
shade: [0.1,'#fff'] //0.1透明度的白色背景
});
$.post('/database/a-invalid',{ids:params.join(','), invalid_id:invalid_id},function(obj){ $.post('/database/a-invalid',{ids:params.join(','), invalid_id:invalid_id},function(obj){
layer.msg(obj.msg); parent.layer.close(index);
parent.layer.msg(obj.msg);
if(obj.success) { if(obj.success) {
layer.msg('保存成功'); parent.layer.msg('保存成功');
search(); search();
} }
},'json'); },'json');

Loading…
Cancel
Save