printdry.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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">
  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" v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'">{{print_company_name}}</td>
  144. <td class="col" colspan="5" v-else>北京天维康油脂调销中心有限公司</td>
  145. </tr>
  146. <tr class="row">
  147. <td class="col col-bgc">货名</td>
  148. <td class="col">{{printData.goodsName}}</td>
  149. <td class="col col-bgc">类型</td>
  150. <td class="col">干粮</td>
  151. <td class="col col-bgc">{{printData.goodsName != '大豆' ? '容重(克/升)' : '蛋白'}}</td>
  152. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col">
  153. </td>
  154. <td v-else-if="print_company_name=='白城市鹏羽粮食贸易有限公司'" class="col">
  155. 685
  156. </td>
  157. <td v-else-if="print_company_name=='黑龙江稷硕粮食购销有限公司'" class="col">
  158. 676
  159. </td>
  160. <td class="col col-bgc">不完善粒(%)</td>
  161. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col">
  162. </td>
  163. <td v-else class="col">
  164. 6
  165. </td>
  166. </tr>
  167. <tr class="row">
  168. <td class="col col-bgc">等级</td>
  169. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col"></td>
  170. <td v-else class="col">三等</td>
  171. <td class="col col-bgc">水分(%)</td>
  172. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col"></td>
  173. <td v-else class="col">14.5</td>
  174. <td class="col col-bgc">热损伤(%)</td>
  175. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col"></td>
  176. <td v-else class="col">0</td>
  177. <td class="col col-bgc">检斤时间</td>
  178. <td class="col">
  179. {{printData.updateDate}}
  180. </td>
  181. </tr>
  182. <tr class="row">
  183. <td class="col col-bgc">杂质(%)</td>
  184. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col"></td>
  185. <td v-else class="col">1</td>
  186. <td class="col col-bgc">霉变粒(%)</td>
  187. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col"></td>
  188. <td v-else class="col">1</td>
  189. <td class="col col-bgc">扣杂</td>
  190. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col"></td>
  191. <td v-else class="col">0</td>
  192. <td class="col col-bgc">仓位号</td>
  193. <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'&&print_company_name!='黑龙江稷硕粮食购销有限公司'" class="col">{{printData.binNumber}}</td>
  194. <td v-else-if="print_company_name=='白城市鹏羽粮食贸易有限公司'" class="col">{{printData.binNumber}}</td>
  195. <td v-else-if="print_company_name=='黑龙江稷硕粮食购销有限公司'" class="col">{{printData.binNumber}}</td>
  196. </tr>
  197. <tr class="row">
  198. <td class="col col-bgc">毛重(公斤)</td>
  199. <td class="col">{{printData.grossWeight}}</td>
  200. <td class="col col-bgc">皮重(公斤)</td>
  201. <td class="col">{{printData.tare}}</td>
  202. <td class="col col-bgc">扣重(公斤)</td>
  203. <td style="width:50px;" class="col">0</td>
  204. <td class="col col-bgc">净重(公斤)</td>
  205. <td class="col">{{printData.netWeight}}</td>
  206. <!-- <td class="col " colspan="2"></td> -->
  207. </tr>
  208. </table>
  209. <div class="bottom">
  210. <div class="bottom-row1">
  211. <div>检斤:{{printData.weigher}}</div>
  212. <!-- <div>{{tableData.qualityDate}}</div> -->
  213. </div>
  214. <div class="bottom-row2">
  215. <!-- <div class="left">
  216. <img :src="item.codeUrl" alt="">
  217. </div> -->
  218. <div class="config" v-if="printData.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  219. <div class="config" v-if="printData.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  220. <div class="autograph" v-if="printData.warehouseName!='白城补数据'">司机签名:</div>
  221. </div>
  222. <!-- <div class="bottom-row3">扫一扫</div> -->
  223. </div>
  224. </div>
  225. <div class="content" v-if="isShowPrintType3&&printData.extra2||isShowPrintType6">
  226. <!-- <div class="title">{{item.customer}}</div> -->
  227. <div class="title">入库检斤单</div>
  228. <div class="left">
  229. <!-- <img :src="item.codeUrl" alt=""> -->
  230. </div>
  231. <div class="number">{{printData.dryNumber}}</div>
  232. <table class="table">
  233. <!-- <tr class="row">
  234. <td class="col col-bgc">发货单位</td>
  235. <td class="col" colspan="2" >{{print_customer_name_ew}}</td>
  236. <td class="col col-bgc">联系电话</td>
  237. <td class="col" ></td>
  238. <td class="col col-bgc">车牌号</td>
  239. <td class="col" colspan="2">{{printData.carNo}}</td>
  240. </tr>
  241. <tr class="row">
  242. <td class="col col-bgc">收货单位</td>
  243. <td class="col" colspan="2">{{print_company_name_ew}}</td>
  244. <td class="col col-bgc">联系人</td>
  245. <td class="col"></td>
  246. <td class="col col-bgc">联系电话</td>
  247. <td class="col" colspan="2"></td>
  248. </tr> -->
  249. <tr class="row">
  250. <td colspan="3" class="col col-bgc">发货单位</td>
  251. <td class="col" colspan="3" >{{print_customer_name_ew}}</td>
  252. <td class="col col-bgc">车牌号</td>
  253. <td class="col">{{printData.carNo}}</td>
  254. </tr>
  255. <tr class="row">
  256. <td colspan="3" class="col col-bgc">收货单位</td>
  257. <td class="col" colspan="5">{{print_company_name_ew}}</td>
  258. </tr>
  259. <tr class="row">
  260. <td class="col col-bgc">货名</td>
  261. <td class="col">{{printData.goodsName}}</td>
  262. <td class="col col-bgc">类型</td>
  263. <td class="col">干粮</td>
  264. <td class="col col-bgc">{{printData.goodsName != '大豆' ? '容重(克/升)' : '蛋白'}}</td>
  265. <td class="col">
  266. </td>
  267. <td class="col col-bgc">不完善粒(%)</td>
  268. <td class="col">
  269. </td>
  270. </tr>
  271. <tr class="row">
  272. <td class="col col-bgc">等级</td>
  273. <td class="col"></td>
  274. <td class="col col-bgc">水分(%)</td>
  275. <td class="col"></td>
  276. <td class="col col-bgc">热损伤(%)</td>
  277. <td class="col"></td>
  278. <td class="col col-bgc">检斤时间</td>
  279. <td class="col">
  280. {{printData.updateDate}}
  281. </td>
  282. </tr>
  283. <tr class="row">
  284. <td class="col col-bgc">杂质(%)</td>
  285. <td class="col"></td>
  286. <td class="col col-bgc">霉变粒(%)</td>
  287. <td class="col"></td>
  288. <td class="col col-bgc">扣杂</td>
  289. <td class="col"></td>
  290. <td class="col col-bgc">仓位号</td>
  291. <td class="col">{{printData.binNumber}}</td>
  292. </tr>
  293. <tr class="row">
  294. <td class="col col-bgc">毛重(公斤)</td>
  295. <td class="col">{{printData.grossWeight}}</td>
  296. <td class="col col-bgc">皮重(公斤)</td>
  297. <td class="col">{{printData.tare}}</td>
  298. <td class="col col-bgc">扣重(公斤)</td>
  299. <td style="width:50px;" class="col">0</td>
  300. <td class="col col-bgc">净重(公斤)</td>
  301. <td class="col">{{printData.netWeight}}</td>
  302. <!-- <td class="col " colspan="2"></td> -->
  303. </tr>
  304. </table>
  305. <div class="bottom">
  306. <div class="bottom-row1">
  307. <div>检斤:{{printData.weigher}}</div>
  308. <!-- <div>{{tableData.qualityDate}}</div> -->
  309. </div>
  310. <div class="bottom-row2">
  311. <!-- <div class="left">
  312. <img :src="item.codeUrl" alt="">
  313. </div> -->
  314. <div class="config" v-if="printData.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  315. <div class="config" v-if="printData.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  316. <div class="autograph" v-if="printData.warehouseName!='白城补数据'">司机签名:</div>
  317. </div>
  318. <!-- <div class="bottom-row3">扫一扫</div> -->
  319. </div>
  320. </div>
  321. </div>
  322. </body>
  323. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  324. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  325. <script type="text/javascript">
  326. new Vue({
  327. el: '#app',
  328. data: {
  329. isShowPrintType1: false,
  330. isShowPrintType2: false,
  331. isShowPrintType3: false,
  332. isShowPrintType4: false,
  333. isShowPrintType5: false,
  334. isShowPrintType6:false,
  335. showType: [],
  336. printData: {},
  337. printData1: [],
  338. customerList: {},
  339. customerList1: [],
  340. name: '',
  341. bigContent: false,
  342. smallContent: false,
  343. date: '',
  344. imageUrl1: '',
  345. imageUrl2: '',
  346. imageUrl3: '',
  347. imageUrl4: '',
  348. identity: [],
  349. bank: [],
  350. selectPrint: false,
  351. onlyShowPz: false,
  352. tableData: [],
  353. compId: '',
  354. print_company_name:'',
  355. print_company_name_ew:'',
  356. print_customer_name_ew:'',
  357. pengyuPrint:'false'
  358. },
  359. computed: {},
  360. methods: {
  361. dealNo(str) {
  362. console.log(str)
  363. return str.slice(4)
  364. },
  365. tableRowClassName({
  366. row,
  367. rowIndex
  368. }) {
  369. if (rowIndex === 1) {
  370. return 'warning-row'
  371. } else if (rowIndex === 3) {
  372. return 'success-row'
  373. }
  374. return ''
  375. },
  376. getQueryVariable(variable) {
  377. var query = window.location.search.substring(1)
  378. var vars = query.split('&')
  379. for (var i = 0; i < vars.length; i++) {
  380. var pair = vars[i].split('=')
  381. if (pair[0] == variable) {
  382. return pair[1]
  383. }
  384. }
  385. return false
  386. },
  387. printSmall() {},
  388. printBig() {}
  389. },
  390. mounted() {
  391. if(localStorage.getItem('print_company_name')){
  392. this.print_company_name=localStorage.getItem('print_company_name')
  393. }
  394. if(localStorage.getItem('print_company_name_ew')){
  395. this.print_company_name_ew=localStorage.getItem('print_company_name_ew')
  396. }
  397. if(localStorage.getItem('print_customer_name_ew')){
  398. this.print_customer_name_ew=localStorage.getItem('print_customer_name_ew')
  399. }
  400. //公司id
  401. this.compId = localStorage.getItem('ws-pf_compId')
  402. if(this.compId == '5d164edcef03476dba6630f86dc96496'){
  403. this.compId = '6a713699e08c4cbc97a87f7648a95e3d'
  404. }
  405. if(localStorage.getItem('print_alone_extra')=='true'){
  406. this.isShowPrintType6=true
  407. }else{
  408. this.isShowPrintType3=true
  409. }
  410. this.date = new Date().toLocaleString()
  411. // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
  412. this.printData = JSON.parse(localStorage.getItem('printdrydata'))
  413. if (this.printData.compName == undefined) this.printData.compName = ''
  414. document.title = this.printData.compName + '结算凭证'
  415. window.print()
  416. // sessionStorage.removeItem('selectPrint_selectPrintList');
  417. // sessionStorage.removeItem('selectPrint_selectCustomerList');
  418. window.onafterprint = function(event) {
  419. window.history.back(-1)
  420. }
  421. },
  422. watch: {}
  423. })
  424. </script>
  425. </html>