index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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" v-if="invoiceData.header_type == 2" >
  45. <view class="">
  46. 企业税号
  47. </view>
  48. <view class="label-value">
  49. {{invoiceData.duty_number}}
  50. </view>
  51. </view>
  52. <template v-if="invoiceData.type == 2">
  53. <view class="label">
  54. <view>开户银行</view>
  55. <view class="label-value">{{invoiceData.bank}}</view>
  56. </view>
  57. <view class="label">
  58. <view>银行账号</view>
  59. <view class="label-value">{{invoiceData.card_number}}</view>
  60. </view>
  61. <view class="label">
  62. <view>企业地址</view>
  63. <view class="label-value">{{invoiceData.address}}</view>
  64. </view>
  65. <view class="label">
  66. <view>企业电话</view>
  67. <view class="label-value">{{invoiceData.tell}}</view>
  68. </view>
  69. </template>
  70. <view class="body-head">联系信息</view>
  71. <view class="label">
  72. <view class="">
  73. 真实姓名
  74. </view>
  75. <view class="label-value">
  76. {{invoiceData.name}}
  77. </view>
  78. </view>
  79. <view class="label">
  80. <view class="">
  81. 联系电话
  82. </view>
  83. <view class="label-value">
  84. {{invoiceData.drawer_phone}}
  85. </view>
  86. </view>
  87. <view class="label">
  88. <view class="">
  89. 联系邮箱
  90. </view>
  91. <view class="label-value">
  92. {{invoiceData.email}}
  93. </view>
  94. </view>
  95. <slot name="bottom" :invoiceData="invoiceData"></slot>
  96. </view>
  97. <view class="btn" @click="close">
  98. 确认
  99. </view>
  100. </view>
  101. </template>
  102. <script>
  103. export default ({
  104. data() {
  105. return {
  106. }
  107. },
  108. props:{
  109. aleartStatus:{
  110. type:Boolean,
  111. default: false
  112. },
  113. invoiceData:{
  114. type:Object,
  115. default:()=>{}
  116. }
  117. },
  118. methods:{
  119. close(){
  120. this.$emit('close')
  121. },
  122. }
  123. })
  124. </script>
  125. <style lang="scss" scoped>
  126. .aleart {
  127. width: 80%;
  128. // height: 714rpx;
  129. position: fixed;
  130. left: 50%;
  131. // transform: translateX(-50%);
  132. z-index: 9999;
  133. // top: 45%;
  134. // margin-top: -357rpx;
  135. top: 50%;
  136. transform:translateX(-50%) translateY(-50%);
  137. background-color: #fff;
  138. padding: 30rpx;
  139. border-radius: 12rpx;
  140. background-image:-webkit-gradient(
  141. linear,//表示渐变的为直线 另外一个值是radial
  142. 50% 0,//直线型渐变的起点位置 后边有一个属性background-size规定背景的大小,30 X 15px 50% 0 都是乘以父元素的宽高。
  143. 0 100%,//结束点的位置 和上类似
  144. from(transparent),//起点的颜色
  145. color-stop(.5,transparent), //中间某一个点必须达到这个颜色,表示变化过程 .5b表示这个渐变范围长度的总长的50%
  146. color-stop(.5,#999999),//同上
  147. to(#999999)),//结束段的颜色
  148. //一个背景块的分为两个15X 15 组成。
  149. -webkit-gradient(linear,50% 0,100% 100%,from(transparent),
  150. color-stop(.5,transparent),
  151. color-stop(.5,#999999),
  152. to(#999999));
  153. background-size:20rpx 10rpx;
  154. background-repeat:repeat-x;
  155. background-position:0 100%;
  156. .icon-top{
  157. margin-left: calc(50% - 40rpx ) ;
  158. margin-top: -40rpx;
  159. display: flex;
  160. flex-direction: column;
  161. align-items: center;
  162. border-radius: 50%;
  163. width: 100rpx;
  164. height: 100rpx;
  165. .icon-fapiao2{
  166. text-align: center;
  167. border-radius: 50%;
  168. font-size: 80rpx;
  169. color: #fff;
  170. background-color: var(--view-theme);
  171. padding: 20rpx;
  172. border: 4rpx solid #fff;
  173. margin-top: -40rpx;
  174. }
  175. }
  176. .title {
  177. font-size: 34rpx;
  178. color: var(--view-theme);
  179. font-weight: bold;
  180. text-align: center;
  181. padding-bottom: 10rpx;
  182. border-bottom: 1px solid --view-minorColorT;
  183. }
  184. .aleart-body {
  185. display: flex;
  186. justify-content: center;
  187. flex-direction: column;
  188. padding: 60rpx 0;
  189. .body-head{
  190. font-size: 30rpx;
  191. font-weight: bold;
  192. padding-bottom: 10rpx;
  193. border-bottom: 1px solid #EEEEEE;
  194. margin: 10rpx 0;
  195. }
  196. .label{
  197. width: 100%;
  198. display: flex;
  199. justify-content: space-between;
  200. margin-bottom: 15rpx;
  201. color: #333333;
  202. font-size: 28rpx;
  203. .label-value{
  204. color: #666666;
  205. }
  206. }
  207. }
  208. .btn {
  209. width: 100%;
  210. padding: 15rpx 0;
  211. color: #fff;
  212. background: var(--view-theme);
  213. border-radius: 20px;
  214. text-align: center;
  215. margin-bottom: 30rpx;
  216. }
  217. }
  218. </style>