|
@@ -6,7 +6,6 @@ use App\Region;
|
|
|
use App\WaybillPriceModel;
|
|
use App\WaybillPriceModel;
|
|
|
use App\Events\WaybillPriceModelEvent;
|
|
use App\Events\WaybillPriceModelEvent;
|
|
|
use App\Imports\WaybillPriceModelsImport;
|
|
use App\Imports\WaybillPriceModelsImport;
|
|
|
-use App\Province;
|
|
|
|
|
use App\Unit;
|
|
use App\Unit;
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\Facades\Auth;
|
|
@@ -21,7 +20,7 @@ class WaybillPriceModelController extends Controller
|
|
|
{
|
|
{
|
|
|
if(!Gate::allows('计费模型-查询')){ return redirect(url('/')); }
|
|
if(!Gate::allows('计费模型-查询')){ return redirect(url('/')); }
|
|
|
$logistics=app('LogisticService')->getSelection(["id","name"],"物流");
|
|
$logistics=app('LogisticService')->getSelection(["id","name"],"物流");
|
|
|
- $provinces=Province::query()->get();
|
|
|
|
|
|
|
+ $provinces=Region::query()->where("type",1)->get();
|
|
|
$data=$request->input();
|
|
$data=$request->input();
|
|
|
$waybillPriceModels= WaybillPriceModel::query()->with(["logistic","province","city","unit"])->orderBy('id', 'DESC');
|
|
$waybillPriceModels= WaybillPriceModel::query()->with(["logistic","province","city","unit"])->orderBy('id', 'DESC');
|
|
|
if ($data){
|
|
if ($data){
|
|
@@ -159,7 +158,7 @@ class WaybillPriceModelController extends Controller
|
|
|
'WaybillPriceModel.province_id'=>'required|integer',
|
|
'WaybillPriceModel.province_id'=>'required|integer',
|
|
|
'WaybillPriceModel.logistic_id'=>'required|integer',
|
|
'WaybillPriceModel.logistic_id'=>'required|integer',
|
|
|
'WaybillPriceModel.unit_id'=>'required|integer',
|
|
'WaybillPriceModel.unit_id'=>'required|integer',
|
|
|
- 'WaybillPriceModel.city_id'=>'nullable|Integer',
|
|
|
|
|
|
|
+ 'WaybillPriceModel.city_id'=>'nullable|integer',
|
|
|
'WaybillPriceModel.range_min'=> 'nullable|min:0|numeric|max:999999',
|
|
'WaybillPriceModel.range_min'=> 'nullable|min:0|numeric|max:999999',
|
|
|
'WaybillPriceModel.range_max'=> "nullable|min:{$min}|numeric|max:999999",
|
|
'WaybillPriceModel.range_max'=> "nullable|min:{$min}|numeric|max:999999",
|
|
|
'WaybillPriceModel.unit_price'=>'required|min:0|numeric|max:999999',
|
|
'WaybillPriceModel.unit_price'=>'required|min:0|numeric|max:999999',
|