monthly_bill_detail.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="monthly-bill-detail">
  3. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
  4. :up="upOption">
  5. <view class="content">
  6. <view class="order-container">
  7. <view v-for="(item, index) in orderList" :key="index" class="order-item bg-white m-t-20">
  8. <view class="order-header flex row-between">
  9. <view>订单编号:{{item.order_sn}}</view>
  10. </view>
  11. <view class="order-content flex">
  12. <view>
  13. <u-image width="180rpx" height="180rpx" border-radius="6px" :src="item.goods_image" />
  14. </view>
  15. <view class="order-goods-info flex-1 m-l-20">
  16. <view class="name sm line-2">{{item.goods_name}}</view>
  17. <view class="flex row-between m-t-6">
  18. <view class="xs muted">
  19. <text class="m-r-10">
  20. 数量
  21. </text>
  22. <text class="normal nr">{{item.goods_num}}</text></view>
  23. <view class="xs">
  24. <text class="muted m-r-10">付款金额</text>
  25. <price-format :subscript-size="28" :first-size="28" :second-size="28"
  26. :price="item.pay_price" />
  27. </view>
  28. </view>
  29. <view class="pre-income muted sm m-t-10">
  30. <text class="m-r-10">预估收益</text>
  31. <price-format :subscript-size="28" :first-size="28" :second-size="28"
  32. :color="colorConfig.primary" :price="item.money" />
  33. </view>
  34. </view>
  35. </view>
  36. <view class="order-footer flex row-between">
  37. <view class="time muted">{{item.create_time}}</view>
  38. <view class="static sm" :style="'color: ' + (item.status == 1 ? '#F95F2F' : '#07CE1B')">
  39. {{item.statusDesc}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <u-select v-model="showPop" :list="months" mode="single-column" @confirm="changeMonths"></u-select>
  45. </mescroll-body>
  46. </view>
  47. </template>
  48. <script>
  49. // +----------------------------------------------------------------------
  50. // | likeshop开源商城系统
  51. // +----------------------------------------------------------------------
  52. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  53. // | gitee下载:https://gitee.com/likeshop_gitee
  54. // | github下载:https://github.com/likeshop-github
  55. // | 访问官网:https://www.likeshop.cn
  56. // | 访问社区:https://home.likeshop.cn
  57. // | 访问手册:http://doc.likeshop.cn
  58. // | 微信公众号:likeshop技术社区
  59. // | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
  60. // | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
  61. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  62. // | likeshop团队版权所有并拥有最终解释权
  63. // +----------------------------------------------------------------------
  64. // | author: likeshop.cn.team
  65. // +----------------------------------------------------------------------
  66. import {
  67. getMonthOrderDetail
  68. } from "@/api/user";
  69. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins";
  70. export default {
  71. mixins: [MescrollMixin],
  72. data() {
  73. return {
  74. orderList: [],
  75. upOption: {
  76. empty: {
  77. icon: '/static/images/order_null.png',
  78. tip: '暂无数据~', // 提示
  79. }
  80. },
  81. };
  82. },
  83. onLoad() {
  84. const {month, year} = this.$Route.query
  85. this.year = year;
  86. this.month = Number(month)
  87. uni.setNavigationBarTitle({
  88. title: this.month + '月账单明细'
  89. })
  90. },
  91. methods: {
  92. upCallback(page) {
  93. let pageNum = page.num; // 页码, 默认从1开始
  94. let pageSize = page.size; // 页长, 默认每页10条
  95. let {
  96. year,
  97. month
  98. } = this;
  99. getMonthOrderDetail({
  100. page_size: pageSize,
  101. page_no: pageNum,
  102. year: year,
  103. month: month
  104. }).then(({
  105. data
  106. }) => {
  107. if (page.num == 1) this.orderList = [];
  108. let curPageData = data.list;
  109. let curPageLen = curPageData.length;
  110. let hasNext = !!data.more;
  111. this.orderList = this.orderList.concat(curPageData);
  112. this.mescroll.endSuccess(curPageLen, hasNext);
  113. }).catch(() => {
  114. this.mescroll.endErr()
  115. })
  116. },
  117. }
  118. };
  119. </script>
  120. <style lang="scss">
  121. .monthly-bill-detail .content {
  122. padding: 0 20rpx;
  123. .order-item {
  124. border-radius: 14rpx;
  125. .order-header {
  126. padding: 20rpx 30rpx;
  127. border-bottom: $-solid-border;
  128. .guide-shop-btn {
  129. background: linear-gradient(80deg, #F95F2F 0%, #FF2C3C 100%);
  130. border-radius: 4rpx;
  131. width: 134rpx;
  132. height: 42rpx;
  133. }
  134. }
  135. .order-content {
  136. padding: 20rpx 30rpx 20rpx 20rpx;
  137. border-bottom: $-solid-border;
  138. }
  139. .order-footer {
  140. padding: 20rpx 30rpx 20rpx 20rpx;
  141. .static {
  142. color: #F95F2F;
  143. }
  144. }
  145. }
  146. }
  147. </style>