优化转账

master
chenzhi 3 years ago
parent 87c939b455
commit 4be3750a77

@ -345,9 +345,7 @@ class PromoteCoinController extends ThinkController
// $map['id'] = array('lt',1); // $map['id'] = array('lt',1);
// } // }
setPowerPromoteIds($map,'promote_id'); setPowerPromoteIds($map,'promote_id');
$data = D("CoinPayOrder")->lists($_GET["p"], $map, 'id desc');
$data = D("CoinPayOrder")->lists($_GET["p"], $map, $order);
// dump($data);
//执行查询 //执行查询
// parent::order_lists("CoinPayOrder",$_GET["p"],$extend); // parent::order_lists("CoinPayOrder",$_GET["p"],$extend);
$this->meta_title = '线下充值审核列表'; $this->meta_title = '线下充值审核列表';
@ -382,7 +380,7 @@ class PromoteCoinController extends ThinkController
for ($i = 0; $i < $count; $i++) { for ($i = 0; $i < $count; $i++) {
$this->doOfflineAgree($ids[$i]); $this->doOfflineAgree($ids[$i]);
} }
$this->success("批量通过成功"); $this->success("审核通过成功");
# code... # code...
} }
@ -398,7 +396,7 @@ class PromoteCoinController extends ThinkController
for ($i = 0; $i < $count; $i++) { for ($i = 0; $i < $count; $i++) {
$this->orderReject($ids[$i]); $this->orderReject($ids[$i]);
} }
$this->success("批量拒绝成功"); $this->success("审核拒绝成功");
# code... # code...
} }
@ -411,7 +409,7 @@ class PromoteCoinController extends ThinkController
} }
// //
$balance_map['promote_id'] = $order['promote_id']; $balance_map['promote_id'] = $order['promote_id'];
$balance_map['game_id'] = 0; $balance_map['game_id'] = $order['game_id'];
$balance = M('promote_balance_coin', 'tab_')->where($balance_map)->find(); $balance = M('promote_balance_coin', 'tab_')->where($balance_map)->find();
$this->balance_coin_update($order, $balance);//更新汇总 $this->balance_coin_update($order, $balance);//更新汇总
$this->coin_record_add($order, $balance); //添加流水 $this->coin_record_add($order, $balance); //添加流水
@ -460,6 +458,8 @@ class PromoteCoinController extends ThinkController
$data['balance_coin'] = $balance['num'] + $order['coin_num']; $data['balance_coin'] = $balance['num'] + $order['coin_num'];
$data['remark'] = $order['remark']; $data['remark'] = $order['remark'];
$data['create_time'] = time(); $data['create_time'] = time();
$data['game_id'] = $order['game_id'];
$data['description'] = '线下充值'; $data['description'] = '线下充值';
M('promote_coin_record', 'tab_')->data($data)->add(); M('promote_coin_record', 'tab_')->data($data)->add();
} }
@ -469,11 +469,11 @@ class PromoteCoinController extends ThinkController
{ {
if (!empty($balance)) { if (!empty($balance)) {
$map['promote_id'] = $order['promote_id']; $map['promote_id'] = $order['promote_id'];
$map['game_id'] = 0; $map['game_id'] = $order['game_id'];
M('promote_balance_coin', 'tab_')->where($map)->setInc('num', $order['coin_num']); M('promote_balance_coin', 'tab_')->where($map)->setInc('num', $order['coin_num']);
} else { } else {
$balance['promote_id'] = $order['promote_id']; $balance['promote_id'] = $order['promote_id'];
$balance['game_id'] = 0; $balance['game_id'] = $order['game_id'];
$balance['num'] = $order['coin_num']; $balance['num'] = $order['coin_num'];
M('promote_balance_coin', 'tab_')->data($balance)->add(); M('promote_balance_coin', 'tab_')->data($balance)->add();
} }

@ -34,12 +34,6 @@
</div> </div>
<div class="cf top_nav_list"> <div class="cf top_nav_list">
<div class="fl button_list">
<div class="tools">
<a class="ajax-post " onclick="loadicon()" target-form="ids" url="{:U('PromoteCoin/offlineAgree')}"><span class="button_icon button_icon12"></span>审核通过</a>
<a class="ajax-post " onclick="loadicon()" target-form="ids" url="{:U('PromoteCoin/offlineReject')}"><span class="button_icon button_icon9"></span>审核不通过</a>
</div>
</div>
<!-- 高级搜索 --> <!-- 高级搜索 -->
<div class="jssearch fl cf search_list"> <div class="jssearch fl cf search_list">
<div class="input-list search-title-box"> <div class="input-list search-title-box">
@ -87,17 +81,16 @@
<!-- 表头 --> <!-- 表头 -->
<thead> <thead>
<tr> <tr>
<th class=""> <th>订单号</th>
<input class="check-all" type="checkbox" name="ids[]">
</th>
<th>充值账号</th> <th>充值账号</th>
<th>游戏名称</th>
<th>提交时间</th> <th>提交时间</th>
<th>平台币数量</th> <th>充值绑币数量</th>
<th>优惠值</th>
<th>付款金额</th> <th>付款金额</th>
<th>汇入银行</th> <th>订单号</th>
<th>支付凭证</th>
<th>备注</th> <th>备注</th>
<th>审核状态</th> <th>审核状态</th>
@ -112,12 +105,19 @@
<else/> <else/>
<volist name="list_data" id="data"> <volist name="list_data" id="data">
<tr> <tr>
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td> <td>{$data.order_number}</td>
<td>{$data.promote_account}</td> <td>{$data.promote_account}</td>
<if condition="$data.game_id eq 0 ">
<td>通用</td>
<else />
<td>{:get_gamename($data['game_id'])}</td>
</if>
<td>{:set_show_time($data['create_time'])}</td> <td>{:set_show_time($data['create_time'])}</td>
<td>{$data.coin_num}</td> <td>{$data.coin_num}</td>
<td>{$data.real_amount}</td> <td>{$data.discount}%</td>
<td>— —</td> <td>{$data.pay_amount}</td>
<td>{$data.pay_order_number}</td> <td>{$data.pay_order_number}</td>
<td>{$data.remark}</td> <td>{$data.remark}</td>
<td> <td>

@ -42,6 +42,18 @@
<span class="datainfo">{$data['promote_account']}</span> <span class="datainfo">{$data['promote_account']}</span>
</td> </td>
</tr> </tr>
<tr>
<td class="l">游戏名称:</td>
<td class="r">
<if condition="$data.game_id eq 0 ">
<span class="datainfo">通用</span>
<else />
<span class="datainfo">{:get_gamename($data['game_id'])}</span>
</if>
</td>
</tr>
<tr> <tr>
<td class="l">平台币数量:</td> <td class="l">平台币数量:</td>
<td class="r"> <td class="r">
@ -49,19 +61,19 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="l">购买金额</td> <td class="l">优惠值</td>
<td class="r"> <td class="r">
<span class="datainfo">{$data['real_amount']}</span> <span class="datainfo">{$data['discount']}%</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="l">汇入银行:</td> <td class="l">实付金额:</td>
<td class="r"> <td class="r">
<span class="datainfo">--</span> <span class="datainfo">{$data['pay_amount']}</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="l">支付凭证</td> <td class="l">订单号</td>
<td class="r"> <td class="r">
<span class="datainfo">{$data['pay_order_number']}</span> <span class="datainfo">{$data['pay_order_number']}</span>
</td> </td>
@ -112,7 +124,7 @@
charset="UTF-8"></script> charset="UTF-8"></script>
<script type="text/javascript"> <script type="text/javascript">
//导航高亮 //导航高亮
highlight_subnav("{:U('PromoteCoin/offlineList')}"); highlight_subnav("{:U('offlineList')}");
Think.setValue("prmoote_id_to", "{$data.promote_id |default= 0}"); Think.setValue("prmoote_id_to", "{$data.promote_id |default= 0}");
$('#submit').click(function () { $('#submit').click(function () {
$('#form').submit(); $('#form').submit();

Loading…
Cancel
Save