Kaynağa Gözat

修改任务审核 by 'zengjun'

ajun 5 yıl önce
ebeveyn
işleme
4ecea68d28

+ 1 - 0
app/Http/Controllers/Auth/LoginController.php

@@ -76,6 +76,7 @@ class LoginController extends Controller
         $this->incrementLoginAttempts($request);
         if(env('DB_USERNAME')!='developer')
             $this->log(__METHOD__,__FUNCTION__,'',Auth::user()['id']);
+        response()->header('Cache-Control','no-store');
         return $this->sendFailedLoginResponse($request);
     }
 }

+ 6 - 4
app/Http/Controllers/WaybillsController.php

@@ -884,11 +884,11 @@ class WaybillsController extends Controller
         if ($request->input('type')=='直发车'){
             $validator=Validator::make($request->input(),[
                 'carrier_bill'=>"nullable|max:50|unique:waybills,carrier_bill,$id",
-               // 'fee'=>'required|min:0|numeric|max:999999',
+                'fee'=>'nullable|min:0|numeric|max:999999',
                 'other_fee'=>'nullable|min:0|numeric|max:999999',
                 'charge'=>'nullable|min:0|numeric|max:999999',
-                'mileage'=>'nullable|numeric',
-                'amount'=>'nullable|numeric',
+                'mileage'=>'nullable|numeric|min:0',
+                'amount'=>'nullable|numeric|min:0',
             ],[
                 'required'=>':attribute 为必填项',
                 'alpha_num'=>':attribute 应为字母或数字',
@@ -898,7 +898,7 @@ class WaybillsController extends Controller
                 'unique'=>':attribute 已存在',
             ],[
                 'carrier_bill'=>'承运商单号',
-               //'fee'=>'运费',
+                'fee'=>'运费',
                 'other_fee'=>'其他费用',
                 'charge'=>'收费',
                 'mileage'=>'里程数',
@@ -928,6 +928,7 @@ class WaybillsController extends Controller
             'carrier_weight_unit_id'=>'required_with:carrier_weight',
             'carrier_weight_other'=>'nullable|min:0|numeric|max:999999',
             'carrier_weight_unit_id_other'=>'required_with:carrier_weight_other',
+            'mileage'=>'nullable|min:0'
         ],[
             'required'=>':attribute 为必填项',
             'alpha_num'=>':attribute 应为字母或数字',
@@ -952,6 +953,7 @@ class WaybillsController extends Controller
             'carrier_weight_other'=>'承运商计数二',
             'warehouse_weight_unit_id_other'=>'仓库技数单位二',
             'carrier_weight_unit_id_other'=>'承运商计数单位二',
+            'mileage'=>'计数',
         ]);
         return $validator;
     }

+ 7 - 2
resources/views/waybill/edit.blade.php

@@ -106,7 +106,12 @@
                                     <option value="{{$carrier->id}}">{{$carrier->name}}</option>
                                 @endforeach
                             </select>
+                            <span v-if="errors['carrier_id'] && errors['carrier_id'].length>0" class="invalid-feedback" role="alert" >
+{{--                            :class="errors['carrier_id'] ? 'is-invalid' :''" id="carrier_id"--}}
+                            <strong class="">@{{ errors['carrier_id'][0] }}</strong>
+                        </span>
                         </div>
+
                         <div class="col-sm-5">
                             <p class="form-control-static text-danger small font-weight-bold" style="margin-left: 50%">{{ $errors->first('carrier_id') }}</p>
                         </div>
@@ -220,11 +225,11 @@
                     <div class="form-group row">
                         <label for="carrier_id" class="col-2 col-form-label text-right text-primary">计数</label>
                         <div class="col-5">
-                            <input type="number" class="form-control @error('mileage') is-invalid @enderror"
+                            <input type="number" class="form-control @error('amount') is-invalid @enderror"
                                    name="amount" autocomplete="off" value="@if(old('amount')){{ old('amount') }}@else{{$waybill->amount}}@endif"  >
                             @error('amount')
                             <span class="invalid-feedback" role="alert">
-                                        <strong>{{ amount }}</strong>
+                                        <strong>{{ $message }}</strong>
                                     </span>
                             @enderror
                         </div>