apply.vue 3.4 KB

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