apply.vue 3.5 KB

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