index.blade.php 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489
  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. {name:'ordering_remark',type:'input',tip: '运单备注,默认全模糊查询,推荐配合日期使用',placeholder: '运单备注'},
  671. ]
  672. ];
  673. let param=[];
  674. this.$set(param,"uriType",'{{$uriType}}');
  675. this.form = new query({
  676. el:"#form_div",
  677. condition:data,
  678. param:param,
  679. appendDom : "btn",
  680. });
  681. this.form.init();
  682. this.rendingHeader();
  683. this.paginate = $("#paginate").val();
  684. let waybill = $('.table-header-layer-1')[1];
  685. $('.top').css('min-width', waybill.scrollWidth);
  686. this.rendingFloatBtn();
  687. },
  688. methods:{
  689. //运单合并
  690. waybillMerge(){
  691. if (checkData.length<2){
  692. window.tempTip.setDuration(2000);
  693. window.tempTip.show("至少选择两条运单进行合并");
  694. return;
  695. }
  696. window.tempTip.confirm("确定要合并选中运单吗?",()=>{
  697. window.tempTip.setDuration(5000);
  698. window.tempTip.waitingTip("合并中,请稍等...");
  699. window.tempTip.postBasicRequest("{{url('transport/waybill/waybillMerge')}}",{ids:checkData},res=>{
  700. window.tempTip.cancelWaitingTip();
  701. window.tempTip.setDuration(2000);
  702. setTimeout(function (){
  703. location.reload();
  704. },1000);
  705. return "运单已合并至“"+res+"”";
  706. },true);
  707. })
  708. },
  709. waybillSplit(){
  710. if (checkData.length<1){
  711. window.tempTip.setDuration(2000);
  712. window.tempTip.show("未选择任何记录");
  713. return;
  714. }
  715. window.tempTip.confirm("确定要拆分选中合并单吗?",()=>{
  716. window.tempTip.setDuration(99999);
  717. window.tempTip.waitingTip("拆分中,请稍等...");
  718. window.tempTip.postBasicRequest("{{url('transport/waybill/waybillSplit')}}",{ids:checkData},res=>{
  719. window.tempTip.cancelWaitingTip();
  720. window.tempTip.setDuration(2000);
  721. setTimeout(function (){
  722. location.reload();
  723. },1000);
  724. return res;
  725. });
  726. })
  727. },
  728. //快递面单打印
  729. expressFaceList(){
  730. if (checkData.length<1){
  731. window.tempTip.setDuration(2000);
  732. window.tempTip.show("未选择任何记录");
  733. return;
  734. }
  735. window.tempTip.postBasicRequest("{{url('transport/waybill/expressFaceList')}}",{ids:checkData},res=>{
  736. let msg = '';
  737. res.forEach((item,index)=>{
  738. if (item.express_face_list == 1 )msg += item.waybill_number + " "
  739. })
  740. //加载js
  741. var script = document.createElement('script');
  742. script.setAttribute('type','text/javascript');
  743. script.setAttribute('src',"{{mix('js/lodop/LodopFuncs.js')}}");
  744. document.getElementsByTagName('head')[0].appendChild(script);
  745. if(msg)msg += '已打印过,确定重复打印? ';
  746. else msg = '确定要打印快递面单吗?';
  747. window.tempTip.confirm(msg,()=>{
  748. window.tempTip.setDuration(4000);
  749. window.tempTip.waitingTip("打印中,请稍等...");
  750. printTest(res)
  751. })
  752. });
  753. },
  754. rendingFloatBtn(){
  755. let parent = $('.pick-btn :visible');
  756. if (parent.length<1)return;
  757. parent = parent[0];
  758. let node = document.createElement("btn");
  759. parent.className += "position-relative";
  760. node.className = "position-absolute btn btn-sm btn-success total-fee";
  761. node.style.top=0;
  762. node.style.left=0;
  763. node.style.marginTop="-16%";
  764. node.innerText = '总计';
  765. parent.before(node);
  766. node.onclick=this.countPickUpFee;
  767. },
  768. countPickUpFee(){
  769. let url = '{{url('transport/waybill/countPickUpFee')}}';
  770. let urlRequest = location.search; //获取url中"?"符后的字串
  771. let theRequest = {};
  772. if (urlRequest.indexOf("?") != -1) {
  773. let str = urlRequest.substr(1);
  774. let strs = str.split("&");
  775. for(let i = 0; i < strs.length; i ++) {
  776. theRequest[strs[i].split("=")[0]] = decodeURIComponent(decodeURI(strs[i].split("=")[1]));
  777. }
  778. }
  779. window.axios.post(url,{param:theRequest})
  780. .then(response=> {
  781. if (!response.data.success){
  782. tempTip.setDuration(2000);
  783. tempTip.show(response.data.message);
  784. }else{
  785. $('.total-fee').text('总计:'+response.data.data);
  786. tempTip.setDuration(2000);
  787. tempTip.showSuccess('根据当前筛选条件计算专线提货费成功')
  788. }
  789. }
  790. ).catch(function (err){
  791. tempTip.setDuration(2000);
  792. tempTip.show('根据当前筛选条件计算专线提货费失败,网络连接错误!'+err)
  793. })
  794. },
  795. dailyBillingCount(){
  796. if (this.dailyBilling.screenDate==='')this.error.screenDate='请指定日期';
  797. if (this.dailyBilling.billing==='')this.error.billing='专线费必填';
  798. if (this.dailyBilling.billing && this.dailyBilling.screenDate)this.error={};
  799. if (this.error.billing ||this.error.screenDate)return;
  800. let url = '{{url('transport/waybill/dailyBilling')}}';
  801. let param=this.dailyBilling;
  802. window.axios.post(url,{param:param})
  803. .then(response=> {
  804. if (!response.data.success){
  805. $('#dailyBilling').modal('hide');
  806. this.dailyBilling={};
  807. this.error={};
  808. tempTip.setDuration(3000);
  809. tempTip.show(response.data.message);
  810. }else{
  811. this.waybills.forEach(function (waybill){
  812. response.data.data.forEach(function (item){
  813. if (waybill.id==item.id){
  814. waybill.pick_up_fee=item.pick_up_fee;
  815. }
  816. })
  817. })
  818. $('#dailyBilling').modal('hide');
  819. this.dailyBilling={};
  820. this.error={};
  821. tempTip.setDuration(3000);
  822. tempTip.showSuccess('按日输入专线费成功')
  823. }
  824. }
  825. ).catch(function (err){
  826. tempTip.setDuration(3000);
  827. tempTip.show('按日输入专线费失败,网络连接错误!'+err)
  828. })
  829. },
  830. rendingHeader(){
  831. let column = [
  832. {name:'operation',value: '操作', neglect: true, class:"td-operation"},
  833. @can('运输管理-运单-置顶'){name:'onTop',value: '置顶', neglect: true, class:"td-operation"},@endcan
  834. {name:'status',value: '状态', class:"td-operation"},
  835. {name:'express_face_list',value: '快递面单是否打印', class:"td-warm"},
  836. {name:'index',value: '序号', neglect: true, class:"td-warm"},
  837. {name:'created_at', neglect: true,value: '创建时间', class:"td-warm"},
  838. {name:'operating',value: '操作记录', class:"td-warm"},
  839. {name:'type',value: '运单类型', class:"td-warm"},
  840. {name:'owner',value: '货主', class:"td-warm"},
  841. {name:'source_bill',value: '客户订单号', class:"td-warm"},
  842. {name:'wms_bill_number',value: 'WMS订单号', class:"td-warm"},
  843. {name:'order_status',value: '订单状态', class:"td-warm"},
  844. {name:'end_date',value: '完结时间', class:"td-warm"},
  845. {name:'waybill_number',value: '运单号', class:"td-warm"},
  846. {name:'charge',value: '运输收费', neglect: true, class:"td-warm"},
  847. {name:'other_charge',value: '其他收费', neglect: true, class:"td-warm"},
  848. {name:'other_charge_remark',value: '其他收费备注', class:"td-warm"},
  849. {name:'img',value: '照片', neglect: true, class:"td-warm"},
  850. {name:'recipient',value: '收件人', class:"td-cool"},
  851. {name:'recipient_mobile',value: '收件人电话', class:"td-cool"},
  852. {name:'origination',value: '始发地', class:"td-cool"},
  853. {name:'province',value: '省', class:"td-cool"},
  854. {name:'city',value: '市', class:"td-cool"},
  855. {name:'district',value: '区', class:"td-cool"},
  856. {name:'destination',value: '目的地', class:"td-cool"},
  857. {name:'carrier',value: '承运商', class:"td-cool"},
  858. {name:'carrier_bill',value: '单号/车型', neglect: true, class:"td-cool"},
  859. {name:'car_owner_info',value: '车辆信息', neglect: true, class:"td-cool"}, // 车辆信息
  860. {name:'warehouse_weight',value: '仓库计抛', neglect: true, class:"td-cool"},
  861. {name:'carrier_weight',value: '承运商计抛', neglect: true, class:"td-cool"},
  862. {name:'warehouse_weight_other',value: '仓库计重', neglect: true, class:"td-cool"},
  863. {name:'carrier_weight_other',value: '承运商计重', neglect: true, class:"td-cool"},
  864. {name:'amount',value: '计件', neglect: true, class:"td-cool"},
  865. {name:'mileage',value: '里程', neglect: true, class:"td-cool"},
  866. {name:'ordering_remark',value: '运单备注', class:"td-cool"},
  867. @can('运输管理-运单-可见费用项') @can('运输管理-运单-运费'){name:'fee',value: '运费', neglect: true, class:"td-helpful"},@endcan
  868. {name:'pick_up_fee',value: '提货费', neglect: true, class:"td-helpful pick-btn"},
  869. {name:'other_fee',value: '其他支出', neglect: true, class:"td-helpful"},@endcan
  870. {name:'deliver_at',value: '发货时间', class:"td-helpful"},
  871. {name:'dispatch_remark',value: '调度备注', class:"td-helpful"},
  872. @can('运输管理-运单-删除'){name:'remove',value: '操作', neglect: true, class:"td-delete"},@endcan
  873. ];
  874. new Header({
  875. el: "table",
  876. name: "waybill",
  877. column: column,
  878. data: this.waybills,
  879. restorationColumn: 'id',
  880. fixedTop:($('#form_div').height()) + ($('#btn').height())+2,
  881. before : [
  882. {colspan:'4',value: '', class:"table-header-layer-1"},
  883. {colspan:'15',value: '运单信息',font:"fa fa-file-text-o", class:"table-header-layer-1"},
  884. {colspan:'17',value: '运输信息',font:"fa fa-truck", class:"table-header-layer-1"},
  885. {colspan:'5',value: '收费信息',font:"fa fa-rmb", class:"table-header-layer-1"},
  886. @can('运输管理-运单-删除'){colspan:'1',value: '',font:"", class:"table-header-layer-1"},@endcan
  887. ],
  888. }).init();
  889. },
  890. btnRefreshWeightZoomIn(waybill){
  891. waybill.btn_refresh_weight='zoomIn'
  892. },
  893. btnRefreshWeightZoomOut(waybill){
  894. waybill.btn_refresh_weight='zoomOut'
  895. },
  896. waybillAudit(id,waybill_number){
  897. if(!confirm('确定要通过“'+waybill_number+'”的审核吗?'))return
  898. let _this=this;
  899. let url = '{{url('transport/waybill/waybillAudit')}}';
  900. window.axios.post(url, {id:id})
  901. .then(
  902. function (response) {
  903. window.tempTip.setDuration(3000);
  904. if (response.data.success){
  905. _this.waybills.forEach(function (waybill) {
  906. if (waybill.id===id){
  907. waybill.status=response.data.status;
  908. waybill.waybillAuditLogs.push(response.data.waybillAuditLog);
  909. }
  910. });
  911. window.tempTip.setDuration(2000);
  912. window.tempTip.showSuccess('审核'+waybill_number+'成功!');
  913. }else if (response.data.exception!=null)window.tempTip.show(response.data.exception);
  914. else window.tempTip.show('审核失败!');
  915. }
  916. ).catch(function (err) {
  917. window.tempTip.show('审核失败,网络连接错误!'+err);
  918. });
  919. },
  920. waybillDestroy(id,waybill_number,index){
  921. if(!confirm('确定要删除运单号为:“'+waybill_number+'”的运单吗?')){return};
  922. let url = '{{url('transport/waybill')}}/'+id;
  923. let _this = this;
  924. axios.delete(url).then(
  925. function (response) {
  926. if(!response.data.success){
  927. tempTip.setDuration(3000);
  928. tempTip.show('运单:'+waybill_number+'删除失败!');
  929. }else {
  930. tempTip.setDuration(2000);
  931. tempTip.showSuccess('运单:'+waybill_number+'删除成功!');
  932. _this.$delete(_this.waybills,index);
  933. }
  934. }
  935. ).catch(function (err) {
  936. tempTip.setDuration(3000);
  937. tempTip.show('删除失败,网络链接错误!'+err);
  938. });
  939. },
  940. waybillRetreatAudit(waybill){
  941. if(!confirm('确定要驳回“'+waybill.waybill_number+'”的审核吗?'))return;
  942. let url='{{url('transport/waybill/waybillRetreatAudit')}}';
  943. window.axios.post(url,{id:waybill.id})
  944. .then(response=> {
  945. window.tempTip.setDuration(3000);
  946. if (response.data.success){
  947. waybill.status = response.data.status;
  948. waybill.waybillAuditLogs.push(response.data.log);
  949. window.tempTip.showSuccess(waybill.waybill_number+'审核驳回成功!');
  950. }else window.tempTip.show('审核驳回失败!');
  951. }
  952. ).catch(function (err){window.tempTip.show('审核驳回失败,网络连接错误!'+err)})
  953. },
  954. waybillEndAudit(id,waybill_number){
  955. if(!confirm('确定要通过“'+waybill_number+'”的终审吗?'))return;
  956. let _this=this;
  957. let w;
  958. let url='{{url('transport/waybill/waybillEndAudit')}}';
  959. axios.post(url, {id:id})
  960. .then(
  961. function (response) {
  962. if (response.data.success){
  963. _this.waybills.forEach(function (s) {
  964. if (s.id===id){
  965. s.status=response.data.status;
  966. s.waybillAuditLogs.push(response.data.waybillAuditLog);
  967. w=s.waybill_number;
  968. }
  969. });
  970. tempTip.setDuration(3000);
  971. tempTip.showSuccess(w+'终审完毕!');
  972. }else if (response.data.exception!=null){
  973. tempTip.setDuration(3000);
  974. tempTip.show(response.data.exception);
  975. }else {
  976. tempTip.setDuration(3000);
  977. tempTip.show('终审失败!');
  978. }
  979. }
  980. ).catch(function (err) {
  981. tempTip.setDuration(3000);
  982. tempTip.show('终审失败,网络连接错误!'+err);
  983. });
  984. },
  985. waybillExport(checkAllSign){
  986. let url = '{{url('transport/waybill/export')}}';
  987. let token='{{ csrf_token() }}';
  988. excelExport(checkAllSign,checkData,url,this.sum,token,{append:this.appendFluxInfo});
  989. },
  990. selectedColor(id){
  991. if (id && id===this.selectTr)return;
  992. this.selectTr=id;
  993. },
  994. mouseleaveOwner:function () {
  995. if(!this.isOut&&!this.isBlur){
  996. this.isOwnersBtn=false;
  997. }
  998. },
  999. blurOwner:function () {
  1000. if (!this.isOut&&!this.isBlur){
  1001. this.isOwnersBtn=false;
  1002. }
  1003. },
  1004. certiimg(waybill_number){
  1005. $('#'+waybill_number).click();
  1006. },
  1007. submitFile(e,index){
  1008. let files=e.target.files;
  1009. console.log(files)
  1010. window.tempTip.setDuration(3000);
  1011. if (files.length===0){window.tempTip.show("未选定图片!");return;}
  1012. let formData=new FormData();
  1013. for (let i=0;i<files.length;i++){
  1014. if (files[i].size >=5242880){window.tempTip.show("图片大小不能超过5MB!");return;}
  1015. formData.append("files[]",files[i]);
  1016. }
  1017. formData.append("id",this.waybills[index].id);
  1018. window.tempTip.postBasicRequest('{{url('transport/waybill/upload')}}',formData,res=>{
  1019. if (this.waybills[index].uploadFiles.length===0) this.$set(this.waybills[index],'uploadFiles',res);
  1020. else this.$set(this.waybills[index],'uploadFiles',this.waybills[index].uploadFiles.concat(res));
  1021. return "上传成功";
  1022. },false,true);
  1023. },
  1024. commonImg(id,uploadFiles){
  1025. let div = "";
  1026. let isBtn = '@can('运输管理-运单-图片删除') true @endcan ';
  1027. for(let i=0;i<uploadFiles.length;i++){
  1028. 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>" : "";
  1029. let href = this.imgPrefix+uploadFiles[i].url+'-bulky.'+uploadFiles[i].type;
  1030. let src = this.imgPrefix+uploadFiles[i].url+'-common.'+uploadFiles[i].type;
  1031. div += "<div><a target='_blank' href='"+href+"'><img alt='#' src='"+src+"' style='position: relative;' ></a>"+btn+"</div>"
  1032. }
  1033. $('#'+id).after(
  1034. "<div id=\"common_"+id+"\" style='position: absolute;padding-bottom: 2px;z-index: 99'>" +
  1035. "<div style='position:absolute;left: -50px' class='overflow-y-scrollbar-200'>"+div+
  1036. "</div></div>");
  1037. },
  1038. removeCommonImg(id){
  1039. $('#'+id).remove();
  1040. },
  1041. btnDeleteImg(e){
  1042. let idstr = $(e).val();
  1043. let id = idstr.substr( idstr.indexOf('_')+1);
  1044. let url = e.getAttribute("data-url");
  1045. if (!confirm('确定要删除所选图片吗?'))return;
  1046. this.destroyImg(id,url);
  1047. },
  1048. deleteImg(){
  1049. if (checkData.length <= 0) {
  1050. window.tempTip.setDuration(2000);
  1051. window.tempTip.showSuccess('没有勾选任何记录');
  1052. return;
  1053. }
  1054. if (!confirm('确定要删除所选图片吗?'))return;
  1055. this.destroyImg(checkData);
  1056. },
  1057. destroyImg(id,url = null){
  1058. window.tempTip.postBasicRequest('{{url('transport/waybill/deleteImg')}}',{id:id,url:url},()=>{
  1059. if (url){
  1060. this.waybills.some((waybill,i)=>{
  1061. if (waybill.id===id){
  1062. waybill.uploadFiles.some((file,j)=>{
  1063. if (file.url === url){this.$delete(this.waybills[i].uploadFiles,j);return true;}
  1064. });
  1065. return true;
  1066. }
  1067. });
  1068. }else{
  1069. this.waybills.forEach((waybill,i)=>{
  1070. if (id.includes(waybill.id))this.$set(this.waybills[i],'uploadFiles',[]);
  1071. });
  1072. }
  1073. return "删除成功";
  1074. });
  1075. },
  1076. // 运输收费修改
  1077. waybillChargeCheck:function (e) {
  1078. let target = $(e.target);
  1079. target.hide();
  1080. let input = target.next();
  1081. input.show();
  1082. input.focus();
  1083. },
  1084. // 运输收费失焦事件
  1085. updateWaybillCharge:function (e) {
  1086. let target = $(e.target);
  1087. let _this = this;
  1088. let span = target.prev();
  1089. let id = target.attr('data_id');
  1090. let oldCharge = span.text();
  1091. let charge = target.val();
  1092. if(charge !== span.text()){
  1093. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeCharge")}}';
  1094. axios.post(ajaxUrl,{'id':id,'charge':charge}).then(function (response) {
  1095. if(response.data.success){
  1096. _this.updateWaybill(id,charge);
  1097. tempTip.setDuration(2000);
  1098. tempTip.showSuccess('运输收费修改成功');
  1099. }else{
  1100. tempTip.setDuration(3000);
  1101. tempTip.show('运输收费修改失败!'+response.data.fail_info);
  1102. _this.updateWaybill(id,oldCharge);
  1103. }
  1104. }).catch(function (err) {
  1105. tempTip.setDuration(3000);
  1106. tempTip.show('运输收费修改失败!网络异常:'+err);
  1107. _this.updateWaybill(id,oldCharge);
  1108. });
  1109. }
  1110. span.show();
  1111. target.hide();
  1112. },
  1113. // 为运单添加运输收费
  1114. addWaybillCharge(e){
  1115. let target = $(e.target);
  1116. target.css('width','85px');
  1117. let _this = this;
  1118. let id = target.attr('data_id');
  1119. let charge = target.val();
  1120. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeCharge")}}';
  1121. if(charge === ''|| charge === null){
  1122. target.css('width','75px');
  1123. return;
  1124. }else{
  1125. axios.post(ajaxUrl,{'id':id,'charge':charge}).then(function (response) {
  1126. if(response.data.success){
  1127. tempTip.setDuration(2000);
  1128. tempTip.showSuccess('运输收费添加成功');
  1129. _this.updateWaybill(id,charge);
  1130. }else{
  1131. tempTip.setDuration(3000);
  1132. tempTip.show('运输收费添加失败!'+response.data.fail_info);
  1133. }
  1134. }).catch(function (err) {
  1135. tempTip.setDuration(3000);
  1136. tempTip.show('运输收费添加失败!网络异常:'+err);
  1137. });
  1138. target.css('width','75px');
  1139. }
  1140. },
  1141. // 修改运输收费更新表格数据
  1142. updateWaybill(id,newCharge){
  1143. this.waybills.some(function(waybill){
  1144. if(waybill.id === id){
  1145. waybill.charge = newCharge;
  1146. return true;
  1147. }
  1148. })
  1149. },
  1150. // 运费修改
  1151. waybillFeeCheck:function (e) {
  1152. let target = $(e.target);
  1153. target.hide();
  1154. let input = target.next();
  1155. input.show();
  1156. input.focus();
  1157. },
  1158. // 失焦事件
  1159. updateWaybillFee:function (e) {
  1160. let target = $(e.target);
  1161. let _this = this;
  1162. let span = target.prev();
  1163. let id = target.attr('data_id');
  1164. let oldFee = span.text();
  1165. let fee = target.val();
  1166. if(fee !== span.text()){
  1167. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeFee")}}';
  1168. axios.post(ajaxUrl,{'id':id,'fee':fee}).then(function (response) {
  1169. if(response.data.success){
  1170. _this.updateWaybills(id,fee);
  1171. tempTip.setDuration(2000);
  1172. tempTip.showSuccess('运单运费修改成功');
  1173. }else{
  1174. tempTip.setDuration(3000);
  1175. tempTip.show('运单运费修改失败!'+response.data.fail_info);
  1176. _this.updateWaybills(id,oldFee);
  1177. }
  1178. }).catch(function (err) {
  1179. tempTip.setDuration(3000);
  1180. tempTip.show('运单运费修改失败!网络异常:'+err);
  1181. _this.updateWaybills(id,oldFee);
  1182. });
  1183. }
  1184. span.show();
  1185. target.hide();
  1186. },
  1187. // 为直发车运单添加运费
  1188. addWaybillFee(e){
  1189. let target = $(e.target);
  1190. target.css('width','85px');
  1191. let _this = this;
  1192. let id = target.attr('data_id');
  1193. let fee = target.val();
  1194. let ajaxUrl= '{{url("apiLocal/transport/waybill/changeFee")}}';
  1195. if(fee === ''|| fee === null){
  1196. target.css('width','75px');
  1197. return;
  1198. }else{
  1199. axios.post(ajaxUrl,{'id':id,'fee':fee}).then(function (response) {
  1200. if(response.data.success){
  1201. tempTip.setDuration(2000);
  1202. tempTip.showSuccess('运单运费添加成功');
  1203. _this.updateWaybills(id,fee);
  1204. }else{
  1205. tempTip.setDuration(3000);
  1206. tempTip.show('运单运费添加失败!'+response.data.fail_info);
  1207. }
  1208. }).catch(function (err) {
  1209. tempTip.setDuration(3000);
  1210. tempTip.show('运单运费添加失败!网络异常:'+response.data.fail_info);
  1211. });
  1212. target.css('width','75px');
  1213. }
  1214. },
  1215. // 更新表格数据
  1216. updateWaybills(id,newFee){
  1217. this.waybills.some(function(waybill){
  1218. if(waybill.id === id){
  1219. waybill.fee = newFee;
  1220. return true;
  1221. }
  1222. })
  1223. },
  1224. // 置顶操作
  1225. waybillOnTop:function(e){
  1226. let target = $(e.target);
  1227. let id = target.attr('data_id');
  1228. $("#onTopId").val(id);
  1229. $('#exampleModal').modal('show');
  1230. },
  1231. submitOnTop:function(){
  1232. let ajaxUrl = '{{url('transport/waybill/ontop/top')}}';
  1233. let remark = $("#remark").val();
  1234. let id = $("#onTopId").val();
  1235. if(remark === ''){
  1236. $("#remark").focus();
  1237. $('#remark').addClass('is-invalid');
  1238. }else{
  1239. axios.post(ajaxUrl,{'id':id,'detail':remark}).then(function (response) {
  1240. if(response.data.success){
  1241. tempTip.setDuration(3000);
  1242. tempTip.showSuccess('置顶成功');
  1243. $('#exampleModal').modal('hide');
  1244. setTimeout(function(){
  1245. window.location.reload();
  1246. }
  1247. ,1000);
  1248. }else{
  1249. tempTip.setDuration(3000);
  1250. tempTip.show('置顶失败!'+response.fail_info);
  1251. }
  1252. }).catch(function (err) {
  1253. tempTip.setDuration(3000);
  1254. tempTip.show('置顶失败,网络连接错误!'+err);
  1255. });
  1256. }
  1257. },
  1258. changeRemark:function(){
  1259. $('#remark').removeClass('is-invalid');
  1260. },
  1261. cancelOnTop:function (e) {
  1262. let target = $(e.target);
  1263. let id = target.attr('data_id');
  1264. let ajaxUrl='{{url('transport/waybill/ontop/cancel')}}';
  1265. if(id !== null){
  1266. axios.post(ajaxUrl,{'id':id}).then(function (response) {
  1267. if(response.data.success){
  1268. tempTip.setDuration(30000);
  1269. tempTip.showSuccess('取消置顶成功');
  1270. setTimeout(function(){
  1271. window.location.reload();
  1272. }
  1273. ,1000);
  1274. }else{
  1275. tempTip.setDuration(3000);
  1276. tempTip.show('取消置顶失败!'+response.fail_info);
  1277. }
  1278. }).catch(function (err) {
  1279. tempTip.setDuration(3000);
  1280. tempTip.show('取消置顶失败,网络连接错误!'+err);
  1281. });
  1282. }
  1283. },
  1284. hidetop:function(e) {
  1285. let target = $(e.target);
  1286. let top = target.parent().find('.top');
  1287. let tip = target.parent().find('.toptd');
  1288. for (let i=0;i<tip.length;i++)if(!tip[i] || tip[i].style.display==='none')tip.splice(i,1);
  1289. top.hide();
  1290. tip.tooltip('show');
  1291. },
  1292. showtop:function(e){
  1293. let target = $(e.target);
  1294. let top = target.parent().find('.top');
  1295. let tip = target.parent().find('.toptd');
  1296. top.show();
  1297. tip.tooltip('hide');
  1298. },
  1299. refreshWaveHouseWeight(wms_bill_number) {
  1300. let _this=this;
  1301. let url='{{url('transport/waybill/refreshWaveHouseWeight')}}';
  1302. window.axios.post(url,{'wms_bill_number':wms_bill_number}).then(function (response) {
  1303. if(response.data.success){
  1304. _this.waybills.every(function (waybill) {
  1305. if (waybill.wms_bill_number==wms_bill_number){
  1306. waybill.warehouse_weight_other=response.data.warehouseWeight;
  1307. return false;
  1308. }
  1309. return true;
  1310. });
  1311. window.tempTip.setDuration(3000);
  1312. window.tempTip.showSuccess('刷新计重成功');
  1313. }else{
  1314. window.tempTip.setDuration(3000);
  1315. window.tempTip.show('刷新计重失败!'+response.data.fail_info);
  1316. }
  1317. }).catch(function (err) {
  1318. window.tempTip.setDuration(3000);
  1319. window.tempTip.show('刷新计重失败,网络连接错误!'+err);
  1320. });
  1321. },
  1322. //选择文件
  1323. selectedFile(){
  1324. $("#uploadImg").click();
  1325. },
  1326. //上传文件
  1327. uploadFiles(event){
  1328. let images = event.target.files;
  1329. for(let i=0;i<images.length;i++){
  1330. let MAX_HEIGHT = 1000;
  1331. let image = new Image();
  1332. image.onload = ()=>{
  1333. let canvas = document.createElement("canvas");
  1334. if (image.height > MAX_HEIGHT && image.height >= image.width) {
  1335. image.width *= MAX_HEIGHT / image.height;
  1336. image.height = MAX_HEIGHT;
  1337. }
  1338. if (image.width > MAX_HEIGHT && image.width > image.height) {
  1339. image.height *= MAX_HEIGHT / image.width;
  1340. image.width = MAX_HEIGHT;
  1341. }
  1342. let ctx = canvas.getContext("2d");
  1343. ctx.clearRect(0, 0, canvas.width, canvas.height);
  1344. canvas.width = image.width;
  1345. canvas.height = image.height;
  1346. ctx.drawImage(image, 0, 0, image.width, image.height);
  1347. let src = canvas.toDataURL("image/jpeg");
  1348. let size = src.length;
  1349. this.images.push({
  1350. src : src,
  1351. name : images[i]["name"],
  1352. size : size,
  1353. });
  1354. this.size += size;
  1355. };
  1356. image.src = window.URL.createObjectURL(images[i]);
  1357. }
  1358. },
  1359. //删除图片
  1360. delTempImg(index){
  1361. this.$delete(this.images,index);
  1362. },
  1363. //上传图片
  1364. batchUploadImages(){
  1365. window.tempTip.setDuration(3000);
  1366. if (this.images.length<1){
  1367. window.tempTip.show("未选择图片");
  1368. return;
  1369. }
  1370. if (this.size > 104857600){
  1371. window.tempTip.show("上传图片超出100MB,请分开上传");
  1372. return;
  1373. }
  1374. window.tempTip.postBasicRequest('{{url('transport/waybill/batchUploadImages')}}',{images:this.images},res=>{
  1375. let result = res.data;
  1376. let errors = res.errors;
  1377. if (errors.length>0)this.batchUploadError = errors;
  1378. result.forEach(r=>{
  1379. this.waybills.some((waybill,i)=> {
  1380. if (waybill.id==r.id){
  1381. this.$set(this.waybills[i],'uploadFiles',r.upload_files);
  1382. return true;
  1383. }
  1384. });
  1385. this.size = 0;
  1386. });
  1387. return "上传成功";
  1388. },true);
  1389. },
  1390. },
  1391. filters:{
  1392. km:function(value){
  1393. if(!value)return '';
  1394. return value + ' km';
  1395. },
  1396. money:function(value){
  1397. if(value.indexOf('.')>0){
  1398. return value
  1399. }
  1400. return value += '.00';
  1401. },
  1402. filterZero:function(value){
  1403. value=value.replace(/\.00$/,'');
  1404. value=value.replace(/(\.[1-9])0$/,'$1');
  1405. return value;
  1406. },
  1407. size:function (val) {
  1408. if (!val)return '';
  1409. val = Number(parseInt(val/1024));
  1410. if (val >= 1024){
  1411. return parseInt(val/1024)+"MB";
  1412. }
  1413. return val+"KB";
  1414. },
  1415. resetOwner:function (val,merge,map){
  1416. if (!merge)return val;
  1417. merge = merge.split(',');
  1418. val = "";
  1419. merge.forEach((id,index)=>{
  1420. val += map[id] ? map[id] : '';
  1421. if (index!==merge.length-1 && map[id])val += ",";
  1422. });
  1423. return val;
  1424. },
  1425. },
  1426. });
  1427. // modal 隐藏时修改 input 为空
  1428. $("#exampleModal").on('hide.bs.modal',function(e){
  1429. $('#remark').val('');
  1430. });
  1431. /**
  1432. * 打印电子运单
  1433. * @param data
  1434. * @param serialNo
  1435. */
  1436. function printEWaybill(data, serialNo, barcode, wayNum){
  1437. //打印内容
  1438. var printHtml = htmlTemplateObj.find("div#expressPrintArea").html();
  1439. LODOP.PRINT_INIT("二级模板");
  1440. LODOP.SET_PRINT_PAGESIZE(0,"100mm","180mm","CreateCustomPage");
  1441. LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
  1442. LODOP.ADD_PRINT_TABLE("2mm","0.6mm","95mm","177mm",printHtml);
  1443. LODOP.ADD_PRINT_BARCODE("79mm","10mm","84mm","15mm","128Auto", barcode);
  1444. LODOP.ADD_PRINT_BARCODE("117mm","45mm","50mm","8mm","128Auto", barcode);
  1445. //设定固定打印机
  1446. let print_name = window.localStorage.getItem("PRINT_NAME") || "{{$print_name}}";
  1447. console.log(print_name);
  1448. if(LODOP.SET_PRINTER_INDEX(print_name)){
  1449. console.log("设置打印机:"+print_name)
  1450. LODOP.SET_PRINTER_INDEX(print_name);
  1451. }
  1452. //打印
  1453. //LODOP.PREVIEW();
  1454. LODOP.PRINT();
  1455. // LODOP.PRINT_DESIGN();
  1456. //记录打印日志
  1457. try {
  1458. //printLogses(data);
  1459. window.tempTip.postBasicRequest("changeExpressTag",{id:data.waybillNumber},res=>{});
  1460. } catch (e) {
  1461. }
  1462. }
  1463. </script>
  1464. @endsection