@extends('vip.layouts')
@section('seo_title')
支付管理
@endsection
@section('content')
@push('dataTableJS')
//var active = {
// reload: function(){
// //执行重载
// table.reload('{{ $dataId }}', {
// page: {
// curr: 1 //重新从第 1 页开始
// }
// ,where: {
// infoname:$('#infoname').val(),
// }
// });
// }
// };
//启用|禁用用户
form.on('switch(openStatus)', function(obj){
var status = 0;
if(obj.elem.checked==true){
status = 1;
}
setcolumn('/admin/Payment/UserStart',this.name,status,this.value,obj);
console.log(this.name);
console.log(status);
console.log(this.value);
console.log(obj);
//layer.tips(msg, obj.othis);
});
function setcolumn(url,column,value,id,obj){
$.ajax({
url: url+'?'+column+'='+value+'&id='+id,
dataType: 'json',
type: 'get',
success:function(data){
layer.msg(data.msg);
if(data.status!=1){
if(value==1){
obj.othis[0].setAttribute("class", "layui-unselect layui-form-switch");
obj.othis[0].innerHTML='
开启';
}else{
obj.othis[0].setAttribute("class",'layui-unselect layui-form-switch layui-form-onswitch');
obj.othis[0].innerHTML='
禁用';
}
}
}
});
}
//$('.lay-btn-diy').on('click', function(){
// var type = $(this).data('type');
// active[type] ? active[type].call(this) : '';
// });
//重置表单
$('.reset').on('click',function(){
$('input').val('');
$('#infoname').val('');
// var type = $(this).data('type');
// active[type] ? active[type].call(this) : '';
});
//刷新表单
// $('.set').on('click',function(){
// var type = $(this).data('type');
// active[type] ? active[type].call(this) : '';
// });
@endpush
@include('vip.datatable')
@endsection