|
|
@@ -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;
|