order.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view>
  3. <navigation-bar title="订单列表" background-color="#0081ff" front-color="#ffffff" :left-button="null" />
  4. <u-tabs lineWidth="50" :list="list" itemStyle="height:90rpx;width: 100rpx;" :is-scroll="false"
  5. :current="current" @change="change"></u-tabs>
  6. <u-list style="margin-top: 10rpx;padding: 15rpx;" @scrolltolower="scrolltolower">
  7. <u-list-item v-for="(item, index) in orderList" :key="index">
  8. <view class="item-box">
  9. <view class="goods-item">
  10. <view class="good-row">
  11. <view>
  12. <view class="shop">
  13. <!-- background-color: #eaf1fe; -->
  14. <view class="shop-icon">
  15. <uni-icons type="shop" color="#0081ff" size="26"></uni-icons>
  16. </view>
  17. <text style="font-size: 35rpx; margin-left: 8rpx;">{{item.shopName}}</text>
  18. </view>
  19. </view>
  20. <view class="status" v-if="item.finishStatus">
  21. <text style="color: #D3D3D3;">已完成</text>
  22. </view>
  23. <view class="status" v-else-if="item.resaleStatus">
  24. <text style="color: #0e87ff;">组员确认中</text>
  25. </view>
  26. <view class="status" v-else-if="item.resaleStatus">
  27. <text style="color: #0e87ff;">进境确认中</text>
  28. </view>
  29. <view class="status" v-else-if="item.resaleStatus">
  30. <text style="color: #0e87ff;">进境申报中</text>
  31. </view>
  32. <view class="status" v-else-if="item.resaleStatus">
  33. <text style="color: #00FF7F;">已进口</text>
  34. </view>
  35. <view class="status" v-else>
  36. <text style="color: #ff660d;">商家未确认</text>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="goods-item">
  41. <view class="good-row">
  42. <view>
  43. <u--image radius="10" :showLoading="true" src="" width="250rpx"
  44. height="210rpx"></u--image>
  45. </view>
  46. <view class="des">
  47. <view style="font-size: 34rpx; height: 100rpx;">{{item.goodsNames}}</view>
  48. <!-- <view style="font-size: 34rpx;">[老板力荐]鲜活小龙虾(帮剪头去虾线)约250g/份</view> -->
  49. <view class="subtit">
  50. <text style="margin-right: 20rpx;">{{item.totalWeight}}吨</text>
  51. <text>{{item.tradeAreaName}}</text>
  52. </view>
  53. <view class="subtit">
  54. {{item.tradeTime}}
  55. <!-- 2023-08-03 16:41 -->
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="goods-item">
  61. <view class="footer-item">
  62. <view class="price">¥{{item.totalPrice}}</view>
  63. </view>
  64. <view class="footer-item">
  65. <view style="margin: 15rpx 0rpx;"><button type="error" size="mini" :plain="true">查看详情</button></view>
  66. </view>
  67. </view>
  68. </view>
  69. </u-list-item>
  70. </u-list>
  71. </view>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. list: [{
  78. name: '全部'
  79. }, {
  80. name: '待确认'
  81. }, {
  82. name: '申报中'
  83. }, {
  84. name: '已完成'
  85. }, {
  86. name: '转售中'
  87. }, {
  88. name: '已取消'
  89. }],
  90. current: 0,
  91. orderList: [],
  92. status: 0
  93. }
  94. },
  95. onLoad() {
  96. this.getOrderList()
  97. },
  98. methods: {
  99. change(item) {
  100. this.current = item.index
  101. },
  102. getOrderList() {
  103. this.http.request({
  104. url: '/level-one-server/app/TbOrder/getList',
  105. success: res => {
  106. this.orderList = res.data.data;
  107. }
  108. });
  109. },
  110. scrolltolower() {
  111. this.getCartList()
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss">
  117. // page{
  118. // padding: 15rpx;
  119. // }
  120. .goods-item {
  121. margin-bottom: 15rpx;
  122. }
  123. .good-row {
  124. display: flex;
  125. align-items: center;
  126. }
  127. .shop {
  128. display: flex;
  129. align-items: center;
  130. width: 480rpx;
  131. }
  132. .shop-icon {
  133. width: 60rpx;
  134. height: 60rpx;
  135. border-radius: 30rpx;
  136. background-color: #eaf1fe;
  137. display: flex;
  138. align-items: center;
  139. justify-content: center;
  140. }
  141. .status {
  142. width: 200rpx;
  143. display: flex;
  144. align-items: center;
  145. justify-content: flex-end;
  146. }
  147. .des {
  148. margin-left: 20rpx;
  149. position: relative;
  150. top: 1rpx;
  151. height: 200rpx;
  152. }
  153. .subtit {
  154. font-size: 28rpx;
  155. color: #9C9C9C;
  156. margin: 10rpx;
  157. }
  158. .footer-item {
  159. display: flex;
  160. justify-content: flex-end;
  161. margin-top: -15rpx;
  162. margin-bottom: 5rpx;
  163. }
  164. .price{
  165. font-size: 30rpx;
  166. }
  167. .item-box {
  168. height: 370rpx;
  169. width: 85%;
  170. padding: 30rpx;
  171. border: 1rpx #888 solid;
  172. margin: 10rpx 15rpx;
  173. border-radius: 10rpx;
  174. }
  175. </style>