myOrder.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="container">
  3. <view class="">
  4. <view style="background-color: #03803B;">
  5. <uni-search-bar bgColor="#fff" v-model="cname" placeholder="请输入综合查询" @confirm="custom"
  6. @clear="custom" :radius="100" cancelButton="none">
  7. </uni-search-bar>
  8. </view>
  9. <view style="background-color: #FFFFFF;">
  10. <u-tabs :list="list" :current="current" lineColor="#03803B" :activeStyle="activeStyle"
  11. @click="sectionChange"></u-tabs>
  12. </view>
  13. </view>
  14. <z-paging ref="paging" v-model="dataList" @query="getList" :fixed="false" :auto-show-back-to-top="true"
  15. :empty-view-text="cname ? '未找到相关结果' : '暂无数据'" :hide-empty-view="false"
  16. :auto-show-system-loading="true">
  17. <view style="margin-top: 20rpx;">
  18. <view class="card" v-for="(item,index) in dataList" :key="index" @click="inPage(item,index)">
  19. <view>
  20. <view style="font-size: 26rpx;color: #717171;display: flex;justify-content: space-between;">
  21. <view class="">
  22. {{item.goodsNameJoin}}
  23. </view>
  24. <view style="color: #03803B;">
  25. {{item.xcxStatus}}
  26. </view>
  27. </view>
  28. <view style="height: 1rpx;background: #F1F1F1;margin:20rpx 0">
  29. </view>
  30. <view style="font-size: 26rpx;color: #717171;">
  31. <view style="margin-bottom: 20rx;">
  32. 订单编号:<text style="color: #C4C4C4;">{{item.ordNo}}</text>
  33. </view>
  34. <view style="margin-bottom: 20rx;">
  35. 支付方式:<text style="color: #C4C4C4;">
  36. <!-- {{item.payType && item.payType.indexOf('01') != -1?'扫码支付':'微信支付'}}-->
  37. {{ item.receivableType ? item.receivableType : '' }}
  38. </text>
  39. </view>
  40. <view>
  41. 下单时间:<text style="color: #C4C4C4;">{{item.createTime}}</text>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </z-paging>
  48. </view>
  49. </template>
  50. <script>
  51. import {
  52. appStatusList,
  53. appStatusShareList
  54. } from '@/api/me/myOrder.js'
  55. export default {
  56. data() {
  57. return {
  58. activeStyle: {
  59. color: '#03803B',
  60. fontWeight: 'bold',
  61. },
  62. xcxStatus: '',
  63. current: 0,
  64. cname: "",
  65. list: [{
  66. name: '全部',
  67. status: '',
  68. }
  69. // , {
  70. // name: '未付款',
  71. // status: '未付款',
  72. // badge: {
  73. // value: 0
  74. // }
  75. // }
  76. , {
  77. name: '待发货',
  78. status: '待发货',
  79. }, {
  80. name: '已发货',
  81. status: '已发货',
  82. }, {
  83. name: '已收货',
  84. status: '已收货',
  85. }, {
  86. name: '退款售后',
  87. status: '退款请核,退款中,已取消',
  88. }
  89. ],
  90. dataList: [],
  91. }
  92. },
  93. onLoad(option) {
  94. if(option.xcxStatus){
  95. this.xcxStatus=option.xcxStatus
  96. this.current=option.current
  97. }
  98. },
  99. methods: {
  100. sectionChange(item) {
  101. this.current = item.index;
  102. this.xcxStatus=this.list[item.index].name == "全部" ? "" : this.list[item.index].status
  103. this.$refs.paging.reload()
  104. },
  105. async getList(pageNo, pageSize) {
  106. try {
  107. const obj = {
  108. bsType: 'XS',
  109. retrieval: this.cname,
  110. xcxStatus:this.xcxStatus,
  111. current: pageNo,
  112. size: pageSize
  113. }
  114. const res = await appStatusList(obj)
  115. this.$refs.paging.complete(res.data.records)
  116. } catch (e) {
  117. this.$refs.paging.complete(false)
  118. uni.showToast({
  119. title: '加载失败',
  120. icon: 'none'
  121. })
  122. }
  123. },
  124. //搜索
  125. custom() {
  126. this.$refs.paging.reload()
  127. },
  128. inPage(item, index) {
  129. uni.navigateTo({
  130. url: '/pages/me/orderDetails?id='+item.id,
  131. });
  132. }
  133. }
  134. }
  135. </script>
  136. <style lang="scss" scoped>
  137. .container {
  138. // #ifdef H5
  139. height: calc(100vh - var(--nav-bar, 44px));
  140. // #endif
  141. // #ifdef APP-PLUS
  142. height: 100vh;
  143. // #endif
  144. display: flex;
  145. flex-direction: column;
  146. }
  147. .card {
  148. padding: 40rpx;
  149. background-color: #fff;
  150. margin-top: 20rpx;
  151. }
  152. ::v-deep .uni-searchbar__cancel {
  153. color: #fff;
  154. }
  155. </style>