diff --git a/app/api/controller/system_store_storage/SystemStoreStorageController.php b/app/api/controller/system_store_storage/SystemStoreStorageController.php index a2dcf4cea..2aec9d636 100644 --- a/app/api/controller/system_store_storage/SystemStoreStorageController.php +++ b/app/api/controller/system_store_storage/SystemStoreStorageController.php @@ -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('操作失败'); + } }