|
|
@@ -147,7 +147,7 @@ class ApproachOrderForm extends Model
|
|
|
$parentValidate = parent::beforeValidate();
|
|
|
if ($this->sn) {
|
|
|
$this->_model = ApproachOrder::findOne(['SN'=>$this->sn]);
|
|
|
- if (!$this->_model->toArray()){
|
|
|
+ if (!ApproachOrder::findOneAsArray('SN = :SN', [':SN' => $this->sn])){
|
|
|
$this->addError('sn', '订单不存在');
|
|
|
return false;
|
|
|
}
|