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