index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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 class="bill">
  7. {{invoiceData.is_invoice?$t(`已开票`): $t(`未开票`)}}
  8. </view>
  9. </view>
  10. <view class="aleart-body">
  11. <view class="body-head">{{$t(`发票信息`)}}</view>
  12. <view class="label">
  13. <view class="">
  14. {{$t(`发票抬头`)}}
  15. </view>
  16. <view class="label-value">
  17. {{invoiceData.name}}
  18. </view>
  19. </view>
  20. <view class="label">
  21. <view class="">
  22. {{$t(`发票抬头类型`)}}
  23. </view>
  24. <view class="label-value">
  25. {{invoiceData.header_type == 1?$t(`个人`):$t(`企业`)}}
  26. </view>
  27. </view>
  28. <view class="label">
  29. <view class="">
  30. {{$t(`发票类型`)}}
  31. </view>
  32. <view class="label-value">
  33. {{invoiceData.type==1?$t(`电子普通发票`):$t(`电子专用发票`)}}
  34. </view>
  35. </view>
  36. <view class="label" v-if="invoiceData.duty_number">
  37. <view class="">
  38. {{$t(`企业税号`)}}
  39. </view>
  40. <view class="label-value">
  41. {{invoiceData.duty_number}}
  42. </view>
  43. </view>
  44. <view class="body-head">{{$t(`联系信息`)}}</view>
  45. <view class="label">
  46. <view class="">
  47. {{$t(`真实姓名`)}}
  48. </view>
  49. <view class="label-value">
  50. {{invoiceData.name}}
  51. </view>
  52. </view>
  53. <view class="label">
  54. <view class="">
  55. {{$t(`联系电话`)}}
  56. </view>
  57. <view class="label-value">
  58. {{invoiceData.drawer_phone}}
  59. </view>
  60. </view>
  61. <view class="label">
  62. <view class="">
  63. {{$t(`联系邮箱`)}}
  64. </view>
  65. <view class="label-value">
  66. {{invoiceData.email}}
  67. </view>
  68. </view>
  69. </view>
  70. <view class="btn" @click="close">
  71. {{$t(`确认`)}}
  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. .bill {
  148. width: 172rpx;
  149. text-align: center;
  150. }
  151. }
  152. .title {
  153. font-size: 34rpx;
  154. color: var(--view-theme);
  155. font-weight: bold;
  156. text-align: center;
  157. padding-bottom: 10rpx;
  158. border-bottom: 1px solid var(--view-op-ten);
  159. }
  160. .aleart-body {
  161. display: flex;
  162. justify-content: center;
  163. flex-direction: column;
  164. padding: 60rpx 0;
  165. .body-head {
  166. font-size: 30rpx;
  167. font-weight: bold;
  168. padding-bottom: 10rpx;
  169. border-bottom: 1px solid #EEEEEE;
  170. margin: 10rpx 0;
  171. }
  172. .label {
  173. width: 100%;
  174. display: flex;
  175. justify-content: space-between;
  176. margin-bottom: 15rpx;
  177. color: #333333;
  178. font-size: 28rpx;
  179. .label-value {
  180. color: #666666;
  181. }
  182. }
  183. }
  184. .btn {
  185. width: 100%;
  186. padding: 15rpx 0;
  187. color: #fff;
  188. background: var(--view-theme);
  189. border-radius: 20px;
  190. text-align: center;
  191. margin-bottom: 30rpx;
  192. }
  193. }
  194. </style>