applyBilling.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view>
  3. <u-navbar title="申请开票" title-color="#101010" ></u-navbar>
  4. <view class="success-icon">
  5. <image class="img" src="@/assets/img/md-check_circle vRxbRvD.svg" mode=""></image>
  6. </view>
  7. <view class="success-text">
  8. 申请成功
  9. </view>
  10. <!-- 支付详情 -->
  11. <view class="payment-infos">
  12. <view class="item">
  13. <view class="item-title">
  14. 承租方
  15. </view>
  16. <view class="item-value">
  17. {{detail.tenantName}}
  18. </view>
  19. </view>
  20. <view class="item" >
  21. <view class="item-title">
  22. 抬头类型
  23. </view>
  24. <view class="item-value">
  25. {{detail.headerType=='1'?'企业单位':''}}{{detail.headerType=='2'?'个人/非企业单位':''}}
  26. </view>
  27. </view>
  28. <view class="item" v-if="detail.headerType=='1'" >
  29. <view class="item-title">
  30. 发票类型
  31. </view>
  32. <view class="item-value">
  33. {{detail.type=='1'?'增值税专票':''}}{{detail.type=='2'?'增值税普票':''}}
  34. </view>
  35. </view>
  36. <view class="item">
  37. <view class="item-title">
  38. 发票抬头
  39. </view>
  40. <view class="item-value">
  41. {{detail.title}}
  42. </view>
  43. </view>
  44. <view class="item">
  45. <view class="item-title">
  46. 发票金额
  47. </view>
  48. <view class="item-value">
  49. {{detail.amount}}元
  50. </view>
  51. </view>
  52. <view class="item">
  53. <view class="item-title">
  54. 申请时间
  55. </view>
  56. <view class="item-value">
  57. {{detail.createTime}}
  58. </view>
  59. </view>
  60. <view v-if="extraInfo" >
  61. <view class="item-title" style=" text-align: start; color: #777777;">
  62. 开票明细
  63. </view>
  64. <table class="table1" v-for="(item,i) in extraInfo">
  65. <template >
  66. <tr :key="i" >
  67. <td colspan="2" class="tr2" >{{i}}</td>
  68. </tr>
  69. <tr v-for="(it,j) in item" :key="i+'_'+j" v-if="!(['yearMonth','tenantContractId','name','totalAmount'].indexOf(j)>=0)&&it!=0" >
  70. <td class="tr2" >{{j}}</td>
  71. <td>{{it}}</td>
  72. </tr>
  73. <tr v-for="(it,j) in item" :key="i+'_'+j" v-if="'totalAmount'==j" >
  74. <td class="tr2" >合计</td>
  75. <td>{{it}}</td>
  76. </tr>
  77. </template>
  78. </table>
  79. </view>
  80. </view>
  81. <!-- 按钮 -->
  82. <view class="btns" v-if="false">
  83. <button class="btn1">完成</button>
  84. <button class="btn2" >查看发票详情</button>
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. import * as API from '@/apis/pagejs/invoiceApi.js'
  90. export default {
  91. data() {
  92. return {
  93. id:'',
  94. detail:{},
  95. extraInfo:null
  96. }
  97. },
  98. onLoad(op){
  99. this.id=op.id;
  100. this.getInvoiceDetail()
  101. },
  102. methods: {
  103. gotoInfo2(){
  104. uni.navigateBack()
  105. },
  106. gotoInfo(){
  107. uni.redirectTo({
  108. url:"/pages/invoiceManagement/invoiceDetails?id="+this.id
  109. })
  110. },
  111. getInvoiceDetail(){
  112. uni.showLoading({
  113. mask:true,title:'加载中...'
  114. })
  115. API.invoiceDetail({
  116. id:this.id
  117. }).then((response) => {
  118. uni.hideLoading();
  119. this.detail=response.data.invoiceInfo
  120. if(this.detail.extraInfo){
  121. this.extraInfo=JSON.parse(this.detail.extraInfo)
  122. }
  123. }).catch(error => {
  124. uni.hideLoading();
  125. uni.showToast({
  126. icon: "none",
  127. title: error
  128. })
  129. })
  130. }
  131. }
  132. }
  133. </script>
  134. <style lang="scss" scoped>
  135. page{
  136. background-color: #fff;
  137. }
  138. .success-icon{
  139. width: 132rpx;
  140. height: 132rpx;
  141. margin: 48rpx auto;
  142. .img{
  143. width: 100%;
  144. height: 100%;
  145. }
  146. }
  147. .success-text{
  148. color: rgba(51,51,51,1);
  149. font-size: 48rpx;
  150. text-align: center;
  151. }
  152. // 支付详情
  153. .payment-infos{
  154. margin-top: 64rpx;
  155. padding: 0 80rpx;
  156. .item{
  157. display: flex;
  158. justify-content: space-between;
  159. margin-bottom: 24rpx;
  160. .item-title{
  161. color: rgb(119,119,119);
  162. }
  163. .item-value{
  164. color: rgb(51,51,51);
  165. }
  166. }
  167. }
  168. // 按钮
  169. .btns{
  170. display: flex;
  171. padding: 0 80rpx;
  172. margin-top: 80rpx;
  173. .btn1{
  174. width: 280rpx;
  175. height: 80rpx;
  176. background-color: rgba(255,255,255,1);
  177. color: rgba(51,51,51,1);
  178. font-size: 32rpx;
  179. border-radius: 50px;
  180. border: 1px solid rgba(223,223,223,1);
  181. }
  182. .btn2{
  183. width: 280rpx;
  184. height: 80rpx;
  185. border-radius: 50px;
  186. background-color: rgba(22,119,255,1);
  187. color: rgba(255,255,255,1);
  188. font-size: 32rpx;
  189. border: 0px solid rgba(187,187,187,1);
  190. }
  191. }
  192. .table1{
  193. margin: 16rpx 0;
  194. width: 100%;
  195. border-collapse: collapse;
  196. td{
  197. border: 1px solid #e7e7e7;
  198. text-align: end;
  199. padding: 16rpx 16rpx;
  200. }
  201. .td1{
  202. text-align: start;
  203. min-width: 20%;
  204. max-width: 30%;
  205. }
  206. .td3{
  207. white-space: pre;
  208. }
  209. tr{
  210. background-color:#f5f5f6
  211. }
  212. .tr1{
  213. text-align: end;
  214. font-weight: bold;
  215. }
  216. .tr2{
  217. text-align: start;
  218. }
  219. tr:nth-child(even) {
  220. background-color: #fff;
  221. }
  222. }
  223. </style>