clerk_allprint.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. td, th{padding:0px;}
  13. @media print {
  14. .noprint{
  15. display: none;
  16. }
  17. }
  18. .PageNext{page-break-after: always;}
  19. </style>
  20. </head>
  21. <body>
  22. <div style="width:100%;margin:0px auto;">
  23. <!-- 弹窗 -->
  24. <div id="showdiv" style="width: 30%; margin: 0 auto; height: 100px; border: 1px solid #999; display: none; position: absolute; top: 40%; left: 30%; z-index: 3; background: #fff">
  25. <!-- 标题 -->
  26. <div style="background: #F8F7F7; width: 100%; height: 2rem; font-size: 0.65rem; line-height: 2rem; border: 1px solid #999; text-align: center;" >
  27. 提示
  28. </div>
  29. <!-- 内容 -->
  30. <div style="text-indent: 50px; height: 80px; font-size: 16px;color:red; line-height: 60px; " id="print_content_tip">
  31. 还剩{$count}个司机配送单未生成,请勿刷新.....
  32. </div>
  33. <!-- 按钮 -->
  34. </div>
  35. <div class="w794 noprint">
  36. <a href="javascript:;" onclick="window.print();">立即打印</a>
  37. </div>
  38. <div id="print_content">
  39. </div>
  40. <div class="w794 noprint">
  41. <a href="javascript:;" onclick="window.print();">立即打印</a>
  42. </div>
  43. </div>
  44. <script>
  45. var s_page = 1;
  46. var s_count = {$count};
  47. function showWindow() {
  48. $('#showdiv').show(); //显示弹窗
  49. }
  50. $(function(){
  51. showWindow();
  52. load_data();
  53. })
  54. function load_data()
  55. {
  56. $.ajax({
  57. url:"{:U('Delivery/clerk_allprint_do', array('searchtime' => $searchtime, 'starttime' => $starttime, 'endtime' => $endtime))}",
  58. type:'get',
  59. data:{page:s_page},
  60. dataType:'json',
  61. success:function(ret){
  62. if(ret.code == 1)
  63. {
  64. alert('生成完毕,可以打印');
  65. $('#showdiv').remove();
  66. return false;
  67. }else if(ret.code == 0) {
  68. s_page++;
  69. s_count = s_count -1;
  70. $('#print_content_tip').html('还剩'+s_count+'个司机配送单未生成,请勿刷新.....');
  71. $('#print_content').append(ret.html);
  72. setTimeout(load_data(), 1000 );
  73. }
  74. }
  75. })
  76. }
  77. </script>
  78. </body>
  79. </html>