kdn_orders_info.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html>
  2. <head>
  3. <meta charset="utf-8">
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  5. <title>index</title>
  6. </head>
  7. <body>
  8. <div class="layui-fluid">
  9. <input type="hidden" id="order_ids" name="order_ids" value="{$order_ids}"/>
  10. <div class="layui-row layui-col-space15">
  11. <div class="layui-input-inline" style="text-align:center;">
  12. <button class="layui-btn layui-btn-sm print_kdn_order"> 打印</button>
  13. <button class="layui-btn layui-btn-sm cancel_btn"> 取消</button>
  14. </div>
  15. <div class="layui-col-md12">
  16. <div class="layui-card" id="print_content" style="min-height: 580px;position:relative;">
  17. <style>
  18. .kdn_div{display:block;min-height: 580px;position:relative;}
  19. </style>
  20. <?php foreach( $kdn_list_info as $k=>$v ){ ?>
  21. <div class="kdn_div">{$v.print_template}</div>
  22. <?php } ?>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  28. <script type="text/javascript" src="/static/js/jquery.PrintArea.min.js"></script>
  29. <script>
  30. $(function(){
  31. $('.print_kdn_order').click(function(){
  32. var extraHead = '<meta charset="utf-8" />,<meta http-equiv="X-UA-Compatible" content="IE=edge"/>';
  33. $("#print_content").css({
  34. 'height' : 'auto',
  35. 'position' : 'relative'
  36. }).printArea();
  37. var order_ids = $('#order_ids').val();
  38. console.log(order_ids);
  39. $.post("{:U('order/kdn_send')}", {ids:order_ids}, function(data){
  40. console.log(data);
  41. });
  42. $('.unbtn_export').click();
  43. layer.closeAll();
  44. })
  45. $('.cancel_btn').click(function(){
  46. layer.closeAll();
  47. })
  48. })
  49. </script>
  50. </body>
  51. </html>