<?php
namespace backendApi\modules\v1\models\lists\user;

use common\helpers\Cache;
use common\helpers\http\BackendToFrontendApi;
use common\helpers\user\Info;
use common\libs\dataList\DataListInterface;
use common\models\DecRole;
use common\models\EmployLevel;
use common\models\OpenBank;
use common\models\Region;
use common\models\User;
use common\models\UserInfo;
use common\libs\dataList\column\DateTime;
use common\libs\dataList\column\YesNo;
use common\models\UserNetwork;
use common\models\UserSystem;
use Yii;

class IndexList extends \common\libs\dataList\DataList implements DataListInterface
{
    /**
     * 列表名称
     * @return string
     */
    public function getListName(){
        return '会员列表';
    }

    /**
     * 列表筛选到的数据
     */
    public function dataHandle()
    {
//        $this->condition .= ' AND UN.PARENT_UID=UI.CON_UID';
        $this->listData = User::lists($this->condition, $this->params, [
            'select' => 'U.*,
                UI.USER_ID, UI.ZC_PV, UI.CON_UID, UI.REC_UID, UI.CON_NUM, UI.REC_NUM, UI.NETWORK_DEEP, 
                UI.RELATION_DEEP, UI.SYSTEM_ID, UI.IS_GROUP_LEADER, UI.IS_SYSTEM_LEADER, UI.IS_TEAM, UI.IS_BIND, 
                UI.IS_TEAM_MAIN, UI.IS_BIND_MAIN, UI.IS_AUTO_WITHDRAW, UI.CLOSE_LOGIN, UI.REG_TYPE, UI.SHOULD_REG_TYPE, 
                UI.REG_NAME, UI.CREDIT_CODE, UI.PREMISES, UI.LEGAL_PERSON, UI.REG_EXPIRES, UI.STORE_TYPE, UI.INVOICE_BALANCE, 
                UI.HIGHEST_EMP_LV, UI.CLOSE_LOGIN_AT, UI.PULLED_AT, 
                UI.GROUP_LEADER_AT, UI.ALLOW_TRANSFER, UI.ALLOW_RECONSUME_SMS, UI.ALLOW_RECONSUME_SMS_TO, 
                UI.HIGHEST_EMP_LV_PERIOD, UI.TRANSFER_PROP, UI.LOGIN_NUMS, UI.FAIL_NUMS, UI.LAST_LOGIN_IP, 
                UI.LAST_LOGIN_AT, UI.SHOW_EMP_LV,UN.RELATIVE_LOCATION,
                CU.USER_NAME CON_USER_NAME,CU.REAL_NAME CON_REAL_NAME,
                RU.USER_NAME REC_USER_NAME,RU.REAL_NAME REC_REAL_NAME,
                DU.USER_NAME DEC_USER_NAME
                ',
            'orderBy' => 'U.CREATED_AT DESC',
            'from' => User::tableName() . ' AS U',
            'join' => [
                ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'U.ID=UI.USER_ID'],
                ['LEFT JOIN', UserNetwork::tableName() . ' AS UN', 'U.ID=UN.USER_ID'],
                ['LEFT JOIN', User::tableName() . ' AS CU', 'UI.CON_UID=CU.ID'],
                ['LEFT JOIN', User::tableName() . ' AS RU', 'UI.REC_UID=RU.ID'],
                ['LEFT JOIN', User::tableName() . ' AS DU', 'U.DEC_ID=DU.ID'],
            ],
            'page' => $this->page,
            'pageSize' => $this->pageSize,
        ]);
        foreach ($this->listData['list'] as $key => $value) {
            // 后台访问前台的请求参数
            if (!$this->isExport && Yii::$app->user->validateAdminAction('user', 'login-to-frontend')) {
                $urlParams = BackendToFrontendApi::paramsFormat(['id' => $value['USER_ID']]);
                $urlParamStr = '';
                foreach ($urlParams as $pKey => $pValue) {
                    $urlParamStr .= $pKey . '=' . $pValue . '&';
                }
                $urlParamStr = substr($urlParamStr, 0, -1);
                $this->listData['list'][$key]['BTF_URL'] = $urlParamStr;
            } else {
                $this->listData['list'][$key]['BTF_URL'] = null;
            }
        }
    }

    /**
     * 要展示和导出的所有字段
     * @return array
     */
    public function getColumn(){
        $decLevelConfig = Cache::getDecLevelConfig();
        $empLevelConfig = Cache::getEmpLevelConfig();
        $decRoleConfig = DecRole::getAllData();
        $systemConfig = UserSystem::getAllSystems();
        $openBankConfig = OpenBank::getAllOpenBank();
        $regionConfig = Cache::getRegionConfig();
        if(!$this->columns){
            $this->columns = [
                'USER_ID' => null, // 这种传输方式主要是用于索引，因为过滤后的字段可能没有这种ID，但是一些功能的操作还需要用这种ID去关联，例如前台会员列表中的勾选批量状态管理，这里需要的就是USER_ID
                'BTF_URL' => null,
                'USER_NAME' => [
                    'header' => '会员编号',
                    'headerOther' => ['width' => '150'],
                ],
                'REAL_NAME' => [
                    'header' => '会员姓名',
                    'headerOther' => [
                        'width' => '120',
                    ],
                    'valueOther' => [
                        'tag'=>['type'=>'success', 'size' => 'small', 'class'=>'no-border']
                    ],
                ],
                'LOGIN_STATUS_NAME' => [
                    'header' => '登录状态',
                    'value' => function($row) {
                        return $row['ALLOW_LOGIN'] == 1 ? '允许登录' : '禁止登录';
                    },
                    'headerOther' => ['width' => '110'],
                ],
                'STATUS' => [
                    'header' => '状态',
                    'value' => function($row) {
                        return $row['STATUS'] == 1 ? '激活' : '锁定';
                    },
                    'headerOther' => ['width' => '110'],
                ],
                'ALLOW_LOGIN' => ['header' => '筛选允许登录','hidden'=>true],
                'CREATED_AT' => [
                    'header' => '加入日期',
                    'value' => function($row) {
                        return (new DateTime([
                            'value' => $row['CREATED_AT'],
                        ]))->result();
                    },
                    'headerOther' => ['width' => '170'],
                ],
                'PERIOD_AT' => '加入期数',
                'DEC_LV_NAME' => [
                    'header' => '实时会员级别',
                    'headerOther' => [
                        'width' => '110',
                    ],
                    'value' => function($row) use($decLevelConfig) {
                        return $decLevelConfig[$row['DEC_LV']]['LEVEL_NAME'];
                    },
                    'valueOther' => [
                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
                    ],
                ],
                'DEC_LV_UPDATED_AT' => [
                    'header' => '实时调整日期',
                    'value' => function($row) {
                        return (new DateTime([
                            'value' => $row['DEC_LV_UPDATED_AT'],
                        ]))->result();
                    },
                    'headerOther' => ['width' => '170'],
                ],
                'LAST_DEC_LV_NAME' => [
                    'header' => '结算时会员级别',
                    'headerOther' => [
                        'width' => '120',
                    ],
                    'value' => function($row) use($decLevelConfig) {
                        if (!$row['LAST_DEC_LV']) {
                            return $decLevelConfig[$row['DEC_LV']]['LEVEL_NAME'];
                        } else {
                            return $decLevelConfig[$row['LAST_DEC_LV']]['LEVEL_NAME'];
                        }
                    },
                    'valueOther' => [
                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
                    ],
                ],
                'EMP_LV_NAME' => [
                    'header' => '最高聘级',
                    'headerOther' => [
                        'width' => '130',
                    ],
                    'value' => function($row) use($empLevelConfig) {
                        return isset($empLevelConfig[$row['EMP_LV']])?$empLevelConfig[$row['EMP_LV']]['LEVEL_NAME']:$empLevelConfig[EmployLevel::getDefaultLevelId()]['LEVEL_NAME'];
                    },
                    'valueOther' => [
                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
                    ],
                ],
                'LAST_EMP_LV_NAME' => [
                    'header' => '最新聘级',
                    'headerOther' => [
                        'width' => '130',
                    ],
                    'value' => function($row) use($empLevelConfig) {
                        return isset($empLevelConfig[$row['LAST_EMP_LV']])?$empLevelConfig[$row['LAST_EMP_LV']]['LEVEL_NAME']:$empLevelConfig[EmployLevel::getDefaultLevelId()]['LEVEL_NAME'];
                    },
                    'valueOther' => [
                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
                    ],
                ],
//                'HIGHEST_EMP_LV_NAME' => [
//                    'header' => '历史最高聘级',
//                    'value' => function($row) use($empLevelConfig) {
//                        if (!$row['HIGHEST_EMP_LV']){
//                            return $empLevelConfig[$row['EMP_LV']]['LEVEL_NAME'];
//                        } else {
//                            return $empLevelConfig[$row['HIGHEST_EMP_LV']]['LEVEL_NAME'];
//                        }
//                    },
//                    'headerOther' => ['width' => '130'],
//                ],
//                'HIGHEST_EMP_LV_PERIOD' => [
//                    'header' => '首次达到历史最高聘级的期数',
//                    'headerOther' => ['width' => '210'],
//                ],
                'REC_USER_NAME' => [
                    'header' => '推荐编号',
                    'headerOther' => ['width' => '150'],
                ],
                'REC_REAL_NAME' => [
                    'header' => '推荐姓名',
                    'headerOther' => ['width' => '100'],
                ],
                'CON_USER_NAME' => [
                    'header' => '安置编号',
                    'headerOther' => ['width' => '150'],
                ],
                'CON_REAL_NAME' => [
                    'header' => '安置姓名',
                    'headerOther' => ['width' => '100'],
                ],
                'RELATIVE_LOCATION' => [
                    'header' => '安置区域',
                    'headerOther' => ['width' => '100'],
                ],
                'ID_TYPE' => [
                    'header' => '证件类型',
                    'value' => function($row) {
                        return $row['ID_TYPE'] == 0 ? '身份证' : '';
                    },
                ],
                'ID_CARD' => [
                    'header' => '证件号码',
                    'value' => function($row) {
                        return "\t".$row['ID_CARD'];
                    },
                    'headerOther' => ['width' => '180'],
                ],
//                'SPOUSE_NAME' => [
//                    'header' => '配偶姓名',
//                    'headerOther' => ['width' => '100'],
//                ],
//                'SPOUSE_IDCARD' => [
//                    'header' => '配偶身份证号',
//                    'value' => function($row) {
//                        return "\t".$row['SPOUSE_IDCARD'];
//                    },
//                    'headerOther' => ['width' => '180'],
//                ],
//                'SYSTEM_NAME' => [
//                    'header' => '体系名称',
//                    'headerOther' => ['width' => '150'],
//                    'value' => function($row) use($systemConfig) {
//                        return $systemConfig[$row['SYSTEM_ID']]['SYSTEM_NAME'] ?? '';
//                    },
//                ],
                'MOBILE' => [
                    'header' => '手机号码',
                    'value' => function($row) {
                        return "\t".$row['MOBILE'];
                    },
                    'headerOther' => ['width' => '120'],
                ],
                'TEL' => [
                    'header' => '备用手机号码',
                    'value' => function($row) {
                        return "\t".$row['TEL'];
                    },
                    'headerOther' => ['width' => '120'],
                ],
                'DEC_USER_NAME' => [
                    'header' => '所属报单中心编号',
                    'headerOther' => ['width' => '150'],
                ],
                'IS_DEC' => [
                    'header' => '是否报单中心',
                    'value' => function($row) {
                        return (new YesNo([
                            'value' => $row['IS_DEC'],
                        ]))->result();
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['IS_DEC']) && $row['IS_DEC'] )? 'success' : 'info', 'size' => 'small']
                        ];
                    },
                ],
                'IS_STUDIO' => [
                    'header' => '是否工作室',
                    'value' => function($row) {
                        return (new YesNo([
                            'value' => $row['IS_STUDIO'],
                        ]))->result();
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['IS_STUDIO']) && $row['IS_STUDIO'] )? 'success' : 'info', 'size' => 'small']
                        ];
                    },
                ],
                'IS_STUDIO_CODE' => [
                    'header' => '工作室编号',
                    'headerOther' => ['width' => '120'],
                ],
                'IS_STUDIO_DATE' => [
                    'header' => '工作室日期',
                    'headerOther' => ['width' => '120'],
                ],
                'IS_ATLAS' => [
                    'header' => '是否显示图谱',
                    'value' => function($row) {
                        return (new YesNo([
                            'value' => $row['IS_ATLAS'],
                        ]))->result();
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['IS_ATLAS']) && $row['IS_ATLAS'] )? 'success' : 'info', 'size' => 'small']
                        ];
                    },
                ],
                'IS_RECHARGE' => [
                    'header' => '是否显示充值',
                    'value' => function($row) {
                        return (new YesNo([
                            'value' => $row['IS_RECHARGE'],
                        ]))->result();
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['IS_RECHARGE']) && $row['IS_RECHARGE'] )? 'success' : 'info', 'size' => 'small']
                        ];
                    },
                ],
                'DEC_ROLE_NAME' => [
                    'header' => '报单中心级别',
                    'headerOther' => ['width' => '110'],
                    'value' => function($row) use($decRoleConfig) {
                        return $decRoleConfig[$row['DEC_ROLE_ID']]['ROLE_NAME'] ?? '';
                    },
                ],
                'OPEN_BANK_NAME' => [
                    'header' => '开户银行',
                    'headerOther' => ['width' => '110'],
                    'value' => function($row) use($openBankConfig) {
                        return $openBankConfig[$row['OPEN_BANK']]['BANK_NAME'] ?? '';
                    },
                ],
                'BANK_AREA' => [
                    'header' => '银行地区',
                    'value' => function($row) use($regionConfig) {
                        $province = $regionConfig[$row['BANK_PROVINCE']]['REGION_NAME'] ?? '';
                        $city = $regionConfig[$row['BANK_CITY']]['REGION_NAME'] ?? '';
                        $county = $regionConfig[$row['BANK_COUNTY']]['REGION_NAME'] ?? '';
                        return $province.$city.$county;
                    },
                    'showValue' => function($row) use($regionConfig) {
                        $province = $regionConfig[$row['BANK_PROVINCE']]['REGION_NAME'] ?? '';
                        $city = $regionConfig[$row['BANK_CITY']]['REGION_NAME'] ?? '';
                        $county = $regionConfig[$row['BANK_COUNTY']]['REGION_NAME'] ?? '';
                        return '<div class="addr" title='.$province.$city.$county.'>'.$province.$city.$county.'</div>';
                    },
                    'headerOther' => [
                        'width' => '200'
                    ],
                ],
                'BANK_ADDRESS' => [
                    'header' => '开户地址',
                    'headerOther' => ['width' => '250'],
                    'showValue' => function($row) {
                        return '<div class="addr" title='.$row['BANK_ADDRESS'].'>'.$row['BANK_ADDRESS'].'</div>';
                    },
                ],
                'BANK_NO' => [
                    'header' => '银行帐号',
                    'headerOther' => ['width' => '220'],
                    'value' => function($row) {
                        return "\t".$row['BANK_NO'];
                    },
                ],
                'SEX' => '性别',
                'NATION_NAME' => [
                    'header' => '民族',
                    'value' => function($row) {
                        return \Yii::$app->params['nation'][$row['NATION']]['name'] ?? '';
                    },
                ],
                'AREA' => [
                    'header' => '常用地址',
                    'value' => function($row) use($regionConfig) {
                        $province = $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                        $city = $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                        $county = $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';
                        return $province.$city.$county;
                    },
                    'showValue' => function($row) {
                        $province = $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                        $city = $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                        $county = $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';
                        return '<div class="addr" title='.$province.$city.$county.'>'.$province.$city.$county.'</div>';
                    },
                    'headerOther' => [
                        'width' => '200'
                    ],
                ],
                'ADDRESS' => [
                    'header' => '身份证地址',
                    'value' => function($row) {
                        return $row['ADDRESS'];
                    },
                    'showValue' => function($row) {
                        return '<div class="addr" title='.$row['ADDRESS'].'>'.$row['ADDRESS'].'</div>';
                    },
                    'headerOther' => ['width' => '250'],
                ],
//                'IS_AUTO_WITHDRAW' => [
//                    'header' => '提现方式',
//                    'value' => function($row) {
//                        return $row['IS_AUTO_WITHDRAW']==0?'手动':'自动';
//                    },
//                ],
                'VERIFIED' => [
                    'header' => '实名认证',
                    'value' => function($row) {
                        return (new YesNo([
                            'value' => $row['VERIFIED'],
                        ]))->result();
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['VERIFIED']) && $row['VERIFIED']) ? 'success' : 'info', 'size' => 'small']
                        ];
                    },
                ],
                'VERIFIED_AT' => [
                    'header' => '实名认证日期',
                    'value' => function($row) {
                        return (new DateTime([
                            'value' => $row['VERIFIED_AT'],
                        ]))->result();
                    },
                    'headerOther' => ['width' => '170'],
                ],
//                'IS_DIRECT_SELLER' => [
//                    'header' => '是否直销员',
//                    'value' => function($row) {
//                        return (new YesNo([
//                            'value' => $row['IS_DIRECT_SELLER'],
//                        ]))->result();
//                    },
//                    'valueOther' => function($row) {
//                        return [
//                            'tag'=>['type'=>(isset($row['IS_DIRECT_SELLER']) && $row['IS_DIRECT_SELLER']) ? 'success' : 'info', 'size' => 'small']
//                        ];
//                    },
//                    'headerOther' => function($row) {
//                        return [
//                            'width' => '120',
//                        ];
//                    },
//                ],
//                'IS_SYSTEM_LEADER' => [
//                    'header' => '是否体系领导人',
//                    'value' => function($row) {
//                        return (new YesNo([
//                            'value' => $row['IS_SYSTEM_LEADER'],
//                        ]))->result();
//                    },
//                    'headerOther' => function($row) {
//                        return [
//                            'width' => '120',
//                        ];
//                    },
//                    'valueOther' => function($row) {
//                        return [
//                            'tag'=>['type'=>(isset($row['IS_SYSTEM_LEADER']) && $row['IS_SYSTEM_LEADER']) ? 'success' : 'info', 'size' => 'small']
//                        ];
//                    },
//                ],
//                'IS_GROUP_LEADER' => [
//                    'header' => '是否团队领导人',
//                    'value' => function($row) {
//                        return (new YesNo([
//                            'value' => $row['IS_GROUP_LEADER'],
//                        ]))->result();
//                    },
//                    'headerOther' => function($row) {
//                        return [
//                            'width' => '120',
//                        ];
//                    },
//                    'valueOther' => function($row) {
//                        return [
//                            'tag'=>['type'=>(isset($row['IS_GROUP_LEADER']) && $row['IS_GROUP_LEADER'] ) ? 'success' : 'info', 'size' => 'small']
//                        ];
//                    },
//                ],
                'BIRTHDAY' => [
                    'header' => '生日',
                    'value' => function($row) {
                        return date('Y-m-d', strtotime($row['BIRTHDAY']));
                    },
                    'headerOther' => ['width' => '110'],
                ],
                'ALLOW_TRANSFER' => [
                    'header' => '转账功能开启',
                    'value' => function($row) {
                        return $row['ALLOW_TRANSFER'] == 1 ? '开启' : '关闭';
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['ALLOW_TRANSFER']) && $row['ALLOW_TRANSFER']) ? 'success' : 'info', 'size' => 'small']
                        ];
                    },
                ],
                'DEC_CLOSED' => [
                    'header' => '是否关闭报单',
                    'value' => function($row) {
                        return (new YesNo([
                            'value' => $row['DEC_CLOSED'],
                        ]))->result();
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['DEC_CLOSED']) && $row['DEC_CLOSED']) ? 'info' : 'success', 'size' => 'small']
                        ];
                    },
                ],
                'IS_MODIFY_PASSWORD' => [
                    'header' => '密码修改状态',
                    'value' => function($row) {
                        return $row['IS_MODIFY_PASSWORD'] == 1 ? '开启' : '关闭';
                    },
                    'headerOther' => function($row) {
                        return [
                            'width' => '120',
                        ];
                    },
                    'valueOther' => function($row) {
                        return [
                            'tag'=>['type'=>(isset($row['IS_MODIFY_PASSWORD']) && $row['IS_MODIFY_PASSWORD'] )? 'success' : 'info', 'size' => 'small']
                        ];
                    },
                ],
            ];
        }
        return $this->columns;
    }

    /**
     * 前台用于筛选的类型集合
     * @return mixed
     */
    public function getFilterTypes()
    {
        if(!$this->filterTypes){
            $this->filterTypes = [
                'USER_NAME'=> ['name'=> '会员编号'],
                'REAL_NAME'=> ['name'=> '会员姓名'],
//                'ALLOW_LOGIN'=> ['name'=> '允许登录', 'other'=> 'yesOrNo'],
                'CREATED_AT'=> ['name'=> '加入日期', 'other'=> 'date'],
                'PERIOD_AT'=> ['name'=> '加入期数'],
                'DEC_LV_NAME'=> ['name'=> '实时会员级别', 'other'=> 'decLevel'],
//                'DEC_LV_UPDATED_AT'=> ['name'=> '实时调整日期', 'other'=> 'date'],
//                'LAST_DEC_LV_NAME'=> ['name'=> '结算时会员级别', 'other'=> 'decLevel'],
                'EMP_LV_NAME'=> ['name'=> '最高聘级', 'other'=> 'empLevel'],
                'LAST_EMP_LV_NAME'=> ['name'=> '最新聘级', 'other'=> 'empLevel'],
//                'HIGHEST_EMP_LV_NAME'=> ['name'=> '历史最高聘级', 'other'=> 'empLevel'],
//                'HIGHEST_EMP_LV_PERIOD'=> ['name'=> '首次达到历史最高聘级的期数'],
                'REC_USER_NAME'=> ['name'=> '推荐编号'],
                'CON_USER_NAME'=> ['name'=> '安置编号'],
                //'ID_TYPE'=> ['name'=> '证件类型', 'other'=> 'select', 'selectData'=> [['id'=> 0, 'name'=> '身份证']]],
                'ID_CARD'=> ['name'=> '证件号码'],
//                'SPOUSE_NAME'=> ['name'=> '配偶姓名'],
//                'SPOUSE_IDCARD'=> ['name'=> '配偶身份证号'],
//                'SYSTEM_NAME'=> ['name'=> '体系名称', 'other'=> 'systems'],
//                'SUB_COM_NAME'=> ['name'=> '所属分公司', 'other'=> 'subCompany'],
                'MOBILE'=> ['name'=> '手机号码'],
//                'TEL'=> ['name'=> '备用手机号码'],
                'DEC_USER_NAME'=> ['name'=> '所属报单中心编号'],
                'IS_DEC'=> ['name'=> '是否报单中心', 'other'=> 'yesOrNo'],
                'IS_STUDIO'=> ['name'=> '是否工作室', 'other'=> 'yesOrNo'],
                'DEC_ROLE_NAME'=> ['name'=> '报单中心级别', 'other'=> 'decRole'],
//                'OPEN_BANK_NAME'=> ['name'=> '开户银行', 'other'=> 'banks'],
//                'BANK_AREA'=> ['name'=> '银行地区', 'other'=> 'area'],
//                'BANK_ADDRESS'=> ['name'=> '开户地址'],
//                'BANK_NO'=> ['name'=> '银行账号'],
//                'SEX'=> ['name'=> '性别', 'other'=> 'sex'],
//                'NATION_NAME'=> ['name'=> '民族', 'other'=> 'nations'],
                'AREA'=> ['name'=> '常用地址', 'other'=> 'area'],
                'STATUS'=> ['name'=> '激活状态', 'other'=> 'select', 'selectData'=> [['id'=> 0, 'name'=> '锁定'],['id'=> 1, 'name'=> '激活']]],
//                'ADDRESS'=> ['name'=> '身份证地址'],
//                'IS_AUTO_WITHDRAW'=> [
//                    'isUserTable'=> false,
//                    'name'=> '提现方式',
//                    'other'=> 'select',
//                    'selectData'=> [['id'=> 0, 'name'=> '手动'], ['id'=> 1, 'name'=> '自动']]
//                ],
//                'VERIFIED'=> ['name'=> '实名认证', 'other'=> 'yesOrNo'],
//                'VERIFIED_AT'=> ['name'=> '实名认证日期', 'other'=> 'date'],
//                'IS_DIRECT_SELLER'=> ['name'=> '是否直销员', 'other'=> 'yesOrNo'],
//                'IS_SYSTEM_LEADER'=> ['name'=> '是否体系领导人', 'other'=> 'yesOrNo'],
//                'IS_GROUP_LEADER'=> ['name'=> '是否团队领导人', 'other'=> 'yesOrNo'],
//                'ALLOW_TRANSFER'=> ['name'=> '转账功能开启', 'other'=> 'select', 'selectData'=> [['id'=> 0, 'name'=> '关闭'],['id'=> 1, 'name'=> '开启']]],
//                'DEC_CLOSED'=> ['name'=> '是否关闭报单', 'other'=> 'yesOrNo'],
            ];
        }
        return $this->filterTypes;
    }
}
