update
This commit is contained in:
parent
c755ea1db7
commit
0b8ff22189
@ -12,22 +12,22 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\validate\bid;
|
namespace app\adminapi\validate\bid;
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\bid\BidBiddingDecision;
|
use app\common\model\bid\BidBiddingDecision;
|
||||||
use app\common\model\bid\BidSecurityApply;
|
use app\common\model\bid\BidSecurityApply;
|
||||||
use app\common\model\dict\DictData;
|
use app\common\model\dict\DictData;
|
||||||
use app\common\validate\BaseValidate;
|
use app\common\validate\BaseValidate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BidSecurityApply验证器
|
* BidSecurityApply验证器
|
||||||
* Class BidSecurityApplyValidate
|
* Class BidSecurityApplyValidate
|
||||||
* @package app\adminapi\validate\bid
|
* @package app\adminapi\validate\bid
|
||||||
*/
|
*/
|
||||||
class BidSecurityApplyValidate extends BaseValidate
|
class BidSecurityApplyValidate extends BaseValidate
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置校验规则
|
* 设置校验规则
|
||||||
@ -72,7 +72,7 @@ class BidSecurityApplyValidate extends BaseValidate
|
|||||||
*/
|
*/
|
||||||
public function sceneAdd()
|
public function sceneAdd()
|
||||||
{
|
{
|
||||||
return $this->remove('id',true)->remove('flow_id',true)->remove('path',true);
|
return $this->remove('id', true)->remove('flow_id', true)->remove('path', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ class BidSecurityApplyValidate extends BaseValidate
|
|||||||
*/
|
*/
|
||||||
public function sceneEdit()
|
public function sceneEdit()
|
||||||
{
|
{
|
||||||
return $this->remove('flow_id',true)->remove('path',true);
|
return $this->remove('flow_id', true)->remove('path', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ class BidSecurityApplyValidate extends BaseValidate
|
|||||||
*/
|
*/
|
||||||
public function sceneDelete()
|
public function sceneDelete()
|
||||||
{
|
{
|
||||||
return $this->only(['id'])->remove('id','checkData');
|
return $this->only(['id'])->remove('id', 'checkData');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -113,13 +113,13 @@ class BidSecurityApplyValidate extends BaseValidate
|
|||||||
|
|
||||||
public function sceneApprove()
|
public function sceneApprove()
|
||||||
{
|
{
|
||||||
return $this->only(['id','flow_id','path']);
|
return $this->only(['id', 'flow_id', 'path']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkData($value): bool|string
|
public function checkData($value): bool|string
|
||||||
{
|
{
|
||||||
$data = BidSecurityApply::where('id',$value)->findOrEmpty();
|
$data = BidSecurityApply::where('id', $value)->findOrEmpty();
|
||||||
if($data->isEmpty()){
|
if ($data->isEmpty()) {
|
||||||
return '数据不存在';
|
return '数据不存在';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -127,23 +127,23 @@ class BidSecurityApplyValidate extends BaseValidate
|
|||||||
|
|
||||||
public function checkBiddingDecision($value): bool|string
|
public function checkBiddingDecision($value): bool|string
|
||||||
{
|
{
|
||||||
$data = BidBiddingDecision::where('id',$value)->findOrEmpty();
|
$data = BidBiddingDecision::where('id', $value)->findOrEmpty();
|
||||||
if($data->isEmpty()){
|
if ($data->isEmpty()) {
|
||||||
return '投标决策信息不存在';
|
return '投标决策信息不存在';
|
||||||
}
|
}
|
||||||
if($data['is_margin'] != 1){
|
// if($data['is_margin'] != 1){
|
||||||
return '此投标信息没有保证金';
|
// return '此投标信息没有保证金';
|
||||||
}
|
// }
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkPayType($value): bool|string
|
public function checkPayType($value): bool|string
|
||||||
{
|
{
|
||||||
$dict = DictData::where('type_value','pay_type')->column('value');
|
$dict = DictData::where('type_value', 'pay_type')->column('value');
|
||||||
if(!in_array($value,$dict)){
|
if (!in_array($value, $dict)) {
|
||||||
return '付款方式无效';
|
return '付款方式无效';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user