|
|
@@ -17,6 +17,7 @@ class HandInStorageController extends Controller
|
|
|
*/
|
|
|
public function selectAsn(Request $request)
|
|
|
{
|
|
|
+ $this->gate("入库管理-手持入库-收货");
|
|
|
/** @var HandInStorageService $handInStorageService */
|
|
|
$handInStorageService=app('HandInStorageService');
|
|
|
$asnno= $request->input('asnno');
|
|
|
@@ -34,8 +35,10 @@ class HandInStorageController extends Controller
|
|
|
* @param $asnno
|
|
|
* 跳转到收货明细页面
|
|
|
*/
|
|
|
+
|
|
|
public function receiveDetailPage($asnno,$customerid)
|
|
|
{
|
|
|
+ $this->gate("入库管理-手持入库-收货");
|
|
|
/** @var HandInStorageService $handInStorageService */
|
|
|
$handInStorageService=app('HandInStorageService');
|
|
|
if (!$customerid||$customerid=='undefined')
|
|
|
@@ -52,6 +55,7 @@ class HandInStorageController extends Controller
|
|
|
*/
|
|
|
public function selectAsnDetails(Request $request)
|
|
|
{
|
|
|
+ $this->gate("入库管理-手持入库-收货");
|
|
|
$asnno= $request->input('asnno');
|
|
|
$asnDetails =app('HandInStorageService')->selectAsnDetails($asnno);
|
|
|
if (count($asnDetails)>0)$this->success($asnDetails);
|
|
|
@@ -80,6 +84,7 @@ class HandInStorageController extends Controller
|
|
|
*/
|
|
|
public function fluxHandIn(Request $request)
|
|
|
{
|
|
|
+ $this->gate("入库管理-手持入库-收货");
|
|
|
$info=$request->input('info');
|
|
|
if (!$info['customerid']||!$info['sku']||!$info['asnno']) $this->error('参数错误');
|
|
|
if ($info['amount']+$info['receivedqty']>$info['expectedqty'])$this->error('收货数大于预期数');
|
|
|
@@ -92,17 +97,22 @@ class HandInStorageController extends Controller
|
|
|
// }
|
|
|
/** @var HandInStorageService $handInStorageService */
|
|
|
$handInStorageService=app('HandInStorageService');
|
|
|
- $result=$handInStorageService->fluxHandIn($info);
|
|
|
- if ($result)$this->success("收货成功");
|
|
|
- else $this->error("收货失败");
|
|
|
+ try {
|
|
|
+ $result = $handInStorageService->fluxHandIn($info);
|
|
|
+ if ($result)$this->success("收货成功");
|
|
|
+ else $this->error("收货失败");
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ app('LogService')->log(__METHOD__,'error_'.__FUNCTION__,json_encode($info).'|catch:'.$e->getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @param Request $request
|
|
|
- * 根据商品条码 获取要上架的任务列表
|
|
|
+ * 根据商品条码和跟踪号 获取要上架的任务列表
|
|
|
*/
|
|
|
public function getTsk(Request $request)
|
|
|
{
|
|
|
+ $this->gate("入库管理-手持入库-上架");
|
|
|
$barCode=$request->input('barCode');
|
|
|
$trackNumber=$request->input('trackNumber');
|
|
|
if(!$barCode)$this->error('条码不能为空');
|
|
|
@@ -116,9 +126,11 @@ class HandInStorageController extends Controller
|
|
|
|
|
|
/**
|
|
|
* @throws \Throwable
|
|
|
+ * 上架
|
|
|
*/
|
|
|
public function handFluxPa(Request $request)
|
|
|
{
|
|
|
+ $this->gate("入库管理-手持入库-上架");
|
|
|
$info=$request->input('info');
|
|
|
if (!$info['location']||!$info['amount']||!$info['trackNumber']||!$info['barCode']) $this->error('参数错误');
|
|
|
if (count($request->input('checkData'))==0) $this->error('请勾选要上架任务');
|
|
|
@@ -130,9 +142,13 @@ class HandInStorageController extends Controller
|
|
|
if (!$location)$this->error('目标库位不存在');
|
|
|
/** @var HandInStorageService $handInStorageService */
|
|
|
$handInStorageService=app('HandInStorageService');
|
|
|
- $result=$handInStorageService->fluxHandPa($info,$checkData);
|
|
|
- if ($result)$this->success("上架成功");
|
|
|
- else $this->error("上架失败");
|
|
|
+ try {
|
|
|
+ $result = $handInStorageService->fluxHandPa($info, $checkData);
|
|
|
+ if ($result)$this->success("上架成功");
|
|
|
+ else $this->error("上架失败");
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ app('LogService')->log(__METHOD__,'error_'.__FUNCTION__,json_encode($info).'|catch:'.$e->getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|