|
|
|
@ -124,7 +124,6 @@
|
|
|
|
|
<div class="input-list">
|
|
|
|
|
<a class="sch-btn" href="javascript:;" id="search" url="{:U('PaymentMerchant/rules')}">搜索</a>
|
|
|
|
|
<a class="sch-btn" style="width: 100px;" href="{:U('PaymentMerchant/addRule')}">新增配置</a>
|
|
|
|
|
<!-- <a class="sch-btn" href="javascript:;" id="batch-delete-btn">删除</a> -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="input-list">
|
|
|
|
|
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>12,),I('get.')))}">导出</a>
|
|
|
|
@ -175,7 +174,7 @@
|
|
|
|
|
<td>
|
|
|
|
|
<div class="partakebtn">
|
|
|
|
|
<a href="<?=U('editRule', ['id' => $data['id']])?>">编辑</a>
|
|
|
|
|
<!-- <a class="delete-btn">删除</a> -->
|
|
|
|
|
<a class="delete-btn">删除</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -253,27 +252,6 @@
|
|
|
|
|
minView:'month',
|
|
|
|
|
maxView:'month',
|
|
|
|
|
});
|
|
|
|
|
$('#batch-delete-btn').on({
|
|
|
|
|
click: function() {
|
|
|
|
|
var ids = getIds();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '{:U("batchDelete")}',
|
|
|
|
|
type: 'post',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
data: {ids: ids},
|
|
|
|
|
success: function(result) {
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
window.location.href = window.location.href
|
|
|
|
|
}, 200)
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
function getIds() {
|
|
|
|
|
var ids = [];
|
|
|
|
|
$('.ids:checked').each(function() {
|
|
|
|
@ -281,45 +259,30 @@
|
|
|
|
|
})
|
|
|
|
|
return ids;
|
|
|
|
|
}
|
|
|
|
|
$('.delete-btn').on({
|
|
|
|
|
click: function() {
|
|
|
|
|
var id = $(this).parents('tr').eq(0).attr('data-id');
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '{:U("deleteRule")}',
|
|
|
|
|
type: 'post',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
data: {id: id},
|
|
|
|
|
success: function(result) {
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
window.location.href = window.location.href
|
|
|
|
|
}, 200)
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function deleteRule(id) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '{:U("deleteRule")}',
|
|
|
|
|
type: 'post',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
data: {id: id},
|
|
|
|
|
success: function(result) {
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
window.location.href = window.location.href
|
|
|
|
|
}, 200)
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
$('.cancel-btn').on({
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$('.delete-btn').on({
|
|
|
|
|
click: function() {
|
|
|
|
|
var id = $(this).parents('tr').eq(0).attr('data-id');
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '{:U("cancel")}',
|
|
|
|
|
type: 'post',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
data: {id: id},
|
|
|
|
|
success: function(result) {
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
window.location.href = window.location.href
|
|
|
|
|
}, 200)
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var id = $(this).parents('tr').eq(0).attr('data-id')
|
|
|
|
|
layer.confirm('确定要删除该规则 ?请确保删除后时间范围内规则完整!', {icon: 3, title:'提示'}, function(index){
|
|
|
|
|
deleteRule(id)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|