feat(system_store_storage): 添加商品入库API功能
This commit is contained in:
parent
b65ce4717a
commit
8a66d91620
@ -6,7 +6,8 @@ namespace app\api\controller\system_store_storage;
|
||||
use app\api\controller\BaseApiController;
|
||||
use app\api\lists\system_store_storage\SystemStoreStorageLists;
|
||||
use app\api\lists\system_store_storage\SystemStoreStorageGroupLists;
|
||||
|
||||
use app\common\model\store_branch_product\StoreBranchProduct;
|
||||
use app\common\model\system_store_storage\SystemStoreStorage;
|
||||
|
||||
/**
|
||||
* 门店入库控制器
|
||||
@ -36,4 +37,15 @@ class SystemStoreStorageController extends BaseApiController
|
||||
return $this->dataLists(new SystemStoreStorageGroupLists());
|
||||
}
|
||||
|
||||
public function warehousing_add() {
|
||||
$params = $this->request->post();
|
||||
$find=SystemStoreStorage::where('id',$params['id'])->find();
|
||||
if($find){
|
||||
$find->status=1;
|
||||
$find->save();
|
||||
StoreBranchProduct::where(['product_id'=>$find['product_id'],'store_id'=>$find['store_id']])->inc('stock',$find['nums'])->update();
|
||||
return $this->success('操作成功');
|
||||
}
|
||||
return $this->fail('操作失败');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user