|
@ -8,6 +8,8 @@ use backend\modules\shop\models\searchs\AfterSaleSearch; |
|
|
use yii\web\Controller; |
|
|
use yii\web\Controller; |
|
|
use yii\web\NotFoundHttpException; |
|
|
use yii\web\NotFoundHttpException; |
|
|
use yii\filters\VerbFilter; |
|
|
use yii\filters\VerbFilter; |
|
|
|
|
|
use iron\widget\Excel; |
|
|
|
|
|
use yii\web\Response; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* AfterSaleController implements the CRUD actions for AfterSale model. |
|
|
* AfterSaleController implements the CRUD actions for AfterSale model. |
|
@ -105,7 +107,7 @@ class AfterSaleController extends Controller |
|
|
*/ |
|
|
*/ |
|
|
public function actionDelete($id) |
|
|
public function actionDelete($id) |
|
|
{ |
|
|
{ |
|
|
$this->findModel($id)->delete(); |
|
|
|
|
|
|
|
|
$this->findModel($id); |
|
|
|
|
|
|
|
|
return $this->redirect(['index']); |
|
|
return $this->redirect(['index']); |
|
|
} |
|
|
} |
|
@ -138,7 +140,7 @@ class AfterSaleController extends Controller |
|
|
} else { |
|
|
} else { |
|
|
$dataProvider = $searchModel->search($params); |
|
|
$dataProvider = $searchModel->search($params); |
|
|
} |
|
|
} |
|
|
\iron\widget\Excel::export([ |
|
|
|
|
|
|
|
|
Excel::export([ |
|
|
'models' => $dataProvider->getModels(), |
|
|
'models' => $dataProvider->getModels(), |
|
|
'format' => 'Xlsx', |
|
|
'format' => 'Xlsx', |
|
|
'asAttachment' => true, |
|
|
'asAttachment' => true, |
|
@ -150,7 +152,7 @@ class AfterSaleController extends Controller |
|
|
/** |
|
|
/** |
|
|
* @param $status |
|
|
* @param $status |
|
|
* @param $id |
|
|
* @param $id |
|
|
* @return \yii\web\Response |
|
|
|
|
|
|
|
|
* @return Response |
|
|
* 处理售后申请 |
|
|
* 处理售后申请 |
|
|
*/ |
|
|
*/ |
|
|
public function actionHandle($status, $id) |
|
|
public function actionHandle($status, $id) |
|
|