説明なし

warehouselist.blade.php 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. @if(session('info'))
  5. <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
  6. {{session('info')}}
  7. </div>
  8. @endif
  9. <div class="page-container">
  10. <div>
  11. <div>
  12. <input class="input-text" style="width:5%;text-align:center" type="text" value="订单编号"/>
  13. <input id="id" type="text" class="input-text" style="width:6%;text-align:center" name="id" value="{{$id?$id:''}}">
  14. <input class="input-text" style="width:6%;text-align:center" type="text" value="开始时间"/>
  15. <input id="stime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" autocomplete="off" class="input-text Wdate" style="width:12%;text-align:center;margin-left: -5px" name="stime" value="{{$stime?$stime:''}}">
  16. <input class="input-text" style="width:6%;text-align:center" type="text" value="结束时间"/>
  17. <input id="etime"type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" autocomplete="off" class="input-text Wdate" style="width:12%;text-align:center;margin-left: -5px" name="etime" value="{{$etime?$etime:''}}">
  18. <input class="input-text" style="width:6%;text-align:center" type="text" value="收货人"/>
  19. <input id="receiverName" type="text" class="input-text" style="width:8%;text-align:center" name="receiverName" value="{{$receiverName?$receiverName:''}}">
  20. <input class="input-text" style="width:6%;text-align:center" type="text" value="收货人手机号"/>
  21. <input id="receiverMobile" type="text" class="input-text" style="width:8%;text-align:center" name="receiverMobile" value="{{$receiverMobile?$receiverMobile:''}}">
  22. <input class="input-text" style="width:6%;text-align:center" type="text" value="发货状态"/>
  23. <select style="width:8%;text-align:center" id='delivery_type' name="delivery_type">
  24. <option value="0" @if($delivery_type==0) selected @endif>待发货</option>
  25. <option value="2" @if($delivery_type==2) selected @endif>全部</option>
  26. </select>
  27. <div style="float:right">
  28. <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
  29. <a class="btn btn-primary radius" onclick="order_export()" href="javascript:;">导出订单</a>
  30. <a class="btn btn-primary radius" onclick="importExcel('商品导入')" href="javascript:;"> 导入订单</a>
  31. <a class="btn btn-primary radius" onclick="importDeliveryExcel('物流导入')" href="javascript:;"> 导入物流成本</a>
  32. <a class="btn btn-primary radius" onclick="window.location.reload();" href="javascript:;"> 刷新</a>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="mt-20">
  37. @if($overtime)
  38. <font color='red'>
  39. 超一天未发订单量:【{{$overtime['count']}}单】&nbsp; 订单ID:【
  40. @foreach($overtime['list'] as $k=>$oid)
  41. @if($k == $overtime['count']-1) <a style="text-decoration: underline;color:blue;" href='warehouse?id={{$oid}}'>{{$oid}}</a> @else <a style="text-decoration: underline;color:blue;" href='warehouse?id={{$oid}}'>{{$oid}},</a> @endif
  42. @endforeach
  43. </font>
  44. @endif
  45. <table class="table table-border table-bordered table-bg table-hover table-sort">
  46. <thead>
  47. <tr class="text-c">
  48. <th width="5%">订单编号</th>
  49. <th width="5%">买家名称</th>
  50. <th width="5%">收货人</th>
  51. <th width="6%">收货人手机号</th>
  52. <th width="10%">收货地址</th>
  53. <th width="12%">商品信息</th>
  54. <th width="6%">预发货时间</th>
  55. <th width="6%">审核时间</th>
  56. <th width="6%">物流单号</th>
  57. <th width="5%">货品成本</th>
  58. <th width="5%">运费成本</th>
  59. <th width="5%">发货备注</th>
  60. <th width="5%">退补备注</th>
  61. <th width="5%">发货时间</th>
  62. <th width="6%">创建时间</th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. @if($result)
  67. @foreach($result as $a)
  68. <tr class="text-c" style="text-align:center; @if($a['delivery_date'] < $yestoday && !$a['logistics_id']) background-color: #FF0000; @elseif($a['delivery_date'] < $today && !$a['logistics_id']) background-color: #f37b1d; @endif">
  69. <td>{{$a['id']}}</td>
  70. <td>{{$a['customerName']}}</td>
  71. <td>{{$a['receiverName']}}</td>
  72. <td>{{$a['receiverMobile']}}</td>
  73. <td>{{$a['receiverState']}}{{$a['receiverCity']}}{{$a['receiverDistrict']}}{{$a['receiverStreet']}}{{$a['receiverAddress']}}</td>
  74. <td>
  75. @if( is_array($a['goods']) && $a['warehouse'] == 3)
  76. @foreach($a['goods'] as $good)
  77. <p>{{$good}}</p>
  78. @endforeach
  79. @else
  80. {{$a['goods_note']}}
  81. @endif
  82. </td>
  83. <td style="">{{$a['delivery_date']}}</td>
  84. <td>{{$a['verify_time']}}</td>
  85. <td class ="change_logistics_id">
  86. <p id="logi_1{{$a['id']}}">{{$a['logistics_id']}}</p>
  87. <input id="logi_2{{$a['id']}}" style="display: none" type='text' autofocus="autofocus" name='logistics_id' value="{{$a['logistics_id']}}" onblur="change_logistics_id({{$a['id']}})" />
  88. <span class="sort_icon" hidden onClick='change_logistics_click("{{$a['id']}}","{{$a['logistics_id']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  89. </td>
  90. <td class ="change_logistics_id">
  91. <p id="cost_1{{$a['id']}}">{{$a['cost']}}</p>
  92. <input id="cost_2{{$a['id']}}" style="display: none" type='text' name='cost' value="{{$a['cost']}}" onblur="change_cost({{$a['id']}})" />
  93. <span class="sort_icon" hidden onClick='change_cost_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  94. </td>
  95. <td class ="change_logistics_id">
  96. <p id="freight_cost_1{{$a['id']}}">{{$a['freight_cost']}}</p>
  97. <input id="freight_cost_2{{$a['id']}}" style="display: none" type='text' name='freight_cost' value="{{$a['freight_cost']}}" onblur="change_freight_cost({{$a['id']}})" />
  98. <span class="sort_icon" hidden onClick='change_freight_cost_click("{{$a['id']}}","{{$a['freight_cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  99. </td>
  100. <td class ="change_logistics_id">
  101. <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p>
  102. <textarea id="send_note_2{{$a['id']}}" rows=4 style="display: none" name='send_note' onblur="change_send_note({{$a['id']}})" >{{$a['send_note']}}</textarea>
  103. <span class="sort_icon" hidden onClick='change_send_note_click("{{$a['id']}}","{{$a['send_note']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  104. </td>
  105. <td class ="change_logistics_id">
  106. <p id="refund_note_1{{$a['id']}}">{{$a['refund_note']}}</p>
  107. <textarea id="refund_note_2{{$a['id']}}" rows=4 style="display: none" name='refund_note' onblur="change_refund_note({{$a['id']}})" >{{$a['refund_note']}}</textarea>
  108. <span class="sort_icon" hidden onClick='change_refund_note_click("{{$a['id']}}","{{$a['refund_note']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  109. </td>
  110. <td class ="change_logistics_id">
  111. <p id="send_time_1{{$a['id']}}">{{$a['send_time']}}</p>
  112. <input id="send_time_2{{$a['id']}}" style="display: none" name='send_time' onblur="change_send_time({{$a['id']}})" value="{{$a['send_time']}}" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" class=" Wdate" />
  113. <span class="sort_icon" hidden onClick='change_send_time_click("{{$a['id']}}","{{$a['send_time']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  114. </td>
  115. <td>{{$a['createTime']}}</td>
  116. </tr>
  117. @endforeach
  118. @endif
  119. </tbody>
  120. </table>
  121. </div>
  122. <!--弹出层 推入分组-->
  123. <div id="modal-demo1" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  124. <div class="modal-dialog">
  125. <div class="modal-content radius">
  126. <div class="modal-body" style="height:80px">
  127. <div class="cl pd-5 bg-1 bk-gray mt-20">
  128. <div class="panel-heading">上传文件</div>
  129. <form class="form-horizontal" method="POST" action="/admin/order/importGoodsExcel" enctype="multipart/form-data">
  130. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  131. <label for="file">选择文件</label>
  132. <input id="file" type="file" class="form-control" name="orderFile" required>
  133. <button type="submit" class="btn btn-primary radius">确定</button>
  134. <button class="btn radius" data-dismiss="modal" aria-hidden="true">关闭</button>
  135. </form>
  136. </div>
  137. <br>
  138. {{--<div style="float:right">--}}
  139. {{--<button class="btn btn-primary radius" onclick='submits(this,"{{$page}}")' value="&nbsp;&nbsp;确定&nbsp;&nbsp;">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>&nbsp;--}}
  140. {{--<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>--}}
  141. {{--</div>--}}
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div id="modal-demo12" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  147. <div class="modal-dialog">
  148. <div class="modal-content radius">
  149. <div class="modal-body" style="height:80px">
  150. <div class="cl pd-5 bg-1 bk-gray mt-20">
  151. <div class="panel-heading">上传文件</div>
  152. <form class="form-horizontal" method="POST" action="/admin/order/importDeliveryExcel" enctype="multipart/form-data">
  153. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  154. <label for="file">选择文件</label>
  155. <input id="file" type="file" class="form-control" name="orderFile" required>
  156. <button type="submit" class="btn btn-primary radius">确定</button>
  157. <button class="btn radius" data-dismiss="modal" aria-hidden="true">关闭</button>
  158. </form>
  159. </div>
  160. <br>
  161. {{--<div style="float:right">--}}
  162. {{--<button class="btn btn-primary radius" onclick='submits(this,"{{$page}}")' value="&nbsp;&nbsp;确定&nbsp;&nbsp;">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>&nbsp;--}}
  163. {{--<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>--}}
  164. {{--</div>--}}
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <div id="page" class="page_div"></div>
  170. </div>
  171. <!--_footer 作为公共模版分离出去-->
  172. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  173. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  174. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  175. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  176. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  177. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  178. <!--/_footer 作为公共模版分离出去-->
  179. <!--/_footer 作为公共模版分离出去-->
  180. <script type="text/javascript">
  181. $(function(){
  182. setTimeout("$('#info').hide()",3000);
  183. });
  184. /*广告-添加*/
  185. function order_add(title){
  186. location.href="/admin/order/create";
  187. }
  188. /*广告-编辑*/
  189. function order_edit(title,id){
  190. var page = {{$page}};
  191. var stime = $('#stime').val();
  192. var etime = $('#etime').val();
  193. var receiverName = $('#receiverName').val();
  194. var receiverMobile = $('#receiverMobile').val();
  195. var id = $('#id').val();
  196. location.href="/admin/order/edit/"+id+'?page='+page+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&id='+id;
  197. }
  198. /*广告-设为首页显示*/
  199. function up(obj,id){
  200. layer.confirm('确认要设为首页显示吗?',function(index){
  201. location.href='/admin/order/up/'+id;
  202. });
  203. }
  204. /*广告-移除*/
  205. function order_del(obj,id){
  206. layer.confirm('确认要删除吗?',function(index){
  207. location.href='/admin/order/delete/'+id;
  208. });
  209. }
  210. /*广告-设为首页隐藏*/
  211. function down(obj,id){
  212. layer.confirm('确认要设为首页隐藏吗?',function(index){
  213. location.href='/admin/order/down/'+id;
  214. });
  215. }
  216. function user_search(){
  217. var stime = $('#stime').val();
  218. var etime = $('#etime').val();
  219. var delivery_type = $('#delivery_type').val();
  220. var receiverName = $('#receiverName').val();
  221. var receiverMobile = $('#receiverMobile').val();
  222. var id = $('#id').val();
  223. //var page = {{$page}};
  224. location.href = 'warehouse?stime='+stime+'&etime='+etime+'&delivery_type='+delivery_type+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&id='+id;
  225. }
  226. //导出
  227. function order_export(){
  228. var stime = $('#stime').val();
  229. var etime = $('#etime').val();
  230. var delivery_type = $('#delivery_type').val();
  231. var receiverName = $('#receiverName').val();
  232. var receiverMobile = $('#receiverMobile').val();
  233. var id = $('#id').val();
  234. location.href = '/admin/order/warehouse_export?stime='+stime+'&etime='+etime+'&delivery_type='+delivery_type+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile;
  235. }
  236. function change_logistics_click(id, logistics_id){
  237. $("#logi_1"+id).hide();
  238. $("#logi_2"+id).show();
  239. $("#logi_2"+id).focus();
  240. }
  241. function change_logistics_id(id){
  242. var logistics_id = $("#logi_2"+id).val();
  243. $.ajax({
  244. url: '/admin/order/editLogisticsId?id='+id+'&logistics_id='+logistics_id,
  245. type: 'get',
  246. dateType: 'json',
  247. success:function(msg){
  248. $("#logi_1"+id).html(logistics_id);
  249. $("#logi_1"+id).show();
  250. $("#logi_2"+id).hide();
  251. }
  252. });
  253. }
  254. function change_cost_click(id, cost){
  255. $("#cost_1"+id).hide();
  256. $("#cost_2"+id).show();
  257. $("#cost_2"+id).focus();
  258. }
  259. function change_cost(id){
  260. var cost = $("#cost_2"+id).val();
  261. $.ajax({
  262. url: '/admin/order/editLogisticsId?id='+id+'&cost='+cost,
  263. type: 'get',
  264. dateType: 'json',
  265. success:function(msg){
  266. $("#cost_1"+id).html(cost);
  267. $("#cost_1"+id).show();
  268. $("#cost_2"+id).hide();
  269. }
  270. });
  271. }
  272. function change_freight_cost_click(id, freight_cost){
  273. $("#freight_cost_1"+id).hide();
  274. $("#freight_cost_2"+id).show();
  275. $("#freight_cost_2"+id).focus();
  276. }
  277. function change_freight_cost(id){
  278. var freight_cost = $("#freight_cost_2"+id).val();
  279. $.ajax({
  280. url: '/admin/order/editLogisticsId?id='+id+'&freight_cost='+freight_cost,
  281. type: 'get',
  282. dateType: 'json',
  283. success:function(msg){
  284. $("#freight_cost_1"+id).html(freight_cost);
  285. $("#freight_cost_1"+id).show();
  286. $("#freight_cost_2"+id).hide();
  287. }
  288. });
  289. }
  290. function change_send_note_click(id, send_note){
  291. $("#send_note_1"+id).hide();
  292. $("#send_note_2"+id).show();
  293. $("#send_note_2"+id).focus();
  294. }
  295. function change_send_note(id){
  296. var send_note = $("#send_note_2"+id).val();
  297. $.ajax({
  298. url: '/admin/order/editLogisticsId?id='+id,
  299. type: 'get',
  300. data:{send_note:send_note},
  301. dateType: 'json',
  302. success:function(msg){
  303. $("#send_note_1"+id).html(send_note);
  304. $("#send_note_1"+id).show();
  305. $("#send_note_2"+id).hide();
  306. }
  307. });
  308. }
  309. function change_send_time_click(id, send_time){
  310. $("#send_time_1"+id).hide();
  311. $("#send_time_2"+id).show();
  312. $("#send_time_2"+id).focus();
  313. }
  314. function change_send_time(id){
  315. var send_time = $("#send_time_2"+id).val();
  316. if(!send_time){
  317. return false;
  318. }
  319. $.ajax({
  320. url: '/admin/order/editLogisticsId?id='+id+'&send_time='+send_time,
  321. type: 'get',
  322. dateType: 'json',
  323. success:function(msg){
  324. $("#send_time_1"+id).html(send_time);
  325. $("#send_time_1"+id).show();
  326. $("#send_time_2"+id).hide();
  327. }
  328. });
  329. }
  330. function change_refund_note_click(id, refund_note){
  331. $("#refund_note_1"+id).hide();
  332. $("#refund_note_2"+id).show();
  333. $("#refund_note_2"+id).focus();
  334. }
  335. function change_refund_note(id){
  336. var refund_note = $("#refund_note_2"+id).val();
  337. $.ajax({
  338. url: '/admin/order/editLogisticsId?id='+id,
  339. type: 'get',
  340. data:{refund_note:refund_note},
  341. dateType: 'json',
  342. success:function(msg){
  343. $("#refund_note_1"+id).html(refund_note);
  344. $("#refund_note_1"+id).show();
  345. $("#refund_note_2"+id).hide();
  346. }
  347. });
  348. }
  349. //批量导入
  350. function importExcel(){
  351. $("#modal-demo1").modal("show");
  352. }
  353. //批量导入
  354. function importDeliveryExcel(){
  355. $("#modal-demo12").modal("show");
  356. }
  357. $(".change_logistics_id").mouseover(
  358. function(){
  359. $(this).children("span").show();
  360. $(this).children("span").addClass('f-18 c-success');
  361. $(this).mouseout(
  362. function(){
  363. $(this).children("span").hide();
  364. }
  365. );
  366. }
  367. );
  368. /*分页*/
  369. $("#page").paging({
  370. pageNo:{{$page}},
  371. totalPage: {{$pages}},
  372. totalSize: {{$count}},
  373. callback: function(num) {
  374. var stime = $('#stime').val();
  375. var etime = $('#etime').val();
  376. var receiverName = $('#receiverName').val();
  377. var receiverMobile = $('#receiverMobile').val();
  378. var delivery_type = $('#delivery_type').val();
  379. var id = $('#id').val();
  380. location.href = 'warehouse?page='+num+'&stime='+stime+'&etime='+etime+'&delivery_type='+delivery_type+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&id='+id;
  381. }
  382. })
  383. </script>
  384. </body>
  385. @endsection