noUpOrder.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view>
  3. <!--<view class="tab">
  4. <u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
  5. </view>-->
  6. <view class="goodsList">
  7. <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
  8. <view class="title">{{ item.enterpriseName }}
  9. <!--<view class="state"
  10. v-if="item.finishStatus == 0">
  11. <text class="icon">&#xe830;</text>
  12. <text>未过卡3</text>
  13. </view>
  14. <view class="state"
  15. v-if="item.finishStatus == 1">
  16. <text class="icon">&#xe830;</text>
  17. <text>已过卡3</text>
  18. </view>-->
  19. </view>
  20. <view class="con">
  21. <view class="productName omit">{{ item.goodsNames }}</view>
  22. <view class="desc omit">
  23. <text>重量 {{ item.totalWeight }}{{ item.goodsUnit }}</text>
  24. <text>{{ item.tradeAreaName }}</text>
  25. </view>
  26. <view class="price">¥ {{ item.totalPrice }}</view>
  27. </view>
  28. <view class="clear"></view>
  29. <view class="op">
  30. <view class="date">{{ item.createTime }}</view>
  31. </view>
  32. </view>
  33. <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
  34. <u-empty v-if="!loadMore && list.length == 0"></u-empty>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. user: {},
  43. tab: [{
  44. name: '全部',
  45. peopleConfirmStatus: '', //边民确认状态
  46. cooperEntrustStatus: '', //互助委托申报确认状态
  47. applyConfirmStatus: '', //进口申报确认状态
  48. finishStatus: '', //订单完成状态
  49. resaleStatus: '' //订单转售状态
  50. },
  51. {
  52. name: '未过卡3',
  53. finishStatus: 0,
  54. },
  55. {
  56. name: '已过卡3',
  57. finishStatus: 1,
  58. },
  59. ],
  60. param: {
  61. pageNo: 1,
  62. pageSize: 10,
  63. finishStatus: 1,
  64. upStatus: 1
  65. },
  66. list: [],
  67. loadMore: true,
  68. id: '',
  69. flag: '',
  70. };
  71. },
  72. onLoad() {
  73. this.user = this.getUser()
  74. uni.$on('face', res => {
  75. if (this.flag == 1) {
  76. this.http.request({
  77. url: '/level-one-server/app/TbOrder/confirmOrder',
  78. data: {
  79. orderId: this.id
  80. },
  81. success: resp => {
  82. uni.showToast({
  83. title: '订单确认成功'
  84. });
  85. this.refresh();
  86. }
  87. });
  88. } else if (this.flag == 2) {
  89. this.http.request({
  90. url: '/level-one-server/app/TbOrder/applyOrder',
  91. data: {
  92. orderId: this.id
  93. },
  94. success: resp => {
  95. uni.showToast({
  96. title: '进口申报确认成功'
  97. });
  98. this.refresh();
  99. }
  100. });
  101. }
  102. })
  103. },
  104. onShow() {
  105. this.getData();
  106. },
  107. methods: {
  108. getData() {
  109. this.http.request({
  110. url: '/level-one-server/app/TbOrder/getPeopleOrderList',
  111. loading: 'false',
  112. data: this.param,
  113. success: res => {
  114. this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
  115. if (res.data.data) {
  116. this.list = res.data.data;
  117. }
  118. }
  119. });
  120. },
  121. // 点击tab切换
  122. click(e) {
  123. console.log(e);
  124. this.param.peopleConfirmStatus = e.peopleConfirmStatus;
  125. this.param.cooperEntrustStatus = e.cooperEntrustStatus;
  126. this.param.applyConfirmStatus = e.applyConfirmStatus;
  127. this.param.finishStatus = e.finishStatus;
  128. this.param.resaleStatus = e.resaleStatus;
  129. this.param.upStatus = e.upStatus;
  130. this.refresh();
  131. },
  132. detail(item) {
  133. uni.navigateTo({
  134. url: '/pages/market/one/leader/detail?id=' + item.id
  135. });
  136. },
  137. // 刷新数据
  138. refresh() {
  139. this.loadMore = true;
  140. this.param.pageNo = 1;
  141. this.list = [];
  142. this.getData();
  143. }
  144. },
  145. //下拉刷新
  146. onPullDownRefresh() {
  147. setTimeout(() => {
  148. this.refresh();
  149. uni.stopPullDownRefresh();
  150. }, 1000);
  151. },
  152. //上拉加载
  153. onReachBottom() {
  154. if (this.loadMore) {
  155. this.param.pageNo++;
  156. this.getData();
  157. }
  158. }
  159. };
  160. </script>
  161. <style lang="scss">
  162. page {
  163. background-color: $pg;
  164. }
  165. .state {
  166. margin-right: -70px;
  167. }
  168. </style>