|
|
@ -232,27 +232,34 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return ids;
|
|
|
|
return ids;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$('.delete-btn').on({
|
|
|
|
$('.delete-btn').on({
|
|
|
|
click: function() {
|
|
|
|
click: function() {
|
|
|
|
var id = $(this).parents('tr').eq(0).attr('data-id');
|
|
|
|
var id = $(this).parents('tr').eq(0).attr('data-id')
|
|
|
|
$.ajax({
|
|
|
|
layer.confirm('确定要删除该规则 ?', {icon: 3, title:'提示'}, function(index){
|
|
|
|
url: '{:U("deleteMasterRule")}',
|
|
|
|
deleteRule(id)
|
|
|
|
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("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({
|
|
|
|
$('.edit-form-btn').on({
|
|
|
|
click: function() {
|
|
|
|
click: function() {
|
|
|
|