mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 06:30:49 +00:00
feat: #10000 更新
This commit is contained in:
parent
1a3bd12ee2
commit
4cb1b405f1
@ -90,6 +90,7 @@ class GoodsCombinationController extends Controller
|
||||
$stock = $num;
|
||||
}
|
||||
}
|
||||
$status = $stock ? (5 < $stock ? 1 : 2) : 0;
|
||||
if ($id = $request->input('id')) {
|
||||
$sku = GoodsSku::query()->findOrFail($id);
|
||||
} else {
|
||||
@ -97,6 +98,7 @@ class GoodsCombinationController extends Controller
|
||||
$sku->goods_id = 0;
|
||||
$sku->is_combination = 1;
|
||||
}
|
||||
$sku->status = $status;
|
||||
$sku->title = $request->input('title');
|
||||
$sku->sku_code = $request->input('external_sku_id');
|
||||
$sku->external_sku_id = $request->input('external_sku_id');
|
||||
|
||||
@ -66,9 +66,10 @@ class CombinationGoodsImport implements ToArray, SkipsEmptyRows, WithStartRow
|
||||
$stock = $num;
|
||||
}
|
||||
}
|
||||
$status = $stock ? (5 < $stock ? 1 : 2) : 0;
|
||||
$sku = GoodsSku::query()->updateOrCreate(
|
||||
['external_sku_id' => $info['external_sku_id'], 'is_combination' => 1],
|
||||
['title' => $info['title'], 'goods_id' => 0, 'sku_code' => $info['external_sku_id'], 'stock' => $stock]
|
||||
['title' => $info['title'], 'goods_id' => 0, 'sku_code' => $info['external_sku_id'], 'stock' => $stock, 'status' => $status]
|
||||
);
|
||||
CombinationGood::query()
|
||||
->where('goods_sku_id', $sku->id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user