warehousePrint.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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. .title12 {
  62. margin-top: 20px;
  63. }
  64. .number {
  65. text-align: right;
  66. margin-bottom: 10px;
  67. }
  68. .small-row {
  69. display: flex;
  70. }
  71. .small-content {
  72. width: 400px;
  73. margin: 0 auto;
  74. border: 1px solid #ccc;
  75. padding: 20px 20px 160px 20px;
  76. position: absolute;
  77. top: 0;
  78. bottom: 0;
  79. left: 0;
  80. right: 0;
  81. margin: auto;
  82. height: 650px;
  83. }
  84. .small-title {
  85. text-align: center;
  86. font-size: 18px;
  87. display: flex;
  88. justify-content: space-between;
  89. align-items: center;
  90. }
  91. .small-row {
  92. display: flex;
  93. justify-content: space-between;
  94. margin: 10px;
  95. }
  96. .small-img {
  97. margin-right: 0;
  98. }
  99. .sign {
  100. margin-right: 100px;
  101. }
  102. .header {
  103. display: flex;
  104. justify-content: space-between;
  105. font-size: 16px;
  106. margin: 10px 0;
  107. }
  108. .header1 {
  109. font-size: 24px;
  110. margin: 30px 60px 10px 60px;
  111. display: flex;
  112. justify-content: center;
  113. }
  114. .line {
  115. height: 2px;
  116. width: 410px;
  117. margin: 3px auto;
  118. background: black;
  119. }
  120. .line:nth-of-type(3) {
  121. margin-bottom: 30px;
  122. }
  123. .header-top {
  124. display: flex;
  125. justify-content: space-between;
  126. }
  127. .sfcard {}
  128. .sfcard-content {
  129. display: flex;
  130. align-items: center;
  131. justify-content: space-evenly;
  132. }
  133. .sfcard-content img {
  134. width: 45%;
  135. height: 50vh;
  136. }
  137. .sfcard-title {
  138. font-size: 28px;
  139. text-align: center;
  140. margin: 10px 0;
  141. }
  142. .avatar {
  143. margin-bottom: 120px;
  144. }
  145. .avatar:nth-of-type(2) {
  146. margin-bottom: 140px;
  147. }
  148. .center {
  149. height: calc(100vh - 8px);
  150. }
  151. </style>
  152. </head>
  153. <body>
  154. <div id="app" v-cloak>
  155. <div class="center">
  156. <div class="title">{{company}}<span v-if="type == '2'">出</span><span v-if="type == '3'">入</span>库单</div>
  157. <div class='title12'>
  158. <span>仓库名:</span>
  159. <span>{{warehouseName}}</span>
  160. <span v-if='printData[0].qualityInspector'>质检员:</span>
  161. <span v-if='printData[0].qualityInspector'>{{printData[0].qualityInspector}}</span>
  162. <span>检斤员:</span>
  163. <span>{{printData[0].secretaryWeigher}}</span>
  164. <p>
  165. <span>日期:</span>
  166. <span>{{startDate}}</span>
  167. <span>到</span>
  168. <span>{{endDate}}</span>
  169. </p>
  170. <p>
  171. <span>货名:</span>
  172. <span>{{printData[0].goodsName}}</span>
  173. <span style="margin-left:100px">质量单位:吨</span>
  174. <span style="margin-left:100px">车数:{{printData.length}}辆</span>
  175. </p>
  176. </div>
  177. <table class="table">
  178. <tr class="row">
  179. <th>业务编号</th>
  180. <th v-if="type == '2'">出库日期</th>
  181. <th v-if="type == '3'">入库日期</th>
  182. <th>车牌号</th>
  183. <th>仓位号</th>
  184. <th>水分</th>
  185. <th>容重</th>
  186. <th>杂质</th>
  187. <th>毛重</th>
  188. <th>皮重</th>
  189. <th v-if="printData[0].goodsName.indexOf('潮粮') != -1">潮粮净重</th>
  190. <th v-else>净重</th>
  191. <th v-if="printData[0].goodsName.indexOf('潮粮') != -1">折干净重</th>
  192. </tr>
  193. <tr class="row" v-for="(item,index) in printData">
  194. <td class="col">{{item.busNo.substring(8)}}</td>
  195. <td class="col">{{item.inOutDate}}</td>
  196. <td class="col">{{item.carNo}}</td>
  197. <td class="col">{{item.binNumber}}</td>
  198. <td class="col">{{item.waterContent}}</td>
  199. <td class="col">{{item.bulkDensity}}</td>
  200. <td class="col">{{item.impurity}}</td>
  201. <td class="col">{{item.grossWeight}}</td>
  202. <td class="col">{{item.tare}}</td>
  203. <td class="col">{{item.netWeight}}</td>
  204. <td class="col" v-if="printData[0].goodsName.indexOf('潮粮') != -1">{{item.pureWeight}}</td>
  205. </tr>
  206. <tr class="row">
  207. <td class="col">合计</td>
  208. <td class="col"></td>
  209. <td class="col"></td>
  210. <td class="col"></td>
  211. <td class="col"></td>
  212. <td class="col"></td>
  213. <td class="col"></td>
  214. <td class="col">{{maoZhong.toFixed(3)}}</td>
  215. <td class="col">{{piZhong.toFixed(3)}}</td>
  216. <td class="col">{{jingZhong.toFixed(3)}}</td>
  217. <td class="col" v-if="printData[0].goodsName.indexOf('潮粮') != -1">{{ganZhong.toFixed(3)}}</td>
  218. </tr>
  219. </table>
  220. </div>
  221. </div>
  222. </body>
  223. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  224. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  225. <script type="text/javascript">
  226. new Vue({
  227. el: '#app',
  228. data: {
  229. showType: [],
  230. printData: [{
  231. identityAuthenticationInfo: {},
  232. qualityInspectionManagement: {},
  233. weighingManagement: {},
  234. customerNumberCard: {},
  235. }],
  236. printData1: [],
  237. customerList: {},
  238. customerList1: [],
  239. date: '',
  240. warehouseName: "",
  241. type: "",
  242. maoZhong: 0,
  243. piZhong: 0,
  244. jingZhong: 0,
  245. ganZhong: 0,
  246. binNos: [],
  247. binNoShow: "",
  248. startDate: "",
  249. endDate: "",
  250. company: ""
  251. },
  252. computed: {},
  253. methods: {
  254. dealNo(str) {
  255. return str.slice(4)
  256. },
  257. tableRowClassName({
  258. row,
  259. rowIndex
  260. }) {
  261. if (rowIndex === 1) {
  262. return 'warning-row'
  263. } else if (rowIndex === 3) {
  264. return 'success-row'
  265. }
  266. return ''
  267. },
  268. getQueryVariable(variable) {
  269. var query = window.location.search.substring(1)
  270. var vars = query.split('&')
  271. for (var i = 0; i < vars.length; i++) {
  272. var pair = vars[i].split('=')
  273. if (pair[0] == variable) {
  274. return pair[1]
  275. }
  276. }
  277. return false
  278. },
  279. printSmall() { },
  280. printBig() { }
  281. },
  282. mounted() {
  283. // console.log(API_CONFIG,1111111111)
  284. // var ippath=API_CONFIG.devServer.proxy['/pb'].target
  285. this.company = localStorage.getItem("ws-pf_compName")
  286. this.date = new Date().toLocaleString()
  287. this.type = decodeURIComponent(this.getQueryVariable('type'))
  288. this.warehouseName = decodeURIComponent(this.getQueryVariable('warehouseName'))
  289. if (this.warehouseName == '先锋新屯分库') {
  290. this.company = '哈尔滨大生实业有限责任公司北安分公司'
  291. }
  292. this.startDate = this.getQueryVariable('startDate').replace('%20', ' ')
  293. this.endDate = this.getQueryVariable('endDate').replace('%20', ' ')
  294. this.printData = JSON.parse(sessionStorage.getItem('inOutWarehouse_Print'))
  295. for (var count = 0; count < this.printData.length; count++) {
  296. this.maoZhong += this.printData[count].grossWeight
  297. this.piZhong += this.printData[count].tare
  298. this.jingZhong += this.printData[count].netWeight
  299. this.ganZhong += this.printData[count].pureWeight
  300. }
  301. // document.title = this.printData.compName + '结算凭证'
  302. window.print()
  303. window.onafterprint = function (event) {
  304. window.history.back(-1)
  305. }
  306. },
  307. watch: {}
  308. })
  309. </script>
  310. </html>