index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view class="aleart" v-if="aleartStatus" :style="colorStyle">
  3. <view class="icon-top">
  4. <text class="iconfont icon-fapiao2"
  5. :style="invoiceData.is_invoice?'background-color: var(--view-theme)':'background-color: #999'"></text>
  6. <view>
  7. {{invoiceData.is_invoice?'已开票':'未开票'}}
  8. </view>
  9. </view>
  10. <view class="aleart-body">
  11. <view class="body-head">发票信息</view>
  12. <view class="label">
  13. <view class="">
  14. 发票抬头
  15. </view>
  16. <view class="label-value">
  17. {{invoiceData.name}}
  18. </view>
  19. </view>
  20. <view class="label">
  21. <view class="">
  22. 发票抬头类型
  23. </view>
  24. <view class="label-value">
  25. {{invoiceData.header_type == 1?"个人":'企业'}}
  26. </view>
  27. </view>
  28. <view class="label">
  29. <view class="">
  30. 发票类型
  31. </view>
  32. <view class="label-value">
  33. {{invoiceData.type==1?"电子普通发票":'电子专用发票'}}
  34. </view>
  35. </view>
  36. <view class="label" v-if="invoiceData.duty_number">
  37. <view class="">
  38. 企业税号
  39. </view>
  40. <view class="label-value">
  41. {{invoiceData.duty_number}}
  42. </view>
  43. </view>
  44. <view class="body-head">联系信息</view>
  45. <view class="label">
  46. <view class="">
  47. 真实姓名
  48. </view>
  49. <view class="label-value">
  50. {{invoiceData.name}}
  51. </view>
  52. </view>
  53. <view class="label">
  54. <view class="">
  55. 联系电话
  56. </view>
  57. <view class="label-value">
  58. {{invoiceData.drawer_phone}}
  59. </view>
  60. </view>
  61. <view class="label">
  62. <view class="">
  63. 联系邮箱
  64. </view>
  65. <view class="label-value">
  66. {{invoiceData.email}}
  67. </view>
  68. </view>
  69. </view>
  70. <view class="btn" @click="close">
  71. 确认
  72. </view>
  73. </view>
  74. </template>
  75. <script>
  76. import colors from '@/mixins/color.js';
  77. export default ({
  78. data() {
  79. return {
  80. }
  81. },
  82. mixins: [colors],
  83. props: {
  84. aleartStatus: {
  85. type: Boolean,
  86. default: false
  87. },
  88. invoiceData: {
  89. type: Object,
  90. default: () => {}
  91. }
  92. },
  93. methods: {
  94. close() {
  95. this.$emit('close')
  96. },
  97. }
  98. })
  99. </script>
  100. <style lang="scss" scoped>
  101. .aleart {
  102. width: 80%;
  103. // height: 714rpx;
  104. position: fixed;
  105. left: 50%;
  106. transform: translateX(-50%);
  107. z-index: 9999;
  108. top: 45%;
  109. margin-top: -357rpx;
  110. background-color: #fff;
  111. padding: 30rpx;
  112. border-radius: 12rpx;
  113. background-image: -webkit-gradient(linear, //表示渐变的为直线 另外一个值是radial
  114. 50% 0, //直线型渐变的起点位置 后边有一个属性background-size规定背景的大小,30 X 15px 50% 0 都是乘以父元素的宽高。
  115. 0 100%, //结束点的位置 和上类似
  116. from(transparent), //起点的颜色
  117. color-stop(.5, transparent), //中间某一个点必须达到这个颜色,表示变化过程 .5b表示这个渐变范围长度的总长的50%
  118. color-stop(.5, #999999), //同上
  119. to(#999999)), //结束段的颜色
  120. //一个背景块的分为两个15X 15 组成。
  121. -webkit-gradient(linear, 50% 0, 100% 100%, from(transparent),
  122. color-stop(.5, transparent),
  123. color-stop(.5, #999999),
  124. to(#999999));
  125. background-size: 20rpx 10rpx;
  126. background-repeat: repeat-x;
  127. background-position: 0 100%;
  128. .icon-top {
  129. margin-left: calc(50% - 40rpx);
  130. margin-top: -40rpx;
  131. display: flex;
  132. flex-direction: column;
  133. align-items: center;
  134. border-radius: 50%;
  135. width: 100rpx;
  136. height: 100rpx;
  137. .icon-fapiao2 {
  138. text-align: center;
  139. border-radius: 50%;
  140. font-size: 80rpx;
  141. color: #fff;
  142. background-color: var(--view-theme);
  143. padding: 20rpx;
  144. border: 4rpx solid #fff;
  145. margin-top: -40rpx;
  146. }
  147. }
  148. .title {
  149. font-size: 34rpx;
  150. color: var(--view-theme);
  151. font-weight: bold;
  152. text-align: center;
  153. padding-bottom: 10rpx;
  154. border-bottom: 1px solid var(--view-op-ten);
  155. }
  156. .aleart-body {
  157. display: flex;
  158. justify-content: center;
  159. flex-direction: column;
  160. padding: 60rpx 0;
  161. .body-head {
  162. font-size: 30rpx;
  163. font-weight: bold;
  164. padding-bottom: 10rpx;
  165. border-bottom: 1px solid #EEEEEE;
  166. margin: 10rpx 0;
  167. }
  168. .label {
  169. width: 100%;
  170. display: flex;
  171. justify-content: space-between;
  172. margin-bottom: 15rpx;
  173. color: #333333;
  174. font-size: 28rpx;
  175. .label-value {
  176. color: #666666;
  177. }
  178. }
  179. }
  180. .btn {
  181. width: 100%;
  182. padding: 15rpx 0;
  183. color: #fff;
  184. background: var(--view-theme);
  185. border-radius: 20px;
  186. text-align: center;
  187. margin-bottom: 30rpx;
  188. }
  189. }
  190. </style>