Merge branch 'hotfix/payment_merch_bug' of wmtx/platform into release

删除添加提示
master
万盟天下 4 years ago committed by Gogs
commit 17a060e385

@ -667,11 +667,6 @@ class PaymentMerchantController extends ThinkController
public function deleteRule()
{
$this->ajaxReturn([
'status' => 0,
'message' => '暂不支持删除'
]);
$id = I('id', 0);
$rule = M('payment_rule', 'tab_')->where(['id' => $id])->find();

@ -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,9 +259,8 @@
})
return ids;
}
$('.delete-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id');
function deleteRule(id) {
$.ajax({
url: '{:U("deleteRule")}',
type: 'post',
@ -301,25 +278,11 @@
}
})
}
})
$('.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)
})
}
})

Loading…
Cancel
Save