| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489 |
- @extends('layouts.app')
- @section('title')查询-运输管理@endsection
- @section('content')
- <div class="container-fluid" style="min-width: 1500px;">
- <div class="d-none" id="list">
- @include("transport.waybill._batchUploadImg")
- @include("transport.waybill._dailyBilling")
- <div class="container-fluid nav3">
- <div class="card menu-third" >
- <ul class="nav nav-pills">
- <li class="nav-item">
- <a target="transport/waybill/index" class="nav-link @if($uriType=='') active @endif" href="{{url('transport/waybill/index')}}">全部</a>
- </li>
- <li class="nav-item">
- <a target="transport/waybill/index" class="nav-link @if($uriType=='专线') active @endif" href="{{url('transport/waybill/index?uriType=专线&status=未审核')}}">专线</a>
- </li>
- <li class="nav-item">
- <a target="transport/waybill/index" class="nav-link @if($uriType=='直发车') active @endif" href="{{url('transport/waybill/index?uriType=直发车&status=未审核')}}">直发车</a>
- </li>
- <li class="nav-item">
- <a target="transport/waybill/index" class="nav-link @if($uriType=='德邦物流') active @endif" href="{{url('transport/waybill/index?uriType=德邦物流')}}">德邦物流</a>
- </li>
- </ul>
- </div>
- </div>
- <div id="form_div"></div>
- <div class="ml-3 form-inline" id="btn">
- <span class="dropdown">
- <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
- data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
- 导出Excel
- </button>
- <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>
- </div>
- </span>
- <div class="form-check d-inline-block">
- <label class="form-check-label">
- <input type="checkbox" class="form-check-input" v-model="appendFluxInfo">导出附加FLUX信息
- </label>
- </div>
- @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
- @can('运输管理-编辑')<button class="btn btn-sm btn-outline-info tooltipTarget"
- title="合并多条运单至一条,已填写信息将被累加处理" @click="waybillMerge()">运单合并</button>
- <button class="btn btn-sm btn-outline-info tooltipTarget"
- title="将已合并运单拆分返回原状态" @click="waybillSplit()">拆单返回</button>
- @endcan
- @if($uriType=='' || $uriType=='德邦物流')
- <button class="btn btn-sm btn-outline-info tooltipTarget"
- title="打印快递面单" @click="expressFaceList()">打印快递面单</button>
- @endif
- <div>
- @if(Session::has('successTip'))
- <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
- @endif
- </div>
- {{-- 德邦面单--}}
- <div id="lodopTips"></div>
- {{-- 德邦面单--}}
- </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" :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>
- @if($uriType=='德邦物流')
- <span>
- <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">编辑</a>
- </span>
- @else
- <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)">取消审核</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>
- @endif
- </span>
- </td>
- @can('运输管理-运单-置顶')
- <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':'']"><span>@{{waybill.status}}</span></td>
- <td class="td-warm">
- <span v-if="waybill.express_face_list == 1" style="color: red">
- 是
- </span>
- <span v-else>否</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"><span>@{{waybill.created_at}}</span></td>
- <td class="td-warm text-muted">
- <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"><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 | resetOwner(waybill.merge_owner,ownerMap)}}</span></td>
- <td class="td-warm toptd" :title="waybill.remark? '置顶备注:'+waybill.remark :''"><span>@{{waybill.source_bill}}</span></td>
- <td class="td-warm">
- <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"><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>
- <td class="td-warm" >
- @can('运输管理-运单-运单编辑')
- <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">
- @else
- <span v-if="waybill.charge">@{{waybill.charge|money}}</span>
- @endcan
- </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.uploadFiles)">
- @can('运输管理-运单-图片上传')<div>
- <input class="btn btn-sm btn-outline-secondary" type="button" @click="certiimg(waybill.waybill_number)" value="上传照片 "/>
- <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"><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>
- </span>
- </td>
- <td class="td-cool">
- <span v-if="waybill.type === '直发车'">
- @{{ waybill.car_owner_info }}
- </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 text-center" style="position: relative" @mouseenter="btnRefreshWeightZoomOut(waybill)" @mouseleave="btnRefreshWeightZoomIn(waybill)">
- <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"><span>@{{waybill.mileage|km}}</span></td>
- <td class="td-cool"><span>@{{waybill.ordering_remark}}</span></td>
- @can('运输管理-运单-可见费用项')
- @can('运输管理-运单-运费')
- <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"><span>@{{waybill.pick_up_fee}}</span></td>
- <td class="td-helpful"><span>@{{waybill.other_fee}}</span></td>
- @endcan
- <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">
- <button type="button" class="btn btn-outline-danger btn-sm" @click="waybillDestroy(waybill.id,waybill.waybill_number,i)">删</button>
- </td>
- @endcan
- </tr>
- </table>
- <div class="modal fade " id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="exampleModalLabel">请输入置顶备注</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="changeRemark">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <input type="hidden" class="form-control" id="onTopId">
- <textarea type="text" class="form-control" required id="remark" @change="changeRemark" ></textarea>
- <div class="invalid-feedback">
- 备注信息不能为空
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal" @click="changeRemark" >关闭</button>
- <button type="button" class="btn btn-sm btn-primary" @click="submitOnTop">提交</button>
- </div>
- </div>
- </div>
- </div>
- <div class="text-info h5 btn btn">@{{ ((page-1)*paginate) + count }}/{{$waybills->total()}}</div>
- {{$waybills->appends($paginateParams)->links()}}
- </div>
- </div>
- <div id="printContext" class="ordercontent"
- style="margin-top: 15px; width: 630px; height: 665px; float: left; overflow-y: auto; text-align: center; display:none">
- <div id="expressPrintArea">
- <style>
- #expressPrintArea {
- width: 100mm;
- height: 180mm;
- margin-left: 100px;
- /*float: left;*/
- background-size: 95mm 175mm;
- padding: 4mm 0.5mm 0.5mm 2.3mm;
- }
- .dbtd {
- border: 0.15mm solid #cecece;
- padding-left: 1mm;
- font-size: 12px;
- font-family: 宋体;
- vertical-align: middle;
- text-align: left;
- }
- .dbtr {
- width: 100%;
- border-left:0mm;
- border-right:0mm;
- border: 0.2mm solid #000000;
- }
- .singlePlane{
- font-size: 7pt;
- width:60mm;
- font-family:黑体;
- text-align:left;
- valign:top;
- }
- .sign{
- font-size:8pt;
- width:60mm;
- font-family:黑体;
- text-align:right;
- line-height: 5mm;
- padding-top: 2mm;
- }
- .singlePlane2{
- font-size:7pt;
- width:99mm;
- font-family:黑体;
- text-align:left;
- valign:top;
- padding-left: 1mm;
- padding-right: 1mm;
- }
- .houseCode td{
- font-size:17px;width:20mm;font-family:黑体; font-weight:bold; text-align:center;
- }
- .originalNumber {
- font-size: 15px;
- font-weight: bold;
- }
- #cargoName {
- font-size: 16px;
- font-weight: bold;
- }
- #transNote {
- font-weight: bold;
- }
- #transNote {
- font-size: 10px;
- }
- .top-amount td span, .top-amount td strong, .outerField1, .signSheet {
- font-size: 10px !important;
- font-family: "黑体";
- }
- </style>
- <%-- <div style="width: 20mm;height: 20mm;/* background-color: #fff; */text-align: center;line-height: 20mm;position: absolute; left:50mm; top:60mm;">
- <span class="markerPenCode" style=" display: inline-block; color: #666;font-size: 40mm;font-weight: bold;transform:rotate(-30deg);opacity: 0.5;">A5</span>
- </div> --%>
- <span class="markerPenCode" style="
- /*display: none;*/
- "></span>
- <table border="2" style="width: 99mm;border-collapse:collapse;">
- <%--==================================上联=============================================--%>
- <tr class="tr1" style="height: 0mm; border: none;" class="dbtr">
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="10mm" class="dbtd"></td>
- <td width="5mm" class="dbtd"></td>
- </tr>
- <%--德邦--%>
- <tr style="height: 14mm;" class="dbtr">
- <td colspan="3" class="dbtd"></td>
- <td class="dbtd" valign="middle" colspan="3" style="border-top:0mm;background:white;color:black;line-height:72px;font-weight:bold; text-align:center; font-size:20px;" id="refundPaymentId"></td>
- <td class="dbtd" valign="middle" colspan="2" style="border-top:0mm;background:white;color:black;line-height:72px;font-weight:bold; text-align:center; font-size:20px;" id="payTypeId"></td>
- <td class="dbtd" valign="middle" colspan="2" style="border-top:0mm;background:white;color:black;line-height:72px;font-weight:bold; text-align:left; font-size:13px;" id = "transTypeId">
- <span class=transType></span></td>
- </tr>
- <%--金额--%>
- <tr style="height: 11mm;" class="top-amount dbtr">
- <td colspan="4" style="width: 30mm; vertical-align: middle; border-right: 0px;" class="dbtd">
- <span style="padding-bottom: 1.5mm;"><strong>代收金额:</strong></span><span
- class="refundPayment">20000</span><br/>
- </td>
- <td colspan="6" style="width: 50mm; vertical-align: middle; border-left: 0px;" class="dbtd">
- <span style="padding-bottom: 1.5mm;"><strong>保价金额:</strong></span><span
- class="insuranceMoney">22</span><br/>
- <span style="padding-bottom: 1.5mm;"><strong>签单返回:</strong></span><span
- class="signSheet"></span><br/>
- <span style="padding-bottom: 1.5mm;"><strong>始发网点:</strong></span><span
- class="outerField1" style="font-size: 8px;"></span><br/>
- </td>
- </tr>
- <%--大头笔--%>
- <tr style="height: 14mm;" class="dbtr" >
- <td colspan="10" style="text-align: center; line-height: 13mm; vertical-align: middle;font-size: 35px; font-weight: bold; margin: 0px; padding: 0px;" id="markerPen" class="dbtd">
- 无大头笔信息
- </td>
- </tr>
- <%--收件人--%>
- <tr style="height: 14mm;" class="dbtr">
- <td colspan="1" style="border-right:0mm;font-size:10px;width:10mm;font-family:黑体;text-align:center;" class="dbtd"><img
- src="{{URL::asset('./images/dbwl/revice.png')}}"/></td>
- <td colspan="9"
- style="border-right:0mm;font-size:10pt;width:90mm;font-family:黑体;font-weight:bold;text-align:left; " id="conMsg" class="dbtd">
- <span class="conName">张小二</span>
- <span class="conPhone">(优先取手机号取不到取固话)</span> <span class="conTel"></span><br/>
- <span class="caddress">上海市青浦区徐泾镇明珠路10181号</span>
- </td>
- </tr>
- <%--寄件人--%>
- <tr style="height: 11mm;" class="dbtr">
- <td colspan="1" style="border-right:0mm;font-size:25px;width:10mm;font-family:黑体;font-weight:bold;text-align:center;" class="dbtd">
- 寄
- </td>
- <td colspan="9" class="dbtd"
- style="border-right:0mm;font-size:8pt;width:90mm;font-family:黑体;text-align:left;">
- <span class="shipperName">张小二</span>
- <span class="shipperPhone">400-617-9999</span><br/>
- <span class="saddress">寄件人地址</span>
- </td>
- </tr>
- <%--运单号条码--%>
- <tr style="height: 23mm;" class="dbtr">
- <td colspan="10" class="dbtd"></td>
- </tr>
- <%--打印时间验视--%>
- <tr style="height: 18mm; text-align: left;" class="dbtr">
- <td colspan="2" valign="bottom" colspan="2" style="text-align:left;font-size:12px;font-family:黑体;width:20mm;border-right:0mm;" class="dbtd">
- <span class="printTime">
- </span><br/>
- 打印时间
- </td>
- <td colspan="6" class="dbtd">
- <div class = "singlePlane">
- 快件送达收件人地址,经收件人或收件人(寄件人)允许的代收人签字,视为送达。您的签字代表您已经签收次包裹,并已确定商品信息无损,包装完好、没有划痕、破损等表面质量问题。
- <br/>
- </div>
- <div class="sign">
- 签收栏
- </div>
- </td>
- <td valign="bottom" colspan="2" style="text-align:center;font-size:12px;width:20mm;font-family:黑体;border-right:0mm;" class="dbtd">
- 已验视
- </td>
- </tr>
- <%--==================================下联=============================================--%>
- <%--德邦图标--%>
- <tr style="height: 12mm;" class="dbtr">
- <td colspan="4" align="center" class="dbtd"></td>
- <td colspan="6" align="center" class="dbtd">
- </td>
- </tr>
- <%--收件人--%>
- <tr style="height: 10mm;" class="dbtr">
- <td colspan="1"style="border-right:0mm;font-family:黑体;font-size:11pt;text-align:center;" class="dbtd"> <img src="{{URL::asset('./images/dbwl/revice.png')}}" /></td>
- <td colspan="7"style="font-family:黑体;text-align:left; font-size:10px;font-weight:bold;" id="conMsg2" class="dbtd">
- <span class="conName">张小二</span>
- <span class="conPhone">(优先取手机号取不到取固话)</span>
- <span class="conTel"></span><br/><span class="caddress">上海市青浦区徐泾镇明珠路1018号</span></td>
- <%--<td rowspan="2" valign="bottom"> <!-- <img src="../images/order/deppon_qrcode.jpg" /> --> </td>--%>
- <td valign="bottom" rowspan="2" style="width:180mm;border-right:0mm;" class="dbtd">
- <img src="{{URL::asset('./images/dbwl/qrCode.jpg')}}" style="width: 18mm; height: 18mm" />
- </td>
- </tr>
- <%--寄件人--%>
- <tr style="height: 10mm;" class="dbtr">
- <td colspan="1"style="font-weight:bold;border-right:0mm;font-family:黑体;font-size:14pt;width:10mm;text-align:center;" class="dbtd">寄</td>
- <td colspan="7"style="font-family:黑体;text-align:left; font-size:7pt;width:70mm" class="dbtd">
- <span class="shipperName">张小二</span>
- <span class="shipperPhone">400-617-9999</span><br/>
- <span class="saddress">酒仙网电子商务股份有限公司</span>
- </tr>
- <tr style="text-align: left;" class="dbtr">
- <td colspan="10" class="dbtd">
- <div class="singlePlane2" style="height: 5mm; max-height: 5mm;">
- 客户订单号:<span class="originalNumber"></span>
- </div>
- <div class="singlePlane2" style="height: 10mm; max-height: 10mm;">
- 货物品名:<span id="cargoName" class="cargoName"></span>
- </div>
- <div class="singlePlane2" style="height: 11mm; max-height: 11mm;">
- 备注:<span class="transNote" id="transNote"></span>
- </div>
- <div class="singlePlane2" style="height: 2mm; max-height: 2mm;">
- <!-- <%--用户订单号:<span class="orderNumber"></span>--%>-->
- 用户订单号:<span class="orderNumber"></span>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- @endsection
- @section('lastScript')
- <style type="text/css">
- @keyframes anima
- {
- from {
- opacity:0.1;
- }
- to{
- opacity:1;
- }
- }
- @-webkit-keyframes anima
- {
- from {
- opacity:0.75;
- }
- to{
- opacity:0.1;
- }
- }
- .bg-light-yellow{
- background: #fffff8;
- }
- .top{
- padding-top: 0;
- padding-left: 10px;
- margin-top: -32px;
- margin-left: -5px;
- line-height: 50px;
- position: absolute;
- animation: anima;
- animation-duration: 3s;
- animation-timing-function: cubic-bezier(0,0,1,1);
- animation-direction: alternate;
- animation-play-state: running;
- -webkit-animation-name: anima;
- -webkit-animation-duration: 3s;
- -webkit-animation-timing-function: cubic-bezier(0,0,1,1);
- -webkit-animation-iteration-count: infinite;
- -webkit-animation-direction: alternate;
- -webkit-animation-play-state: running;
- }
- </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>{{--新版2--}}
- <script type="text/javascript" src="{{mix('js/lodop/myAlert.js')}}"></script>
- <script type="text/javascript" src="{{mix('js/lodop/myPrintKit.js')}}"></script>
- <script type="text/javascript" src="{{mix('js/lodop/jquery.PrintArea.js')}}"></script>
- <script>
- let vue = new Vue({
- el:'#list',
- data:{
- imgPrefix:"{{asset("/storage")}}",
- ownerMap:{@foreach($owners as $owner)'{{$owner->id}}':'{{$owner->name}}',@endforeach},
- waybills:[
- @foreach($waybills as $waybill)
- {
- id:'{{$waybill->id}}',
- created_at:'{{$waybill->created_at}}',
- updated_at:'{{$waybill->updated_at}}',
- uploadFiles:{!! $waybill->uploadFiles !!},
- status:'{{$waybill->status}}',
- type:'{{$waybill->type}}',
- 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->source_bill ?: ($waybill->order->client_code ?? '')}}',
- wms_bill_number:'{{$waybill->wms_bill_number}}',
- is_cancel:'{{$waybill->order->wms_status ?? ''}}' === '订单取消',
- origination:'{{$waybill->origination}}',
- merge_owner:'{{$waybill->merge_owner}}',
- destination:'{{str_replace("\n", ' ', preg_replace("/[\n\s]/",' ',($waybill->order_address??"")) ?? preg_replace("/[\n\s]/",' ',$waybill->destination))}}',
- recipient:'{{str_replace("\n", ' ', preg_replace("/[\n\s]/",' ',$waybill->order->consignee_name ?? $waybill->recipient))}}',
- recipient_mobile:'{{$waybill->order_consignee_phone ?? $waybill->recipient_mobile}}',
- charge:'{{$waybill->charge}}',
- ordering_remark:'{{preg_replace("/[\n\s]/",' ',($waybill->ordering_remark??""))}}',
- carrier:'{{$waybill->logistic->name ?? ''}}',
- carrier_bill:'{{$waybill->carrier_bill}}',
- warehouse_weight:'{{$waybill->warehouse_weight}}',
- warehouse_weight_unit:'{{$waybill->warehouseWeightUnit->name ?? ''}}',
- carrier_weight:'{{$waybill->carrier_weight}}',
- carrier_weight_unit:'{{$waybill->carrierWeightUnit->name ?? ''}}',
- warehouse_weight_other:'{{$waybill->warehouse_weight_other}}',
- warehouse_weight_unit_other:'{{$waybill->warehouseWeightUnitOther->name ?? ''}}',
- carrier_weight_other:'{{$waybill->carrier_weight_other}}',
- carrier_weight_unit_other:'{{$waybill->carrierWeightUnitOther->name ?? ''}}',
- amount_unit_name:'{{$waybill->amountUnit->name ?? ''}}',
- other_charge:'{{$waybill->other_charge}}',
- other_charge_remark:'{{$waybill->other_charge_remark}}',
- 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? 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}}',
- isBtn:false,
- waybillAuditLogs:{!! $waybill->waybillAuditLogs !!},
- btn_refresh_weight:'zoomIn',
- remark:'{{$waybill->remark ?? ''}}',
- province:'{{$waybill->order_province ?? ($waybill->destinationCity->parent->name ?? '')}}',
- city:'{{$waybill->order_city ?? ($waybill->destinationCity->name ?? '')}}',
- district:'{{$waybill->order_district ?? ($waybill->district->name ?? '')}}',
- order_status:'{{$waybill->order->wms_status ?? ''}}',
- is_to_pay:'{{ $waybill->is_to_pay }}',
- express_face_list:'{{ $waybill->express_face_list }}',
- },
- @endforeach
- ],
- 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}}'},
- @endforeach
- ],
- status:[
- {name:'未审核',value:'未审核'},
- {name:'已审核',value:'已审核'},
- {name:'待重审',value:'待重审'},
- {name:'待终审',value:'待终审'},
- {name:'已完结',value:'已完结'},
- {name:'无模型',value:'无模型'},
- ],
- isOut:false,
- isBlur:false,
- isOwnersBtn:false,
- imgs:'',
- is_ownerSelectShow:true,
- sum:{!! $waybills->total() !!},
- paginate : 50,
- page : Number('{{$waybills->currentPage()}}'),
- count : Number('{{$waybills->count()}}'),
- images:[],
- batchUploadError:[],
- size:0,
- selectTr:'',
- dailyBilling:{screenDate:'', billing:''},
- error:{screenDate:'', billing:''},
- expresss:[{name:1,value:'是'},{name:0,value:'否'}],
- appendFluxInfo:false,
- },
- mounted:function(){
- console.log(1);
- $(".tooltipTarget").tooltip({'trigger':'hover'});
- $('#list').removeClass('d-none');
- let data=[
- [
- {name:'owner',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
- placeholder:['货主','定位或多选货主'],data:this.owners},
- {name:'created_at_start',type:'time',tip:['选择显示创建日期的起始时间','选择显示创建日期的起始时间']},
- {name:'origination',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:'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:'deliver_at_end',type:'time',tip:['选择显示发货日期的结束时间','选择显示发货日期的结束时间']},
- ],
- [
- {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:'status',type:'select',placeholder: '运单状态',data:this.status},
- {name:'logistic',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的承运商'],
- placeholder:['承运商','定位或多选承运商'],data:this.logistics},
- {name:'carType_id',type:'select',placeholder: '车型',data:this.carTypes},
- {name:'express_face_list',type:'select',placeholder: '快递面单是否打印',data:this.expresss},
- {name:'ordering_remark',type:'input',tip: '运单备注,默认全模糊查询,推荐配合日期使用',placeholder: '运单备注'},
- ]
- ];
- let param=[];
- this.$set(param,"uriType",'{{$uriType}}');
- this.form = new query({
- el:"#form_div",
- condition:data,
- param:param,
- appendDom : "btn",
- });
- this.form.init();
- this.rendingHeader();
- this.paginate = $("#paginate").val();
- let waybill = $('.table-header-layer-1')[1];
- $('.top').css('min-width', waybill.scrollWidth);
- this.rendingFloatBtn();
- },
- methods:{
- //运单合并
- waybillMerge(){
- if (checkData.length<2){
- window.tempTip.setDuration(2000);
- window.tempTip.show("至少选择两条运单进行合并");
- return;
- }
- window.tempTip.confirm("确定要合并选中运单吗?",()=>{
- window.tempTip.setDuration(5000);
- window.tempTip.waitingTip("合并中,请稍等...");
- window.tempTip.postBasicRequest("{{url('transport/waybill/waybillMerge')}}",{ids:checkData},res=>{
- window.tempTip.cancelWaitingTip();
- window.tempTip.setDuration(2000);
- setTimeout(function (){
- location.reload();
- },1000);
- return "运单已合并至“"+res+"”";
- },true);
- })
- },
- waybillSplit(){
- if (checkData.length<1){
- window.tempTip.setDuration(2000);
- window.tempTip.show("未选择任何记录");
- return;
- }
- window.tempTip.confirm("确定要拆分选中合并单吗?",()=>{
- window.tempTip.setDuration(99999);
- window.tempTip.waitingTip("拆分中,请稍等...");
- window.tempTip.postBasicRequest("{{url('transport/waybill/waybillSplit')}}",{ids:checkData},res=>{
- window.tempTip.cancelWaitingTip();
- window.tempTip.setDuration(2000);
- setTimeout(function (){
- location.reload();
- },1000);
- return res;
- });
- })
- },
- //快递面单打印
- expressFaceList(){
- if (checkData.length<1){
- window.tempTip.setDuration(2000);
- window.tempTip.show("未选择任何记录");
- return;
- }
- window.tempTip.postBasicRequest("{{url('transport/waybill/expressFaceList')}}",{ids:checkData},res=>{
- let msg = '';
- res.forEach((item,index)=>{
- if (item.express_face_list == 1 )msg += item.waybill_number + " "
- })
- //加载js
- var script = document.createElement('script');
- script.setAttribute('type','text/javascript');
- script.setAttribute('src',"{{mix('js/lodop/LodopFuncs.js')}}");
- document.getElementsByTagName('head')[0].appendChild(script);
- if(msg)msg += '已打印过,确定重复打印? ';
- else msg = '确定要打印快递面单吗?';
- window.tempTip.confirm(msg,()=>{
- window.tempTip.setDuration(4000);
- window.tempTip.waitingTip("打印中,请稍等...");
- printTest(res)
- })
- });
- },
- 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 = [
- {name:'operation',value: '操作', neglect: true, class:"td-operation"},
- @can('运输管理-运单-置顶'){name:'onTop',value: '置顶', neglect: true, class:"td-operation"},@endcan
- {name:'status',value: '状态', class:"td-operation"},
- {name:'express_face_list',value: '快递面单是否打印', class:"td-warm"},
- {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"},
- {name:'img',value: '照片', neglect: true, class:"td-warm"},
- {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"},
- {name:'ordering_remark',value: '运单备注', class:"td-cool"},
- @can('运输管理-运单-可见费用项') @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"},@endcan
- {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()) + ($('#btn').height())+2,
- before : [
- {colspan:'4',value: '', class:"table-header-layer-1"},
- {colspan:'15',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'
- },
- btnRefreshWeightZoomOut(waybill){
- waybill.btn_refresh_weight='zoomOut'
- },
- waybillAudit(id,waybill_number){
- if(!confirm('确定要通过“'+waybill_number+'”的审核吗?'))return
- let _this=this;
- let url = '{{url('transport/waybill/waybillAudit')}}';
- 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);
- }
- });
- 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) {
- window.tempTip.show('审核失败,网络连接错误!'+err);
- });
- },
- waybillDestroy(id,waybill_number,index){
- if(!confirm('确定要删除运单号为:“'+waybill_number+'”的运单吗?')){return};
- let url = '{{url('transport/waybill')}}/'+id;
- let _this = this;
- axios.delete(url).then(
- function (response) {
- if(!response.data.success){
- tempTip.setDuration(3000);
- tempTip.show('运单:'+waybill_number+'删除失败!');
- }else {
- tempTip.setDuration(2000);
- tempTip.showSuccess('运单:'+waybill_number+'删除成功!');
- _this.$delete(_this.waybills,index);
- }
- }
- ).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('删除失败,网络链接错误!'+err);
- });
- },
- waybillRetreatAudit(waybill){
- if(!confirm('确定要驳回“'+waybill.waybill_number+'”的审核吗?'))return;
- let url='{{url('transport/waybill/waybillRetreatAudit')}}';
- window.axios.post(url,{id:waybill.id})
- .then(response=> {
- window.tempTip.setDuration(3000);
- if (response.data.success){
- waybill.status = response.data.status;
- waybill.waybillAuditLogs.push(response.data.log);
- window.tempTip.showSuccess(waybill.waybill_number+'审核驳回成功!');
- }else window.tempTip.show('审核驳回失败!');
- }
- ).catch(function (err){window.tempTip.show('审核驳回失败,网络连接错误!'+err)})
- },
- waybillEndAudit(id,waybill_number){
- if(!confirm('确定要通过“'+waybill_number+'”的终审吗?'))return;
- let _this=this;
- let w;
- let url='{{url('transport/waybill/waybillEndAudit')}}';
- axios.post(url, {id:id})
- .then(
- function (response) {
- if (response.data.success){
- _this.waybills.forEach(function (s) {
- if (s.id===id){
- s.status=response.data.status;
- s.waybillAuditLogs.push(response.data.waybillAuditLog);
- w=s.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('终审失败!');
- }
- }
- ).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('终审失败,网络连接错误!'+err);
- });
- },
- waybillExport(checkAllSign){
- let url = '{{url('transport/waybill/export')}}';
- let token='{{ csrf_token() }}';
- excelExport(checkAllSign,checkData,url,this.sum,token,{append:this.appendFluxInfo});
- },
- selectedColor(id){
- if (id && id===this.selectTr)return;
- this.selectTr=id;
- },
- mouseleaveOwner:function () {
- if(!this.isOut&&!this.isBlur){
- this.isOwnersBtn=false;
- }
- },
- blurOwner:function () {
- if (!this.isOut&&!this.isBlur){
- this.isOwnersBtn=false;
- }
- },
- certiimg(waybill_number){
- $('#'+waybill_number).click();
- },
- submitFile(e,index){
- let files=e.target.files;
- console.log(files)
- window.tempTip.setDuration(3000);
- if (files.length===0){window.tempTip.show("未选定图片!");return;}
- let formData=new FormData();
- 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,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-bottom: 2px;z-index: 99'>" +
- "<div style='position:absolute;left: -50px' class='overflow-y-scrollbar-200'>"+div+
- "</div></div>");
- },
- removeCommonImg(id){
- $('#'+id).remove();
- },
- 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,url);
- },
- deleteImg(){
- if (checkData.length <= 0) {
- window.tempTip.setDuration(2000);
- window.tempTip.showSuccess('没有勾选任何记录');
- return;
- }
- if (!confirm('确定要删除所选图片吗?'))return;
- this.destroyImg(checkData);
- },
- 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;
- }
- });
- }else{
- this.waybills.forEach((waybill,i)=>{
- if (id.includes(waybill.id))this.$set(this.waybills[i],'uploadFiles',[]);
- });
- }
- return "删除成功";
- });
- },
- // 运输收费修改
- 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/transport/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();
- let ajaxUrl= '{{url("apiLocal/transport/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);
- target.hide();
- let input = target.next();
- input.show();
- input.focus();
- },
- // 失焦事件
- updateWaybillFee:function (e) {
- let target = $(e.target);
- let _this = this;
- let span = target.prev();
- let id = target.attr('data_id');
- let oldFee = span.text();
- let fee = target.val();
- if(fee !== span.text()){
- let ajaxUrl= '{{url("apiLocal/transport/waybill/changeFee")}}';
- axios.post(ajaxUrl,{'id':id,'fee':fee}).then(function (response) {
- if(response.data.success){
- _this.updateWaybills(id,fee);
- tempTip.setDuration(2000);
- tempTip.showSuccess('运单运费修改成功');
- }else{
- tempTip.setDuration(3000);
- tempTip.show('运单运费修改失败!'+response.data.fail_info);
- _this.updateWaybills(id,oldFee);
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('运单运费修改失败!网络异常:'+err);
- _this.updateWaybills(id,oldFee);
- });
- }
- span.show();
- target.hide();
- },
- // 为直发车运单添加运费
- addWaybillFee(e){
- let target = $(e.target);
- target.css('width','85px');
- let _this = this;
- let id = target.attr('data_id');
- let fee = target.val();
- let ajaxUrl= '{{url("apiLocal/transport/waybill/changeFee")}}';
- if(fee === ''|| fee === null){
- target.css('width','75px');
- return;
- }else{
- axios.post(ajaxUrl,{'id':id,'fee':fee}).then(function (response) {
- if(response.data.success){
- tempTip.setDuration(2000);
- tempTip.showSuccess('运单运费添加成功');
- _this.updateWaybills(id,fee);
- }else{
- tempTip.setDuration(3000);
- tempTip.show('运单运费添加失败!'+response.data.fail_info);
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('运单运费添加失败!网络异常:'+response.data.fail_info);
- });
- target.css('width','75px');
- }
- },
- // 更新表格数据
- updateWaybills(id,newFee){
- this.waybills.some(function(waybill){
- if(waybill.id === id){
- waybill.fee = newFee;
- return true;
- }
- })
- },
- // 置顶操作
- waybillOnTop:function(e){
- let target = $(e.target);
- let id = target.attr('data_id');
- $("#onTopId").val(id);
- $('#exampleModal').modal('show');
- },
- submitOnTop:function(){
- let ajaxUrl = '{{url('transport/waybill/ontop/top')}}';
- let remark = $("#remark").val();
- let id = $("#onTopId").val();
- if(remark === ''){
- $("#remark").focus();
- $('#remark').addClass('is-invalid');
- }else{
- axios.post(ajaxUrl,{'id':id,'detail':remark}).then(function (response) {
- if(response.data.success){
- tempTip.setDuration(3000);
- tempTip.showSuccess('置顶成功');
- $('#exampleModal').modal('hide');
- setTimeout(function(){
- window.location.reload();
- }
- ,1000);
- }else{
- tempTip.setDuration(3000);
- tempTip.show('置顶失败!'+response.fail_info);
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('置顶失败,网络连接错误!'+err);
- });
- }
- },
- changeRemark:function(){
- $('#remark').removeClass('is-invalid');
- },
- cancelOnTop:function (e) {
- let target = $(e.target);
- let id = target.attr('data_id');
- let ajaxUrl='{{url('transport/waybill/ontop/cancel')}}';
- if(id !== null){
- axios.post(ajaxUrl,{'id':id}).then(function (response) {
- if(response.data.success){
- tempTip.setDuration(30000);
- tempTip.showSuccess('取消置顶成功');
- setTimeout(function(){
- window.location.reload();
- }
- ,1000);
- }else{
- tempTip.setDuration(3000);
- tempTip.show('取消置顶失败!'+response.fail_info);
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('取消置顶失败,网络连接错误!'+err);
- });
- }
- },
- hidetop:function(e) {
- 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');
- },
- showtop:function(e){
- let target = $(e.target);
- let top = target.parent().find('.top');
- let tip = target.parent().find('.toptd');
- top.show();
- tip.tooltip('hide');
- },
- refreshWaveHouseWeight(wms_bill_number) {
- let _this=this;
- let url='{{url('transport/waybill/refreshWaveHouseWeight')}}';
- window.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;
- });
- window.tempTip.setDuration(3000);
- window.tempTip.showSuccess('刷新计重成功');
- }else{
- window.tempTip.setDuration(3000);
- window.tempTip.show('刷新计重失败!'+response.data.fail_info);
- }
- }).catch(function (err) {
- window.tempTip.setDuration(3000);
- window.tempTip.show('刷新计重失败,网络连接错误!'+err);
- });
- },
- //选择文件
- selectedFile(){
- $("#uploadImg").click();
- },
- //上传文件
- uploadFiles(event){
- let images = event.target.files;
- for(let i=0;i<images.length;i++){
- let MAX_HEIGHT = 1000;
- let image = new Image();
- image.onload = ()=>{
- let canvas = document.createElement("canvas");
- if (image.height > MAX_HEIGHT && image.height >= image.width) {
- image.width *= MAX_HEIGHT / image.height;
- image.height = MAX_HEIGHT;
- }
- if (image.width > MAX_HEIGHT && image.width > image.height) {
- image.height *= MAX_HEIGHT / image.width;
- image.width = MAX_HEIGHT;
- }
- let ctx = canvas.getContext("2d");
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- canvas.width = image.width;
- canvas.height = image.height;
- ctx.drawImage(image, 0, 0, image.width, image.height);
- let src = canvas.toDataURL("image/jpeg");
- let size = src.length;
- this.images.push({
- src : src,
- name : images[i]["name"],
- size : size,
- });
- this.size += size;
- };
- image.src = window.URL.createObjectURL(images[i]);
- }
- },
- //删除图片
- delTempImg(index){
- this.$delete(this.images,index);
- },
- //上传图片
- batchUploadImages(){
- window.tempTip.setDuration(3000);
- if (this.images.length<1){
- window.tempTip.show("未选择图片");
- return;
- }
- if (this.size > 104857600){
- window.tempTip.show("上传图片超出100MB,请分开上传");
- return;
- }
- window.tempTip.postBasicRequest('{{url('transport/waybill/batchUploadImages')}}',{images:this.images},res=>{
- let result = res.data;
- let errors = res.errors;
- if (errors.length>0)this.batchUploadError = errors;
- result.forEach(r=>{
- this.waybills.some((waybill,i)=> {
- if (waybill.id==r.id){
- this.$set(this.waybills[i],'uploadFiles',r.upload_files);
- return true;
- }
- });
- this.size = 0;
- });
- return "上传成功";
- },true);
- },
- },
- filters:{
- km:function(value){
- if(!value)return '';
- return value + ' km';
- },
- money:function(value){
- if(value.indexOf('.')>0){
- return value
- }
- return value += '.00';
- },
- filterZero:function(value){
- value=value.replace(/\.00$/,'');
- value=value.replace(/(\.[1-9])0$/,'$1');
- return value;
- },
- size:function (val) {
- if (!val)return '';
- val = Number(parseInt(val/1024));
- if (val >= 1024){
- return parseInt(val/1024)+"MB";
- }
- return val+"KB";
- },
- resetOwner:function (val,merge,map){
- if (!merge)return val;
- merge = merge.split(',');
- val = "";
- merge.forEach((id,index)=>{
- val += map[id] ? map[id] : '';
- if (index!==merge.length-1 && map[id])val += ",";
- });
- return val;
- },
- },
- });
- // modal 隐藏时修改 input 为空
- $("#exampleModal").on('hide.bs.modal',function(e){
- $('#remark').val('');
- });
- /**
- * 打印电子运单
- * @param data
- * @param serialNo
- */
- function printEWaybill(data, serialNo, barcode, wayNum){
- //打印内容
- var printHtml = htmlTemplateObj.find("div#expressPrintArea").html();
- LODOP.PRINT_INIT("二级模板");
- LODOP.SET_PRINT_PAGESIZE(0,"100mm","180mm","CreateCustomPage");
- LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
- LODOP.ADD_PRINT_TABLE("2mm","0.6mm","95mm","177mm",printHtml);
- LODOP.ADD_PRINT_BARCODE("79mm","10mm","84mm","15mm","128Auto", barcode);
- LODOP.ADD_PRINT_BARCODE("117mm","45mm","50mm","8mm","128Auto", barcode);
- //设定固定打印机
- let print_name = window.localStorage.getItem("PRINT_NAME") || "{{$print_name}}";
- console.log(print_name);
- if(LODOP.SET_PRINTER_INDEX(print_name)){
- console.log("设置打印机:"+print_name)
- LODOP.SET_PRINTER_INDEX(print_name);
- }
- //打印
- //LODOP.PREVIEW();
- LODOP.PRINT();
- // LODOP.PRINT_DESIGN();
- //记录打印日志
- try {
- //printLogses(data);
- window.tempTip.postBasicRequest("changeExpressTag",{id:data.waybillNumber},res=>{});
- } catch (e) {
- }
- }
- </script>
- @endsection
|