This commit is contained in:
mkm 2023-08-12 10:04:31 +08:00
parent 59731062f3
commit 541ae15027
3 changed files with 12 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class CompanyLists extends BaseAdminDataLists implements ListsSearchInterface
}
return Company::where($this->searchWhere)
->where($where)
->field(['is_authentication','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', 'deposit', 'deposit_time', 'qualification', 'status'])
->field(['is_authentication','id', 'id contract', 'company_name', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'area_manager', 'is_contract', 'deposit', 'deposit_time', 'status'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->withAttr('company_type',function($value,$data){

View File

@ -14,6 +14,7 @@
namespace app\common\model;
use app\common\model\contract\Contract;
use app\common\model\dict\DictData;
use think\facade\Db;
@ -57,4 +58,13 @@ class Company extends BaseModel
return Db::name('admin')->where(['id' => $this->area_manager])->value('name');
}
public function getContractAttr()
{
$find=Contract::where('party_a', $this->id)->field('check_status,status')->find();
if($find){
return $find->toArray();
}else{
return [];
}
}
}

@ -1 +1 @@
Subproject commit 1294ea49ff9ecc4532821f8798304816cbf8dd74
Subproject commit 9acc82cd23d807280ddd29df2117e7890094d049