printReceipt.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <div class="tableAllDate">
  3. <div id="pdfDom">
  4. <div class="blank">
  5. </div>
  6. <div class="title">
  7. <h1 align="center">{{consigeeName}}</h1>
  8. <h1 align="center">物资签收单</h1>
  9. </div>
  10. <div>
  11. <!-- tablePart0 -->
  12. <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;font-size:20px;" width="1000px" class="tablePart0">
  13. <tr>
  14. <th style="width :14.5%">销售订单号:</th>
  15. <td style="width :85.5%">{{saleNo}}</td>
  16. </tr>
  17. </table>
  18. </div>
  19. <div class="tableBody">
  20. <!-- tablePart1 -->
  21. <table border="1" cellpadding="10" cellspacing="0" style="margin-top: 10px;" width="1000px" class="tablePart1">
  22. <tr>
  23. <th style="width :5%">序号</th>
  24. <th style="width :21.5%">物资名称</th>
  25. <th style="width :21.5%">规格型号</th>
  26. <th style="width :5%">单位</th>
  27. <th style="width :14%">件数</th>
  28. <th style="width :14%">理论重量</th>
  29. <th style="width :19%">计量重量</th>
  30. </tr>
  31. <tr v-for="(item,index) in deliveryOrderMaterialList" :key="index">
  32. <td>{{index+1}}</td>
  33. <td>{{item.materialName}}</td>
  34. <td>{{item.materialSpe}}{{item.materialModel}}</td>
  35. <td>{{item.measureName}}</td>
  36. <td>{{item.materialNumber}}</td>
  37. <td>{{item.materialWeight}}</td>
  38. <td>{{item.resultWeight}}</td>
  39. </tr>
  40. </table>
  41. <!-- tablePart2 -->
  42. <table border="1" cellpadding="10" cellspacing="0" style="border-top: 0px" width="1000px" class="tablePart2">
  43. <tr>
  44. <th style="width :14%">发货时间</th>
  45. <td style="width :22%">{{sendDate}}</td>
  46. <th style="width :14%">收货地点</th>
  47. <td style="width :50%">{{province}}{{district}}{{town}}{{deliveryAddress}}</td>
  48. </tr>
  49. </table>
  50. <!-- tablePart3 -->
  51. <table border="1" cellpadding="10" cellspacing="0" style="border-top: 0px" width="1000px" class="tablePart3">
  52. <tr>
  53. <th style="width :10.5%">收货人</th>
  54. <td style="width :20%">{{consignee}}</td>
  55. <th style="width :10.5%">电话</th>
  56. <td style="width :26%">{{consigneeTel}}</td>
  57. <th style="width :14%">收货日期</th>
  58. <td style="width :19%">{{receiptDate}}</td>
  59. </tr>
  60. </table>
  61. <!-- tablePart4 -->
  62. <table border="1" cellpadding="10" cellspacing="0" style="border-top: 0px" width="1000px" class="tablePart4">
  63. <tr>
  64. <th style="width :10.5%">承运商</th>
  65. <td style="width :36.5%">{{carrierName}}</td>
  66. <th style="width :13%">车牌号</th>
  67. <td style="width :40%">{{capacityNumber}}</td>
  68. </tr>
  69. </table>
  70. </div>
  71. <div>
  72. <!-- tablePart6 -->
  73. <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;font-size:20px;margin-top: 10px;" width="1000px" class="tablePart6">
  74. <tr>
  75. <th style="width :14.5%">发货单位:</th>
  76. <td style="width :48.5%">{{shippername}}</td>
  77. <th style="width :15.5%">日期:</th>
  78. <td style="width :5%">{{year}}</td>
  79. <th style="width :8%">年</th>
  80. <td style="width :3%">{{month}}</td>
  81. <th style="width :8%">月</th>
  82. <td style="width :3%">{{date}}</td>
  83. <th style="width :5%">日</th>
  84. </tr>
  85. </table>
  86. </div>
  87. </div>
  88. <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
  89. <i class="el-icon-download"></i>导出(pdf)
  90. </el-button>
  91. <el-button style="margin-left: 45%;margin-top: 0.2%;" type="primary" v-print="'#pdfDom'" @click="backScan()">
  92. <i class="el-icon-printer"></i>打印
  93. </el-button>
  94. </div>
  95. </template>
  96. <script>
  97. import table from '@/components/DilCommonUI/packages/table/src/table.vue';
  98. export default {
  99. components: { table },
  100. name: "Login",
  101. data() {
  102. return {
  103. orderNumber: "",
  104. consignee: "",
  105. town: "",
  106. consigneeTel: "",
  107. sendDate: "",
  108. receiptDate: "",
  109. consigeeName: "",
  110. saleNo: "",
  111. deliveryOrderMaterialList: [
  112. {
  113. materialName: "",
  114. materialSpe: "",
  115. materialModel: "",
  116. materialNumber: 0,
  117. materialWeight: 0,
  118. measureName:"",
  119. resultWeight:""
  120. }
  121. ],
  122. carrierName: "",
  123. province: "",
  124. deliveryAddress: "",
  125. district: "",
  126. capacityNumber: "",
  127. shippername: "",
  128. year: new Date().getFullYear(),
  129. month: new Date().getMonth()+1,
  130. date: new Date().getDate(),
  131. htmlTitle: '客户换票签收单'
  132. };
  133. },
  134. created(){
  135. this.getDeliveryOrder();
  136. },
  137. methods: {
  138. getDeliveryOrder(){
  139. let orderNumber = this.$route.query.orderNumber;
  140. this.axios.post("/api/v1/tms/getDeliveryOrder?orderNumber="+orderNumber).then((res) => {
  141. this.orderNumber = res.data.orderNumber;
  142. this.carrierName = res.data.carrierName;
  143. this.capacityNumber = res.data.capacityNumber;
  144. this.consigeeName = res.data.consigeeName;
  145. this.consignee = res.data.consignee;
  146. this.consigneeTel = res.data.consigneeTel;
  147. this.sendDate = res.data.sendDate;
  148. this.receiptDate = res.data.receiptDate.slice(0,10);
  149. this.saleNo = res.data.saleNo;
  150. this.shippername = res.data.shippername;
  151. this.province = res.data.province;
  152. this.district = res.data.district;
  153. this.town = res.data.town;
  154. this.deliveryAddress = res.data.deliveryAddress;
  155. this.deliveryOrderMaterialList = res.data.deliveryOrderMaterialList;
  156. });
  157. },
  158. backScan(){
  159. this.$router.go(-2);
  160. }
  161. },
  162. };
  163. </script>
  164. <style lang="scss" scoped>
  165. .title{
  166. font-size:25px;
  167. }
  168. .tableBody{
  169. table, th, td
  170. {
  171. border: 1px solid black;
  172. font-size:20px;
  173. margin: auto;
  174. }
  175. .tablePart1 th{
  176. border-top: 1px solid black;
  177. }
  178. .tablePart2 td,th{
  179. border-top: 0px
  180. }
  181. .tablePart3 td,th{
  182. border-top: 0px
  183. }
  184. .tablePart4 td,th{
  185. border-top: 0px
  186. }
  187. }
  188. .blank{
  189. width: 100%;
  190. height: 50px;
  191. }
  192. </style>