index.blade.php 85 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478
  1. @extends('layouts.app')
  2. @section('title')查询-运输管理@endsection
  3. @section('content')
  4. <div class="container-fluid" style="min-width: 1500px;">
  5. <div class="d-none" id="list">
  6. @include("transport.waybill._batchUploadImg")
  7. @include("transport.waybill._dailyBilling")
  8. <div class="container-fluid nav3">
  9. <div class="card menu-third" >
  10. <ul class="nav nav-pills">
  11. <li class="nav-item">
  12. <a target="transport/waybill/index" class="nav-link @if($uriType=='') active @endif" href="{{url('transport/waybill/index')}}">全部</a>
  13. </li>
  14. <li class="nav-item">
  15. <a target="transport/waybill/index" class="nav-link @if($uriType=='专线') active @endif" href="{{url('transport/waybill/index?uriType=专线&status=未审核')}}">专线</a>
  16. </li>
  17. <li class="nav-item">
  18. <a target="transport/waybill/index" class="nav-link @if($uriType=='直发车') active @endif" href="{{url('transport/waybill/index?uriType=直发车&status=未审核')}}">直发车</a>
  19. </li>
  20. <li class="nav-item">
  21. <a target="transport/waybill/index" class="nav-link @if($uriType=='德邦物流') active @endif" href="{{url('transport/waybill/index?uriType=德邦物流')}}">德邦物流</a>
  22. </li>
  23. </ul>
  24. </div>
  25. </div>
  26. <div id="form_div"></div>
  27. <span class="dropdown">
  28. <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
  29. data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
  30. 导出Excel
  31. </button>
  32. <div class="dropdown-menu" style="z-index: 1099">
  33. <a class="dropdown-item" @click="waybillExport(false)" href="javascript:">导出勾选内容</a>
  34. <a class="dropdown-item" @click="waybillExport(true)" href="javascript:">导出所有页</a>
  35. </div>
  36. </span>
  37. <div class="form-check d-inline-block">
  38. <label class="form-check-label">
  39. <input type="checkbox" class="form-check-input" v-model="appendFluxInfo">导出附加FLUX信息
  40. </label>
  41. </div>
  42. @can('运输管理-运单-图片上传')<button class="btn btn-sm btn-outline-info" data-target="#batchUploadImg" data-toggle="modal">批量上传图片</button>@endcan
  43. @can('运输管理-运单-图片删除')<button class="btn btn-sm btn-outline-danger" @click="deleteImg()">批量删除图片</button>@endcan
  44. @if($uriType=='' || $uriType=='专线')
  45. @can('运输管理-运单-按日计算专线费')
  46. <button class="btn btn-sm btn-outline-success tooltipTarget" data-target="#dailyBilling" data-toggle="modal"
  47. title="计算指定日期下的所有专线费,不考虑有无货主权限">按日输入专线费</button>@endcan
  48. @endif
  49. @can('运输管理-编辑')<button class="btn btn-sm btn-outline-info tooltipTarget"
  50. title="合并多条运单至一条,已填写信息将被累加处理" @click="waybillMerge()">运单合并</button>
  51. <button class="btn btn-sm btn-outline-info tooltipTarget"
  52. title="将已合并运单拆分返回原状态" @click="waybillSplit()">拆单返回</button>
  53. @endcan
  54. @if($uriType=='' || $uriType=='德邦物流')
  55. <button class="btn btn-sm btn-outline-info tooltipTarget"
  56. title="打印快递面单" @click="expressFaceList()">打印快递面单</button>
  57. @endif
  58. <div>
  59. @if(Session::has('successTip'))
  60. <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
  61. @endif
  62. </div>
  63. {{-- 德邦面单--}}
  64. <div id="lodopTips"></div>
  65. {{-- 德邦面单--}}
  66. <table class="table table-striped table-bordered table-hover text-nowrap waybill-table td-min-width-80" style="background: #fff;" id="table">
  67. <tr v-for="(waybill,i) in waybills" :class="[waybill.status=='待重审'?'td-red':''||waybill.status=='已完结'?'td-green':'',selectTr==waybill.id ? 'tr-select' : '']"
  68. :id="'waybill'+waybill.id" @click="selectedColor(waybill.id)" @mouseover="hidetop($event)" @mouseleave="showtop($event)">
  69. <td><input class="checkItem" type="checkbox" :value="waybill.id"></td>
  70. <td>
  71. <span>
  72. @if($uriType=='德邦物流')
  73. <span>
  74. <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">编辑</a>
  75. </span>
  76. @else
  77. <span v-if=waybill.status=="未审核"||waybill.status=="待重审">
  78. @can('运输管理-运单-运单审核')
  79. <button class="btn btn-outline-primary btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>
  80. @endcan
  81. @can('运输管理-编辑')
  82. <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill/waybillEdit')}}/'+waybill.id)">修改</a>
  83. @endcan
  84. </span>
  85. <span v-if=waybill.status=="已审核">
  86. @can('运输管理-运单-调度')
  87. <button class="btn btn-outline-secondary btn-sm" @click="waybillRetreatAudit(waybill)">取消审核</button>
  88. <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">调度</a>
  89. @endcan
  90. </span>
  91. <span v-if=waybill.status==="待终审">
  92. @can('运输管理-运单-调度审核')
  93. <button class="btn btn-outline-success btn-sm" @click="waybillEndAudit(waybill.id,waybill.waybill_number)">完结</button>
  94. @endcan
  95. @can('运输管理-运单-调度')
  96. <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('transport/waybill')}}/'+waybill.id+'/edit')">改调度</a>
  97. @endcan
  98. </span>
  99. @endif
  100. </span>
  101. </td>
  102. @can('运输管理-运单-置顶')
  103. <td class="td-warm text-muted" style="height: 55px">
  104. <span>
  105. <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>
  106. <button type="button" class="btn btn-sm btn-outline-secondary" v-else @click="waybillOnTop($event)" :data_id="waybill.id" style="opacity: 0.75">置顶</button>
  107. </span>
  108. </td>
  109. @endcan
  110. <td :class="[waybill.status=='已审核'?'text-success':'']"><span>@{{waybill.status}}</span></td>
  111. <td class="td-warm">
  112. <span v-if="waybill.express_face_list == 1" style="color: red">
  113. </span>
  114. <span v-else>否</span>
  115. </td>
  116. <td class="td-warm text-muted toptd position-static">
  117. <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>
  118. @{{ i+1 }}</td>
  119. <td class="td-warm text-muted"><span>@{{waybill.created_at}}</span></td>
  120. <td class="td-warm text-muted">
  121. <div>
  122. <a href="#" v-if="waybill.waybillAuditLogs.length>0" class="dropdown-toggle" data-toggle="dropdown">
  123. @{{ waybill.waybillAuditLogs[0].user ? waybill.waybillAuditLogs[0].user.name : '系统' }}<b class="caret"></b>
  124. </a>
  125. <div style="position: absolute;width:320px;margin-left:-100px;background-color: white;max-height:150px ;overflow-y:auto" class="small mt-0 dropdown-menu">
  126. <table class="table table-sm table-striped table-bordered">
  127. <tr>
  128. <th>经手人</th>
  129. <th>操作</th>
  130. <th>时间</th>
  131. </tr>
  132. <tr v-for="people in waybill.waybillAuditLogs">
  133. <td>@{{ people.user ? people.user.name : '系统' }}</td>
  134. <td class="text-danger font-weight-bold">@{{ people.audit_stage }}</td>
  135. <td>@{{ people.created_at }}</td>
  136. </tr>
  137. </table>
  138. </div>
  139. </div>
  140. </td>
  141. <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>
  142. <td class="td-warm"><span>@{{waybill.owner | resetOwner(waybill.merge_owner,ownerMap)}}</span></td>
  143. <td class="td-warm toptd" :title="waybill.remark? '置顶备注:'+waybill.remark :''"><span>@{{waybill.source_bill}}</span></td>
  144. <td class="td-warm">
  145. <span>
  146. <span class="badge badge-pill badge-danger" v-if="waybill.is_cancel">取消</span>
  147. <span>@{{waybill.wms_bill_number}}</span>
  148. </span>
  149. </td>
  150. <td class="td-warm"><span>@{{ waybill.order_status }}</span></td>
  151. <td class="td-warm"><span>@{{waybill.end_date}}</span></td>
  152. <td class="td-warm"><span>@{{waybill.waybill_number}}</span></td>
  153. @can('运输管理-运单-运单编辑')
  154. <td class="td-warm" >
  155. <span v-if="waybill.charge" class="btn-sm btn-outline-secondary btn" @click="waybillChargeCheck($event)" :data_id="waybill.id">@{{waybill.charge|money}}</span>
  156. <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" >
  157. <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">
  158. </td>
  159. @else
  160. <td class="td-warm" ><span v-if="waybill.charge">@{{waybill.charge|money}}</span></td>
  161. @endcan
  162. <td class="td-warm"><span>@{{waybill.other_charge}}</span></td>
  163. <td class="td-warm"><span>@{{waybill.other_charge_remark}}</span></td>
  164. <td class="td-warm">
  165. <div align="center" @mouseleave="removeCommonImg('common_img_'+waybill.id)" @mouseenter="commonImg('img_'+waybill.id,waybill.uploadFiles)">
  166. @can('运输管理-运单-图片上传')<div>
  167. <input class="btn btn-sm btn-outline-secondary" type="button" @click="certiimg(waybill.waybill_number)" value="上传照片 "/>
  168. <input multiple type="file" @change="submitFile($event,i)" :id="waybill.waybill_number"
  169. style="display: none" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
  170. </div>@endcan
  171. <div :id="'img_'+waybill.id">
  172. <img v-for="uploadFile in waybill.uploadFiles" :src="imgPrefix+uploadFile.url+'-thumbnail.'+uploadFile.type">
  173. </div>
  174. </div>
  175. </td>
  176. <td class="td-cool"><span>@{{waybill.recipient}}</span></td>
  177. <td class="td-cool"><span>@{{waybill.recipient_mobile}}</span></td>
  178. <td class="td-cool text-muted"><span>@{{waybill.origination}}</span></td>
  179. <td class="td-cool text-muted"><span>@{{waybill.province}}</span></td>
  180. <td class="td-cool text-muted"><span>@{{waybill.city}}</span></td>
  181. <td class="td-cool text-muted"><span>@{{waybill.district}}</span></td>
  182. <td class="td-cool text-muted"><span>@{{waybill.destination}}</span></td>
  183. <td class="td-cool"><span>@{{waybill.carrier}}</span></td>
  184. <td class="td-cool">
  185. <span v-if="waybill.carrier_bill">
  186. @{{waybill.carrier_bill}}<span v-if="waybill.carType">/@{{ waybill.carType.name }}<i v-if="waybill.carType.length">(@{{waybill.carType.length}}米)</i></span>
  187. </span>
  188. </td>
  189. <td class="td-cool">
  190. <span v-if="waybill.type === '直发车'">
  191. @{{ waybill.car_owner_info }}
  192. </span>
  193. </td>
  194. <td class="td-cool"><span v-if="waybill.warehouse_weight">@{{waybill.warehouse_weight|filterZero}} @{{waybill.warehouse_weight_unit}}</span></td>
  195. <td class="td-cool"><span v-if="waybill.carrier_weight">@{{waybill.carrier_weight|filterZero}} @{{waybill.carrier_weight_unit}}</span></td>
  196. <td class="td-cool text-center" style="position: relative" @mouseenter="btnRefreshWeightZoomOut(waybill)" @mouseleave="btnRefreshWeightZoomIn(waybill)">
  197. <span>
  198. <span v-if="waybill.warehouse_weight_other&&waybill.btn_refresh_weight=='zoomIn'"> @{{waybill.warehouse_weight_other}} @{{waybill.warehouse_weight_unit_other}}</span>
  199. <button type="button" class="btn btn-sm btn-outline-info" @click="refreshWaveHouseWeight(waybill.wms_bill_number)"
  200. :style="[
  201. {position:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'absolute':'static'},
  202. {transform:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'scale(0.55)':'scale(1)'},
  203. {right:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'-10px':'auto'},
  204. {bottom:waybill.btn_refresh_weight&&waybill.btn_refresh_weight=='zoomIn'?'-6px':'auto'},
  205. ]">刷新</button>
  206. </span>
  207. </td>
  208. <td class="td-cool"><span v-if="waybill.carrier_weight_other">@{{waybill.carrier_weight_other|filterZero}} @{{waybill.carrier_weight_unit_other}}</span></td>
  209. <td class="td-cool"><span v-if="waybill.amount">@{{waybill.amount}} @{{waybill.amount_unit_name }}</span></td>
  210. <td class="td-cool"><span>@{{waybill.mileage|km}}</span></td>
  211. <td class="td-cool"><span>@{{waybill.ordering_remark}}</span></td>
  212. @can('运输管理-运单-可见费用项')
  213. @can('运输管理-运单-运费')
  214. <td class="td-helpful">
  215. <label v-if="waybill.fee">
  216. <span v-if="waybill.type==='专线'"></span>
  217. <span v-else-if="waybill.fee" class="btn-sm btn-outline-secondary btn" @click="waybillFeeCheck($event)" :data_id="waybill.id">@{{waybill.fee|money}}</span>
  218. <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">
  219. </label>
  220. <label v-else>
  221. <span v-if="waybill.type==='专线'"></span>
  222. <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" >
  223. </label>
  224. </td>
  225. @endcan
  226. <td class="td-helpful"><span>@{{waybill.pick_up_fee}}</span></td>
  227. <td class="td-helpful"><span>@{{waybill.other_fee}}</span></td>
  228. @endcan
  229. <td class="td-helpful"><span>@{{waybill.deliver_at}}</span></td>
  230. <td class="td-helpful"><span v-html="waybill.dispatch_remark"></span></td>
  231. @can('运输管理-运单-删除')
  232. <td class="td-operation">
  233. <button type="button" class="btn btn-outline-danger btn-sm" @click="waybillDestroy(waybill.id,waybill.waybill_number,i)">删</button>
  234. </td>
  235. @endcan
  236. </tr>
  237. </table>
  238. <div class="modal fade " id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  239. <div class="modal-dialog modal-dialog-centered">
  240. <div class="modal-content">
  241. <div class="modal-header">
  242. <h5 class="modal-title" id="exampleModalLabel">请输入置顶备注</h5>
  243. <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="changeRemark">
  244. <span aria-hidden="true">&times;</span>
  245. </button>
  246. </div>
  247. <div class="modal-body">
  248. <input type="hidden" class="form-control" id="onTopId">
  249. <textarea type="text" class="form-control" required id="remark" @change="changeRemark" ></textarea>
  250. <div class="invalid-feedback">
  251. 备注信息不能为空
  252. </div>
  253. </div>
  254. <div class="modal-footer">
  255. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal" @click="changeRemark" >关闭</button>
  256. <button type="button" class="btn btn-sm btn-primary" @click="submitOnTop">提交</button>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. <div class="text-info h5 btn btn">@{{ ((page-1)*paginate) + count }}/{{$waybills->total()}}</div>
  262. {{$waybills->appends($paginateParams)->links()}}
  263. </div>
  264. </div>
  265. <div id="printContext" class="ordercontent"
  266. style="margin-top: 15px; width: 630px; height: 665px; float: left; overflow-y: auto; text-align: center; display:none">
  267. <div id="expressPrintArea">
  268. <style>
  269. #expressPrintArea {
  270. width: 100mm;
  271. height: 180mm;
  272. margin-left: 100px;
  273. /*float: left;*/
  274. background-size: 95mm 175mm;
  275. padding: 4mm 0.5mm 0.5mm 2.3mm;
  276. }
  277. .dbtd {
  278. border: 0.15mm solid #cecece;
  279. padding-left: 1mm;
  280. font-size: 12px;
  281. font-family: 宋体;
  282. vertical-align: middle;
  283. text-align: left;
  284. }
  285. .dbtr {
  286. width: 100%;
  287. border-left:0mm;
  288. border-right:0mm;
  289. border: 0.2mm solid #000000;
  290. }
  291. .singlePlane{
  292. font-size: 7pt;
  293. width:60mm;
  294. font-family:黑体;
  295. text-align:left;
  296. valign:top;
  297. }
  298. .sign{
  299. font-size:8pt;
  300. width:60mm;
  301. font-family:黑体;
  302. text-align:right;
  303. line-height: 5mm;
  304. padding-top: 2mm;
  305. }
  306. .singlePlane2{
  307. font-size:7pt;
  308. width:99mm;
  309. font-family:黑体;
  310. text-align:left;
  311. valign:top;
  312. padding-left: 1mm;
  313. padding-right: 1mm;
  314. }
  315. .houseCode td{
  316. font-size:17px;width:20mm;font-family:黑体; font-weight:bold; text-align:center;
  317. }
  318. .originalNumber {
  319. font-size: 15px;
  320. font-weight: bold;
  321. }
  322. #cargoName {
  323. font-size: 16px;
  324. font-weight: bold;
  325. }
  326. #transNote {
  327. font-weight: bold;
  328. }
  329. #transNote {
  330. font-size: 10px;
  331. }
  332. .top-amount td span, .top-amount td strong, .outerField1, .signSheet {
  333. font-size: 10px !important;
  334. font-family: "黑体";
  335. }
  336. </style>
  337. <%-- <div style="width: 20mm;height: 20mm;/* background-color: #fff; */text-align: center;line-height: 20mm;position: absolute; left:50mm; top:60mm;">
  338. <span class="markerPenCode" style=" display: inline-block; color: #666;font-size: 40mm;font-weight: bold;transform:rotate(-30deg);opacity: 0.5;">A5</span>
  339. </div> --%>
  340. <span class="markerPenCode" style="
  341. /*display: none;*/
  342. "></span>
  343. <table border="2" style="width: 99mm;border-collapse:collapse;">
  344. <%--==================================上联=============================================--%>
  345. <tr class="tr1" style="height: 0mm; border: none;" class="dbtr">
  346. <td width="10mm" class="dbtd"></td>
  347. <td width="10mm" class="dbtd"></td>
  348. <td width="10mm" class="dbtd"></td>
  349. <td width="10mm" class="dbtd"></td>
  350. <td width="10mm" class="dbtd"></td>
  351. <td width="10mm" class="dbtd"></td>
  352. <td width="10mm" class="dbtd"></td>
  353. <td width="10mm" class="dbtd"></td>
  354. <td width="10mm" class="dbtd"></td>
  355. <td width="5mm" class="dbtd"></td>
  356. </tr>
  357. <%--德邦--%>
  358. <tr style="height: 14mm;" class="dbtr">
  359. <td colspan="3" class="dbtd"></td>
  360. <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>
  361. <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>
  362. <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">
  363. <span class=transType></span></td>
  364. </tr>
  365. <%--金额--%>
  366. <tr style="height: 11mm;" class="top-amount dbtr">
  367. <td colspan="4" style="width: 30mm; vertical-align: middle; border-right: 0px;" class="dbtd">
  368. <span style="padding-bottom: 1.5mm;"><strong>代收金额:</strong></span><span
  369. class="refundPayment">20000</span><br/>
  370. </td>
  371. <td colspan="6" style="width: 50mm; vertical-align: middle; border-left: 0px;" class="dbtd">
  372. <span style="padding-bottom: 1.5mm;"><strong>保价金额:</strong></span><span
  373. class="insuranceMoney">22</span><br/>
  374. <span style="padding-bottom: 1.5mm;"><strong>签单返回:</strong></span><span
  375. class="signSheet"></span><br/>
  376. <span style="padding-bottom: 1.5mm;"><strong>始发网点:</strong></span><span
  377. class="outerField1" style="font-size: 8px;"></span><br/>
  378. </td>
  379. </tr>
  380. <%--大头笔--%>
  381. <tr style="height: 14mm;" class="dbtr" >
  382. <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">
  383. 无大头笔信息
  384. </td>
  385. </tr>
  386. <%--收件人--%>
  387. <tr style="height: 14mm;" class="dbtr">
  388. <td colspan="1" style="border-right:0mm;font-size:10px;width:10mm;font-family:黑体;text-align:center;" class="dbtd"><img
  389. src="{{URL::asset('./images/dbwl/revice.png')}}"/></td>
  390. <td colspan="9"
  391. style="border-right:0mm;font-size:10pt;width:90mm;font-family:黑体;font-weight:bold;text-align:left; " id="conMsg" class="dbtd">
  392. <span class="conName">张小二</span>&nbsp;&nbsp;
  393. <span class="conPhone">(优先取手机号取不到取固话)</span>&nbsp;&nbsp;&nbsp;<span class="conTel"></span><br/>
  394. <span class="caddress">上海市青浦区徐泾镇明珠路10181号</span>
  395. </td>
  396. </tr>
  397. <%--寄件人--%>
  398. <tr style="height: 11mm;" class="dbtr">
  399. <td colspan="1" style="border-right:0mm;font-size:25px;width:10mm;font-family:黑体;font-weight:bold;text-align:center;" class="dbtd">
  400. </td>
  401. <td colspan="9" class="dbtd"
  402. style="border-right:0mm;font-size:8pt;width:90mm;font-family:黑体;text-align:left;">
  403. <span class="shipperName">张小二</span>&nbsp;&nbsp;&nbsp;
  404. <span class="shipperPhone">400-617-9999</span><br/>
  405. <span class="saddress">寄件人地址</span>
  406. </td>
  407. </tr>
  408. <%--运单号条码--%>
  409. <tr style="height: 23mm;" class="dbtr">
  410. <td colspan="10" class="dbtd"></td>
  411. </tr>
  412. <%--打印时间验视--%>
  413. <tr style="height: 18mm; text-align: left;" class="dbtr">
  414. <td colspan="2" valign="bottom" colspan="2" style="text-align:left;font-size:12px;font-family:黑体;width:20mm;border-right:0mm;" class="dbtd">
  415. <span class="printTime">
  416. </span><br/>
  417. 打印时间
  418. </td>
  419. <td colspan="6" class="dbtd">
  420. <div class = "singlePlane">
  421. 快件送达收件人地址,经收件人或收件人(寄件人)允许的代收人签字,视为送达。您的签字代表您已经签收次包裹,并已确定商品信息无损,包装完好、没有划痕、破损等表面质量问题。
  422. <br/>
  423. </div>
  424. <div class="sign">
  425. 签收栏
  426. </div>
  427. </td>
  428. <td valign="bottom" colspan="2" style="text-align:center;font-size:12px;width:20mm;font-family:黑体;border-right:0mm;" class="dbtd">
  429. 已验视
  430. </td>
  431. </tr>
  432. <%--==================================下联=============================================--%>
  433. <%--德邦图标--%>
  434. <tr style="height: 12mm;" class="dbtr">
  435. <td colspan="4" align="center" class="dbtd"></td>
  436. <td colspan="6" align="center" class="dbtd">
  437. </td>
  438. </tr>
  439. <%--收件人--%>
  440. <tr style="height: 10mm;" class="dbtr">
  441. <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>
  442. <td colspan="7"style="font-family:黑体;text-align:left; font-size:10px;font-weight:bold;" id="conMsg2" class="dbtd">
  443. <span class="conName">张小二</span>&nbsp;&nbsp;
  444. <span class="conPhone">(优先取手机号取不到取固话)</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  445. <span class="conTel"></span><br/><span class="caddress">上海市青浦区徐泾镇明珠路1018号</span></td>
  446. <%--<td rowspan="2" valign="bottom"> <!-- <img src="../images/order/deppon_qrcode.jpg" /> --> </td>--%>
  447. <td valign="bottom" rowspan="2" style="width:180mm;border-right:0mm;" class="dbtd">
  448. <img src="{{URL::asset('./images/dbwl/qrCode.jpg')}}" style="width: 18mm; height: 18mm" />
  449. </td>
  450. </tr>
  451. <%--寄件人--%>
  452. <tr style="height: 10mm;" class="dbtr">
  453. <td colspan="1"style="font-weight:bold;border-right:0mm;font-family:黑体;font-size:14pt;width:10mm;text-align:center;" class="dbtd">寄</td>
  454. <td colspan="7"style="font-family:黑体;text-align:left; font-size:7pt;width:70mm" class="dbtd">
  455. <span class="shipperName">张小二</span>&nbsp;&nbsp;&nbsp;
  456. <span class="shipperPhone">400-617-9999</span><br/>
  457. <span class="saddress">酒仙网电子商务股份有限公司</span>
  458. </tr>
  459. <tr style="text-align: left;" class="dbtr">
  460. <td colspan="10" class="dbtd">
  461. <div class="singlePlane2" style="height: 5mm; max-height: 5mm;">
  462. 客户订单号:<span class="originalNumber"></span>
  463. </div>
  464. <div class="singlePlane2" style="height: 10mm; max-height: 10mm;">
  465. 货物品名:<span id="cargoName" class="cargoName"></span>
  466. </div>
  467. <div class="singlePlane2" style="height: 11mm; max-height: 11mm;">
  468. 备注:<span class="transNote" id="transNote"></span>
  469. </div>
  470. <div class="singlePlane2" style="height: 2mm; max-height: 2mm;">
  471. <!-- <%&#45;&#45;用户订单号:<span class="orderNumber"></span>&#45;&#45;%>-->
  472. 用户订单号:<span class="orderNumber"></span>
  473. </div>
  474. </td>
  475. </tr>
  476. </table>
  477. </div>
  478. </div>
  479. @endsection
  480. @section('lastScript')
  481. <style type="text/css">
  482. @keyframes anima
  483. {
  484. from {
  485. opacity:0.1;
  486. }
  487. to{
  488. opacity:1;
  489. }
  490. }
  491. @-webkit-keyframes anima
  492. {
  493. from {
  494. opacity:0.75;
  495. }
  496. to{
  497. opacity:0.1;
  498. }
  499. }
  500. .bg-light-yellow{
  501. background: #fffff8;
  502. }
  503. .top{
  504. padding-top: 0;
  505. padding-left: 10px;
  506. margin-top: -32px;
  507. margin-left: -5px;
  508. line-height: 50px;
  509. position: absolute;
  510. animation: anima;
  511. animation-duration: 3s;
  512. animation-timing-function: cubic-bezier(0,0,1,1);
  513. animation-direction: alternate;
  514. animation-play-state: running;
  515. -webkit-animation-name: anima;
  516. -webkit-animation-duration: 3s;
  517. -webkit-animation-timing-function: cubic-bezier(0,0,1,1);
  518. -webkit-animation-iteration-count: infinite;
  519. -webkit-animation-direction: alternate;
  520. -webkit-animation-play-state: running;
  521. }
  522. </style>
  523. <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
  524. <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
  525. <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
  526. <script type="text/javascript" src="{{mix('js/lodop/myAlert.js')}}"></script>
  527. <script type="text/javascript" src="{{mix('js/lodop/myPrintKit.js')}}"></script>
  528. <script type="text/javascript" src="{{mix('js/lodop/jquery.PrintArea.js')}}"></script>
  529. <script>
  530. let vue = new Vue({
  531. el:'#list',
  532. data:{
  533. imgPrefix:"{{asset("/storage")}}",
  534. ownerMap:{@foreach($owners as $owner)'{{$owner->id}}':'{{$owner->name}}',@endforeach},
  535. waybills:[
  536. @foreach($waybills as $waybill)
  537. {
  538. id:'{{$waybill->id}}',
  539. created_at:'{{$waybill->created_at}}',
  540. updated_at:'{{$waybill->updated_at}}',
  541. uploadFiles:{!! $waybill->uploadFiles !!},
  542. status:'{{$waybill->status}}',
  543. type:'{{$waybill->type}}',
  544. end_date:'{{($waybill->order&&$waybill->order->wms_status=='订单完成') ? $waybill->order->wms_edittime:'-'}}',
  545. waybill_number:'{{$waybill->waybill_number}}',
  546. owner:'{{$waybill->owner_name ?? ($waybill->owner->name ?? '')}}',
  547. source_bill:'{{ $waybill->source_bill ?: ($waybill->order->client_code ?? '')}}',
  548. wms_bill_number:'{{$waybill->wms_bill_number}}',
  549. is_cancel:'{{$waybill->order->wms_status ?? ''}}' === '订单取消',
  550. origination:'{{$waybill->origination}}',
  551. merge_owner:'{{$waybill->merge_owner}}',
  552. destination:'{{$waybill->order_address ?? $waybill->destination}}',
  553. recipient:'{{$waybill->order->consignee_name ?? $waybill->recipient}}',
  554. recipient_mobile:'{{$waybill->order_consignee_phone ?? $waybill->recipient_mobile}}',
  555. charge:'{{$waybill->charge}}',
  556. ordering_remark:'{{preg_replace("/[\n\s]/",' ',($waybill->ordering_remark??""))}}',
  557. carrier:'{{$waybill->logistic->name ?? ''}}',
  558. carrier_bill:'{{$waybill->carrier_bill}}',
  559. warehouse_weight:'{{$waybill->warehouse_weight}}',
  560. warehouse_weight_unit:'{{$waybill->warehouseWeightUnit->name ?? ''}}',
  561. carrier_weight:'{{$waybill->carrier_weight}}',
  562. carrier_weight_unit:'{{$waybill->carrierWeightUnit->name ?? ''}}',
  563. warehouse_weight_other:'{{$waybill->warehouse_weight_other}}',
  564. warehouse_weight_unit_other:'{{$waybill->warehouseWeightUnitOther->name ?? ''}}',
  565. carrier_weight_other:'{{$waybill->carrier_weight_other}}',
  566. carrier_weight_unit_other:'{{$waybill->carrierWeightUnitOther->name ?? ''}}',
  567. amount_unit_name:'{{$waybill->amountUnit->name ?? ''}}',
  568. other_charge:'{{$waybill->other_charge}}',
  569. other_charge_remark:'{{$waybill->other_charge_remark}}',
  570. mileage:'{{$waybill->mileage}}',
  571. amount:'{{$waybill->amount}}',
  572. @if($waybill->carType)carType:{!! $waybill->carType !!},car_owner_info:'{{$waybill->car_owner_info}}',@endif
  573. @can('运输管理-运单-可见费用项') fee:'{{$waybill->fee}}',
  574. pick_up_fee:'{{$waybill->pick_up_fee? round($waybill->pick_up_fee) :''}}',
  575. other_fee:'{{$waybill->other_fee}}',
  576. collect_fee:'{{$waybill->collect_fee}}', @endcan
  577. deliver_at:'{{$waybill->deliver_at}}',
  578. dispatch_remark:'{{$waybill->dispatch_remark}}',
  579. isBtn:false,
  580. waybillAuditLogs:{!! $waybill->waybillAuditLogs !!},
  581. btn_refresh_weight:'zoomIn',
  582. remark:'{{$waybill->remark ?? ''}}',
  583. province:'{{$waybill->order_province ?? ($waybill->destinationCity->parent->name ?? '')}}',
  584. city:'{{$waybill->order_city ?? ($waybill->destinationCity->name ?? '')}}',
  585. district:'{{$waybill->order_district ?? ($waybill->district->name ?? '')}}',
  586. order_status:'{{$waybill->order->wms_status ?? ''}}',
  587. is_to_pay:'{{ $waybill->is_to_pay }}',
  588. express_face_list:'{{ $waybill->express_face_list }}',
  589. },
  590. @endforeach
  591. ],
  592. owners:[
  593. @foreach($owners as $owner)
  594. {name:'{{$owner->id}}',value:'{{$owner->name}}'},
  595. @endforeach
  596. ],
  597. carTypes:[
  598. @foreach($carTypes as $carType)
  599. {name:'{{$carType->id}}',value:'{{$carType->name}}'},
  600. @endforeach
  601. ],
  602. logistics:[
  603. @foreach($logistics as $logistic)
  604. {name:"{{$logistic->id}}",value:'{{$logistic->name}}'},
  605. @endforeach
  606. ],
  607. status:[
  608. {name:'未审核',value:'未审核'},
  609. {name:'已审核',value:'已审核'},
  610. {name:'待重审',value:'待重审'},
  611. {name:'待终审',value:'待终审'},
  612. {name:'已完结',value:'已完结'},
  613. {name:'无模型',value:'无模型'},
  614. ],
  615. isOut:false,
  616. isBlur:false,
  617. isOwnersBtn:false,
  618. imgs:'',
  619. is_ownerSelectShow:true,
  620. sum:{!! $waybills->total() !!},
  621. paginate : 50,
  622. page : Number('{{$waybills->currentPage()}}'),
  623. count : Number('{{$waybills->count()}}'),
  624. images:[],
  625. batchUploadError:[],
  626. size:0,
  627. selectTr:'',
  628. dailyBilling:{screenDate:'', billing:''},
  629. error:{screenDate:'', billing:''},
  630. expresss:[{name:1,value:'是'},{name:0,value:'否'}],
  631. appendFluxInfo:false,
  632. },
  633. mounted:function(){
  634. $(".tooltipTarget").tooltip({'trigger':'hover'});
  635. $('#list').removeClass('d-none');
  636. let data=[
  637. [
  638. {name:'owner',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
  639. placeholder:['货主','定位或多选货主'],data:this.owners},
  640. {name:'created_at_start',type:'time',tip:['选择显示创建日期的起始时间','选择显示创建日期的起始时间']},
  641. {name:'origination',type:'input',tip:'始发地:可在左侧增加百分号(%)进行模糊搜索',placeholder: '始发地'},
  642. {name:'updated_at_start',type:'time',tip:['选择显示完结日期的起始时间','选择显示完结日期的起始时间']},
  643. {name:'carrier_bill',type:'input',tip:'可支持多承运商单号:可在左侧增加百分号(%)进行模糊搜索',placeholder: '承运商单号'},
  644. {name:'deliver_at_start',type:'time',tip:['选择显示发货日期的起始时间','选择显示发货日期的起始时间']},
  645. ],
  646. [
  647. {name:'wms_bill_number',type:'input',tip:'可支持多WMS单号:可在两侧增加百分号(%)进行模糊搜索',placeholder: 'WMS单号'},
  648. {name:'created_at_end',type:'time',tip:['选择显示创建日期的结束时间','选择显示创建日期的结束时间']},
  649. {name:'destination',type:'input',tip:'目的地:可在两侧增加百分号(%)进行模糊搜索',placeholder: '目的地'},
  650. {name:'updated_at_end',type:'time',tip:['选择显示完结日期的结束时间','选择显示完结日期的结束时间']},
  651. {name:'waybill_number',type:'input',tip:'运单号:可在两侧增加百分号(%)进行模糊搜索',placeholder: '运单号'},
  652. {name:'deliver_at_end',type:'time',tip:['选择显示发货日期的结束时间','选择显示发货日期的结束时间']},
  653. ],
  654. [
  655. {name:'source_bill',type:'input',tip: '可支持多客户订单号:可在左侧增加百分号(%)进行模糊搜索',placeholder: '客户订单号'},
  656. {name:'recipient',type:'input',tip: '可支持多收货人姓名:可在左侧增加百分号(%)进行模糊搜索',placeholder: '收货人姓名'},
  657. {name:'recipient_mobile',type:'input',tip: '可支持多收货人电话:可在左侧增加百分号(%)进行模糊搜索',placeholder: '收货人电话'},
  658. {name:'car_owner_info',type:'input',tip: '车辆信息:可在左侧增加百分号(%)进行模糊搜索',placeholder: '车辆信息'},
  659. {name:'mileage',type:'input',tip: '里程:范围-范围',placeholder: '里程'},
  660. {name:'warehouse_weight_other',type:'input',tip: '仓库计重:范围-范围',placeholder: '仓库计重'},
  661. ],[
  662. {name:'status',type:'select',placeholder: '运单状态',data:this.status},
  663. {name:'logistic',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的承运商'],
  664. placeholder:['承运商','定位或多选承运商'],data:this.logistics},
  665. {name:'carType_id',type:'select',placeholder: '车型',data:this.carTypes},
  666. {name:'express_face_list',type:'select',placeholder: '快递面单是否打印',data:this.expresss},
  667. ]
  668. ];
  669. let param=[];
  670. this.$set(param,"uriType",'{{$uriType}}');
  671. this.form = new query({
  672. el:"#form_div",
  673. condition:data,
  674. param:param,
  675. });
  676. this.form.init();
  677. this.rendingHeader();
  678. this.paginate = $("#paginate").val();
  679. let waybill = $('.table-header-layer-1')[1];
  680. $('.top').css('min-width', waybill.scrollWidth);
  681. this.rendingFloatBtn();
  682. },
  683. methods:{
  684. //运单合并
  685. waybillMerge(){
  686. if (checkData.length<2){
  687. window.tempTip.setDuration(2000);
  688. window.tempTip.show("至少选择两条运单进行合并");
  689. return;
  690. }
  691. window.tempTip.confirm("确定要合并选中运单吗?",()=>{
  692. window.tempTip.setDuration(5000);
  693. window.tempTip.waitingTip("合并中,请稍等...");
  694. window.tempTip.postBasicRequest("{{url('transport/waybill/waybillMerge')}}",{ids:checkData},res=>{
  695. window.tempTip.cancelWaitingTip();
  696. window.tempTip.setDuration(2000);
  697. setTimeout(function (){
  698. location.reload();
  699. },1000);
  700. return "运单已合并至“"+res+"”";
  701. },true);
  702. })
  703. },
  704. waybillSplit(){
  705. if (checkData.length<1){
  706. window.tempTip.setDuration(2000);
  707. window.tempTip.show("未选择任何记录");
  708. return;
  709. }
  710. window.tempTip.confirm("确定要拆分选中合并单吗?",()=>{
  711. window.tempTip.setDuration(99999);
  712. window.tempTip.waitingTip("拆分中,请稍等...");
  713. window.tempTip.postBasicRequest("{{url('transport/waybill/waybillSplit')}}",{ids:checkData},res=>{
  714. window.tempTip.cancelWaitingTip();
  715. window.tempTip.setDuration(2000);
  716. setTimeout(function (){
  717. location.reload();
  718. },1000);
  719. return res;
  720. });
  721. })
  722. },
  723. //快递面单打印
  724. expressFaceList(){
  725. if (checkData.length<1){
  726. window.tempTip.setDuration(2000);
  727. window.tempTip.show("未选择任何记录");
  728. return;
  729. }
  730. window.tempTip.postBasicRequest("{{url('transport/waybill/expressFaceList')}}",{ids:checkData},res=>{
  731. let msg = '';
  732. res.forEach((item,index)=>{
  733. if (item.express_face_list == 1 )msg += item.waybill_number + " "
  734. })
  735. //加载js
  736. var script = document.createElement('script');
  737. script.setAttribute('type','text/javascript');
  738. script.setAttribute('src',"{{mix('js/lodop/LodopFuncs.js')}}");
  739. document.getElementsByTagName('head')[0].appendChild(script);
  740. if(msg)msg += '已打印过,确定重复打印? ';
  741. else msg = '确定要打印快递面单吗?';
  742. window.tempTip.confirm(msg,()=>{
  743. window.tempTip.setDuration(4000);
  744. window.tempTip.waitingTip("打印中,请稍等...");
  745. printTest(res)
  746. })
  747. });
  748. },
  749. rendingFloatBtn(){
  750. let parent = $('.pick-btn :visible');
  751. if (parent.length<1)return;
  752. parent = parent[0];
  753. let node = document.createElement("btn");
  754. parent.className += "position-relative";
  755. node.className = "position-absolute btn btn-sm btn-success total-fee";
  756. node.style.top=0;
  757. node.style.left=0;
  758. node.style.marginTop="-16%";
  759. node.innerText = '总计';
  760. parent.before(node);
  761. node.onclick=this.countPickUpFee;
  762. },
  763. countPickUpFee(){
  764. let url = '{{url('transport/waybill/countPickUpFee')}}';
  765. let urlRequest = location.search; //获取url中"?"符后的字串
  766. let theRequest = {};
  767. if (urlRequest.indexOf("?") != -1) {
  768. let str = urlRequest.substr(1);
  769. let strs = str.split("&");
  770. for(let i = 0; i < strs.length; i ++) {
  771. theRequest[strs[i].split("=")[0]] = decodeURIComponent(decodeURI(strs[i].split("=")[1]));
  772. }
  773. }
  774. window.axios.post(url,{param:theRequest})
  775. .then(response=> {
  776. if (!response.data.success){
  777. tempTip.setDuration(2000);
  778. tempTip.show(response.data.message);
  779. }else{
  780. $('.total-fee').text('总计:'+response.data.data);
  781. tempTip.setDuration(2000);
  782. tempTip.showSuccess('根据当前筛选条件计算专线提货费成功')
  783. }
  784. }
  785. ).catch(function (err){
  786. tempTip.setDuration(2000);
  787. tempTip.show('根据当前筛选条件计算专线提货费失败,网络连接错误!'+err)
  788. })
  789. },
  790. dailyBillingCount(){
  791. if (this.dailyBilling.screenDate==='')this.error.screenDate='请指定日期';
  792. if (this.dailyBilling.billing==='')this.error.billing='专线费必填';
  793. if (this.dailyBilling.billing && this.dailyBilling.screenDate)this.error={};
  794. if (this.error.billing ||this.error.screenDate)return;
  795. let url = '{{url('transport/waybill/dailyBilling')}}';
  796. let param=this.dailyBilling;
  797. window.axios.post(url,{param:param})
  798. .then(response=> {
  799. if (!response.data.success){
  800. $('#dailyBilling').modal('hide');
  801. this.dailyBilling={};
  802. this.error={};
  803. tempTip.setDuration(3000);
  804. tempTip.show(response.data.message);
  805. }else{
  806. this.waybills.forEach(function (waybill){
  807. response.data.data.forEach(function (item){
  808. if (waybill.id==item.id){
  809. waybill.pick_up_fee=item.pick_up_fee;
  810. }
  811. })
  812. })
  813. $('#dailyBilling').modal('hide');
  814. this.dailyBilling={};
  815. this.error={};
  816. tempTip.setDuration(3000);
  817. tempTip.showSuccess('按日输入专线费成功')
  818. }
  819. }
  820. ).catch(function (err){
  821. tempTip.setDuration(3000);
  822. tempTip.show('按日输入专线费失败,网络连接错误!'+err)
  823. })
  824. },
  825. rendingHeader(){
  826. let column = [
  827. {name:'operation',value: '操作', neglect: true, class:"td-operation"},
  828. @can('运输管理-运单-置顶'){name:'onTop',value: '置顶', neglect: true, class:"td-operation"},@endcan
  829. {name:'status',value: '状态', class:"td-operation"},
  830. {name:'express_face_list',value: '快递面单是否打印', class:"td-warm"},
  831. {name:'index',value: '序号', neglect: true, class:"td-warm"},
  832. {name:'created_at', neglect: true,value: '创建时间', class:"td-warm"},
  833. {name:'operating',value: '操作记录', class:"td-warm"},
  834. {name:'type',value: '运单类型', class:"td-warm"},
  835. {name:'owner',value: '货主', class:"td-warm"},
  836. {name:'source_bill',value: '客户订单号', class:"td-warm"},
  837. {name:'wms_bill_number',value: 'WMS订单号', class:"td-warm"},
  838. {name:'order_status',value: '订单状态', class:"td-warm"},
  839. {name:'end_date',value: '完结时间', class:"td-warm"},
  840. {name:'waybill_number',value: '运单号', class:"td-warm"},
  841. {name:'charge',value: '运输收费', neglect: true, class:"td-warm"},
  842. {name:'other_charge',value: '其他收费', neglect: true, class:"td-warm"},
  843. {name:'other_charge_remark',value: '其他收费备注', class:"td-warm"},
  844. {name:'img',value: '照片', neglect: true, class:"td-warm"},
  845. {name:'recipient',value: '收件人', class:"td-cool"},
  846. {name:'recipient_mobile',value: '收件人电话', class:"td-cool"},
  847. {name:'origination',value: '始发地', class:"td-cool"},
  848. {name:'province',value: '省', class:"td-cool"},
  849. {name:'city',value: '市', class:"td-cool"},
  850. {name:'district',value: '区', class:"td-cool"},
  851. {name:'destination',value: '目的地', class:"td-cool"},
  852. {name:'carrier',value: '承运商', class:"td-cool"},
  853. {name:'carrier_bill',value: '单号/车型', neglect: true, class:"td-cool"},
  854. {name:'car_owner_info',value: '车辆信息', neglect: true, class:"td-cool"}, // 车辆信息
  855. {name:'warehouse_weight',value: '仓库计抛', neglect: true, class:"td-cool"},
  856. {name:'carrier_weight',value: '承运商计抛', neglect: true, class:"td-cool"},
  857. {name:'warehouse_weight_other',value: '仓库计重', neglect: true, class:"td-cool"},
  858. {name:'carrier_weight_other',value: '承运商计重', neglect: true, class:"td-cool"},
  859. {name:'amount',value: '计件', neglect: true, class:"td-cool"},
  860. {name:'mileage',value: '里程', neglect: true, class:"td-cool"},
  861. {name:'ordering_remark',value: '运单备注', class:"td-cool"},
  862. @can('运输管理-运单-可见费用项') @can('运输管理-运单-运费'){name:'fee',value: '运费', neglect: true, class:"td-helpful"},@endcan
  863. {name:'pick_up_fee',value: '提货费', neglect: true, class:"td-helpful pick-btn"},
  864. {name:'other_fee',value: '其他支出', neglect: true, class:"td-helpful"},@endcan
  865. {name:'deliver_at',value: '发货时间', class:"td-helpful"},
  866. {name:'dispatch_remark',value: '调度备注', class:"td-helpful"},
  867. @can('运输管理-运单-删除'){name:'remove',value: '操作', neglect: true, class:"td-delete"},@endcan
  868. ];
  869. new Header({
  870. el: "table",
  871. name: "waybill",
  872. column: column,
  873. data: this.waybills,
  874. restorationColumn: 'id',
  875. fixedTop:($('#form_div').height())+2,
  876. before : [
  877. {colspan:'4',value: '', class:"table-header-layer-1"},
  878. {colspan:'15',value: '运单信息',font:"fa fa-file-text-o", class:"table-header-layer-1"},
  879. {colspan:'17',value: '运输信息',font:"fa fa-truck", class:"table-header-layer-1"},
  880. {colspan:'5',value: '收费信息',font:"fa fa-rmb", class:"table-header-layer-1"},
  881. @can('运输管理-运单-删除'){colspan:'1',value: '',font:"", class:"table-header-layer-1"},@endcan
  882. ],
  883. }).init();
  884. },
  885. btnRefreshWeightZoomIn(waybill){
  886. waybill.btn_refresh_weight='zoomIn'
  887. },
  888. btnRefreshWeightZoomOut(waybill){
  889. waybill.btn_refresh_weight='zoomOut'
  890. },
  891. waybillAudit(id,waybill_number){
  892. if(!confirm('确定要通过“'+waybill_number+'”的审核吗?'))return
  893. let _this=this;
  894. let url = '{{url('transport/waybill/waybillAudit')}}';
  895. window.axios.post(url, {id:id})
  896. .then(
  897. function (response) {
  898. window.tempTip.setDuration(3000);
  899. if (response.data.success){
  900. _this.waybills.forEach(function (waybill) {
  901. if (waybill.id===id){
  902. waybill.status=response.data.status;
  903. waybill.waybillAuditLogs.push(response.data.waybillAuditLog);
  904. }
  905. });
  906. window.tempTip.setDuration(2000);
  907. window.tempTip.showSuccess('审核'+waybill_number+'成功!');
  908. }else if (response.data.exception!=null)window.tempTip.show(response.data.exception);
  909. else window.tempTip.show('审核失败!');
  910. }
  911. ).catch(function (err) {
  912. window.tempTip.show('审核失败,网络连接错误!'+err);
  913. });
  914. },
  915. waybillDestroy(id,waybill_number,index){
  916. if(!confirm('确定要删除运单号为:“'+waybill_number+'”的运单吗?')){return};
  917. let url = '{{url('transport/waybill')}}/'+id;
  918. let _this = this;
  919. axios.delete(url).then(
  920. function (response) {
  921. if(!response.data.success){
  922. tempTip.setDuration(3000);
  923. tempTip.show('运单:'+waybill_number+'删除失败!');
  924. }else {
  925. tempTip.setDuration(2000);
  926. tempTip.showSuccess('运单:'+waybill_number+'删除成功!');
  927. _this.$delete(_this.waybills,index);
  928. }
  929. }
  930. ).catch(function (err) {
  931. tempTip.setDuration(3000);
  932. tempTip.show('删除失败,网络链接错误!'+err);
  933. });
  934. },
  935. waybillRetreatAudit(waybill){
  936. if(!confirm('确定要驳回“'+waybill.waybill_number+'”的审核吗?'))return;
  937. let url='{{url('transport/waybill/waybillRetreatAudit')}}';
  938. window.axios.post(url,{id:waybill.id})
  939. .then(response=> {
  940. window.tempTip.setDuration(3000);
  941. if (response.data.success){
  942. waybill.status = response.data.status;
  943. waybill.waybillAuditLogs.push(response.data.log);
  944. window.tempTip.showSuccess(waybill.waybill_number+'审核驳回成功!');
  945. }else window.tempTip.show('审核驳回失败!');
  946. }
  947. ).catch(function (err){window.tempTip.show('审核驳回失败,网络连接错误!'+err)})
  948. },
  949. waybillEndAudit(id,waybill_number){
  950. if(!confirm('确定要通过“'+waybill_number+'”的终审吗?'))return;
  951. let _this=this;
  952. let w;
  953. let url='{{url('transport/waybill/waybillEndAudit')}}';
  954. axios.post(url, {id:id})
  955. .then(
  956. function (response) {
  957. if (response.data.success){
  958. _this.waybills.forEach(function (s) {
  959. if (s.id===id){
  960. s.status=response.data.status;
  961. s.waybillAuditLogs.push(response.data.waybillAuditLog);
  962. w=s.waybill_number;
  963. }
  964. });
  965. tempTip.setDuration(3000);
  966. tempTip.showSuccess(w+'终审完毕!');
  967. }else if (response.data.exception!=null){
  968. tempTip.setDuration(3000);
  969. tempTip.show(response.data.exception);
  970. }else {
  971. tempTip.setDuration(3000);
  972. tempTip.show('终审失败!');
  973. }
  974. }
  975. ).catch(function (err) {
  976. tempTip.setDuration(3000);
  977. tempTip.show('终审失败,网络连接错误!'+err);
  978. });
  979. },
  980. waybillExport(checkAllSign){
  981. let url = '{{url('transport/waybill/export')}}';
  982. let token='{{ csrf_token() }}';
  983. excelExport(checkAllSign,checkData,url,this.sum,token,{append:this.appendFluxInfo});
  984. },
  985. selectedColor(id){
  986. if (id && id===this.selectTr)return;
  987. this.selectTr=id;
  988. },
  989. mouseleaveOwner:function () {
  990. if(!this.isOut&&!this.isBlur){
  991. this.isOwnersBtn=false;
  992. }
  993. },
  994. blurOwner:function () {
  995. if (!this.isOut&&!this.isBlur){
  996. this.isOwnersBtn=false;
  997. }
  998. },
  999. certiimg(waybill_number){
  1000. $('#'+waybill_number).click();
  1001. },
  1002. submitFile(e,index){
  1003. let files=e.target.files;
  1004. window.tempTip.setDuration(3000);
  1005. if (files.length===0){window.tempTip.show("未选定图片!");return;}
  1006. let formData=new FormData();
  1007. for (let i=0;i<files.length;i++){
  1008. if (files[i].size >=5242880){window.tempTip.show("图片大小不能超过5MB!");return;}
  1009. formData.append("files[]",files[i]);
  1010. }
  1011. formData.append("id",this.waybills[index].id);
  1012. window.tempTip.postBasicRequest('{{url('transport/waybill/upload')}}',formData,res=>{
  1013. if (this.waybills[index].uploadFiles.length===0) this.$set(this.waybills[index],'uploadFiles',res);
  1014. else this.$set(this.waybills[index],'uploadFiles',this.waybills[index].uploadFiles.concat(res));
  1015. return "上传成功";
  1016. },false,true);
  1017. },
  1018. commonImg(id,uploadFiles){
  1019. let div = "";
  1020. let isBtn = '@can('运输管理-运单-图片删除') true @endcan ';
  1021. for(let i=0;i<uploadFiles.length;i++){
  1022. 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>" : "";
  1023. let href = this.imgPrefix+uploadFiles[i].url+'-bulky.'+uploadFiles[i].type;
  1024. let src = this.imgPrefix+uploadFiles[i].url+'-common.'+uploadFiles[i].type;
  1025. div += "<div><a target='_blank' href='"+href+"'><img alt='#' src='"+src+"' style='position: relative;' ></a>"+btn+"</div>"
  1026. }
  1027. $('#'+id).after(
  1028. "<div id=\"common_"+id+"\" style='position: absolute;padding-bottom: 2px;z-index: 99'>" +
  1029. "<div style='position:absolute;left: -50px' class='overflow-y-scrollbar-200'>"+div+
  1030. "</div></div>");
  1031. },
  1032. removeCommonImg(id){
  1033. $('#'+id).remove();
  1034. },
  1035. btnDeleteImg(e){
  1036. let idstr = $(e).val();
  1037. let id = idstr.substr( idstr.indexOf('_')+1);
  1038. let url = e.getAttribute("data-url");
  1039. if (!confirm('确定要删除所选图片吗?'))return;
  1040. this.destroyImg(id,url);
  1041. },
  1042. deleteImg(){
  1043. if (checkData.length <= 0) {
  1044. window.tempTip.setDuration(2000);
  1045. window.tempTip.showSuccess('没有勾选任何记录');
  1046. return;
  1047. }
  1048. if (!confirm('确定要删除所选图片吗?'))return;
  1049. this.destroyImg(checkData);
  1050. },
  1051. destroyImg(id,url = null){
  1052. window.tempTip.postBasicRequest('{{url('transport/waybill/deleteImg')}}',{id:id,url:url},()=>{
  1053. if (url){
  1054. this.waybills.some((waybill,i)=>{
  1055. if (waybill.id===id){
  1056. waybill.uploadFiles.some((file,j)=>{
  1057. if (file.url === url){this.$delete(this.waybills[i].uploadFiles,j);return true;}
  1058. });
  1059. return true;
  1060. }
  1061. });
  1062. }else{
  1063. this.waybills.forEach((waybill,i)=>{
  1064. if (id.includes(waybill.id))this.$set(this.waybills[i],'uploadFiles',[]);
  1065. });
  1066. }
  1067. return "删除成功";
  1068. });
  1069. },
  1070. // 运输收费修改
  1071. waybillChargeCheck:function (e) {
  1072. let target = $(e.target);
  1073. target.hide();
  1074. let input = target.next();
  1075. input.show();
  1076. input.focus();
  1077. },
  1078. // 运输收费失焦事件
  1079. updateWaybillCharge:function (e) {
  1080. let target = $(e.target);
  1081. let _this = this;
  1082. let span = target.prev();
  1083. let id = target.attr('data_id');
  1084. let oldCharge = span.text();
  1085. let charge = target.val();
  1086. if(charge !== span.text()){
  1087. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeCharge")}}';
  1088. axios.post(ajaxUrl,{'id':id,'charge':charge}).then(function (response) {
  1089. if(response.data.success){
  1090. _this.updateWaybill(id,charge);
  1091. tempTip.setDuration(2000);
  1092. tempTip.showSuccess('运输收费修改成功');
  1093. }else{
  1094. tempTip.setDuration(3000);
  1095. tempTip.show('运输收费修改失败!'+response.data.fail_info);
  1096. _this.updateWaybill(id,oldCharge);
  1097. }
  1098. }).catch(function (err) {
  1099. tempTip.setDuration(3000);
  1100. tempTip.show('运输收费修改失败!网络异常:'+err);
  1101. _this.updateWaybill(id,oldCharge);
  1102. });
  1103. }
  1104. span.show();
  1105. target.hide();
  1106. },
  1107. // 为运单添加运输收费
  1108. addWaybillCharge(e){
  1109. let target = $(e.target);
  1110. target.css('width','85px');
  1111. let _this = this;
  1112. let id = target.attr('data_id');
  1113. let charge = target.val();
  1114. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeCharge")}}';
  1115. if(charge === ''|| charge === null){
  1116. target.css('width','75px');
  1117. return;
  1118. }else{
  1119. axios.post(ajaxUrl,{'id':id,'charge':charge}).then(function (response) {
  1120. if(response.data.success){
  1121. tempTip.setDuration(2000);
  1122. tempTip.showSuccess('运输收费添加成功');
  1123. _this.updateWaybill(id,charge);
  1124. }else{
  1125. tempTip.setDuration(3000);
  1126. tempTip.show('运输收费添加失败!'+response.data.fail_info);
  1127. }
  1128. }).catch(function (err) {
  1129. tempTip.setDuration(3000);
  1130. tempTip.show('运输收费添加失败!网络异常:'+err);
  1131. });
  1132. target.css('width','75px');
  1133. }
  1134. },
  1135. // 修改运输收费更新表格数据
  1136. updateWaybill(id,newCharge){
  1137. this.waybills.some(function(waybill){
  1138. if(waybill.id === id){
  1139. waybill.charge = newCharge;
  1140. return true;
  1141. }
  1142. })
  1143. },
  1144. // 运费修改
  1145. waybillFeeCheck:function (e) {
  1146. let target = $(e.target);
  1147. target.hide();
  1148. let input = target.next();
  1149. input.show();
  1150. input.focus();
  1151. },
  1152. // 失焦事件
  1153. updateWaybillFee:function (e) {
  1154. let target = $(e.target);
  1155. let _this = this;
  1156. let span = target.prev();
  1157. let id = target.attr('data_id');
  1158. let oldFee = span.text();
  1159. let fee = target.val();
  1160. if(fee !== span.text()){
  1161. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeFee")}}';
  1162. axios.post(ajaxUrl,{'id':id,'fee':fee}).then(function (response) {
  1163. if(response.data.success){
  1164. _this.updateWaybills(id,fee);
  1165. tempTip.setDuration(2000);
  1166. tempTip.showSuccess('运单运费修改成功');
  1167. }else{
  1168. tempTip.setDuration(3000);
  1169. tempTip.show('运单运费修改失败!'+response.data.fail_info);
  1170. _this.updateWaybills(id,oldFee);
  1171. }
  1172. }).catch(function (err) {
  1173. tempTip.setDuration(3000);
  1174. tempTip.show('运单运费修改失败!网络异常:'+err);
  1175. _this.updateWaybills(id,oldFee);
  1176. });
  1177. }
  1178. span.show();
  1179. target.hide();
  1180. },
  1181. // 为直发车运单添加运费
  1182. addWaybillFee(e){
  1183. let target = $(e.target);
  1184. target.css('width','85px');
  1185. let _this = this;
  1186. let id = target.attr('data_id');
  1187. let fee = target.val();
  1188. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeFee")}}';
  1189. if(fee === ''|| fee === null){
  1190. target.css('width','75px');
  1191. return;
  1192. }else{
  1193. axios.post(ajaxUrl,{'id':id,'fee':fee}).then(function (response) {
  1194. if(response.data.success){
  1195. tempTip.setDuration(2000);
  1196. tempTip.showSuccess('运单运费添加成功');
  1197. _this.updateWaybills(id,fee);
  1198. }else{
  1199. tempTip.setDuration(3000);
  1200. tempTip.show('运单运费添加失败!'+response.data.fail_info);
  1201. }
  1202. }).catch(function (err) {
  1203. tempTip.setDuration(3000);
  1204. tempTip.show('运单运费添加失败!网络异常:'+response.data.fail_info);
  1205. });
  1206. target.css('width','75px');
  1207. }
  1208. },
  1209. // 更新表格数据
  1210. updateWaybills(id,newFee){
  1211. this.waybills.some(function(waybill){
  1212. if(waybill.id === id){
  1213. waybill.fee = newFee;
  1214. return true;
  1215. }
  1216. })
  1217. },
  1218. // 置顶操作
  1219. waybillOnTop:function(e){
  1220. let target = $(e.target);
  1221. let id = target.attr('data_id');
  1222. $("#onTopId").val(id);
  1223. $('#exampleModal').modal('show');
  1224. },
  1225. submitOnTop:function(){
  1226. let ajaxUrl = '{{url('transport/waybill/ontop/top')}}';
  1227. let remark = $("#remark").val();
  1228. let id = $("#onTopId").val();
  1229. if(remark === ''){
  1230. $("#remark").focus();
  1231. $('#remark').addClass('is-invalid');
  1232. }else{
  1233. axios.post(ajaxUrl,{'id':id,'detail':remark}).then(function (response) {
  1234. if(response.data.success){
  1235. tempTip.setDuration(3000);
  1236. tempTip.showSuccess('置顶成功');
  1237. $('#exampleModal').modal('hide');
  1238. setTimeout(function(){
  1239. window.location.reload();
  1240. }
  1241. ,1000);
  1242. }else{
  1243. tempTip.setDuration(3000);
  1244. tempTip.show('置顶失败!'+response.fail_info);
  1245. }
  1246. }).catch(function (err) {
  1247. tempTip.setDuration(3000);
  1248. tempTip.show('置顶失败,网络连接错误!'+err);
  1249. });
  1250. }
  1251. },
  1252. changeRemark:function(){
  1253. $('#remark').removeClass('is-invalid');
  1254. },
  1255. cancelOnTop:function (e) {
  1256. let target = $(e.target);
  1257. let id = target.attr('data_id');
  1258. let ajaxUrl='{{url('transport/waybill/ontop/cancel')}}';
  1259. if(id !== null){
  1260. axios.post(ajaxUrl,{'id':id}).then(function (response) {
  1261. if(response.data.success){
  1262. tempTip.setDuration(30000);
  1263. tempTip.showSuccess('取消置顶成功');
  1264. setTimeout(function(){
  1265. window.location.reload();
  1266. }
  1267. ,1000);
  1268. }else{
  1269. tempTip.setDuration(3000);
  1270. tempTip.show('取消置顶失败!'+response.fail_info);
  1271. }
  1272. }).catch(function (err) {
  1273. tempTip.setDuration(3000);
  1274. tempTip.show('取消置顶失败,网络连接错误!'+err);
  1275. });
  1276. }
  1277. },
  1278. hidetop:function(e) {
  1279. let target = $(e.target);
  1280. let top = target.parent().find('.top');
  1281. let tip = target.parent().find('.toptd');
  1282. for (let i=0;i<tip.length;i++)if(!tip[i] || tip[i].style.display==='none')tip.splice(i,1);
  1283. top.hide();
  1284. tip.tooltip('show');
  1285. },
  1286. showtop:function(e){
  1287. let target = $(e.target);
  1288. let top = target.parent().find('.top');
  1289. let tip = target.parent().find('.toptd');
  1290. top.show();
  1291. tip.tooltip('hide');
  1292. },
  1293. refreshWaveHouseWeight(wms_bill_number) {
  1294. let _this=this;
  1295. let url='{{url('transport/waybill/refreshWaveHouseWeight')}}';
  1296. window.axios.post(url,{'wms_bill_number':wms_bill_number}).then(function (response) {
  1297. if(response.data.success){
  1298. _this.waybills.every(function (waybill) {
  1299. if (waybill.wms_bill_number==wms_bill_number){
  1300. waybill.warehouse_weight_other=response.data.warehouseWeight;
  1301. return false;
  1302. }
  1303. return true;
  1304. });
  1305. window.tempTip.setDuration(3000);
  1306. window.tempTip.showSuccess('刷新计重成功');
  1307. }else{
  1308. window.tempTip.setDuration(3000);
  1309. window.tempTip.show('刷新计重失败!'+response.data.fail_info);
  1310. }
  1311. }).catch(function (err) {
  1312. window.tempTip.setDuration(3000);
  1313. window.tempTip.show('刷新计重失败,网络连接错误!'+err);
  1314. });
  1315. },
  1316. //选择文件
  1317. selectedFile(){
  1318. $("#uploadImg").click();
  1319. },
  1320. //上传文件
  1321. uploadFiles(event){
  1322. let images = event.target.files;
  1323. for(let i=0;i<images.length;i++){
  1324. let MAX_HEIGHT = 1000;
  1325. let image = new Image();
  1326. image.onload = ()=>{
  1327. let canvas = document.createElement("canvas");
  1328. if (image.height > MAX_HEIGHT && image.height >= image.width) {
  1329. image.width *= MAX_HEIGHT / image.height;
  1330. image.height = MAX_HEIGHT;
  1331. }
  1332. if (image.width > MAX_HEIGHT && image.width > image.height) {
  1333. image.height *= MAX_HEIGHT / image.width;
  1334. image.width = MAX_HEIGHT;
  1335. }
  1336. let ctx = canvas.getContext("2d");
  1337. ctx.clearRect(0, 0, canvas.width, canvas.height);
  1338. canvas.width = image.width;
  1339. canvas.height = image.height;
  1340. ctx.drawImage(image, 0, 0, image.width, image.height);
  1341. let src = canvas.toDataURL("image/jpeg");
  1342. let size = src.length;
  1343. this.images.push({
  1344. src : src,
  1345. name : images[i]["name"],
  1346. size : size,
  1347. });
  1348. this.size += size;
  1349. };
  1350. image.src = window.URL.createObjectURL(images[i]);
  1351. }
  1352. },
  1353. //删除图片
  1354. delTempImg(index){
  1355. this.$delete(this.images,index);
  1356. },
  1357. //上传图片
  1358. batchUploadImages(){
  1359. window.tempTip.setDuration(3000);
  1360. if (this.images.length<1){
  1361. window.tempTip.show("未选择图片");
  1362. return;
  1363. }
  1364. if (this.size > 104857600){
  1365. window.tempTip.show("上传图片超出100MB,请分开上传");
  1366. return;
  1367. }
  1368. window.tempTip.postBasicRequest('{{url('transport/waybill/batchUploadImages')}}',{images:this.images},res=>{
  1369. let result = res.data;
  1370. let errors = res.errors;
  1371. if (errors.length>0)this.batchUploadError = errors;
  1372. result.forEach(r=>{
  1373. this.waybills.some((waybill,i)=> {
  1374. if (waybill.id==r.id){
  1375. this.$set(this.waybills[i],'uploadFiles',r.upload_files);
  1376. return true;
  1377. }
  1378. });
  1379. this.size = 0;
  1380. });
  1381. return "上传成功";
  1382. },true);
  1383. },
  1384. },
  1385. filters:{
  1386. km:function(value){
  1387. if(!value)return '';
  1388. return value + ' km';
  1389. },
  1390. money:function(value){
  1391. if(value.indexOf('.')>0){
  1392. return value
  1393. }
  1394. return value += '.00';
  1395. },
  1396. filterZero:function(value){
  1397. value=value.replace(/\.00$/,'');
  1398. value=value.replace(/(\.[1-9])0$/,'$1');
  1399. return value;
  1400. },
  1401. size:function (val) {
  1402. if (!val)return '';
  1403. val = Number(parseInt(val/1024));
  1404. if (val >= 1024){
  1405. return parseInt(val/1024)+"MB";
  1406. }
  1407. return val+"KB";
  1408. },
  1409. resetOwner:function (val,merge,map){
  1410. if (!merge)return val;
  1411. merge = merge.split(',');
  1412. val = "";
  1413. merge.forEach((id,index)=>{
  1414. val += map[id] ? map[id] : '';
  1415. if (index!==merge.length-1 && map[id])val += ",";
  1416. });
  1417. return val;
  1418. },
  1419. }
  1420. });
  1421. // modal 隐藏时修改 input 为空
  1422. $("#exampleModal").on('hide.bs.modal',function(e){
  1423. $('#remark').val('');
  1424. });
  1425. /**
  1426. * 打印电子运单
  1427. * @param data
  1428. * @param serialNo
  1429. */
  1430. function printEWaybill(data, serialNo, barcode, wayNum){
  1431. //打印内容
  1432. console.log(barcode);
  1433. var printHtml = htmlTemplateObj.find("div#expressPrintArea").html();
  1434. LODOP.PRINT_INIT("二级模板");
  1435. LODOP.SET_PRINT_PAGESIZE(0,"100mm","180mm","CreateCustomPage");
  1436. LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
  1437. LODOP.ADD_PRINT_TABLE("2mm","0.6mm","95mm","177mm",printHtml);
  1438. LODOP.ADD_PRINT_BARCODE("79mm","10mm","84mm","15mm","128Auto", barcode);
  1439. LODOP.ADD_PRINT_BARCODE("117mm","45mm","50mm","8mm","128Auto", barcode);
  1440. //设定固定打印机
  1441. if(LODOP.SET_PRINTER_INDEX('EK100B'))LODOP.SET_PRINTER_INDEX('EK100B');
  1442. //打印
  1443. // LODOP.PREVIEW();
  1444. LODOP.PRINT();
  1445. // LODOP.PRINT_DESIGN();
  1446. //记录打印日志
  1447. try {
  1448. //printLogses(data);
  1449. window.tempTip.postBasicRequest("changeExpressTag",{id:data.waybillNumber},res=>{});
  1450. } catch (e) {
  1451. }
  1452. }
  1453. </script>
  1454. @endsection