Merge branch 'feature/promote_group' into release

master
ELF 5 years ago
commit 641e401c73

@ -3066,7 +3066,7 @@ class DownloadController extends BaseController {
$pages = ceil($accessNum / $perSize);
for($i = 1; $i <= $pages; $i++) {
$data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id')
$data = $model->field('pay_order_number,game_name,user_account,promote_id,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id')
->where($map)
->order('id desc')
->limit(($i-1)*$perSize ,$perSize)
@ -3084,6 +3084,14 @@ class DownloadController extends BaseController {
->where(array('id' => ['in',$withdrawIds]))
->getField('id,status');
$promotes = [];
$promoteService = new PromoteService();
if (count($data) > 0) {
$promoteIds = array_column($data, 'promote_id');
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
}
foreach ($data as &$list) {
//提现状态
$list['pay_order_number'] = $this->encryption($list['pay_order_number']);
@ -3115,11 +3123,12 @@ class DownloadController extends BaseController {
$list['pay_amount_nei'] = 0;
}
$promoteGroup = isset($promotes[$list['promote_id']]) ? $promoteService->getGroupNameByChain($promotes[$list['promote_id']]['chain'], $list['promote_id']) : '';
$csvData["pay_order_number"] = $list["pay_order_number"];
$csvData["game_name"] = $list["game_name"];
$csvData["user_account"] = $list["user_account"];
$csvData["promote_account"] = $list["promote_account"];
$csvData["promote_account"] = $list["promote_account"] . ($promoteGroup == '' ? '' : '(' . $promoteGroup . ')');
$csvData["pay_amount"] = $list["pay_amount"];
$csvData["pay_amount_zhi"] = $list["pay_amount_zhi"];
$csvData["pay_amount_nei"] = $list["pay_amount_nei"];
@ -3620,10 +3629,12 @@ class DownloadController extends BaseController {
->limit(($i-1)*$perSize ,$perSize)
->select();
if (count($data) > 0) {
$promoteService = new PromoteService();
$promoteIds = array_column($data, 'promote_id');
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
}
foreach($data as $key => $value) {
// if (empty($value['user_account']) ) {

@ -293,10 +293,13 @@ class FinanceController extends BaseController
->where(array('id' => ['in', $withdrawIds]))
->getField('id,status');
$promotes = [];
$promoteService = new PromoteService();
if (count($data) > 0) {
$promoteIds = array_column($data, 'promote_id');
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
}
foreach ($data as &$list) {
//提现状态

@ -121,11 +121,14 @@
var promote_type = $('[name=promote_type]').val();
var repassword = $('#repassword').val();
var parent_id = $('#parent_id').val();
var group_remark = $('#group_remark').val();
if (group_remark === undefined) {
group_remark = '';
}
if ($('#parent_id').length > 0 && parent_id == 0) {
layer.msg('请选择所属上级');
return
}
console.log(promote_type)
$.ajax({
type:"POST",
url:"{:U('addPromote')}",
@ -139,6 +142,7 @@
mobile_phone: mobile_phone,
idcard: idcard,
nickname: nickname,
group_remark: group_remark,
},
success:function(res){
if(res.status == 1){
@ -181,7 +185,8 @@
if($('#repassword').val()!==$('#password').val()){
return json_data = {'status':0,'msg':'子渠道密码和确认密码不一致'}
}
if ((promote_type == 0 || promote_type == 1) && $.trim($('#group_remark')) == '') {
var promote_type = parseInt($('[name=promote_type]').val());
if ((promote_type == 0 || promote_type == 1) && $.trim($('#group_remark').val()) == '') {
if (promote_type == 0) {
return json_data = {'status':0,'msg':'请输入部门名称'}
}

Loading…
Cancel
Save