details.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <!--
  2. * @Description: 详情弹框
  3. * @Author: Sugar.
  4. * @Date: 2023-11-24 13:55:00
  5. * @LastEditors: gcz
  6. * @LastEditTime: 2024-03-18 11:01:58
  7. * @FilePath: \great_webui\src\views\finance\InvoiceRecords\dialog\details.vue
  8. * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
  9. -->
  10. <template>
  11. <el-dialog
  12. title="开票详情"
  13. :visible.sync="open"
  14. width="70vw"
  15. append-to-body
  16. :close-on-click-modal="false"
  17. @close="cancel"
  18. >
  19. <div class="dialog" v-if="form">
  20. <div>
  21. <el-row>
  22. <el-col :span="24">
  23. <div class="grid-content bg-purple item-class">订单号: <span>{{ form.orderId }}</span></div>
  24. </el-col>
  25. <el-col :span="24">
  26. <div style="display: flex;" class="grid-content bg-purple item-class">状态: <span style="margin-left: 10px;"><dict-tag :options="dict.type.Invoicing_type" :value="form.status"/></span></div>
  27. </el-col>
  28. <el-col :span="24">
  29. <div class="grid-content bg-purple item-class">申请时间: <span>{{ form.createTime }}</span></div>
  30. </el-col>
  31. <el-col :span="24">
  32. <div style="display: flex;" class="grid-content bg-purple item-class">开票类型: <span style="margin-left: 10px;"><dict-tag :options="dict.type.lookup_type" :value="form.handlerType"/></span></div>
  33. </el-col>
  34. <el-col :span="24">
  35. <div class="grid-content bg-purple item-class">申请类型: <span v-if="form.invoiceLine == 'bs'">数电专票</span><span v-else-if="form.invoiceLine == 'pc'">数电普票</span></div>
  36. </el-col>
  37. <el-col :span="24">
  38. <div class="grid-content bg-purple item-class">纳税人识别号: <span>¥{{ form.creditCode || '-' }}</span></div>
  39. </el-col>
  40. <el-col :span="24">
  41. <div class="grid-content bg-purple item-class">联系电话: <span>{{ form.mobile }}</span></div>
  42. </el-col>
  43. <el-col :span="24">
  44. <div class="grid-content bg-purple item-class">邮箱: <span>{{ form.email }}</span></div>
  45. </el-col>
  46. <!-- <el-col :span="24">
  47. <div class="grid-content bg-purple item-class">业务员: <span>{{ '' }}</span></div>
  48. </el-col> -->
  49. <el-col :span="24">
  50. <div class="grid-content bg-purple item-class">开票金额: <span>{{ form.invoiceAmount }}</span></div>
  51. </el-col>
  52. <el-col :span="24" v-if="form.status == 3">
  53. <div class="grid-content bg-purple item-class">失败原因: <span style="color: red;">{{ form.errReason }}</span></div>
  54. </el-col>
  55. <el-col :span="24">
  56. <div style="display: flex;" class="grid-content bg-purple item-class">
  57. <span style="white-space: nowrap;">附件: </span>
  58. <div style="color: #409eff;display: flex;flex-direction: column;margin-left: 10px;">
  59. <!-- <el-image
  60. v-if="form.imageUrl"
  61. style="width: 100px; height: 100px"
  62. :src="form.imageUrl"
  63. :preview-src-list="[form.imageUrl]">
  64. </el-image> -->
  65. <span v-if="form.pdfUrl"><i class="el-icon-folder-opened"></i> {{ form.pdfUrl }} <span style="margin-left: 10px;cursor: pointer;color: #67c23a;" @click="openPDF(form.pdfUrl)">参看详情</span></span>
  66. </div>
  67. </div>
  68. </el-col>
  69. </el-row>
  70. </div>
  71. <div>
  72. <iframe width="90%" :src="form.pdfUrl" frameborder="0"></iframe>
  73. </div>
  74. </div>
  75. <span slot="footer" class="dialog-footer" >
  76. <el-button
  77. @click="cancel"
  78. v-loading.fullscreen.lock="loading"
  79. element-loading-text="提交中..."
  80. element-loading-spinner="el-icon-loading"
  81. element-loading-background="rgba(0, 0, 0, 0.8)"
  82. >
  83. <span>关闭</span>
  84. </el-button>
  85. </span>
  86. </el-dialog>
  87. </template>
  88. <script>
  89. import { getInvoiceDetail } from '@/api/financeMr/InvoiceRecords'
  90. export default {
  91. name: "detailsDia",
  92. dicts: ['Invoicing_type','lookup_type'],
  93. data() {
  94. return {
  95. title: "编辑",
  96. model: "EDIT",
  97. open: false,
  98. loading: false,
  99. form: {
  100. id: undefined,
  101. },
  102. performerVisible: false,
  103. performerList: [],
  104. refund: false,
  105. };
  106. },
  107. methods: {
  108. /**
  109. * 打开弹框
  110. * @date 2023-11-22
  111. * @param {any} obj
  112. * @returns {any}
  113. */
  114. openDialog(title, obj, type) {
  115. this.open = true;
  116. this.getInvoiceDetailApi(obj);
  117. },
  118. /** 获取详情 */
  119. getInvoiceDetailApi(row) {
  120. // const id = row.orderId
  121. getInvoiceDetail({
  122. // orderId: row.orderId
  123. id: row.id
  124. }).then(response => {
  125. this.form = response.data;
  126. });
  127. },
  128. /**
  129. * 关闭弹框
  130. * @date 2023-11-22
  131. * @returns {any}
  132. */
  133. cancel() {
  134. this.open = false;
  135. },
  136. openPDF(url) {
  137. window.open(url)
  138. }
  139. },
  140. };
  141. </script>
  142. <style lang="scss" scoped>
  143. .dialog {
  144. padding: 0 30px;
  145. height: 60vh;
  146. overflow-y: auto;
  147. }
  148. .dialog {
  149. padding: 0 30px;
  150. width: 100%;
  151. box-sizing: border-box;
  152. display: flex;
  153. >div:first-child {
  154. width: 400px;
  155. padding-right: 20px;
  156. box-sizing: border-box;
  157. }
  158. >div:last-child {
  159. width: calc( 100% - 400px );
  160. iframe {
  161. width: 100%;
  162. height: 100%;
  163. }
  164. }
  165. .upload-btn {
  166. width: 100px;
  167. height: 100px;
  168. background-color: #fbfdff;
  169. border: dashed 1px #c0ccda;
  170. border-radius: 5px;
  171. i {
  172. font-size: 30px;
  173. margin-top: 20px;
  174. }
  175. &-text {
  176. margin-top: -10px;
  177. }
  178. }
  179. .avatar {
  180. cursor: pointer;
  181. }
  182. .title-class{
  183. font-size: 16px;
  184. font-weight: bold;
  185. color: black;
  186. margin-bottom: 20px;
  187. margin-top: 20px;
  188. }
  189. .item-class{
  190. margin-bottom: 20px;
  191. }
  192. }
  193. </style>