Merge pull request 'preview' (#169) from preview into master

Reviewed-on: #169
This commit is contained in:
mkm 2023-11-17 19:04:39 +08:00
commit dbcffd626a

View File

@ -65,12 +65,12 @@ class ApproveLists extends BaseAdminDataLists implements ListsSearchInterface
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select() ->select()
->withAttr('area_manager',function($value,$data){ ->withAttr('area_manager',function($value,$data){
return Admin::where(['id' => $data['check_admin_ids']])->value('name'); $company = Company::where(['admin_id'=>$data['check_admin_ids']])->find();
return Admin::where(['id' => $company['area_manager']])->value('name');
}) })
->withAttr('company_name',function($value,$data){ ->withAttr('company_name',function($value,$data){
$extend = json_decode($data['extend'], true); $company = Company::where(['admin_id'=>$data['check_admin_ids']])->find();
$company = Db::query("select * from la_company where FIND_IN_SET(:street,responsible_area)", ['street'=>$extend['street']], true); return $company['company_name'];
return $company[0]['company_name'];
}) })
->toArray(); ->toArray();
$count = Approve::where($this->searchWhere) $count = Approve::where($this->searchWhere)