Нет описания

warehouselist.blade.php 20KB

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