attorneytext.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <div class="tableAllDate">
  3. <page-title>返回</page-title>
  4. <div id="pdfDom">
  5. <div class="blank">
  6. </div>
  7. <!-- 循环遍历传过来的数组中的所有的对象,生成多张提货委托书 -->
  8. <div >
  9. <div class="title">
  10. <i class="titleText" align="center">委托书</i>
  11. </div>
  12. <div>
  13. <!-- tablePart0 -->
  14. <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;font-size:20px;" width="1000px" class="tablePart0">
  15. <tr>
  16. <td style="width :100%">江苏{{attorneyMap.carrierName}}港口集团股份有限公司:</td>
  17. </tr>
  18. </table>
  19. </div>
  20. <div class="tableBody">
  21. <!-- tablePart1 -->
  22. <table border="0" cellpadding="10" cellspacing="0" style="margin-top: 5px;" width="1000px" class="tablePart1">
  23. <tr>
  24. <td style="width :100%" padding-right="20px">兹委任重庆市万州区万港船务有限公司
  25. 前来贵港办理我公司的货权提货和水路运输事宜,品种:{{attorneyMap.materialName}};外轮船名:{{attorneyMap.resultForeignShipName}};
  26. 数量:{{attorneyMap.purchaseOrderMaterialNum}}
  27. 湿吨(如遇最后一批提货,须清场);物流流向:万州港。望贵公司予以支持为盼。
  28. </td>
  29. </tr>
  30. </table>
  31. <!-- tablePart2 -->
  32. <table border="0" cellpadding="10" cellspacing="0" style="
  33. border-top: 0px" width="1000px" class="tablePart2">
  34. <tr>
  35. <th style="width :16.5%">提货联系人:</th>
  36. <td style="width :10.5%">{{attorneyMap.attorneyPickupContactPerson}}</td>
  37. <th style="width :14%">身份证号:</th>
  38. <td style="width :59%">{{attorneyMap.attorneyPickupIdcard}}</td>
  39. </tr>
  40. </table>
  41. <!-- tablePart3 -->
  42. <table border="0" cellpadding="10" cellspacing="0" style="
  43. border-top: 0px" width="1000px" class="tablePart3">
  44. <tr>
  45. <th style="width :16.5%">联系电话:</th>
  46. <td style="width :83.5%">{{attorneyMap.attorneyContactTelephone}}</td>
  47. </tr>
  48. </table>
  49. <!-- tablePart4 -->
  50. <table border="1" cellpadding="10" cellspacing="0" style="
  51. border-top: 0px" width="1000px" class="tablePart4">
  52. <tr>
  53. <th style="width :10.5%">顺颂商祺!</th>
  54. </tr>
  55. </table>
  56. <!-- tablePart5 -->
  57. <table border="1" cellpadding="10" cellspacing="0" style="
  58. border-top: 0px" width="1000px" class="tablePart5">
  59. <tr>
  60. <th style="width :10.5%">(传真件/扫描件有效)</th>
  61. </tr>
  62. </table>
  63. </div>
  64. <div>
  65. <!-- tablePart6 -->
  66. <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;margin-top: 5px;font-size:20px;" width="1000px" class="tablePart6">
  67. <tr>
  68. <td style="width :48.5%">{{attorneyMap.shipperName}}</td>
  69. </tr>
  70. </table>
  71. </div>
  72. <div>
  73. <!-- tablePart7 -->
  74. <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;margin-top: 5px;font-size:20px;" width="1000px" class="tablePart7">
  75. <tr>
  76. <td style="width :63%"></td>
  77. <td style="width :5%">{{year}}</td>
  78. <th style="width :8%">年</th>
  79. <td style="width :3%">{{month}}</td>
  80. <th style="width :8%">月</th>
  81. <td style="width :3%">{{date}}</td>
  82. <th style="width :5%">日</th>
  83. </tr>
  84. </table>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="buttns">
  89. <el-button class="buttn" type="primary" @click="getPdf()">
  90. <i class="el-icon-download">{{"\xa0\xa0"}}</i>导出(pdf)
  91. </el-button>
  92. <el-button class="buttn" type="primary" v-print="'#pdfDom'" @click="backScan()">
  93. <i class="el-icon-printer">{{"\xa0\xa0"}}</i>打印
  94. </el-button>
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. import table from '@/components/DilCommonUI/packages/table/src/table.vue';
  100. import PageTitle from "@/components/Page/Title";
  101. export default {
  102. components: { table },
  103. components: { PageTitle },
  104. name: "Login",
  105. data() {
  106. return {
  107. amsShipDeliveryNameLists:[],
  108. attorneyMap:{
  109. carrierName:"",
  110. materialName: "",
  111. resultForeignShipName: "",
  112. purchaseOrderMaterialNumber:"",
  113. attorneyPickupContactPerson:"",
  114. attorneyPickupIdcard:"",
  115. attorneyContactTelephone:"",
  116. shipperName:"",
  117. attorneyTime:"",
  118. year:"",
  119. month:"",
  120. date:"",
  121. },
  122. htmlTitle: '委托书'
  123. };
  124. },
  125. created(){
  126. this.getwts();
  127. },
  128. methods: {
  129. backScan(){
  130. this.$router.go(-2);
  131. },
  132. getwts(){
  133. // console.log(this.$route.params.test)
  134. this.amsShipDeliveryNameLists=JSON.parse(this.$route.params.test).amsShipDeliveryNameList
  135. // this.amsShipDeliveryNameLists = this.$route.params.test;
  136. console.log(this.amsShipDeliveryNameLists)
  137. for(let i =0;i<this.amsShipDeliveryNameLists.length;i++){
  138. this.attorneyMap = this.amsShipDeliveryNameLists[i];
  139. this.year=this.attorneyMap.attorneyTime.split('-')[0]
  140. this.month=this.attorneyMap.attorneyTime.split('-')[1]
  141. this.date=this.attorneyMap.attorneyTime.split('-')[2].split(" ")[0]
  142. }
  143. }
  144. },
  145. };
  146. </script>
  147. <style lang="scss" scoped>
  148. .title{
  149. text-align: center;
  150. margin-bottom: 30px;
  151. .titleText{
  152. font-size: 30px;
  153. }
  154. }
  155. .buttns{
  156. display: flex;
  157. flex-wrap: nowrap;
  158. margin-top: 20px;
  159. margin-left: 900px;
  160. .buttn{
  161. margin-left: 10px;
  162. width: 130px;
  163. }
  164. }
  165. .tableBody{
  166. table, th, td
  167. {
  168. border: 0px solid black;
  169. font-size:20px;
  170. margin: auto;
  171. }
  172. .tablePart1 th{
  173. border-top: 1px solid black;
  174. }
  175. .tablePart2 td,th{
  176. border-top: 0px
  177. }
  178. .tablePart3 td,th{
  179. border-top: 0px
  180. }
  181. .tablePart4 td,th{
  182. border-top: 0px
  183. }
  184. .tablePart5 td,th{
  185. border-top: 0px
  186. }
  187. }
  188. .blank{
  189. width: 100%;
  190. height: 50px;
  191. }
  192. </style>