orderNotify.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="orderNotice">
  3. <view class="order-list" v-for="(item, index) in init_list" :key="index">
  4. <view class="fl-flex-item order-top">
  5. <view class="fl-flex chelvc-chelvc-align-center">
  6. <image :src="item.orderDetailDTO.orderItemList[0].goodsPic" mode="scaleToFill" />
  7. <view class="f-s-28 margin-left-xs">
  8. {{ item.orderDetailDTO.orderItemList[0].goodsName }}
  9. </view>
  10. </view>
  11. <u-icon name="arrow-right" color="#cbcbcb" size="15" />
  12. </view>
  13. <view>
  14. <view class="fl-flex-item title">
  15. <view class="text-bold text-333">订单{{ item.orderType }}</view>
  16. <view class="f-s-20 text-gray">{{ item.createTimeText }}</view>
  17. </view>
  18. <view class="fl-flex content">
  19. <view class="img">
  20. <image :src="item.orderDetailDTO.merchantInfo.logo" mode="scaleToFill" />
  21. </view>
  22. <view class="text apostrophe">
  23. <span> 订单号:{{ item.orderId }} </span>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <!-- 0->待付款;1-已付款;2->待发货;3->已发货;4->已完成;5->已关闭;6->无效订单 -->
  31. <script>
  32. import { getOrderInform, clearInformFlag } from '@/api/client/message.js';
  33. export default {
  34. data() {
  35. return {
  36. queryParams: {
  37. paging: '1,10',
  38. counting: true,
  39. },
  40. current: 1,
  41. size: 10,
  42. init_list: [],
  43. typeEnum: [
  44. { type: 0, name: '待付款' },
  45. { type: 1, name: '已付款' },
  46. { type: 2, name: '待发货' },
  47. { type: 3, name: '已发货' },
  48. { type: 4, name: '已完成' },
  49. { type: 5, name: '已关闭' },
  50. { type: 6, name: '无效订单' },
  51. ],
  52. };
  53. },
  54. mounted() {
  55. this.handlerInitList();
  56. },
  57. onShow() {
  58. // 已读消息
  59. clearInformFlag({ type: 'ORDER' }).then(res => {});
  60. },
  61. methods: {
  62. handlerInitList() {
  63. getOrderInform(this.queryParams).then(res => {
  64. this.init_list = res.data.records;
  65. this.init_list.map(rs => {
  66. this.typeEnum.map(rc => {
  67. if (rs.orderStatus == rc.type) {
  68. rs.orderType = rc.name;
  69. }
  70. });
  71. });
  72. this.init_list.map(rs => {
  73. rs.createTimeText = uni.$u.timeFormat(rs.createTime, 'yyyy-mm-dd');
  74. });
  75. });
  76. },
  77. },
  78. };
  79. </script>
  80. <style lang="scss" scoped>
  81. .apostrophe {
  82. display: -webkit-box;
  83. overflow: hidden;
  84. -webkit-box-orient: vertical;
  85. -webkit-line-clamp: 2;
  86. }
  87. .orderNotice {
  88. min-height: 100vh;
  89. padding: 20rpx;
  90. box-sizing: border-box;
  91. .order-list {
  92. height: 280rpx;
  93. background-color: #fff;
  94. border-radius: 20rpx;
  95. padding: 20rpx;
  96. margin-bottom: 20rpx;
  97. box-shadow: 0 0 15rpx 0 rgba(0, 0, 0, 0.2);
  98. .order-top {
  99. height: 50rpx;
  100. border-bottom: 2rpx solid #fbfbfb;
  101. padding-bottom: 10rpx;
  102. image {
  103. height: 40rpx;
  104. width: 40rpx;
  105. }
  106. }
  107. .title {
  108. margin: 20rpx 0;
  109. }
  110. .content {
  111. height: 140rpx;
  112. background-color: #f8f8f8;
  113. .img {
  114. height: 140rpx;
  115. width: 140rpx;
  116. image {
  117. height: 140rpx;
  118. width: 140rpx;
  119. }
  120. }
  121. .text {
  122. color: #949494;
  123. font-size: 30rpx;
  124. height: 80rpx;
  125. margin: 30rpx 40rpx 20rpx 20rpx;
  126. }
  127. }
  128. }
  129. }
  130. </style>