|
|
@@ -8,6 +8,7 @@ use bizGhs\item\classes\ItemClassClass;
|
|
|
use bizGhs\product\classes\ProductClass;
|
|
|
use common\components\barcodeUtil;
|
|
|
use common\components\dirUtil;
|
|
|
+use common\components\imgUtil;
|
|
|
use common\services\xhItemService;
|
|
|
use Yii;
|
|
|
|
|
|
@@ -48,10 +49,12 @@ class ProductService extends BaseService
|
|
|
foreach ($classIds as $classVal) {
|
|
|
$classId = $classVal['id'];
|
|
|
$className = $classVal['name'] ?? '';
|
|
|
+ $cover = imgUtil::groupImg($classVal['cover']);
|
|
|
if ($classId > 0) {
|
|
|
$tmp = [];
|
|
|
$tmp['classId'] = $classId;
|
|
|
$tmp['className'] = $classVal['name'] ?? '';
|
|
|
+ $tmp['classCover'] = $cover;
|
|
|
$items = $classMapItem[$classId] ?? [];
|
|
|
if ($items) {
|
|
|
if ($itemInfoData) {
|
|
|
@@ -73,7 +76,7 @@ class ProductService extends BaseService
|
|
|
}
|
|
|
}
|
|
|
if ($showTodayDiscount && !empty($tjItem)) {
|
|
|
- $tjClass = [['classId' => self::TJ_CLASS_ID, 'className' => '今日特价', 'child' => $tjItem,]];
|
|
|
+ $tjClass = [['classId' => self::TJ_CLASS_ID, 'className' => '今日特价', 'classCover' => imgUtil::groupImg(''), 'child' => $tjItem,]];
|
|
|
$classData = array_merge($tjClass, $classData);
|
|
|
}
|
|
|
return $classData;
|
|
|
@@ -109,7 +112,7 @@ class ProductService extends BaseService
|
|
|
}
|
|
|
|
|
|
//生成价格表 ssh 20210922
|
|
|
- public static function generatePriceTable($sjId, $level,$mainId=0)
|
|
|
+ public static function generatePriceTable($sjId, $level, $mainId = 0)
|
|
|
{
|
|
|
$status = 1;
|
|
|
|
|
|
@@ -241,7 +244,7 @@ class ProductService extends BaseService
|
|
|
}
|
|
|
|
|
|
//生成条形码 lqh 20211227
|
|
|
- public static function generateBarcodeTable($sjId, $shopId,$mainId=0)
|
|
|
+ public static function generateBarcodeTable($sjId, $shopId, $mainId = 0)
|
|
|
{
|
|
|
//中央ID
|
|
|
$classIds = ItemClassClass::getGhsItemClassAll($mainId);
|
|
|
@@ -321,9 +324,9 @@ class ProductService extends BaseService
|
|
|
|
|
|
}
|
|
|
$i++;
|
|
|
- if($i >=18){
|
|
|
+ if ($i >= 18) {
|
|
|
$i = 1;
|
|
|
- $page ++;
|
|
|
+ $page++;
|
|
|
$objPHPExcel->createSheet();
|
|
|
$objPHPExcel->setActiveSheetIndex($page);
|
|
|
}
|