| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111 |
- @extends('layouts.app')
- @section('title')运输管理@endsection
- @section('content')
- <div id="nav2">
- @component('waybill.menu')
- @endcomponent
- </div>
- <div class="container-fluid" style="min-width: 1500px;">
- <div class="d-none" id="list">
- <div class="container-fluid nav3">
- <div class="card menu-third" >
- <ul class="nav nav-pills">
- @can('运输管理-查询')
- <li class="nav-item">
- <a class="nav-link" href="{{url('waybill/index')}}" :class="!filterData.uriType || filterData.uriType=='' ? 'active' :''">全部</a>
- </li> @endcan
- @can('运输管理-查询')
- <li class="nav-item">
- <a class="nav-link" href="{{url('waybill/index?uriType=ZX')}}" :class="filterData.uriType=='ZX' ? 'active' :''">专线</a>
- </li> @endcan
- @can('运输管理-查询')
- <li class="nav-item">
- <a class="nav-link" href="{{url('waybill/index?uriType=ZF')}}" :class="filterData.uriType=='ZF' ? 'active' :''">直发车</a>
- </li> @endcan
- </ul>
- </div>
- </div>
- <form method="GET" action="@if($uriType=='ZF'){{url('waybill/index?uriType=ZF')}}@elseif($uriType=='ZX'){{url('waybill/index?uriType=ZX')}}@else{{url('waybill/index')}}@endif" id="optionSubmit">
- <table class="table table-sm table-bordered text-nowrap mb-0" style="background: #fff;">
- <tr v-if="isBeingFilterConditions">
- <td colspan="4"><div class="col" style="padding:0;">
- <a href="@if($uriType=='ZF'){{url('waybill/index/ZF')}}@elseif($uriType=='ZX'){{url('waybill/index/ZX')}}@else{{url('waybill/index')}}@endif"><span class="btn btn-warning text-dark">清除过滤条件</span></a>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="6">
- <select name="paginate" v-model="filterData.paginate" @change="setPaginate" class="form-control-sm" style="vertical-align: middle">
- <option value="50">每页显示50行</option>
- <option value="100">每页显示100行</option>
- <option value="200">每页显示200行</option>
- <option value="500">每页显示500行</option>
- <option value="1000">每页显示1000行</option>
- </select>
- </td>
- </tr>
- <tr >
- <td >
- <div class="form-inline">
- <select v-if="is_ownerSelectShow" name="owner_id" v-model="filterData.owner_id" class="form-control form-control-sm tooltipTarget " @change="setOwner" style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
- <option value="" class="text-secondary">货主 </option>
- <option v-for="owner in owners" :value="owner.id" class="font-weight-bold">@{{owner.name}}</option>
- </select>
- <label v-if="!is_ownerSelectShow" class="text-muted" style="vertical-align: middle;min-width: 100px">(多选)</label>
- <div style="position: relative;" @mouseover="isOut=true;mouseleaveOwner();" @mouseleave="isOut=false;mouseleaveOwner();">
- <input type="text" title="多选货主时双击选中" class="form-control form-control-sm tooltipTarget" @input="owner_seek($event)" placeholder="定位或多选货主" @blur="isBlur=false;blurOwner();" @focus="isOwnersBtn=true;isBlur=true;">
- <span v-show="isOwnersBtn" class="border" style="position: absolute;left:0;top:30px;width:150px;max-height:100px;overflow:auto;background-color: white">
- <ul style="list-style-type:none" class="pl-0" >
- <li v-for="owner in owners" style="cursor: pointer;user-select:none;" :style="{'background-color':filterData.owners['_'+owner.id]?'#4aa0e6':''}"
- @dblclick="selectedOwner(owner.id)" class="text-left">@{{owner.name}}<hr class="m-0" style="width: 100%"></li>
- </ul>
- </span>
- <input hidden name="owners" :value="JSON.stringify(filterData.owners)">
- </div>
- </div>
- </td>
- <td ><div class="form-inline">
- <input type="date" name="created_at_start" style="width: 150px" class="form-control form-control-sm tooltipTarget" title="选择显示指定日期的起始时间"
- v-model="filterData.created_at_start" :class="filterData.created_at_start?'bg-warning':''">
- <input type="date" style="width: 150px" class="form-control form-control-sm tooltipTarget" name="created_at_end" title="选择显示指定日期的结束时间"
- v-model="filterData.created_at_end" :class="filterData.created_at_end?'bg-warning':''"></div>
- </td>
- <td >
- <input type="text" title="承运商单号:支持15内模糊搜索与15天外精确搜索" name="carrier_bill" placeholder="承运商单号"
- class="form-control form-control-sm tooltipTarget" v-model="filterData.carrier_bill" style="vertical-align: middle;max-width: 200px" :class="filterData.carrier_bill?'bg-warning':''">
- </td>
- <td >
- <select name="status" v-model="filterData.status" @change="setState" class="form-control form-control-sm tooltipTarget" style="vertical-align: middle;max-width: 100px" :class="filterData.status?'bg-warning':''">
- <option value="" class="text-secondary">运单状态</option>
- <option value="未审核" class="font-weight-bold">未审核</option>
- <option value="已审核" class="font-weight-bold">待调度</option>
- <option value="待终审" class="font-weight-bold">待终审</option>
- <option value="已完结" class="font-weight-bold">已完结</option>
- </select>
- </td>
- <td></td>
- </tr>
- <tr>
- <td style="width: 300px">
- <input type="text" title="WMS单号:支持15内模糊搜索与15天外精确搜索" name="wms_bill_number" placeholder="WMS单号"
- class="form-control form-control-sm tooltipTarget" v-model="filterData.wms_bill_number" style="vertical-align: middle;max-width: 200px" :class="filterData.wms_bill_number?'bg-warning':''"></td>
- <td style="width: 350px"><div class="form-inline">
- <input type="text" title="始发地:支持15内模糊搜索与15天外精确搜索" name="origination" placeholder="始发地"
- class="form-control form-control-sm tooltipTarget" v-model="filterData.origination" style="vertical-align: middle;width: 150px" :class="filterData.origination?'bg-warning':''">
- <input type="text" title="目的地:支持15内模糊搜索与15天外精确搜索" style="vertical-align: middle;width: 150px" placeholder="目的地"
- name="destination" class="form-control form-control-sm tooltipTarget" v-model="filterData.destination" :class="filterData.destination?'bg-warning':''"></div></td>
- <td style="width: 280px">
- <input type="text" title="运单号:支持15内模糊搜索与15天外精确搜索" name="waybill_number" placeholder="运单号"
- class="form-control form-control-sm tooltipTarget" v-model="filterData.waybill_number" style="vertical-align: middle;max-width: 200px" :class="filterData.waybill_number?'bg-warning':''">
- </td>
- <td>
- <div class="form-inline">
- <select name="carrier_id" v-model="filterData.carrier_id" class="form-control form-control-sm tooltipTarget" @change="setCarrier" style="vertical-align: middle;width: 100px" :class="filterData.carrier_id?'bg-warning':''">
- <option value="" class="text-secondary">承运商 </option>
- @foreach($carriers as $carrier)
- <option value="{{$carrier->id}}" class="font-weight-bold">{{$carrier->name}}</option>
- @endforeach
- </select>
- <button type="submit" class="btn btn-sm btn-outline-dark w-25 ml-5">按条件搜索</button>
- </div>
- </td>
- <td></td>
- </tr>
- <tr>
- <td colspan="6">
- <span class="dropdown">
- <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
- data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
- 导出Excel
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" @click="waybillExport(1)" href="javascript:">导出勾选内容</a>
- <a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
- </div>
- </span>
- </td>
- </tr>
- </table>
- </form>
- <div>
- @if(Session::has('successTip'))
- <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
- @endif
- </div>
- <table class="table table-striped table-sm table-bordered table-hover text-nowrap waybill-table" style="background: #fff;">
- <tr>
- <th class="table-header-layer-1" :colspan="elementCount('th.td-operation')"></th>
- <th class="table-header-layer-1" :colspan="elementCount('th.td-warm')"><span class="fa fa-file-text-o"></span> 运单信息</th>
- <th class="table-header-layer-1" :colspan="elementCount('th.td-cool')"><span class="fa fa-truck"></span> 运输信息</th>
- <th class="table-header-layer-1" :colspan="elementCount('th.td-helpful')"><span class="fa fa-rmb"></span> 费用信息
- @can('运输管理-删除')
- <th class="table-header-layer-1" :colspan="elementCount('th.td-delete')"> </th>
- @endcan
- </tr>
- <tr>
- <th class="td-operation">
- <label for="all">
- <input id="all" type="checkbox" @click="checkAll($event)">
- </label>
- </th>
- @can('运输管理-编辑','运输管理-运单审核','运输管理-调度','运输管理-编辑')
- <th class="td-operation">操作</th>
- @endcan
- <th class="td-operation">置顶</th>
- <th class="td-operation">状态</th>
- <th class="td-warm">ID</th>
- <th class="td-warm">创建时间</th>
- <th class="td-warm">运单类型</th>
- <th class="td-warm">货主</th>
- <th class="td-warm">上游单号</th>
- <th class="td-warm">WMS订单号</th>
- <th class="td-warm">运单号</th>
- <th class="td-warm">运输收费</th>
- <th class="td-warm">其他收费</th>
- <th class="td-warm">其他收费备注</th>
- @can('运输管理-图片上传')<th class="td-warm">照片</th>@endcan
- <th class="td-cool">收件人</th>
- <th class="td-cool">收件人电话</th>
- <th class="td-cool">始发地</th>
- <th class="td-cool">目的地</th>
- <th class="td-cool">承运商</th>
- <th class="td-cool">单号/车型</th>
- <th class="td-cool">仓库计抛</th>
- <th class="td-cool">承运商计抛</th>
- <th class="td-cool">仓库计重</th>
- <th class="td-cool">承运商计重</th>
- <th class="td-cool">计件</th>
- <th class="td-cool">里程</th>
- @can('运输管理-运费')
- <th class="td-helpful">运费</th>
- @endcan
- <th class="td-helpful">提货费</th>
- <th class="td-helpful">其他支出</th>
- <th class="td-helpful">发货时间</th>
- <th class="td-helpful">调度备注</th>
- @can('运输管理-删除')
- <th class="td-delete">操作</th>
- @endcan
- {{-- <th>WMS单号</th>--}}
- {{-- <th>收件人</th>--}}
- {{-- <th>收件人电话</th>--}}
- {{-- <th>收费(元)</th>--}}
- {{-- <th>到付金额(元)</th>--}}
- {{-- <th>下单备注</th>--}}
- {{-- <th>运单审核人</th>--}}
- {{-- <th>商品列表</th>--}}
- {{-- <th>始发市</th>--}}
- {{-- <th>目的市</th>--}}
- {{-- <th>车辆信息</th>--}}
- {{-- <th>调度审核人</th>--}}
- </tr>
- <tr v-for="waybill in waybills" :style="[{color:waybill.status=='待重审'?'red':''||waybill.status=='已完结'?'green':''},{'font-weight': waybill.id==selectedStyle?'bold':''}]"
- :id="'waybill'+waybill.id" @click="selectedColor(waybill.id)" position="static" v-on:mouseover="hidetop($event)" v-on:mouseleave="showtop($event)">
- <td>
- <input class="checkItem" type="checkbox" :value="waybill.id" v-model="checkData">
- </td>
- <td>
- <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('运输管理-编辑')
- <button class="btn btn-outline-secondary btn-sm" @click="waybillUpdate(waybill.id)">修改</button>
- @endcan
- </span>
- <span v-if=waybill.status==="已审核">
- @can('运输管理-调度')
- <button class="btn btn-outline-secondary btn-sm" @click="waybillRetreatAudit(waybill.id,waybill.waybill_number)">取消审核</button>
- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">调度</button>
- @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('运输管理-调度')
- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">改调度</button>
- @endcan
- </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>
- @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>
- @{{waybill.id}}</td>
- <td class="td-warm text-muted">@{{waybill.created_at}}</td>
- <td class="td-warm">@{{waybill.type}} <span class="badge badge-sm bg-warning" v-if="waybill.collect_fee">到付</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" >@{{waybill.wms_bill_number}}</td>
- <td class="td-warm">@{{waybill.waybill_number}}</td>
- <td class="td-warm">@{{waybill.charge}}</td>
- <td class="td-warm">@{{waybill.other_charge}}</td>
- <td class="td-warm">@{{waybill.other_charge_remark}}</td>
- <td class="td-warm">
- <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" :data-src="waybill.url+'-thumbnail.'+waybill.suffix" src="{{url('icon/img404-thumbnail.jpg')}}">
- @can('运输管理-图片上传')<div v-if="!waybill.url">
- <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"
- style="display: none" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
- </div>@endcan
- </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.destination}}</td>
- <td class="td-cool">@{{waybill.carrier}}</td>
- <td class="td-cool"><span v-if="waybill.type==='专线'">@{{waybill.carrier_bill}}</span>
- <span v-if="waybill.type==='直发车'">
- <span v-if="waybill.carType">@{{ waybill.carType.name }}<i v-if="waybill.carType.length">(@{{waybill.carType.length}}米)</i></span></span></td>
- <td class="td-cool"><span v-if="waybill.warehouse_weight">@{{waybill.warehouse_weight|filterZero}} @{{waybill.warehouse_weight_unit}}</span></td>
- <td class="td-cool"><span v-if="waybill.carrier_weight">@{{waybill.carrier_weight|filterZero}} @{{waybill.carrier_weight_unit}}</span></td>
- <td class="td-cool"><span v-if="waybill.warehouse_weight_other">@{{waybill.warehouse_weight_other|filterZero}} @{{waybill.warehouse_weight_unit_other}}</span></td>
- <td class="td-cool"><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>
- @can('运输管理-可见费用项')
- {{--zengjun start--}}
- @can('运输管理-运费')
- {{-- <td class="td-helpful" v-if="waybill.type==='专线'">--}}
- {{-- </td>--}}
- {{-- <td class="td-helpful" v-else-if="waybill.type==='直发车'">--}}
- {{-- <span v-if="waybill.fee" class="btn-sm btn-outline-secondary btn" @click="waybillFeeCheck($event)" :data_id="waybill.id">@{{waybill.fee}}</span>--}}
- {{-- <input type="number" class="form-control form-control-sm" @blur="updateWaybillFee($event)" v-model="waybill.fee" :data_id="waybill.id" style="min-width:85px;display: none">--}}
- {{-- <input v-else type="number" class="form-control form-control-sm">--}}
- {{-- </td>--}}
- <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>
- @endcan
- {{--zengjun end--}}
- <td class="td-helpful">@{{waybill.pick_up_fee}}</td>
- <td class="td-helpful">@{{waybill.other_fee}}</td>
- @endcan
- <td class="td-helpful">@{{waybill.deliver_at}}</td>
- <td class="td-helpful">@{{waybill.dispatch_remark}}</td>
- @can('运输管理-删除')
- <td class="td-operation">
- <button type="button" class="btn btn-outline-danger btn-sm" @click="waybillDestroy(waybill.id,waybill.waybill_number)">删</button>
- </td>
- @endcan
- {{-- <td>@{{waybill.wms_bill_number}}</td>--}}
- {{-- <td>@{{waybill.recipient}}</td>--}}
- {{-- <td>@{{waybill.recipient_mobile}}</td>--}}
- {{-- <td>@{{waybill.charge}}</td>--}}
- {{-- <td>@{{waybill.collect_fee}}</td>--}}
- {{-- <td>@{{waybill.ordering_remark}}</td>--}}
- {{-- <td><span v-for="waybillAuditLog in waybill.waybillAuditLogs" v-if=waybillAuditLog.audit_stage==="运单阶段">@{{waybillAuditLog.user.name}}</span></td>--}}
- {{-- <td ><u style="user-select: none;cursor:pointer" class="text-primary" v-if="!waybill.isBtn && waybill.wmsCommodities && waybill.wmsCommodities.length>0" @click="showWMSCommodities(waybill.id,waybill.wmsCommodities,waybill.isBtn)">--}}
- {{-- 该单有 @{{waybill.wmsCommodities.length}} 件商品,点击展开</u>--}}
- {{-- <u style="user-select: none;cursor:pointer" class="text-secondary" v-if="waybill.isBtn" @click="showWMSCommodities(waybill.id,waybill.wmsCommodities,waybill.isBtn)">--}}
- {{-- 该单有 @{{waybill.wmsCommodities.length}} 件商品,点击收起</u>--}}
- {{-- </td>--}}
- {{-- <td>--}}
- {{-- <div v-if=waybill.status==="未审核"||waybill.status==="待重审">--}}
- {{-- @can('运输管理-运单审核')--}}
- {{-- <button class="btn btn-outline-success btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>--}}
- {{-- @endcan--}}
- {{-- @can('运输管理-编辑')--}}
- {{-- <button class="btn btn-outline-secondary btn-sm" @click="waybillUpdate(waybill.id)">修改</button>--}}
- {{-- @endcan--}}
- {{-- </div>--}}
- {{-- <div v-if=waybill.status==="已审核">--}}
- {{-- @can('运输管理-调度')--}}
- {{-- <button class="btn btn-outline-secondary btn-sm" @click="waybillRetreatAudit(waybill.id,waybill.waybill_number)">取消审核</button>--}}
- {{-- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">调度</button>--}}
- {{-- @endcan--}}
- {{-- </div>--}}
- {{-- <div v-if=waybill.status==="待终审">--}}
- {{-- @can('运输管理-调度审核')--}}
- {{-- <button class="btn btn-outline-success btn-sm" @click="waybillEndAudit(waybill.id,waybill.waybill_number)">完结</button>--}}
- {{-- @endcan--}}
- {{-- @can('运输管理-调度')--}}
- {{-- <button class="btn btn-outline-secondary btn-sm" @click="job(waybill.id)">改调度</button>--}}
- {{-- @endcan--}}
- {{-- </div>--}}
- {{-- </td>--}}
- {{-- <td>@{{waybill.origination_city}}</td>--}}
- {{-- <td>@{{waybill.destination_city}}</td>--}}
- {{-- <td>@{{waybill.car_owner_info}}</td>--}}
- {{-- <td><span v-for="waybillAuditLog in waybill.waybillAuditLogs" v-if=waybillAuditLog.audit_stage==="调度阶段">@{{waybillAuditLog.user.name}}</span></td>--}}
- </tr>
- {{-- <tr v-show="wmsCommodities&&wmsCommodities.length>0" id="wmsCommodities">--}}
- {{-- <td colspan="15"></td>--}}
- {{-- <td colspan="15">--}}
- {{-- <table>--}}
- {{-- <tr style="background: #9fcdff">--}}
- {{-- <th>商品名称</th>--}}
- {{-- <th>商品编码</th>--}}
- {{-- <th>条码</th>--}}
- {{-- <th>数量</th>--}}
- {{-- <th>体称</th>--}}
- {{-- <th>毛重</th>--}}
- {{-- <th>净重</th>--}}
- {{-- </tr>--}}
- {{-- <tr v-for="wmsCommodity in wmsCommodities">--}}
- {{-- <td>@{{ wmsCommodity.SKU_Descr_c }}</td>--}}
- {{-- <td>@{{ wmsCommodity.SKU }}</td>--}}
- {{-- <td>@{{ wmsCommodity.Alternate_sku1 }}</td>--}}
- {{-- <td>@{{ wmsCommodity.Qtyordered_each }}</td>--}}
- {{-- <td>@{{ wmsCommodity.Cubic }}</td>--}}
- {{-- <td>@{{ wmsCommodity.GrossWeight }}</td>--}}
- {{-- <td>@{{ wmsCommodity.NetWeight }}</td>--}}
- {{-- </tr>--}}
- {{-- </table>--}}
- {{-- </td>--}}
- {{-- </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">{{$waybills->count()}}/{{$waybills->total()}}</div>
- {{$waybills->appends($filterData)->links()}}
- </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: 0px;
- padding-left: 10px;
- margin-top: -4px;
- margin-left: -5px;
- line-height: 55px;
- 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;
- }
- .imgBtn{
- }
- </style>
- <script>
- let vueList=new Vue({
- el:'#list',
- data:{
- waybills:[
- @foreach($waybills as $waybill)
- {
- id:'{{$waybill->id}}',created_at:'{{$waybill->created_at}}',updated_at:'{{$waybill->updated_at}}',url:'{{$waybill->upload_file_url}}',suffix:'{{$waybill->upload_file_type}}',
- status:'{{$waybill->status}}',type:'{{$waybill->type}}',waybill_number:'{{$waybill->waybill_number}}',
- owner:'{{$waybill->owner_name}}',source_bill:'{{$waybill->source_bill}}',wms_bill_number:'{{$waybill->wms_bill_number}}',origination:'{{$waybill->origination}}',
- destination:'{{$waybill->destination}}',recipient:'{{$waybill->recipient}}',recipient_mobile:'{{$waybill->recipient_mobile}}',
- charge:'{{$waybill->charge}}',ordering_remark:'{{$waybill->ordering_remark}}',carrier:'{{$waybill->carrier_name}}',
- carrier_bill:'{{$waybill->carrier_bill}}',origination_city:'{{$waybill->origination_city_name}}',
- destination_city:'{{$waybill->destination_city_name}}',warehouse_weight:'{{$waybill->warehouse_weight}}',
- destination_province_name:'{{$waybill->destination_province_name}}',
- warehouse_weight_unit:'{{$waybill->warehouse_weight_unit_name}}',carrier_weight:'{{$waybill->carrier_weight}}',
- carrier_weight_unit:'{{$waybill->carrier_weight_unit_name}}',
- warehouse_weight_other:'{{$waybill->warehouse_weight_other}}',
- warehouse_weight_unit_other:'{{$waybill->warehouse_weight_unit_other_name}}',carrier_weight_other:'{{$waybill->carrier_weight_other}}',
- carrier_weight_unit_other:'{{$waybill->carrier_weight_unit_other_name}}',
- amount_unit_name:'{{$waybill->amount_unit_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}}',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 !!},
- @if($waybill->remark)remark:'{{$waybill->remark}}', @else remark:'', @endif
- },
- @endforeach
- ],
- checkData:[],
- filterData:
- {paginate:'50',waybill_number:''
- ,carrier_bill:'',carrier_id:''
- ,owner_id:'',wms_bill_number:''
- ,created_at_start:'',created_at_end:'',uriType:''
- ,type:'',status:'',origination:'',destination:'',owners:{}},
- wmsCommodities:[],
- selectedStyle:[],
- owners:[
- @foreach($owners as $owner)
- {!! $owner !!},
- @endforeach
- ],
- isOut:false,
- isBlur:false,
- isOwnersBtn:false,
- imgs:'',
- is_ownerSelectShow:true,
- },
- computed:{
- isBeingFilterConditions:function(){
- for(let key in this.filterData){
- if(this.filterData[key]){
- if(key==='paginate')continue;
- if (key==='owners' && Object.keys(this.filterData.owners).length<1)continue;
- return true
- }
- }
- return false;
- },
- },
- watch:{
- checkData:{
- handler(){
- if (this.checkData.length === this.waybills.length){
- document.querySelector('#all').checked = true;
- }else {
- document.querySelector('#all').checked = false;
- }
- },
- deep:true
- },
- },
- mounted:function(){
- this.initInputs();
- $(".tooltipTarget").tooltip({'trigger':'hover'});
- $('#list').removeClass('d-none');
- let waybill = $('.table-header-layer-1')[1];
- $('.top').css('min-width', waybill.scrollWidth);
- this.imgs=Array.from(document.getElementById('list').querySelectorAll('img'));
- this.lazy();
- if (this.imgs&&this.imgs.length>0){
- window.addEventListener('scroll',this.lazy)
- }
- },
- methods:{
- lazy(){
- //可视区域高度
- let height=window.innerHeight;
- //滚动区域高度
- let scrollHeight = document.documentElement.scrollTop || document.body.scrollTop;
- let _this=this;
- this.imgs.forEach(function (img,i) {
- if ((height+scrollHeight)>$('#'+img.getAttribute('id')).offset().top && img.getAttribute('data-src')){
- let temp=new Image();
- temp.src=img.getAttribute('data-src');
- temp.onload=function () {
- img.src=img.getAttribute('data-src');
- _this.$delete(_this.imgs,i);
- }
- }
- });
- },
- initInputs:function(){
- let data=this;
- let uriParts =decodeURI(location.href).split("?");
- if(uriParts.length>1){
- let params = uriParts[1].split('&');
- params.forEach(function(paramPair){
- let pair=paramPair.split('=');
- let key = pair[0], val = pair[1];
- $('input[name="'+key+'"]').val(val);
- $('select[name="'+key+'"]').val(val);
- decodeURI(data.filterData[key]=val);
- if (key==='owners')
- data.filterData['owners']=JSON.parse( unescape(val) );
- });
- }
- },
- waybillAudit(id,waybill_number){
- if(!confirm('确定要通过“'+waybill_number+'”的审核吗?')){return};
- let _this=this;
- let w;
- let url = '{{url('waybill/waybillAudit')}}';
- axios.post(url, {id:id})
- .then(
- function (response) {
- 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('审核失败!');
- }
- }
- ).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('审核失败,网络连接错误!'+err);
- });
- },
- waybillUpdate(id){
- location.href="{{url('waybill/waybillEdit')}}/"+id;
- },
- // 软删除
- waybillDestroy(id,waybill_number){
- if(!confirm('确定要删除运单号为:“'+waybill_number+'”的运单吗?')){return};
- let _this = this;
- let url = '{{url('waybill')}}/'+id;
- axios.delete(url).then(
- function (response) {
- if(!response.data.success){
- tempTip.setDuration(3000);
- tempTip.show('运单:'+waybill_number+'删除失败!');
- }else {
- tempTip.setDuration(3000);
- tempTip.showSuccess('运单:'+waybill_number+'删除成功!');
- setInterval(function () {
- window.location.reload();
- form.submit();
- },1000)
- }
- }
- ).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('删除失败,网络链接错误!'+err);
- });
- },
- waybillRetreatAudit(id,waybill_number){
- if(!confirm('确定要驳回“'+waybill_number+'”的审核吗?')){return};
- let _this=this;
- let w;
- let url='{{url('files')}}';
- axios.post(url,{id:id})
- .then(
- function (response) {
- 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('审核驳回失败!');
- }
- }
- ).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('审核驳回失败,网络连接错误!'+err);
- });
- },
- job(id){
- location.href="{{url('waybill')}}/"+id+"/edit";
- },
- waybillEndAudit(id,waybill_number){
- if(!confirm('确定要通过“'+waybill_number+'”的终审吗?')){return};
- let _this=this;
- let w;
- let url='{{url('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);
- });
- },
- setPaginate:function(e){
- this.filterData.paginate=e.target.value;
- var form = document.getElementById("optionSubmit");
- form.submit();
- },
- setCarrier:function (e){
- this.filterData.carrier_id=e.target.value;
- var form = document.getElementById("optionSubmit");
- form.submit();
- },
- setOwner:function (e) {
- this.filterData.owner_id=e.target.value;
- var form = document.getElementById("optionSubmit");
- form.submit();
- },
- setType:function (e) {
- this.filterData.type=e.target.value;
- var form = document.getElementById("optionSubmit");
- form.submit();
- },
- setState:function (e) {
- this.filterData.status=e.target.value;
- var form = document.getElementById("optionSubmit");
- form.submit();
- },
- checkAll(e){
- if (e.target.checked){
- this.waybills.forEach((el,i)=>{
- if (this.checkData.indexOf(el.id) == '-1'){
- this.checkData.push(el.id);
- }
- });
- }else {
- this.checkData = [];
- }
- },
- waybillExport(e){
- let val=e;
- let data=this.filterData;
- if (val==1) {
- if (this.checkData.length <= 0) {
- tempTip.setDuration(2000);
- tempTip.showSuccess('没有勾选任何记录');
- } else {
- location.href = "{{url('waybillExport')}}/" + this.checkData;
- }
- }else {
- location.href = "{{url('waybillExport/-1?waybill_number=')}}"+
- data.waybill_number+"&carrier_bill="+data.carrier_bill+
- "&carrier_id="+data.carrier_id+"&owner_id="+data.owner_id+
- "&wms_bill_number="+data.wms_bill_number+"&created_at_start="+
- data.created_at_start+"&created_at_end="+data.created_at_end+
- "&type="+data.type+"&status="+data.status+"&origination="+data.origination+
- "&destination="+data.destination;
- }
- },
- //展开收起商品列表
- showWMSCommodities(id,wmsCommodities,isBtn){
- if (!isBtn){
- this.wmsCommodities=wmsCommodities;
- $("#waybill"+id).after($("#wmsCommodities"));
- this.waybills.forEach(function (waybill) {
- if (waybill.id!==id&&waybill.isBtn){
- waybill.isBtn=false;
- }
- if (waybill.id===id){
- waybill.isBtn=true;
- }
- });
- return;
- }
- if (isBtn){
- this.wmsCommodities=[];
- this.waybills.every(function (waybill) {
- if (waybill.id===id){
- waybill.isBtn=false;
- return false;
- }
- return true;
- });
- }
- },
- selectedColor(id){
- if (id==this.selectedStyle){
- this.selectedStyle='';
- return;
- }
- this.selectedStyle=id;
- },
- elementCount:function(elementName){
- return $(elementName).length;
- },
- //多货主查询
- selectedOwner:function (id) {
- if (this.filterData.owners['_'+id]) this.$delete(this.filterData.owners,'_'+id);
- else this.$set(this.filterData.owners,'_'+id,id);
- if (Object.keys(this.filterData.owners).length===1){
- this.filterData.owner_id=id;
- if (!this.is_ownerSelectShow)this.is_ownerSelectShow=true;
- }
- if (Object.keys(this.filterData.owners).length<1) {
- this.filterData.owner_id='';
- if (!this.is_ownerSelectShow)this.is_ownerSelectShow=true;
- }
- if (Object.keys(this.filterData.owners).length>1) {
- this.filterData.owner_id='';
- if (this.is_ownerSelectShow)this.is_ownerSelectShow=false;
- }
- },
- owner_seek:function (e) {
- let val=e.target.value;
- if (this.owners.length<1)return;
- let _this=this;
- let ownerTemp=_this.owners[0];
- this.owners.every(function (owner,i) {
- if (owner.name.includes(val)){
- if (i===0)return ;
- _this.$set(_this.owners,0,owner);
- _this.$set(_this.owners,i,ownerTemp);
- return false;
- }
- return true;
- });
- },
- 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,waybill_number){
- let file=e.target.files[0];
- if (file.size >=5242880){
- tempTip.setDuration(3000);
- tempTip.show("图片大小不能超过5MB!");
- return;
- }
- let _this=this;
- let formData=new FormData();
- formData.append("file",file);
- formData.append("waybill_number",waybill_number);
- axios.post('{{url('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;
- setTimeout(function () {
- _this.imgs.push(document.getElementById('img_'+waybill.id));
- _this.lazy();
- },1);
- tempTip.setDuration(3000);
- tempTip.showSuccess("上传成功!");
- return true;
- }
- });
- }).catch(function (err) {
- tempTip.setDuration(4000);
- tempTip.show("网络错误:"+err);
- })
- },
- commonImg(id,url,suffix){
- $('#'+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='vueList.btnDeleteImg(this)' value='"+id+"' style='position: relative;float: right;margin-right: 51px;margin-top: -30px;' >删除</button>" +@endcan
- "</div>"+
- "</div>");
- },
- removeCommonImg(id){
- $('#'+id).remove();
- },
- btnDeleteImg(e){
- let idstr = $(e).val();
- let id = idstr.substr( idstr.indexOf('_')+1);
- if (!confirm('确定要删除所选图片吗?'))return;
- this.destroyImg([id]);
- },
- deleteImg(){
- if (this.checkData.length <= 0) {
- tempTip.setDuration(2000);
- tempTip.showSuccess('没有勾选任何记录');
- return;
- }
- if (!confirm('确定要删除所选图片吗?'))return;
- this.destroyImg(this.checkData);
- },
- destroyImg(id){
- let _this = this;
- axios.post('{{url('waybill/deleteImg')}}',{'ids':id})
- .then(function (response) {
- if (!response.data.success){
- tempTip.setDuration(4000);
- tempTip.show("删除失败");
- return;
- }
- // _this.checkData.forEach(function (id) {
- // _this.waybills.some(function (waybill) {
- // if (waybill.id===id){
- // waybill.url='';
- // return true;
- // }
- // });
- // });
- id.forEach(function (id) {
- _this.waybills.some(function (waybill) {
- if (waybill.id===id){
- waybill.url='';
- return true;
- }
- });
- });
- tempTip.setDuration(3000);
- tempTip.showSuccess("删除成功!");
- }).catch(function (err) {
- tempTip.setDuration(4000);
- tempTip.show("网络错误:"+err);
- });
- },
- // 运费修改
- 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/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/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('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('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');
- 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');
- }
- },
- 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;
- },
- }
- });
- // modal 隐藏时修改 input 为空
- $("#exampleModal").on('hide.bs.modal',function(e){
- $('#remark').val('');
- });
- </script>
- @endsection
|