mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 06:30:49 +00:00
commit
64f80a649b
@ -69,6 +69,7 @@ class InventoryImport implements ToCollection, SkipsEmptyRows
|
||||
->pluck('id')
|
||||
->toArray();
|
||||
if ($downSkuIds = array_diff($onSkuIds, $updateIds)) {
|
||||
GoodsSku::whereIn('id', $onSkuIds)->update(['stock' => 0]);
|
||||
event(new StockUpdateEvent($downSkuIds));
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,8 +32,6 @@ Route::middleware(['auth:api', 'check.permissions'])->group(function () {
|
||||
Route::resource('goods_skus', 'Goods\GoodsSkusController', ['only' => ['index', 'show', 'update', 'store']]);
|
||||
Route::patch('batch/goods_skus', [GoodsSkusController::class, 'batchUpdate'])->name('goods_sku.batch_update');
|
||||
Route::patch('single/goods_skus/{id}', [GoodsSkusController::class, 'updateField'])->name('goods_sku.single_update');
|
||||
// 盘点导入
|
||||
Route::post('inventory/goods_skus', [GoodsSkusController::class, 'inventoryImport'])->name('goods_sku.inventory');
|
||||
// 店铺
|
||||
Route::resource('shops', 'Shop\ShopsController', ['only' => ['index', 'store', 'show', 'update', 'destroy']]);
|
||||
Route::get('count/orders/num', [ShopsController::class, 'countOrdersNumWithSkuCode'])->name('goods_sku.orders_num');
|
||||
@ -63,3 +61,6 @@ Route::get('shop_platforms', [ShopsController::class, 'getPlatList'])->name('pla
|
||||
|
||||
// 妙选商城数据推送
|
||||
Route::post('business', [ShopsController::class, 'business'])->name('shop.put.business');
|
||||
|
||||
// 盘点导入
|
||||
Route::post('inventory/goods_skus', [GoodsSkusController::class, 'inventoryImport'])->name('goods_sku.inventory')->middleware('check.permissions');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user