更新
This commit is contained in:
parent
37d21a36ac
commit
3296af3ddd
@ -73,6 +73,7 @@ class ContractLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($item, $key) {
|
->select()->each(function ($item, $key) {
|
||||||
|
halt($item);
|
||||||
if($item->type==1){
|
if($item->type==1){
|
||||||
$item->party_b_name=Db::name('company')->where('id',$item->party_b)->value('company_name');
|
$item->party_b_name=Db::name('company')->where('id',$item->party_b)->value('company_name');
|
||||||
}else{
|
}else{
|
||||||
|
@ -170,6 +170,12 @@ class ContractLogic extends BaseLogic
|
|||||||
$model->contract_no = time();
|
$model->contract_no = time();
|
||||||
$model->create_time = time();
|
$model->create_time = time();
|
||||||
}
|
}
|
||||||
|
if($data['party_a']<=0){
|
||||||
|
return self::setError('甲方不能为空');
|
||||||
|
}
|
||||||
|
if($data['party_b']<=0){
|
||||||
|
return self::setError('乙方不能为空');
|
||||||
|
}
|
||||||
if($data['type']==1){
|
if($data['type']==1){
|
||||||
if($data['party_a'] == $data['party_b']){
|
if($data['party_a'] == $data['party_b']){
|
||||||
return self::setError('甲方和乙方不能是同一个公司');
|
return self::setError('甲方和乙方不能是同一个公司');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user