delivery_allprint_order_2.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>团长配送清单</title>
  6. <link rel="stylesheet" href="__PUBLIC__/css/forms.css">
  7. <script src="__PUBLIC__/js/jquery-1.7.2.min.js"></script>
  8. <style>
  9. .w794{width:794px;margin: 0px auto;}
  10. .tdleft{text-align:left;width:50%;font-size:16px;}
  11. .bold{font-weight:bold;}
  12. .pd2{padding-left:0px;}
  13. td, th{padding:0px;}
  14. @media print {
  15. .noprint{
  16. display: none;
  17. }
  18. }
  19. .tpinfo {
  20. min-height: 62px;
  21. border-bottom: 1px solid #000;
  22. word-break: break-all;
  23. display: flex;
  24. align-items: center;
  25. justify-content: center;
  26. }
  27. .tpinfo.last {
  28. border-bottom: 0 none;
  29. }
  30. .tDiv {
  31. padding: 10px;
  32. text-align: center;
  33. word-break: break-all;
  34. }
  35. .PageNext{page-break-after: always;}
  36. </style>
  37. </head>
  38. <body>
  39. <div style="width:100%;margin:0px auto;">
  40. <!-- 弹窗 -->
  41. <div id="showdiv" style="width: 40%; margin: 0 auto; height: 100px; border: 1px solid #999; display: none; position: absolute; top: 40%; left: 35%; z-index: 3; background: #fff">
  42. <!-- 标题 -->
  43. <div style="background: #F8F7F7; width: 100%; height: 2rem; font-size: 0.65rem; line-height: 2rem; border: 1px solid #999; text-align: center;" >
  44. 提示
  45. </div>
  46. <!-- 内容 -->
  47. <div style="text-indent: 50px; height: 80px; font-size: 16px;color:red; line-height: 60px; " id="print_content_tip">
  48. 还剩{$count}个团长相关订单未生成,请勿刷新.....
  49. </div>
  50. <!-- 按钮 -->
  51. </div>
  52. <div class="w794 noprint">
  53. <a href="javascript:;" onclick="window.print();">立即打印</a>
  54. </div>
  55. <div id="print_content">
  56. </div>
  57. <div class="w794 noprint">
  58. <a href="javascript:;" onclick="window.print();">立即打印</a>
  59. </div>
  60. </div>
  61. <script>
  62. var s_page = 1;
  63. var s_count = {$count};
  64. function showWindow() {
  65. $('#showdiv').show(); //显示弹窗
  66. }
  67. $(function(){
  68. showWindow();
  69. load_data();
  70. })
  71. function load_data()
  72. {
  73. $.ajax({
  74. url:"{:U('Delivery/delivery_allprint_order_do', array('searchtime' => $searchtime, 'starttime' => $starttime, 'endtime' => $endtime ,'type' => $type))}",
  75. type:'get',
  76. data:{page:s_page},
  77. dataType:'json',
  78. success:function(ret){
  79. if(ret.code == 1)
  80. {
  81. alert('生成完毕,可以打印');
  82. $('#showdiv').remove();
  83. return false;
  84. }else if(ret.code == 0) {
  85. s_page++;
  86. s_count = s_count -10;
  87. if(s_count < 0)
  88. {
  89. s_count= 0;
  90. }
  91. $('#print_content_tip').html('还剩'+s_count+'个团长相关订单未生成,请勿刷新.....');
  92. //$('#print_content').append(ret.html);
  93. $("#print_content").append(ret.html);
  94. setTimeout(load_data(), 1000 );
  95. }
  96. }
  97. })
  98. }
  99. </script>
  100. </body>
  101. </html>