Brak opisu

warehouselist.blade.php 18KB

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