invoiceDetails.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view>
  3. <u-navbar title="发票详情" title-color="#101010" ></u-navbar>
  4. <view class="background">
  5. <view class="recharge-details">
  6. <view class="headline">
  7. 发票金额(元)
  8. </view>
  9. <view class="sum">
  10. {{detail.amount}}
  11. </view>
  12. <view class="state">
  13. 开票中
  14. </view>
  15. <view class="details">
  16. <view class="item">
  17. <view class="item-title">
  18. 抬头类型
  19. </view>
  20. <view class="item-value">
  21. {{detail.headerType=='1'?'企业单位':''}}{{detail.headerType=='2'?'个人/非企业单位':''}}
  22. </view>
  23. </view>
  24. <view class="item" v-if="detail.headerType=='1'">
  25. <view class="item-title">
  26. 发票类型
  27. </view>
  28. <view class="item-value">
  29. {{detail.type=='1'?'增值税专票':''}}{{detail.type=='2'?'增值税普票':''}}
  30. </view>
  31. </view>
  32. <view class="item">
  33. <view class="item-title">
  34. 发票抬头
  35. </view>
  36. <view class="item-value">
  37. {{detail.title}}
  38. </view>
  39. </view>
  40. <view class="item" v-if="detail.companyTaxNo" >
  41. <view class="item-title">
  42. 公司税号
  43. </view>
  44. <view class="item-value">
  45. {{detail.companyTaxNo}}
  46. </view>
  47. </view>
  48. <view class="item" v-if="detail.companyTelephone">
  49. <view class="item-title">
  50. 手机号码
  51. </view>
  52. <view class="item-value">
  53. {{detail.companyTelephone}}
  54. </view>
  55. </view>
  56. <view class="item" v-if="detail.idCard">
  57. <view class="item-title">
  58. 身份证号
  59. </view>
  60. <view class="item-value">
  61. {{detail.idCard}}
  62. </view>
  63. </view>
  64. </view>
  65. <view class="details">
  66. <view class="item" v-if="false" >
  67. <view class="item-title">
  68. 申请单号
  69. </view>
  70. <view class="item-value">
  71. T20230816112557708460925
  72. </view>
  73. </view>
  74. <view class="item">
  75. <view class="item-title">
  76. 申请时间
  77. </view>
  78. <view class="item-value">
  79. {{detail.createTime}}
  80. </view>
  81. </view>
  82. <view class="item" v-if="false" >
  83. <view class="item-title">
  84. 开票时间
  85. </view>
  86. <view class="item-value">
  87. 2023-08-20 10:29:00
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 查看 -->
  93. <button class="check" v-if="detail.image">查看电子发票</button>
  94. <!-- 返回 -->
  95. <button class="back" @click="goBack" >返回</button>
  96. </view>
  97. </view>
  98. </template>
  99. <script>
  100. import * as API from '@/apis/pagejs/invoiceApi.js'
  101. export default {
  102. data() {
  103. return {
  104. id:'',
  105. detail:{}
  106. }
  107. },
  108. onLoad(op){
  109. this.id=op.id;
  110. this.getInvoiceDetail()
  111. },
  112. methods: {
  113. goBack(){
  114. uni.navigateBack()
  115. },
  116. getInvoiceDetail(){
  117. uni.showLoading({
  118. mask:true,title:'加载中...'
  119. })
  120. API.invoiceDetail({
  121. id:this.id
  122. }).then((response) => {
  123. uni.hideLoading();
  124. this.detail=response.data.invoiceInfo
  125. }).catch(error => {
  126. uni.hideLoading();
  127. uni.showToast({
  128. icon: "none",
  129. title: error
  130. })
  131. })
  132. }
  133. }
  134. }
  135. </script>
  136. <style lang="scss" scoped>
  137. .background{
  138. height: 400rpx;
  139. padding: 24rpx 32rpx;
  140. background: linear-gradient(180deg, rgba(203,234,255,1) 0%,rgba(203,234,255,0) 100%);
  141. .recharge-details{
  142. background-color: #fff;
  143. border-radius: 8px;
  144. padding: 40rpx 32rpx;
  145. text-align: center;
  146. .headline{
  147. color: rgb(16,16,16);
  148. font-size: 36rpx;
  149. }
  150. .sum{
  151. color: rgb(16,16,16);
  152. font-size: 48rpx;
  153. margin-top: 32rpx;
  154. }
  155. .state{
  156. color: rgba(255,123,0,1);
  157. margin-top: 8rpx;
  158. }
  159. .details{
  160. margin-top: 40rpx;
  161. padding-top: 40rpx;
  162. border-top: 1px solid rgba(241,241,241,1);
  163. .item{
  164. display: flex;
  165. align-items: center;
  166. justify-content: space-between;
  167. margin-bottom:16rpx;
  168. .item-title{
  169. color: rgb(119,119,119);
  170. }
  171. .item-value{
  172. color: rgb(48,48,48);
  173. }
  174. }
  175. }
  176. }
  177. }
  178. // 返回
  179. .back{
  180. border: 1px solid rgba(205,205,205,1);
  181. line-height: 88rpx;
  182. border-radius: 8px;
  183. background-color: rgba(255,255,255,1);
  184. color: rgba(119,119,119,1);
  185. font-size: 32rpx;
  186. margin-top: 24rpx;
  187. }
  188. // 查看
  189. .check{
  190. line-height: 88rpx;
  191. border-radius: 8px;
  192. background-color: rgba(22,119,255,1);
  193. color: rgba(255,255,255,1);
  194. font-size: 32rpx;
  195. margin-top: 24rpx;
  196. }
  197. </style>