apply.vue 3.0 KB

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