index.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <view :style="colorStyle">
  3. <!-- #ifdef MP || APP-PLUS -->
  4. <NavBar titleText="发票详情" :iconColor="iconColor" :textColor="iconColor" :isScrolling="isScrolling" showBack></NavBar>
  5. <!-- #endif -->
  6. <view class="headerBg"></view>
  7. <view class="status">
  8. <view class="name">{{invoice.is_invoice?(invoice.is_invoice==1?'已开票':'已拒绝'):'待开票'}}</view>
  9. <view>{{invoice.add_time}}</view>
  10. <image :src="imgHost+'/statics/images/invoice-top.png'" class="image"></image>
  11. </view>
  12. <view class="panel">
  13. <view class="panel-inner" :style="{backgroundImage:'url('+imgHost+'/statics/images/invoice-border-left.png),url('+imgHost+'/statics/images/invoice-border-right.png)'}">
  14. <view class="title" :style="{backgroundImage:'url('+imgHost+'/statics/images/invoice-title.png)'}"><text
  15. class="inner">{{invoice.header_type==1?'个人':'企业'}}{{invoice.type==1?'普通':'专用'}}发票</text></view>
  16. <view class="money">
  17. <view class="name">开票金额</view>
  18. <BaseMoney :money="invoice.invoice_amount == '0.00' ? invoice_detail.pay_price : invoice.invoice_amount" symbolSize="40" integerSize="56" decimalSize="56" weight></BaseMoney>
  19. </view>
  20. <view class="list">
  21. <view class="item acea-row">
  22. <view class="name">发票类型</view>
  23. <view class="value">电子{{invoice.type==1?'普通':'专用'}}发票</view>
  24. </view>
  25. <view class="item acea-row">
  26. <view class="name">抬头类型</view>
  27. <view class="value">{{invoice.header_type==1?'个人':'企业'}}</view>
  28. </view>
  29. <view class="item acea-row">
  30. <view class="name">抬头名称</view>
  31. <view class="value">{{invoice.name}}</view>
  32. </view>
  33. <template v-if="invoice.header_type==2">
  34. <view class="item acea-row">
  35. <view class="name">单位税号</view>
  36. <view class="value">{{invoice.duty_number}}</view>
  37. </view>
  38. <view v-if="invoice.type == 2" class="item acea-row">
  39. <view class="name">开户银行</view>
  40. <view class="value">{{invoice.bank}}</view>
  41. </view>
  42. <view v-if="invoice.type == 2" class="item acea-row">
  43. <view class="name">银行账号</view>
  44. <view class="value">{{invoice.card_number}}</view>
  45. </view>
  46. <view v-if="invoice.type == 2" class="item acea-row">
  47. <view class="name">企业地址</view>
  48. <view class="value">{{invoice.address}}</view>
  49. </view>
  50. </template>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="panel">
  55. <view class="panel-inner" :style="{backgroundImage:'url('+imgHost+'/statics/images/invoice-border-left.png),url('+imgHost+'/statics/images/invoice-border-right.png)'}">
  56. <view class="list">
  57. <view class="item acea-row">
  58. <view class="name">{{invoice.header_type==1?'联系':'企业'}}电话</view>
  59. <view class="value">{{invoice.drawer_phone}}</view>
  60. </view>
  61. <view class="item acea-row">
  62. <view class="name">电子邮箱</view>
  63. <view class="value">{{invoice.email}}</view>
  64. </view>
  65. <view class="item acea-row">
  66. <view class="name">申请时间</view>
  67. <view class="value">{{invoice.add_time}}</view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <view v-if="invoice.is_invoice" class="panel">
  73. <view class="panel-inner" :style="{backgroundImage:'url('+imgHost+'/statics/images/invoice-border-left.png),url('+imgHost+'/statics/images/invoice-border-right.png)'}">
  74. <view class="list">
  75. <view class="item acea-row">
  76. <view class="name">开票结果</view>
  77. <view class="value">{{invoice.is_invoice?(invoice.is_invoice==1?'已开票':'已拒绝'):'待开票'}}</view>
  78. </view>
  79. <view v-if="invoice.is_invoice == -1 && invoice.remark" class="item acea-row">
  80. <view class="name">拒绝原因</view>
  81. <view class="value">{{invoice.remark}}</view>
  82. </view>
  83. <view class="item acea-row">
  84. <view class="name">操作时间</view>
  85. <view class="value">{{invoice.invoice_time}}</view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import {
  94. orderInvoiceDetail
  95. } from '@/api/order.js';
  96. import home from '@/components/home';
  97. import {
  98. toLogin
  99. } from '@/libs/login.js';
  100. import {
  101. mapGetters
  102. } from "vuex";
  103. import colors from "@/mixins/color";
  104. import NavBar from '@/components/NavBar.vue';
  105. import {
  106. HTTP_REQUEST_URL
  107. } from '@/config/app';
  108. export default {
  109. components: {
  110. home,
  111. NavBar,
  112. },
  113. mixins: [colors],
  114. data() {
  115. return {
  116. imgHost: HTTP_REQUEST_URL,
  117. // #ifdef MP || APP-PLUS
  118. getHeight: this.$util.getWXStatusHeight(),
  119. iconColor: '#FFFFFF',
  120. isScrolling: false,
  121. // #endif
  122. order_id: '',
  123. evaluate: 0,
  124. cartInfo: [], //购物车产品
  125. orderInfo: {
  126. system_store: {},
  127. _status: {}
  128. }, //订单详情
  129. system_store: {},
  130. isGoodsReturn: false, //是否为退款订单
  131. status: {}, //订单底部按钮状态
  132. isClose: false,
  133. pay_close: false,
  134. pay_order_id: '',
  135. totalPrice: '0',
  136. isAuto: false, //没有授权的不会自动授权
  137. isShowAuth: false, //是否隐藏授权
  138. invoice: {}, //是否隐藏授权
  139. invoice_detail: {},
  140. };
  141. },
  142. computed: mapGetters(['isLogin']),
  143. onLoad: function(options) {
  144. if (options.order_id) {
  145. this.$set(this, 'order_id', options.order_id);
  146. }
  147. },
  148. onShow() {
  149. uni.removeStorageSync('form_type_cart');
  150. if (this.isLogin) {
  151. this.getOrderInfo();
  152. } else {
  153. toLogin();
  154. }
  155. },
  156. methods: {
  157. getOrderInfo: function() {
  158. let that = this;
  159. uni.showLoading({
  160. title: "正在加载中"
  161. });
  162. orderInvoiceDetail(this.order_id).then(res => {
  163. uni.hideLoading();
  164. that.invoice = res.data.invoice;
  165. that.invoice_detail = res.data;
  166. }).catch(err => {
  167. uni.hideLoading();
  168. that.$util.Tips({
  169. title: err
  170. });
  171. });
  172. },
  173. }
  174. }
  175. </script>
  176. <style lang="scss" scoped>
  177. .invoiceTitle {
  178. background: linear-gradient(270deg, #FF7931 0%, #E93323 100%);
  179. position: fixed;
  180. left: 0;
  181. top: 0;
  182. width: 100%;
  183. z-index: 99;
  184. .sysTitle {
  185. width: 100%;
  186. position: relative;
  187. font-weight: 500;
  188. color: #fff;
  189. font-size: 30rpx;
  190. .iconfont {
  191. position: absolute;
  192. font-size: 36rpx;
  193. left: 11rpx;
  194. width: 60rpx;
  195. }
  196. }
  197. }
  198. .headerBg {
  199. position: absolute;
  200. top: 0;
  201. left: 0;
  202. width: 100%;
  203. height: 506rpx;
  204. background: linear-gradient(270deg, var(--view-gradient) 0%, var(--view-theme) 100%);
  205. &::after {
  206. content: "";
  207. position: absolute;
  208. bottom: 0;
  209. left: 0;
  210. width: 100%;
  211. height: 120rpx;
  212. background: linear-gradient(360deg, #F5F5F5 0%, rgba(255, 255, 255, 0) 100%);
  213. }
  214. .image {
  215. position: absolute;
  216. top: 12rpx;
  217. right: 32rpx;
  218. width: 160rpx;
  219. height: 160rpx;
  220. }
  221. }
  222. .status {
  223. position: relative;
  224. height: 172rpx;
  225. padding: 46rpx 0 0 34rpx;
  226. font-size: 26rpx;
  227. line-height: 36rpx;
  228. color: #FFFFFF;
  229. .name {
  230. margin-bottom: 8rpx;
  231. font-size: 36rpx;
  232. line-height: 50rpx;
  233. }
  234. .image {
  235. position: absolute;
  236. right: 32rpx;
  237. bottom: 0;
  238. width: 160rpx;
  239. height: 160rpx;
  240. }
  241. }
  242. .panel {
  243. position: relative;
  244. padding: 0 10rpx;
  245. border-radius: 16rpx;
  246. margin: 0 32rpx 20rpx;
  247. background-color: #FFFFFF;
  248. .panel-inner {
  249. padding: 32rpx 28rpx;
  250. background-position: left top, right top;
  251. background-repeat: repeat-y;
  252. background-size: 28rpx;
  253. }
  254. .title {
  255. height: 80rpx;
  256. background-position: center;
  257. background-repeat: no-repeat;
  258. background-size: contain;
  259. text-align: center;
  260. line-height: 80rpx;
  261. .inner {
  262. display: inline-block;
  263. background-color: #FFFFFF;
  264. vertical-align: middle;
  265. font-weight: 500;
  266. font-size: 30rpx;
  267. line-height: 36rpx;
  268. color: #A3442C;
  269. }
  270. }
  271. .money {
  272. padding: 60rpx 0 38rpx;
  273. text-align: center;
  274. .name {
  275. margin-bottom: 12rpx;
  276. font-size: 26rpx;
  277. line-height: 36rpx;
  278. color: #999999;
  279. }
  280. }
  281. .item {
  282. padding: 16rpx 50rpx;
  283. font-size: 28rpx;
  284. line-height: 40rpx;
  285. color: #999999;
  286. }
  287. .value {
  288. flex: 1;
  289. min-width: 0;
  290. padding-left: 24rpx;
  291. word-break: break-all;
  292. color: #333333;
  293. }
  294. }
  295. </style>