更新库存编辑
This commit is contained in:
parent
b247f940b8
commit
d179220dd0
@ -69,7 +69,7 @@ class ProductRepository extends BaseRepository
|
||||
|
||||
protected $dao;
|
||||
const CREATE_PARAMS = [
|
||||
"image", "slider_image", "store_name", "store_info", "keyword", "bar_code", "guarantee_template_id", "cate_id", "mer_cate_id", "unit_name", "sort" , "is_show", "is_good", 'is_gift_bag', 'integral_rate', "video_link", "temp_id", "content", "spec_type", "extension_type", "attr", 'mer_labels', 'delivery_way', 'delivery_free','param_temp_id','extend', 'source_product_id', 'stock_num',
|
||||
"image", "slider_image", "store_name", "store_info", "keyword", "bar_code", "guarantee_template_id", "cate_id", "mer_cate_id", "unit_name", "sort" , "is_show", "is_good", 'is_gift_bag', 'integral_rate', "video_link", "temp_id", "content", "spec_type", "extension_type", "attr", 'mer_labels', 'delivery_way', 'delivery_free','param_temp_id','extend', 'source_product_id', 'stock_num', 'stock',
|
||||
["brand_id",0],
|
||||
['once_max_count',0],
|
||||
['once_min_count',0],
|
||||
@ -455,7 +455,6 @@ class ProductRepository extends BaseRepository
|
||||
if($data['integral_rate'] > 100) $integral_rate = 100;
|
||||
|
||||
}
|
||||
|
||||
$result = [
|
||||
'store_name' => $data['store_name'],
|
||||
'image' => $data['image'],
|
||||
@ -2267,7 +2266,7 @@ class ProductRepository extends BaseRepository
|
||||
}
|
||||
}
|
||||
foreach ($data['attrValue'] as $k => $item) {
|
||||
$data['attrValue'][$k]['stock'] = 0;
|
||||
//$data['attrValue'][$k]['stock'] = 0;
|
||||
}
|
||||
app()->make(ProductLabelRepository::class)->checkHas($merId,$data['mer_labels']);
|
||||
$count = app()->make(StoreCategoryRepository::class)->getWhereCount(['store_category_id' => $data['cate_id'],'is_show' => 1]);
|
||||
|
@ -85,6 +85,9 @@ class StoreProduct extends BaseController
|
||||
$data = $this->repository->checkParams($res,$merId);
|
||||
$stockNum = $data['stock_num'] ?? 0;
|
||||
unset($data['stock_num']);
|
||||
if (!empty($data['stock'])) {
|
||||
unset($data['stock']);
|
||||
}
|
||||
$data['mer_id'] = $merId;
|
||||
$data['is_gift_bag'] = 0;
|
||||
$merchant = app()->make(MerchantRepository::class)->get($merId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user