Bladeren bron

修改运输管理调度修改异常提示,打卡审核查询异常 by 'zengjun'

ajun 5 jaren geleden
bovenliggende
commit
3ffc25c1a5

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

@@ -883,6 +883,7 @@ class WaybillsController extends Controller
     protected function validatorWaybillDispatch(Request $request,$id){
         if ($request->input('type')=='直发车'){
             $validator=Validator::make($request->input(),[
+                'carrier_id'=>'required|integer',
                 'carrier_bill'=>"nullable|max:50|unique:waybills,carrier_bill,$id",
                 'fee'=>'nullable|min:0|numeric|max:999999',
                 'other_fee'=>'nullable|min:0|numeric|max:999999',
@@ -898,6 +899,7 @@ class WaybillsController extends Controller
                 'numeric'=>':attribute 应为数字',
                 'unique'=>':attribute 已存在',
             ],[
+                'carrier_id'=>'承运商',
                 'carrier_bill'=>'承运商单号',
                 'fee'=>'运费',
                 'other_fee'=>'其他费用',
@@ -930,6 +932,8 @@ 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',
+            'amount'=>'nullable|min:0|numeric|max:999999',
+            'mileage'=>'nullable|min:0|numeric|max:999999',
         ],[
             'required'=>':attribute 为必填项',
             'alpha_num'=>':attribute 应为字母或数字',
@@ -954,6 +958,8 @@ class WaybillsController extends Controller
             'carrier_weight_other'=>'承运商计数二',
             'warehouse_weight_unit_id_other'=>'仓库技数单位二',
             'carrier_weight_unit_id_other'=>'承运商计数单位二',
+            'amount'=>'计数',
+            'mileage'=>'里程数',
         ]);
         return $validator;
     }

+ 1 - 1
resources/views/personnel/checking-in/missionAudit.blade.php

@@ -8,7 +8,7 @@
 
     <div class="container-fluid card" id="list">
         <div class="card-header">
-            <form method="GET" action="{{url('process/checking-in/missionAudit')}}" id="form">
+            <form method="GET" action="{{url('personnel/checking-in/missionAudit')}}" id="form">
                 <table class="table-sm text-nowrap table-bordered" style="width: 100%">
                     <tbody>
                     <tr v-if="isBeingFilterConditions">

+ 29 - 28
resources/views/waybill/edit.blade.php

@@ -98,23 +98,22 @@
                                     </span>
                         @enderror
                     </div>
-                    <div class="form-group row">
+                    <div class="form-group row" style="margin-bottom: 20px">
                         <label for="carrier_id" class="col-2 col-form-label text-right text-primary">承运商 *</label>
-                        <div class="col-8">
+                        <div class="col-8" style="position: relative">
                             <select name="carrier_id" class="form-control @error('carrier_id') is-invalid @enderror" :class="errors['carrier_id'] ? 'is-invalid' :''" id="carrier_id" v-model="waybillPriceModel.carrier_id" style="width: 30%; ">
                                 @foreach($carriers as $carrier)
                                     <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 v-if="errors['carrier_id'] && errors['carrier_id'].length>0" class="invalid-feedback" role="alert" style="position: relative">--}}
+{{--                            <strong class="">@{{ errors['carrier_id'][0] }}</strong>--}}
+{{--                            </div>--}}
+                            <span class="col-sm-5" style="position: absolute;height: 15px;padding: 0">
+                                <p class="form-control-static text-danger small font-weight-bold" style="">{{ $errors->first('carrier_id') }}</p>
+                            </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>
                     </div>
                     <div class="form-group row">
                         <label class="col-2 col-form-label text-right">承运商单号</label>
@@ -260,7 +259,7 @@
                     </div>
                     <div v-if="type=='直发车'">
                         <div class="form-group row">
-                            <label for="carType_id" class="col-2 col-form-label text-right text-primary">车型 *</label>
+                            <label for="carType_id" class="col-2 col-form-label text-right">车型</label>
                             <div class="col-8">
                                 <select class="form-control" name="carType_id" style="width: 30%;">
                                     @foreach($carTypes as $carType)
@@ -282,7 +281,7 @@
                         </div>
                         @can('运输管理-运费')
                         <div class="form-group row">
-                            <label for="fee" class="col-2 col-form-label text-right text-primary">运费(元) *</label>
+                            <label for="fee" class="col-2 col-form-label text-right text-primary">运费(元) </label>
                             <div class="col-8">
                                 <input type="text" class="form-control @error('fee') is-invalid @enderror"
                                        name="fee" autocomplete="off" value="@if(old('fee')){{ old('fee') }}@else{{$waybill->fee}}@endif"  >
@@ -482,24 +481,26 @@
                 is_waybillPriceModel(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other){
                     this.errors=[];
                     let url='{{url('waybill/is/waybillPriceModel')}}';
+                    document.getElementById('waybillForm').submit();
+
                     let _this=this;
-                    axios.post(url,{carrier_id:carrier_id,carrier_weight:[carrier_weight,carrier_weight_other],
-                        carrier_weight_unit_id:[carrier_weight_unit_id,carrier_weight_unit_id_other],destination_city_id:destination_city_id})
-                        .then(
-                            function (response) {
-                                if (response.data.error){_this.errors=response.data.error;return;}
-                                if (!response.data.success) {
-                                    document.getElementById('waybillPriceModel').value='';
-                                    tempTip.confirm('该目的地与计量单位对应的计费模型不存在,如录入将会标为异常记录,请通知相关负责人添加计费模型,点击'+'<b class="text-primary">"确定"</b>'+'则确认提交 ',
-                                        function () {
-                                            document.getElementById('waybillForm').submit();
-                                        });
-                                }else{
-                                    document.getElementById('waybillPriceModel').value=response.data.success;
-                                    document.getElementById('waybillForm').submit();
-                                }
-                            }
-                        );
+                    // axios.post(url,{carrier_id:carrier_id,carrier_weight:[carrier_weight,carrier_weight_other],
+                    //     carrier_weight_unit_id:[carrier_weight_unit_id,carrier_weight_unit_id_other],destination_city_id:destination_city_id})
+                    //     .then(
+                    //         function (response) {
+                    //             if (response.data.error){_this.errors=response.data.error;return;}
+                    //             if (!response.data.success) {
+                    //                 document.getElementById('waybillPriceModel').value='';
+                    //                 tempTip.confirm('该目的地与计量单位对应的计费模型不存在,如录入将会标为异常记录,请通知相关负责人添加计费模型,点击'+'<b class="text-primary">"确定"</b>'+'则确认提交 ',
+                    //                     function () {
+                    //                         document.getElementById('waybillForm').submit();
+                    //                     });
+                    //             }else{
+                    //                 document.getElementById('waybillPriceModel').value=response.data.success;
+                    //                 document.getElementById('waybillForm').submit();
+                    //             }
+                    //         }
+                    //     );
                 },
                 submitForm(){
                     let type=document.getElementById('type').value;