master
ELF 5 years ago
parent 22dcca566b
commit 00966dc9e4

@ -1763,6 +1763,15 @@ class QueryController extends BaseController
$this->display();
}
private function getLevelPromote()
{
$levelPromote = [];
$levelPromote[] = I('level_promote_2', 0);
$levelPromote[] = I('level_promote_3', 0);
$levelPromote[] = I('level_promote_4', 0);
return $levelPromote;
}
private function getQueryPromote($levelPromote)
{
$queryPromote = null;
@ -1794,13 +1803,16 @@ class QueryController extends BaseController
$roleLevelEnd = intval(I('role_level_end', 0));
$headmanPromoteId = I('headman_promote_id', 0);
$createTime = I('create_time', '');
$levelPromote = I('level_promote', []);
$promote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$map = [];
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
$map[] = [
'_logic' => 'or',
'id' => $queryPromote['id'],
'chain' => ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$map = [];
@ -1846,7 +1858,7 @@ class QueryController extends BaseController
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
}
if ($isSelf) {
$map['promote_id'] = $promote['id'];
$map['promote_id'] = $queryPromote['id'];
}
$query = M('user_play_info', 'tab_')->where($map)->order('create_time desc');
list($records, $pagination, $count) = $this->paginate($query);
@ -1871,13 +1883,16 @@ class QueryController extends BaseController
$sdkVersion = I('sdk_version', 0);
$costBegin = I('cost_begin', '');
$costEnd = I('cost_end', '');
$levelPromote = I('level_promote', []);
$promote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$map = [];
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
$map[] = [
'_logic' => 'or',
'id' => $queryPromote['id'],
'chain' => ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$map = [];
@ -1904,8 +1919,8 @@ class QueryController extends BaseController
$map['sdk_version'] = $sdkVersion;
}
if ($isSelf) {
$map['promote_id'] = $promote['id'];
$spendMap['promote_id'] = $promote['id'];
$map['promote_id'] = $queryPromote['id'];
$spendMap['promote_id'] = $queryPromote['id'];
}
if ($costBegin != '' || $costEnd != '') {
$having = '';

@ -109,11 +109,7 @@
</div>
<div class="pagenation clearfix">
<a class="sch-btn" href="{:U('Export/child',array(
'p'=>I('p'),
'account'=>I('account'),'xlsname'=>'管理中心_'.get_pro_grade_name(PRO_GRADE,1),'row'=>I('request.row')
))}" >导出</a>
{$_page}
{$pagination}
</div>
</div>
<div class="page-explain promote-mychlid-explain">

@ -1,21 +1,21 @@
<input type="hidden" id="top-promote-id" value="{$loginer.id}">
<if condition="$loginer.level elt 1">
<div class="form-group normal_space">
<select name="level_promote[2]" class="level-promote reselect select_gallery" style="width: 220px;" data-level="2" data-val="{:I('level_promote', [])[2] ?? 0}">
<select name="level_promote_2" class="level-promote reselect select_gallery" style="width: 220px;" data-level="2" data-val="{:I('level_promote_2', 0)}">
<option value="0">请选择部门长</option>
</select>
</div>
</if>
<if condition="$loginer.level elt 2">
<div class="form-group normal_space">
<select name="level_promote[3]" class="level-promote reselect select_gallery" style="width: 220px;" data-level="3" data-val="{:I('level_promote', [])[3] ?? 0}">
<select name="level_promote_3" class="level-promote reselect select_gallery" style="width: 220px;" data-level="3" data-val="{:I('level_promote_3', 0)}">
<option value="0">请选择组长</option>
</select>
</div>
</if>
<if condition="$loginer.level elt 3">
<div class="form-group normal_space">
<select name="level_promote[4]" class="level-promote reselect select_gallery" style="width: 220px;" data-level="4" data-val="{:I('level_promote', [])[4] ?? 0}">
<select name="level_promote_4" class="level-promote reselect select_gallery" style="width: 220px;" data-level="4" data-val="{:I('level_promote_4', 0)}">
<option value="0">请选择推广员</option>
</select>
</div>

Loading…
Cancel
Save