|
|
@@ -1,101 +1,102 @@
|
|
|
@extends('layouts.app')
|
|
|
@section('title')发运-运输管理@endsection
|
|
|
-
|
|
|
+@section("head")<link href="{{ mix('css/animation.css') }}" rel="stylesheet">@endsection
|
|
|
@section('content')
|
|
|
<div id="list" class="d-none container-fluid mt-2">
|
|
|
<div class="card" v-for="(waybills,date) in groups">
|
|
|
- <div class="card-header p-0 text-center" @click="selectedHeader(date)">
|
|
|
- @{{ date }}
|
|
|
- <i class="fa mr-2 pull-right" :class="header[date] ? 'fa-angle-down' : 'fa-angle-right'"></i>
|
|
|
+ <div class="card-header p-0 row" >
|
|
|
+ <div class="text-center" :class="slideStatus[date] ? 'col-8' : 'col-12'" @click="selectedHeader(date)" @touchstart="startSlide()" @touchend="endSlide(date)">
|
|
|
+ @{{ date }}<i class="fa mr-2 pull-right" :class="header[date] ? 'fa-angle-down' : 'fa-angle-right'"></i>
|
|
|
+ </div>
|
|
|
+ <div class="col-4 bg-white" :class="slideStatus[date] ? '' : 'd-none'">
|
|
|
+ 专线费预留区域
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="card-body p-0" v-if="header[date]">
|
|
|
<div class="w-100 h-100 d-inline-block text-center" v-if="loadAnimation[date]">
|
|
|
<i class="fa fa-spinner fa-pulse"></i>
|
|
|
</div>
|
|
|
- <div v-else>
|
|
|
- <table class="table table-striped table-sm table-bordered table-hover p-0 d-block d-sm-none" style="background: rgb(255, 255, 255);">
|
|
|
- <tbody>
|
|
|
- <tr v-for="waybill in waybills">
|
|
|
- <td style="filter:grayscale(30%); " :id="'waybill-'+waybill.id">
|
|
|
- <div :style="waybill.status!='已完结'?'background-color:#f6eee8':''" class="mt-3">
|
|
|
- <div style="transform:scale(0.9)" class="pl-0">
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">日期:</span><span style="color:#af7651">@{{ waybill.deliver_at }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">承运商:</span><span style="color:#af7651">@{{ waybill.carrier_name }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">宝时运单号:</span><span style="color:#af7651">@{{ waybill.waybill_number }}</span><br></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">目的地:</span><span style="color:#af7651">@{{ waybill.address }}</span><br></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">收货人:</span><span style="color:#af7651">@{{ waybill.recipient }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">提货仓:</span><span style="color:#af7651">@{{ waybill.origination }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">预估重量:</span><span style="color:#af7651" v-if="waybill.warehouse_weight_other">@{{ waybill.warehouse_weight_other }} @{{ waybill.warehouse_weight_unit_other_name }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000">预估体积:</span><span style="color:#af7651" v-if="waybill.warehouse_weight">@{{ waybill.warehouse_weight }} @{{ waybill.warehouse_weight_unit_name }}</span></span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="background-color:#e8eef6" class="mb-3">
|
|
|
- <div style="transform:scale(0.9)" class="pl-0 form-inline">
|
|
|
- <span class="mr-3 text-nowrap form-inline"><span style="color:#02346a">专线运单号:</span>
|
|
|
- <input :id="'carrier_bill'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_bill?'is-invalid tooltipTargetError':''"
|
|
|
- :title="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_bill?errors['_'+waybill.id].carrier_bill[0]:''" v-if="waybill.isBtn || updatePool[waybill.id]" type="text" :value="waybill.carrier_bill"
|
|
|
- class="form-control form-control-sm " @click="enlarge($event)" style="width: 50px">
|
|
|
- <span v-else class="text-muted">@{{ waybill.carrier_bill }}</span>
|
|
|
- </span>
|
|
|
- <span class="mr-3 text-nowrap form-inline"><span style="color:#02346a">查 件 电 话:</span>
|
|
|
- <input :id="'inquire_tel'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].inquire_tel?'is-invalid tooltipTargetError':''"
|
|
|
- :title="errors['_'+waybill.id]&&errors['_'+waybill.id].inquire_tel?errors['_'+waybill.id].inquire_tel[0]:''" v-if="waybill.isBtn || updatePool[waybill.id]" type="text" :value="waybill.inquire_tel"
|
|
|
- class="form-control form-control-sm" @click="enlarge($event)" style="width:50px">
|
|
|
- <span v-else class="text-muted">@{{ waybill.inquire_tel }}</span>
|
|
|
- </span>
|
|
|
- <span class="mr-3 text-nowrap form-inline"><span style="color:#02346a">数量:</span>
|
|
|
- <span class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
- <input :id="'amount'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].amount?'is-invalid tooltipTargetError':''"
|
|
|
- :title="errors['_'+waybill.id]&&errors['_'+waybill.id].amount?errors['_'+waybill.id].amount[0]:''" type="text" :value="waybill.amount"
|
|
|
- class="form-control"
|
|
|
- @click="enlarge($event)" style="width:50px">
|
|
|
- <span class="input-group-append">
|
|
|
- <span class="input-group-text">件</span>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <span v-else class="text-muted"><span v-if="waybill.amount">@{{ waybill.amount }} @{{ waybill.amount_unit_name }}</span></span>
|
|
|
- </span>
|
|
|
- <span class="mr-3 text-nowrap form-inline"><span style="color:#02346a">重量:</span>
|
|
|
- <span class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
- <input :id="'carrier_weight_other'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight_other?'is-invalid tooltipTargetError':''"
|
|
|
- :title="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight_other?errors['_'+waybill.id].carrier_weight_other[0]:''" type="text" :value="waybill.carrier_weight_other"
|
|
|
- class="form-control" @click="enlarge($event)" style="width:50px">
|
|
|
- <span class="input-group-append">
|
|
|
- <span class="input-group-text">KG</span>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <span v-else class="text-muted">@{{ waybill.carrier_weight_other }}</span>
|
|
|
- </span>
|
|
|
- <span class="mr-3 text-nowrap form-inline"><span style="color:#02346a">体积:</span>
|
|
|
- <span class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
- <input :id="'carrier_weight'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight?'is-invalid tooltipTargetError':''"
|
|
|
- :title="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight?errors['_'+waybill.id].carrier_weight[0]:''" type="text" :value="waybill.carrier_weight"
|
|
|
- class="form-control" @click="enlarge($event)" style="width:50px">
|
|
|
- <span class="input-group-append">
|
|
|
- <span class="input-group-text">M³</span>
|
|
|
- </span>
|
|
|
+ <div v-else v-for="waybill in waybills" class="w-100 border border-1" style="filter:grayscale(30%); " :id="'waybill-'+waybill.id">
|
|
|
+ <div :style="waybill.status!=='已完结'?'background-color:#f6eee8':''" class="mt-3">
|
|
|
+ <div style="transform:scale(0.9);color:#783000" class="pl-0">
|
|
|
+ <span class="mr-3 text-nowrap">日期:@{{ waybill.deliver_at }}</span>
|
|
|
+ <span class="mr-3 text-nowrap">承运商:@{{ waybill.carrier_name }}</span>
|
|
|
+ <span class="mr-3 text-nowrap">宝时运单号:@{{ waybill.waybill_number }}<br></span>
|
|
|
+ <span class="mr-3 text-nowrap">目的地:@{{ waybill.address }}<br></span>
|
|
|
+ <span class="mr-3 text-nowrap">收货人:@{{ waybill.recipient }}</span>
|
|
|
+ <span class="mr-3 text-nowrap">提货仓:@{{ waybill.origination }}</span>
|
|
|
+ <span class="mr-3 text-nowrap">预估重量:<span v-if="waybill.warehouse_weight_other">@{{ waybill.warehouse_weight_other }} @{{ waybill.warehouse_weight_unit_other_name }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap">预估体积:<span v-if="waybill.warehouse_weight">@{{ waybill.warehouse_weight }} @{{ waybill.warehouse_weight_unit_name }}</span></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="background-color:#e8eef6" class="mb-3">
|
|
|
+ <div style="transform:scale(0.9);color:#02346a" class="pl-0 form-inline">
|
|
|
+ <div class="mr-3 text-nowrap form-inline">
|
|
|
+ <label :for="'carrier_bill'+waybill.id">专线运单号:</label>
|
|
|
+ <input :id="'carrier_bill'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_bill?'is-invalid tooltipTargetError':''"
|
|
|
+ v-if="waybill.isBtn || updatePool[waybill.id]" type="text" :value="waybill.carrier_bill"
|
|
|
+ class="form-control form-control-sm " @click="enlarge($event)" style="width: 50px">
|
|
|
+ <span v-else class="text-muted">@{{ waybill.carrier_bill }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="mr-3 text-nowrap form-inline">
|
|
|
+ <label :for="'inquire_tel'+waybill.id">查 件 电 话:</label>
|
|
|
+ <input :id="'inquire_tel'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].inquire_tel?'is-invalid tooltipTargetError':''"
|
|
|
+ v-if="waybill.isBtn || updatePool[waybill.id]" :value="waybill.inquire_tel" @click="enlarge($event)"
|
|
|
+ class="form-control form-control-sm" type="text" style="width:50px">
|
|
|
+ <span v-else class="text-muted">@{{ waybill.inquire_tel }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="mr-3 text-nowrap form-inline">
|
|
|
+ <label :for="'amount'+waybill.id">数量:</label>
|
|
|
+ <div class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
+ <input :id="'amount'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].amount?'is-invalid tooltipTargetError':''"
|
|
|
+ :value="waybill.amount" @click="enlarge($event)"
|
|
|
+ class="form-control" type="text" style="width:50px">
|
|
|
+ <span class="input-group-append">
|
|
|
+ <span class="input-group-text">件</span>
|
|
|
</span>
|
|
|
- <span v-else class="text-muted">@{{ waybill.carrier_weight }}</span>
|
|
|
+ </div>
|
|
|
+ <span v-else class="text-muted"><span v-if="waybill.amount">@{{ waybill.amount }} @{{ waybill.amount_unit_name }}</span></span>
|
|
|
+ </div>
|
|
|
+ <div class="mr-3 text-nowrap form-inline">
|
|
|
+ <label :for="'carrier_weight_other'+waybill.id">重量:</label>
|
|
|
+ <div class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
+ <input :id="'carrier_weight_other'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight_other?'is-invalid tooltipTargetError':''"
|
|
|
+ :value="waybill.carrier_weight_other" @click="enlarge($event)"
|
|
|
+ type="text" class="form-control" style="width:50px">
|
|
|
+ <span class="input-group-append">
|
|
|
+ <span class="input-group-text">KG</span>
|
|
|
</span>
|
|
|
- <span class="mr-3 text-nowrap form-inline" v-if="!waybill.isBtn"><span style="color:#02346a">附加费:</span>
|
|
|
- <span class="input-group input-group-sm">
|
|
|
- <input :id="'subjoin_fee'+waybill.id" :value="waybill.subjoin_fee" type="number" step="0.01"
|
|
|
- class="form-control" style="width:150px">
|
|
|
- <span class="input-group-append">
|
|
|
- <span class="input-group-text">元</span>
|
|
|
- </span>
|
|
|
+ </div>
|
|
|
+ <span v-else class="text-muted">@{{ waybill.carrier_weight_other }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="mr-3 text-nowrap form-inline">
|
|
|
+ <label :for="'carrier_weight'+waybill.id">体积:</label>
|
|
|
+ <div class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
+ <input :id="'carrier_weight'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight?'is-invalid tooltipTargetError':''"
|
|
|
+ :value="waybill.carrier_weight" @click="enlarge($event)"
|
|
|
+ type="text" class="form-control" style="width:50px">
|
|
|
+ <span class="input-group-append">
|
|
|
+ <span class="input-group-text">M³</span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
- <span class="mr-3 text-nowrap">
|
|
|
- <button class="btn btn-sm btn-outline-success" @click="submit(date,waybill.isBtn,waybill.id)">提交</button>
|
|
|
- <button v-if="!waybill.isBtn && !updatePool[waybill.id]" class="btn btn-sm btn-outline-info" @click="$set(updatePool,waybill.id,true);">修改</button>
|
|
|
- </span>
|
|
|
</div>
|
|
|
+ <span v-else class="text-muted">@{{ waybill.carrier_weight }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="mr-3 text-nowrap form-inline" v-if="!waybill.isBtn">
|
|
|
+ <label :for="'subjoin_fee'+waybill.id">附加费:</label>
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <input :id="'subjoin_fee'+waybill.id" :value="waybill.subjoin_fee" type="number" step="0.01"
|
|
|
+ class="form-control" style="width:150px">
|
|
|
+ <span class="input-group-append">
|
|
|
+ <span class="input-group-text">元</span>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ </div>
|
|
|
+ <span class="mr-3 text-nowrap">
|
|
|
+ <button class="btn btn-sm btn-outline-success" @click="submit(date,waybill.isBtn,waybill.id)">提交</button>
|
|
|
+ <button v-if="!waybill.isBtn && !updatePool[waybill.id]" class="btn btn-sm btn-outline-info" @click="$set(updatePool,waybill.id,true);">修改</button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -129,6 +130,8 @@
|
|
|
searchText:"{{$searchText}}",
|
|
|
lastHeight:"",
|
|
|
updatePool:{},
|
|
|
+ coordinate:{},
|
|
|
+ slideStatus:{},
|
|
|
},
|
|
|
mounted:function(){
|
|
|
$(".tooltipTarget").tooltip({'trigger':'hover'});
|
|
|
@@ -137,6 +140,36 @@
|
|
|
$("#list").removeClass('d-none');
|
|
|
},
|
|
|
methods:{
|
|
|
+ startSlide(){
|
|
|
+ event.preventDefault();
|
|
|
+ this.coordinate.x = event.touches[0].pageX;
|
|
|
+ this.coordinate.y = event.touches[0].pageY;
|
|
|
+ },
|
|
|
+ endSlide(date){
|
|
|
+ event.preventDefault();
|
|
|
+ let x = event.changedTouches[0].pageX - this.coordinate.x;
|
|
|
+ let y = event.changedTouches[0].pageY - this.coordinate.y;
|
|
|
+ if (Math.abs(x) > Math.abs(y)) {
|
|
|
+ if (x>0)this.lToR(date,event.target);
|
|
|
+ else this.rToL(date,event.target);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rToL(date,element){
|
|
|
+ if (this.slideStatus[date])return;
|
|
|
+ element.classList.add('translationRtoL');
|
|
|
+ setTimeout(()=>{
|
|
|
+ element.classList.remove('translationRtoL');
|
|
|
+ this.$set(this.slideStatus,date,true);
|
|
|
+ },400);
|
|
|
+ },
|
|
|
+ lToR(date,element){
|
|
|
+ if (!this.slideStatus[date])return;
|
|
|
+ element.classList.add('translationLtoR');
|
|
|
+ setTimeout(()=>{
|
|
|
+ element.classList.remove('translationLtoR');
|
|
|
+ this.$set(this.slideStatus,date,false);
|
|
|
+ },400);
|
|
|
+ },
|
|
|
selectedHeader(date){
|
|
|
if (this.header[date]===undefined)this.loadData(date);
|
|
|
if (this.header[date])this.$set(this.header,date,!this.header[date])
|