noPayOrder.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. Sxb010Status: 0
  64. },
  65. list: [],
  66. loadMore: true,
  67. id: '',
  68. flag: '',
  69. };
  70. },
  71. onLoad() {
  72. this.user = this.getUser()
  73. uni.$on('face', res => {
  74. if (this.flag == 1) {
  75. this.http.request({
  76. url: '/level-one-server/app/TbOrder/confirmOrder',
  77. data: {
  78. orderId: this.id
  79. },
  80. success: resp => {
  81. uni.showToast({
  82. title: '订单确认成功'
  83. });
  84. this.refresh();
  85. }
  86. });
  87. } else if (this.flag == 2) {
  88. this.http.request({
  89. url: '/level-one-server/app/TbOrder/applyOrder',
  90. data: {
  91. orderId: this.id
  92. },
  93. success: resp => {
  94. uni.showToast({
  95. title: '进口申报确认成功'
  96. });
  97. this.refresh();
  98. }
  99. });
  100. }
  101. })
  102. },
  103. onShow() {
  104. this.getData();
  105. },
  106. methods: {
  107. getData() {
  108. this.http.request({
  109. url: '/level-one-server/app/TbOrder/getPeopleOrderList',
  110. loading: 'false',
  111. data: this.param,
  112. success: res => {
  113. this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
  114. if (res.data.data) {
  115. this.list = res.data.data;
  116. }
  117. }
  118. });
  119. },
  120. // 点击tab切换
  121. click(e) {
  122. console.log(e);
  123. this.param.peopleConfirmStatus = e.peopleConfirmStatus;
  124. this.param.cooperEntrustStatus = e.cooperEntrustStatus;
  125. this.param.applyConfirmStatus = e.applyConfirmStatus;
  126. this.param.finishStatus = e.finishStatus;
  127. this.param.resaleStatus = e.resaleStatus;
  128. this.param.upStatus = e.upStatus;
  129. this.refresh();
  130. },
  131. detail(item) {
  132. uni.navigateTo({
  133. url: '/pages/market/one/leader/detail?id=' + item.id
  134. });
  135. },
  136. // 刷新数据
  137. refresh() {
  138. this.loadMore = true;
  139. this.param.pageNo = 1;
  140. this.list = [];
  141. this.getData();
  142. }
  143. },
  144. //下拉刷新
  145. onPullDownRefresh() {
  146. setTimeout(() => {
  147. this.refresh();
  148. uni.stopPullDownRefresh();
  149. }, 1000);
  150. },
  151. //上拉加载
  152. onReachBottom() {
  153. if (this.loadMore) {
  154. this.param.pageNo++;
  155. this.getData();
  156. }
  157. }
  158. };
  159. </script>
  160. <style lang="scss">
  161. page {
  162. background-color: $pg;
  163. }
  164. .state {
  165. margin-right: -70px;
  166. }
  167. </style>