weightCheckOut.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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}}
  149. </td>
  150. <td class="col" colspan="2" v-if='tableData.outType=="火运"'>
  151. {{tableData.wingNumber}} {{tableData.wingNumberOther}}
  152. </td>
  153. <td class="col" colspan="2" v-if='tableData.outType=="散船"'>{{tableData.shipNumber}}</td>
  154. </tr>
  155. </table>
  156. <div class="bottom">
  157. <div class="bottom-row2">
  158. <div class="config">收货单位签名或盖章:</div>
  159. <div class="autograph">客户签名:</div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </body>
  165. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  166. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  167. <script type="text/javascript">
  168. new Vue({
  169. el: '#app',
  170. data: {
  171. tableData: {
  172. // qualityInspectionManagement:{}
  173. },
  174. name: "",
  175. bigContent: false,
  176. smallContent: false
  177. },
  178. computed: {},
  179. methods: {
  180. tableRowClassName({
  181. row,
  182. rowIndex
  183. }) {
  184. if (rowIndex === 1) {
  185. return 'warning-row';
  186. } else if (rowIndex === 3) {
  187. return 'success-row';
  188. }
  189. return '';
  190. },
  191. getQueryVariable(variable) {
  192. var query = window.location.search.substring(1);
  193. var vars = query.split("&");
  194. for (var i = 0; i < vars.length; i++) {
  195. var pair = vars[i].split("=");
  196. if (pair[0] == variable) {
  197. return pair[1];
  198. }
  199. }
  200. return (false);
  201. },
  202. printSmall() {},
  203. printBig() {},
  204. },
  205. mounted() {
  206. // console.log(decodeURIComponent(this.getQueryVariable("tableData")))
  207. // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
  208. let _data = JSON.parse(localStorage.getItem('ck_bd_printData1'))
  209. let _type = this.getQueryVariable("type")
  210. if (_type == 2) {
  211. this.bigContent = true
  212. this.smallContent = false
  213. } else {
  214. this.smallContent = true
  215. this.bigContent = false
  216. }
  217. console.log(_data, "sddsd")
  218. this.tableData = _data
  219. console.log(this.tableData)
  220. document.title = "粮食检斤单"
  221. window.print()
  222. window.onafterprint = function(event) {
  223. window.history.back(-1)
  224. };
  225. },
  226. watch: {}
  227. })
  228. </script>
  229. </html>