kdn_info.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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_id" name="order_id" value="{$order_id}"/>
  10. <div class="layui-row layui-col-space15">
  11. <div class="layui-col-md12">
  12. <div class="layui-card" id="print_content" style="height: 580px;">
  13. {$kdn_info.print_template}
  14. </div>
  15. </div>
  16. <div class="layui-input-inline" style="text-align:center;">
  17. <button class="layui-btn layui-btn-sm print_kdn_order"> 打印</button>
  18. <button class="layui-btn layui-btn-sm cancel_btn"> 取消</button>
  19. </div>
  20. </div>
  21. </div>
  22. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  23. <script type="text/javascript" src="/static/js/jquery.PrintArea.min.js"></script>
  24. <script>
  25. $(function(){
  26. $('.print_kdn_order').click(function(){
  27. var extraHead = '<meta charset="utf-8" />,<meta http-equiv="X-UA-Compatible" content="IE=edge"/>';
  28. var op = {
  29. mode : "popup",
  30. popTitle : '打印面单', //打印窗口标题
  31. popClose : true
  32. };
  33. $("#print_content").printArea(op);
  34. var order_id = $('#order_id').val();
  35. $.post("{:U('order/kdn_send')}", {id:order_id}, function(data){
  36. console.log(data);
  37. });
  38. var go_url = location.href;
  39. location.href = go_url;
  40. layer.closeAll();
  41. })
  42. $('.cancel_btn').click(function(){
  43. layer.closeAll();
  44. })
  45. })
  46. </script>
  47. </body>
  48. </html>