update:生成合同时,校验甲方公司是否有过签约
This commit is contained in:
parent
9398bf0843
commit
62faa8ee76
@ -183,6 +183,11 @@ class ContractLogic extends BaseLogic
|
||||
//生成合同
|
||||
public static function Initiate_contract($data)
|
||||
{
|
||||
// 校验当前甲方公司是否签过合同
|
||||
$partyAModel = Contract::where(['party_b' => $data['party_a']])->find();
|
||||
if (empty($partyAModel)) {
|
||||
return self::setError('当前甲方暂无和平台或上级公司签约,请先进行签约');
|
||||
}
|
||||
$model = Contract::where(['party_b' => $data['party_b'],'contract_type'=>$data['contract_type']])->find();
|
||||
if (empty($model)) {
|
||||
$model = new Contract();
|
||||
@ -226,7 +231,7 @@ class ContractLogic extends BaseLogic
|
||||
}
|
||||
if ($result && isset($result['contract']) && isset($result['contract']['file']) && $result['contract']['file'] != '') {
|
||||
if ($result['contract']['check_status'] == 3) {
|
||||
return self::setError('你已经生成过合同,请问重复生成');
|
||||
return self::setError('你已经生成过合同,请勿重复生成');
|
||||
}
|
||||
if($type==1){
|
||||
$name=$result['company_name'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user