|
|
|
@ -232,27 +232,34 @@
|
|
|
|
|
})
|
|
|
|
|
return ids;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('.delete-btn').on({
|
|
|
|
|
click: function() {
|
|
|
|
|
var id = $(this).parents('tr').eq(0).attr('data-id');
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '{:U("deleteMasterRule")}',
|
|
|
|
|
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)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function deleteRule(id) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '{:U("deleteMasterRule")}',
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('.edit-form-btn').on({
|
|
|
|
|
click: function() {
|
|
|
|
|