|
|
@@ -9,6 +9,24 @@
|
|
|
@endcomponent
|
|
|
</div>
|
|
|
<div class="container-fluid" id="list">
|
|
|
+ <div class="modal fade" tabindex="-1" role="dialog" id="selectedProvince">
|
|
|
+ <div class="modal-dialog modal-lg modal-dialog-centered">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <b>选择省份</b>
|
|
|
+ <button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
+ </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>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-success pull-right" @click="addCounty()">录入</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="card">
|
|
|
<div class="card-body">
|
|
|
<form method="POST" id="waybillForm" action='{{url("waybill/".$waybill->id)}}'>
|
|
|
@@ -173,7 +191,7 @@
|
|
|
</select>
|
|
|
<input v-if="!waybill.order_id" type="text" class="form-control-sm form-control tooltipTarget" style="vertical-align: middle"
|
|
|
placeholder="输入关键字定位" @input="destination_city_id" v-model="waybill.destination_city" id="destination_city" title="若无法显示区/县级市,可点击后方按钮手动添加" >
|
|
|
- <button v-if="!waybill.order_id" type="button" class="btn btn-outline-info btn-sm" @click="addCounty()" style="transform: scale(0.9)">添加市/县</button>
|
|
|
+ <button v-if="!waybill.order_id" type="button" class="btn btn-outline-info btn-sm" @click="selectedProvince()" style="transform: scale(0.9)">添加城市</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -434,9 +452,11 @@
|
|
|
carrier_weight_other:'{{$waybill->carrier_weight_other}}',
|
|
|
carrier_weight_unit_id_other:'{{$waybill->carrier_weight_unit_id_other}}',
|
|
|
pick_up_fee:'{{$waybill->pick_up_fee}}',
|
|
|
+ province:"",
|
|
|
},
|
|
|
order:{!! $waybill->order ?? '{}' !!},
|
|
|
- waybillTemp:{!! $waybill !!}
|
|
|
+ waybillTemp:{!! $waybill !!},
|
|
|
+ provinces : [],
|
|
|
},
|
|
|
mounted:function(){
|
|
|
let _this=this;
|
|
|
@@ -606,19 +626,27 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- addCounty:function () {
|
|
|
+ selectedProvince(){
|
|
|
if (this.waybill.order_id)return;
|
|
|
if (!this.waybill.destination_city) {
|
|
|
window.tempTip.setDuration(2000);
|
|
|
window.tempTip.show('您未输入市/县!');
|
|
|
return;
|
|
|
}
|
|
|
- window.tempTip.postBasicRequest("{{url('waybill/addCounty')}}",{name:this.waybill.destination_city},res=>{
|
|
|
+ window.tempTip.postBasicRequest("{{url('maintenance/region/getProvinces')}}",{},res=>{
|
|
|
+ this.provinces = res;
|
|
|
+ $("#selectedProvince").modal("show");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addCounty:function () {
|
|
|
+ window.tempTip.postBasicRequest("{{url('waybill/addCounty')}}",
|
|
|
+ {name:this.waybill.destination_city,province:this.waybill.province},res=>{
|
|
|
this.cities.push({
|
|
|
id:res.id,
|
|
|
name:res.name,
|
|
|
});
|
|
|
this.waybill.destination_city_id = res.id;
|
|
|
+ $("#selectedProvince").modal("hide");
|
|
|
});
|
|
|
}
|
|
|
},
|