printReceipt.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <style>
  8. html,
  9. body {
  10. padding: 0;
  11. margin: 0;
  12. }
  13. .box {
  14. position: absolute;
  15. top: 50%;
  16. left: 50%;
  17. transform: translate(-50%, -50%);
  18. width: 700px;
  19. height: 400px;
  20. /* border: 1px solid #888; */
  21. }
  22. .header h1 {
  23. text-align: center;
  24. font-size: 30px;
  25. font-weight: 700;
  26. line-height: 10px;
  27. color: rgba(36, 33, 33, 0.822);
  28. }
  29. .nav {
  30. padding: 0px 16px;
  31. }
  32. .content {
  33. height: 260px;
  34. padding: 20px 10px;
  35. box-sizing: border-box;
  36. }
  37. .content div {
  38. line-height: 60px;
  39. color: rgba(36, 33, 33, 0.822);
  40. }
  41. .border1 {
  42. line-height: 18px;
  43. display: inline-block;
  44. width: 300px;
  45. border-bottom: 1px solid rgba(36, 33, 33, 0.822);
  46. }
  47. hr {
  48. margin: 1px;
  49. }
  50. .footer {
  51. padding: 0px 16px;
  52. line-height: 34px;
  53. }
  54. </style>
  55. </head>
  56. <body>
  57. <div class="box1">
  58. <div class="box">
  59. <div class="header">
  60. <h1>收 款 收 据
  61. </h1>
  62. <div style="width:154px;margin:0 auto">
  63. <hr>
  64. <hr>
  65. </div>
  66. </div>
  67. <div class="nav">
  68. <span>开票日期: <b class="time" style="font-weight: 200;" id="time"><?php echo $time;?></b></span>
  69. <span style="float: right;margin-right: 30px;">编码:
  70. <b style="color: red;">20041008</b>
  71. </span>
  72. </div>
  73. <div class="content">
  74. <div style="padding: 24px 40px;border: 1px solid ; color: rgba(36, 33, 33, 0.822)">
  75. <div>交款人 <span class="border1" id="truename"><?php echo $pname;?>(<?php echo $organization;?>)</span></div>
  76. <div>人民币(大写) <span class="border1" id="rmb-dx"><?php echo $dxmoney;?></span>
  77. <span>¥</span>
  78. <span
  79. style="display:inline-block;width:120px;border-bottom: 1px solid rgba(36, 33, 33, 0.822);line-height: 18px;" id="rmb-xx"><?php echo $money;?></span>
  80. </div>
  81. <div>收款事由 <span class="border1" id="time"> 会费</span></div>
  82. </div>
  83. </div>
  84. <div class="footer">
  85. <span>单位盖章: </span>
  86. <span style="float: right;margin-right: 30px;">开票人:
  87. <select name="kpr" id="kpr">
  88. <option value="应" selected>应</option>
  89. <option value="齐">齐</option>
  90. </select>
  91. </span>
  92. </div>
  93. <div class="button-footer">
  94. <button type="button" class="btn btn-primary" style="float: right;" onclick="doPrint()">确定</button>
  95. </div>
  96. </div>
  97. </div>
  98. </body>
  99. <script src="/static/js/jquery.min.js"></script>
  100. <script>
  101. // 获取当前时间
  102. // (function name(params) {
  103. // let time = new Date()
  104. // let y = time.getFullYear()
  105. // let m = time.getMonth()
  106. // let d = time.getDate()
  107. // let notTime = y + '/' + m + '/' + d
  108. // document.querySelector('.time').innerText = notTime
  109. // })()
  110. function doPrint() {
  111. var time = $("#time").text();
  112. var truename = $("#truename").text();
  113. var rmbDx = $("#rmb-dx").text();
  114. var rmbXx = $("#rmb-xx").text();
  115. var kpr = $("#kpr").val();
  116. window.location.href = '/admin/index/receipt?time='+time+'&truename='+truename+'&rmbDx='+rmbDx+'&rmbXx='+rmbXx+'&kpr='+kpr;
  117. // window.open('/index/index/receipt?time='+time+'&truename='+truename+'&rmbDx='+rmbDx+'&rmbXx='+rmbXx+'&kpr='+kpr);
  118. }
  119. </script>
  120. </html>