|
|
@@ -20,125 +20,137 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div id="form_div"></div>
|
|
|
<span class="dropdown">
|
|
|
<button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
|
|
|
data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
|
|
|
导出Excel
|
|
|
</button>
|
|
|
- <span class="dropdown-menu" style="z-index: 1099">
|
|
|
+ <div class="dropdown-menu" style="z-index: 1099">
|
|
|
<a class="dropdown-item" @click="waybillExport(false)" href="javascript:">导出勾选内容</a>
|
|
|
<a class="dropdown-item" @click="waybillExport(true)" href="javascript:">导出所有页</a>
|
|
|
- </span>
|
|
|
+ </div>
|
|
|
</span>
|
|
|
@can('运输管理-运单-图片上传')<button class="btn btn-sm btn-outline-info" data-target="#batchUploadImg" data-toggle="modal">批量上传图片</button>@endcan
|
|
|
+ @can('运输管理-运单-图片删除')<button class="btn btn-sm btn-outline-danger" @click="deleteImg()">批量删除图片</button>@endcan
|
|
|
+ @if($uriType=='' || $uriType=='专线')
|
|
|
+ @can('运输管理-运单-按日计算专线费')
|
|
|
+ <button class="btn btn-sm btn-outline-success tooltipTarget" data-target="#dailyBilling" data-toggle="modal"
|
|
|
+ title="计算指定日期下的所有专线费,不考虑有无货主权限">按日输入专线费</button>@endcan
|
|
|
+ @endif
|
|
|
<div>
|
|
|
@if(Session::has('successTip'))
|
|
|
<div class="alert alert-success h1">{{Session::get('successTip')}}</div>
|
|
|
@endif
|
|
|
</div>
|
|
|
<table class="table table-striped table-bordered table-hover text-nowrap waybill-table td-min-width-80" style="background: #fff;" id="table">
|
|
|
- <tr v-for="(waybill,i) in waybills" :style="[{color:waybill.status=='待重审'?'red':''||waybill.status=='已完结'?'green':''}]"
|
|
|
- :id="'waybill'+waybill.id" @click="selectedColor(waybill.id,$event)" position="static" @mouseover="hidetop($event)" @mouseleave="showtop($event)">
|
|
|
+ <tr v-for="(waybill,i) in waybills" :class="[waybill.status=='待重审'?'td-red':''||waybill.status=='已完结'?'td-green':'',selectTr==waybill.id ? 'tr-select' : '']"
|
|
|
+ :id="'waybill'+waybill.id" @click="selectedColor(waybill.id)" @mouseover="hidetop($event)" @mouseleave="showtop($event)">
|
|
|
<td><input class="checkItem" type="checkbox" :value="waybill.id"></td>
|
|
|
<td>
|
|
|
- <span v-if=waybill.status==="未审核"||waybill.status==="待重审">
|
|
|
+ <span>
|
|
|
+ <span v-if=waybill.status=="未审核"||waybill.status=="待重审">
|
|
|
@can('运输管理-运单-运单审核')
|
|
|
- <button class="btn btn-outline-primary btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>
|
|
|
- @endcan
|
|
|
- @can('运输管理-编辑')
|
|
|
- <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/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>
|
|
|
- <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">调度</a>
|
|
|
- @endcan
|
|
|
- </span>
|
|
|
- <span v-if=waybill.status==="待终审">
|
|
|
- @can('运输管理-运单-调度审核')
|
|
|
- <button class="btn btn-outline-success btn-sm" @click="waybillEndAudit(waybill.id,waybill.waybill_number)">完结</button>
|
|
|
- @endcan
|
|
|
- @can('运输管理-运单-调度')
|
|
|
- <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">改调度</a>
|
|
|
- @endcan
|
|
|
+ <button class="btn btn-outline-primary btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>
|
|
|
+ @endcan
|
|
|
+ @can('运输管理-编辑')
|
|
|
+ <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill/waybillEdit')}}/'+waybill.id)">修改</a>
|
|
|
+ @endcan
|
|
|
+ </span>
|
|
|
+ <span v-if=waybill.status=="已审核">
|
|
|
+ @can('运输管理-运单-调度')
|
|
|
+ <button class="btn btn-outline-secondary btn-sm" @click="waybillRetreatAudit(waybill)">取消审核</button>
|
|
|
+ <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">调度</a>
|
|
|
+ @endcan
|
|
|
+ </span>
|
|
|
+ <span v-if=waybill.status==="待终审">
|
|
|
+ @can('运输管理-运单-调度审核')
|
|
|
+ <button class="btn btn-outline-success btn-sm" @click="waybillEndAudit(waybill.id,waybill.waybill_number)">完结</button>
|
|
|
+ @endcan
|
|
|
+ @can('运输管理-运单-调度')
|
|
|
+ <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">改调度</a>
|
|
|
+ @endcan
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</td>
|
|
|
@can('运输管理-运单-置顶')
|
|
|
- <td class="td-warm text-muted" v-if="waybill.remark" style="height: 55px">
|
|
|
- <button type="button" class="btn btn-sm btn-outline-danger " @click="cancelOnTop($event)" :data_id="waybill.id" style="opacity: 0.75">取消</button>
|
|
|
- </td>
|
|
|
- <td v-else>
|
|
|
- <button type="button" class="btn btn-sm btn-outline-secondary" @click="waybillOnTop($event)" :data_id="waybill.id" style="opacity: 0.75">置顶</button>
|
|
|
+ <td class="td-warm text-muted" style="height: 55px">
|
|
|
+ <span>
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-danger" v-if="waybill.remark" @click="cancelOnTop($event)" :data_id="waybill.id" style="opacity: 0.75">取消</button>
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-secondary" v-else @click="waybillOnTop($event)" :data_id="waybill.id" style="opacity: 0.75">置顶</button>
|
|
|
+ </span>
|
|
|
</td>
|
|
|
@endcan
|
|
|
- <td :class="[waybill.status=='已审核'?'text-success':'']">@{{waybill.status}}</td>
|
|
|
- <td class="td-warm text-muted toptd" >
|
|
|
- <div v-if="waybill.remark" class="bg-light-yellow text-danger top" data-toggle="tooltip" style="opacity: 0.1;position: absolute;z-index: 1"
|
|
|
- >置顶备注:@{{ waybill.remark }}</div>
|
|
|
+ <td :class="[waybill.status=='已审核'?'text-success':'']"><span>@{{waybill.status}}</span></td>
|
|
|
+ <td class="td-warm text-muted toptd position-static">
|
|
|
+ <div v-if="waybill.remark" class="bg-light-yellow text-danger top position-absolute" data-toggle="tooltip" style="opacity: 0.1;z-index: 1">置顶备注:@{{ waybill.remark }}</div>
|
|
|
@{{ i+1 }}</td>
|
|
|
- <td class="td-warm text-muted">@{{waybill.created_at}}</td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{waybill.created_at}}</span></td>
|
|
|
<td class="td-warm text-muted">
|
|
|
- <a href="#" v-if="waybill.waybillAuditLogs.length>0" class="dropdown-toggle" data-toggle="dropdown">
|
|
|
- @{{ waybill.waybillAuditLogs[0].user ? waybill.waybillAuditLogs[0].user.name : '系统' }}<b class="caret"></b>
|
|
|
- </a>
|
|
|
- <div style="position: absolute;width:320px;margin-left:-100px;background-color: white;max-height:150px ;overflow-y:auto" class="small mt-0 dropdown-menu">
|
|
|
- <table class="table table-sm table-striped table-bordered">
|
|
|
- <tr>
|
|
|
- <th>经手人</th>
|
|
|
- <th>操作</th>
|
|
|
- <th>时间</th>
|
|
|
- </tr>
|
|
|
- <tr v-for="people in waybill.waybillAuditLogs">
|
|
|
- <td>@{{ people.user ? people.user.name : '系统' }}</td>
|
|
|
- <td class="text-danger font-weight-bold">@{{ people.audit_stage }}</td>
|
|
|
- <td>@{{ people.created_at }}</td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
+ <div>
|
|
|
+ <a href="#" v-if="waybill.waybillAuditLogs.length>0" class="dropdown-toggle" data-toggle="dropdown">
|
|
|
+ @{{ waybill.waybillAuditLogs[0].user ? waybill.waybillAuditLogs[0].user.name : '系统' }}<b class="caret"></b>
|
|
|
+ </a>
|
|
|
+ <div style="position: absolute;width:320px;margin-left:-100px;background-color: white;max-height:150px ;overflow-y:auto" class="small mt-0 dropdown-menu">
|
|
|
+ <table class="table table-sm table-striped table-bordered">
|
|
|
+ <tr>
|
|
|
+ <th>经手人</th>
|
|
|
+ <th>操作</th>
|
|
|
+ <th>时间</th>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="people in waybill.waybillAuditLogs">
|
|
|
+ <td>@{{ people.user ? people.user.name : '系统' }}</td>
|
|
|
+ <td class="text-danger font-weight-bold">@{{ people.audit_stage }}</td>
|
|
|
+ <td>@{{ people.created_at }}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td class="td-warm">@{{waybill.type}} <span class="badge badge-sm bg-warning" v-if="(waybill.collect_fee && waybill.collect_fee>0) || waybill.is_to_pay=='1'">到付</span></td>
|
|
|
- <td class="td-warm">@{{waybill.owner}}</td>
|
|
|
- <td class="td-warm toptd" :title="waybill.remark? '置顶备注:'+waybill.remark :''">@{{waybill.source_bill}}</td>
|
|
|
+ <td class="td-warm"><span>@{{waybill.type}}</span> <span class="badge badge-sm bg-warning" v-if="(waybill.collect_fee && waybill.collect_fee>0) || waybill.is_to_pay=='1'">到付</span></td>
|
|
|
+ <td class="td-warm"><span>@{{waybill.owner}}</span></td>
|
|
|
+ <td class="td-warm toptd" :title="waybill.remark? '置顶备注:'+waybill.remark :''"><span>@{{waybill.source_bill}}</span></td>
|
|
|
<td class="td-warm">
|
|
|
- <span class="badge badge-pill badge-danger" v-if="waybill.is_cancel">取消</span>
|
|
|
- @{{waybill.wms_bill_number}}
|
|
|
+ <span>
|
|
|
+ <span class="badge badge-pill badge-danger" v-if="waybill.is_cancel">取消</span>
|
|
|
+ <span>@{{waybill.wms_bill_number}}</span>
|
|
|
+ </span>
|
|
|
</td>
|
|
|
- <td class="td-warm">@{{ waybill.order_status }}</td>
|
|
|
- <td class="td-warm">@{{waybill.end_date}}</td>
|
|
|
- <td class="td-warm">@{{waybill.waybill_number}}</td>
|
|
|
+ <td class="td-warm"><span>@{{ waybill.order_status }}</span></td>
|
|
|
+ <td class="td-warm"><span>@{{waybill.end_date}}</span></td>
|
|
|
+ <td class="td-warm"><span>@{{waybill.waybill_number}}</span></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>
|
|
|
+ <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.other_charge}}</td>
|
|
|
- <td class="td-warm">@{{waybill.other_charge_remark}}</td>
|
|
|
+ <td class="td-warm"><span>@{{waybill.other_charge}}</span></td>
|
|
|
+ <td class="td-warm"><span>@{{waybill.other_charge_remark}}</span></td>
|
|
|
<td class="td-warm">
|
|
|
- <div align="center" @mouseleave="removeCommonImg('common_img_'+waybill.id)" @mouseenter="commonImg('img_'+waybill.id,waybill.url,waybill.suffix)">
|
|
|
- <img v-if="waybill.url" :id="'img_'+waybill.id" :src="waybill.url+'-thumbnail.'+waybill.suffix"
|
|
|
- {{--:data-src="waybill.url+'-thumbnail.'+waybill.suffix" src="{{url('icon/img404-thumbnail.jpg')}}"--}}>
|
|
|
- @can('运输管理-运单-图片上传')<div v-if="!waybill.url">
|
|
|
+ <div align="center" @mouseleave="removeCommonImg('common_img_'+waybill.id)" @mouseenter="commonImg('img_'+waybill.id,waybill.uploadFiles)">
|
|
|
+ @can('运输管理-运单-图片上传')<div>
|
|
|
<input class="btn btn-sm btn-outline-secondary" type="button" @click="certiimg(waybill.waybill_number)" value="上传照片 "/>
|
|
|
- <input type="file" @change="submitFile($event,waybill.waybill_number)" :id="waybill.waybill_number"
|
|
|
+ <input multiple type="file" @change="submitFile($event,i)" :id="waybill.waybill_number"
|
|
|
style="display: none" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
|
|
|
</div>@endcan
|
|
|
+ <div :id="'img_'+waybill.id">
|
|
|
+ <img v-for="uploadFile in waybill.uploadFiles" :src="imgPrefix+uploadFile.url+'-thumbnail.'+uploadFile.type">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td class="td-cool">@{{waybill.recipient}}</td>
|
|
|
- <td class="td-cool">@{{waybill.recipient_mobile}}</td>
|
|
|
- <td class="td-cool text-muted">@{{waybill.origination}}</td>
|
|
|
- <td class="td-cool text-muted">@{{waybill.province}}</td>
|
|
|
- <td class="td-cool text-muted">@{{waybill.city}}</td>
|
|
|
- <td class="td-cool text-muted">@{{waybill.district}}</td>
|
|
|
- <td class="td-cool text-muted">@{{waybill.destination}}</td>
|
|
|
- <td class="td-cool">@{{waybill.carrier}}</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>
|
|
|
+ <td class="td-cool text-muted"><span>@{{waybill.province}}</span></td>
|
|
|
+ <td class="td-cool text-muted"><span>@{{waybill.city}}</span></td>
|
|
|
+ <td class="td-cool text-muted"><span>@{{waybill.district}}</span></td>
|
|
|
+ <td class="td-cool text-muted"><span>@{{waybill.destination}}</span></td>
|
|
|
+ <td class="td-cool"><span>@{{waybill.carrier}}</span></td>
|
|
|
<td class="td-cool">
|
|
|
<span v-if="waybill.carrier_bill">
|
|
|
@{{waybill.carrier_bill}}<span v-if="waybill.carType">/@{{ waybill.carType.name }}<i v-if="waybill.carType.length">(@{{waybill.carType.length}}米)</i></span>
|
|
|
@@ -152,34 +164,38 @@
|
|
|
<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 text-center" 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="[
|
|
|
+ <span>
|
|
|
+ <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>
|
|
|
+ </span>
|
|
|
</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>
|
|
|
+ <td class="td-cool"><span>@{{waybill.mileage|km}}</span></td>
|
|
|
@can('运输管理-运单-可见费用项')
|
|
|
@can('运输管理-运单-运费')
|
|
|
- <td class="td-helpful" v-if="waybill.fee">
|
|
|
- <span v-if="waybill.type==='专线'"></span>
|
|
|
- <span v-else-if="waybill.fee" class="btn-sm btn-outline-secondary btn" @click="waybillFeeCheck($event)" :data_id="waybill.id">@{{waybill.fee|money}}</span>
|
|
|
- <input type="number" class="form-control form-control-sm" @blur="updateWaybillFee($event)" :value="waybill.fee" :data_id="waybill.id" style="min-width:85px;display: none">
|
|
|
- </td>
|
|
|
- <td class="td-helpful" v-else>
|
|
|
- <span v-if="waybill.type==='专线'"></span>
|
|
|
- <input v-else type="number" class="form-control form-control-sm" @blur="addWaybillFee($event)" onfocus="$(this).css('width','85px')" :value="waybill.fee" :data_id="waybill.id" >
|
|
|
+ <td class="td-helpful">
|
|
|
+ <label v-if="waybill.fee">
|
|
|
+ <span v-if="waybill.type==='专线'"></span>
|
|
|
+ <span v-else-if="waybill.fee" class="btn-sm btn-outline-secondary btn" @click="waybillFeeCheck($event)" :data_id="waybill.id">@{{waybill.fee|money}}</span>
|
|
|
+ <input type="number" class="form-control form-control-sm" @blur="updateWaybillFee($event)" :value="waybill.fee" :data_id="waybill.id" style="min-width:85px;display: none">
|
|
|
+ </label>
|
|
|
+ <label v-else>
|
|
|
+ <span v-if="waybill.type==='专线'"></span>
|
|
|
+ <input v-else type="number" class="form-control form-control-sm" @blur="addWaybillFee($event)" onfocus="$(this).css('width','85px')" :value="waybill.fee" :data_id="waybill.id" >
|
|
|
+ </label>
|
|
|
</td>
|
|
|
@endcan
|
|
|
- <td class="td-helpful">@{{waybill.pick_up_fee}}</td>
|
|
|
- <td class="td-helpful">@{{waybill.other_fee}}</td>
|
|
|
+ <td class="td-helpful"><span>@{{waybill.pick_up_fee}}</span></td>
|
|
|
+ <td class="td-helpful"><span>@{{waybill.other_fee}}</span></td>
|
|
|
@endcan
|
|
|
- <td class="td-helpful">@{{waybill.deliver_at}}</td>
|
|
|
+ <td class="td-helpful"><span>@{{waybill.deliver_at}}</span></td>
|
|
|
<td class="td-helpful"><span v-html="waybill.dispatch_remark"></span></td>
|
|
|
@can('运输管理-运单-删除')
|
|
|
<td class="td-operation">
|
|
|
@@ -245,9 +261,9 @@
|
|
|
.top{
|
|
|
padding-top: 0;
|
|
|
padding-left: 10px;
|
|
|
- margin-top: -4px;
|
|
|
+ margin-top: -32px;
|
|
|
margin-left: -5px;
|
|
|
- line-height: 55px;
|
|
|
+ line-height: 50px;
|
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
@@ -267,19 +283,19 @@
|
|
|
</style>
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
|
|
|
- <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
|
|
|
+ <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
|
|
|
<script>
|
|
|
let vue = new Vue({
|
|
|
el:'#list',
|
|
|
data:{
|
|
|
+ imgPrefix:"{{asset("/storage")}}",
|
|
|
waybills:[
|
|
|
@foreach($waybills as $waybill)
|
|
|
{
|
|
|
id:'{{$waybill->id}}',
|
|
|
created_at:'{{$waybill->created_at}}',
|
|
|
updated_at:'{{$waybill->updated_at}}',
|
|
|
- url:'{{$waybill->uploadFile ? asset('/storage'.$waybill->uploadFile->url) : ''}}',
|
|
|
- suffix:'{{$waybill->uploadFile ? $waybill->uploadFile->type : ''}}',
|
|
|
+ uploadFiles:{!! $waybill->uploadFiles !!},
|
|
|
status:'{{$waybill->status}}',
|
|
|
type:'{{$waybill->type}}',
|
|
|
end_date:'{{($waybill->order&&$waybill->order->wms_status=='订单完成') ? $waybill->order->wms_edittime:'-'}}',
|
|
|
@@ -310,8 +326,9 @@
|
|
|
mileage:'{{$waybill->mileage}}',
|
|
|
amount:'{{$waybill->amount}}',
|
|
|
@if($waybill->carType)carType:{!! $waybill->carType !!},car_owner_info:'{{$waybill->car_owner_info}}',@endif
|
|
|
- @can('运输管理-运单-可见费用项') fee:'{{$waybill->fee}}',
|
|
|
- pick_up_fee:'{{$waybill->pick_up_fee}}',other_fee:'{{$waybill->other_fee}}',
|
|
|
+ @can('运输管理-运单-可见费用项') fee:'{{$waybill->fee}}',
|
|
|
+ pick_up_fee:'{{$waybill->pick_up_fee? round($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}}',
|
|
|
@@ -327,12 +344,16 @@
|
|
|
},
|
|
|
@endforeach
|
|
|
],
|
|
|
- selectedStyle:[],
|
|
|
owners:[
|
|
|
@foreach($owners as $owner)
|
|
|
{name:'{{$owner->id}}',value:'{{$owner->name}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
+ carTypes:[
|
|
|
+ @foreach($carTypes as $carType)
|
|
|
+ {name:'{{$carType->id}}',value:'{{$carType->name}}'},
|
|
|
+ @endforeach
|
|
|
+ ],
|
|
|
logistics:[
|
|
|
@foreach($logistics as $logistic)
|
|
|
{name:"{{$logistic->id}}",value:'{{$logistic->name}}'},
|
|
|
@@ -358,7 +379,9 @@
|
|
|
images:[],
|
|
|
batchUploadError:[],
|
|
|
size:0,
|
|
|
- selectTr:''
|
|
|
+ selectTr:'',
|
|
|
+ dailyBilling:{screenDate:'', billing:''},
|
|
|
+ error:{screenDate:'', billing:''},
|
|
|
},
|
|
|
mounted:function(){
|
|
|
$(".tooltipTarget").tooltip({'trigger':'hover'});
|
|
|
@@ -367,22 +390,32 @@
|
|
|
[
|
|
|
{name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
|
|
|
placeholder:['货主','定位或多选货主'],data:this.owners},
|
|
|
- {name:'created_at_start',type:'time',tip:['选择显示指定日期的起始时间','选择显示指定日期的起始时间']},
|
|
|
+ {name:'created_at_start',type:'time',tip:['选择显示创建日期的起始时间','选择显示创建日期的起始时间']},
|
|
|
{name:'origination',type:'input',tip:'始发地:可在左侧增加百分号(%)进行模糊搜索',placeholder: '始发地'},
|
|
|
- {name:'carrier_bill',type:'input',tip:'承运商单号:可在左侧增加百分号(%)进行模糊搜索',placeholder: '承运商单号'},
|
|
|
+ {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:'source_bill',type:'input',tip: '上游单号:可在左侧增加百分号(%)进行模糊搜索',placeholder: '上游单号'},
|
|
|
- {name:'recipient',type:'input',tip: '收货人姓名:可在左侧增加百分号(%)进行模糊搜索',placeholder: '收货人姓名'},
|
|
|
- {name:'car_owner_info',type:'input',tip: '车辆信息:可在左侧增加百分号(%)进行模糊搜索',placeholder: '车辆信息'},
|
|
|
],
|
|
|
[
|
|
|
- {name:'wms_bill_number',type:'input',tip:'WMS单号:可在两侧增加百分号(%)进行模糊搜索',placeholder: 'WMS单号'},
|
|
|
- {name:'created_at_end',type:'time',tip:['选择显示指定日期的结束时间','选择显示指定日期的结束时间']},
|
|
|
+ {name:'wms_bill_number',type:'input',tip:'可支持多WMS单号:可在两侧增加百分号(%)进行模糊搜索',placeholder: 'WMS单号'},
|
|
|
+ {name:'created_at_end',type:'time',tip:['选择显示创建日期的结束时间','选择显示创建日期的结束时间']},
|
|
|
{name:'destination',type:'input',tip:'目的地:可在两侧增加百分号(%)进行模糊搜索',placeholder: '目的地'},
|
|
|
+ {name:'updated_at_end',type:'time',tip:['选择显示完结日期的结束时间','选择显示完结日期的结束时间']},
|
|
|
{name:'waybill_number',type:'input',tip:'运单号:可在两侧增加百分号(%)进行模糊搜索',placeholder: '运单号'},
|
|
|
- {name:'logistic_id',type:'select',placeholder: '承运商',data:this.logistics},
|
|
|
- {name:'recipient_mobile',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: '客户订单号'},
|
|
|
+ {name:'recipient',type:'input',tip: '可支持多收货人姓名:可在左侧增加百分号(%)进行模糊搜索',placeholder: '收货人姓名'},
|
|
|
+ {name:'recipient_mobile',type:'input',tip: '可支持多收货人电话:可在左侧增加百分号(%)进行模糊搜索',placeholder: '收货人电话'},
|
|
|
+ {name:'car_owner_info',type:'input',tip: '车辆信息:可在左侧增加百分号(%)进行模糊搜索',placeholder: '车辆信息'},
|
|
|
+ {name:'mileage',type:'input',tip: '里程:范围-范围',placeholder: '里程'},
|
|
|
+ {name:'warehouse_weight_other',type:'input',tip: '仓库计重:范围-范围',placeholder: '仓库计重'},
|
|
|
+ {name:'carType_id',type:'select',placeholder: '车型',data:this.carTypes},
|
|
|
+ ]
|
|
|
];
|
|
|
let param=[];
|
|
|
this.$set(param,"uriType",'{{$uriType}}');
|
|
|
@@ -392,68 +425,151 @@
|
|
|
param:param,
|
|
|
});
|
|
|
this.form.init();
|
|
|
- let column = [
|
|
|
- @can('运输管理-编辑','运输管理-运单-运单审核','运输管理-运单-调度','运输管理-编辑')
|
|
|
- {name:'operation',value: '操作', neglect: true, class:"td-operation"},@endcan
|
|
|
- {name:'onTop',value: '置顶', neglect: true, class:"td-operation"},
|
|
|
- {name:'status',value: '状态', class:"td-operation"},
|
|
|
- {name:'index',value: '序号', neglect: true, class:"td-warm"},
|
|
|
- {name:'created_at', neglect: true,value: '创建时间', class:"td-warm"},
|
|
|
- {name:'operating',value: '操作记录', class:"td-warm"},
|
|
|
- {name:'type',value: '运单类型', class:"td-warm"},
|
|
|
- {name:'owner',value: '货主', class:"td-warm"},
|
|
|
- {name:'source_bill',value: '上游单号', class:"td-warm"},
|
|
|
- {name:'wms_bill_number',value: 'WMS订单号', class:"td-warm"},
|
|
|
- {name:'order_status',value: '订单状态', class:"td-warm"},
|
|
|
- {name:'end_date',value: '完结时间', class:"td-warm"},
|
|
|
- {name:'waybill_number',value: '运单号', class:"td-warm"},
|
|
|
- {name:'charge',value: '运输收费', neglect: true, class:"td-warm"},
|
|
|
- {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:'recipient',value: '收件人', class:"td-cool"},
|
|
|
- {name:'recipient_mobile',value: '收件人电话', class:"td-cool"},
|
|
|
- {name:'origination',value: '始发地', class:"td-cool"},
|
|
|
- {name:'province',value: '省', class:"td-cool"},
|
|
|
- {name:'city',value: '市', class:"td-cool"},
|
|
|
- {name:'district',value: '区', class:"td-cool"},
|
|
|
- {name:'destination',value: '目的地', class:"td-cool"},
|
|
|
- {name:'carrier',value: '承运商', class:"td-cool"},
|
|
|
- {name:'carrier_bill',value: '单号/车型', neglect: true, class:"td-cool"},
|
|
|
- {name:'car_owner_info',value: '车辆信息', neglect: true, class:"td-cool"}, // 车辆信息
|
|
|
- {name:'warehouse_weight',value: '仓库计抛', neglect: true, class:"td-cool"},
|
|
|
- {name:'carrier_weight',value: '承运商计抛', neglect: true, class:"td-cool"},
|
|
|
- {name:'warehouse_weight_other',value: '仓库计重', neglect: true, class:"td-cool"},
|
|
|
- {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"},
|
|
|
- @can('运输管理-运单-运费'){name:'fee',value: '运费', neglect: true, class:"td-helpful"},@endcan
|
|
|
- {name:'pick_up_fee',value: '提货费', neglect: true, class:"td-helpful"},
|
|
|
- {name:'other_fee',value: '其他支出', neglect: true, class:"td-helpful"},
|
|
|
- {name:'deliver_at',value: '发货时间', class:"td-helpful"},
|
|
|
- {name:'dispatch_remark',value: '调度备注', class:"td-helpful"},
|
|
|
- @can('运输管理-运单-删除'){name:'remove',value: '操作', neglect: true, class:"td-delete"},@endcan
|
|
|
- ];
|
|
|
- new Header({
|
|
|
- el: "table",
|
|
|
- name: "waybill",
|
|
|
- column: column,
|
|
|
- data: this.waybills,
|
|
|
- restorationColumn: 'id',
|
|
|
- fixedTop:($('#form_div').height())+2,
|
|
|
- before : [
|
|
|
- {colspan:'4',value: '', class:"table-header-layer-1"},
|
|
|
- {colspan:'14',value: '运单信息',font:"fa fa-file-text-o", class:"table-header-layer-1"},
|
|
|
- {colspan:'16',value: '运输信息',font:"fa fa-truck", class:"table-header-layer-1"},
|
|
|
- {colspan:'5',value: '运输信息',font:"fa fa-rmb", class:"table-header-layer-1"},
|
|
|
- @can('运输管理-运单-删除'){colspan:'1',value: '',font:"", class:"table-header-layer-1"},@endcan
|
|
|
- ],
|
|
|
- }).init();
|
|
|
+ this.rendingHeader();
|
|
|
this.paginate = $("#paginate").val();
|
|
|
let waybill = $('.table-header-layer-1')[1];
|
|
|
$('.top').css('min-width', waybill.scrollWidth);
|
|
|
+ this.rendingFloatBtn();
|
|
|
},
|
|
|
methods:{
|
|
|
+ rendingFloatBtn(){
|
|
|
+ let parent = $('.pick-btn :visible');
|
|
|
+ if (parent.length<1)return;
|
|
|
+ parent = parent[0];
|
|
|
+ let node = document.createElement("btn");
|
|
|
+ parent.className += "position-relative";
|
|
|
+ node.className = "position-absolute btn btn-sm btn-success total-fee";
|
|
|
+ node.style.top=0;
|
|
|
+ node.style.left=0;
|
|
|
+ node.style.marginTop="-16%";
|
|
|
+ node.innerText = '总计';
|
|
|
+ parent.before(node);
|
|
|
+ node.onclick=this.countPickUpFee;
|
|
|
+ },
|
|
|
+ countPickUpFee(){
|
|
|
+ let url = '{{url('transport/waybill/countPickUpFee')}}';
|
|
|
+ let urlRequest = location.search; //获取url中"?"符后的字串
|
|
|
+ let theRequest = {};
|
|
|
+ if (urlRequest.indexOf("?") != -1) {
|
|
|
+ let str = urlRequest.substr(1);
|
|
|
+ let strs = str.split("&");
|
|
|
+ for(let i = 0; i < strs.length; i ++) {
|
|
|
+ theRequest[strs[i].split("=")[0]] = decodeURIComponent(decodeURI(strs[i].split("=")[1]));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ window.axios.post(url,{param:theRequest})
|
|
|
+ .then(response=> {
|
|
|
+ if (!response.data.success){
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.show(response.data.message);
|
|
|
+ }else{
|
|
|
+ $('.total-fee').text('总计:'+response.data.data);
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('根据当前筛选条件计算专线提货费成功')
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ ).catch(function (err){
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.show('根据当前筛选条件计算专线提货费失败,网络连接错误!'+err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ dailyBillingCount(){
|
|
|
+ if (this.dailyBilling.screenDate==='')this.error.screenDate='请指定日期';
|
|
|
+ if (this.dailyBilling.billing==='')this.error.billing='专线费必填';
|
|
|
+ if (this.dailyBilling.billing && this.dailyBilling.screenDate)this.error={};
|
|
|
+ if (this.error.billing ||this.error.screenDate)return;
|
|
|
+ let url = '{{url('transport/waybill/dailyBilling')}}';
|
|
|
+ let param=this.dailyBilling;
|
|
|
+ window.axios.post(url,{param:param})
|
|
|
+ .then(response=> {
|
|
|
+ if (!response.data.success){
|
|
|
+ $('#dailyBilling').modal('hide');
|
|
|
+ this.dailyBilling={};
|
|
|
+ this.error={};
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show(response.data.message);
|
|
|
+ }else{
|
|
|
+ this.waybills.forEach(function (waybill){
|
|
|
+ response.data.data.forEach(function (item){
|
|
|
+ if (waybill.id==item.id){
|
|
|
+ waybill.pick_up_fee=item.pick_up_fee;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ $('#dailyBilling').modal('hide');
|
|
|
+ this.dailyBilling={};
|
|
|
+ this.error={};
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('按日输入专线费成功')
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ ).catch(function (err){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('按日输入专线费失败,网络连接错误!'+err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ rendingHeader(){
|
|
|
+ let column = [
|
|
|
+ @can('运输管理-编辑','运输管理-运单-运单审核','运输管理-运单-调度','运输管理-编辑')
|
|
|
+ {name:'operation',value: '操作', neglect: true, class:"td-operation"},@endcan
|
|
|
+ {name:'onTop',value: '置顶', neglect: true, class:"td-operation"},
|
|
|
+ {name:'status',value: '状态', class:"td-operation"},
|
|
|
+ {name:'index',value: '序号', neglect: true, class:"td-warm"},
|
|
|
+ {name:'created_at', neglect: true,value: '创建时间', class:"td-warm"},
|
|
|
+ {name:'operating',value: '操作记录', class:"td-warm"},
|
|
|
+ {name:'type',value: '运单类型', class:"td-warm"},
|
|
|
+ {name:'owner',value: '货主', class:"td-warm"},
|
|
|
+ {name:'source_bill',value: '客户订单号', class:"td-warm"},
|
|
|
+ {name:'wms_bill_number',value: 'WMS订单号', class:"td-warm"},
|
|
|
+ {name:'order_status',value: '订单状态', class:"td-warm"},
|
|
|
+ {name:'end_date',value: '完结时间', class:"td-warm"},
|
|
|
+ {name:'waybill_number',value: '运单号', class:"td-warm"},
|
|
|
+ {name:'charge',value: '运输收费', neglect: true, class:"td-warm"},
|
|
|
+ {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"},
|
|
|
+ {name:'province',value: '省', class:"td-cool"},
|
|
|
+ {name:'city',value: '市', class:"td-cool"},
|
|
|
+ {name:'district',value: '区', class:"td-cool"},
|
|
|
+ {name:'destination',value: '目的地', class:"td-cool"},
|
|
|
+ {name:'carrier',value: '承运商', class:"td-cool"},
|
|
|
+ {name:'carrier_bill',value: '单号/车型', neglect: true, class:"td-cool"},
|
|
|
+ {name:'car_owner_info',value: '车辆信息', neglect: true, class:"td-cool"}, // 车辆信息
|
|
|
+ {name:'warehouse_weight',value: '仓库计抛', neglect: true, class:"td-cool"},
|
|
|
+ {name:'carrier_weight',value: '承运商计抛', neglect: true, class:"td-cool"},
|
|
|
+ {name:'warehouse_weight_other',value: '仓库计重', neglect: true, class:"td-cool"},
|
|
|
+ {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"},
|
|
|
+ @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"},
|
|
|
+ {name:'deliver_at',value: '发货时间', class:"td-helpful"},
|
|
|
+ {name:'dispatch_remark',value: '调度备注', class:"td-helpful"},
|
|
|
+ @can('运输管理-运单-删除'){name:'remove',value: '操作', neglect: true, class:"td-delete"},@endcan
|
|
|
+ ];
|
|
|
+ new Header({
|
|
|
+ el: "table",
|
|
|
+ name: "waybill",
|
|
|
+ column: column,
|
|
|
+ data: this.waybills,
|
|
|
+ restorationColumn: 'id',
|
|
|
+ fixedTop:($('#form_div').height())+2,
|
|
|
+ before : [
|
|
|
+ {colspan:'4',value: '', class:"table-header-layer-1"},
|
|
|
+ {colspan:'14',value: '运单信息',font:"fa fa-file-text-o", class:"table-header-layer-1"},
|
|
|
+ {colspan:'17',value: '运输信息',font:"fa fa-truck", class:"table-header-layer-1"},
|
|
|
+ {colspan:'5',value: '收费信息',font:"fa fa-rmb", class:"table-header-layer-1"},
|
|
|
+ @can('运输管理-运单-删除'){colspan:'1',value: '',font:"", class:"table-header-layer-1"},@endcan
|
|
|
+ ],
|
|
|
+ }).init();
|
|
|
+ },
|
|
|
btnRefreshWeightZoomIn(waybill){
|
|
|
waybill.btn_refresh_weight='zoomIn'
|
|
|
},
|
|
|
@@ -461,34 +577,27 @@
|
|
|
waybill.btn_refresh_weight='zoomOut'
|
|
|
},
|
|
|
waybillAudit(id,waybill_number){
|
|
|
- if(!confirm('确定要通过“'+waybill_number+'”的审核吗?')){return};
|
|
|
+ if(!confirm('确定要通过“'+waybill_number+'”的审核吗?'))return
|
|
|
let _this=this;
|
|
|
- let w;
|
|
|
let url = '{{url('transport/waybill/waybillAudit')}}';
|
|
|
- axios.post(url, {id:id})
|
|
|
+ window.axios.post(url, {id:id})
|
|
|
.then(
|
|
|
function (response) {
|
|
|
+ window.tempTip.setDuration(3000);
|
|
|
if (response.data.success){
|
|
|
_this.waybills.forEach(function (waybill) {
|
|
|
if (waybill.id===id){
|
|
|
waybill.status=response.data.status;
|
|
|
waybill.waybillAuditLogs.push(response.data.waybillAuditLog);
|
|
|
- w=waybill.waybill_number;
|
|
|
}
|
|
|
});
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('审核'+w+'成功!');
|
|
|
- }else if (response.data.exception!=null){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.exception);
|
|
|
- }else {
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('审核失败!');
|
|
|
- }
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.showSuccess('审核'+waybill_number+'成功!');
|
|
|
+ }else if (response.data.exception!=null)window.tempTip.show(response.data.exception);
|
|
|
+ else window.tempTip.show('审核失败!');
|
|
|
}
|
|
|
).catch(function (err) {
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('审核失败,网络连接错误!'+err);
|
|
|
+ window.tempTip.show('审核失败,网络连接错误!'+err);
|
|
|
});
|
|
|
},
|
|
|
waybillDestroy(id,waybill_number,index){
|
|
|
@@ -512,36 +621,22 @@
|
|
|
});
|
|
|
|
|
|
},
|
|
|
- waybillRetreatAudit(id,waybill_number){
|
|
|
- if(!confirm('确定要驳回“'+waybill_number+'”的审核吗?')){return};
|
|
|
- let _this=this;
|
|
|
- let w;
|
|
|
+ waybillRetreatAudit(waybill){
|
|
|
+ if(!confirm('确定要驳回“'+waybill.waybill_number+'”的审核吗?'))return;
|
|
|
let url='{{url('transport/waybill/waybillRetreatAudit')}}';
|
|
|
- axios.post(url,{id:id})
|
|
|
- .then(
|
|
|
- function (response) {
|
|
|
+ window.axios.post(url,{id:waybill.id})
|
|
|
+ .then(response=> {
|
|
|
+ window.tempTip.setDuration(3000);
|
|
|
if (response.data.success){
|
|
|
- _this.waybills.forEach(function (waybill){
|
|
|
- if (waybill.id===id){
|
|
|
- waybill.status=response.data.status;
|
|
|
- waybill.waybillAuditLogs=[];
|
|
|
- w=waybill.waybill_number;
|
|
|
- }
|
|
|
- });
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess(w+'审核驳回成功!');
|
|
|
- }else {
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('审核驳回失败!');
|
|
|
- }
|
|
|
+ waybill.status = response.data.status;
|
|
|
+ waybill.waybillAuditLogs.push(response.data.log);
|
|
|
+ window.tempTip.showSuccess(waybill.waybill_number+'审核驳回成功!');
|
|
|
+ }else window.tempTip.show('审核驳回失败!');
|
|
|
}
|
|
|
- ).catch(function (err) {
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('审核驳回失败,网络连接错误!'+err);
|
|
|
- });
|
|
|
+ ).catch(function (err){window.tempTip.show('审核驳回失败,网络连接错误!'+err)})
|
|
|
},
|
|
|
waybillEndAudit(id,waybill_number){
|
|
|
- if(!confirm('确定要通过“'+waybill_number+'”的终审吗?')){return};
|
|
|
+ if(!confirm('确定要通过“'+waybill_number+'”的终审吗?'))return;
|
|
|
let _this=this;
|
|
|
let w;
|
|
|
let url='{{url('transport/waybill/waybillEndAudit')}}';
|
|
|
@@ -576,12 +671,9 @@
|
|
|
let token='{{ csrf_token() }}';
|
|
|
excelExport(checkAllSign,checkData,url,this.sum,token);
|
|
|
},
|
|
|
- selectedColor(id,e){
|
|
|
- if (id==this.selectedStyle){
|
|
|
- this.selectedStyle='';
|
|
|
- return;
|
|
|
- }
|
|
|
- this.selectedStyle=id;
|
|
|
+ selectedColor(id){
|
|
|
+ if (id && id===this.selectTr)return;
|
|
|
+ this.selectTr=id;
|
|
|
},
|
|
|
mouseleaveOwner:function () {
|
|
|
if(!this.isOut&&!this.isBlur){
|
|
|
@@ -596,50 +688,35 @@
|
|
|
certiimg(waybill_number){
|
|
|
$('#'+waybill_number).click();
|
|
|
},
|
|
|
- submitFile(e,waybill_number){
|
|
|
- let file=e.target.files[0];
|
|
|
- if (file.size >=5242880){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show("图片大小不能超过5MB!");
|
|
|
- return;
|
|
|
- }
|
|
|
- let _this=this;
|
|
|
+ submitFile(e,index){
|
|
|
+ let files=e.target.files;
|
|
|
+ window.tempTip.setDuration(3000);
|
|
|
+ if (files.length===0){window.tempTip.show("未选定图片!");return;}
|
|
|
let formData=new FormData();
|
|
|
- formData.append("file",file);
|
|
|
- formData.append("waybill_number",waybill_number);
|
|
|
- axios.post('{{url('transport/waybill/upload')}}',formData)
|
|
|
- .then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show(response.data.error);
|
|
|
- return;
|
|
|
- }
|
|
|
- _this.waybills.some(function (waybill) {
|
|
|
- if (waybill.waybill_number===waybill_number){
|
|
|
- waybill.url=response.data.data.url;
|
|
|
- waybill.suffix=response.data.data.type;
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess("上传成功!");
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show("网络错误:"+err);
|
|
|
- })
|
|
|
+ for (let i=0;i<files.length;i++){
|
|
|
+ if (files[i].size >=5242880){window.tempTip.show("图片大小不能超过5MB!");return;}
|
|
|
+ formData.append("files[]",files[i]);
|
|
|
+ }
|
|
|
+ formData.append("id",this.waybills[index].id);
|
|
|
+ window.tempTip.postBasicRequest('{{url('transport/waybill/upload')}}',formData,res=>{
|
|
|
+ if (this.waybills[index].uploadFiles.length===0) this.$set(this.waybills[index],'uploadFiles',res);
|
|
|
+ else this.$set(this.waybills[index],'uploadFiles',this.waybills[index].uploadFiles.concat(res));
|
|
|
+ return "上传成功";
|
|
|
+ },false,true);
|
|
|
},
|
|
|
- commonImg(id,url,suffix){
|
|
|
+ commonImg(id,uploadFiles){
|
|
|
+ let div = "";
|
|
|
+ let isBtn = '@can('运输管理-运单-图片删除') true @endcan ';
|
|
|
+ for(let i=0;i<uploadFiles.length;i++){
|
|
|
+ let btn = isBtn ? "<button type='button' class='btn btn-sm btn-danger' onclick='vue.btnDeleteImg(this)' data-url='"+uploadFiles[i].url+"' value='"+id+"' style='position: relative;float: right;margin-top: -30px;' >删除</button>" : "";
|
|
|
+ let href = this.imgPrefix+uploadFiles[i].url+'-bulky.'+uploadFiles[i].type;
|
|
|
+ let src = this.imgPrefix+uploadFiles[i].url+'-common.'+uploadFiles[i].type;
|
|
|
+ div += "<div><a target='_blank' href='"+href+"'><img alt='#' src='"+src+"' style='position: relative;' ></a>"+btn+"</div>"
|
|
|
+ }
|
|
|
$('#'+id).after(
|
|
|
- "<div id=\"common_"+id+"\" style='position: absolute;padding-top: 2px;z-index: 99'>" +
|
|
|
- "<div style='position:absolute'>"+
|
|
|
- "<div >"+
|
|
|
- "<a target='_blank' href='"+url+'-bulky.'+suffix+"'>" +
|
|
|
- "<img src=\""+url+'-common.'+suffix+"\" style='position: relative;left:-50px;' >" +
|
|
|
- "</a>" +
|
|
|
- "</div>"+
|
|
|
- @can('运输管理-运单-图片删除')"<button type='button' class='btn btn-sm btn-danger' onclick='vue.btnDeleteImg(this)' value='"+id+"' style='position: relative;float: right;margin-right: 51px;margin-top: -30px;' >删除</button>" +@endcan
|
|
|
- "</div>"+
|
|
|
- "</div>");
|
|
|
+ "<div id=\"common_"+id+"\" style='position: absolute;padding-bottom: 2px;z-index: 99'>" +
|
|
|
+ "<div style='position:absolute;left: -50px' class='overflow-y-scrollbar-200'>"+div+
|
|
|
+ "</div></div>");
|
|
|
},
|
|
|
removeCommonImg(id){
|
|
|
$('#'+id).remove();
|
|
|
@@ -647,41 +724,36 @@
|
|
|
btnDeleteImg(e){
|
|
|
let idstr = $(e).val();
|
|
|
let id = idstr.substr( idstr.indexOf('_')+1);
|
|
|
+ let url = e.getAttribute("data-url");
|
|
|
if (!confirm('确定要删除所选图片吗?'))return;
|
|
|
- this.destroyImg([id]);
|
|
|
+ this.destroyImg(id,url);
|
|
|
},
|
|
|
deleteImg(){
|
|
|
if (checkData.length <= 0) {
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.showSuccess('没有勾选任何记录');
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.showSuccess('没有勾选任何记录');
|
|
|
return;
|
|
|
}
|
|
|
if (!confirm('确定要删除所选图片吗?'))return;
|
|
|
this.destroyImg(checkData);
|
|
|
},
|
|
|
- destroyImg(id){
|
|
|
- let _this = this;
|
|
|
- axios.post('{{url('transport/waybill/deleteImg')}}',{'ids':id})
|
|
|
- .then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show("删除失败");
|
|
|
- return;
|
|
|
- }
|
|
|
- id.forEach(function (id) {
|
|
|
- _this.waybills.some(function (waybill) {
|
|
|
- if (waybill.id===id){
|
|
|
- waybill.url='';
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
+ destroyImg(id,url = null){
|
|
|
+ window.tempTip.postBasicRequest('{{url('transport/waybill/deleteImg')}}',{id:id,url:url},()=>{
|
|
|
+ if (url){
|
|
|
+ this.waybills.some((waybill,i)=>{
|
|
|
+ if (waybill.id===id){
|
|
|
+ waybill.uploadFiles.some((file,j)=>{
|
|
|
+ if (file.url === url){this.$delete(this.waybills[i].uploadFiles,j);return true;}
|
|
|
+ });
|
|
|
+ return true;
|
|
|
+ }
|
|
|
});
|
|
|
-
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess("删除成功!");
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show("网络错误:"+err);
|
|
|
+ }else{
|
|
|
+ this.waybills.forEach((waybill,i)=>{
|
|
|
+ if (id.includes(waybill.id))this.$set(this.waybills[i],'uploadFiles',[]);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return "删除成功";
|
|
|
});
|
|
|
},
|
|
|
// 运输收费修改
|
|
|
@@ -896,6 +968,7 @@
|
|
|
let target = $(e.target);
|
|
|
let top = target.parent().find('.top');
|
|
|
let tip = target.parent().find('.toptd');
|
|
|
+ for (let i=0;i<tip.length;i++)if(!tip[i] || tip[i].style.display==='none')tip.splice(i,1);
|
|
|
top.hide();
|
|
|
tip.tooltip('show');
|
|
|
},
|
|
|
@@ -986,16 +1059,14 @@
|
|
|
let errors = res.errors;
|
|
|
if (errors.length>0)this.batchUploadError = errors;
|
|
|
result.forEach(r=>{
|
|
|
- this.waybills.some(waybill=> {
|
|
|
+ this.waybills.some((waybill,i)=> {
|
|
|
if (waybill.id==r.id){
|
|
|
- waybill.url="/storage"+r.upload_file.url;
|
|
|
- waybill.suffix=r.upload_file.type;
|
|
|
+ this.$set(this.waybills[i],'uploadFiles',r.upload_files);
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
this.size = 0;
|
|
|
});
|
|
|
- this.$forceUpdate();
|
|
|
return "上传成功";
|
|
|
},true);
|
|
|
},
|