瀏覽代碼

运单单位及按钮样式等

haozi 6 年之前
父節點
當前提交
ee237f198f

+ 14 - 0
app/Http/Controllers/WaybillsController.php

@@ -217,7 +217,21 @@ class WaybillsController extends Controller
     {
         if(!Gate::allows('运输管理-调度')){ return redirect(url('/'));  }
         $waybill=Waybill::find($id);
+
+        if (!$waybill['warehouse_weight']&&$waybill['warehouse_weight_unit_id']){
+                    unset($waybill['warehouse_weight_unit_id']);
+        }
+        if (!$waybill['warehouse_weight_other']&&$waybill['warehouse_weight_unit_id_other']){
+                    unset($waybill['warehouse_weight_unit_id_other']);
+        }
+        if (!$waybill['carrier_weight']&&$waybill['carrier_weight_unit_id']){
+                    unset($waybill['carrier_weight_unit_id']);
+        }
+        if (!$waybill['carrier_weight_other']&&$waybill['carrier_weight_unit_id_other']){
+                    unset($waybill['carrier_weight_unit_id_other']);
+        }
         $this->validatorWaybillDispatch($request,$id)->validate();
+
         $data=$request->input();
 
         $waybill->fill($data);

+ 0 - 0
resources/icon/favicon.ico → resources/icon/faviconb.ico


+ 1 - 1
resources/views/layouts/app.blade.php

@@ -3,7 +3,7 @@
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link rel="icon" href="{{asset('favicon.ico')}}" type="image/x-icon"/>
+    <link rel="icon" href="{{asset('icon/faviconb.ico')}}" type="image/x-icon"/>
     <!-- CSRF Token -->
     <meta name="csrf-token" content="{{ csrf_token() }}">
 

+ 4 - 4
resources/views/personnel/checking-in/menuChecking-in.blade.php

@@ -1,13 +1,13 @@
 <div class="container-fluid">
     <div class="card menu-third" style="background: #f9f0f0;transform: scale(0.95)">
         <ul class="nav nav-pills">
-                @can('人事管理-录入补卡')
+                @can('人事管理-获取二维码')
                 <li class="nav-item">
-                    <a class="nav-link text-dark" href="{{url('personnel/checking-in/createReplenishClock')}}" :class="{active:isActive('createReplenishClock',3)}">录入补卡</a>
+                    <a class="nav-link text-dark" href="{{url('personnel/checking-in/userDutyCheck/goGetQRCode')}}" :class="{active:isActive('goGetQRCode',4)}">打卡</a>
                 </li>@endcan
-                @can('人事管理-获取二维码')
+                @can('人事管理-录入补卡')
                 <li class="nav-item">
-                    <a class="nav-link text-dark" href="{{url('personnel/checking-in/userDutyCheck/goGetQRCode')}}" :class="{active:isActive('goGetQRCode',4)}">获取二维码</a>
+                    <a class="nav-link text-dark" href="{{url('personnel/checking-in/createReplenishClock')}}" :class="{active:isActive('createReplenishClock',3)}">录入补卡</a>
                 </li>@endcan
                 @can('人事管理')
                 <li class="nav-item">

+ 3 - 3
resources/views/waybill/create.blade.php

@@ -54,9 +54,9 @@
                         </div>
                     </div>
                     <div class="col-8" style="margin-left: 15%">
-                        <button type="button" class="btn btn-outline-primary btn-sm" @click="origination='上海市松江区泗砖仓'" style="transform: scale(0.9)">松江泗砖仓</button>
-                        <button type="button" class="btn btn-outline-primary btn-sm" @click="origination='上海市松江区九干仓'" style="transform: scale(0.9)">松江九干仓</button>
-                        <button type="button" class="btn btn-outline-primary btn-sm" @click="origination='上海市嘉定区武乡仓'" style="transform: scale(0.9)">嘉定武乡仓</button>
+                        <button type="button" class="btn btn-outline-primary btn-sm" @click="origination='松江区泗砖仓'" style="transform: scale(0.9)">松江泗砖仓</button>
+                        <button type="button" class="btn btn-outline-primary btn-sm" @click="origination='松江区九干仓'" style="transform: scale(0.9)">松江九干仓</button>
+                        <button type="button" class="btn btn-outline-primary btn-sm" @click="origination='嘉定区武乡仓'" style="transform: scale(0.9)">嘉定武乡仓</button>
                     </div>
                     <div class="form-group row">
                         <label for="origination" class="col-2 col-form-label text-right text-primary">始发地址 *</label>

+ 217 - 182
resources/views/waybill/edit.blade.php

@@ -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>
 
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <label for="warehouse_weight_other" class="col-form-label text-right ">&nbsp;&nbsp;&nbsp;仓库重</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">
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <label for="warehouse_weight_other" class="col-form-label text-right ">&nbsp;&nbsp;&nbsp;仓库重</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>
 
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <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">
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <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;
+                            }
+                        });
                 },
             },
         });

+ 1 - 1
webpack.mix.js

@@ -17,4 +17,4 @@ mix.js('resources/js/singles/rejectedIndex.js', 'public/js/singles/rejectedIndex
 mix.copy('resources/sass/fonts/','public/fonts');
 mix.copy('resources/icon','public/icon');
 mix.copy('resources/images','public/images');
-mix.copy('resources/icon/favicon.ico','public/favicon.ico');
+mix.copy('resources/icon/faviconb.ico','public/faviconb.ico');