|
|
@@ -11,13 +11,13 @@
|
|
|
<div class="container mt-3" id="list">
|
|
|
<div class="card">
|
|
|
<div class="card-body">
|
|
|
- <form method="POST" action='{{url("waybill/{$waybill->id}")}}'>
|
|
|
+ <form method="POST" id="waybillForm" action='{{url("waybill/{$waybill->id}")}}'>
|
|
|
@csrf
|
|
|
@method('PUT')
|
|
|
<div class="form-group row">
|
|
|
<label class="col-2 col-form-label text-right text-secondary">运单类型</label>
|
|
|
<div class="col-8">
|
|
|
- <input name="type" type="text" class="form-control" readonly="true" value="{{$waybill->type}}" >
|
|
|
+ <input name="type" id="type" type="text" class="form-control" readonly="true" value="{{$waybill->type}}" >
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
@@ -243,7 +243,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
- <label for="car_owner_info" class="col-2 col-form-label text-right text-primary">车辆信息</label>
|
|
|
+ <label for="car_owner_info" class="col-2 col-form-label text-right">车辆信息</label>
|
|
|
<div class="col-8">
|
|
|
<input type="text" class="form-control"
|
|
|
name="car_owner_info" autocomplete="off" value="@if(old('car_owner_info')){{ old('car_owner_info') }}@else{{$waybill->car_owner_info}}@endif" >
|
|
|
@@ -306,7 +306,7 @@
|
|
|
<input type="hidden" name="waybillPriceModel" id="waybillPriceModel">
|
|
|
<div class="form-group row">
|
|
|
<div class="col-8 offset-2">
|
|
|
- <input type="submit" class="btn btn-outline-dark form-control">
|
|
|
+ <input type="button" @click="submitForm" class="btn btn-outline-dark form-control" value="提交">
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
@@ -386,68 +386,32 @@
|
|
|
.then(
|
|
|
function (response) {
|
|
|
if (!response.data.success) {
|
|
|
- tempTip.okWindow('该目的地与计量单位对应的计费模型不存在,如录入将会标为异常记录,请通知相关负责人添加计费模型 ');
|
|
|
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();
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
- isCarrier(e){
|
|
|
- let carrier_id=e.target.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(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
- },
|
|
|
- isDestination_city(e){
|
|
|
- let carrier_id=document.getElementById('carrier_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=e.target.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(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
- },
|
|
|
- isCarrier_weight_unit(e){
|
|
|
- let carrier_id=document.getElementById('carrier_id').value;
|
|
|
- let carrier_weight=document.getElementById('carrier_weight').value;
|
|
|
- let carrier_weight_unit_id=e.target.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(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
- },
|
|
|
- isCarrier_weight(e){
|
|
|
- let carrier_id=document.getElementById('carrier_id').value;
|
|
|
- let carrier_weight=e.target.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(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
- },
|
|
|
- isCarrier_weight_unit_id_other(e){
|
|
|
- let carrier_id=document.getElementById('carrier_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=e.target.value;
|
|
|
- this.is_waybillPriceModel(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
- },
|
|
|
- isCarrier_weight_other(e){
|
|
|
- let carrier_id=document.getElementById('carrier_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=e.target.value;
|
|
|
- let carrier_weight_unit_id_other=document.getElementById('carrier_weight_unit_id_other').value;
|
|
|
- this.is_waybillPriceModel(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
+ submitForm(){
|
|
|
+ let type=document.getElementById('type').value;
|
|
|
+ if (type==='专线'){
|
|
|
+ let carrier_id=document.getElementById('carrier_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(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other);
|
|
|
+ }else {
|
|
|
+ document.getElementById('waybillForm').submit();
|
|
|
+ }
|
|
|
},
|
|
|
origination_city_name:function (e) {
|
|
|
let _this=this;
|