apply.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. apply: 0, //订单申报状态
  48. finishStatus: 0, //订单完成状态
  49. resaleStatus: 0 //订单转售状态
  50. },
  51. list: [],
  52. loadMore: true,
  53. };
  54. },
  55. onLoad() {
  56. this.getData();
  57. },
  58. methods: {
  59. getData() {
  60. this.http.request({
  61. url: '/level-one-server/app/TbOrder/getList',
  62. loading: 'false',
  63. data: this.param,
  64. success: res => {
  65. this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
  66. if (res.data.data) {
  67. this.list.push(...res.data.data);
  68. }
  69. }
  70. });
  71. },
  72. //边民进口申报确认
  73. applyOrder(id) {
  74. this.http.request({
  75. url: '/level-one-server/app/TbOrder/applyOrder',
  76. data: { orderId: id },
  77. success: resp => {
  78. uni.showToast({ title: '进口申报确认成功' });
  79. this.refresh();
  80. }
  81. });
  82. },
  83. detail(item) {
  84. uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
  85. },
  86. // 刷新数据
  87. refresh() {
  88. this.loadMore = true;
  89. this.param.pageNo = 1;
  90. this.list = [];
  91. this.getData();
  92. }
  93. },
  94. //下拉刷新
  95. onPullDownRefresh() {
  96. setTimeout(() => {
  97. this.refresh();
  98. uni.stopPullDownRefresh();
  99. }, 1000);
  100. },
  101. //上拉加载
  102. onReachBottom() {
  103. if (this.loadMore) {
  104. this.param.pageNo++;
  105. this.getData();
  106. }
  107. }
  108. };
  109. </script>
  110. <style lang="scss">
  111. page {
  112. background-color: $pg;
  113. }
  114. .state{
  115. margin-right: -70px;
  116. }
  117. </style>