多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.1 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <view>
  3. <global-loading />
  4. <view v-if="FindMySalesData.total>0">
  5. <view class="flex-center clientList-box" v-for="(item, index) in FindMySalesDatalist" :key="index">
  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">{{$t('common.orderno')}}{{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="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-16/5533f3baf2184f86b5ef88ed6c400713_arrowDownIcon.png"></image>
  16. <image v-if="item.ifOpen == true" class="arrow-down" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-16/22f5f56f53ec4f558a6268e4fef7e1f5_arrowUpIcon.png"></image>
  17. </view>
  18. </view>
  19. <view class="upBox" v-if="item.ifOpen == true">
  20. <view class="flex-row-plus flex-items mar-top-30 flex-sp-between">
  21. <label class="orderId-box font-color-999 fs26">{{$t('common.productnum')}}{{item.products}}</label>
  22. <label class="orderId-box font-color-999 fs26">{{$t('Synthesis')}}¥{{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">{{$t('common.buyer')}}{{item.customerName}}</label>
  26. <label class="commission-box mar-left-70 font-color-999 fs26">{{$t('common.status')}}<text class="state" :class="{current: item.state==0}">{{item.state===0?$t('common.unsettled') : $t('common.settled')}}</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="https://ceres.zkthink.com/static/images/collectEmpty.png"></image>
  34. <label class="font-color-999 fs26 mar-top-30">{{$t('client.emptydata')}}</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: function(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. // title: '加载中...'
  69. // })
  70. NET.request(API.FindMySalesPage, {
  71. shopId: this.shopId,
  72. distributorId: this.distributorId,
  73. page:this.page,
  74. pageSize:this.pageSize,
  75. }, 'GET').then(res => {
  76. uni.hideLoading()
  77. if(res.data.list.length == 0){
  78. this.loadingType = 1
  79. this.page = this.page
  80. }
  81. this.FindMySalesDatalist = this.FindMySalesDatalist.concat(res.data.list)
  82. this.FindMySalesData = res.data
  83. }).catch(res => {
  84. uni.hideLoading()
  85. })
  86. },
  87. arrowTypeChange(arrowTypeId) {
  88. this.FindMySalesDatalist[arrowTypeId].ifOpen = this.FindMySalesDatalist[arrowTypeId].ifOpen == true ? false : true
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss">
  94. page {
  95. background: #F8F8F8;
  96. }
  97. .emptyCart-box{
  98. margin-top: 70upx;
  99. .emptyCart-img{
  100. margin-top: 30%;
  101. width: 198rpx;
  102. height: 183rpx;
  103. }
  104. }
  105. .directAward-box {
  106. width: 95%;
  107. display: flex;
  108. justify-content: flex-start;
  109. flex-direction: column;
  110. background-color: #FFFFFF;
  111. padding: 40upx 20upx;
  112. margin-top: 30upx;
  113. .orderId-box {
  114. width: 320upx;
  115. }
  116. .commission-box {
  117. width: 340upx;
  118. }
  119. .state {
  120. color: #16BB89;
  121. }
  122. .current {
  123. color: #C83732 !important;
  124. }
  125. .arrow-down {
  126. width: 24upx;
  127. height: 24upx;
  128. }
  129. .upBox {
  130. border-top: 1upx solid #EDEDED;
  131. margin-top: 30upx;
  132. }
  133. }
  134. </style>