index.blade.php 86 KB

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