printdry.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  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: 37px;
  14. }
  15. body {
  16. margin: 0;
  17. }
  18. #app {
  19. /* height: 98vh;
  20. position: relative; */
  21. }
  22. .content {
  23. width: 1000px;
  24. padding: 30px 20px 20px 20px;
  25. font-size: 18px;
  26. /* height: 630px; */
  27. height: 90vh;
  28. position: relative;
  29. margin: auto;
  30. }
  31. .a5-content {
  32. height: 130vh;
  33. }
  34. table {
  35. width: 100%;
  36. text-align: center;
  37. border-collapse: collapse;
  38. border: 3px solid #333333;
  39. }
  40. .col-bgc {
  41. background: #f6f7fb;
  42. }
  43. .bottom-row1 {
  44. display: flex;
  45. /* justify-content: space-between; */
  46. margin-top: 5px 0;
  47. }
  48. .bottom-row2 {
  49. display: flex;
  50. }
  51. img,
  52. .left {
  53. width: 120px;
  54. height: 120px;
  55. position: absolute;
  56. left: 12px;
  57. top: 10px;
  58. }
  59. .config {
  60. margin-top: 10px;
  61. margin-right: 240px;
  62. }
  63. .autograph {
  64. margin-top: 10px;
  65. margin-right: 170px;
  66. }
  67. .bottom-row3 {
  68. margin: 10px 0;
  69. }
  70. .title {
  71. text-align: center;
  72. font-size: 36px;
  73. font-weight: 500;
  74. position: relative;
  75. /* margin-top: 47px; */
  76. }
  77. .number {
  78. text-align: right;
  79. margin-bottom: 10px;
  80. margin-top: 30px;
  81. }
  82. .small-row {
  83. display: flex;
  84. }
  85. .small-content {
  86. width: 300px;
  87. /* margin: 0 auto;
  88. border: 1px solid #ccc;
  89. padding: 20px 20px 160px 20px;
  90. position: absolute;
  91. top: 0;
  92. bottom: 0;
  93. left: 0;
  94. right: 0;
  95. margin: auto; */
  96. }
  97. .small-title {
  98. text-align: center;
  99. font-size: 18px;
  100. /* display: flex; */
  101. justify-content: space-between;
  102. align-items: center;
  103. }
  104. .numberNo {
  105. font-size: 36px;
  106. margin: auto;
  107. }
  108. .small-row {
  109. display: flex;
  110. justify-content: space-between;
  111. margin: 10px;
  112. }
  113. .small-img {
  114. margin-right: 0;
  115. }
  116. .sign {
  117. margin-right: 100px;
  118. }
  119. .small-code {
  120. position: relative;
  121. left: calc(50% - 55px)
  122. }
  123. </style>
  124. </head>
  125. <body>
  126. <div id="app" v-cloak>
  127. <div class="content" v-if="isShowPrintType3&&!isShowPrintType6">
  128. <!-- <div class="title">{{item.customer}}</div> -->
  129. <div class="title">入库检斤单</div>
  130. <div class="left">
  131. <!-- <img :src="item.codeUrl" alt=""> -->
  132. </div>
  133. <div class="number">{{printData.dryNumber}}</div>
  134. <table class="table">
  135. <tr class="row">
  136. <td colspan="3" class="col col-bgc">发货单位</td>
  137. <td class="col" colspan="3">{{print_company_name}}</td>
  138. <td class="col col-bgc">车牌号</td>
  139. <td class="col">{{printData.carNo}}</td>
  140. </tr>
  141. <tr class="row">
  142. <td colspan="3" class="col col-bgc">收货仓库</td>
  143. <td class="col" colspan="5"
  144. v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'">
  145. {{print_company_name}}</td>
  146. <td class="col" colspan="5" v-else>北京天维康油脂调销中心有限公司</td>
  147. </tr>
  148. <tr class="row">
  149. <td class="col col-bgc">货名</td>
  150. <td class="col">{{printData.goodsName}}</td>
  151. <td class="col col-bgc">类型</td>
  152. <td class="col">干粮</td>
  153. <td class="col col-bgc">{{printData.goodsName != '大豆' ? '容重(克/升)' : '蛋白'}}</td>
  154. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  155. </td>
  156. <td v-else-if="print_company_name=='白城市鹏羽粮食贸易有限公司'" class="col">
  157. 685
  158. </td>
  159. <td v-else-if="print_company_name=='黑龙江省包谷粮食购销有限责任公司'" class="col">
  160. 676
  161. </td>
  162. <td class="col col-bgc">不完善粒(%)</td>
  163. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  164. </td>
  165. <td v-else class="col">
  166. 6
  167. </td>
  168. </tr>
  169. <tr class="row">
  170. <td class="col col-bgc">等级</td>
  171. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  172. </td>
  173. <td v-else class="col">三等</td>
  174. <td class="col col-bgc">水分(%)</td>
  175. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  176. </td>
  177. <td v-else class="col">14.5</td>
  178. <td class="col col-bgc">热损伤(%)</td>
  179. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  180. </td>
  181. <td v-else class="col">0</td>
  182. <td class="col col-bgc">检斤时间</td>
  183. <td class="col">
  184. {{printData.updateDate}}
  185. </td>
  186. </tr>
  187. <tr class="row">
  188. <td class="col col-bgc">杂质(%)</td>
  189. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  190. </td>
  191. <td v-else class="col">1</td>
  192. <td class="col col-bgc">霉变粒(%)</td>
  193. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  194. </td>
  195. <td v-else class="col">1</td>
  196. <td class="col col-bgc">扣杂</td>
  197. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  198. </td>
  199. <td v-else class="col">0</td>
  200. <td class="col col-bgc">仓位号</td>
  201. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江省包谷粮食购销有限责任公司'" class="col">
  202. {{printData.binNumber}}</td>
  203. <td v-else-if="print_company_name=='白城市鹏羽粮食贸易有限公司'" class="col">{{printData.binNumber}}</td>
  204. <td v-else-if="print_company_name=='黑龙江省包谷粮食购销有限责任公司'" class="col">{{printData.binNumber}}</td>
  205. </tr>
  206. <tr class="row">
  207. <td class="col col-bgc">毛重(公斤)</td>
  208. <td class="col">{{printData.grossWeight}}</td>
  209. <td class="col col-bgc">皮重(公斤)</td>
  210. <td class="col">{{printData.tare}}</td>
  211. <td class="col col-bgc">扣重(公斤)</td>
  212. <td style="width:50px;" class="col">0</td>
  213. <td class="col col-bgc">净重(公斤)</td>
  214. <td class="col">{{printData.netWeight}}</td>
  215. <!-- <td class="col " colspan="2"></td> -->
  216. </tr>
  217. </table>
  218. <div class="bottom">
  219. <div class="bottom-row1">
  220. <div>检斤:{{printData.weigher}}</div>
  221. <!-- <div>{{tableData.qualityDate}}</div> -->
  222. </div>
  223. <div class="bottom-row2">
  224. <!-- <div class="left">
  225. <img :src="item.codeUrl" alt="">
  226. </div> -->
  227. <div class="config" v-if="printData.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  228. <div class="config" v-if="printData.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  229. <div class="autograph" v-if="printData.warehouseName!='白城补数据'">司机签名:</div>
  230. </div>
  231. <!-- <div class="bottom-row3">扫一扫</div> -->
  232. </div>
  233. </div>
  234. <div class="content" v-if="isShowPrintType3&&printData.extra2||isShowPrintType6">
  235. <!-- <div class="title">{{item.customer}}</div> -->
  236. <div class="title">入库检斤单</div>
  237. <div class="left">
  238. <!-- <img :src="item.codeUrl" alt=""> -->
  239. </div>
  240. <div class="number">{{printData.dryNumber}}</div>
  241. <table class="table">
  242. <!-- <tr class="row">
  243. <td class="col col-bgc">发货单位</td>
  244. <td class="col" colspan="2" >{{print_customer_name_ew}}</td>
  245. <td class="col col-bgc">联系电话</td>
  246. <td class="col" ></td>
  247. <td class="col col-bgc">车牌号</td>
  248. <td class="col" colspan="2">{{printData.carNo}}</td>
  249. </tr>
  250. <tr class="row">
  251. <td class="col col-bgc">收货单位</td>
  252. <td class="col" colspan="2">{{print_company_name_ew}}</td>
  253. <td class="col col-bgc">联系人</td>
  254. <td class="col"></td>
  255. <td class="col col-bgc">联系电话</td>
  256. <td class="col" colspan="2"></td>
  257. </tr> -->
  258. <tr class="row">
  259. <td colspan="3" class="col col-bgc">发货单位</td>
  260. <td class="col" colspan="3">{{print_customer_name_ew}}</td>
  261. <td class="col col-bgc">车牌号</td>
  262. <td class="col">{{printData.carNo}}</td>
  263. </tr>
  264. <tr class="row">
  265. <td colspan="3" class="col col-bgc">收货单位</td>
  266. <td class="col" colspan="5">{{print_company_name_ew}}</td>
  267. </tr>
  268. <tr class="row">
  269. <td class="col col-bgc">货名</td>
  270. <td class="col">{{printData.goodsName}}</td>
  271. <td class="col col-bgc">类型</td>
  272. <td class="col">干粮</td>
  273. <td class="col col-bgc">{{printData.goodsName != '大豆' ? '容重(克/升)' : '蛋白'}}</td>
  274. <td class="col">
  275. </td>
  276. <td class="col col-bgc">不完善粒(%)</td>
  277. <td class="col">
  278. </td>
  279. </tr>
  280. <tr class="row">
  281. <td class="col col-bgc">等级</td>
  282. <td class="col"></td>
  283. <td class="col col-bgc">水分(%)</td>
  284. <td class="col"></td>
  285. <td class="col col-bgc">热损伤(%)</td>
  286. <td class="col"></td>
  287. <td class="col col-bgc">检斤时间</td>
  288. <td class="col">
  289. {{printData.updateDate}}
  290. </td>
  291. </tr>
  292. <tr class="row">
  293. <td class="col col-bgc">杂质(%)</td>
  294. <td class="col"></td>
  295. <td class="col col-bgc">霉变粒(%)</td>
  296. <td class="col"></td>
  297. <td class="col col-bgc">扣杂</td>
  298. <td class="col"></td>
  299. <td class="col col-bgc">仓位号</td>
  300. <td class="col">{{printData.binNumber}}</td>
  301. </tr>
  302. <tr class="row">
  303. <td class="col col-bgc">毛重(公斤)</td>
  304. <td class="col">{{printData.grossWeight}}</td>
  305. <td class="col col-bgc">皮重(公斤)</td>
  306. <td class="col">{{printData.tare}}</td>
  307. <td class="col col-bgc">扣重(公斤)</td>
  308. <td style="width:50px;" class="col">0</td>
  309. <td class="col col-bgc">净重(公斤)</td>
  310. <td class="col">{{printData.netWeight}}</td>
  311. <!-- <td class="col " colspan="2"></td> -->
  312. </tr>
  313. </table>
  314. <div class="bottom">
  315. <div class="bottom-row1">
  316. <div>检斤:{{printData.weigher}}</div>
  317. <!-- <div>{{tableData.qualityDate}}</div> -->
  318. </div>
  319. <div class="bottom-row2">
  320. <!-- <div class="left">
  321. <img :src="item.codeUrl" alt="">
  322. </div> -->
  323. <div class="config" v-if="printData.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  324. <div class="config" v-if="printData.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  325. <div class="autograph" v-if="printData.warehouseName!='白城补数据'">司机签名:</div>
  326. </div>
  327. <!-- <div class="bottom-row3">扫一扫</div> -->
  328. </div>
  329. </div>
  330. </div>
  331. </body>
  332. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  333. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  334. <script type="text/javascript">
  335. new Vue({
  336. el: '#app',
  337. data: {
  338. isShowPrintType1: false,
  339. isShowPrintType2: false,
  340. isShowPrintType3: false,
  341. isShowPrintType4: false,
  342. isShowPrintType5: false,
  343. isShowPrintType6: false,
  344. showType: [],
  345. printData: {},
  346. printData1: [],
  347. customerList: {},
  348. customerList1: [],
  349. name: '',
  350. bigContent: false,
  351. smallContent: false,
  352. date: '',
  353. imageUrl1: '',
  354. imageUrl2: '',
  355. imageUrl3: '',
  356. imageUrl4: '',
  357. identity: [],
  358. bank: [],
  359. selectPrint: false,
  360. onlyShowPz: false,
  361. tableData: [],
  362. compId: '',
  363. print_company_name: '',
  364. print_company_name_ew: '',
  365. print_customer_name_ew: '',
  366. pengyuPrint: 'false'
  367. },
  368. computed: {},
  369. methods: {
  370. dealNo(str) {
  371. console.log(str)
  372. return str.slice(4)
  373. },
  374. tableRowClassName({
  375. row,
  376. rowIndex
  377. }) {
  378. if (rowIndex === 1) {
  379. return 'warning-row'
  380. } else if (rowIndex === 3) {
  381. return 'success-row'
  382. }
  383. return ''
  384. },
  385. getQueryVariable(variable) {
  386. var query = window.location.search.substring(1)
  387. var vars = query.split('&')
  388. for (var i = 0; i < vars.length; i++) {
  389. var pair = vars[i].split('=')
  390. if (pair[0] == variable) {
  391. return pair[1]
  392. }
  393. }
  394. return false
  395. },
  396. printSmall() { },
  397. printBig() { }
  398. },
  399. mounted() {
  400. if (localStorage.getItem('print_company_name')) {
  401. this.print_company_name = localStorage.getItem('print_company_name')
  402. }
  403. if (localStorage.getItem('print_company_name_ew')) {
  404. this.print_company_name_ew = localStorage.getItem('print_company_name_ew')
  405. }
  406. if (localStorage.getItem('print_customer_name_ew')) {
  407. this.print_customer_name_ew = localStorage.getItem('print_customer_name_ew')
  408. }
  409. //公司id
  410. this.compId = localStorage.getItem('ws-pf_compId')
  411. if (this.compId == 'd4031a7c77694a749058ec87da1a4ff1') {
  412. this.compId = '6a713699e08c4cbc97a87f7648a95e3d'
  413. }
  414. if (localStorage.getItem('print_alone_extra') == 'true') {
  415. this.isShowPrintType6 = true
  416. } else {
  417. this.isShowPrintType3 = true
  418. }
  419. this.date = new Date().toLocaleString()
  420. // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
  421. this.printData = JSON.parse(localStorage.getItem('printdrydata'))
  422. if (this.printData.compName == undefined) this.printData.compName = ''
  423. document.title = this.printData.compName + '结算凭证'
  424. window.print()
  425. // sessionStorage.removeItem('selectPrint_selectPrintList');
  426. // sessionStorage.removeItem('selectPrint_selectCustomerList');
  427. window.onafterprint = function (event) {
  428. window.history.back(-1)
  429. }
  430. },
  431. watch: {}
  432. })
  433. </script>
  434. </html>