InvoiceTitleManagement.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view>
  3. <u-navbar title="发票抬头管理" title-color="#101010" ></u-navbar>
  4. <!-- 企业单位 -->
  5. <view class="enterprise" v-for="(item,i) in companyTypes" :key="i" >
  6. <view class="title">
  7. 企业单位
  8. <image class="img" src="@/assets/img/riFill-building-fill.svg" mode=""></image>
  9. </view>
  10. <view class="infos">
  11. <view class="name">
  12. 联通公司
  13. </view>
  14. <view class="number">
  15. 91421000706966173Y
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 非企业 -->
  20. <view class="nonbusiness" v-for="(item,i) in personTypes" :key="i">
  21. <view class="title">
  22. 企业单位
  23. <image class="img" src="@/assets/img/riFill-user-2-fill.svg" mode=""></image>
  24. </view>
  25. <view class="infos">
  26. <view class="name">
  27. 李广宵 <view class="default">默认</view>
  28. </view>
  29. </view>
  30. </view>
  31. <u-divider :isnone="companyTypes.length==0&&personTypes.length==0" nonetext="没有找到相关内容"
  32. border-color="#CFD2D5">已经到底了</u-divider>
  33. <!-- 底部 -->
  34. <view class="bottom">
  35. <button class="add" @click="gotoUrl('/pages/invoiceManagement/addInvoiceTitle')" >新增发票抬头</button>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import * as API from '@/apis/pagejs/invoiceApi.js'
  41. export default {
  42. data() {
  43. return {
  44. companyTypes:[],
  45. personTypes:[],
  46. }
  47. },
  48. onLoad() {
  49. this.getInvoiceList()
  50. },
  51. methods: {
  52. getInvoiceList(){
  53. uni.showLoading({
  54. mask:true,title:'加载中...'
  55. })
  56. API.invoiceTypes().then((response) => {
  57. uni.hideLoading();
  58. //this.list=response.data.data;
  59. this.companyTypes=response.data.companyTypes;
  60. this.personTypes=response.data.personTypes;
  61. }).catch(error => {
  62. uni.hideLoading();
  63. })
  64. },
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .enterprise,.nonbusiness{
  70. border-radius: 8px;
  71. margin: 24rpx 32rpx;
  72. background-color: #fff;
  73. overflow: hidden;
  74. .title{
  75. padding: 32rpx;
  76. background: linear-gradient(90deg, rgba(49,110,207,1) 2%,rgba(20,73,159,1) 100%);
  77. color: rgba(255,255,255,1);
  78. font-size: 40rpx;
  79. position: relative;
  80. font-weight: 600;
  81. .img{
  82. width: 96rpx;
  83. height: 96rpx;
  84. position: absolute;
  85. top: 16rpx;
  86. right: 16rpx;
  87. }
  88. }
  89. .infos{
  90. padding: 24rpx 32rpx;
  91. .name{
  92. color: rgba(51,51,51,1);
  93. font-size: 36rpx;
  94. display: flex;
  95. align-items: center;
  96. .default{
  97. width: 96rpx;
  98. height: 48rpx;
  99. line-height: 48rpx;
  100. border-radius: 4px;
  101. background-color: rgba(22,119,255,1);
  102. color: rgba(255,255,255,1);
  103. margin-left: 16rpx;
  104. font-size: 28rpx;
  105. text-align: center;
  106. }
  107. }
  108. .number{
  109. color: rgba(119,119,119,1);
  110. margin-top: 2rpx;
  111. }
  112. }
  113. }
  114. .nonbusiness{
  115. .title{
  116. background: linear-gradient(90deg, rgba(0,187,170,1) 2%,rgba(0,161,119,1) 100%);
  117. }
  118. }
  119. // 底部
  120. .bottom{
  121. padding: 24rpx 32rpx;
  122. background-color: rgba(255,255,255,1);
  123. position: fixed;
  124. bottom: 0;
  125. left: 0;
  126. right: 0;
  127. .add{
  128. line-height: 88rpx;
  129. border-radius: 50px;
  130. background: linear-gradient(-88.46deg, rgba(34,109,198,1) 2.59%,rgba(9,158,237,1) 97.02%);
  131. color: rgba(255,255,255,1);
  132. font-size: 36rpx;
  133. }
  134. }
  135. </style>