|
@@ -144,6 +144,58 @@
|
|
|
<strong class="">@{{ errors['logistic_id'][0] }}</strong>
|
|
<strong class="">@{{ errors['logistic_id'][0] }}</strong>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div v-if="waybill.logistic_id == 14 || waybill.logistic_id == 15 || waybill.logistic_id == 28 || waybill.logistic_id == 29">
|
|
|
|
|
+ <div class="form-group row">
|
|
|
|
|
+ <label for="" class="col-2 col-form-label text-right text-primary">货物名称 *</label>
|
|
|
|
|
+ <div class="col-2">
|
|
|
|
|
+ <input type="text" class="form-control @error('cargo_name') is-invalid @enderror "
|
|
|
|
|
+ :class="errors['cargo_name'] ? 'is-invalid' :''"
|
|
|
|
|
+ name="cargo_name" autocomplete="off" v-model="waybill.cargo_name" id="cargo_name">
|
|
|
|
|
+ @error('cargo_name')
|
|
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
|
|
+ <strong>{{ $message }}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ @enderror
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <label for="" class="col-2 col-form-label text-right text-primary">总包裹数(件) *</label>
|
|
|
|
|
+ <div class="col-2">
|
|
|
|
|
+ <input type="number" class="form-control @error('total_number') is-invalid @enderror "
|
|
|
|
|
+ :class="errors['total_number'] ? 'is-invalid' :''"
|
|
|
|
|
+ name="total_number" autocomplete="off" v-model="waybill.total_number" id="total_number">
|
|
|
|
|
+ @error('total_number')
|
|
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
|
|
+ <strong>{{ $message }}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ @enderror
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group row">
|
|
|
|
|
+ <label for="" class="col-2 col-form-label text-right text-primary">总重量(kg) *</label>
|
|
|
|
|
+ <div class="col-2">
|
|
|
|
|
+ <input type="number" class="form-control @error('total_weight') is-invalid @enderror "
|
|
|
|
|
+ :class="errors['total_weight'] ? 'is-invalid' :''"
|
|
|
|
|
+ name="total_weight" autocomplete="off" v-model="waybill.total_weight" id="total_weight">
|
|
|
|
|
+ @error('total_weight')
|
|
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
|
|
+ <strong>{{ $message }}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ @enderror
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <label for="" class="col-2 col-form-label text-right text-primary">送货方式 *</label>
|
|
|
|
|
+ <div class="col-6">
|
|
|
|
|
+ <select class="form-control col-4 @error('deliveryType_id') is-invalid @enderror" name="deliveryType_id"
|
|
|
|
|
+ :class="errors['deliveryType_id'] ? 'is-invalid' :''"
|
|
|
|
|
+ style="width: 30%;" v-model="waybill.deliveryType_id" id="deliveryType_id">
|
|
|
|
|
+ <option v-for="deliveryType in deliveryTypes" :value="deliveryType.id">@{{ deliveryType.name }}</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ @error('deliveryType_id')
|
|
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
|
|
+ <strong>{{ $message }}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ @enderror
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<div v-if="waybill.type=='专线'">
|
|
<div v-if="waybill.type=='专线'">
|
|
|
<div class="form-group row">
|
|
<div class="form-group row">
|
|
|
<label for="origination_city_id" class="col-2 col-form-label text-right text-primary">始发市 *</label>
|
|
<label for="origination_city_id" class="col-2 col-form-label text-right text-primary">始发市 *</label>
|
|
@@ -383,6 +435,7 @@
|
|
|
units:[@foreach($units as $unit){id:'{{$unit->id}}',name:'{{$unit->name}}',},@endforeach],
|
|
units:[@foreach($units as $unit){id:'{{$unit->id}}',name:'{{$unit->name}}',},@endforeach],
|
|
|
logistics:[@foreach($logistics as $logistic){id:'{{$logistic->id}}',name:'{{$logistic->name}}',},@endforeach],
|
|
logistics:[@foreach($logistics as $logistic){id:'{{$logistic->id}}',name:'{{$logistic->name}}',},@endforeach],
|
|
|
carTypes:[@foreach($carTypes as $carType){!! $carType !!},@endforeach],
|
|
carTypes:[@foreach($carTypes as $carType){!! $carType !!},@endforeach],
|
|
|
|
|
+ deliveryTypes:[@foreach($deliveryTypes as $deliveryType){!! $deliveryType !!},@endforeach],
|
|
|
errors:[],
|
|
errors:[],
|
|
|
waybill:{
|
|
waybill:{
|
|
|
id:'{{$waybill->id}}',
|
|
id:'{{$waybill->id}}',
|
|
@@ -420,6 +473,10 @@
|
|
|
carrier_weight_unit_id_other:'{{$waybill->carrier_weight_unit_id_other}}',
|
|
carrier_weight_unit_id_other:'{{$waybill->carrier_weight_unit_id_other}}',
|
|
|
pick_up_fee:'{{$waybill->pick_up_fee}}',
|
|
pick_up_fee:'{{$waybill->pick_up_fee}}',
|
|
|
province:"",
|
|
province:"",
|
|
|
|
|
+ cargo_name: '{{ old("cargo_name") ?? $waybill->cargo_name}}',
|
|
|
|
|
+ total_number: '{{ old("total_number") ?? $waybill->total_number}}',
|
|
|
|
|
+ total_weight: '{{ old("total_weight") ?? $waybill->total_weight}}',
|
|
|
|
|
+ deliveryType_id: '{{ old("deliveryType_id") ?? $waybill->deliveryType_id}}',
|
|
|
},
|
|
},
|
|
|
order:{!! $waybill->order ?? '{}' !!},
|
|
order:{!! $waybill->order ?? '{}' !!},
|
|
|
waybillTemp:{!! $waybill !!},
|
|
waybillTemp:{!! $waybill !!},
|
|
@@ -522,13 +579,14 @@
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
{{--计费模型阶段保留--}}
|
|
{{--计费模型阶段保留--}}
|
|
|
- is_waybillPriceModel(logistic_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other){
|
|
|
|
|
|
|
+ is_waybillPriceModel(logistic_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other,cargo_name,total_number,total_weight,deliveryType_id){
|
|
|
this.errors=[];
|
|
this.errors=[];
|
|
|
let url='{{url('transport/waybill/is/waybillPriceModel')}}';
|
|
let url='{{url('transport/waybill/is/waybillPriceModel')}}';
|
|
|
|
|
|
|
|
let _this=this;
|
|
let _this=this;
|
|
|
axios.post(url,{logistic_id:logistic_id,carrier_weight:[carrier_weight,carrier_weight_other],
|
|
axios.post(url,{logistic_id:logistic_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})
|
|
|
|
|
|
|
+ carrier_weight_unit_id:[carrier_weight_unit_id,carrier_weight_unit_id_other],destination_city_id:destination_city_id,
|
|
|
|
|
+ cargo_name:cargo_name, total_number:total_number,total_weight:total_weight, deliveryType_id:deliveryType_id})
|
|
|
.then(
|
|
.then(
|
|
|
function (response) {
|
|
function (response) {
|
|
|
|
|
|
|
@@ -558,15 +616,24 @@
|
|
|
},
|
|
},
|
|
|
submitForm(){
|
|
submitForm(){
|
|
|
let type=this.waybill.type;
|
|
let type=this.waybill.type;
|
|
|
|
|
+ let logistic_id=document.getElementById('logistic_id').value;
|
|
|
|
|
+ let carrier_weight = '',carrier_weight_unit_id='',destination_city_id='',carrier_weight_other='',carrier_weight_unit_id_other='',
|
|
|
|
|
+ cargo_name = '',total_number='',total_weight='',deliveryType_id='';
|
|
|
|
|
+ if ( $.inArray(logistic_id, ['14','15','28','29']) >= 0 ){
|
|
|
|
|
+ cargo_name=document.getElementById('cargo_name').value;
|
|
|
|
|
+ total_number=document.getElementById('total_number').value;
|
|
|
|
|
+ total_weight=document.getElementById('total_weight').value;
|
|
|
|
|
+ deliveryType_id=document.getElementById('deliveryType_id').value;
|
|
|
|
|
+ }
|
|
|
if (type==='专线'){
|
|
if (type==='专线'){
|
|
|
- let logistic_id=document.getElementById('logistic_id').value;
|
|
|
|
|
- let carrier_weight=document.getElementById('carrier_weight').value;
|
|
|
|
|
- let carrier_weight_unit_id=document.getElementById('carrier_weight_unit_id').value;
|
|
|
|
|
- let destination_city_id=document.getElementById('destination_city_id').value;
|
|
|
|
|
- let carrier_weight_other=document.getElementById('carrier_weight_other').value;
|
|
|
|
|
- let carrier_weight_unit_id_other=document.getElementById('carrier_weight_unit_id_other').value;
|
|
|
|
|
- this.is_waybillPriceModel(logistic_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
|
|
- }else {
|
|
|
|
|
|
|
+ carrier_weight=document.getElementById('carrier_weight').value;
|
|
|
|
|
+ carrier_weight_unit_id=document.getElementById('carrier_weight_unit_id').value;
|
|
|
|
|
+ destination_city_id=document.getElementById('destination_city_id').value;
|
|
|
|
|
+ carrier_weight_other=document.getElementById('carrier_weight_other').value;
|
|
|
|
|
+ carrier_weight_unit_id_other=document.getElementById('carrier_weight_unit_id_other').value;
|
|
|
|
|
+ this.is_waybillPriceModel(logistic_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other,cargo_name,total_number,total_weight,deliveryType_id);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.is_waybillPriceModel(logistic_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other,cargo_name,total_number,total_weight,deliveryType_id);
|
|
|
document.getElementById('deliver_at').value= document.getElementById('deliver_at_date').value+' '+ document.getElementById('deliver_at_time').value;
|
|
document.getElementById('deliver_at').value= document.getElementById('deliver_at_date').value+' '+ document.getElementById('deliver_at_time').value;
|
|
|
this.executeSubmit();
|
|
this.executeSubmit();
|
|
|
}
|
|
}
|