index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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 class="label">
  70. <view class="">
  71. {{$t(`发票备注`)}}
  72. </view>
  73. <view class="label-value">
  74. {{invoiceData.remark}}
  75. </view>
  76. </view>
  77. </view>
  78. <view class="btn" @click="close">
  79. {{$t(`确认`)}}
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. import colors from '@/mixins/color.js';
  85. export default ({
  86. data() {
  87. return {
  88. }
  89. },
  90. mixins: [colors],
  91. props: {
  92. aleartStatus: {
  93. type: Boolean,
  94. default: false
  95. },
  96. invoiceData: {
  97. type: Object,
  98. default: () => {}
  99. }
  100. },
  101. methods: {
  102. close() {
  103. this.$emit('close')
  104. },
  105. }
  106. })
  107. </script>
  108. <style lang="scss" scoped>
  109. .aleart {
  110. width: 80%;
  111. // height: 714rpx;
  112. position: fixed;
  113. left: 50%;
  114. transform: translateX(-50%);
  115. z-index: 9999;
  116. top: 45%;
  117. margin-top: -357rpx;
  118. background-color: #fff;
  119. padding: 30rpx;
  120. border-radius: 12rpx;
  121. background-image: -webkit-gradient(linear, //表示渐变的为直线 另外一个值是radial
  122. 50% 0, //直线型渐变的起点位置 后边有一个属性background-size规定背景的大小,30 X 15px 50% 0 都是乘以父元素的宽高。
  123. 0 100%, //结束点的位置 和上类似
  124. from(transparent), //起点的颜色
  125. color-stop(.5, transparent), //中间某一个点必须达到这个颜色,表示变化过程 .5b表示这个渐变范围长度的总长的50%
  126. color-stop(.5, #999999), //同上
  127. to(#999999)), //结束段的颜色
  128. //一个背景块的分为两个15X 15 组成。
  129. -webkit-gradient(linear, 50% 0, 100% 100%, from(transparent),
  130. color-stop(.5, transparent),
  131. color-stop(.5, #999999),
  132. to(#999999));
  133. background-size: 20rpx 10rpx;
  134. background-repeat: repeat-x;
  135. background-position: 0 100%;
  136. .icon-top {
  137. margin-left: calc(50% - 40rpx);
  138. margin-top: -40rpx;
  139. display: flex;
  140. flex-direction: column;
  141. align-items: center;
  142. border-radius: 50%;
  143. width: 100rpx;
  144. height: 100rpx;
  145. .icon-fapiao2 {
  146. text-align: center;
  147. border-radius: 50%;
  148. font-size: 80rpx;
  149. color: #fff;
  150. background-color: var(--view-theme);
  151. padding: 20rpx;
  152. border: 4rpx solid #fff;
  153. margin-top: -40rpx;
  154. }
  155. .bill {
  156. width: 172rpx;
  157. text-align: center;
  158. }
  159. }
  160. .title {
  161. font-size: 34rpx;
  162. color: var(--view-theme);
  163. font-weight: bold;
  164. text-align: center;
  165. padding-bottom: 10rpx;
  166. border-bottom: 1px solid var(--view-op-ten);
  167. }
  168. .aleart-body {
  169. display: flex;
  170. justify-content: center;
  171. flex-direction: column;
  172. padding: 60rpx 0;
  173. .body-head {
  174. font-size: 30rpx;
  175. font-weight: bold;
  176. padding-bottom: 10rpx;
  177. border-bottom: 1px solid #EEEEEE;
  178. margin: 10rpx 0;
  179. }
  180. .label {
  181. width: 100%;
  182. display: flex;
  183. justify-content: space-between;
  184. margin-bottom: 15rpx;
  185. color: #333333;
  186. font-size: 28rpx;
  187. .label-value {
  188. color: #666666;
  189. }
  190. }
  191. }
  192. .btn {
  193. width: 100%;
  194. padding: 15rpx 0;
  195. color: #fff;
  196. background: var(--view-theme);
  197. border-radius: 20px;
  198. text-align: center;
  199. margin-bottom: 30rpx;
  200. }
  201. }
  202. </style>