people.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <view>
  3. <mcalendar v-model="show" @confirm="confirm" @clear="clear" @today="today"></mcalendar>
  4. <view class="goodsList">
  5. <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
  6. <view class="title">
  7. <view style="font-size: 14px;">{{ item.enterpriseName }}</view>
  8. <view class="state" v-if="item.peopleConfirmStatus == 0">
  9. <text class="icon">&#xe830;</text>
  10. <text>未确认</text>
  11. </view>
  12. <view class="state" v-if="item.peopleConfirmStatus == 1">
  13. <text class="icon" style="color: #13ce66">&#xe830;</text>
  14. <text>已确认</text>
  15. </view>
  16. </view>
  17. <!-- <image src="../../../../static/news.jpg" mode="aspectFill" class="pic"></image> -->
  18. <view class="con">
  19. <view class="productName omit">{{ item.goodsNames }}</view>
  20. <view class="desc omit">
  21. <text>重量 {{ item.totalWeight }}kg</text>
  22. <text>{{ item.tradeAreaName }}</text>
  23. </view>
  24. <view class="price">¥ {{ item.totalPrice }}</view>
  25. </view>
  26. <view class="clear"></view>
  27. <view class="op">
  28. <view class="date">确认时间 {{ item.peopleConfirmTime }}</view>
  29. <template v-if="item.peopleConfirmStatus == 0">
  30. <view class="an" style="color: #f44336" @click.stop="confirmOrder(item.id)">边民确认</view>
  31. </template>
  32. </view>
  33. </view>
  34. <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
  35. <u-empty v-if="!loadMore && list.length == 0"></u-empty>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. show: false,
  44. param: {
  45. pageNo: 1,
  46. pageSize: 10,
  47. //peopleConfirmStatus: 0, //边民确认状态
  48. // cooperEntrustStatus: 0, //互助委托申报确认状态
  49. // applyConfirmStatus: 0, //进口申报确认状态
  50. finishStatus: 0, //订单完成状态
  51. resaleStatus: 0 //订单转售状态
  52. },
  53. list: [],
  54. loadMore: true
  55. };
  56. },
  57. onLoad() {
  58. this.getData();
  59. },
  60. methods: {
  61. getData() {
  62. this.http.request({
  63. url: '/level-one-server/app/TbOrder/getList',
  64. loading: 'false',
  65. data: this.param,
  66. success: res => {
  67. this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
  68. if (res.data.data) {
  69. this.list.push(...res.data.data);
  70. }
  71. }
  72. });
  73. },
  74. //边民确认订单
  75. confirmOrder(id) {
  76. this.http.request({
  77. url: '/level-one-server/app/TbOrder/confirmOrder',
  78. data: { orderId: id },
  79. success: resp => {
  80. uni.showToast({ title: '订单确认成功' });
  81. this.refresh();
  82. }
  83. });
  84. },
  85. confirm(e) {
  86. this.param.dateBegin = e[0];
  87. this.param.dateEnd = e[1];
  88. this.show = false;
  89. this.refresh();
  90. },
  91. today(e) {
  92. this.param.dateBegin = e[0];
  93. this.param.dateEnd = e[1];
  94. this.refresh();
  95. },
  96. clear() {
  97. this.param.dateBegin = '';
  98. this.param.dateEnd = '';
  99. this.refresh();
  100. },
  101. detail(item) {
  102. uni.navigateTo({ url: '/pages/market/one/leader/detail?id=' + item.id });
  103. },
  104. // 刷新数据
  105. refresh() {
  106. this.loadMore = true;
  107. this.param.pageNo = 1;
  108. this.list = [];
  109. this.getData();
  110. }
  111. },
  112. //下拉刷新
  113. onPullDownRefresh() {
  114. setTimeout(() => {
  115. this.refresh();
  116. uni.stopPullDownRefresh();
  117. }, 1000);
  118. },
  119. //上拉加载
  120. onReachBottom() {
  121. if (this.loadMore) {
  122. this.param.pageNo++;
  123. this.getData();
  124. }
  125. }
  126. };
  127. </script>
  128. <style lang="scss">
  129. page {
  130. background-color: $pg;
  131. }
  132. .state {
  133. margin-right: -70px;
  134. }
  135. </style>