diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php
index 080955c5f..5ae5a619d 100644
--- a/Application/Home/Controller/FinanceController.class.php
+++ b/Application/Home/Controller/FinanceController.class.php
@@ -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();
+ }
}
\ No newline at end of file
diff --git a/Application/Home/View/default/Finance/settlementOrder.html b/Application/Home/View/default/Finance/settlementOrder.html
new file mode 100644
index 000000000..16dfbf387
--- /dev/null
+++ b/Application/Home/View/default/Finance/settlementOrder.html
@@ -0,0 +1,200 @@
+ 暂无数据
+
+
+
+ 游戏名称
+ 流水
+ 现金分成基数
+ 现金分成比例
+ 平台币分成基数
+ 平台币分成比例
+ 绑定币分成基数
+ 绑定币分成比例
+ 合作方分成金额
+
+
+
+
+
+
+
+ {$vo.game_name}
+ {$vo.pay_amount_all}
+ {$vo.pay_amount_all}
+ 0
+ {$vo.selle_ratio}%
+ {$vo.pay_amount_all}
+ 0
+ {$vo.selle_ratio}%
+ {$vo.pay_amount_all}
+ 0
+ {$vo.selle_ratio}%
+ {$vo.income}
+