No Description

warehouselist.blade.php 20KB

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