|
|
@@ -3,6 +3,7 @@
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
|
+use App\Http\Controllers\Api\thirdPart\flux\WaybillController;
|
|
|
use App\WaybillAuditLog;
|
|
|
use App\WaybillPriceModel;
|
|
|
use App\Carrier;
|
|
|
@@ -25,7 +26,7 @@ use Ramsey\Uuid\Uuid;
|
|
|
|
|
|
class WaybillsController extends Controller
|
|
|
{
|
|
|
- //超15天精确查询抽离 cloumn前提:数据库字段名必须与request内字段名一致
|
|
|
+ //超15天精确查询抽离 column前提:数据库字段名必须与request内字段名一致
|
|
|
public function preciseQuery(string $column,Request $request,$waybills){
|
|
|
$today=Carbon::now()->subDays(15);
|
|
|
$waybillsTem=clone $waybills;
|
|
|
@@ -85,7 +86,7 @@ class WaybillsController extends Controller
|
|
|
if(!Gate::allows('运输管理-查询')){ return redirect(url('/')); }
|
|
|
$data=$request->input();
|
|
|
if ($data != null ) {
|
|
|
- $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
|
|
|
+ $waybills=Waybill::with(['owner','wmsCommodities','waybillAuditLogs' => function ($query) {
|
|
|
return $query->with('user');
|
|
|
}])->orderBy('id','DESC');
|
|
|
$waybills=$this->conditionQuery($request,$waybills);
|
|
|
@@ -93,13 +94,12 @@ class WaybillsController extends Controller
|
|
|
$owners = Owner::get();
|
|
|
return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'']);
|
|
|
} else {
|
|
|
- $waybills = Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
|
|
|
+ $waybills = Waybill::with(['owner','wmsCommodities','waybillAuditLogs' => function ($query) {
|
|
|
return $query->with('user');
|
|
|
}])->orderBy('id', 'DESC')->paginate(50);
|
|
|
$carries = Carrier::get();
|
|
|
$owners = Owner::get();
|
|
|
return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'']);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -107,7 +107,7 @@ class WaybillsController extends Controller
|
|
|
if(!Gate::allows('运输管理-查询')){ return redirect(url('/')); }
|
|
|
$data=$request->input();
|
|
|
if ($data != null ) {
|
|
|
- $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
|
|
|
+ $waybills=Waybill::with(['owner','wmsCommodities', 'waybillAuditLogs' => function ($query) {
|
|
|
return $query->with('user');
|
|
|
}])->orderBy('id','DESC')->where('type','直发车');
|
|
|
$waybills=$this->conditionQuery($request,$waybills);
|
|
|
@@ -115,7 +115,7 @@ class WaybillsController extends Controller
|
|
|
$owners = Owner::get();
|
|
|
return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'ZF']);
|
|
|
} else {
|
|
|
- $waybills = Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
|
|
|
+ $waybills = Waybill::with(['owner','wmsCommodities', 'waybillAuditLogs' => function ($query) {
|
|
|
return $query->with('user');
|
|
|
}])->where('type','直发车')->orderBy('id', 'DESC')->paginate(50);
|
|
|
$carries = Carrier::get();
|
|
|
@@ -129,7 +129,7 @@ class WaybillsController extends Controller
|
|
|
if(!Gate::allows('运输管理-查询')){ return redirect(url('/')); }
|
|
|
$data=$request->input();
|
|
|
if ($data != null ) {
|
|
|
- $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
|
|
|
+ $waybills=Waybill::with(['owner','wmsCommodities', 'waybillAuditLogs' => function ($query) {
|
|
|
return $query->with('user');
|
|
|
}])->orderBy('id','DESC')->where('type','专线');
|
|
|
$waybills=$this->conditionQuery($request,$waybills);
|
|
|
@@ -137,7 +137,7 @@ class WaybillsController extends Controller
|
|
|
$owners = Owner::get();
|
|
|
return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'ZX']);
|
|
|
} else {
|
|
|
- $waybills = Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
|
|
|
+ $waybills = Waybill::with(['owner','wmsCommodities', 'waybillAuditLogs' => function ($query) {
|
|
|
return $query->with('user');
|
|
|
}])->where('type','专线')->orderBy('id', 'DESC')->paginate(50);
|
|
|
$carries = Carrier::get();
|
|
|
@@ -521,6 +521,9 @@ class WaybillsController extends Controller
|
|
|
'waybill_id'=>$id,
|
|
|
'json_content'=>$waybillPayoffJson,
|
|
|
]);
|
|
|
+ //回传FLUX
|
|
|
+ $FLUXWaybillController=new WaybillController();
|
|
|
+ $FLUXWaybillController->accomplishToWMS($waybill);
|
|
|
}else{
|
|
|
$waybill->status='无模型';
|
|
|
$result=$waybill->save();
|