fix: #10000 展示错误修改

This commit is contained in:
赵世界 2022-10-27 16:35:48 +08:00
parent 11a04d32d3
commit 68fd6a922f
3 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class GroupsController extends Controller
->filter()
->paginate($request->get('per_page'));
foreach ($groups as &$group) {
$group['children'] = Groups::query()->with(['shop:id,name'])->where('parent_id', $group->id)->get();
$group['children'] = Groups::query()->with(['shop:id,name'])->where('parent_id', $group->id)->get();
}
return GroupsResource::collection($groups);

View File

@ -52,6 +52,7 @@ class InventoryImport implements ToCollection, SkipsEmptyRows
if ('下架' === $goodsSku->status) {
$goodsSku->status = 1;
}
$goodsSku->cost = $row[8];
$goodsSku->save();
event(new StockUpdateEvent($goodsSku));
$updateIds[] = $goodsSku->id;

View File

@ -134,7 +134,7 @@
</el-table-column>
<el-table-column prop="goods.type.name" label="分类">
</el-table-column>
<el-table-column prop="num" label="库存">
<el-table-column prop="stock" label="库存">
</el-table-column>
</el-table>
<div style="display: flex; flex-direction: row-reverse; align-items: center; margin-top: 10px;">