|
|
@@ -120,156 +120,148 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
@if($waybill->type=="专线")
|
|
|
- <div class="form-group row">
|
|
|
- <label for="origination_city_id" class="col-2 col-form-label text-right text-primary">始发市 *</label>
|
|
|
- <div class="col-8 form-inline">
|
|
|
- <select class="form-control @error('origination_city_id') is-invalid @enderror" name="origination_city_id" :class="errors['origination_city_id'] ? 'is-invalid' :''" style="width: 30%; " v-model="waybillPriceModel.origination_city_id">
|
|
|
- <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
|
|
|
- </select>
|
|
|
- <input class="form-control-sm" placeholder="输入关键字定位" @input="origination_city_name">
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="origination_city_id" class="col-2 col-form-label text-right text-primary">始发市 *</label>
|
|
|
+ <div class="col-8 form-inline">
|
|
|
+ <select class="form-control @error('origination_city_id') is-invalid @enderror" name="origination_city_id" :class="errors['origination_city_id'] ? 'is-invalid' :''" style="width: 30%; " v-model="waybillPriceModel.origination_city_id">
|
|
|
+ <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
|
|
|
+ </select>
|
|
|
+ <input class="form-control-sm" placeholder="输入关键字定位" @input="origination_city_name">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="form-group row">
|
|
|
- <label for="destination_city_id" class="col-2 col-form-label text-right text-primary">目的市 *</label>
|
|
|
- <div class="col-8 form-inline">
|
|
|
- <select class="form-control @error('destination_city_id') is-invalid @enderror" name="destination_city_id" :class="errors['destination_city_id'] ? 'is-invalid' :''" id="destination_city_id" v-model="waybillPriceModel.destination_city_id" style="width: 30%; " >
|
|
|
- <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
|
|
|
- </select>
|
|
|
- <input class="form-control-sm" placeholder="输入关键字定位" @input="destination_city_id">
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="destination_city_id" class="col-2 col-form-label text-right text-primary">目的市 *</label>
|
|
|
+ <div class="col-8 form-inline">
|
|
|
+ <select class="form-control @error('destination_city_id') is-invalid @enderror" name="destination_city_id" :class="errors['destination_city_id'] ? 'is-invalid' :''" id="destination_city_id" v-model="waybillPriceModel.destination_city_id" style="width: 30%; " >
|
|
|
+ <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
|
|
|
+ </select>
|
|
|
+ <input class="form-control-sm" placeholder="输入关键字定位" @input="destination_city_id">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="form-group row">
|
|
|
- <label for="warehouse_weight" class="col-2 col-form-label text-right ">仓库计抛</label>
|
|
|
- <div class="col-2">
|
|
|
- <input type="text" class="form-control @error('warehouse_weight') is-invalid @enderror"
|
|
|
- name="warehouse_weight" autocomplete="off" value="@if(old('warehouse_weight')){{ old('warehouse_weight') }}@else{{$waybill->warehouse_weight}}@endif" >
|
|
|
- @error('warehouse_weight')
|
|
|
- <span class="invalid-feedback" role="alert">
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="warehouse_weight" class="col-2 col-form-label text-right ">仓库计抛</label>
|
|
|
+ <div class="col-2">
|
|
|
+ <input type="text" class="form-control @error('warehouse_weight') is-invalid @enderror"
|
|
|
+ name="warehouse_weight" autocomplete="off" value="@if(old('warehouse_weight')){{ old('warehouse_weight') }}@else{{$waybill->warehouse_weight}}@endif" >
|
|
|
+ @error('warehouse_weight')
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
<strong>{{ $message }}</strong>
|
|
|
</span>
|
|
|
- @enderror
|
|
|
- </div>
|
|
|
- <label for="warehouse_weight_unit_id" class=" col-form-label text-right ">单位:</label>
|
|
|
- <div class="col-1.5">
|
|
|
- <select class="form-control @error('warehouse_weight_unit_id') is-invalid @enderror" name="warehouse_weight_unit_id" v-model="waybillPriceModel.warehouse_weight_unit_id">
|
|
|
- @foreach($units as $unit)
|
|
|
- <option value="{{$unit->id}}">{{$unit->name}}</option>
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
+ <label for="warehouse_weight_unit_id" class=" col-form-label text-right ">单位:</label>
|
|
|
+ <div class="col-1.5">
|
|
|
+ <select class="form-control @error('warehouse_weight_unit_id') is-invalid @enderror" name="warehouse_weight_unit_id" v-model="waybillPriceModel.warehouse_weight_unit_id">
|
|
|
+ <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
|
|
|
-
|
|
|
- <label for="warehouse_weight_other" class="col-form-label text-right "> 仓库重</label>
|
|
|
- <div class="col-2">
|
|
|
- <input type="text" class="form-control @error('warehouse_weight_other') is-invalid @enderror"
|
|
|
- name="warehouse_weight_other" autocomplete="off" value="@if(old('warehouse_weight_other')){{ old('warehouse_weight_other') }}@else{{$waybill->warehouse_weight_other}}@endif" >
|
|
|
- @error('warehouse_weight_other')
|
|
|
- <span class="invalid-feedback" role="alert">
|
|
|
+
|
|
|
+ <label for="warehouse_weight_other" class="col-form-label text-right "> 仓库重</label>
|
|
|
+ <div class="col-2">
|
|
|
+ <input type="text" class="form-control @error('warehouse_weight_other') is-invalid @enderror"
|
|
|
+ name="warehouse_weight_other" autocomplete="off" value="@if(old('warehouse_weight_other')){{ old('warehouse_weight_other') }}@else{{$waybill->warehouse_weight_other}}@endif" >
|
|
|
+ @error('warehouse_weight_other')
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
<strong>{{ $message }}</strong>
|
|
|
</span>
|
|
|
- @enderror
|
|
|
- </div>
|
|
|
- <label for="warehouse_weight_unit_id_other" class=" col-form-label text-right ">单位:</label>
|
|
|
- <div class="col-1.5">
|
|
|
- <select class="form-control @error('warehouse_weight_unit_id_other') is-invalid @enderror" name="warehouse_weight_unit_id_other" v-model="waybillPriceModel.warehouse_weight_unit_id_other" >
|
|
|
- @foreach($units as $unit)
|
|
|
- <option value="{{$unit->id}}">{{$unit->name}}</option>
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
+ <label for="warehouse_weight_unit_id_other" class=" col-form-label text-right ">单位:</label>
|
|
|
+ <div class="col-1.5">
|
|
|
+ <select class="form-control @error('warehouse_weight_unit_id_other') is-invalid @enderror" name="warehouse_weight_unit_id_other" v-model="waybillPriceModel.warehouse_weight_unit_id_other" >
|
|
|
+ <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="form-group row">
|
|
|
- <label for="carrier_weight" class="col-2 col-form-label text-right ">承运商计抛</label>
|
|
|
- <div class="col-2">
|
|
|
- <input type="text" id="carrier_weight" :class="errors['carrier_weight'] ? 'is-invalid' :''" class="form-control @error('carrier_weight') is-invalid @enderror"
|
|
|
- name="carrier_weight" autocomplete="off" value="@if(old('carrier_weight')){{ old('carrier_weight') }}@else{{$waybill->carrier_weight}}@endif" >
|
|
|
- @error('carrier_weight')
|
|
|
- <span class="invalid-feedback" role="alert">
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="carrier_weight" class="col-2 col-form-label text-right ">承运商计抛</label>
|
|
|
+ <div class="col-2">
|
|
|
+ <input type="text" id="carrier_weight" :class="errors['carrier_weight'] ? 'is-invalid' :''" class="form-control @error('carrier_weight') is-invalid @enderror"
|
|
|
+ name="carrier_weight" autocomplete="off" value="@if(old('carrier_weight')){{ old('carrier_weight') }}@else{{$waybill->carrier_weight}}@endif" >
|
|
|
+ @error('carrier_weight')
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
<strong>{{ $message }}</strong>
|
|
|
</span>
|
|
|
- @enderror
|
|
|
- </div>
|
|
|
- <label for="carrier_weight_unit_id" class=" col-form-label text-right ">单位:</label>
|
|
|
- <div class="col-1.5">
|
|
|
- <select id="carrier_weight_unit_id" :class="errors['carrier_weight_unit_id'] ? 'is-invalid' :''" class="form-control @error('carrier_weight_unit_id') is-invalid @enderror" name="carrier_weight_unit_id" v-model="waybillPriceModel.carrier_weight_unit_id">
|
|
|
- @foreach($units as $unit)
|
|
|
- <option value="{{$unit->id}}">{{$unit->name}}</option>
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
+ <label for="carrier_weight_unit_id" class=" col-form-label text-right ">单位:</label>
|
|
|
+ <div class="col-1.5">
|
|
|
+ <select id="carrier_weight_unit_id" :class="errors['carrier_weight_unit_id'] ? 'is-invalid' :''" class="form-control @error('carrier_weight_unit_id') is-invalid @enderror" name="carrier_weight_unit_id" v-model="waybillPriceModel.carrier_weight_unit_id">
|
|
|
+ <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
|
|
|
-
|
|
|
- <label for="carrier_weight_other" class="col-form-label text-right ">承运商计重</label>
|
|
|
- <div class="col-2">
|
|
|
- <input type="text" id="carrier_weight_other" :class="errors['carrier_weight_other'] ? 'is-invalid' :''" class="form-control @error('carrier_weight_other') is-invalid @enderror"
|
|
|
- name="carrier_weight_other" autocomplete="off" value="@if(old('carrier_weight_other')){{ old('carrier_weight_other') }}@else{{$waybill->carrier_weight_other}}@endif" >
|
|
|
- @error('carrier_weight_other')
|
|
|
- <span class="invalid-feedback" role="alert">
|
|
|
+
|
|
|
+ <label for="carrier_weight_other" class="col-form-label text-right ">承运商计重</label>
|
|
|
+ <div class="col-2">
|
|
|
+ <input type="text" id="carrier_weight_other" :class="errors['carrier_weight_other'] ? 'is-invalid' :''" class="form-control @error('carrier_weight_other') is-invalid @enderror"
|
|
|
+ name="carrier_weight_other" autocomplete="off" value="@if(old('carrier_weight_other')){{ old('carrier_weight_other') }}@else{{$waybill->carrier_weight_other}}@endif" >
|
|
|
+ @error('carrier_weight_other')
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
<strong>{{ $message }}</strong>
|
|
|
</span>
|
|
|
- @enderror
|
|
|
- </div>
|
|
|
- <label for="carrier_weight_unit_id_other" class=" col-form-label text-right ">单位:</label>
|
|
|
- <div class="col-1.5">
|
|
|
- <select id="carrier_weight_unit_id_other" :class="errors['carrier_weight_unit_id_other'] ? 'is-invalid' :''" class="form-control @error('carrier_weight_unit_id_other') is-invalid @enderror" name="carrier_weight_unit_id_other" v-model="waybillPriceModel.carrier_weight_unit_id_other" >
|
|
|
- @foreach($units as $unit)
|
|
|
- <option value="{{$unit->id}}">{{$unit->name}}</option>
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
+ <label for="carrier_weight_unit_id_other" class=" col-form-label text-right ">单位:</label>
|
|
|
+ <div class="col-1.5">
|
|
|
+ <select id="carrier_weight_unit_id_other" :class="errors['carrier_weight_unit_id_other'] ? 'is-invalid' :''" class="form-control @error('carrier_weight_unit_id_other') is-invalid @enderror" name="carrier_weight_unit_id_other" v-model="waybillPriceModel.carrier_weight_unit_id_other" >
|
|
|
+ <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
@endif
|
|
|
@if($waybill->type=="直发车")
|
|
|
- <div class="form-group row">
|
|
|
- <label for="carType_id" class="col-2 col-form-label text-right text-primary">车型 *</label>
|
|
|
- <div class="col-8">
|
|
|
- <select class="form-control" name="carType_id" style="width: 30%;">
|
|
|
- @foreach($carTypes as $carType)
|
|
|
- @if($carType->id==$waybill->carType_id)
|
|
|
- <option value="{{$carType->id}}" selected>{{$carType->name}}@if($carType->length)({{$carType->length}}米)@endif</option>
|
|
|
- @else
|
|
|
- <option value="{{$carType->id}}">{{$carType->name}}@if($carType->length)({{$carType->length}}米)@endif</option>
|
|
|
- @endif
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="carType_id" class="col-2 col-form-label text-right text-primary">车型 *</label>
|
|
|
+ <div class="col-8">
|
|
|
+ <select class="form-control" name="carType_id" style="width: 30%;">
|
|
|
+ @foreach($carTypes as $carType)
|
|
|
+ @if($carType->id==$waybill->carType_id)
|
|
|
+ <option value="{{$carType->id}}" selected>{{$carType->name}}@if($carType->length)({{$carType->length}}米)@endif</option>
|
|
|
+ @else
|
|
|
+ <option value="{{$carType->id}}">{{$carType->name}}@if($carType->length)({{$carType->length}}米)@endif</option>
|
|
|
+ @endif
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="form-group row">
|
|
|
- <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" >
|
|
|
+ <div class="form-group row">
|
|
|
+ <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" >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
@endif
|
|
|
@if($waybill->type=="直发车")
|
|
|
- <div class="form-group row">
|
|
|
- <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" >
|
|
|
- @error('fee')
|
|
|
- <span class="invalid-feedback" role="alert">
|
|
|
+ <div class="form-group row">
|
|
|
+ <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" >
|
|
|
+ @error('fee')
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
<strong>{{ $message }}</strong>
|
|
|
</span>
|
|
|
- @enderror
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
@endif
|
|
|
@if($waybill->type=="专线")
|
|
|
- <div class="form-group row">
|
|
|
- <label for="pick_up_fee" class="col-2 col-form-label text-right">提货费(元)</label>
|
|
|
- <div class="col-8">
|
|
|
- <input type="text" class="form-control @error('pick_up_fee') is-invalid @enderror"
|
|
|
- name="pick_up_fee" autocomplete="off" value="@if(old('pick_up_fee')){{ old('pick_up_fee') }}@else{{$waybill->pick_up_fee}}@endif" >
|
|
|
- @error('pick_up_fee')
|
|
|
- <span class="invalid-feedback" role="alert">
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="pick_up_fee" class="col-2 col-form-label text-right">提货费(元)</label>
|
|
|
+ <div class="col-8">
|
|
|
+ <input type="text" class="form-control @error('pick_up_fee') is-invalid @enderror"
|
|
|
+ name="pick_up_fee" autocomplete="off" value="@if(old('pick_up_fee')){{ old('pick_up_fee') }}@else{{$waybill->pick_up_fee}}@endif" >
|
|
|
+ @error('pick_up_fee')
|
|
|
+ <span class="invalid-feedback" role="alert">
|
|
|
<strong>{{ $message }}</strong>
|
|
|
</span>
|
|
|
- @enderror
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
@endif
|
|
|
<div class="form-group row">
|
|
|
<label for="other_fee" class="col-2 col-form-label text-right text-muted">其他费用(元)</label>
|
|
|
@@ -323,68 +315,111 @@
|
|
|
warehouse_weight_unit_id_other:'{{old('warehouse_weight_unit_id_other')?old('warehouse_weight_unit_id_other'):$waybill->warehouse_weight_unit_id_other}}',
|
|
|
},
|
|
|
cities:[
|
|
|
- @foreach($cities as $city)
|
|
|
- {
|
|
|
- id:'{{$city->id}}',name:'{{$city->name}}'
|
|
|
- },
|
|
|
+ @foreach($cities as $city)
|
|
|
+ {
|
|
|
+ id:'{{$city->id}}',name:'{{$city->name}}'
|
|
|
+ },
|
|
|
+ @endforeach
|
|
|
+ ],
|
|
|
+ units:[
|
|
|
+ @foreach($units as $unit){
|
|
|
+ id:'{{$unit->id}}',name:'{{$unit->name}}',
|
|
|
+ },
|
|
|
@endforeach
|
|
|
],
|
|
|
errors:[],
|
|
|
origination:'{{$waybill->origination}}',
|
|
|
},
|
|
|
mounted:function(){
|
|
|
- if (!this.origination){
|
|
|
- $("#btn").removeAttr("hidden");
|
|
|
- $("#ordering_remark").after($("#origination"));
|
|
|
- $("#origination_seek").attr("disabled",false);
|
|
|
- }
|
|
|
- if (!this.waybillPriceModel.origination_city_id){
|
|
|
- let _this=this;
|
|
|
- this.cities.every(function (city) {
|
|
|
- if (city.name=="上海"){
|
|
|
- _this.waybillPriceModel.origination_city_id=city.id;
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- }
|
|
|
+ let _this=this;
|
|
|
+ if (!this.waybillPriceModel.carrier_weight_unit_id_other){
|
|
|
+ this.units.every(function (unit) {
|
|
|
+ if (unit.name=="kg"){
|
|
|
+ _this.waybillPriceModel.carrier_weight_unit_id_other=unit.id;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (!this.waybillPriceModel.carrier_weight_unit_id){
|
|
|
+ this.units.every(function (unit) {
|
|
|
+ if (unit.name=="m3"){
|
|
|
+ _this.waybillPriceModel.carrier_weight_unit_id=unit.id;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (!this.waybillPriceModel.warehouse_weight_unit_id_other){
|
|
|
+ this.units.every(function (unit) {
|
|
|
+ if (unit.name=="kg"){
|
|
|
+ _this.waybillPriceModel.warehouse_weight_unit_id_other=unit.id;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (!this.waybillPriceModel.warehouse_weight_unit_id){
|
|
|
+ this.units.every(function (unit) {
|
|
|
+ if (unit.name=="m3"){
|
|
|
+ _this.waybillPriceModel.warehouse_weight_unit_id=unit.id;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (!this.origination){
|
|
|
+ $("#btn").removeAttr("hidden");
|
|
|
+ $("#ordering_remark").after($("#origination"));
|
|
|
+ $("#origination_seek").attr("disabled",false);
|
|
|
+ }
|
|
|
+ if (!this.waybillPriceModel.origination_city_id){
|
|
|
+ let _this=this;
|
|
|
+ this.cities.every(function (city) {
|
|
|
+ if (city.name=="上海"){
|
|
|
+ _this.waybillPriceModel.origination_city_id=city.id;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }
|
|
|
/*将地址转换为市区,赋给data*/
|
|
|
- if (!this.waybillPriceModel.origination_city_id){
|
|
|
- let origination=document.getElementById('origination_seek').value;
|
|
|
- let str;
|
|
|
- let origination_id;
|
|
|
- if (origination){
|
|
|
- let arr=origination.split("");
|
|
|
- for (i=0;i<arr.length;i++){
|
|
|
- this.cities.some(function (city) {
|
|
|
- if (city.name.includes(str)){ origination_id=city.id; return true;}
|
|
|
- str=arr[i]+arr[i+1];
|
|
|
- });
|
|
|
- if (origination_id) {break;}
|
|
|
- }
|
|
|
+ if (!this.waybillPriceModel.origination_city_id){
|
|
|
+ let origination=document.getElementById('origination_seek').value;
|
|
|
+ let str;
|
|
|
+ let origination_id;
|
|
|
+ if (origination){
|
|
|
+ let arr=origination.split("");
|
|
|
+ for (i=0;i<arr.length;i++){
|
|
|
+ this.cities.some(function (city) {
|
|
|
+ if (city.name.includes(str)){ origination_id=city.id; return true;}
|
|
|
+ str=arr[i]+arr[i+1];
|
|
|
+ });
|
|
|
+ if (origination_id) {break;}
|
|
|
}
|
|
|
- this.waybillPriceModel.origination_city_id=origination_id;
|
|
|
}
|
|
|
- if (!this.waybillPriceModel.destination_city_id) {
|
|
|
- let destination=document.getElementById('destination_seek').value;
|
|
|
- let strDestination;
|
|
|
- let destination_id;
|
|
|
- if (destination){
|
|
|
- let arr=destination.split("");
|
|
|
- for (i=0;i<arr.length;i++){
|
|
|
- this.cities.some(function (city) {
|
|
|
- if (city.name.includes(strDestination)){ destination_id=city.id; return true;}
|
|
|
- strDestination=arr[i]+arr[i+1];
|
|
|
- });
|
|
|
- if (destination_id) {break;}
|
|
|
- }
|
|
|
+ this.waybillPriceModel.origination_city_id=origination_id;
|
|
|
+ }
|
|
|
+ if (!this.waybillPriceModel.destination_city_id) {
|
|
|
+ let destination=document.getElementById('destination_seek').value;
|
|
|
+ let strDestination;
|
|
|
+ let destination_id;
|
|
|
+ if (destination){
|
|
|
+ let arr=destination.split("");
|
|
|
+ for (i=0;i<arr.length;i++){
|
|
|
+ this.cities.some(function (city) {
|
|
|
+ if (city.name.includes(strDestination)){ destination_id=city.id; return true;}
|
|
|
+ strDestination=arr[i]+arr[i+1];
|
|
|
+ });
|
|
|
+ if (destination_id) {break;}
|
|
|
}
|
|
|
- this.waybillPriceModel.destination_city_id=destination_id;
|
|
|
}
|
|
|
+ this.waybillPriceModel.destination_city_id=destination_id;
|
|
|
+ }
|
|
|
},
|
|
|
methods:{
|
|
|
{{--计费模型阶段保留--}}
|
|
|
- is_waybillPriceModel(carrier_id,carrier_weight,carrier_weight_unit_id,destination_city_id,carrier_weight_other,carrier_weight_unit_id_other){
|
|
|
+ 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')}}';
|
|
|
let _this=this;
|
|
|
@@ -396,9 +431,9 @@
|
|
|
if (!response.data.success) {
|
|
|
document.getElementById('waybillPriceModel').value='';
|
|
|
tempTip.confirm('该目的地与计量单位对应的计费模型不存在,如录入将会标为异常记录,请通知相关负责人添加计费模型,点击'+'<b class="text-primary">"确定"</b>'+'则确认提交 ',
|
|
|
- function () {
|
|
|
+ function () {
|
|
|
document.getElementById('waybillForm').submit();
|
|
|
- });
|
|
|
+ });
|
|
|
}else{
|
|
|
document.getElementById('waybillPriceModel').value=response.data.success;
|
|
|
document.getElementById('waybillForm').submit();
|
|
|
@@ -425,11 +460,11 @@
|
|
|
let $val=e.target.value;
|
|
|
if($val==='')_this.waybillPriceModel.origination_city_id='';
|
|
|
else
|
|
|
- _this.cities.forEach(function (city) {
|
|
|
- if (city.name.includes($val)){
|
|
|
- _this.waybillPriceModel.origination_city_id=city.id;
|
|
|
- }
|
|
|
- });
|
|
|
+ _this.cities.forEach(function (city) {
|
|
|
+ if (city.name.includes($val)){
|
|
|
+ _this.waybillPriceModel.origination_city_id=city.id;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
destination_city_id:function (e) {
|
|
|
@@ -437,11 +472,11 @@
|
|
|
let $val=e.target.value;
|
|
|
if($val==='')_this.waybillPriceModel.destination_city_id='';
|
|
|
else
|
|
|
- _this.cities.forEach(function (city) {
|
|
|
- if (city.name.includes($val)){
|
|
|
- _this.waybillPriceModel.destination_city_id=city.id;
|
|
|
- }
|
|
|
- });
|
|
|
+ _this.cities.forEach(function (city) {
|
|
|
+ if (city.name.includes($val)){
|
|
|
+ _this.waybillPriceModel.destination_city_id=city.id;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
});
|