|
|
@@ -597,14 +597,18 @@ class WaybillsController extends Controller
|
|
|
}else if ($request->input('type')=='专线'){
|
|
|
$validator=Validator::make($request->input(),[
|
|
|
'carrier_bill'=>"nullable|max:50|unique:waybills,carrier_bill,$id",
|
|
|
- 'warehouse_weight'=>'nullable|min:0|numeric|max:999999',
|
|
|
- 'carrier_weight'=>'nullable|min:0|numeric|max:999999',
|
|
|
'pick_up_fee'=>'nullable|min:0|numeric|max:999999',
|
|
|
'other_fee'=>'nullable|min:0|numeric|max:999999',
|
|
|
'carrier_id'=>'required|integer',
|
|
|
'destination_city_id'=>'required|integer',
|
|
|
- 'warehouse_weight_unit_id'=>'nullable|integer',
|
|
|
- 'carrier_weight_unit_id'=>'nullable|integer',
|
|
|
+ 'warehouse_weight'=>'nullable|min:0|numeric|max:999999',
|
|
|
+ 'carrier_weight'=>'nullable|min:0|numeric|max:999999',
|
|
|
+ 'warehouse_weight_unit_id'=>'required_with:warehouse_weight|integer',
|
|
|
+ 'carrier_weight_unit_id'=>'required_with:carrier_weight|integer',
|
|
|
+ 'warehouse_weight_other'=>'nullable|min:0|numeric|max:999999',
|
|
|
+ 'carrier_weight_other'=>'nullable|min:0|numeric|max:999999',
|
|
|
+ 'warehouse_weight_unit_id_other'=>'required_with:warehouse_weight_other|integer',
|
|
|
+ 'carrier_weight_unit_id_other'=>'required_with:carrier_weight_other|integer',
|
|
|
'charge'=>'nullable|min:0|numeric|max:999999',
|
|
|
],[
|
|
|
'required'=>':attribute 为必填项',
|
|
|
@@ -613,6 +617,7 @@ class WaybillsController extends Controller
|
|
|
'min'=>':attribute 不得为负',
|
|
|
'numeric'=>':attribute 应为数字',
|
|
|
'unique'=>':attribute 已存在',
|
|
|
+ 'required_with'=>':attribute 未填',
|
|
|
],[
|
|
|
'carrier_bill'=>'承运商单号',
|
|
|
'warehouse_weight'=>'仓库计数(抛)',
|
|
|
@@ -621,9 +626,13 @@ class WaybillsController extends Controller
|
|
|
'other_fee'=>'其他费用',
|
|
|
'carrier_id'=>'承运商',
|
|
|
'destination_city_id'=>'目的市',
|
|
|
- 'carrier_weight_unit_id'=>'承运商计重单位',
|
|
|
+ 'carrier_weight_unit_id'=>'承运商计数单位',
|
|
|
'charge'=>'收费',
|
|
|
- 'warehouse_weight_unit_id'=>'仓库计重单位',
|
|
|
+ 'warehouse_weight_unit_id'=>'仓库计数单位',
|
|
|
+ 'warehouse_weight_other'=>'仓库计数二',
|
|
|
+ 'carrier_weight_other'=>'承运商计数二',
|
|
|
+ 'warehouse_weight_unit_id_other'=>'仓库技数单位二',
|
|
|
+ 'carrier_weight_unit_id_other'=>'承运商计数单位二',
|
|
|
]);
|
|
|
return $validator;
|
|
|
}else{
|