distributionOrder.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view>
  3. <global-loading />
  4. <view v-if="FindMySalesData.total > 0">
  5. <view v-for="(item, index) in FindMySalesDatalist" :key="index" class="flex-center clientList-box">
  6. <view class="directAward-box font-color-656 fs26">
  7. <view class="directAward-icon flex-row-plus flex-items flex-sp-between" @click="arrowTypeChange(index)">
  8. <view class="flex-column-plus font-color-333 fs30">
  9. <label class="orderId-box">订单号:{{ item.orderId }}</label>
  10. <view class="orderId-box mar-top-20">
  11. 佣金:<label class="font-color-C5AA7B">¥{{ item.commission }}</label>
  12. </view>
  13. </view>
  14. <view>
  15. <image v-if="item.ifOpen == false" class="arrow-down" src="../../static/images/origin/arrowDownIcon.png"></image>
  16. <image v-if="item.ifOpen == true" class="arrow-down" src="../../static/images/origin/arrowUpIcon.png"></image>
  17. </view>
  18. </view>
  19. <view v-if="item.ifOpen == true" class="upBox">
  20. <view class="flex-row-plus flex-items mar-top-30 flex-sp-between">
  21. <label class="orderId-box font-color-999 fs26">商品数:{{ item.products }}</label>
  22. <label class="orderId-box font-color-999 fs26">实付金额:¥{{ item.price }}</label>
  23. </view>
  24. <view class="flex-row-plus flex-items mar-top-30 flex-sp-between">
  25. <label class="orderId-box font-color-999 fs26">下单人:{{ item.customerName }}</label>
  26. <label class="commission-box mar-left-70 font-color-999 fs26">状态:<text class="state" :class="{ current: item.state == 0 }">{{ item.state == 0 ? '未结算' : '已结算' }}</text></label>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view v-else class="emptyCart-box flex-items-plus flex-column">
  33. <image class="emptyCart-img" src="../../static/images/origin/bgnull.png"></image>
  34. <label class="font-color-999 fs26 mar-top-30">这里空空如也~</label>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. const NET = require('../../utils/request')
  40. const API = require('../../config/api')
  41. export default {
  42. data() {
  43. return {
  44. shopId: 0,
  45. distributorId: 0,
  46. page: 1,
  47. pageSize: 20,
  48. FindMySalesData: [],
  49. FindMySalesDatalist: []
  50. }
  51. },
  52. onLoad(options) {
  53. this.shopId = options.shopId
  54. this.distributorId = options.distributorId
  55. this.getSalesOrderPage()
  56. },
  57. onReachBottom() {
  58. if (this.loadingType == 1) {
  59. uni.stopPullDownRefresh()
  60. } else {
  61. this.page = this.page + 1
  62. this.getSalesOrderPage()
  63. }
  64. },
  65. methods: {
  66. getSalesOrderPage() {
  67. // uni.showLoading({
  68. // mask: true,
  69. // title: '加载中...'
  70. // })
  71. NET.request(API.FindMySalesPage, {
  72. shopId: this.shopId,
  73. distributorId: this.distributorId,
  74. page: this.page,
  75. pageSize: this.pageSize
  76. }, 'GET').then((res) => {
  77. // uni.hideLoading()
  78. if (res.data.list.length == 0) {
  79. this.loadingType = 1
  80. this.page = this.page
  81. }
  82. this.FindMySalesDatalist = this.FindMySalesDatalist.concat(res.data.list)
  83. this.FindMySalesData = res.data
  84. })
  85. .catch((res) => {
  86. // uni.hideLoading()
  87. })
  88. },
  89. arrowTypeChange(arrowTypeId) {
  90. this.FindMySalesData.list[arrowTypeId].ifOpen = this.FindMySalesData.list[arrowTypeId].ifOpen != true
  91. }
  92. }
  93. }
  94. </script>
  95. <style lang="scss">
  96. page {
  97. background: #F8F8F8;
  98. }
  99. .emptyCart-box{
  100. margin-top: 70upx;
  101. .emptyCart-img{
  102. width: 216rpx;
  103. height: 156rpx;
  104. }
  105. }
  106. .directAward-box {
  107. width: 95%;
  108. display: flex;
  109. justify-content: flex-start;
  110. flex-direction: column;
  111. background-color: #FFFFFF;
  112. padding: 40upx 20upx;
  113. margin-top: 30upx;
  114. .orderId-box {
  115. width: 320upx;
  116. }
  117. .commission-box {
  118. width: 340upx;
  119. }
  120. .state {
  121. color: #16BB89;
  122. }
  123. .current {
  124. color: #C83732 !important;
  125. }
  126. .arrow-down {
  127. width: 24upx;
  128. height: 24upx;
  129. }
  130. .upBox {
  131. border-top: 1upx solid #EDEDED;
  132. margin-top: 30upx;
  133. }
  134. }
  135. </style>