更新
This commit is contained in:
parent
ac32b7b11a
commit
127780eda4
@ -18,6 +18,7 @@ namespace app\adminapi\lists;
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\Company;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
@ -58,6 +59,25 @@ class CompanyLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
->field(['id', 'level_two', 'level_one', 'company_name', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'other_contacts', 'area_manager', 'is_contract', 'account', 'password', 'deposit', 'deposit_time', 'qualification', 'status'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->withAttr('company_type',function($value,$data){
|
||||
return Db::name('dict_data')->where('id',$value)->value('name');
|
||||
})
|
||||
->withAttr('area',function($value,$data){
|
||||
return Db::name('geo_area')->where('area_code',$value)->value('area_name');
|
||||
})
|
||||
->withAttr('street',function($value,$data){
|
||||
return Db::name('geo_street')->where('street_code',$value)->value('street_name');
|
||||
})
|
||||
->withAttr('area_manager',function($value,$data){
|
||||
return Db::name('admin')->where('id',$value)->value('name');
|
||||
})
|
||||
->withAttr('is_contract',function($value,$data){
|
||||
if($value==1){
|
||||
return '已签约';
|
||||
}else{
|
||||
return '未签约';
|
||||
}
|
||||
})
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user