[ 'class' => LoginBehavior::className(), ], ]); } //订单列表 public function actionIndex() { if(\Yii::$app->request->isAjax){ $form = new OrderListForm(); $form->attributes = \Yii::$app->request->get(); $data = $form->search(); return $this->responseHandler($data); } $store = Store::find()->select('id,name')->where(['is_delete' => 0])->asArray()->all(); return $this->render('index',[ 'store' => $store ]); } //订单取消 public function actionCancel() { if(!\Yii::$app->request->isPost){ $data = $this->invaildRequest(); return $this->responseHandler($data); } $form = new OrderActionForm(); $form->attributes = \Yii::$app->request->post(); $data = $form->cancel(); return $this->responseHandler($data); } //订单删除 public function actionDelete() { if(!\Yii::$app->request->isPost){ $data = $this->invaildRequest(); return $this->responseHandler($data); } $form = new OrderActionForm(); $form->attributes = \Yii::$app->request->post(); $data = $form->delete(); return $this->responseHandler($data); } //订单完成 public function actionFinish() { if(!\Yii::$app->request->isPost){ $data = $this->invaildRequest(); return $this->responseHandler($data); } $form = new OrderActionForm(); $form->attributes = \Yii::$app->request->post(); $data = $form->finish(); return $this->responseHandler($data); } //分账 public function actionMulti() { if(!\Yii::$app->request->isPost){ $data = $this->invaildRequest(); return $this->responseHandler($data); } $form = new OrderActionForm(); $form->attributes = \Yii::$app->request->post(); $data = $form->multi(); return $this->responseHandler($data); } //查询分账进度 public function actionSearchMulti() { if(\Yii::$app->request->isPost){ $form = new OrderMultiForm(); $form->attributes = \Yii::$app->request->post(); $data = $form->search(); return $this->responseHandler($data); } return $this->render('search_multi',[ 'type' => 0 ]); } public function actionSearchMulti2() { if(!\Yii::$app->request->isPost){ $data = $this->invaildRequest(); return $this->responseHandler($data); } $form = new OrderMultiForm(); $form->attributes = \Yii::$app->request->post(); $data = $form->search2(); return $this->responseHandler($data); } }