补单记录

master
zhanglingsheng 5 years ago
parent 908de1336f
commit ca401adbd0

@ -111,6 +111,10 @@ class BehaviorLogController extends ThinkController
$map['tab_repair_pay.type'] = $params['type'];
}
if(isset($params['type'])) {
$map['tab_spend.extend'] = $params['extend'];
}
if(isset($params['pay_order_number'])) {
$map['tab_repair_pay.pay_order_number'] = $params['pay_order_number'];
}
@ -120,8 +124,8 @@ class BehaviorLogController extends ThinkController
}
if(!empty(I('get.order_number'))) {
$map['tab_spend.order_number'] = I('get.order_number');
if(!empty(I('get.extend'))) {
$map['tab_spend.extend'] = I('get.extend');
$data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->order('tab_repair_pay.id DESC')->select();
} else {
$data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->order('id DESC')->select();
@ -133,10 +137,10 @@ class BehaviorLogController extends ThinkController
$order_detail = M('spend', 'tab_')->field('extend,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = $order_detail['pay_time'];
} elseif($v['tab'] == 'deposit') {
$order_detail = M('deposit', 'tab_')->field('order_number,create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$order_detail = M('deposit', 'tab_')->field('create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = $order_detail['create_time'];
}
$re_data['order_number'] = isset($order_detail['extend']) ? $order_detail['extend'] : '-';
$re_data['extend'] = isset($order_detail['extend']) ? $order_detail['extend'] : '-';
$re_data['user_account'] = $order_detail['user_account'];
$re_data['promote_account'] = $order_detail['promote_account'];
$re_data['game_name'] = !empty($order_detail['game_name']) ? $order_detail['game_name'] : '-';
@ -149,8 +153,8 @@ class BehaviorLogController extends ThinkController
$show_data[] = $re_data;
}
if(!empty(I('get.order_number'))) {
$map['tab_spend.order_number'] = I('get.order_number');
if(!empty(I('get.extend'))) {
$map['tab_spend.extend'] = I('get.extend');
$count = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->count();
} else {
$count = M('repair_pay', 'tab_')->where($map)->count();

@ -2151,7 +2151,7 @@ class ExportController extends Controller
$xlsCell = array(
array('type', '类型'),
array('pay_order_number', '支付订单号'),
array('order_number', 'CP订单号'),
array('extend', 'CP订单号'),
array('pay_time', '充值时间'),
array('user_account', '玩家账号'),
array('promote_account', '所属推广员'),
@ -2169,6 +2169,9 @@ class ExportController extends Controller
$map['tab_repair_pay.create_time'] = array('BETWEEN', [$startTime, $endTime]);
}
if(isset($params['type'])) {
$map['tab_spend.extend'] = $params['extend'];
}
if(isset($params['type'])) {
$map['tab_repair_pay.type'] = $params['type'];
@ -2183,8 +2186,8 @@ class ExportController extends Controller
}
if(!empty(I('get.order_number'))) {
$map['tab_spend.order_number'] = I('get.order_number');
if(!empty(I('get.extend'))) {
$map['tab_spend.extend'] = I('get.extend');
$data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->order('tab_repair_pay.id DESC')->select();
} else {
$data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->order('id DESC')->select();
@ -2193,13 +2196,13 @@ class ExportController extends Controller
$xlsData = [];
foreach($data as $k => $v) {
if($v['tab'] == 'spend') {
$order_detail = M('spend', 'tab_')->field('order_number,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$order_detail = M('spend', 'tab_')->field('extend,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = set_show_time($order_detail['pay_time']);
} elseif($v['tab'] == 'deposit') {
$order_detail = M('deposit', 'tab_')->field('order_number,create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$order_detail = M('deposit', 'tab_')->field('create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = set_show_time($order_detail['create_time']);
}
$re_data['order_number'] = !empty($order_detail['order_number']) ? $order_detail['order_number'] : '-';
$re_data['extend'] = !empty($order_detail['extend']) ? $order_detail['extend'] : '-';
$re_data['user_account'] = $order_detail['user_account'];
$re_data['promote_account'] = $order_detail['promote_account'];
$re_data['game_name'] = !empty($order_detail['game_name']) ? $order_detail['game_name'] : '-';

@ -51,7 +51,7 @@
<input type="text" name="pay_order_number" class="" value="{:I('pay_order_number')}" placeholder="支付订单号">
</div>
<div class="input-list">
<input type="text" name="order_number" class="" value="{:I('order_number')}" placeholder="CP订单号">
<input type="text" name="extend" class="" value="{:I('order_number')}" placeholder="CP订单号">
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="admin_name" name="admin_name" class="select_gallery" >
@ -113,7 +113,7 @@
<tr>
<td>{$vo.type}</td>
<td>{$vo.pay_order_number}</td>
<td>{$vo.order_number}</td>
<td>{$vo.extend}</td>
<td>{:set_show_time($vo['pay_time'])}</td>
<td>{$vo.user_account}</td>
<td>{$vo.promote_account}</td>

Loading…
Cancel
Save