orderFormManage.vue 4.0 KB

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