add
This commit is contained in:
parent
9360e66dc2
commit
e7f9c2caea
|
@ -19,6 +19,7 @@ use app\common\lists\ListsExcelInterface;
|
|||
use app\common\model\Company;
|
||||
use app\common\model\contract\Contract;
|
||||
use app\common\model\user\User;
|
||||
use app\common\model\user\UserRole;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
|
@ -73,10 +74,15 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface
|
|||
}
|
||||
}
|
||||
|
||||
$field = "id,id contract,sn,nickname,sex,avatar,account,mobile,channel,create_time,admin_id,company_id,street,street as street_name,is_contract";
|
||||
$field = "id,id contract,sn,nickname,sex,avatar,account,mobile,channel,create_time,admin_id,company_id,street,street as street_name,is_contract,group_id";
|
||||
|
||||
$lists = User::withSearch($this->setSearch(), $this->params)
|
||||
->append(['role_name'])
|
||||
->with(['company'])
|
||||
->withAttr('role_name', function ($value, $data){
|
||||
$role = UserRole::where('id', $data['group_id'])->find();
|
||||
return $role? $role['name']: "无";
|
||||
})
|
||||
->where($where)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->field($field)
|
||||
|
|
|
@ -53,6 +53,7 @@ class UserLogic extends BaseLogic
|
|||
$user['channel'] = UserTerminalEnum::getTermInalDesc($user['channel']);
|
||||
// $user->sex = $user->getData('sex');
|
||||
$user['qualification']=json_decode($user->qualification,true);
|
||||
$user['deposit_date'] = date('Y-m-d', $user['deposit_date']);
|
||||
if($user->is_contract==1){
|
||||
$user['contract']=Contract::where(['type'=>2,'party_b'=>$userId])->with(['party_a_info','contractType'])->find();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue