Explorar o código

运输管理-页面样式部分调整,运单合并功能

Zhouzhendong %!s(int64=4) %!d(string=hai) anos
pai
achega
7f96fa9269

+ 2 - 1
app/Http/Controllers/TestController.php

@@ -148,7 +148,8 @@ class TestController extends Controller
     }
     public function test()
     {
-        dd(app("MaterialBoxService")->getBoxLocation(\request("ide")));
+        dd(Cache::flush());
+        dd(Waybill::query()->withTrashed()->with("order")->orderBy("order_id")->get());
     }
     public function orderCreateBill()
     {

+ 1 - 1
app/Http/Controllers/UnitController.php

@@ -34,7 +34,7 @@ class UnitController extends Controller
 
         $obj = ["name"=>request("name"),"sequence"=>request("sequence") ?? 0];
         if (request("id")){
-            Unit::query()->update($obj);
+            Unit::query()->where("id",request("id"))->update($obj);
             $this->success();
         }
         $this->success(Unit::query()->create($obj));

+ 41 - 0
app/Http/Controllers/WaybillController.php

@@ -1001,4 +1001,45 @@ class WaybillController extends Controller
         return ['success'=>true,'data'=>$total_pick_up_fee];
     }
 
+    /**
+     * 运单合并
+     */
+    public function waybillMerge(Request $request)
+    {
+        $this->gate("运输管理-编辑");
+        $ids = $request->input("ids");
+        if (!$ids || count($ids)<2)$this->error("至少选择两条记录");
+        /** @var Collection $waybills */
+        $waybills = Waybill::query()->with("order")->whereIn("id",$ids)->orderBy("order_id")->get();
+        if ($waybills->count()<2)$this->error("运单不存在");
+        $waybill = $waybills->first();
+        $destroys = [];
+        for ($i=1;$i<$waybills->count();$i++){
+            //信息一致性校验
+            $identical = ($waybill->order && ($waybills[$i]->order->consignee_name!=$waybill->order->consignee_name
+                        || $waybills[$i]->order->consignee_phone!=$waybill->order->consignee_phone
+                        || $waybills[$i]->order->address!=$waybill->order->address)) ||
+                (!$waybill->order && ($waybills[$i]->recipient!=$waybill->recipient
+                    || $waybills[$i]->recipient_mobile!=$waybill->recipient_mobile
+                    || $waybills[$i]->destination!=$waybill->destination));
+            if (array_search($waybills[$i]->status,["未审核","已审核"])===false
+                || $identical)$this->error("信息不一致,无法进行合并");
+            $destroys[] = $waybills[$i]->id;
+            $waybill->source_bill .= $waybills[$i]->source_bill ? ",".$waybills[$i]->source_bill : '';
+            $waybill->wms_bill_number .= $waybills[$i]->wms_bill_number ? ",".$waybills[$i]->wms_bill_number : '';
+            $waybill->charge += (double)$waybills[$i]->charge;
+            $waybill->collect_fee += (double)$waybills[$i]->collect_fee;
+            $waybill->other_fee += (double)$waybills[$i]->other_fee;
+            $waybill->warehouse_weight_other += (double)$waybills[$i]->warehouse_weight_other;
+            $waybill->warehouse_weight += (double)$waybills[$i]->warehouse_weight;
+        }
+        $waybill->update();
+        Waybill::destroy($destroys);
+        WaybillAuditLog::query()->create([
+            'waybill_id'=>$waybill->id,
+            'audit_stage'=>'合并运单',
+            'user_id'=>Auth::id(),
+        ]);
+        $this->success($waybill->waybill_number);
+    }
 }

+ 0 - 4
app/Services/InventoryAccountService.php

@@ -4,14 +4,11 @@
 namespace App\Services;
 
 use App\Commodity;
-use App\Http\Controllers\CommodityController;
 use App\Http\Controllers\Controller;
 use App\InventoryAccount;
 use App\InventoryAccountMission;
-use App\OraccleBasCustomer;
 use App\OracleBasSKU;
 use App\OracleInvLotAtt;
-use App\OracleBasCustomer;
 use App\OracleInvLotLocId;
 use App\Owner;
 use App\Services\common\BatchUpdateService;
@@ -19,7 +16,6 @@ use App\Services\common\QueryService;
 use Carbon\Carbon;
 use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\DB;
-use function GuzzleHttp\Psr7\_parse_message;
 use App\Traits\ServiceAppAop;
 
 

+ 4 - 0
app/Services/StorageService.php

@@ -64,6 +64,10 @@ class StorageService
         DB::beginTransaction();
         try{
             $storage = Storage::query()->where("material_box_id",$stationTaskMaterialBox->material_box_id)->lockForUpdate()->first();
+            Storage::query()->where("station_id",$stationTaskMaterialBox->station_id)->where("status",0)
+                ->whereNotNull("material_box_id")->update(["station_id"=>null]);
+            Storage::query()->where("station_id",$stationTaskMaterialBox->station_id)->where("status",0)
+                ->whereNull("material_box_id")->delete();
             if ($storage)$storage->update(["station_id"=>$stationTaskMaterialBox->station_id,'status'=>0]);
             else Storage::query()->create([
                 "station_id" => $stationTaskMaterialBox->station_id,

+ 333 - 357
resources/views/transport/waybill/edit.blade.php

@@ -25,401 +25,377 @@
                 <form method="POST" id="waybillForm" action='{{url("transport/waybill/".$waybill->id)}}'>
                     @csrf
                     @method('PUT')
-                    <div class="form-group row">
-                        <label for="type" class="col-2 col-form-label text-right text-secondary">运单类型</label>
-                        <div class="col-8">
-                            <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>
+                    <div class="row">
+                        <div class="col-6">
+                            {{--编辑区--}}
+                            <div class="form-group row">
+                                <label for="type" class="col-2 col-form-label text-right text-secondary">运单类型</label>
+                                <div class="col-8">
+                                    <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>
+                                    </div>
+                                    <input name="type" id="type" :value="waybill.type" hidden>
+                                </div>
                             </div>
-                            <input name="type" id="type" :value="waybill.type" hidden>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="waybill_number" class="col-2 col-form-label text-right text-secondary">运单号</label>
-                        <div class="col-8">
-                            <input id="waybill_number" type="text" class="form-control" disabled="disabled" :value="waybill.waybill_number" >
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label class="col-2 col-form-label text-right text-secondary">货主</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control" disabled="disabled" :value="waybill.owner_name" >
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label class="col-2 col-form-label text-right text-secondary">WMS单号</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control" disabled="disabled" :value="waybill.wms_bill_number" >
-                        </div>
-                    </div>
-                    <div id="origination">
-                        <div class="col-8" style="margin-left: 15%" id="btn" hidden>
-                            <button type="button" class="btn btn-outline-primary btn-sm" @click="waybill.origination='上海市松江区泗砖仓'" style="transform: scale(0.9)">松江泗砖仓</button>
-                            <button type="button" class="btn btn-outline-primary btn-sm" @click="waybill.origination='上海市松江区九干仓'" style="transform: scale(0.9)">松江九干仓</button>
-                            <button type="button" class="btn btn-outline-primary btn-sm" @click="waybill.origination='上海市嘉定区武乡仓'" style="transform: scale(0.9)">嘉定武乡仓</button>
-                        </div>
-                        <div class="form-group row">
-                            <label  class="col-2 col-form-label text-right text-secondary" for="origination_seek">始发地</label>
-                            <div class="col-8">
-                                <input type="text" class="form-control @error('origination') is-invalid @enderror"
-                                       id="origination_seek" name="origination" disabled="disabled" v-model="waybill.origination">
-                            </div>
-                            @error('origination')
-                            <span class="invalid-feedback" role="alert">
-                                    <strong>{{ $message }}</strong>
-                            </span>
-                            @enderror
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label class="col-2 col-form-label text-right text-secondary" for="destination_seek">目的地</label>
-                        <div class="col-8">
-                            <input id="destination_seek" type="text" class="form-control" disabled="disabled" :value="waybill.destination" >
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label class="col-2 col-form-label text-right text-secondary">收件人</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control" disabled="disabled" :value="waybill.recipient" >
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label class="col-2 col-form-label text-right text-secondary">收件人电话</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control" disabled="disabled" :value="waybill.recipient_mobile" >
-                        </div>
-                    </div>
-                    <div class="form-group row" id="ordering_remark">
-                        <label class="col-2 col-form-label text-right text-secondary">下单备注</label>
-                        <div class="col-8">
-                            <textarea class="form-control" disabled="disabled" >@{{waybill.ordering_remark}}</textarea>
-                        </div>
-                    </div>
-                    {{--编辑区--}}
-                    <div class="form-group row">
-                        <label for="other_charge_remark" class="col-2 col-form-label text-right text-muted">其他收费备注</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control" id="other_charge_remark"
-                                   name="other_charge_remark" autocomplete="off" value="@if(old('other_charge_remark')){{ old('other_charge_remark') }}@else{{$waybill->other_charge_remark}}@endif"  >
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="charge" class="col-2 col-form-label text-right text-secondary">运输收费(元)</label>
-                        <div class="col-3">
-                            <input type="number" step="0.01" min="0" class="form-control @error('charge') is-invalid @enderror"
-                                   id="charge" name="charge" v-model="waybill.charge" >
-                        </div>
-                        <label for="other_charge" class="col-2 col-form-label text-right text-muted">其他收费(元)</label>
-                        <div class="col-3">
-                            <input id="other_charge" type="number" step="0.01" class="form-control @error('other_charge') is-invalid @enderror"
-                                   name="other_charge" autocomplete="off" value="@if(old('other_charge')){{ old('other_charge') }}@else{{$waybill->other_charge}}@endif"  >
-                        </div>
-                        @error('charge')
-                        <span class="invalid-feedback" role="alert">
-                            <strong>{{ $message }}</strong>
-                        </span>
-                        @enderror
-                        @error('other_charge')
-                        <span class="invalid-feedback" role="alert">
-                            <strong>{{ $message }}</strong>
-                        </span>
-                        @enderror
-                    </div>
-
-                    <div class="form-group row" style="margin-bottom: 20px">
-                        <label for="logistic_id" class="col-2 col-form-label text-right text-primary">承运商 *</label>
-                        <div class="col-3" style="position: relative">
-                            <select class="form-control @error('logistic_id') is-invalid @enderror" id="logistic_id" style="width: 30%; " name="logistic_id"
-                                    :class="errors['logistic_id'] ? 'is-invalid' :''"  v-model="waybill.logistic_id">
-                                <option v-for="logistic in logistics" :value="logistic.id">@{{logistic.name}}</option>
-                            </select>
-                        </div>
-                        <label for="carrier_bill" class="col-2 col-form-label text-right">承运商单号</label>
-                        <div class="col-3">
-                            <input type="text" class="form-control @error('carrier_bill') is-invalid @enderror"
-                                   name="carrier_bill" autocomplete="off" v-model="waybill.carrier_bill"  id="carrier_bill">
-                        </div>
-                        <div v-if="errors['logistic_id'] && errors['logistic_id'].length>0" class="invalid-feedback" role="alert" style="position: relative">
-                            <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 class="form-group row">
-                            <label for="" class="col-2 col-form-label text-right text-primary">货物名称 *</label>
-                            <div class="col-2">
-                                <input type="text" class="form-control @error('cargo_name') is-invalid @enderror "
-                                       :class="errors['cargo_name'] ? 'is-invalid' :''"
-                                name="cargo_name" autocomplete="off" v-model="waybill.cargo_name" id="cargo_name">
-                                @error('cargo_name')
+                            <div class="form-group row">
+                                <label for="charge" class="col-2 col-form-label text-right text-secondary">运输收费(元)</label>
+                                <div class="col-3">
+                                    <input type="number" step="0.01" min="0" class="form-control @error('charge') is-invalid @enderror"
+                                           id="charge" name="charge" v-model="waybill.charge" >
+                                </div>
+                                <label for="mileage" class="col-2 col-form-label text-right text-muted">里程数</label>
+                                <div class="input-group col-4">
+                                    <input type="number" step="0.01" class="form-control @error('mileage') is-invalid @enderror"
+                                           name="mileage" autocomplete="off" v-model="waybill.mileage" id="mileage" >
+                                    <div class="input-group-append">
+                                        <span class="input-group-text">KM</span>
+                                    </div>
+                                </div>
+                                @error('charge')
                                 <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-2">
-                                <input type="number" class="form-control @error('total_number') is-invalid @enderror "
-                                       :class="errors['total_number'] ? 'is-invalid' :''"
-                                       name="total_number" autocomplete="off" v-model="waybill.total_number" id="total_number">
-                                @error('total_number')
+                            <div class="form-group row">
+                                <label for="other_charge" class="col-2 col-form-label text-right text-muted">其他收费(元)</label>
+                                <div class="col-3">
+                                    <input id="other_charge" type="number" step="0.01" class="form-control @error('other_charge') is-invalid @enderror"
+                                           name="other_charge" autocomplete="off" value="@if(old('other_charge')){{ old('other_charge') }}@else{{$waybill->other_charge}}@endif"  >
+                                </div>
+                                <label for="other_charge_remark" class="col-2 col-form-label text-right text-muted">其他收费备注</label>
+                                <div class="col-4">
+                                    <input type="text" class="form-control" id="other_charge_remark"
+                                           name="other_charge_remark" autocomplete="off" value="@if(old('other_charge_remark')){{ old('other_charge_remark') }}@else{{$waybill->other_charge_remark}}@endif"  >
+                                </div>
+                                @error('other_charge')
                                 <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">总重量(kg) *</label>
-                            <div class="col-2">
-                                <input type="number" class="form-control @error('total_weight') is-invalid @enderror "
-                                       :class="errors['total_weight'] ? 'is-invalid' :''"
-                                       name="total_weight" autocomplete="off" v-model="waybill.total_weight" id="total_weight">
-                                @error('total_weight')
-                                <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-6">
-                                <select class="form-control col-4 @error('deliveryType_id') is-invalid @enderror" name="deliveryType_id"
-                                        :class="errors['deliveryType_id'] ? 'is-invalid' :''"
-                                        style="width: 30%;"   v-model="waybill.deliveryType_id" id="deliveryType_id">
-                                    <option v-for="deliveryType in deliveryTypes" :value="deliveryType.id">@{{ deliveryType.name }}</option>
-                                </select>
-                                @error('deliveryType_id')
-                                <span class="invalid-feedback" role="alert">
-                                    <strong>{{ $message }}</strong>
-                                </span>
-                                @enderror
+                            <div class="form-group row" style="margin-bottom: 20px">
+                                <label for="logistic_id" class="col-2 col-form-label text-right text-primary">承运商 *</label>
+                                <div class="col-3" style="position: relative">
+                                    <select class="form-control @error('logistic_id') is-invalid @enderror" id="logistic_id" name="logistic_id"
+                                            :class="errors['logistic_id'] ? 'is-invalid' :''"  v-model="waybill.logistic_id">
+                                        <option v-for="logistic in logistics" :value="logistic.id">@{{logistic.name}}</option>
+                                    </select>
+                                </div>
+                                <label for="carrier_bill" class="col-2 col-form-label text-right">承运商单号</label>
+                                <div class="col-4">
+                                    <input type="text" class="form-control @error('carrier_bill') is-invalid @enderror"
+                                           name="carrier_bill" autocomplete="off" v-model="waybill.carrier_bill"  id="carrier_bill">
+                                </div>
+                                <div v-if="errors['logistic_id'] && errors['logistic_id'].length>0" class="invalid-feedback" role="alert" style="position: relative">
+                                    <strong class="">@{{ errors['logistic_id'][0] }}</strong>
+                                </div>
                             </div>
-                        </div>
-                    </div>
-                    <div v-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="waybill.origination_city_id" id="origination_city_id">
-                                    <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
-                                </select>
-                                <input class="form-control-sm form-control" placeholder="输入关键字定位" @input="origination_city_name">
+                            <div v-if="waybill.logistic_id == 14 ||  waybill.logistic_id == 15 || waybill.logistic_id == 28 || waybill.logistic_id == 29">
+                                <div class="form-group row">
+                                    <label for="cargo_name" class="col-2 col-form-label text-right text-primary">货物名称 *</label>
+                                    <div class="col-3">
+                                        <input type="text" class="form-control @error('cargo_name') is-invalid @enderror "
+                                               :class="errors['cargo_name'] ? 'is-invalid' :''"
+                                               name="cargo_name" autocomplete="off" v-model="waybill.cargo_name" id="cargo_name">
+                                    </div>
+                                    <label for="total_number" class="col-2 col-form-label text-right text-primary">总包裹数 *</label>
+                                    <div class="input-group col-4">
+                                        <input type="number" class="form-control @error('total_number') is-invalid @enderror "
+                                               :class="errors['total_number'] ? 'is-invalid' :''"
+                                               name="total_number" autocomplete="off" v-model="waybill.total_number" id="total_number">
+                                        <div class="input-group-append">
+                                            <span class="input-group-text">件</span>
+                                        </div>
+                                    </div>
+                                    @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="total_weight" class="col-2 col-form-label text-right text-primary">总重量(kg) *</label>
+                                    <div class="col-3">
+                                        <input type="number" class="form-control @error('total_weight') is-invalid @enderror "
+                                               :class="errors['total_weight'] ? 'is-invalid' :''"
+                                               name="total_weight" autocomplete="off" v-model="waybill.total_weight" id="total_weight">
+                                    </div>
+                                    <label for="deliveryType_id" class="col-2 col-form-label text-right text-primary">送货方式 *</label>
+                                    <div class="col-4">
+                                        <select class="form-control @error('deliveryType_id') is-invalid @enderror" name="deliveryType_id"
+                                                :class="errors['deliveryType_id'] ? 'is-invalid' :''"
+                                                style="width: 30%;"   v-model="waybill.deliveryType_id" id="deliveryType_id">
+                                            <option v-for="deliveryType in deliveryTypes" :value="deliveryType.id">@{{ deliveryType.name }}</option>
+                                        </select>
+                                    </div>
+                                    @error('total_weight')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
+                                    @error('deliveryType_id')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
+                                </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" id="destination_city_id" style="width: 30%; "
-                                        :name="waybill.order_id ? '' : 'destination_city_id'" :disabled="!!waybill.order_id"
-                                        :class="errors['destination_city_id'] ? 'is-invalid' :''"  v-model="waybill.destination_city_id">
-                                    <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
-                                </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="selectedProvince()" style="transform: scale(0.9)">添加城市</button>
+                            <div v-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-9 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="waybill.origination_city_id" id="origination_city_id">
+                                            <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
+                                        </select>
+                                        <input class="form-control-sm form-control rounded-pill" placeholder="输入关键字定位" @input="origination_city_name">
+                                    </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-9 form-inline">
+                                        <select class="form-control @error('destination_city_id') is-invalid @enderror" id="destination_city_id" style="width: 30%; "
+                                                :name="waybill.order_id ? '' : 'destination_city_id'" :disabled="!!waybill.order_id"
+                                                :class="errors['destination_city_id'] ? 'is-invalid' :''"  v-model="waybill.destination_city_id">
+                                            <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
+                                        </select>
+                                        <input v-if="!waybill.order_id" type="text" class="form-control-sm  form-control tooltipTarget rounded-pill" 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="selectedProvince()" style="transform: scale(0.9)">添加城市</button>
+                                    </div>
+                                </div>
                             </div>
-                        </div>
-                    </div>
-                        <div class="form-group row">
-                            <label for="warehouse_weight" class="col-2 col-form-label text-right " v-if="waybill.type=='专线'">仓库计抛</label>
-                            <div class="col-2" v-if="waybill.type=='专线'">
-                                <input type="text"  class="form-control @error('warehouse_weight') is-invalid @enderror"
-                                       name="warehouse_weight" autocomplete="off" v-model="waybill.warehouse_weight" id="warehouse_weight" >
-                                @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 " v-if="waybill.type=='专线'">仓库计抛</label>
+                                <div class="col-2" v-if="waybill.type=='专线'">
+                                    <input type="text"  class="form-control @error('warehouse_weight') is-invalid @enderror"
+                                           name="warehouse_weight" autocomplete="off" v-model="waybill.warehouse_weight" id="warehouse_weight" >
+                                    @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 " v-if="waybill.type=='专线'">单位:</label>
-                            <div class="col-1.5" v-if="waybill.type=='专线'">
-                                <select class="form-control @error('warehouse_weight_unit_id') is-invalid @enderror"
-                                        name="warehouse_weight_unit_id" v-model="waybill.warehouse_weight_unit_id" id="warehouse_weight_unit_id">
-                                    <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
-                                </select>
-                            </div>
-                            <span v-if="waybill.type=='专线'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-                            <label for="warehouse_weight_other" class="col-form-label text-right " :class="waybill.type=='专线' ? '' : 'col-2'">&nbsp;&nbsp;&nbsp;&nbsp;&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" v-model="waybill.warehouse_weight_other"  id="warehouse_weight_other">
-                                @error('warehouse_weight_other')
-                                <span class="invalid-feedback" role="alert">
+                                    @enderror
+                                </div>
+                                <label for="warehouse_weight_unit_id" class=" col-form-label text-right " v-if="waybill.type=='专线'">单位:</label>
+                                <div class="col-1.5" v-if="waybill.type=='专线'">
+                                    <select class="form-control @error('warehouse_weight_unit_id') is-invalid @enderror"
+                                            name="warehouse_weight_unit_id" v-model="waybill.warehouse_weight_unit_id" id="warehouse_weight_unit_id">
+                                        <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
+                                    </select>
+                                </div>
+                                <span v-if="waybill.type=='专线'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+                                <label for="warehouse_weight_other" class="col-form-label text-right " :class="waybill.type=='专线' ? '' : 'col-2'">&nbsp;&nbsp;&nbsp;&nbsp;&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" v-model="waybill.warehouse_weight_other"  id="warehouse_weight_other">
+                                    @error('warehouse_weight_other')
+                                    <span class="invalid-feedback" role="alert">
                                     <strong>{{ $message }}</strong>
                                 </span>
-                                @enderror
+                                    @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="waybill.warehouse_weight_unit_id_other" id="warehouse_weight_unit_id_other">
+                                        <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
+                                    </select>
+                                </div>
                             </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="waybill.warehouse_weight_unit_id_other" id="warehouse_weight_unit_id_other">
-                                    <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
-                                </select>
-                            </div>
-                        </div>
-                    <div v-if="waybill.type=='专线'">
-                        <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" v-model="waybill.carrier_weight"  >
-                                @error('carrier_weight')
-                                <span class="invalid-feedback" role="alert">
+                            <div v-if="waybill.type=='专线'">
+                                <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" v-model="waybill.carrier_weight"  >
+                                        @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="waybill.carrier_weight_unit_id" >
-                                    <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
-                                </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="waybill.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" v-model="waybill.carrier_weight_other" >
-                                @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" v-model="waybill.carrier_weight_other" >
+                                        @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="waybill.carrier_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="amount" class="col-2 col-form-label text-right text-primary">计数</label>
+                                <div class="col-5">
+                                    <input type="number" class="form-control @error('amount') is-invalid @enderror"
+                                           name="amount" autocomplete="off" v-model="waybill.amount" id="amount">
+                                    @error('amount')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
+                                </div>
+                                <label for="amount_unit_id" class=" col-form-label text-right ">单位:</label>
+                                <div class="col-1.5 form-inline">
+                                    <label for="amount_unit_id" class="ml-1  @error('amount_unit_id') text-danger @enderror"  >件</label>
+                                    <input id="amount_unit_id" type="radio" value="4" class="form-control form-control-sm ml-1"
+                                           name="amount_unit_id" v-model="waybill.amount_unit_id">
+                                    <label for="amount_unit_id1" class="ml-1 @error('amount_unit_id') text-danger @enderror"  >托</label>
+                                    <input id="amount_unit_id1" type="radio" value="5" class="form-control form-control-sm ml-1"
+                                           :class="errors['amount_unit_id'] ? 'is-invalid' :''" name="amount_unit_id" v-model="waybill.amount_unit_id">
+                                </div>
+                                @error('amount_unit_id')
+                                <div class="col-2 form-inline">
+                                    <label class="form-control-static text-danger small font-weight-bold">{{$message}}</label>
+                                </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="waybill.carrier_weight_unit_id_other" >
-                                    <option :value="unit.id" v-for="unit in units" >@{{ unit.name }}</option>
-                                </select>
+                            <div v-if="waybill.type=='直发车'">
+                                <div class="form-group row">
+                                    <label for="carType_id" class="col-2 col-form-label text-right">车型</label>
+                                    <div class="col-3">
+                                        <select class="form-control" name="carType_id" v-model="waybill.carType_id" id="carType_id">
+                                            <option v-for="carType in carTypes" :value="carType.id">@{{ carType.name }}</option>
+                                        </select>
+                                    </div>
+                                    <label for="car_owner_info" class="col-2 col-form-label text-right">车辆信息</label>
+                                    <div class="col-3">
+                                        <input type="text" class="form-control"
+                                               name="car_owner_info" autocomplete="off" v-model="waybill.car_owner_info" id="car_owner_info" >
+                                    </div>
+                                </div>
+                                @can('运输管理-运单-运费')
+                                    <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" v-model="waybill.fee" id="fee" >
+                                            @error('fee')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
+                                        </div>
+                                    </div>
+                                @endcan
                             </div>
-
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="amount" class="col-2 col-form-label text-right text-primary">计数</label>
-                        <div class="col-5">
-                            <input type="number" class="form-control @error('amount') is-invalid @enderror"
-                                   name="amount" autocomplete="off" v-model="waybill.amount" id="amount">
-                            @error('amount')
-                            <span class="invalid-feedback" role="alert">
-                                <strong>{{ $message }}</strong>
-                            </span>
-                            @enderror
-                        </div>
-                        <label for="amount_unit_id" class=" col-form-label text-right ">单位:</label>
-                        <div class="col-1.5 form-inline">
-                            <label for="amount_unit_id" class="ml-1  @error('amount_unit_id') text-danger @enderror"  >件</label>
-                            <input id="amount_unit_id" type="radio" value="4" class="form-control form-control-sm ml-1"
-                                                         name="amount_unit_id" v-model="waybill.amount_unit_id">
-                            <label for="amount_unit_id1" class="ml-1 @error('amount_unit_id') text-danger @enderror"  >托</label>
-                            <input id="amount_unit_id1" type="radio" value="5" class="form-control form-control-sm ml-1"
-                                                         :class="errors['amount_unit_id'] ? 'is-invalid' :''" name="amount_unit_id" v-model="waybill.amount_unit_id">
-                        </div>
-                        @error('amount_unit_id')
-                        <div class="col-2 form-inline">
-                            <label class="form-control-static text-danger small font-weight-bold">{{$message}}</label>
-                        </div>
-                        @enderror
-
-                    </div>
-                    <div class="form-group row">
-                        <label for="mileage" class="col-2 col-form-label text-right text-dark">里程数</label>
-                        <div class="col-3">
-                            <input type="number" step="0.01" class="form-control @error('mileage') is-invalid @enderror"
-                                   name="mileage" autocomplete="off" v-model="waybill.mileage" id="mileage" >
-                        </div>
-                    </div>
-                    <div v-if="waybill.type=='直发车'">
-                        <div class="form-group row">
-                            <label for="carType_id" class="col-2 col-form-label text-right">车型</label>
-                            <div class="col-3">
-                                <select class="form-control" name="carType_id" style="width: 30%;" v-model="waybill.carType_id" id="carType_id">
-                                    <option v-for="carType in carTypes" :value="carType.id">@{{ carType.name }}</option>
-                                </select>
+                            <div v-if="waybill.type=='专线'">
+                                <div class="form-group row">
+                                    <label for="pick_up_fee" class="col-2 col-form-label text-right">提货费</label>
+                                    <div class="input-group col-3">
+                                        <input type="number" step="0.01" min="0" class="form-control @error('pick_up_fee') is-invalid @enderror"
+                                               name="pick_up_fee" autocomplete="off" v-model="waybill.pick_up_fee"  id="pick_up_fee">
+                                        <div class="input-group-append">
+                                            <span class="input-group-text">元</span>
+                                        </div>
+                                        @error('pick_up_fee')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
+                                    </div>
+                                    <label for="other_fee" class="col-2 col-form-label text-right text-muted">其他支出(元)</label>
+                                    <div class="input-group col-4">
+                                        <input type="number" step="0.01" min="0" class="form-control @error('other_fee') is-invalid @enderror"
+                                               name="other_fee" autocomplete="off" v-model="waybill.other_fee"  id="other_fee">
+                                        <div class="input-group-append">
+                                            <span class="input-group-text">元</span>
+                                        </div>
+                                        @error('other_fee')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
+                                    </div>
+                                </div>
                             </div>
-                            <label for="car_owner_info" class="col-2 col-form-label text-right">车辆信息</label>
-                            <div class="col-3">
-                                <input type="text" class="form-control"
-                                       name="car_owner_info" autocomplete="off" v-model="waybill.car_owner_info" id="car_owner_info" >
+                            <div class="form-group row">
+                                <label for="deliver_at" class="col-2 col-form-label text-right text-muted">发货时间</label>
+                                <div class="col-8 form-inline">
+                                    <input  id="deliver_at_date" @input="spliceDeliverAt" name="deliver_at_date" type="date" class="form-control col-4"
+                                            value="@if(old('deliver_at_date')){{ old('deliver_at_date') }}@else{{$waybill->deliver_at_date}}@endif">
+                                    <input  id="deliver_at_time" @input="spliceDeliverAt" name="deliver_at_time" type="time" class="form-control col-4"
+                                            value="@if(old('deliver_at_time')){{ old('deliver_at_time') }}@else{{$waybill->deliver_at_time}}@endif">
+                                    <input hidden id="deliver_at"  name="deliver_at" type="text" class="form-control col-4">
+                                </div>
                             </div>
-                        </div>
-                        @can('运输管理-运单-运费')
-                        <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" v-model="waybill.fee" id="fee" >
-                                @error('fee')
-                                <span class="invalid-feedback" role="alert">
-                                    <strong>{{ $message }}</strong>
-                                </span>
-                                @enderror
+                            <div class="form-group row">
+                                <label for="dispatch_remark" class="col-2 col-form-label text-right text-muted">调度备注</label>
+                                <div class="col-8">
+                            <textarea class="form-control @error('dispatch_remark') is-invalid @enderror"
+                                      name="dispatch_remark" autocomplete="off"  v-model="waybill.dispatch_remark" id="dispatch_remark"></textarea>
+                                    @error('dispatch_remark')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror
+                                </div>
                             </div>
-                        </div>
-                        @endcan
-                    </div>
-                    <div v-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" v-model="waybill.pick_up_fee"  id="pick_up_fee">
-                                @error('pick_up_fee')
-                                <span class="invalid-feedback" role="alert">
-                                    <strong>{{ $message }}</strong>
-                                </span>
-                                @enderror
+                            <div class="form-group row">
+                                <div class="col-8 offset-2">
+                                    <input type="button" @click="submitForm" class="btn btn-success form-control" value="提交">
+                                </div>
                             </div>
                         </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="other_fee" class="col-2 col-form-label text-right text-muted">其他支出(元)</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control @error('other_fee') is-invalid @enderror"
-                                   name="other_fee" autocomplete="off" v-model="waybill.other_fee"  id="other_fee">
-                            @error('other_fee')
-                            <span class="invalid-feedback" role="alert">
-                                <strong>{{ $message }}</strong>
-                            </span>
-                            @enderror
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="deliver_at" class="col-2 col-form-label text-right text-muted">发货时间</label>
-                        <div class="col-8 form-inline">
-                            <input  id="deliver_at_date" @input="spliceDeliverAt" name="deliver_at_date" type="date" class="form-control col-4"
-                                    value="@if(old('deliver_at_date')){{ old('deliver_at_date') }}@else{{$waybill->deliver_at_date}}@endif">
-                            <input  id="deliver_at_time" @input="spliceDeliverAt" name="deliver_at_time" type="time" class="form-control col-4"
-                                    value="@if(old('deliver_at_time')){{ old('deliver_at_time') }}@else{{$waybill->deliver_at_time}}@endif">
-                            <input hidden id="deliver_at"  name="deliver_at" type="text" class="form-control col-4">
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="dispatch_remark" class="col-2 col-form-label text-right text-muted">调度备注</label>
-                        <div class="col-8">
-                            <textarea class="form-control @error('dispatch_remark') is-invalid @enderror"
-                                      name="dispatch_remark" autocomplete="off"  v-model="waybill.dispatch_remark" id="dispatch_remark"></textarea>
-                            @error('dispatch_remark')
-                            <span class="invalid-feedback" role="alert">
-                                <strong>{{ $message }}</strong>
+                        <div class="col-6">
+                            <div class="form-group row">
+                                <label for="waybill_number" class="col-2 col-form-label text-right text-secondary">运单号</label>
+                                <div class="col-8">
+                                    <input id="waybill_number" type="text" class="form-control" disabled="disabled" :value="waybill.waybill_number" >
+                                </div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-2 col-form-label text-right text-secondary">货主</label>
+                                <div class="col-8">
+                                    <input type="text" class="form-control" disabled="disabled" :value="waybill.owner_name" >
+                                </div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-2 col-form-label text-right text-secondary">WMS单号</label>
+                                <div class="col-8">
+                                    <input type="text" class="form-control" disabled="disabled" :value="waybill.wms_bill_number" >
+                                </div>
+                            </div>
+                            <div id="origination">
+                                <div class="col-8" style="margin-left: 15%" id="btn" hidden>
+                                    <button type="button" class="btn btn-outline-primary btn-sm" @click="waybill.origination='上海市松江区泗砖仓'" style="transform: scale(0.9)">松江泗砖仓</button>
+                                    <button type="button" class="btn btn-outline-primary btn-sm" @click="waybill.origination='上海市松江区九干仓'" style="transform: scale(0.9)">松江九干仓</button>
+                                    <button type="button" class="btn btn-outline-primary btn-sm" @click="waybill.origination='上海市嘉定区武乡仓'" style="transform: scale(0.9)">嘉定武乡仓</button>
+                                </div>
+                                <div class="form-group row">
+                                    <label  class="col-2 col-form-label text-right text-secondary" for="origination_seek">始发地</label>
+                                    <div class="col-8">
+                                        <input type="text" class="form-control @error('origination') is-invalid @enderror"
+                                               id="origination_seek" name="origination" disabled="disabled" v-model="waybill.origination">
+                                    </div>
+                                    @error('origination')
+                                    <span class="invalid-feedback" role="alert">
+                                    <strong>{{ $message }}</strong>
                             </span>
-                            @enderror
+                                    @enderror
+                                </div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-2 col-form-label text-right text-secondary" for="destination_seek">目的地</label>
+                                <div class="col-8">
+                                    <input id="destination_seek" type="text" class="form-control" disabled="disabled" :value="waybill.destination" >
+                                </div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-2 col-form-label text-right text-secondary">收件人</label>
+                                <div class="col-8">
+                                    <input type="text" class="form-control" disabled="disabled" :value="waybill.recipient" >
+                                </div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-2 col-form-label text-right text-secondary">收件人电话</label>
+                                <div class="col-8">
+                                    <input type="text" class="form-control" disabled="disabled" :value="waybill.recipient_mobile" >
+                                </div>
+                            </div>
+                            <div class="form-group row" id="ordering_remark">
+                                <label class="col-2 col-form-label text-right text-secondary">下单备注</label>
+                                <div class="col-8">
+                                    <textarea class="form-control" disabled="disabled" >@{{waybill.ordering_remark}}</textarea>
+                                </div>
+                            </div>
                         </div>
                     </div>
                     <input type="hidden" name="status" value="待终审">
                     <input type="hidden" name="waybillPriceModel" id="waybillPriceModel">
                     <input type="hidden" name="order_id" :value="waybill.order_id">
-                    <div class="form-group row">
-                        <div class="col-8 offset-2">
-                            <input type="button" @click="submitForm" class="btn btn-outline-dark form-control" value="提交">
-                        </div>
-                    </div>
                 </form>
             </div>
         </div>

+ 25 - 6
resources/views/transport/waybill/index.blade.php

@@ -39,6 +39,8 @@
                     <button class="btn btn-sm btn-outline-success tooltipTarget" data-target="#dailyBilling" data-toggle="modal"
                             title="计算指定日期下的所有专线费,不考虑有无货主权限">按日输入专线费</button>@endcan
             @endif
+            @can('运输管理-编辑')<button class="btn btn-sm btn-outline-info tooltipTarget"
+                        title="合并多条运单至一条,已填写信息将被累加处理" @click="waybillMerge()">运单合并</button>@endcan
             <div>
                 @if(Session::has('successTip'))
                     <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
@@ -143,7 +145,6 @@
                             </div>
                         </div>
                     </td>
-                    <td class="td-cool"><span>@{{waybill.ordering_remark}}</span></td>
                     <td class="td-cool"><span>@{{waybill.recipient}}</span></td>
                     <td class="td-cool"><span>@{{waybill.recipient_mobile}}</span></td>
                     <td class="td-cool text-muted"><span>@{{waybill.origination}}</span></td>
@@ -179,6 +180,7 @@
                     <td class="td-cool"><span v-if="waybill.carrier_weight_other">@{{waybill.carrier_weight_other|filterZero}}  @{{waybill.carrier_weight_unit_other}}</span></td>
                     <td class="td-cool"><span v-if="waybill.amount">@{{waybill.amount}} @{{waybill.amount_unit_name }}</span></td>
                     <td class="td-cool"><span>@{{waybill.mileage|km}}</span></td>
+                    <td class="td-cool"><span>@{{waybill.ordering_remark}}</span></td>
                     @can('运输管理-运单-可见费用项')
                         @can('运输管理-运单-运费')
                             <td class="td-helpful">
@@ -302,7 +304,7 @@
                         end_date:'{{($waybill->order&&$waybill->order->wms_status=='订单完成') ? $waybill->order->wms_edittime:'-'}}',
                         waybill_number:'{{$waybill->waybill_number}}',
                         owner:'{{$waybill->owner_name ?? ($waybill->owner->name ?? '')}}',
-                        source_bill:'{{$waybill->order->client_code ?? $waybill->source_bill}}',
+                        source_bill:'{{ $waybill->source_bill ?: ($waybill->order->client_code ?? '')}}',
                         wms_bill_number:'{{$waybill->wms_bill_number}}',
                         is_cancel:'{{$waybill->order->wms_status ?? ''}}' === '订单取消',
                         origination:'{{$waybill->origination}}',
@@ -396,7 +398,6 @@
                         {name:'updated_at_start',type:'time',tip:['选择显示完结日期的起始时间','选择显示完结日期的起始时间']},
                         {name:'carrier_bill',type:'input',tip:'可支持多承运商单号:可在左侧增加百分号(%)进行模糊搜索',placeholder: '承运商单号'},
                         {name:'deliver_at_start',type:'time',tip:['选择显示发货日期的起始时间','选择显示发货日期的起始时间']},
-                        {name:'status',type:'select',placeholder: '运单状态',data:this.status},
                     ],
                     [
                         {name:'wms_bill_number',type:'input',tip:'可支持多WMS单号:可在两侧增加百分号(%)进行模糊搜索',placeholder: 'WMS单号'},
@@ -405,8 +406,6 @@
                         {name:'updated_at_end',type:'time',tip:['选择显示完结日期的结束时间','选择显示完结日期的结束时间']},
                         {name:'waybill_number',type:'input',tip:'运单号:可在两侧增加百分号(%)进行模糊搜索',placeholder: '运单号'},
                         {name:'deliver_at_end',type:'time',tip:['选择显示发货日期的结束时间','选择显示发货日期的结束时间']},
-                        {name:'logistic_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的承运商'],
-                            placeholder:['承运商','定位或多选承运商'],data:this.logistics},
                     ],
                     [
                         {name:'source_bill',type:'input',tip: '可支持多客户订单号:可在左侧增加百分号(%)进行模糊搜索',placeholder: '客户订单号'},
@@ -415,6 +414,10 @@
                         {name:'car_owner_info',type:'input',tip: '车辆信息:可在左侧增加百分号(%)进行模糊搜索',placeholder: '车辆信息'},
                         {name:'mileage',type:'input',tip: '里程:范围-范围',placeholder: '里程'},
                         {name:'warehouse_weight_other',type:'input',tip: '仓库计重:范围-范围',placeholder: '仓库计重'},
+                    ],[
+                        {name:'status',type:'select',placeholder: '运单状态',data:this.status},
+                        {name:'logistic_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的承运商'],
+                            placeholder:['承运商','定位或多选承运商'],data:this.logistics},
                         {name:'carType_id',type:'select',placeholder: '车型',data:this.carTypes},
                     ]
                 ];
@@ -433,6 +436,22 @@
                 this.rendingFloatBtn();
             },
             methods:{
+                //运单合并
+                waybillMerge(){
+                    if (checkData.length<2){
+                        window.tempTip.setDuration(2000);
+                        window.tempTip.show("至少选择两条运单进行合并");
+                        return;
+                    }
+                    window.tempTip.confirm("确定要合并选中运单吗?",()=>{
+                        window.tempTip.postBasicRequest("{{url('transport/waybill/waybillMerge')}}",{ids:checkData},res=>{
+                            setTimeout(function (){
+                                location.reload();
+                            },1000);
+                            return "运单已合并至“"+res+"”";
+                        });
+                    })
+                },
                 rendingFloatBtn(){
                     let parent = $('.pick-btn :visible');
                     if (parent.length<1)return;
@@ -531,7 +550,6 @@
                         {name:'other_charge',value: '其他收费', neglect: true, class:"td-warm"},
                         {name:'other_charge_remark',value: '其他收费备注', class:"td-warm"},
                             @can('运输管理-运单-图片上传'){name:'img',value: '照片', neglect: true, class:"td-warm"},@endcan
-                        {name:'ordering_remark',value: '运单备注', class:"td-cool"},
                         {name:'recipient',value: '收件人', class:"td-cool"},
                         {name:'recipient_mobile',value: '收件人电话', class:"td-cool"},
                         {name:'origination',value: '始发地', class:"td-cool"},
@@ -548,6 +566,7 @@
                         {name:'carrier_weight_other',value: '承运商计重', neglect: true, class:"td-cool"},
                         {name:'amount',value: '计件', neglect: true, class:"td-cool"},
                         {name:'mileage',value: '里程', neglect: true, class:"td-cool"},
+                        {name:'ordering_remark',value: '运单备注', class:"td-cool"},
                             @can('运输管理-运单-运费'){name:'fee',value: '运费', neglect: true, class:"td-helpful"},@endcan
                         {name:'pick_up_fee',value: '提货费', neglect: true, class:"td-helpful pick-btn"},
                         {name:'other_fee',value: '其他支出', neglect: true, class:"td-helpful"},

+ 1 - 0
routes/web.php

@@ -367,6 +367,7 @@ Route::group(['middleware'=>'auth'],function ($route){
             Route::post('batchUploadImages','WaybillController@batchUploadImages');
             Route::post('dailyBilling','WaybillController@dailyBilling');
             Route::post('countPickUpFee','WaybillController@countPickUpFee');
+            Route::post('waybillMerge','WaybillController@waybillMerge');
             Route::resource('waybillFinancialSnapshot','WaybillFinancialSnapshotsController');
             Route::resource('waybillFinancialExcepted','WaybillFinancialExceptedController');
         });