invoiceList.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template>
  2. <div class="iApp">
  3. <div class="log_list">
  4. <div class="list_box" v-for="(item, index) of list" :key="index" @click="toDetail(item.fpqqlsh)">
  5. <div class="list_item">
  6. <div class="p1 flex_r flex_jb c05">
  7. <span>状态:{{ typeStatus(item.status) }}</span>
  8. <span>{{item.create_time}}</span>
  9. </div>
  10. <div class="p2 flex_r flex_jb">
  11. <div class="tit ellipsis1">电子发票</div>
  12. <span class="money">金额{{ item.money.toFixed(2) }}</span>
  13. </div>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. import { get, post } from "@/request/api.js";
  21. var app = getApp();
  22. var appEv = app.$vm.$options;
  23. export default {
  24. name: "iApp",
  25. components: {},
  26. data() {
  27. return {
  28. list: [],
  29. page: 1,
  30. rows: 10,
  31. selectedId: [],
  32. selectedLi: [],
  33. height: undefined,
  34. trueTotal: 0,
  35. money: 0,
  36. };
  37. },
  38. onLoad(option) {
  39. let that = this;
  40. uni.getSystemInfo({
  41. success: function (res) {
  42. that.height = res.windowHeight * 2 - 150 + "rpx";
  43. that.getList();
  44. },
  45. });
  46. },
  47. onLaunch() {},
  48. onShow() {},
  49. onHide() {},
  50. //页面上拉触底事件的处理函数
  51. onReachBottom() {
  52. if (this.page != -1) {
  53. var that = this;
  54. setTimeout(function () {
  55. that.page++;
  56. that.getList();
  57. }, 800);
  58. }
  59. },
  60. methods: {
  61. getList() {
  62. let data = {
  63. page: this.page,
  64. rows: this.rows,
  65. };
  66. post("invoice/myInvoice", data).then((res) => {
  67. if (res.code == 0) {
  68. this.list = this.list.concat(res.data.data);
  69. this.total = res.data.total;
  70. if (Math.ceil(this.total / this.rows) <= this.page) {
  71. this.page = -1;
  72. }
  73. }
  74. });
  75. },
  76. toDetail(id){
  77. this.goto("/pagesB/invoice/Billingresult",{id : id});
  78. },
  79. },
  80. computed: {
  81. typeStatus(){
  82. return (da) => {
  83. let str;
  84. if (da === 1) str = "已开票";
  85. if (da === 2) str = "开票失败";
  86. if (da === 4) str = "红冲发票";
  87. if (da === 5) str = "开票中";
  88. if (da === 6) str = "发票作废";
  89. return str;
  90. };
  91. }
  92. },
  93. watch: {
  94. },
  95. };
  96. </script>
  97. <style scoped lang='scss'>
  98. .iApp {
  99. width: 100%;
  100. height: 100%;
  101. .log_list {
  102. padding: 32rpx 32rpx;
  103. overflow: scroll;
  104. .log_title {
  105. line-height: 40rpx;
  106. margin-bottom: 20rpx;
  107. .tit {
  108. font-size: 36rpx;
  109. font-weight: bold;
  110. .log_num {
  111. font-size: 28rpx;
  112. margin-left: 10rpx;
  113. }
  114. .active {
  115. border-bottom: 4rpx solid #3a88ff;
  116. }
  117. }
  118. .mor {
  119. font-size: 24rpx;
  120. color: rgba($color: #000, $alpha: 0.5);
  121. .icofont {
  122. font-size: 22rpx;
  123. }
  124. }
  125. }
  126. .list_box {
  127. margin-top: 20rpx;
  128. .list_item {
  129. background: #fff;
  130. padding: 32rpx;
  131. border-radius: 16rpx;
  132. margin-bottom: 20rpx;
  133. border: 1px solid #ddd;
  134. .list_item_l {
  135. width: 68rpx;
  136. // text-align: center;
  137. .iconfont {
  138. font-size: 36rpx;
  139. }
  140. }
  141. .list_item_r {
  142. width: calc(100% - 68rpx);
  143. }
  144. &:last-child {
  145. margin-bottom: 0;
  146. }
  147. }
  148. .p1 {
  149. font-size: 25rpx;
  150. margin-bottom: 20rpx;
  151. }
  152. .p2 {
  153. .odr_img {
  154. object-fit: cover;
  155. width: 120rpx;
  156. height: 112rpx;
  157. }
  158. .odr_info {
  159. width: calc(100% - 120rpx - 20rpx);
  160. font-size: 24rpx;
  161. color: rgba($color: #000, $alpha: 0.5);
  162. .tit {
  163. color: rgba($color: #000, $alpha: 0.9);
  164. }
  165. }
  166. }
  167. }
  168. }
  169. .bottom {
  170. flex: 0 0 100rpx;
  171. // background-color: red;
  172. border-top: 1px solid #ddd;
  173. height: 100rpx;
  174. width: 100%;
  175. z-index: 999;
  176. display: flex;
  177. flex-direction: row;
  178. justify-content: space-between;
  179. align-items: center;
  180. padding: 0 32rpx;
  181. .left {
  182. display: flex;
  183. flex-direction: row;
  184. .green {
  185. color: #2db389;
  186. margin: 0 6rpx;
  187. }
  188. }
  189. .right {
  190. display: flex;
  191. justify-content: center;
  192. align-items: center;
  193. .button {
  194. padding: 10rpx 20rpx;
  195. background-color: #2db389;
  196. border-radius: 10rpx;
  197. span {
  198. color: #fff;
  199. }
  200. }
  201. }
  202. }
  203. .money{
  204. color:#2db389;
  205. }
  206. }
  207. </style>