|
|
@@ -41,6 +41,10 @@ class RejectedController extends Controller
|
|
|
$this->userService = $userService;
|
|
|
}
|
|
|
|
|
|
+ public function getTotal(Request $request)
|
|
|
+ {
|
|
|
+ return app('RejectedService')->getTotal($request->input());
|
|
|
+ }
|
|
|
/**
|
|
|
* Display a listing of the resource.
|
|
|
* @param GateRequest $request
|
|
|
@@ -361,38 +365,17 @@ class RejectedController extends Controller
|
|
|
protected function validatorUpdate(array $data)
|
|
|
{
|
|
|
return Validator::make($data, [
|
|
|
-// 'name' => ['required', 'string', 'max:50'],
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Display the specified resource.
|
|
|
- *
|
|
|
- * @param Rejected $rejected
|
|
|
- * @return void
|
|
|
- */
|
|
|
public function show(Rejected $rejected)
|
|
|
{
|
|
|
- //
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Show the form for editing the specified resource.
|
|
|
- *
|
|
|
- * @param Rejected $rejected
|
|
|
- * @return Response
|
|
|
- */
|
|
|
public function edit(RejectedBill $rejectedBill)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Update the specified resource in storage.
|
|
|
- *
|
|
|
- * @param Request $request
|
|
|
- * @param Rejected $rejected
|
|
|
- * @return Response
|
|
|
- */
|
|
|
public function update(Request $request, Rejected $rejected)
|
|
|
{
|
|
|
if(!Gate::allows('退货管理-编辑')){ return redirect(url('/')); }
|
|
|
@@ -403,22 +386,8 @@ class RejectedController extends Controller
|
|
|
return redirect('rejected/')->with('successTip',"成功修改退货信息“{$rejected['name']}”!");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Remove the specified resource from storage.
|
|
|
- *
|
|
|
- * @param Rejected $rejected
|
|
|
- * @return array|Response
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
public function destroy(Rejected $rejected)
|
|
|
{
|
|
|
-// if(!Gate::allows('退货管理-删除')){ return redirect(url('/'));}
|
|
|
-// app('LogService')->log(__METHOD__,__FUNCTION__,$rejectedBill->toJson(),Auth::user()['id']);
|
|
|
-// $items=$rejectedBill->items();
|
|
|
-// $items->delete();
|
|
|
-// app('LogService')->log(__METHOD__,__FUNCTION__,$items->toJson(),Auth::user()['id']);
|
|
|
-// $re=$rejectedBill->delete();
|
|
|
-// return ['success'=>$re];
|
|
|
}
|
|
|
public function export(Request $request){
|
|
|
ini_set('max_execution_time',2500);
|
|
|
@@ -521,17 +490,6 @@ class RejectedController extends Controller
|
|
|
];
|
|
|
}
|
|
|
return Export::make($row,$json,"退货统计记录单");
|
|
|
-// dd($json);
|
|
|
-// $e = new Export();
|
|
|
-// $e->setMysqlConnection(config('database.connections.mysql.host'),
|
|
|
-// config('database.connections.mysql.port'),config('database.connections.mysql.database')
|
|
|
-// ,config('database.connections.mysql.username'),config('database.connections.mysql.password'));
|
|
|
-// $e->setFileName("退货统计记录单");
|
|
|
-// return $e->sql($sql,[
|
|
|
-// "owner_name"=>"货主名","bounce_amount"=>"退件单数",
|
|
|
-// "check_amount"=>"审核单数","uncheck_amount"=>"未审核单数",
|
|
|
-// "in_storage_count"=>"入库单数","not_in_storage_count"=>"未入库单数",
|
|
|
-// ])->direct();
|
|
|
}
|
|
|
|
|
|
public function apiGetRejectedByLogisticNumberReturn(Request $request){
|