index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <!-- 发票信息显示 -->
  3. <view class="aleart" v-if="aleartStatus">
  4. <view class="icon-top">
  5. <text class="iconfont icon-fapiao2" :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.pay_price}}
  18. </view>
  19. </view>
  20. <view class="label">
  21. <view class="">
  22. 发票抬头
  23. </view>
  24. <view class="label-value">
  25. {{invoiceData.name}}
  26. </view>
  27. </view>
  28. <view class="label">
  29. <view class="">
  30. 发票抬头类型
  31. </view>
  32. <view class="label-value">
  33. {{invoiceData.header_type == 1?"个人":'企业'}}
  34. </view>
  35. </view>
  36. <view class="label">
  37. <view class="">
  38. 发票类型
  39. </view>
  40. <view class="label-value">
  41. {{invoiceData.type==1?"电子普通发票":'电子专用发票'}}
  42. </view>
  43. </view>
  44. <view class="label">
  45. <view class="">
  46. 企业税号
  47. </view>
  48. <view class="label-value">
  49. {{invoiceData.duty_number}}
  50. </view>
  51. </view>
  52. <view class="body-head">联系信息</view>
  53. <view class="label">
  54. <view class="">
  55. 真实姓名
  56. </view>
  57. <view class="label-value">
  58. {{invoiceData.name}}
  59. </view>
  60. </view>
  61. <view class="label">
  62. <view class="">
  63. 联系电话
  64. </view>
  65. <view class="label-value">
  66. {{invoiceData.drawer_phone}}
  67. </view>
  68. </view>
  69. <view class="label">
  70. <view class="">
  71. 联系邮箱
  72. </view>
  73. <view class="label-value">
  74. {{invoiceData.email}}
  75. </view>
  76. </view>
  77. <slot name="bottom" :invoiceData="invoiceData"></slot>
  78. </view>
  79. <view class="btn" @click="close">
  80. 确认
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. export default ({
  86. data() {
  87. return {
  88. }
  89. },
  90. props:{
  91. aleartStatus:{
  92. type:Boolean,
  93. default: false
  94. },
  95. invoiceData:{
  96. type:Object,
  97. default:()=>{}
  98. }
  99. },
  100. methods:{
  101. close(){
  102. this.$emit('close')
  103. },
  104. }
  105. })
  106. </script>
  107. <style lang="scss" scoped>
  108. .aleart {
  109. width: 80%;
  110. // height: 714rpx;
  111. position: fixed;
  112. left: 50%;
  113. transform: translateX(-50%);
  114. z-index: 9999;
  115. top: 45%;
  116. margin-top: -357rpx;
  117. background-color: #fff;
  118. padding: 30rpx;
  119. border-radius: 12rpx;
  120. background-image:-webkit-gradient(
  121. 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. }
  156. .title {
  157. font-size: 34rpx;
  158. color: var(--view-theme);
  159. font-weight: bold;
  160. text-align: center;
  161. padding-bottom: 10rpx;
  162. border-bottom: 1px solid --view-minorColorT;
  163. }
  164. .aleart-body {
  165. display: flex;
  166. justify-content: center;
  167. flex-direction: column;
  168. padding: 60rpx 0;
  169. .body-head{
  170. font-size: 30rpx;
  171. font-weight: bold;
  172. padding-bottom: 10rpx;
  173. border-bottom: 1px solid #EEEEEE;
  174. margin: 10rpx 0;
  175. }
  176. .label{
  177. width: 100%;
  178. display: flex;
  179. justify-content: space-between;
  180. margin-bottom: 15rpx;
  181. color: #333333;
  182. font-size: 28rpx;
  183. .label-value{
  184. color: #666666;
  185. }
  186. }
  187. }
  188. .btn {
  189. width: 100%;
  190. padding: 15rpx 0;
  191. color: #fff;
  192. background: var(--view-theme);
  193. border-radius: 20px;
  194. text-align: center;
  195. margin-bottom: 30rpx;
  196. }
  197. }
  198. </style>