diff --git a/app/Exports/GoodsSkusExport.php b/app/Exports/GoodsSkusExport.php index 6e15186..cc5a781 100644 --- a/app/Exports/GoodsSkusExport.php +++ b/app/Exports/GoodsSkusExport.php @@ -59,7 +59,6 @@ class GoodsSkusExport implements FromCollection, ShouldAutoSize ->when($ids, function ($query, $ids) { return $query->whereIn('id', $ids); }) - ->where('is_combination', 0) ->with(['goods' => function ($query) { $query->with(['type:id,name', 'brand:id,name']) ->orderBy('type_id') diff --git a/app/Http/Controllers/Goods/GoodsSkusController.php b/app/Http/Controllers/Goods/GoodsSkusController.php index e7b946b..73a514f 100644 --- a/app/Http/Controllers/Goods/GoodsSkusController.php +++ b/app/Http/Controllers/Goods/GoodsSkusController.php @@ -52,7 +52,7 @@ class GoodsSkusController extends Controller $query->where('day', $day); }]) ->where('is_combination', 0) - ->orderByDesc('stock') + ->orderBy('updated_at', 'desc') ->paginate($request->get('per_page')); $fields = implode(',', [ 'shop_id', diff --git a/app/Listeners/StockUpdateListener.php b/app/Listeners/StockUpdateListener.php index 433bf2b..ecd1ea4 100644 --- a/app/Listeners/StockUpdateListener.php +++ b/app/Listeners/StockUpdateListener.php @@ -41,7 +41,7 @@ class StockUpdateListener ->select(['goods_id', 'sku_id', 'external_sku_id']) ->where('shop_id', $shop->id) ->where('is_sync', 1) - ->where('external_sku_id', $event->goodsSku->goods['goods_code'] . '_' . $event->goodsSku->sku_code) + ->where('external_sku_id', $event->goodsSku->external_sku_id) ->get(); if ($event->isBatch) { BusinessFactory::init()->make($shop['plat_id'])->setShopWithId($shop['id'])->batchIncrQuantity($businessGoodsSkus->toArray(), $num, false); diff --git a/resources/frontend/vue.config.js b/resources/frontend/vue.config.js index ac1d434..63a7ba1 100644 --- a/resources/frontend/vue.config.js +++ b/resources/frontend/vue.config.js @@ -11,8 +11,8 @@ module.exports = { proxy: { // 配置代理 "/api": { - target: "http://192.168.247.186:81", - // target: "http://erp.chutang66.com", + // target: "http://192.168.247.186:81", + target: "http://erp.chutang66.com", changeOrigin: true, // 开启代理 pathRewrite: { // 重命名