|
|
@@ -3,45 +3,6 @@
|
|
|
|
|
|
@section('content')
|
|
|
<div id="list" class="d-none container-fluid">
|
|
|
-<!-- <form method="GET" action="{{url('transport/waybill/delivering')}}" id="form">
|
|
|
- 计费模型 <div class="text-nowrap mb-0" style="background: #fff;">
|
|
|
- <div v-if="isBeingFilterConditions">
|
|
|
- <div><div class="col" style="padding:0">
|
|
|
- <a href="{{url('transport/waybill/delivering')}}"><span class="btn btn-warning text-dark">清除筛选</span></a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row mt-2 ml-2">
|
|
|
- <div class="col-md-6 form-inline" style="max-width: 400px">
|
|
|
- <input type="date" name="created_at_start" class="form-control form-control-sm tooltipTarget" title="选择显示指定日期的起始时间"
|
|
|
- v-model="filterData.created_at_start" :class="filterData.created_at_start?'bg-warning':''">
|
|
|
- <input type="date" class="form-control form-control-sm tooltipTarget" name="created_at_end" title="选择显示指定日期的结束时间"
|
|
|
- v-model="filterData.created_at_end" :class="filterData.created_at_end?'bg-warning':''" >
|
|
|
- </div>
|
|
|
- <div class=" col-md-2 mr-0 " style="max-width: 160px">
|
|
|
- <input type="text" title="运单号:可在两侧增加百分号(%)进行模糊搜索" name="waybill_number" placeholder="运单号"
|
|
|
- class="form-control form-control-sm tooltipTarget" v-model="filterData.waybill_number" style="vertical-align: middle;width: 153px" :class="filterData.waybill_number?'bg-warning':''">
|
|
|
- </div>
|
|
|
- <div class=" col-md-2 ml-2 p-0" style="max-width: 160px">
|
|
|
- <input type="text" title="承运商单号:可在两侧增加百分号(%)进行模糊搜索" name="carrier_bill" placeholder="承运商单号"
|
|
|
- class="form-control form-control-sm tooltipTarget" v-model="filterData.carrier_bill" style="vertical-align: middle;width: 153px" :class="filterData.carrier_bill?'bg-warning':''">
|
|
|
- </div>
|
|
|
- <input type="submit" hidden>
|
|
|
- </div>
|
|
|
- <div class="ml-4 mt-2">
|
|
|
- <span class="dropdown">
|
|
|
- <button type="button" class="btn btn-sm form-control-sm dropdown-toggle tooltipTarget"
|
|
|
- data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
|
|
|
- 导出Excel
|
|
|
- </button>
|
|
|
- <div class="dropdown-menu">
|
|
|
- <a class="dropdown-item" @click="waybillExport(false)" href="javascript:">导出勾选内容</a>
|
|
|
- <a class="dropdown-item" @click="waybillExport(true)" href="javascript:">导出所有页</a>
|
|
|
- </div>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </form>-->
|
|
|
<div class="card">
|
|
|
<table class="card-body table table-sm table-hover table-striped table-bordered d-none d-sm-block p-0 text-nowrap td-min-width-80" style="width: 100%" id="table">
|
|
|
<tr v-for="(waybill,i) in waybills">
|
|
|
@@ -90,8 +51,8 @@
|
|
|
<td>
|
|
|
<span v-if="waybill.status!='已完结'">
|
|
|
<button v-if="!waybill.isBtn&&waybill.carrier_bill" @click="waybill.isBtn=true" class="btn btn-sm btn-outline-dark" >修改</button>
|
|
|
- <button v-if="!waybill.isBtn&& !waybill.carrier_bill" @click="submit(waybill.id+'PC',waybill.id);" class="btn btn-sm btn-outline-info" >录入</button>
|
|
|
- <button v-if="waybill.isBtn" @click="submit(waybill.id+'PC',waybill.id);" class="btn btn-sm btn-outline-success">确定</button>
|
|
|
+ <button v-if="!waybill.isBtn&& !waybill.carrier_bill" @click="submit(waybill.isBtn,waybill.id+'PC',waybill.id);" class="btn btn-sm btn-outline-info" >录入</button>
|
|
|
+ <button v-if="waybill.isBtn" @click="submit(waybill.isBtn,waybill.id+'PC',waybill.id);" class="btn btn-sm btn-outline-success">确定</button>
|
|
|
<button @click="waybill.isBtn=false" v-if="waybill.isBtn" class="btn btn-sm btn-outline-danger">取消</button>
|
|
|
</span>
|
|
|
</td>
|
|
|
@@ -115,44 +76,76 @@
|
|
|
<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 || !waybill.carrier_bill" type="text" :value="waybill.carrier_bill"
|
|
|
+ :title="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_bill?errors['_'+waybill.id].carrier_bill[0]:''" v-if="waybill.isBtn" 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>
|
|
|
+ <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 || !waybill.carrier_bill" type="text" :value="waybill.inquire_tel"
|
|
|
+ :title="errors['_'+waybill.id]&&errors['_'+waybill.id].inquire_tel?errors['_'+waybill.id].inquire_tel[0]:''" v-if="waybill.isBtn" 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>
|
|
|
- <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]:''" v-if="waybill.isBtn || !waybill.carrier_bill" type="text" :value="waybill.amount" class="form-control form-control-sm"
|
|
|
- @click="enlarge($event)" style="width:50px">
|
|
|
+ <span class="mr-3 text-nowrap form-inline"><span style="color:#02346a">数量:</span>
|
|
|
+ <span class="input-group input-group-sm" v-if="waybill.isBtn">
|
|
|
+ <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>
|
|
|
- <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]:''" v-if="waybill.isBtn || !waybill.carrier_bill" type="text" :value="waybill.carrier_weight_other"
|
|
|
- class="form-control form-control-sm" @click="enlarge($event)" style="width:50px">
|
|
|
+ <span class="input-group input-group-sm" v-if="waybill.isBtn">
|
|
|
+ <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>
|
|
|
- <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]:''" v-if="waybill.isBtn || !waybill.carrier_bill" type="text" :value="waybill.carrier_weight"
|
|
|
- class="form-control form-control-sm" @click="enlarge($event)" {{--@mouseleave="shrink($event)"--}} style="width:50px">
|
|
|
+ <span class="input-group input-group-sm" v-if="waybill.isBtn">
|
|
|
+ <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>
|
|
|
+ </span>
|
|
|
<span v-else class="text-muted">@{{ waybill.carrier_weight }}</span>
|
|
|
</span>
|
|
|
- <span class="mr-3 text-nowrap" v-if="waybill.status!='已完结'">
|
|
|
- <button v-if="waybill.isBtn==true || !waybill.carrier_bill" class="btn btn-sm btn-outline-success" @click="submit(waybill.id)">提交</button>
|
|
|
- <button v-if="waybill.isBtn==true" class="btn btn-sm btn-outline-danger" @click="waybill.isBtn=false">取消</button>
|
|
|
- <button v-if="waybill.isBtn==false && waybill.carrier_bill" class="btn btn-sm " @click="waybill.isBtn=true" :class="waybill.carrier_bill?'btn-outline-dark':'btn-outline-primary'">修改</button></span></div>
|
|
|
+ <span class="mr-3 text-nowrap form-inline" v-if="!waybill.isBtn && (waybill.status!=='已完结' && waybill.status!=='无模型')"><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>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span class="mr-3 text-nowrap" v-if="waybill.status!=='已完结' || waybill.status!=='无模型'">
|
|
|
+ <button class="btn btn-sm btn-outline-success" @click="submit(waybill.isBtn,waybill.id)">提交</button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
+ <div class="bg-white w-100 row" style="position: fixed;top:0;left:0;
|
|
|
+ width: 100%; text-align: center; border-radius: 3px;">
|
|
|
+ <div class="position-relative offset-2 col-9 mt-3 mb-3">
|
|
|
+ <input class="form-control form-control-sm w-100 rounded-pill" @keydown.enter="searchSubmit()" v-model="searchText" type="text" placeholder="运单号 物流单号"></input>
|
|
|
+ <a id="search" v-bind:href="'{{url('transport/waybill/delivering?searchText=')}}'+searchText"><button type="button" class="border btn btn-sm btn-primary text-white rounded-pill position-absolute" style="top: 0;right: 12px;">搜索</button></a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
@endsection
|
|
|
|
|
|
@@ -189,7 +182,8 @@
|
|
|
carrier_weight_unit_name:'{{$waybill->carrier_weight_unit ? $waybill->carrier_weight_unit->name : ''}}',
|
|
|
warehouse_weight_unit_other_name:'{{$waybill->warehouse_weight_unit_other ? $waybill->warehouse_weight_unit_other->name : ''}}',
|
|
|
carrier_weight_unit_other_name:'{{$waybill->carrier_weight_unit_other ? $waybill->carrier_weight_unit_other->name : ''}}',
|
|
|
- isBtn:false
|
|
|
+ isBtn:!!!'{{$waybill->carrier_bill}}',
|
|
|
+ subjoin_fee:'{{$waybill->subjoin_fee}}',
|
|
|
},
|
|
|
@endforeach
|
|
|
],
|
|
|
@@ -198,6 +192,7 @@
|
|
|
},
|
|
|
errors:{},
|
|
|
sum:{!! $waybills->count() !!},
|
|
|
+ searchText:"{{$searchText}}",
|
|
|
},
|
|
|
mounted:function(){
|
|
|
let _this=this;
|
|
|
@@ -206,6 +201,7 @@
|
|
|
if (navigator.userAgent.indexOf("Android")!==-1)this.isAndroid = true;
|
|
|
this.pageInit();
|
|
|
$("#list").removeClass('d-none');
|
|
|
+ if (this.isAndroid)return;
|
|
|
let column = [
|
|
|
{name:'index',value: '序号', neglect: true},
|
|
|
{name:'created_at',value: '日期', class:"color1"},
|
|
|
@@ -245,6 +241,9 @@
|
|
|
|
|
|
},
|
|
|
methods:{
|
|
|
+ searchSubmit(){
|
|
|
+ document.getElementById("search").click();
|
|
|
+ },
|
|
|
//页面初始化
|
|
|
pageInit(){
|
|
|
if (!this.isAndroid)return;
|
|
|
@@ -285,49 +284,69 @@
|
|
|
shrink(e){
|
|
|
e.target.style.width="50px";
|
|
|
},
|
|
|
- submit(waybill_id,id=null){
|
|
|
- if (!confirm('确定要提交吗?')){return;}
|
|
|
- let _this=this;
|
|
|
- let data={};
|
|
|
- data['id'] = id ? waybill_id : '';
|
|
|
- data['carrier_bill'] = $("#carrier_bill"+waybill_id).val();
|
|
|
- data['inquire_tel'] = $("#inquire_tel"+waybill_id).val();
|
|
|
- data['amount'] = $("#amount"+waybill_id).val();
|
|
|
- data['carrier_weight'] = $("#carrier_weight"+waybill_id).val();//体积
|
|
|
- data['carrier_weight_other'] = $("#carrier_weight_other"+waybill_id).val();//重量
|
|
|
- if (_this.errors["_"+data['id']])_this.errors["_"+data['id']]={};
|
|
|
- axios.post("{{url('transport/waybill/storeCarrierBill')}}",data)
|
|
|
- .then(function (response) {
|
|
|
- if (response.data.error){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.error);
|
|
|
- return
|
|
|
- }
|
|
|
- if (response.data.errors){
|
|
|
- Vue.set(_this.errors,"_"+data['id'],response.data.errors);
|
|
|
- setTimeout(function(){
|
|
|
- $(".tooltipTargetError").tooltip('show');
|
|
|
- },1);
|
|
|
- return;
|
|
|
+ appendSubjoinFee(waybillId){
|
|
|
+ let subjoinFee = $("#subjoin_fee"+waybillId).val();
|
|
|
+ if (!subjoinFee)return;
|
|
|
+ window.tempTip.postBasicRequest("{{url('transport/waybill/appendSubjoinFee')}}",{subjoinFee:subjoinFee,id:waybillId},()=>{
|
|
|
+ this.waybills.some((waybill,index)=>{
|
|
|
+ if (waybill.id===waybillId){
|
|
|
+ this.$set(this.waybills[index],"subjoin_fee",subjoinFee);
|
|
|
+ return true;
|
|
|
}
|
|
|
- _this.waybills.some(function (waybill) {
|
|
|
- if (waybill.id===data['id']){
|
|
|
- waybill.carrier_bill=response.data.carrier_bill;
|
|
|
- waybill.inquire_tel=response.data.inquire_tel;
|
|
|
- waybill.amount=response.data.amount;
|
|
|
- waybill.amount_unit_name=response.data.amount_unit_name;
|
|
|
- waybill.carrier_weight=response.data.carrier_weight;
|
|
|
- waybill.carrier_weight_other=response.data.carrier_weight_other;
|
|
|
- waybill.isBtn=false;
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.showSuccess('录入成功!');
|
|
|
- return true;
|
|
|
+ });
|
|
|
+ return "附加费添加成功";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ submit(isBtn,waybillId,id=null){
|
|
|
+ if(!isBtn){this.appendSubjoinFee(waybillId);return;}
|
|
|
+ window.tempTip.confirm("确定要提交调配信息吗?",()=>{
|
|
|
+ let data={
|
|
|
+ id : id ? id : waybillId,
|
|
|
+ carrier_bill : $("#carrier_bill"+waybillId).val(),
|
|
|
+ inquire_tel : $("#inquire_tel"+waybillId).val(),
|
|
|
+ amount : $("#amount"+waybillId).val(),
|
|
|
+ carrier_weight : $("#carrier_weight"+waybillId).val(),
|
|
|
+ carrier_weight_other : $("#carrier_weight_other"+waybillId).val(),
|
|
|
+ };
|
|
|
+ if (!data["id"]){
|
|
|
+ window.tempTip.setDuration(3000);
|
|
|
+ window.tempTip.show("参数异常");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.errors["_"+data['id']]={};
|
|
|
+ axios.post("{{url('transport/waybill/storeCarrierBill')}}",data)
|
|
|
+ .then(response=>{
|
|
|
+ if (response.data.error){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show(response.data.error);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (response.data.errors){
|
|
|
+ this.$set(this.errors,"_"+data['id'],response.data.errors);
|
|
|
+ setTimeout(function(){
|
|
|
+ $(".tooltipTargetError").tooltip('show');
|
|
|
+ },1);
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.waybills.some(function (waybill) {
|
|
|
+ if (waybill.id===data['id']){
|
|
|
+ waybill.carrier_bill=response.data.carrier_bill;
|
|
|
+ waybill.inquire_tel=response.data.inquire_tel;
|
|
|
+ waybill.amount=response.data.amount;
|
|
|
+ waybill.amount_unit_name=response.data.amount_unit_name;
|
|
|
+ waybill.carrier_weight=response.data.carrier_weight;
|
|
|
+ waybill.carrier_weight_other=response.data.carrier_weight_other;
|
|
|
+ if (waybill.carrier_bill)waybill.isBtn=false;
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('录入成功!');
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('网络异常:'+err);
|
|
|
});
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('网络异常:'+err);
|
|
|
- });
|
|
|
+ })
|
|
|
}}
|
|
|
});
|
|
|
|