|
|
@@ -121,13 +121,15 @@
|
|
|
<button class="btn btn-outline-primary btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>
|
|
|
@endcan
|
|
|
@can('运输管理-编辑')
|
|
|
- <button class="btn btn-outline-secondary btn-sm" @click="waybillUpdate(waybill.id)">修改</button>
|
|
|
+{{-- <button class="btn btn-outline-secondary btn-sm" @click="waybillUpdate(waybill.id)">修改</button>--}}
|
|
|
+ <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill/waybillEdit')}}/'+waybill.id)">修改</a>
|
|
|
@endcan
|
|
|
</span>
|
|
|
<span v-if=waybill.status==="已审核">
|
|
|
@can('运输管理-调度')
|
|
|
<button class="btn btn-outline-secondary btn-sm" @click="waybillRetreatAudit(waybill.id,waybill.waybill_number)">取消审核</button>
|
|
|
- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">调度</button>
|
|
|
+{{-- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">调度</button>--}}
|
|
|
+ <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill')}}/'+waybill.id+'/edit')">调度</a>
|
|
|
@endcan
|
|
|
</span>
|
|
|
<span v-if=waybill.status==="待终审">
|
|
|
@@ -135,7 +137,8 @@
|
|
|
<button class="btn btn-outline-success btn-sm" @click="waybillEndAudit(waybill.id,waybill.waybill_number)">完结</button>
|
|
|
@endcan
|
|
|
@can('运输管理-调度')
|
|
|
- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">改调度</button>
|
|
|
+{{-- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">改调度</button>--}}
|
|
|
+ <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill')}}/'+waybill.id+'/edit')">改调度</a>
|
|
|
@endcan
|
|
|
</span>
|
|
|
</td>
|
|
|
@@ -158,7 +161,19 @@
|
|
|
<td class="td-warm toptd" :title="waybill.remark? '置顶备注:'+waybill.remark :''">@{{waybill.source_bill}}</td>
|
|
|
<td class="td-warm" >@{{waybill.wms_bill_number}}</td>
|
|
|
<td class="td-warm">@{{waybill.waybill_number}}</td>
|
|
|
- <td class="td-warm">@{{waybill.charge}}</td>
|
|
|
+ @can('运输管理-运单编辑')
|
|
|
+ <td class="td-warm" >
|
|
|
+ <span v-if="waybill.charge" class="btn-sm btn-outline-secondary btn" @click="waybillChargeCheck($event)" :data_id="waybill.id">@{{waybill.charge|money}}</span>
|
|
|
+ <input v-else type="number" class="form-control form-control-sm" @blur="addWaybillCharge($event)" onfocus="$(this).css('width','85px')" :value="waybill.charge" :data_id="waybill.id" >
|
|
|
+ <input type="number" class="form-control form-control-sm" @blur="updateWaybillCharge($event)" :value="waybill.charge" :data_id="waybill.id" style="min-width:85px;display: none">
|
|
|
+ </td>
|
|
|
+ @else
|
|
|
+ <td class="td-warm" ><span v-if="waybill.charge">@{{waybill.charge|money}}</span></td>
|
|
|
+ @endcan
|
|
|
+{{-- <td class="td-warm ">--}}
|
|
|
+{{-- @{{waybill.charge}}--}}
|
|
|
+{{-- </td>--}}
|
|
|
+
|
|
|
<td class="td-warm">@{{waybill.other_charge}}</td>
|
|
|
<td class="td-warm">@{{waybill.other_charge_remark}}</td>
|
|
|
<td class="td-warm">
|
|
|
@@ -181,7 +196,16 @@
|
|
|
<span v-if="waybill.carType">@{{ waybill.carType.name }}<i v-if="waybill.carType.length">(@{{waybill.carType.length}}米)</i></span></span></td>
|
|
|
<td class="td-cool"><span v-if="waybill.warehouse_weight">@{{waybill.warehouse_weight|filterZero}} @{{waybill.warehouse_weight_unit}}</span></td>
|
|
|
<td class="td-cool"><span v-if="waybill.carrier_weight">@{{waybill.carrier_weight|filterZero}} @{{waybill.carrier_weight_unit}}</span></td>
|
|
|
- <td class="td-cool"><span v-if="waybill.warehouse_weight_other">@{{waybill.warehouse_weight_other|filterZero}} @{{waybill.warehouse_weight_unit_other}}</span></td>
|
|
|
+ <td class="td-cool" style="position: relative" @mouseenter="btnRefreshWeightZoomOut(waybill)" @mouseleave="btnRefreshWeightZoomIn(waybill)">
|
|
|
+ <span v-if="waybill.warehouse_weight_other&&waybill.btn_refresh_weight=='zoomIn'"> @{{waybill.warehouse_weight_other}} @{{waybill.warehouse_weight_unit_other}}</span>
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-info" @click="refreshWaveHouseWeight(waybill.wms_bill_number)"
|
|
|
+ :style="[
|
|
|
+ {position:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'absolute':'static'},
|
|
|
+ {transform:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'scale(0.55)':'scale(1)'},
|
|
|
+ {right:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'-10px':'auto'},
|
|
|
+ {bottom:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'-6px':'auto'},
|
|
|
+ ]">刷新</button>
|
|
|
+ </td>
|
|
|
<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">@{{waybill.mileage|km}} </td>
|
|
|
@@ -389,6 +413,7 @@
|
|
|
pick_up_fee:'{{$waybill->pick_up_fee}}',other_fee:'{{$waybill->other_fee}}',
|
|
|
collect_fee:'{{$waybill->collect_fee}}', @endcan deliver_at:'{{$waybill->deliver_at}}',dispatch_remark:'{{$waybill->dispatch_remark}}',isBtn:false,
|
|
|
waybillAuditLogs:{!! $waybill->waybillAuditLogs !!},
|
|
|
+ btn_refresh_weight:'zoomIn',
|
|
|
@if($waybill->remark)remark:'{{$waybill->remark}}', @else remark:'', @endif
|
|
|
},
|
|
|
@endforeach
|
|
|
@@ -470,6 +495,12 @@
|
|
|
this.form.init();
|
|
|
},
|
|
|
methods:{
|
|
|
+ btnRefreshWeightZoomIn(waybill){
|
|
|
+ waybill.btn_refresh_weight='zoomIn'
|
|
|
+ },
|
|
|
+ btnRefreshWeightZoomOut(waybill){
|
|
|
+ waybill.btn_refresh_weight='zoomOut'
|
|
|
+ },
|
|
|
lazy(){
|
|
|
//可视区域高度
|
|
|
let height=window.innerHeight;
|
|
|
@@ -518,9 +549,9 @@
|
|
|
tempTip.show('审核失败,网络连接错误!'+err);
|
|
|
});
|
|
|
},
|
|
|
- waybillUpdate(id){
|
|
|
- location.href="{{url('waybill/waybillEdit')}}/"+id;
|
|
|
- },
|
|
|
+ {{--waybillUpdate(id){--}}
|
|
|
+ {{-- location.href="{{url('waybill/waybillEdit')}}/"+id;--}}
|
|
|
+ {{--},--}}
|
|
|
// 软删除
|
|
|
waybillDestroy(id,waybill_number){
|
|
|
if(!confirm('确定要删除运单号为:“'+waybill_number+'”的运单吗?')){return};
|
|
|
@@ -574,9 +605,9 @@
|
|
|
tempTip.show('审核驳回失败,网络连接错误!'+err);
|
|
|
});
|
|
|
},
|
|
|
- job(id){
|
|
|
- location.href="{{url('waybill')}}/"+id+"/edit";
|
|
|
- },
|
|
|
+ {{--job(id){--}}
|
|
|
+ {{-- location.href="{{url('waybill')}}/"+id+"/edit";--}}
|
|
|
+ {{--},--}}
|
|
|
waybillEndAudit(id,waybill_number){
|
|
|
if(!confirm('确定要通过“'+waybill_number+'”的终审吗?')){return};
|
|
|
let _this=this;
|
|
|
@@ -765,6 +796,85 @@
|
|
|
tempTip.show("网络错误:"+err);
|
|
|
});
|
|
|
},
|
|
|
+ // 运输收费修改
|
|
|
+ waybillChargeCheck:function (e) {
|
|
|
+ let target = $(e.target);
|
|
|
+ target.hide();
|
|
|
+ let input = target.next();
|
|
|
+ input.show();
|
|
|
+ input.focus();
|
|
|
+ },
|
|
|
+ // 运输收费失焦事件
|
|
|
+ updateWaybillCharge:function (e) {
|
|
|
+ let target = $(e.target);
|
|
|
+ let _this = this;
|
|
|
+ let span = target.prev();
|
|
|
+ let id = target.attr('data_id');
|
|
|
+ let oldCharge = span.text();
|
|
|
+ let charge = target.val();
|
|
|
+ if(charge !== span.text()){
|
|
|
+ let ajaxUrl= '{{url("apiLocal/waybill/changeCharge")}}';
|
|
|
+ axios.post(ajaxUrl,{'id':id,'charge':charge}).then(function (response) {
|
|
|
+ if(response.data.success){
|
|
|
+ _this.updateWaybill(id,charge);
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('运输收费修改成功');
|
|
|
+ }else{
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('运输收费修改失败!'+response.data.fail_info);
|
|
|
+ _this.updateWaybill(id,oldCharge);
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('运输收费修改失败!网络异常:'+err);
|
|
|
+ _this.updateWaybill(id,oldCharge);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ span.show();
|
|
|
+ target.hide();
|
|
|
+ },
|
|
|
+ // 为运单添加运输收费
|
|
|
+ addWaybillCharge(e){
|
|
|
+ let target = $(e.target);
|
|
|
+ target.css('width','85px');
|
|
|
+ let _this = this;
|
|
|
+ let id = target.attr('data_id');
|
|
|
+ let charge = target.val();
|
|
|
+ console.log(charge);
|
|
|
+ let ajaxUrl= '{{url("apiLocal/waybill/changeCharge")}}';
|
|
|
+ if(charge === ''|| charge === null){
|
|
|
+ target.css('width','75px');
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ axios.post(ajaxUrl,{'id':id,'charge':charge}).then(function (response) {
|
|
|
+ if(response.data.success){
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('运输收费添加成功');
|
|
|
+ _this.updateWaybill(id,charge);
|
|
|
+ }else{
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('运输收费添加失败!'+response.data.fail_info);
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('运输收费添加失败!网络异常:'+err);
|
|
|
+ });
|
|
|
+ target.css('width','75px');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 修改运输收费更新表格数据
|
|
|
+ updateWaybill(id,newCharge){
|
|
|
+ this.waybills.some(function(waybill){
|
|
|
+ if(waybill.id === id){
|
|
|
+ waybill.charge = newCharge;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 运费修改
|
|
|
waybillFeeCheck:function (e) {
|
|
|
let target = $(e.target);
|
|
|
@@ -912,6 +1022,29 @@
|
|
|
let tip = target.parent().find('.toptd');
|
|
|
top.show();
|
|
|
tip.tooltip('hide');
|
|
|
+ },
|
|
|
+ refreshWaveHouseWeight(wms_bill_number) {
|
|
|
+ let _this=this;
|
|
|
+ let url='{{url('waybill/refreshWaveHouseWeight')}}';
|
|
|
+ axios.post(url,{'wms_bill_number':wms_bill_number}).then(function (response) {
|
|
|
+ if(response.data.success){
|
|
|
+ _this.waybills.every(function (waybill) {
|
|
|
+ if (waybill.wms_bill_number==wms_bill_number){
|
|
|
+ waybill.warehouse_weight_other=response.data.warehouseWeight;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('刷新计重成功');
|
|
|
+ }else{
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('刷新计重失败!'+response.data.fail_info);
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('刷新计重失败,网络连接错误!'+err);
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
filters:{
|