|
|
@@ -11,8 +11,8 @@
|
|
|
</div>
|
|
|
<div class="modal-body row">
|
|
|
<label class="col-8 offset-2"><select class="form-control" v-model="waybill.province">
|
|
|
- <option v-for="province in provinces" :value="province.id">@{{ province.name }}</option>
|
|
|
- </select></label>
|
|
|
+ <option v-for="province in provinces" :value="province.id">@{{ province.name }}</option>
|
|
|
+ </select></label>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
<button type="button" class="btn btn-success pull-right" @click="addCounty()">录入</button>
|
|
|
@@ -34,6 +34,7 @@
|
|
|
<div class="h5 mb-3 col-8">
|
|
|
<button type="button" @click="waybill.type='专线'" class="btn" :class="waybill.type=='专线'?'btn-primary':'btn-outline-primary'">专线</button>
|
|
|
<button type="button" @click="waybill.type='直发车'" class="btn ml-2" :class="waybill.type!='专线'?'btn-primary':'btn-outline-primary'">直发车</button>
|
|
|
+ <button type="button" @click="waybill.type='德邦物流'" class="btn ml-2" :class="waybill.type=='德邦物流'?'btn-primary':'btn-outline-primary'">德邦物流</button>
|
|
|
</div>
|
|
|
<input name="type" id="type" :value="waybill.type" hidden>
|
|
|
</div>
|
|
|
@@ -56,7 +57,7 @@
|
|
|
<strong class="">@{{ errors['logistic_id'][0] }}</strong>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="waybill.logistic_id == 14 || waybill.logistic_id == 15 || waybill.logistic_id == 28 || waybill.logistic_id == 29">
|
|
|
+ <div v-if="waybill.logistic_id == 15 || waybill.type=='德邦物流'" style="background: black">
|
|
|
<div class="form-group row">
|
|
|
<label for="cargo_name" class="col-2 col-form-label text-right text-primary">货物名称 *</label>
|
|
|
<div class="col-3">
|
|
|
@@ -76,6 +77,59 @@
|
|
|
@error('cargo_name')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
|
|
|
@error('total_number')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
|
|
|
</div>
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="" class="col-2 col-form-label text-right text-primary">下单模式 *</label>
|
|
|
+ <div class="col-3">
|
|
|
+ <select class="form-control @error('order_type') is-invalid @enderror" name="order_type"
|
|
|
+ :class="errors['pay_type'] ? 'is-invalid' :''"
|
|
|
+ style="width: 100%;" v-model="waybill.order_type" id="order_type">
|
|
|
+ <option v-for="(v,k) in orderTypes" :value="k">@{{ v }}</option>
|
|
|
+ </select>
|
|
|
+ @error('order_type')<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-3">
|
|
|
+ <select class="form-control @error('transport_type') is-invalid @enderror" name="transport_type"
|
|
|
+ :class="errors['transport_type'] ? 'is-invalid' :''"
|
|
|
+ style="width: 100%;" v-model="waybill.transport_type" id="transport_type">
|
|
|
+ <option v-for="(v,k) in transportTypes" :value="k">@{{ v }}</option>
|
|
|
+ </select>
|
|
|
+ @error('transport_type')<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">支付方式 *</label>
|
|
|
+ <div class="col-3">
|
|
|
+ <select class="form-control @error('pay_type') is-invalid @enderror" name="pay_type"
|
|
|
+ :class="errors['pay_type'] ? 'is-invalid' :''"
|
|
|
+ style="width: 100%;" v-model="waybill.pay_type" id="pay_type">
|
|
|
+ <option v-for="(v,k) in payTypes" :value="k">@{{ v }}</option>
|
|
|
+ </select>
|
|
|
+ @error('pay_type')<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-3">
|
|
|
+ <select class="form-control @error('back_sign_bill') is-invalid @enderror" name="back_sign_bill"
|
|
|
+ :class="errors['back_sign_bill'] ? 'is-invalid' :''"
|
|
|
+ style="width: 100%;" v-model="waybill.back_sign_bill" id="back_sign_bill">
|
|
|
+ <option v-for="(v,k) in backSignBills" :value="k">@{{ v }}</option>
|
|
|
+ </select>
|
|
|
+ @error('back_sign_bill')<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">包装方式 *</label>
|
|
|
+ <div class="col-3">
|
|
|
+ <select class="form-control @error('package_service') is-invalid @enderror" name="package_service"
|
|
|
+ :class="errors['package_service'] ? 'is-invalid' :''"
|
|
|
+ style="width: 100%;" v-model="waybill.package_service" id="package_service">
|
|
|
+ <option v-for="(v,k) in packageServices" :value="v">@{{ v }}</option>
|
|
|
+ </select>
|
|
|
+ @error('package_service')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="form-group row">
|
|
|
<label for="total_weight" class="col-2 col-form-label text-right text-primary">总重量(kg) *</label>
|
|
|
<div class="col-3">
|
|
|
@@ -451,10 +505,20 @@
|
|
|
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_type: '{{ old("order_type") ?? $waybill->order_type}}',
|
|
|
+ transport_type: '{{ old("transport_type") ?? $waybill->transport_type}}',
|
|
|
+ pay_type: '{{ old("pay_type") ?? $waybill->pay_type}}',
|
|
|
+ back_sign_bill: '{{ old("back_sign_bill") ?? $waybill->back_sign_bill}}',
|
|
|
+ package_service: '{{ old("package_service") ?? $waybill->package_service}}',
|
|
|
},
|
|
|
order:{!! $waybill->order ?? '{}' !!},
|
|
|
waybillTemp:{!! $waybill !!},
|
|
|
provinces : [],
|
|
|
+ orderTypes:{!! $orderTypes !!},
|
|
|
+ transportTypes:{!! $transportTypes !!},
|
|
|
+ payTypes:{!! $payTypes !!},
|
|
|
+ backSignBills:{!! $backSignBills !!},
|
|
|
+ packageServices:{!! $packageServices !!}
|
|
|
},
|
|
|
mounted:function(){
|
|
|
let _this=this;
|
|
|
@@ -553,15 +617,16 @@
|
|
|
},
|
|
|
methods:{
|
|
|
{{--计费模型阶段保留--}}
|
|
|
- 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){
|
|
|
+ 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,order_type,transport_type,pay_type,back_sign_bill,package_service){
|
|
|
this.errors=[];
|
|
|
let url='{{url('transport/waybill/is/waybillPriceModel')}}';
|
|
|
|
|
|
let _this=this;
|
|
|
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,
|
|
|
- cargo_name:cargo_name, total_number:total_number,total_weight:total_weight, deliveryType_id:deliveryType_id})
|
|
|
- .then(
|
|
|
+ cargo_name:cargo_name, total_number:total_number,total_weight:total_weight, deliveryType_id:deliveryType_id
|
|
|
+ ,order_type:order_type, transport_type: transport_type, pay_type:pay_type, back_sign_bill:back_sign_bill,package_service:package_service
|
|
|
+ }).then(
|
|
|
function (response) {
|
|
|
|
|
|
if (response.data.error){
|
|
|
@@ -586,18 +651,23 @@
|
|
|
document.getElementById('waybillForm').submit();
|
|
|
},
|
|
|
spliceDeliverAt:function () {
|
|
|
- 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;
|
|
|
},
|
|
|
submitForm(){
|
|
|
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 = '',total_number='',total_weight='',deliveryType_id='',order_type='',transport_type='',pay_type='',back_sign_bill='',package_service='';
|
|
|
+ if ( logistic_id == 15 ){
|
|
|
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;
|
|
|
+ order_type=document.getElementById('order_type').value;
|
|
|
+ transport_type=document.getElementById('transport_type').value;
|
|
|
+ pay_type=document.getElementById('pay_type').value;
|
|
|
+ back_sign_bill=document.getElementById('back_sign_bill').value;
|
|
|
+ package_service=document.getElementById('package_service').value;
|
|
|
}
|
|
|
if (type==='专线'){
|
|
|
carrier_weight=document.getElementById('carrier_weight').value;
|
|
|
@@ -605,9 +675,15 @@
|
|
|
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);
|
|
|
+ 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,order_type,transport_type,pay_type,back_sign_bill,package_service
|
|
|
+ );
|
|
|
} 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);
|
|
|
+ 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,order_type,transport_type,pay_type,back_sign_bill,package_service
|
|
|
+ );
|
|
|
document.getElementById('deliver_at').value= document.getElementById('deliver_at_date').value+' '+ document.getElementById('deliver_at_time').value;
|
|
|
this.executeSubmit();
|
|
|
}
|
|
|
@@ -628,11 +704,11 @@
|
|
|
let val=e.target.value;
|
|
|
if (!val)this. waybill.destination_city_id='';
|
|
|
else this.cities.some((city)=> {
|
|
|
- if (city.name.includes(val)){
|
|
|
- this.waybill.destination_city_id=city.id;
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (city.name.includes(val)){
|
|
|
+ this.waybill.destination_city_id=city.id;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
selectedProvince(){
|
|
|
if (this.waybill.order_id)return;
|
|
|
@@ -642,20 +718,20 @@
|
|
|
return;
|
|
|
}
|
|
|
window.tempTip.postBasicRequest("{{url('maintenance/region/getProvinces')}}",{},res=>{
|
|
|
- this.provinces = res;
|
|
|
+ this.provinces = res;
|
|
|
$("#selectedProvince").modal("show");
|
|
|
});
|
|
|
},
|
|
|
addCounty:function () {
|
|
|
window.tempTip.postBasicRequest("{{url('transport/waybill/addCounty')}}",
|
|
|
{name:this.waybill.destination_city,province:this.waybill.province},res=>{
|
|
|
- this.cities.push({
|
|
|
- id:res.id,
|
|
|
- name:res.name,
|
|
|
+ this.cities.push({
|
|
|
+ id:res.id,
|
|
|
+ name:res.name,
|
|
|
+ });
|
|
|
+ this.waybill.destination_city_id = res.id;
|
|
|
+ $("#selectedProvince").modal("hide");
|
|
|
});
|
|
|
- this.waybill.destination_city_id = res.id;
|
|
|
- $("#selectedProvince").modal("hide");
|
|
|
- });
|
|
|
}
|
|
|
},
|
|
|
});
|