weightCheckInOut.html 7.0 KB

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