order.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <v-page>
  3. <v-header :title="$t('otc.a3')">
  4. <template #right>
  5. <v-picker :list="list" v-model="status" @input="changeStatus">
  6. <template #default="{label}">
  7. <view class="color-light">
  8. {{label||$t('otc.c1')}}
  9. <van-icon name="arrow-down" />
  10. </view>
  11. </template>
  12. </v-picker>
  13. </template>
  14. </v-header>
  15. <van-tabs
  16. :ellipsis="false"
  17. :border="false"
  18. class="border-b"
  19. :active="tab"
  20. @change="tabChange($event.detail.name)"
  21. >
  22. <van-tab :title="$t('otc.h2')" :name="1"></van-tab>
  23. <van-tab :title="$t('otc.h3')" :name="2"></van-tab>
  24. <van-tab :title="$t('otc.h4')" :name="3"></van-tab>
  25. <van-tab :title="$t('otc.h5')" :name="4"></van-tab>
  26. </van-tabs>
  27. <v-paging :ajax="myOrders" ref="scroll" :data="{type:tab,status}" class="layout-main">
  28. <template #box="list">
  29. <van-empty v-if="!$list(list).length" description="" />
  30. <view class="list">
  31. <view
  32. class="item bg-panel-3 box-shadow rounded-sm p-md m-md"
  33. v-for="item in $list(list)"
  34. :key="item.id"
  35. >
  36. <view class="row m-t-sm d-flex align-center">
  37. <view class="label"> {{$t('otc.f5')}} </view>
  38. <view class="flex-fill fn-right color-light">{{ item.order_sn }}</view>
  39. </view>
  40. <view class="row m-t-sm d-flex align-center">
  41. <view class="label"> {{$t('otc.c1')}} </view>
  42. <view class="flex-fill fn-right color-light"> {{ item.status_text }} </view>
  43. </view>
  44. <view class="row m-t-sm d-flex align-center">
  45. <view class="label"> {{$t('otc.c3')}} </view>
  46. <view class="flex-fill fn-right color-light"> {{ item.money }} </view>
  47. </view>
  48. <view class="row m-t-sm d-flex align-center">
  49. <view class="label"> {{$t('otc.b0')}} </view>
  50. <view class="flex-fill fn-right color-light"> {{ item.price }} CNY </view>
  51. </view>
  52. <view class="row m-t-sm d-flex align-center">
  53. <view class="label"> {{$t('otc.c4')}} </view>
  54. <view class="flex-fill fn-right color-light"> {{ item.amount }} </view>
  55. </view>
  56. <view class="row m-t-sm d-flex align-center">
  57. <view class="label"> {{$t('otc.b1')}} </view>
  58. <view class="flex-fill fn-right color-light"> {{ item.seller_payments.pay_type_text }} </view>
  59. </view>
  60. <view class="row m-t-sm d-flex align-center">
  61. <view class="label"> {{$t('otc.h6')}} </view>
  62. <view class="flex-fill fn-right color-light"> {{ item.created_at }} </view>
  63. </view>
  64. <view class="row m-t-sm d-flex align-center">
  65. <view class="label"> {{$t('otc.b2')}} </view>
  66. <view class="flex-fill fn-right color-light">
  67. <v-button type="blue" @click="toDetail(item)" size="mini" class="rounded-xs">
  68. {{$t('otc.h7')}}
  69. </v-button>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </template>
  75. </v-paging>
  76. </v-page>
  77. </template>
  78. <script>
  79. import Otc from "@/api/otc";
  80. export default {
  81. name: "order",
  82. data() {
  83. return {
  84. tab: 1,
  85. status:99
  86. };
  87. },
  88. computed:{
  89. list(){
  90. return [
  91. {
  92. value:99,
  93. label:this.$t('otc.h8')
  94. },
  95. {
  96. value:0,
  97. label:this.$t('otc.h9')
  98. },
  99. {
  100. value:1,
  101. label:this.$t('otc.i0')
  102. },
  103. {
  104. value:2,
  105. label:this.$t('otc.i1')
  106. },
  107. {
  108. value:3,
  109. label:this.$t('otc.c9')
  110. },
  111. {
  112. value:4,
  113. label:this.$t('otc.i2')
  114. },
  115. ]
  116. }
  117. },
  118. methods: {
  119. myOrders:Otc.myOrders,
  120. tabChange(idx){
  121. this.tab = idx
  122. this.$nextTick(()=>{
  123. this.$refs.scroll.ref()
  124. })
  125. },
  126. changeStatus(){
  127. this.$nextTick(()=>{
  128. this.$refs.scroll.ref()
  129. })
  130. },
  131. toDetail(item){
  132. this._router.push({path:'/pages/otc/detail',query:{id:item.id}})
  133. }
  134. },
  135. };
  136. </script>