|
|
@@ -558,8 +558,6 @@ class ProductService extends BaseService
|
|
|
$where['mainId'] = $mainId;
|
|
|
$where['status'] = $status;
|
|
|
$where['delStatus'] = 0;
|
|
|
- $where['stock>']=0;
|
|
|
- $where['virtualStock'] = 0;
|
|
|
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
|
|
|
@@ -578,11 +576,10 @@ class ProductService extends BaseService
|
|
|
if (isset($class['child']) && !empty($class['child'])) {
|
|
|
foreach ($class['child'] as $cKey => $child) {
|
|
|
$cName = $child['name'] ?? '';
|
|
|
- $stock = $child['stock'] ?? 0;
|
|
|
- $stock = floatval($stock);
|
|
|
+ $price = $child['price'] ?? '';
|
|
|
$formatData[] = [
|
|
|
'name' => $cName,
|
|
|
- 'price' => $stock,
|
|
|
+ 'price' => 11,
|
|
|
'type' => 'item',
|
|
|
];
|
|
|
}
|
|
|
@@ -672,7 +669,7 @@ class ProductService extends BaseService
|
|
|
//设置边框
|
|
|
$objPHPExcel->getActiveSheet()->getStyle('A1:' . $lastCell)->applyFromArray(array('borders' => array('allborders' => array('style' => \PHPExcel_Style_Border::BORDER_THIN),)));
|
|
|
|
|
|
- $objPHPExcel->getActiveSheet()->setTitle('库存表');
|
|
|
+ $objPHPExcel->getActiveSheet()->setTitle('价格表');
|
|
|
|
|
|
$objPHPExcel->setActiveSheetIndex(0);
|
|
|
|
|
|
@@ -680,7 +677,8 @@ class ProductService extends BaseService
|
|
|
if (file_exists($dir) == false) {
|
|
|
mkdir($dir, 0777, true);
|
|
|
}
|
|
|
- $date = date("m-d") . "-stock-";
|
|
|
+ //$date = date("m-d") . "-" . $levelName . "-编号" . $level;
|
|
|
+ $date = date("m-d") . "-" . $levelName;
|
|
|
|
|
|
$file = $date . '.xls';
|
|
|
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
|