From d5075878c22c2d9aa4ebf9997dd7baea26fb07f7 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Tue, 19 Nov 2019 15:03:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9B=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/controllers/AttributeController.php | 0 backend/controllers/BrandController.php | 0 backend/controllers/CategoryController.php | 149 ---------------- backend/controllers/ConfigController.php | 0 backend/controllers/OrderController.php | 0 .../controllers/ShopCategoryController.php | 149 ---------------- backend/controllers/SiteController.php | 0 backend/controllers/SupplierController.php | 0 backend/views/attribute/_form.php | 0 backend/views/attribute/_search.php | 0 backend/views/attribute/create.php | 0 backend/views/attribute/index.php | 0 backend/views/attribute/update.php | 0 backend/views/attribute/view.php | 0 backend/views/brand/_form.php | 0 backend/views/brand/_search.php | 0 backend/views/brand/create.php | 0 backend/views/brand/index.php | 0 backend/views/brand/update.php | 0 backend/views/brand/view.php | 0 backend/views/category/_form.php | 38 ----- backend/views/category/_search.php | 49 ------ backend/views/category/create.php | 18 -- backend/views/category/index.php | 28 --- backend/views/category/test.php | 98 ----------- backend/views/category/update.php | 19 --- backend/views/category/view.php | 37 ---- backend/views/config/index.php | 0 backend/views/layouts/base.php | 0 backend/views/layouts/breadcrumb.php | 0 backend/views/layouts/footer.php | 0 backend/views/layouts/header.php | 0 backend/views/layouts/main.php | 0 backend/views/layouts/sidebar.php | 2 - backend/views/order/_form.php | 0 backend/views/order/_search.php | 0 backend/views/order/create.php | 0 backend/views/order/index.php | 0 backend/views/order/update.php | 0 backend/views/order/view.php | 0 backend/views/shop-category/_form.php | 44 ----- backend/views/shop-category/_search.php | 49 ------ backend/views/shop-category/create.php | 18 -- backend/views/shop-category/index.php | 28 --- backend/views/shop-category/update.php | 19 --- backend/views/shop-category/view.php | 40 ----- backend/views/site/error.php | 0 backend/views/site/index.php | 0 backend/views/site/login.php | 0 backend/views/site/test.php | 0 backend/views/supplier/_form.php | 0 backend/views/supplier/_search.php | 0 backend/views/supplier/create.php | 0 backend/views/supplier/index.php | 0 backend/views/supplier/update.php | 0 backend/views/supplier/view.php | 0 common/models/searchs/AttributeSearch.php | 147 ---------------- common/models/searchs/BrandSearch.php | 0 common/models/searchs/CategorySearch.php | 153 ----------------- common/models/searchs/OrderSearch.php | 0 common/models/searchs/ShopCategorySearch.php | 159 ------------------ common/models/searchs/SupplierSearch.php | 0 62 files changed, 1244 deletions(-) mode change 100644 => 100755 backend/controllers/AttributeController.php mode change 100644 => 100755 backend/controllers/BrandController.php delete mode 100644 backend/controllers/CategoryController.php mode change 100644 => 100755 backend/controllers/ConfigController.php mode change 100644 => 100755 backend/controllers/OrderController.php delete mode 100644 backend/controllers/ShopCategoryController.php mode change 100644 => 100755 backend/controllers/SiteController.php mode change 100644 => 100755 backend/controllers/SupplierController.php mode change 100644 => 100755 backend/views/attribute/_form.php mode change 100644 => 100755 backend/views/attribute/_search.php mode change 100644 => 100755 backend/views/attribute/create.php mode change 100644 => 100755 backend/views/attribute/index.php mode change 100644 => 100755 backend/views/attribute/update.php mode change 100644 => 100755 backend/views/attribute/view.php mode change 100644 => 100755 backend/views/brand/_form.php mode change 100644 => 100755 backend/views/brand/_search.php mode change 100644 => 100755 backend/views/brand/create.php mode change 100644 => 100755 backend/views/brand/index.php mode change 100644 => 100755 backend/views/brand/update.php mode change 100644 => 100755 backend/views/brand/view.php delete mode 100644 backend/views/category/_form.php delete mode 100644 backend/views/category/_search.php delete mode 100644 backend/views/category/create.php delete mode 100644 backend/views/category/index.php delete mode 100644 backend/views/category/test.php delete mode 100644 backend/views/category/update.php delete mode 100644 backend/views/category/view.php mode change 100644 => 100755 backend/views/config/index.php mode change 100644 => 100755 backend/views/layouts/base.php mode change 100644 => 100755 backend/views/layouts/breadcrumb.php mode change 100644 => 100755 backend/views/layouts/footer.php mode change 100644 => 100755 backend/views/layouts/header.php mode change 100644 => 100755 backend/views/layouts/main.php mode change 100644 => 100755 backend/views/order/_form.php mode change 100644 => 100755 backend/views/order/_search.php mode change 100644 => 100755 backend/views/order/create.php mode change 100644 => 100755 backend/views/order/index.php mode change 100644 => 100755 backend/views/order/update.php mode change 100644 => 100755 backend/views/order/view.php delete mode 100644 backend/views/shop-category/_form.php delete mode 100644 backend/views/shop-category/_search.php delete mode 100644 backend/views/shop-category/create.php delete mode 100644 backend/views/shop-category/index.php delete mode 100644 backend/views/shop-category/update.php delete mode 100644 backend/views/shop-category/view.php mode change 100644 => 100755 backend/views/site/error.php mode change 100644 => 100755 backend/views/site/index.php mode change 100644 => 100755 backend/views/site/login.php mode change 100644 => 100755 backend/views/site/test.php mode change 100644 => 100755 backend/views/supplier/_form.php mode change 100644 => 100755 backend/views/supplier/_search.php mode change 100644 => 100755 backend/views/supplier/create.php mode change 100644 => 100755 backend/views/supplier/index.php mode change 100644 => 100755 backend/views/supplier/update.php mode change 100644 => 100755 backend/views/supplier/view.php delete mode 100644 common/models/searchs/AttributeSearch.php mode change 100644 => 100755 common/models/searchs/BrandSearch.php delete mode 100644 common/models/searchs/CategorySearch.php mode change 100644 => 100755 common/models/searchs/OrderSearch.php delete mode 100644 common/models/searchs/ShopCategorySearch.php mode change 100644 => 100755 common/models/searchs/SupplierSearch.php diff --git a/backend/controllers/AttributeController.php b/backend/controllers/AttributeController.php old mode 100644 new mode 100755 diff --git a/backend/controllers/BrandController.php b/backend/controllers/BrandController.php old mode 100644 new mode 100755 diff --git a/backend/controllers/CategoryController.php b/backend/controllers/CategoryController.php deleted file mode 100644 index 4be79f8..0000000 --- a/backend/controllers/CategoryController.php +++ /dev/null @@ -1,149 +0,0 @@ - [ - 'class' => VerbFilter::className(), - 'actions' => [ - 'delete' => ['POST'], - ], - ], - ]; - } - - /** - * Lists all Category models. - * @return mixed - */ - public function actionIndex() - { - $searchModel = new CategorySearch(); - $dataProvider = $searchModel->search(Yii::$app->request->queryParams); - - return $this->render('index', [ - 'searchModel' => $searchModel, - 'dataProvider' => $dataProvider, - 'columns' => $searchModel->columns() - ]); - } - - /** - * Displays a single Category model. - * @param integer $id - * @return mixed - * @throws NotFoundHttpException if the model cannot be found - */ - public function actionView($id) - { - return $this->render('view', [ - 'model' => $this->findModel($id), - ]); - } - - /** - * Creates a new Category model. - * If creation is successful, the browser will be redirected to the 'view' page. - * @return mixed - */ - public function actionCreate() - { - $model = new Category(); - - if ($model->load(Yii::$app->request->post()) && $model->save()) { - return $this->redirect('index'); - } - - return $this->render('create', [ - 'model' => $model, - ]); - } - - /** - * Updates an existing Category model. - * If update is successful, the browser will be redirected to the 'view' page. - * @param integer $id - * @return mixed - * @throws NotFoundHttpException if the model cannot be found - */ - public function actionUpdate($id) - { - $model = $this->findModel($id); - - if ($model->load(Yii::$app->request->post()) && $model->save()) { - return $this->redirect('index'); - } - - return $this->render('update', [ - 'model' => $model, - ]); - } - - /** - * Deletes an existing Category model. - * If deletion is successful, the browser will be redirected to the 'index' page. - * @param integer $id - * @return mixed - * @throws NotFoundHttpException if the model cannot be found - */ - public function actionDelete($id) - { - $this->findModel($id)->delete(); - - return $this->redirect(['index']); - } - - /** - * Finds the Category model based on its primary key value. - * If the model is not found, a 404 HTTP exception will be thrown. - * @param integer $id - * @return Category the loaded model - * @throws NotFoundHttpException if the model cannot be found - */ - protected function findModel($id) - { - if (($model = Category::findOne($id)) !== null) { - return $model; - } - - throw new NotFoundHttpException('The requested page does not exist.'); - } - /** - * @author iron - * 文件导出 - */ - public function actionExport() - { - $searchModel = new CategorySearch(); - $params = Yii::$app->request->queryParams; - if ($params['page-type'] == 'all') { - $dataProvider = $searchModel->allData($params); - } else { - $dataProvider = $searchModel->search($params); - } - \iron\widget\Excel::export([ - 'models' => $dataProvider->getModels(), - 'format' => 'Xlsx', - 'asAttachment' => true, - 'fileName' =>'Categories'. "-" .date('Y-m-d H/i/s', time()), - 'columns' => $searchModel->columns() - ]); - } -} diff --git a/backend/controllers/ConfigController.php b/backend/controllers/ConfigController.php old mode 100644 new mode 100755 diff --git a/backend/controllers/OrderController.php b/backend/controllers/OrderController.php old mode 100644 new mode 100755 diff --git a/backend/controllers/ShopCategoryController.php b/backend/controllers/ShopCategoryController.php deleted file mode 100644 index ad4e43e..0000000 --- a/backend/controllers/ShopCategoryController.php +++ /dev/null @@ -1,149 +0,0 @@ - [ - 'class' => VerbFilter::className(), - 'actions' => [ - 'delete' => ['POST'], - ], - ], - ]; - } - - /** - * Lists all ShopCategory models. - * @return mixed - */ - public function actionIndex() - { - $searchModel = new ShopCategorySearch(); - $dataProvider = $searchModel->search(Yii::$app->request->queryParams); - - return $this->render('index', [ - 'searchModel' => $searchModel, - 'dataProvider' => $dataProvider, - 'columns' => $searchModel->columns() - ]); - } - - /** - * Displays a single ShopCategory model. - * @param integer $id - * @return mixed - * @throws NotFoundHttpException if the model cannot be found - */ - public function actionView($id) - { - return $this->render('view', [ - 'model' => $this->findModel($id), - ]); - } - - /** - * Creates a new ShopCategory model. - * If creation is successful, the browser will be redirected to the 'view' page. - * @return mixed - */ - public function actionCreate() - { - $model = new ShopCategory(); - - if ($model->load(Yii::$app->request->post()) && $model->save()) { - return $this->redirect('index'); - } - - return $this->render('create', [ - 'model' => $model, - ]); - } - - /** - * Updates an existing ShopCategory model. - * If update is successful, the browser will be redirected to the 'view' page. - * @param integer $id - * @return mixed - * @throws NotFoundHttpException if the model cannot be found - */ - public function actionUpdate($id) - { - $model = $this->findModel($id); - - if ($model->load(Yii::$app->request->post()) && $model->save()) { - return $this->redirect('index'); - } - - return $this->render('update', [ - 'model' => $model, - ]); - } - - /** - * Deletes an existing ShopCategory model. - * If deletion is successful, the browser will be redirected to the 'index' page. - * @param integer $id - * @return mixed - * @throws NotFoundHttpException if the model cannot be found - */ - public function actionDelete($id) - { - $this->findModel($id)->delete(); - - return $this->redirect(['index']); - } - - /** - * Finds the ShopCategory model based on its primary key value. - * If the model is not found, a 404 HTTP exception will be thrown. - * @param integer $id - * @return ShopCategory the loaded model - * @throws NotFoundHttpException if the model cannot be found - */ - protected function findModel($id) - { - if (($model = ShopCategory::findOne($id)) !== null) { - return $model; - } - - throw new NotFoundHttpException('The requested page does not exist.'); - } - /** - * @author iron - * 文件导出 - */ - public function actionExport() - { - $searchModel = new ShopCategorySearch(); - $params = Yii::$app->request->queryParams; - if ($params['page-type'] == 'all') { - $dataProvider = $searchModel->allData($params); - } else { - $dataProvider = $searchModel->search($params); - } - \iron\widget\Excel::export([ - 'models' => $dataProvider->getModels(), - 'format' => 'Xlsx', - 'asAttachment' => true, - 'fileName' =>'Shop Categories'. "-" .date('Y-m-d H/i/s', time()), - 'columns' => $searchModel->columns() - ]); - } -} diff --git a/backend/controllers/SiteController.php b/backend/controllers/SiteController.php old mode 100644 new mode 100755 diff --git a/backend/controllers/SupplierController.php b/backend/controllers/SupplierController.php old mode 100644 new mode 100755 diff --git a/backend/views/attribute/_form.php b/backend/views/attribute/_form.php old mode 100644 new mode 100755 diff --git a/backend/views/attribute/_search.php b/backend/views/attribute/_search.php old mode 100644 new mode 100755 diff --git a/backend/views/attribute/create.php b/backend/views/attribute/create.php old mode 100644 new mode 100755 diff --git a/backend/views/attribute/index.php b/backend/views/attribute/index.php old mode 100644 new mode 100755 diff --git a/backend/views/attribute/update.php b/backend/views/attribute/update.php old mode 100644 new mode 100755 diff --git a/backend/views/attribute/view.php b/backend/views/attribute/view.php old mode 100644 new mode 100755 diff --git a/backend/views/brand/_form.php b/backend/views/brand/_form.php old mode 100644 new mode 100755 diff --git a/backend/views/brand/_search.php b/backend/views/brand/_search.php old mode 100644 new mode 100755 diff --git a/backend/views/brand/create.php b/backend/views/brand/create.php old mode 100644 new mode 100755 diff --git a/backend/views/brand/index.php b/backend/views/brand/index.php old mode 100644 new mode 100755 diff --git a/backend/views/brand/update.php b/backend/views/brand/update.php old mode 100644 new mode 100755 diff --git a/backend/views/brand/view.php b/backend/views/brand/view.php old mode 100644 new mode 100755 diff --git a/backend/views/category/_form.php b/backend/views/category/_form.php deleted file mode 100644 index 1ce3540..0000000 --- a/backend/views/category/_form.php +++ /dev/null @@ -1,38 +0,0 @@ - - -
- - - - field($model, 'name')->textInput(['maxlength' => true]) ?> - - field($model, 'pid')->textInput() ?> - - field($model, 'goods_count')->textInput() ?> - - field($model, 'sort_order')->textInput() ?> - - field($model, 'icon_type')->textInput() ?> - - field($model, 'icon')->textInput(['maxlength' => true]) ?> - - field($model, 'is_show')->textInput() ?> - - field($model, 'is_delete')->textInput() ?> - -
- 'btn btn-success']) ?> - 'btn btn-info']) ?> -
- - - -
diff --git a/backend/views/category/_search.php b/backend/views/category/_search.php deleted file mode 100644 index d43cb1d..0000000 --- a/backend/views/category/_search.php +++ /dev/null @@ -1,49 +0,0 @@ - - - ['index'], - 'method' => 'get', - 'validateOnType' => true, - ]); -?> -
-
- field($model, 'id', [ - "template" => "{input}{error}", - "inputOptions" => [ - "placeholder" => "检索ID", - "class" => "form-control", - ], - "errorOptions" => [ - "class" => "error-tips" - ] - ]) - ?> -
-
- field($model, "created_at_range", [ - "template" => "{input}{error}", - "inputOptions" => [ - "placeholder" => "创建时间", - ], - "errorOptions" => [ - "class" => "error-tips" - ] - ])->widget(DateRangePicker::className()); - ?> -
-
- ', ['class' => 'btn btn-default']) ?> - ', ['class' => 'btn btn-default']) ?> -
-
- \ No newline at end of file diff --git a/backend/views/category/create.php b/backend/views/category/create.php deleted file mode 100644 index 932a778..0000000 --- a/backend/views/category/create.php +++ /dev/null @@ -1,18 +0,0 @@ -title = '创建 Category'; -$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -?> -
- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/category/index.php b/backend/views/category/index.php deleted file mode 100644 index 9c6da0b..0000000 --- a/backend/views/category/index.php +++ /dev/null @@ -1,28 +0,0 @@ -title = 'Categories'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-
- $dataProvider, - 'filter' => $this->render("_search", ['model' => $searchModel]), - 'batch' => [ - [ - "label" => "删除", - "url" => "category/deletes" - ], - ], - 'columns' => $columns - ]); - ?> -
-
\ No newline at end of file diff --git a/backend/views/category/test.php b/backend/views/category/test.php deleted file mode 100644 index a2ec90b..0000000 --- a/backend/views/category/test.php +++ /dev/null @@ -1,98 +0,0 @@ - - -
- - - -
- -
-
-
Upload -
- -
-
- Drag & Drop Files
-
-
-
- - diff --git a/backend/views/category/update.php b/backend/views/category/update.php deleted file mode 100644 index f492c7b..0000000 --- a/backend/views/category/update.php +++ /dev/null @@ -1,19 +0,0 @@ -title = '编辑 Category: ' . $model->name; -$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']]; -$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]]; -$this->params['breadcrumbs'][] = 'Update '; -?> -
- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/category/view.php b/backend/views/category/view.php deleted file mode 100644 index 403a436..0000000 --- a/backend/views/category/view.php +++ /dev/null @@ -1,37 +0,0 @@ -title = $model->name; -$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -\yii\web\YiiAsset::register($this); -?> -
- -

- 'btn btn-success']) ?> -

- - $model, - 'attributes' => [ - 'id', - 'name', - 'pid', - 'goods_count', - 'sort_order', - 'icon_type', - 'icon', - 'is_show', - 'is_delete', - 'created_at', - 'updated_at', - ], - ]) ?> - -
diff --git a/backend/views/config/index.php b/backend/views/config/index.php old mode 100644 new mode 100755 diff --git a/backend/views/layouts/base.php b/backend/views/layouts/base.php old mode 100644 new mode 100755 diff --git a/backend/views/layouts/breadcrumb.php b/backend/views/layouts/breadcrumb.php old mode 100644 new mode 100755 diff --git a/backend/views/layouts/footer.php b/backend/views/layouts/footer.php old mode 100644 new mode 100755 diff --git a/backend/views/layouts/header.php b/backend/views/layouts/header.php old mode 100644 new mode 100755 diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php old mode 100644 new mode 100755 diff --git a/backend/views/layouts/sidebar.php b/backend/views/layouts/sidebar.php index 1ce632a..0277d3d 100755 --- a/backend/views/layouts/sidebar.php +++ b/backend/views/layouts/sidebar.php @@ -21,9 +21,7 @@ use iron\widgets\Menu; ] ], ['label' => '商品管理', 'url' => '#', 'icon' => 'far fa-archive', 'items' => [ - ['label' => '商品分类', 'url' => ['category/index', 'tag' => 'new']], ['label' => '商品列表', 'url' => ['antgoods/goods/index']], - ['label' => '属性管理', 'url' => ['attribute/index']], ] ], ['label' => '订单管理', 'url' => '#', 'icon' => 'far fa-list-alt', 'items' => [ diff --git a/backend/views/order/_form.php b/backend/views/order/_form.php old mode 100644 new mode 100755 diff --git a/backend/views/order/_search.php b/backend/views/order/_search.php old mode 100644 new mode 100755 diff --git a/backend/views/order/create.php b/backend/views/order/create.php old mode 100644 new mode 100755 diff --git a/backend/views/order/index.php b/backend/views/order/index.php old mode 100644 new mode 100755 diff --git a/backend/views/order/update.php b/backend/views/order/update.php old mode 100644 new mode 100755 diff --git a/backend/views/order/view.php b/backend/views/order/view.php old mode 100644 new mode 100755 diff --git a/backend/views/shop-category/_form.php b/backend/views/shop-category/_form.php deleted file mode 100644 index 5f0949f..0000000 --- a/backend/views/shop-category/_form.php +++ /dev/null @@ -1,44 +0,0 @@ - - -
- - - - field($model, 'name')->textInput(['maxlength' => true]) ?> - - field($model, 'pid')->textInput() ?> - - field($model, 'goods_count')->textInput() ?> - - field($model, 'keywords')->textInput(['maxlength' => true]) ?> - - field($model, 'desc')->textInput(['maxlength' => true]) ?> - - field($model, 'sort_order')->textInput() ?> - - field($model, 'icon_type')->textInput() ?> - - field($model, 'icon')->textInput(['maxlength' => true]) ?> - - field($model, 'filter_attr')->textarea(['rows' => 6]) ?> - - field($model, 'is_show')->textInput() ?> - - field($model, 'is_delete')->textInput() ?> - -
- 'btn btn-success']) ?> - 'btn btn-info']) ?> -
- - - -
diff --git a/backend/views/shop-category/_search.php b/backend/views/shop-category/_search.php deleted file mode 100644 index 1e839e6..0000000 --- a/backend/views/shop-category/_search.php +++ /dev/null @@ -1,49 +0,0 @@ - - - ['index'], - 'method' => 'get', - 'validateOnType' => true, - ]); -?> -
-
- field($model, 'id', [ - "template" => "{input}{error}", - "inputOptions" => [ - "placeholder" => "检索ID", - "class" => "form-control", - ], - "errorOptions" => [ - "class" => "error-tips" - ] - ]) - ?> -
-
- field($model, "created_at_range", [ - "template" => "{input}{error}", - "inputOptions" => [ - "placeholder" => "创建时间", - ], - "errorOptions" => [ - "class" => "error-tips" - ] - ])->widget(DateRangePicker::className()); - ?> -
-
- ', ['class' => 'btn btn-default']) ?> - ', ['class' => 'btn btn-default']) ?> -
-
- \ No newline at end of file diff --git a/backend/views/shop-category/create.php b/backend/views/shop-category/create.php deleted file mode 100644 index 2fe2348..0000000 --- a/backend/views/shop-category/create.php +++ /dev/null @@ -1,18 +0,0 @@ -title = '创建 Shop Category'; -$this->params['breadcrumbs'][] = ['label' => 'Shop Categories', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -?> -
- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/shop-category/index.php b/backend/views/shop-category/index.php deleted file mode 100644 index e1a7446..0000000 --- a/backend/views/shop-category/index.php +++ /dev/null @@ -1,28 +0,0 @@ -title = 'Shop Categories'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-
- $dataProvider, - 'filter' => $this->render("_search", ['model' => $searchModel]), - 'batch' => [ - [ - "label" => "删除", - "url" => "shop-category/deletes" - ], - ], - 'columns' => $columns - ]); - ?> -
-
\ No newline at end of file diff --git a/backend/views/shop-category/update.php b/backend/views/shop-category/update.php deleted file mode 100644 index 93e68c8..0000000 --- a/backend/views/shop-category/update.php +++ /dev/null @@ -1,19 +0,0 @@ -title = '编辑 Shop Category: ' . $model->name; -$this->params['breadcrumbs'][] = ['label' => 'Shop Categories', 'url' => ['index']]; -$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]]; -$this->params['breadcrumbs'][] = 'Update '; -?> -
- - render('_form', [ - 'model' => $model, - ]) ?> - -
diff --git a/backend/views/shop-category/view.php b/backend/views/shop-category/view.php deleted file mode 100644 index b94aaa9..0000000 --- a/backend/views/shop-category/view.php +++ /dev/null @@ -1,40 +0,0 @@ -title = $model->name; -$this->params['breadcrumbs'][] = ['label' => 'Shop Categories', 'url' => ['index']]; -$this->params['breadcrumbs'][] = $this->title; -\yii\web\YiiAsset::register($this); -?> -
- -

- 'btn btn-success']) ?> -

- - $model, - 'attributes' => [ - 'id', - 'name', - 'pid', - 'goods_count', - 'keywords', - 'desc', - 'sort_order', - 'icon_type', - 'icon', - 'filter_attr:ntext', - 'is_show', - 'is_delete', - 'created_at', - 'updated_at', - ], - ]) ?> - -
diff --git a/backend/views/site/error.php b/backend/views/site/error.php old mode 100644 new mode 100755 diff --git a/backend/views/site/index.php b/backend/views/site/index.php old mode 100644 new mode 100755 diff --git a/backend/views/site/login.php b/backend/views/site/login.php old mode 100644 new mode 100755 diff --git a/backend/views/site/test.php b/backend/views/site/test.php old mode 100644 new mode 100755 diff --git a/backend/views/supplier/_form.php b/backend/views/supplier/_form.php old mode 100644 new mode 100755 diff --git a/backend/views/supplier/_search.php b/backend/views/supplier/_search.php old mode 100644 new mode 100755 diff --git a/backend/views/supplier/create.php b/backend/views/supplier/create.php old mode 100644 new mode 100755 diff --git a/backend/views/supplier/index.php b/backend/views/supplier/index.php old mode 100644 new mode 100755 diff --git a/backend/views/supplier/update.php b/backend/views/supplier/update.php old mode 100644 new mode 100755 diff --git a/backend/views/supplier/view.php b/backend/views/supplier/view.php old mode 100644 new mode 100755 diff --git a/common/models/searchs/AttributeSearch.php b/common/models/searchs/AttributeSearch.php deleted file mode 100644 index bb725fe..0000000 --- a/common/models/searchs/AttributeSearch.php +++ /dev/null @@ -1,147 +0,0 @@ - 'blobt\grid\CheckboxColumn', - 'width' => '2%', - 'align' => 'center' - ], - 'id', - 'name', - 'value', - 'type', - 'sort_order', - //'is_delete', - //'created_at', - //'updated_at', - [ - 'class' => 'iron\grid\ActionColumn', - 'align' => 'center', - ], - ]; - } - /** - * @param $params - * @return ActiveDataProvider - * 不分页的所有数据 - */ - public function allData($params) - { - $query = Attribute::find(); - $dataProvider = new ActiveDataProvider([ - 'query' => $query, - 'pagination' => false, - 'sort' => false - ]); - $this->load($params); - return $this->filter($query, $dataProvider); - } - - /** - * Creates data provider instance with search query applied - * - * @param array $params - * - * @return ActiveDataProvider - */ - public function search($params) - { - $query = Attribute::find(); - - // add conditions that should always apply here - - $dataProvider = new ActiveDataProvider([ - 'query' => $query, - 'pagination' => [ - 'pageSizeLimit' => [1, 200] - ], - 'sort' => [ - 'defaultOrder' => [ - 'id' => SORT_DESC, - ] - ], - ]); - - $this->load($params); - return $this->filter($query, $dataProvider); - } - /** - * @param $query - * @param $dataProvider - * @return ActiveDataProvider - * 条件筛选 - */ - private function filter($query, $dataProvider){ - if (!$this->validate()) { - // uncomment the following line if you do not want to return any records when validation fails - // $query->where('0=1'); - return $dataProvider; - } - - // grid filtering conditions - $query->andFilterWhere([ - 'id' => $this->id, - 'type' => $this->type, - 'sort_order' => $this->sort_order, - 'is_delete' => $this->is_delete, - 'created_at' => $this->created_at, - 'updated_at' => $this->updated_at, - ]); - - $query->andFilterWhere(['like', 'name', $this->name]) - ->andFilterWhere(['like', 'value', $this->value]); - if ($this->created_at_range) { - $arr = explode(' ~ ', $this->created_at_range); - $start = strtotime($arr[0]); - $end = strtotime($arr[1]) + 3600 * 24; - $query->andFilterWhere(['between', 'created_at', $start, $end]); - } - return $dataProvider; - } -} diff --git a/common/models/searchs/BrandSearch.php b/common/models/searchs/BrandSearch.php old mode 100644 new mode 100755 diff --git a/common/models/searchs/CategorySearch.php b/common/models/searchs/CategorySearch.php deleted file mode 100644 index 2693c7f..0000000 --- a/common/models/searchs/CategorySearch.php +++ /dev/null @@ -1,153 +0,0 @@ - 'blobt\grid\CheckboxColumn', - 'width' => '2%', - 'align' => 'center' - ], - 'id', - 'name', - 'pid', - 'goods_count', - 'sort_order', - //'icon_type', - //'icon', - //'is_show', - //'is_delete', - //'created_at', - //'updated_at', - [ - 'class' => 'iron\grid\ActionColumn', - 'align' => 'center', - ], - ]; - } - /** - * @param $params - * @return ActiveDataProvider - * 不分页的所有数据 - */ - public function allData($params) - { - $query = Category::find(); - $dataProvider = new ActiveDataProvider([ - 'query' => $query, - 'pagination' => false, - 'sort' => false - ]); - $this->load($params); - return $this->filter($query, $dataProvider); - } - - /** - * Creates data provider instance with search query applied - * - * @param array $params - * - * @return ActiveDataProvider - */ - public function search($params) - { - $query = Category::find(); - - // add conditions that should always apply here - - $dataProvider = new ActiveDataProvider([ - 'query' => $query, - 'pagination' => [ - 'pageSizeLimit' => [1, 200] - ], - 'sort' => [ - 'defaultOrder' => [ - 'id' => SORT_DESC, - ] - ], - ]); - - $this->load($params); - return $this->filter($query, $dataProvider); - } - /** - * @param $query - * @param $dataProvider - * @return ActiveDataProvider - * 条件筛选 - */ - private function filter($query, $dataProvider){ - if (!$this->validate()) { - // uncomment the following line if you do not want to return any records when validation fails - // $query->where('0=1'); - return $dataProvider; - } - - // grid filtering conditions - $query->andFilterWhere([ - 'id' => $this->id, - 'pid' => $this->pid, - 'goods_count' => $this->goods_count, - 'sort_order' => $this->sort_order, - 'icon_type' => $this->icon_type, - 'is_show' => $this->is_show, - 'is_delete' => $this->is_delete, - 'created_at' => $this->created_at, - 'updated_at' => $this->updated_at, - ]); - - $query->andFilterWhere(['like', 'name', $this->name]) - ->andFilterWhere(['like', 'icon', $this->icon]); - if ($this->created_at_range) { - $arr = explode(' ~ ', $this->created_at_range); - $start = strtotime($arr[0]); - $end = strtotime($arr[1]) + 3600 * 24; - $query->andFilterWhere(['between', 'created_at', $start, $end]); - } - return $dataProvider; - } -} diff --git a/common/models/searchs/OrderSearch.php b/common/models/searchs/OrderSearch.php old mode 100644 new mode 100755 diff --git a/common/models/searchs/ShopCategorySearch.php b/common/models/searchs/ShopCategorySearch.php deleted file mode 100644 index 8704080..0000000 --- a/common/models/searchs/ShopCategorySearch.php +++ /dev/null @@ -1,159 +0,0 @@ - 'blobt\grid\CheckboxColumn', - 'width' => '2%', - 'align' => 'center' - ], - 'id', - 'name', - 'pid', - 'goods_count', - 'keywords', - //'desc', - //'sort_order', - //'icon_type', - //'icon', - //'filter_attr', - //'is_show', - //'is_delete', - //'created_at', - //'updated_at', - [ - 'class' => 'iron\grid\ActionColumn', - 'align' => 'center', - ], - ]; - } - /** - * @param $params - * @return ActiveDataProvider - * 不分页的所有数据 - */ - public function allData($params) - { - $query = ShopCategory::find(); - $dataProvider = new ActiveDataProvider([ - 'query' => $query, - 'pagination' => false, - 'sort' => false - ]); - $this->load($params); - return $this->filter($query, $dataProvider); - } - - /** - * Creates data provider instance with search query applied - * - * @param array $params - * - * @return ActiveDataProvider - */ - public function search($params) - { - $query = ShopCategory::find(); - - // add conditions that should always apply here - - $dataProvider = new ActiveDataProvider([ - 'query' => $query, - 'pagination' => [ - 'pageSizeLimit' => [1, 200] - ], - 'sort' => [ - 'defaultOrder' => [ - 'id' => SORT_DESC, - ] - ], - ]); - - $this->load($params); - return $this->filter($query, $dataProvider); - } - /** - * @param $query - * @param $dataProvider - * @return ActiveDataProvider - * 条件筛选 - */ - private function filter($query, $dataProvider){ - if (!$this->validate()) { - // uncomment the following line if you do not want to return any records when validation fails - // $query->where('0=1'); - return $dataProvider; - } - - // grid filtering conditions - $query->andFilterWhere([ - 'id' => $this->id, - 'pid' => $this->pid, - 'goods_count' => $this->goods_count, - 'sort_order' => $this->sort_order, - 'icon_type' => $this->icon_type, - 'is_show' => $this->is_show, - 'is_delete' => $this->is_delete, - 'created_at' => $this->created_at, - 'updated_at' => $this->updated_at, - ]); - - $query->andFilterWhere(['like', 'name', $this->name]) - ->andFilterWhere(['like', 'keywords', $this->keywords]) - ->andFilterWhere(['like', 'desc', $this->desc]) - ->andFilterWhere(['like', 'icon', $this->icon]) - ->andFilterWhere(['like', 'filter_attr', $this->filter_attr]); - if ($this->created_at_range) { - $arr = explode(' ~ ', $this->created_at_range); - $start = strtotime($arr[0]); - $end = strtotime($arr[1]) + 3600 * 24; - $query->andFilterWhere(['between', 'created_at', $start, $end]); - } - return $dataProvider; - } -} diff --git a/common/models/searchs/SupplierSearch.php b/common/models/searchs/SupplierSearch.php old mode 100644 new mode 100755