collectionContractRecordPrint.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
  6. <title></title>
  7. <style>
  8. table tr td {
  9. border: 2px solid #333333;
  10. padding: 5px 0;
  11. }
  12. #app {
  13. height: 88vh;
  14. position: relative;
  15. }
  16. .simple {
  17. height: 120vh !important;
  18. }
  19. .content {
  20. width: 1000px;
  21. margin: auto;
  22. }
  23. table {
  24. width: 100%;
  25. text-align: center;
  26. border-collapse: collapse;
  27. }
  28. .col-bgc {
  29. background: #f6f7fb;
  30. }
  31. .bottom-row1 {
  32. display: flex;
  33. justify-content: space-between;
  34. margin: 20px 0;
  35. }
  36. .bottom-row2 {
  37. display: flex;
  38. margin: 10px 0;
  39. }
  40. img {
  41. width: 80px;
  42. height: 80px;
  43. /* margin-right: 118px; */
  44. }
  45. .leftimg {
  46. width: 80px;
  47. height: 80px;
  48. position: absolute;
  49. right: 20px;
  50. top: 3px;
  51. }
  52. .config {
  53. margin-right: 240px;
  54. }
  55. .bottom-row3 {
  56. margin: 10px 0;
  57. }
  58. .title {
  59. text-align: center;
  60. font-size: 24px;
  61. }
  62. .number {
  63. text-align: right;
  64. margin-bottom: 10px;
  65. }
  66. .number1 {
  67. text-align: right;
  68. margin-bottom: 10px;
  69. margin-top: 60px;
  70. }
  71. .small-row {
  72. display: flex;
  73. }
  74. .small-content {
  75. width: 400px;
  76. margin: 0 auto;
  77. border: 1px solid #ccc;
  78. padding: 20px 20px 160px 20px;
  79. position: absolute;
  80. top: 0;
  81. bottom: 0;
  82. left: 0;
  83. right: 0;
  84. margin: auto;
  85. height: 650px;
  86. }
  87. .small-title {
  88. text-align: center;
  89. font-size: 18px;
  90. display: flex;
  91. justify-content: space-between;
  92. align-items: center;
  93. }
  94. .small-row {
  95. display: flex;
  96. justify-content: space-between;
  97. margin: 10px;
  98. }
  99. .small-img {
  100. margin-right: 0;
  101. }
  102. .sign {
  103. margin-right: 100px;
  104. }
  105. .header {
  106. display: flex;
  107. justify-content: space-between;
  108. font-size: 16px;
  109. margin: 10px 0;
  110. }
  111. .header1 {
  112. font-size: 24px;
  113. /* margin: 30px 60px 10px 60px; */
  114. display: flex;
  115. justify-content: center;
  116. }
  117. .line {
  118. height: 2px;
  119. width: 410px;
  120. margin: 3px auto;
  121. background: black;
  122. }
  123. .line:nth-of-type(3) {
  124. margin-bottom: 30px;
  125. }
  126. .header-top {
  127. display: flex;
  128. justify-content: space-between;
  129. }
  130. .sfcard {}
  131. .sfcard-content {
  132. /* display: flex;
  133. align-items: center;
  134. justify-content: space-evenly; */
  135. }
  136. .sfcard-content img {
  137. width: 100%;
  138. height: 130vh;
  139. }
  140. .sfcard-title {
  141. font-size: 28px;
  142. text-align: center;
  143. }
  144. .center {
  145. height: 140vh;
  146. }
  147. .part2 {
  148. height: 140vh;
  149. /* background: red; */
  150. }
  151. .part5 {
  152. width: 100%
  153. }
  154. .paymentScreenshot {
  155. width: 100%;
  156. height: 130vh
  157. }
  158. /* .onlypz-center{
  159. height: 130vh;
  160. } */
  161. </style>
  162. </head>
  163. <body>
  164. <div id="app">
  165. <div v-for="(item,index) in customerList1" :key="index">
  166. <div class="content">
  167. <div class="sfcard part3" v-if="isShowPrintType1">
  168. <div class="sfcard-content">
  169. <div class="sfcard-title">
  170. {{ item.customerName}}{{
  171. item.customerNumberCard}}
  172. </div>
  173. <img :src="item.imgURl.imageUrl1" class="avatar" />
  174. </div>
  175. <div class="sfcard-content">
  176. <div class="sfcard-title">
  177. {{ item.customerName}}{{
  178. item.customerNumberCard}}
  179. </div>
  180. <img :src="item.imgURl.imageUrl2" class="avatar" />
  181. </div>
  182. </div>
  183. <div class="bankcard part4" v-if="isShowPrintType2">
  184. <div class="sfcard-content">
  185. <div class="sfcard-title">
  186. {{item.customerName}}:{{item.bankDeposit}}{{item.bankCard}}
  187. </div>
  188. <img :src="item.imgURl.imageUrl3" class="avatar" />
  189. </div>
  190. <div class="sfcard-content">
  191. <div class="sfcard-title">
  192. {{item.customerName}}:{{item.bankDeposit}}{{item.bankCard}}
  193. </div>
  194. <img :src="item.imgURl.imageUrl4" class="avatar" />
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </body>
  201. <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
  202. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  203. <script type="text/javascript">
  204. new Vue({
  205. el: '#app',
  206. data: {
  207. isShowPrintType1: false,
  208. isShowPrintType2: false,
  209. isShowPrintType3: false,
  210. isShowPrintType4: false,
  211. isShowPrintType5: false,
  212. showType: [],
  213. printData: {},
  214. printData1: [],
  215. customerList: {},
  216. customerList1: [],
  217. name: '',
  218. bigContent: false,
  219. smallContent: false,
  220. date: '',
  221. imageUrl1: '',
  222. imageUrl2: '',
  223. imageUrl3: '',
  224. imageUrl4: '',
  225. identity: [],
  226. bank: [],
  227. selectPrint: false,
  228. onlyShowPz: false,
  229. tableData: []
  230. },
  231. computed: {},
  232. methods: {
  233. dealNo(str) {
  234. return str.slice(4)
  235. },
  236. tableRowClassName({
  237. row,
  238. rowIndex
  239. }) {
  240. if (rowIndex === 1) {
  241. return 'warning-row'
  242. } else if (rowIndex === 3) {
  243. return 'success-row'
  244. }
  245. return ''
  246. },
  247. getQueryVariable(variable) {
  248. var query = window.location.search.substring(1)
  249. var vars = query.split('&')
  250. for (var i = 0; i < vars.length; i++) {
  251. var pair = vars[i].split('=')
  252. if (pair[0] == variable) {
  253. return pair[1]
  254. }
  255. }
  256. return false
  257. },
  258. printSmall() {},
  259. printBig() {}
  260. },
  261. mounted() {
  262. this.date = new Date().toLocaleString()
  263. this.showType = decodeURIComponent(this.getQueryVariable('printTypeList'))
  264. this.customerList1 = JSON.parse(
  265. localStorage.getItem('collectionContractCustomerList_printList')
  266. )
  267. for (let i = 0; i < this.customerList1.length; i++) {
  268. let _url1 = this.customerList1[i].cardAddressUrl.split(',')
  269. let _url2 = this.customerList1[i].payeeAddressUrl.split(',')
  270. this.customerList1[i].imgURl = {
  271. imageUrl1: _url1[0],
  272. imageUrl2: _url1[1],
  273. imageUrl3: _url2[0],
  274. imageUrl4: _url2[0]
  275. }
  276. }
  277. let _lsit = this.showType.split(',')
  278. for (let i = 0; i < _lsit.length; i++) {
  279. switch (_lsit[i]) {
  280. case '打印身份证(正反面)':
  281. this.isShowPrintType1 = !this.isShowPrintType1
  282. break
  283. case '打印银行卡(正反面)':
  284. this.isShowPrintType2 = !this.isShowPrintType2
  285. break
  286. }
  287. }
  288. this.bigContent = true
  289. this.smallContent = false
  290. // if (this.printData.compName == undefined) this.printData.compName = ''
  291. // document.title = this.printData.compName + '结算凭证'
  292. window.print()
  293. window.onafterprint = function(event) {
  294. window.history.back(-1)
  295. }
  296. },
  297. watch: {}
  298. })
  299. </script>
  300. </html>