weightCheckOut.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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 class="title">出库检斤单</div>
  112. <div>{{tableData.updateDate}}</div>
  113. <table class="table">
  114. <tr class="row">
  115. <td class="col col-bgc">送货单位</td>
  116. <td class="col" colspan="4">{{tableData.seller}}</td>
  117. <td class="col col-bgc">货名</td>
  118. <td class="col" colspan="4">{{tableData.goodsName}}</td>
  119. </tr>
  120. <tr class="row">
  121. <td class="col col-bgc">收货单位</td>
  122. <td class="col" colspan="4">{{tableData.buyer}}</td>
  123. <td class="col col-bgc">检斤员</td>
  124. <td class="col" colspan="4">{{tableData.backOffice}}</td>
  125. </tr>
  126. <tr class="row">
  127. <td class="col col-bgc">毛重(吨)</td>
  128. <td class="col" colspan="2">{{tableData.grossWeight}}</td>
  129. <td class="col col-bgc">皮重(吨)</td>
  130. <td class="col" colspan="2">{{tableData.tare}}</td>
  131. <td class="col col-bgc">净重(吨)</td>
  132. <td class="col" colspan="2">{{tableData.netWeight}}</td>
  133. </tr>
  134. <tr class="row">
  135. <td class="col col-bgc">运输方式</td>
  136. <td class="col" colspan="2">{{tableData.outType}}</td>
  137. <td class="col col-bgc" v-if='tableData.outType=="集装箱船"||tableData.outType=="汽运"'>车牌号</td>
  138. <td class="col col-bgc" v-if='tableData.outType=="火运"'>车号</td>
  139. <td class="col col-bgc" v-if='tableData.outType=="散船"'>船名</td>
  140. <td class="col" colspan="2"
  141. v-if='tableData.outType=="集装箱船"||tableData.outType=="汽运"||tableData.outType=="火运"'>{{tableData.carNo}}
  142. </td>
  143. <td class="col" colspan="2" v-if='tableData.outType=="散船"'>{{tableData.shipName}}</td>
  144. <td class="col col-bgc" v-if='tableData.outType=="集装箱船"||tableData.outType=="汽运"'>箱号</td>
  145. <td class="col col-bgc" v-if='tableData.outType=="火运"'>车厢号</td>
  146. <td class="col col-bgc" v-if='tableData.outType=="散船"'>船次</td>
  147. <td class="col" colspan="2" v-if='tableData.outType=="集装箱船"||tableData.outType=="汽运"'>
  148. {{tableData.boxNo}},{{tableData.boxNoOther}}</td>
  149. <td class="col" colspan="2" v-if='tableData.outType=="火运"'>
  150. {{tableData.wingNumber}},{{tableData.wingNumberOther}}</td>
  151. <td class="col" colspan="2" v-if='tableData.outType=="散船"'>{{tableData.shipNumber}}</td>
  152. </tr>
  153. </table>
  154. <div class="bottom">
  155. <div class="bottom-row2">
  156. <div class="config">收货单位签名或盖章:</div>
  157. <div class="autograph">客户签名:</div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </body>
  163. <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
  164. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  165. <script type="text/javascript">
  166. new Vue({
  167. el: '#app',
  168. data: {
  169. tableData: {
  170. // qualityInspectionManagement:{}
  171. },
  172. name: "",
  173. bigContent: false,
  174. smallContent: false
  175. },
  176. computed: {},
  177. methods: {
  178. tableRowClassName({
  179. row,
  180. rowIndex
  181. }) {
  182. if (rowIndex === 1) {
  183. return 'warning-row';
  184. } else if (rowIndex === 3) {
  185. return 'success-row';
  186. }
  187. return '';
  188. },
  189. getQueryVariable(variable) {
  190. var query = window.location.search.substring(1);
  191. var vars = query.split("&");
  192. for (var i = 0; i < vars.length; i++) {
  193. var pair = vars[i].split("=");
  194. if (pair[0] == variable) {
  195. return pair[1];
  196. }
  197. }
  198. return (false);
  199. },
  200. printSmall() {},
  201. printBig() {},
  202. },
  203. mounted() {
  204. // console.log(decodeURIComponent(this.getQueryVariable("tableData")))
  205. // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
  206. let _data= JSON.parse(localStorage.getItem('ck_bd_printData1'))
  207. let _type = this.getQueryVariable("type")
  208. if (_type == 2) {
  209. this.bigContent = true
  210. this.smallContent = false
  211. } else {
  212. this.smallContent = true
  213. this.bigContent = false
  214. }
  215. console.log(_data, "sddsd")
  216. this.tableData = _data
  217. console.log(this.tableData)
  218. document.title = "粮食检斤单"
  219. window.print()
  220. window.onafterprint = function(event) {
  221. window.history.back(-1)
  222. };
  223. },
  224. watch: {}
  225. })
  226. </script>
  227. </html>