提交 afe33c1f authored 作者: 窦斌's avatar 窦斌

库存管理

上级 4d0f23d5
......@@ -54,7 +54,7 @@ class InventoryController extends Controller
if ($error_message) {
return response()->json(['ErrorCode'=>ErrorInc::INVALID_PARAM, 'ErrorMessage'=>$error_message->first(), 'Data'=>[$error_message]]);
}
$return_data = InventoryService::edit($request->all());
$return_data = InventoryService::edit($request->all(),$request->ip());
return $return_data;
}
......
......@@ -3,6 +3,7 @@
namespace App\Services\Api\MobileWeb;
use App\Models\Inventory;
use App\Models\PjGoods;
use App\Services\CommonService;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\DB;
......@@ -76,7 +77,7 @@ class InventoryService
return ['ErrorCode' => 1, 'ErrorMessage'=>'成功', 'data'=>$list_data];
}
//编辑库存
public static function edit ( $request ){
public static function edit ( $request, $ip ){
$session = $request['session'];
$session['company_id'] = 14;
$res = Inventory::updateOrCreate(
......@@ -92,6 +93,7 @@ class InventoryService
]
);
if ($res) {
CommonService::inserting_log('编辑商品库存,', $request['goodid'], '编辑商品,' . $request['pg_goodsname'] . '库存为:'.$request['goodnum'], '商品库存web', $session, $ip);//日志
return ['ErrorCode' => 1, 'ErrorMessage'=>'操作成功', 'data'=>$res];
} else {
return ['ErrorCode' => 201, 'ErrorMessage'=>'操作失败', 'data'=>$res];
......
......@@ -83,6 +83,7 @@ class LoginService
["pagePath"=>"/pages/order/afterOrderList","text"=>"售后","iconPath"=>"","selectedIconPath"=>"",'type'=>'afterOrderList'],
["pagePath"=>"/pages/login/forgotPassword","text"=>"修改密码","iconPath"=>"","selectedIconPath"=>"",'type'=>'forgotPassword'],
["pagePath"=>"/pages/technician/technicianList","text"=>"技师","iconPath"=>"","selectedIconPath"=>"",'type'=>'technicianList'],
["pagePath"=>"pages/inventory/index","text"=>"库存管理","iconPath"=>"","selectedIconPath"=>"",'type'=>'inventory'],
["pagePath"=>"","text"=>"退出","iconPath"=>"","selectedIconPath"=>"",'type'=>'quit']
];
}else{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论