解决推广员列表搜索底下推广员时自动过滤掉锁定的

master
liuweiwen 5 years ago
parent 1244156518
commit a9959e9544

@ -53,7 +53,8 @@ class PromoteController extends ThinkController
if ($_REQUEST['parent_id']=='全部') { if ($_REQUEST['parent_id']=='全部') {
unset($_REQUEST['parent_id']); unset($_REQUEST['parent_id']);
} }
$zid=get_zi_promote_id($_REQUEST['parent_id']); $zid = get_zi_promote_id($_REQUEST['parent_id'], null);
// dd($zid);
if ($zid) { if ($zid) {
$zid=$zid.','.$_REQUEST['parent_id']; $zid=$zid.','.$_REQUEST['parent_id'];
} else { } else {
@ -134,11 +135,10 @@ class PromoteController extends ThinkController
} }
} }
// dump($map);die();
//为数据权限添加 //为数据权限添加
setPowerPromoteIds($map, 'id'); setPowerPromoteIds($map, 'id');
$list_data = D(self::model_name)->where($map)->order('id DESC')->page($p, $row)->select(); $list_data = D(self::model_name)->where($map)->order('id DESC')->page($p, $row)->select();
$oa_data = []; $oa_data = [];
if (I('oa_associated', -1) == -1) { if (I('oa_associated', -1) == -1) {
foreach ($list_data as $k => $v) { foreach ($list_data as $k => $v) {

@ -2015,8 +2015,8 @@ function get_parent_promote_($prmote_id=0,$isShwo=true)
return $result; return $result;
} }
//获取当前子渠道 //获取当前子渠道,推广员列表不用过滤锁定的推广员
function get_zi_promote_id($id){ function get_zi_promote_id($id, $status = 1){
// $map['parent_id']=$id; // $map['parent_id']=$id;
// $map['grand_id'] = $id; // $map['grand_id'] = $id;
// $map['_logic'] = 'or'; // $map['_logic'] = 'or';
@ -2035,8 +2035,8 @@ function get_zi_promote_id($id){
if ($self['level'] == 1) { if ($self['level'] == 1) {
$self['chain'] = "/{$id}/"; $self['chain'] = "/{$id}/";
} }
if ($status)
$map['status'] = 1; $map['status'] = $status;
$map["chain"] = array("LIKE","%{$self['chain']}%"); $map["chain"] = array("LIKE","%{$self['chain']}%");
$map["level"] = array("GT",$self['level']); $map["level"] = array("GT",$self['level']);

Loading…
Cancel
Save