warehousePrint.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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">{{company?company:"黑龙江中天昊元贸易有限公司"}}<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 v-if='printData[0].qualityInspector'>质检员:</span>
  158. <span v-if='printData[0].qualityInspector'>{{printData[0].qualityInspector}}</span>
  159. <span v-if='printData[0].reInspector'>复检员:</span>
  160. <span v-if='printData[0].reInspector'>{{printData[0].reInspector}}</span>
  161. <span>检斤员:</span>
  162. <span>{{printData[0].secretaryWeigher}}</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>{{printData[0].goodsName}}</span>
  172. <span style="margin-left:100px">质量单位:吨</span>
  173. <span style="margin-left:100px">车数:{{printData.length}}辆</span>
  174. </p>
  175. </div>
  176. <table class="table">
  177. <tr class="row">
  178. <th v-if="type == '2'">出库日期</th>
  179. <th v-if="type == '3'">入库日期</th>
  180. <th>车牌号</th>
  181. <th>仓位号</th>
  182. <th>箱一号</th>
  183. <th>箱二号</th>
  184. <th>毛重</th>
  185. <th>皮重</th>
  186. <th>净重</th>
  187. </tr>
  188. <tr class="row" v-for="(item,index) in printData">
  189. <td class="col">{{item.inOutDate}}</td>
  190. <td class="col">{{item.carNo}}</td>
  191. <td class="col">{{item.binNumber.indexOf("托盘")!= -1?item.binNumber.replace("托盘",""):item.binNumber}}</td>
  192. <td class="col">{{item.boxNo}}</td>
  193. <td class="col">{{item.boxNoOther}}</td>
  194. <td class="col">{{item.grossWeight}}</td>
  195. <td class="col">{{item.tare}}</td>
  196. <td class="col">{{item.netWeight}}</td>
  197. </tr>
  198. <tr class="row">
  199. <td class="col">合计</td>
  200. <td class="col"></td>
  201. <td class="col"></td>
  202. <td class="col"></td>
  203. <td class="col"></td>
  204. <td class="col">{{maoZhong.toFixed(3)}}</td>
  205. <td class="col">{{piZhong.toFixed(3)}}</td>
  206. <td class="col">{{jingZhong.toFixed(3)}}</td>
  207. </tr>
  208. </table>
  209. </div>
  210. </div>
  211. </body>
  212. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  213. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  214. <script type="text/javascript">
  215. new Vue({
  216. el: '#app',
  217. data: {
  218. showType: [],
  219. printData: [{
  220. identityAuthenticationInfo: {},
  221. qualityInspectionManagement: {},
  222. weighingManagement: {},
  223. customerNumberCard: {},
  224. }],
  225. printData1: [],
  226. customerList: {},
  227. customerList1: [],
  228. date: '',
  229. warehouseName: "",
  230. type: "",
  231. maoZhong: 0,
  232. piZhong: 0,
  233. jingZhong: 0,
  234. binNos: [],
  235. binNoShow: "",
  236. startDate: "",
  237. endDate: "",
  238. company:""
  239. },
  240. computed: {},
  241. methods: {
  242. dealNo(str) {
  243. return str.slice(4)
  244. },
  245. tableRowClassName({
  246. row,
  247. rowIndex
  248. }) {
  249. if (rowIndex === 1) {
  250. return 'warning-row'
  251. } else if (rowIndex === 3) {
  252. return 'success-row'
  253. }
  254. return ''
  255. },
  256. getQueryVariable(variable) {
  257. var query = window.location.search.substring(1)
  258. var vars = query.split('&')
  259. for (var i = 0; i < vars.length; i++) {
  260. var pair = vars[i].split('=')
  261. if (pair[0] == variable) {
  262. return pair[1]
  263. }
  264. }
  265. return false
  266. },
  267. printSmall() {},
  268. printBig() {}
  269. },
  270. mounted() {
  271. // console.log(API_CONFIG,1111111111)
  272. // var ippath=API_CONFIG.devServer.proxy['/pb'].target
  273. this.company = localStorage.getItem("ws-pf_compName")
  274. this.date = new Date().toLocaleString()
  275. this.type = decodeURIComponent(this.getQueryVariable('type'))
  276. this.warehouseName = decodeURIComponent(this.getQueryVariable('warehouseName'))
  277. this.startDate = this.getQueryVariable('startDate').replace('%20',' ')
  278. this.endDate = this.getQueryVariable('endDate').replace('%20',' ')
  279. this.printData = JSON.parse(sessionStorage.getItem('inOutWarehouse_Print'))
  280. for (var count = 0; count < this.printData.length; count++) {
  281. this.maoZhong += this.printData[count].grossWeight
  282. this.piZhong += this.printData[count].tare
  283. this.jingZhong += this.printData[count].netWeight
  284. }
  285. // document.title = this.printData.compName + '结算凭证'
  286. window.print()
  287. window.onafterprint = function(event) {
  288. window.history.back(-1)
  289. }
  290. },
  291. watch: {}
  292. })
  293. </script>
  294. </html>