chore: 重写初始提交(清空历史,整理后全量提交)
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
|
||||
<div class="layui-card" style="margin:20px;">
|
||||
<div class="layui-card-header">提现管理(开发者分红结算)</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(['table', 'jquery', 'layer'], function () {
|
||||
var table = layui.table, $ = layui.jquery, layer = layui.layer;
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
url: '{:url("/appmall/backend/revenue/withdrawals")}',
|
||||
page: true,
|
||||
cols: [[
|
||||
{field: 'id', title: 'ID', width: 70},
|
||||
{field: 'developer_id', title: '开发者ID', width: 100},
|
||||
{field: 'amount', title: '提现金额', width: 110},
|
||||
{field: 'channel', title: '渠道', width: 90},
|
||||
{field: 'account', title: '收款账号', width: 180},
|
||||
{field: 'status', title: '状态', width: 100, templet: function(d){
|
||||
return d.status==1?'<span class="layui-badge layui-bg-green">已打款</span>'
|
||||
: (d.status==-1?'<span class="layui-badge layui-bg-orange">已驳回</span>'
|
||||
:'<span class="layui-badge">待处理</span>');
|
||||
}},
|
||||
{field: 'create_at', title: '申请时间', width: 170, templet: function(d){return layui.util.toDateString(d.create_at*1000);}},
|
||||
{title: '操作', width: 160, templet: function(d){
|
||||
if(d.status!=0) return '-';
|
||||
return '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="settle">打款</a>'
|
||||
+ '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="reject">驳回</a>';
|
||||
}}
|
||||
]]
|
||||
});
|
||||
table.on('tool(dataTable)', function(obj){
|
||||
var d = obj.data;
|
||||
if(obj.event==='settle'){
|
||||
layer.confirm('确认已向开发者打款?', function(){
|
||||
$.post('{:url("revenue/settle")}', {id:d.id}, function(r){layer.msg(r.message||r.msg);if(r.code===0)table.reload('dataTable');});
|
||||
});
|
||||
} else if(obj.event==='reject'){
|
||||
layer.prompt({title:'驳回原因'}, function(val, index){
|
||||
$.post('{:url("revenue/reject")}', {id:d.id, reason:val}, function(r){layer.msg(r.message||r.msg);if(r.code===0)table.reload('dataTable');layer.close(index);});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user