Няма описание

warehouselist.blade.php 17KB

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