|
|
@@ -232,12 +232,14 @@ class ProductController extends BaseController
|
|
|
public function actionShow()
|
|
|
{
|
|
|
$py = Yii::$app->request->get('py', '');
|
|
|
+ $name = Yii::$app->request->get('name', '');
|
|
|
$requestType = Yii::$app->request->get('requestType', 'common');
|
|
|
//默认显示上架商品
|
|
|
$status = Yii::$app->request->get('status', 1);
|
|
|
//默认显示未删除商品
|
|
|
$delStatus = Yii::$app->request->get('delStatus', 0);
|
|
|
$book = Yii::$app->request->get('book', 0);
|
|
|
+ $classId = Yii::$app->request->get('classId', 0);
|
|
|
|
|
|
//获取所有当前供货商的分类 (全部、常用)
|
|
|
//根据分类组装分类下的花材信息
|
|
|
@@ -260,6 +262,12 @@ class ProductController extends BaseController
|
|
|
unset($where['status']);
|
|
|
}
|
|
|
$where['delStatus'] = $delStatus;
|
|
|
+ if (!empty($classId)) {
|
|
|
+ $where['classId'] = $classId;
|
|
|
+ }
|
|
|
+ if (!empty($name)) {
|
|
|
+ $where['name'] = ['like', $name];
|
|
|
+ }
|
|
|
|
|
|
//客户等级
|
|
|
$customId = Yii::$app->request->get('customId', 0);
|
|
|
@@ -275,6 +283,7 @@ class ProductController extends BaseController
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|
|
|
if (!empty($itemInfoData)) {
|
|
|
foreach ($itemInfoData as $key => $val) {
|
|
|
+ //以下参数主要是网页批量改价要用到
|
|
|
$shortCover = $val['cover'] ?? '';
|
|
|
$itemInfoData[$key]['cover'] = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_100,w_100";
|
|
|
$itemInfoData[$key]['shortCover'] = $shortCover;
|