warehousePrint.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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. }
  14. #app {
  15. height: 88vh;
  16. position: relative;
  17. }
  18. .content {
  19. width: 1000px;
  20. /* height: 583px; */
  21. margin: auto;
  22. /* position: absolute; */
  23. /* top: -5vh; */
  24. /* bottom: 0;
  25. left: 0;
  26. right: 0; */
  27. }
  28. table {
  29. width: 100%;
  30. text-align: center;
  31. border-collapse: collapse;
  32. border: 3px solid #333333;
  33. }
  34. .col-bgc {
  35. background: #f6f7fb;
  36. }
  37. .bottom-row1 {
  38. display: flex;
  39. justify-content: space-between;
  40. margin: 20px 0;
  41. }
  42. .bottom-row2 {
  43. display: flex;
  44. margin: 10px 0;
  45. }
  46. img {
  47. width: 41px;
  48. height: 41px;
  49. /* margin-right: 118px; */
  50. }
  51. .config {
  52. margin-right: 240px;
  53. }
  54. .bottom-row3 {
  55. margin: 10px 0;
  56. }
  57. .title {
  58. text-align: center;
  59. font-size: 24px;
  60. }
  61. .number {
  62. text-align: right;
  63. margin-bottom: 10px;
  64. }
  65. .small-row {
  66. display: flex;
  67. }
  68. .small-content {
  69. width: 400px;
  70. margin: 0 auto;
  71. border: 1px solid #ccc;
  72. padding: 20px 20px 160px 20px;
  73. position: absolute;
  74. top: 0;
  75. bottom: 0;
  76. left: 0;
  77. right: 0;
  78. margin: auto;
  79. height: 650px;
  80. }
  81. .small-title {
  82. text-align: center;
  83. font-size: 18px;
  84. display: flex;
  85. justify-content: space-between;
  86. align-items: center;
  87. }
  88. .small-row {
  89. display: flex;
  90. justify-content: space-between;
  91. margin: 10px;
  92. }
  93. .small-img {
  94. margin-right: 0;
  95. }
  96. .sign {
  97. margin-right: 100px;
  98. }
  99. .header {
  100. display: flex;
  101. justify-content: space-between;
  102. font-size: 16px;
  103. margin: 10px 0;
  104. }
  105. .header1 {
  106. font-size: 24px;
  107. margin: 30px 60px 10px 60px;
  108. display: flex;
  109. justify-content: center;
  110. }
  111. .line {
  112. height: 2px;
  113. width: 410px;
  114. margin: 3px auto;
  115. background: black;
  116. }
  117. .line:nth-of-type(3) {
  118. margin-bottom: 30px;
  119. }
  120. .header-top {
  121. display: flex;
  122. justify-content: space-between;
  123. }
  124. .sfcard {}
  125. .sfcard-content {
  126. display: flex;
  127. align-items: center;
  128. justify-content: space-evenly;
  129. }
  130. .sfcard-content img {
  131. width: 45%;
  132. height: 50vh;
  133. }
  134. .sfcard-title {
  135. font-size: 28px;
  136. text-align: center;
  137. margin: 10px 0;
  138. }
  139. .avatar {
  140. margin-bottom: 120px;
  141. }
  142. .avatar:nth-of-type(2) {
  143. margin-bottom: 140px;
  144. }
  145. .center {
  146. height: calc(100vh - 8px);
  147. }
  148. </style>
  149. </head>
  150. <body>
  151. <div id="app">
  152. <div class="center">
  153. <div class="title">黑龙江中天昊元贸易有限公司<span v-if="type == '2'">出</span><span v-if="type == '3'">入</span>库单</div>
  154. <div class='title12'>
  155. <span>仓库名:</span>
  156. <span>{{warehouseName}}</span>
  157. <span>质检员:</span>
  158. <span>{{printData[0].qualityInspector}}</span>
  159. <span>复检员:</span>
  160. <span>{{printData[0].reInspector}}</span>
  161. <span>检斤员:</span>
  162. <span>{{printData[0].agent}}</span>
  163. <p>
  164. <span>值班日期:</span>
  165. <span>{{startDate}}</span>
  166. <span>到</span>
  167. <span>{{endDate}}</span>
  168. </p>
  169. <p>
  170. <span>货名:</span>
  171. <span>玉米</span>
  172. <span style="margin-left:100px">质量单位:吨</span>
  173. </p>
  174. </div>
  175. <table class="table">
  176. <tr class="row">
  177. <th v-if="type == '2'">出库日期</th>
  178. <th v-if="type == '3'">入库日期</th>
  179. <th>车牌号</th>
  180. <th>仓位号</th>
  181. <th>箱一号</th>
  182. <th>箱二号</th>
  183. <th>毛重</th>
  184. <th>皮重</th>
  185. <th>净重</th>
  186. </tr>
  187. <tr class="row" v-for="(item,index) in printData">
  188. <td class="col">{{item.inOutDate}}</td>
  189. <td class="col">{{item.carNo}}</td>
  190. <td class="col">{{item.binNumber}}</td>
  191. <td class="col">{{item.boxNo}}</td>
  192. <td class="col">{{item.boxNo}}</td>
  193. <td class="col">{{item.grossWeight}}</td>
  194. <td class="col">{{item.tare}}</td>
  195. <td class="col">{{item.netWeight}}</td>
  196. </tr>
  197. <tr class="row">
  198. <td class="col">合计</td>
  199. <td class="col"></td>
  200. <td class="col"></td>
  201. <td class="col"></td>
  202. <td class="col"></td>
  203. <td class="col">{{maoZhong.toFixed(3)}}</td>
  204. <td class="col">{{piZhong.toFixed(3)}}</td>
  205. <td class="col">{{jingZhong.toFixed(3)}}</td>
  206. </tr>
  207. </table>
  208. </div>
  209. </div>
  210. </body>
  211. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  212. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  213. <script type="text/javascript">
  214. new Vue({
  215. el: '#app',
  216. data: {
  217. showType: [],
  218. printData: [{
  219. identityAuthenticationInfo: {},
  220. qualityInspectionManagement: {},
  221. weighingManagement: {},
  222. customerNumberCard: {},
  223. }],
  224. printData1: [],
  225. customerList: {},
  226. customerList1: [],
  227. date: '',
  228. warehouseName: "",
  229. type: "",
  230. maoZhong: 0,
  231. piZhong: 0,
  232. jingZhong: 0,
  233. binNos: [],
  234. binNoShow: "",
  235. startDate: "",
  236. endDate: "",
  237. },
  238. computed: {},
  239. methods: {
  240. dealNo(str) {
  241. return str.slice(4)
  242. },
  243. tableRowClassName({
  244. row,
  245. rowIndex
  246. }) {
  247. if (rowIndex === 1) {
  248. return 'warning-row'
  249. } else if (rowIndex === 3) {
  250. return 'success-row'
  251. }
  252. return ''
  253. },
  254. getQueryVariable(variable) {
  255. var query = window.location.search.substring(1)
  256. var vars = query.split('&')
  257. for (var i = 0; i < vars.length; i++) {
  258. var pair = vars[i].split('=')
  259. if (pair[0] == variable) {
  260. return pair[1]
  261. }
  262. }
  263. return false
  264. },
  265. printSmall() {},
  266. printBig() {}
  267. },
  268. mounted() {
  269. this.date = new Date().toLocaleString()
  270. this.type = decodeURIComponent(this.getQueryVariable('type'))
  271. this.warehouseName = decodeURIComponent(this.getQueryVariable('warehouseName'))
  272. this.startDate = this.getQueryVariable('startDate')
  273. this.endDate = this.getQueryVariable('endDate')
  274. this.printData = JSON.parse(sessionStorage.getItem('inOutWarehouse_Print'))
  275. for (var count = 0; count < this.printData.length; count++) {
  276. this.maoZhong += this.printData[count].grossWeight
  277. this.piZhong += this.printData[count].tare
  278. this.jingZhong += this.printData[count].netWeight
  279. }
  280. // document.title = this.printData.compName + '结算凭证'
  281. window.print()
  282. window.onafterprint = function(event) {
  283. window.history.back(-1)
  284. }
  285. },
  286. watch: {}
  287. })
  288. </script>
  289. </html>