feat: #100000 导出修改

This commit is contained in:
赵世界 2022-08-23 19:36:39 +08:00
parent ad9f0af8b5
commit 260aed80c0
3 changed files with 6 additions and 6 deletions

View File

@ -63,10 +63,10 @@ class GoodsSkusExport implements FromCollection, ShouldAutoSize
$arr[1] = $item['goods']['title'];
$arr[2] = $item['goods']['type']['name'];
$arr[3] = $item['goods']['brand']['name'];
$arr[4] = $item['goods']['sku_code'];
$arr[5] = $item['goods']['title'];
$arr[6] = $item['goods']['cost'];
$arr[7] = $item['goods']['stock'];
$arr[4] = $item['sku_code'];
$arr[5] = $item['title'];
$arr[6] = $item['cost'];
$arr[7] = $item['stock'];
$bodyData[] = $arr;
}
unset($arr);

View File

@ -458,6 +458,6 @@ class GoodsSkusController extends Controller
{
$type = $request->get('exportType');
ob_end_clean();
return Excel::download(new GoodsSkusExport($type), $type, '.xlsx');
return Excel::download(new GoodsSkusExport($type), $type . '.xlsx');
}
}

View File

@ -19,7 +19,7 @@ Route::get('/', function () {
header('Location: ' . url()->current() . "/dist");
});
Route::get('goods_skus/export', [GoodsSkusController::class, 'export'])->name('goods_skus.export')->middleware('check.permissions');
Route::get('goods_skus/export', [GoodsSkusController::class, 'export'])->name('goods_skus.export');
Route::get('goods/import/template', [GoodsController::class, 'download'])->name('download.goods_import.template');