This commit is contained in:
mkm 2023-08-31 18:13:16 +08:00
parent 250ca31496
commit c83e9a1674

View File

@ -244,7 +244,11 @@ class CompanyLogic extends BaseLogic
}
$data['area_manager_name'] = Db::name('admin')->where('id', $data['area_manager'])->value('name');
$data['responsible_area'] = explode(',', $data['responsible_area']);
$data['contract'] = Contract::where(['party_b' => $data['id']])->with(['party_a_info', 'contractType'])->find();
$where[]=['party_b','=', $data['id']];
if(isset($params['contract_type'])){
$wehre[]=['contract_type','=',$params['contract_type']];
}
$data['contract'] = Contract::where($wehre)->with(['party_a_info', 'contractType'])->find();
}
return $data;