orderFormManage.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view class="page">
  3. <view class="tab-1" slot="center">
  4. <u--input
  5. style="background-color: #f4f4f4"
  6. placeholder="搜索订单号/手机号/商品/姓名"
  7. shape="circle"
  8. prefixIcon="search"
  9. prefixIconStyle="font-size: 22px;color: #909399"
  10. ></u--input>
  11. <view class="top-tab">
  12. <view
  13. :class="{ commodity: follow == '' }"
  14. class="tab"
  15. @click="tabSwitch('')"
  16. >
  17. 全部
  18. </view>
  19. <view
  20. :class="{ commodity: follow == 'unreview' }"
  21. class="tab"
  22. @click="tabSwitch('unreview')"
  23. >
  24. 待审核
  25. </view>
  26. <view
  27. :class="{ commodity: follow == 'unfill' }"
  28. class="tab"
  29. @click="tabSwitch('unfill')"
  30. >
  31. 待缴纳保证金
  32. </view>
  33. <view
  34. :class="{ commodity: follow == 'merdelivered' }"
  35. class="tab"
  36. @click="tabSwitch('merdelivered')"
  37. >
  38. 待团长发货
  39. </view>
  40. <view
  41. :class="{ commodity: follow == 'undelivered' }"
  42. class="tab"
  43. @click="tabSwitch('undelivered')"
  44. >
  45. 待总部发货
  46. </view>
  47. <view
  48. :class="{ commodity: follow == 'delivered' }"
  49. class="tab"
  50. @click="tabSwitch('delivered')"
  51. >
  52. 已发货
  53. </view>
  54. </view>
  55. </view>
  56. <view class="center">
  57. <view v-for="item in orderList" :key="item.status">
  58. <DetailCard :itemInfo="item" @toInformation="toInformation" />
  59. </view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import DetailCard from "./component/detailCard.vue";
  65. export default {
  66. components: {
  67. DetailCard,
  68. },
  69. data() {
  70. return {
  71. follow: "",
  72. orderList: [],
  73. page: 1,
  74. };
  75. },
  76. methods: {
  77. tabSwitch(num) {
  78. this.follow = num;
  79. this.getGoodsList();
  80. },
  81. toInformation(item) {
  82. if (item.status == "unreview") return;
  83. uni.navigateTo({
  84. url: `/pageD/orderDetail/orderDetail?orderStatus=${item.id}&status=${item.status}`,
  85. });
  86. },
  87. //获取订单列表
  88. getGoodsList() {
  89. uni.$u.http
  90. .post(`/api/order/merchant_order`, {
  91. page: this.page,
  92. limit: 10,
  93. status: this.follow,
  94. })
  95. .then((res) => {
  96. this.orderList = res.data;
  97. });
  98. },
  99. },
  100. computed: {
  101. i18n() {
  102. return this.$t("index");
  103. },
  104. },
  105. mounted() {
  106. this.getGoodsList();
  107. uni.setNavigationBarTitle({
  108. title: "订单管理",
  109. });
  110. },
  111. };
  112. </script>
  113. <style scoped lang="scss">
  114. .page {
  115. .tab-1 {
  116. padding: 0 24rpx;
  117. background-color: #fff;
  118. ::v-deep .u-input {
  119. background-color: #f4f4f4;
  120. }
  121. .top-tab {
  122. margin-top: 20rpx;
  123. display: flex;
  124. justify-content: space-between;
  125. overflow-y: auto;
  126. padding-bottom: 10rpx;
  127. // flex-shrink: 1;
  128. // width: 100vw;
  129. .tab {
  130. margin-right: 40rpx;
  131. font-size: 26rpx;
  132. color: rgba(34, 34, 34, 0.8);
  133. flex-shrink: 0;
  134. height: 44rpx;
  135. display: flex;
  136. align-items: flex-end;
  137. }
  138. .commodity {
  139. position: relative;
  140. font-weight: 600;
  141. font-size: 32rpx;
  142. }
  143. .commodity::before {
  144. content: "";
  145. display: block;
  146. height: 8rpx;
  147. width: 100%;
  148. background: linear-gradient(to right, #f83224, #fff);
  149. position: absolute;
  150. bottom: 5rpx;
  151. opacity: 0.8;
  152. }
  153. }
  154. }
  155. .center {
  156. padding: 20rpx 24rpx;
  157. }
  158. }
  159. </style>