| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace App\Http\Controllers;
- use App\WaybillPriceModel;
- use App\Events\WaybillPriceModelEvent;
- use App\WaybillFinancialExcepted;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Event;
- use Illuminate\Support\Facades\Gate;
- class WaybillFinancialExceptedController extends Controller
- {
- public function index(Request $request)
- {
- if(!Gate::allows('财务报表-查询')){ return redirect(url('/')); }
- $waybillFinancialSnapshots=WaybillFinancialExcepted::orderBy('id', 'DESC');
- if ($request->input('created_at_start')){
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
- }
- if ($request->input('created_at_end')){
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
- }
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
- return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'','excepted'=>true]);
- }
- public function indexZF(Request $request)
- {
- if(!Gate::allows('财务报表-查询')){ return redirect(url('/')); }
- $waybillFinancialSnapshots=WaybillFinancialExcepted::orderBy('id', 'DESC')->where('json_content','like','%直发车%');
- if ($request->input('created_at_start')){
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
- }
- if ($request->input('created_at_end')){
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
- }
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
- return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'ZF','excepted'=>true]);
- }
- public function indexZX(Request $request)
- {
- if(!Gate::allows('财务报表-查询')){ return redirect(url('/')); }
- $waybillFinancialSnapshots=WaybillFinancialExcepted::orderBy('id', 'DESC')->where('json_content','like','%专线%');
- if ($request->input('created_at_start')){
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
- }
- if ($request->input('created_at_end')){
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
- }
- $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
- return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'ZX','excepted'=>true]);
- }
- }
|