推广后台->财务管理->提现记录->结算单--新增

master
chenxiaojun 5 years ago
parent bcc4b10bd6
commit e1fd669aa8

@ -365,12 +365,10 @@ class FinanceController extends BaseController
if (isset($_GET['status']) && $_GET['status'] !== '') {
$status = intval($_GET['status']);
if (!isset(FinanceController::$withdrawStatus[$status])) {
if (!isset(FinanceController::$withdrawStatus[$status])) {
$this->error('参数异常');
}
$map['status'] = $status;
$this->error('参数异常');
}
$map['status'] = $status;
}
$data = $model->field('id,widthdraw_number,create_time,settlement_end_time,sum_money,status,respond')
@ -485,4 +483,48 @@ class FinanceController extends BaseController
$this->assign('modelList', $modelList);
$this->display();
}
//结算单
public function settlementOrder()
{
//是否是会长
$this->purview();
//验证安全密码
$metaTitle = '结算单';
$modelList = ['财务管理', '提现记录', $metaTitle];
$this->verifyPasswordView($modelList);
$model = M('withdraw', 'tab_');
$withdrawId = intval(I('get.id', 0));
if ($withdrawId == 0) {
$this->error('参数异常');
}
$withdraw = $model->find($withdrawId);
if (empty($withdraw) || $withdraw['promote_id'] != $this->loginPromote['id']) {
$this->error('参数异常');
}
$withdraw['create_time'] = date('Y-m-d H:i:s', $withdraw['create_time']);
$withdraw['settlement_end_time'] = date('Y-m-d H:i:s', $withdraw['settlement_end_time']);
$withdraw['status'] = FinanceController::$withdrawStatus[$withdraw['status']];
$map['withdraw_id'] = $withdrawId;
$data = M('spend', 'tab_')
->field('game_name,selle_ratio,pay_way,sum(pay_amount) as pay_amount_all,sum(if(selle_ratio > 0,pay_amount * selle_ratio,0)) as income')
->where($map)
->group('game_id')
->order('game_id')
->select();
if (!empty($data)) {
foreach ($data as &$list) {
$list['income'] = bcdiv($list['income'], 100, 2);
}
}
$this->assign('withdraw', $withdraw);
$this->assign('listData', $data);
$this->assign('promoteData', $this->loginPromote);
$this->assign('meta_title', $metaTitle);
$this->assign('modelList', $modelList);
$this->display();
}
}

@ -0,0 +1,200 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/platform.css" rel="stylesheet">
<link href="__CSS__/detailed.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style>
.trunk-list .table3 {
width: 100%;
}
.table3 tr td {
border: 1px solid #E0E7EF;
}
.pagenation {
line-height: 6.5vh;
}
.pagenation > div {
text-align: right;
}
.trunk-list .table3 tr {
height: 4.2vh;
}
.detailed-content-box {
width: 350px;
}
</style>
</block>
<block name="body">
<div class="page-search normal_list charge-agentPay-search">
<div style="position: absolute;margin-top: -25px;color: #6a7082;">
<span class="back-btn" style="cursor: pointer;"><i class="iconfont iconreply"></i> 返回</span>
</div>
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:
<volist name="modelList" id="vo" key="k">
<?php if ($k == count($modelList)) {
echo "<span>$vo</span>";
} else {
echo "<span>$vo></span>";
}?>
</volist>
</div>
</div>
<span class="title_main">订单信息</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix" style="display: grid;">
<div class="tab detailed-box">
<label class="detailed-title detailed-label">提现订单号:</label>
<div class="detailed-content-box">
<span>{$withdraw.widthdraw_number}</span>
</div>
<label class="detailed-title detailed-label">申请时间:</label>
<div class="detailed-content-box">
<span>{$withdraw.create_time}</span>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label">会长账号:</label>
<div class="detailed-content-box">
<span>{$withdraw.promote_account}</span>
</div>
<label class="detailed-title detailed-label">结算截止时间:</label>
<div class="detailed-content-box">
<span>{$withdraw.settlement_end_time}</span>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label">状态:</label>
<div class="detailed-content-box">
<span>{$withdraw.status}</span>
</div>
<label class="detailed-title detailed-label">收款人:</label>
<div class="detailed-content-box">
<span>{$promoteData.bank_account}</span>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label">开户行:</label>
<div class="detailed-content-box">
<span>{$promoteData.bank_name}</span>
</div>
<label class="detailed-title detailed-label">银行账号:</label>
<div class="detailed-content-box">
<span>{$promoteData.bank_card}</span>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label">收益金额:</label>
<div class="detailed-content-box">
<span>
<if condition="$withdraw.status eq -1">
0.00
<else/>
{$withdraw.sum_money}
</if>
</span>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label">奖惩金额:</label>
<div class="detailed-content-box">
<span>0.00</span>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label">实际提现金额:</label>
<div class="detailed-content-box">
<span>
<if condition="$withdraw.status eq -1">
0.00
<else/>
{$withdraw.sum_money}
</if>
<span style="color: red;">(实际提现金额=提现金额+奖惩金额)</span>
</span>
</div>
</div>
</div>
</div>
<div class="trunk-title">
<span class="title_main">结算汇总</span>
</div>
<div class="trunk-content article">
<div class="tabcon trunk-list">
<table class="table normal_table">
<tr class="odd">
<th>游戏名称</th>
<th>流水</th>
<th>现金分成基数</th>
<th>现金分成比例</th>
<th>平台币分成基数</th>
<th>平台币分成比例</th>
<th>绑定币分成基数</th>
<th>绑定币分成比例</th>
<th>合作方分成金额</th>
</tr>
<if condition="true eq empty($listData) or $withdraw.status eq -1">
<tr class="num2">
<td colspan="99" style="text-align: center;height: 45vh;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</td>
</tr>
<else/>
<volist name="listData" id="vo">
<tr class="num2">
<td>{$vo.game_name}</td>
<td>{$vo.pay_amount_all}</td>
<if condition="$vo.pay_way neq -1 and $vo.pay_way neq 0">
<td>{$vo.pay_amount_all}</td>
<else/>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%</td>
<if condition="$vo.pay_way eq 0">
<td>{$vo.pay_amount_all}</td>
<else/>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%</td>
<if condition="$vo.pay_way eq -1">
<td>{$vo.pay_amount_all}</td>
<else/>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%</td>
<td>{$vo.income}</td>
</tr>
</volist>
</if>
</table>
</div>
</div>
<div class="detailed-br"></div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$('.back-btn').on('click', function () {
location.href = "{:U('withdrawRecord')}";
});
</script>
</block>

@ -135,8 +135,11 @@
<th>玩家账号</th>
<th>订单总额</th>
<th>现金分成基数</th>
<th>现金分成比例</th>
<th>平台币分成基数</th>
<th>平台币分成比例(直充|内充)</th>
<th>平台币分成比例</th>
<th>绑定币分成基数</th>
<th>绑定币分成比例</th>
<th>现金支付通道</th>
<th>收益</th>
<th>订单状态</th>
@ -157,14 +160,24 @@
<td>{:getSDKTypeName($vo['sdk_version'])}</td>
<td>{$vo.user_account}</td>
<td>{$vo.pay_amount}</td>
<if condition="$vo.pay_way eq -1">
<if condition="$vo.pay_way neq -1 and $vo.pay_way neq 0">
<td>{$vo.pay_amount}</td>
<else/>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%</td>
<if condition="$vo.pay_way eq 0">
<td>{$vo.pay_amount}</td>
<else/>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%</td>
<if condition="$vo.pay_way eq -1">
<td>{$vo.pay_amount}</td>
<else/>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%|{$vo.selle_ratio}%</td>
<td>{$vo.selle_ratio}%</td>
<td>{$vo.pay_way_name}</td>
<td>{$vo.income}</td>
<td>{$status}</td>

@ -98,13 +98,13 @@
</div>
<div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">充值时间:</label>
<label class="form-title select-title" style="position: relative;">交易时间:</label>
<div class="select-time">
<input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
<input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
<input type="text" id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
</div>
</div>
@ -172,7 +172,7 @@
<td>
<a href="{:U('withdrawDtl', array('id'=>$vo['id']))}">提现明细</a>
<a>汇款证明</a>
<a>结算单</a>
<a href="{:U('settlementOrder', array('id'=>$vo['id']))}">结算单</a>
</td>
</tr>
</volist>

Loading…
Cancel
Save