weightCheckInOut.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  6. <title></title>
  7. <style>
  8. table,
  9. table tr th,
  10. table tr td {
  11. border: 2px solid #333333;
  12. padding: 5px 0;
  13. height: 55px;
  14. }
  15. #app {
  16. /* height: 98vh;
  17. position: relative; */
  18. }
  19. .content {
  20. width: 1000px;
  21. padding: 70px 20px 20px 20px;
  22. font-size: 22px;
  23. position: absolute;
  24. top: 0;
  25. bottom: 0;
  26. left: 0;
  27. right: 0;
  28. }
  29. table {
  30. width: 100%;
  31. text-align: center;
  32. border-collapse: collapse;
  33. border: 3px solid #333333;
  34. }
  35. .col-bgc {
  36. background: #f6f7fb;
  37. }
  38. .bottom-row1 {
  39. display: flex;
  40. /* justify-content: space-between; */
  41. margin-top: 5px 0;
  42. }
  43. .bottom-row2 {
  44. display: flex;
  45. }
  46. img {
  47. width: 41px;
  48. height: 41px;
  49. margin-right: 118px;
  50. }
  51. .config {
  52. margin-top: 10px;
  53. margin-right: 240px;
  54. }
  55. .autograph{
  56. margin-top: 10px;
  57. }
  58. .bottom-row3 {
  59. margin: 10px 0;
  60. }
  61. .title {
  62. text-align: center;
  63. font-size: 36px;
  64. font-weight: 500;
  65. margin-bottom: 20px;
  66. }
  67. .number {
  68. text-align: right;
  69. margin-bottom: 10px;
  70. margin-top: 20px;
  71. }
  72. .small-row {
  73. display: flex;
  74. }
  75. .small-content {
  76. width: 400px;
  77. margin: 0 auto;
  78. border: 1px solid #ccc;
  79. padding: 20px 20px 160px 20px;
  80. position: absolute;
  81. top: 0;
  82. bottom: 0;
  83. left: 0;
  84. right: 0;
  85. margin: auto;
  86. height: 450px;
  87. }
  88. .small-title {
  89. text-align: center;
  90. font-size: 18px;
  91. display: flex;
  92. justify-content: space-between;
  93. align-items: center;
  94. }
  95. .small-row {
  96. display: flex;
  97. justify-content: space-between;
  98. margin: 10px;
  99. }
  100. .small-img {
  101. margin-right: 0;
  102. }
  103. .sign{
  104. margin-right: 100px;
  105. }
  106. </style>
  107. </head>
  108. <body>
  109. <div id="app">
  110. <div class="content" v-if="true">
  111. <div v-if="tableData.inOutFlag == '2'" class="title">{{tableData.companyName}}</div>
  112. <div v-else class="title">{{tableData.contractManagementInfo?tableData.contractManagementInfo.seller:tableData.companyName}}</div>
  113. <div v-if="tableData.inOutFlag == '2'" class="title">入库检斤单</div>
  114. <div v-else class="title">出库检斤单</div>
  115. <table class="table">
  116. <tr class="row">
  117. <td class="col col-bgc">送货单位</td>
  118. <td class="col" colspan="4">{{tableData.contractManagementInfo?tableData.contractManagementInfo.seller:tableData.warehouseName}}</td>
  119. <td class="col col-bgc">车牌号</td>
  120. <td class="col" colspan="1">{{tableData.carNo}}</td>
  121. <td class="col col-bgc">货名</td>
  122. <td class="col" colspan="1">{{tableData.goodsName}}</td>
  123. </tr>
  124. <tr class="row">
  125. <td class="col col-bgc">收货单位</td>
  126. <td class="col" colspan="4">{{tableData.contractManagementInfo?tableData.contractManagementInfo.buyer:tableData.receiveWarehouse}}</td>
  127. <td class="col col-bgc">类型</td>
  128. <td class="col"colspan="1">{{tableData.type}}</td>
  129. <td class="col col-bgc">检斤时间</td>
  130. <td class="col" colspan="1">{{tableData.updateDate}}</td>
  131. </tr>
  132. <tr class="row">
  133. <td class="col col-bgc">毛重(吨)</td>
  134. <td class="col" colspan="2">{{tableData.grossWeight}}</td>
  135. <td class="col col-bgc">皮重(吨)</td>
  136. <td class="col" colspan="2">{{tableData.tare}}</td>
  137. <td class="col col-bgc">净重(吨)</td>
  138. <td class="col" colspan="2">{{tableData.netWeight}}</td>
  139. </tr>
  140. </table>
  141. <div class="bottom">
  142. <div class="bottom-row1">
  143. <div>检斤员:{{tableData.backOffice}}</div>
  144. </div>
  145. <div class="bottom-row2">
  146. <div class="config">收货单位签名或盖章:</div>
  147. <div class="autograph">客户签名:</div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </body>
  153. <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
  154. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  155. <script type="text/javascript">
  156. new Vue({
  157. el: '#app',
  158. data: {
  159. tableData: {},
  160. name: "",
  161. bigContent: false,
  162. smallContent: false
  163. },
  164. computed: {},
  165. methods: {
  166. tableRowClassName({
  167. row,
  168. rowIndex
  169. }) {
  170. if (rowIndex === 1) {
  171. return 'warning-row';
  172. } else if (rowIndex === 3) {
  173. return 'success-row';
  174. }
  175. return '';
  176. },
  177. getQueryVariable(variable) {
  178. var query = window.location.search.substring(1);
  179. var vars = query.split("&");
  180. for (var i = 0; i < vars.length; i++) {
  181. var pair = vars[i].split("=");
  182. if (pair[0] == variable) {
  183. return pair[1];
  184. }
  185. }
  186. return (false);
  187. },
  188. printSmall() {},
  189. printBig() {},
  190. },
  191. mounted() {
  192. // console.log("sssss",this.getQueryVariable("tableData"))
  193. // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
  194. // console.log("dfddd",_data)
  195. let _data= JSON.parse(localStorage.getItem('ck_bd_printData'))
  196. let _type = this.getQueryVariable("type")
  197. if (_type == 2) {
  198. this.bigContent = true
  199. this.smallContent = false
  200. } else {
  201. this.smallContent = true
  202. this.bigContent = false
  203. }
  204. console.log(_data,"sddsd")
  205. this.tableData = _data
  206. console.log(this.tableData)
  207. document.title = "粮食检斤单"
  208. window.print()
  209. window.onafterprint = function(event) {
  210. window.history.back(-1)
  211. };
  212. },
  213. watch: {}
  214. })
  215. </script>
  216. </html>