public function actionView($id) { $model = Apply::findOne($id); if (!$model) { throw new NotFoundHttpException('未找到该采购记录。'); } return $this->render('view', ['model' => $model]); }