refundMoneyList.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view class="content">
  3. <view class="topView">
  4. <!-- tab -->
  5. <view class="tab">
  6. <view class="tabLine" :class="{tabActive:tabIndex==1}" @click="tabClick(1)">待处理</view>
  7. <view class="tabLine" :class="{tabActive:tabIndex==2}" @click="tabClick(2)">申请记录</view>
  8. </view>
  9. <!-- 搜索 -->
  10. <view class="searchBoxBg">
  11. <searchBox placeholder="订单号、售后单号" @search='search($event)'></searchBox>
  12. </view>
  13. </view>
  14. <!-- list -->
  15. <view class="listContent">
  16. <view class="itemBg" v-for="(item,index) in itemData">
  17. <view class="firstView">
  18. <view style="font-size: 24rpx; color: #999999;">申请单号:202111203368</view>
  19. <view class="rightView">
  20. <image src="../../static/img/icon_change.png" mode="" style="width: 30rpx; height: 30rpx; margin-right: 10rpx;"></image>
  21. <view style="color: #666666; font-size: 24rpx;">更换门店</view>
  22. </view>
  23. </view>
  24. <view class="shopName">更换前门店:这是门店名称</view>
  25. <view class="shopName">更换后门店:这是门店名称</view>
  26. <view class="stateView">待平台处理</view>
  27. <view style="display: flex; justify-content: flex-end;">
  28. <view class="detail">更换详情</view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 上拉 加载更多 -->
  33. <view class="noMore" v-if="noMoreShow">没有更多数据</view>
  34. <!-- 无数据空白页 -->
  35. <view class="nodataBox" v-if="itemData.length == 0">
  36. <image src="../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
  37. <view class="noTxt">暂无数据</view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import searchBox from '@/components/searchBox/searchBox.vue'
  43. export default {
  44. components: {
  45. searchBox
  46. },
  47. data() {
  48. return {
  49. searchValue: '',
  50. page: 1,
  51. tabIndex: 1,
  52. itemData:[],
  53. noMoreShow: false,
  54. }
  55. },
  56. methods: {
  57. tabClick(num) {
  58. this.tabIndex = num;
  59. // this.page = 1;
  60. // this.getData()
  61. },
  62. search(val) {
  63. // console.log(val);
  64. this.searchValue = val
  65. // this.page = 1
  66. // this.getData()
  67. },
  68. getData() {
  69. uni.showLoading({
  70. title: '加载中'
  71. })
  72. let url = 'accompany/SuperAccounts/queryMyteam',
  73. params = {
  74. page: this.page,
  75. limit: 10,
  76. name: this.searchValue
  77. }
  78. this.$http(url, params, 'GET').then(res => {
  79. this.count = Number(res.data.count)
  80. var list = res.data.Items
  81. // 处理 undefined和null转为空白字符串
  82. list.forEach((item, index) => {
  83. for (const key in item) {
  84. item[key] = this.$praseStrEmpty(item[key])
  85. }
  86. })
  87. if (this.page == 1) {
  88. this.shopData = list
  89. } else {
  90. this.shopData = this.shopData.concat(list)
  91. }
  92. if (list.length < 10) {
  93. this.noMoreShow = false
  94. } else {
  95. this.noMoreShow = true
  96. }
  97. })
  98. }
  99. },
  100. onPullDownRefresh() {
  101. this.page = 1;
  102. this.getData()
  103. setTimeout(function() {
  104. uni.stopPullDownRefresh();
  105. }, 1000);
  106. },
  107. onReachBottom() {
  108. this.page++;
  109. this.getData()
  110. }
  111. }
  112. </script>
  113. <style>
  114. .content {
  115. background: #F4F5F7;
  116. min-height: 100vh;
  117. }
  118. .topView {
  119. background: #FFFFFF;
  120. position: fixed;
  121. width: 100%;
  122. height: 210rpx;
  123. z-index: 99;
  124. }
  125. .tab {
  126. background: #FFFFFF;
  127. display: flex;
  128. justify-content: space-around;
  129. line-height: 90rpx;
  130. height: 90rpx;
  131. width: 100%;
  132. }
  133. .tabLine {
  134. text-align: center;
  135. }
  136. .tabActive {
  137. color: #FF4F00;
  138. border-bottom: 4rpx solid #FF4F00;
  139. }
  140. .searchBoxBg {
  141. width: 100%;
  142. background-color: #FFFFFF;
  143. border-top: 1rpx solid #EEEEEE;
  144. }
  145. .searchBox {
  146. display: flex;
  147. height: 72rpx;
  148. margin: 24rpx;
  149. background-color: #F4F5F7;
  150. border-radius: 36rpx;
  151. }
  152. .listContent{
  153. padding-top: 210rpx;
  154. padding-bottom: 20rpx;
  155. }
  156. .itemBg {
  157. background-color: #FFFFFF;
  158. margin: 20rpx 24rpx;
  159. border-radius: 10rpx;
  160. padding: 20rpx;
  161. }
  162. .firstView{
  163. padding-bottom: 20rpx;
  164. display: flex;
  165. justify-content: space-between;
  166. }
  167. .rightView{
  168. display: flex;
  169. align-items: center;
  170. }
  171. .shopName{
  172. padding-bottom: 20rpx;
  173. color: #333333;
  174. font-size: 30rpx;
  175. }
  176. .stateView{
  177. background-color: #F8F9FB;
  178. border-radius: 10rpx;
  179. color: #333333;
  180. font-size: 26rpx;
  181. padding: 20rpx;
  182. }
  183. .detail{
  184. color: #FF2400;
  185. font-size: 26rpx;
  186. margin-top: 20rpx;
  187. width: 150rpx;
  188. height: 56rpx;
  189. line-height: 56rpx;
  190. text-align: center;
  191. border-radius: 36rpx;
  192. border: 1rpx #FF2400 solid;
  193. }
  194. /* 空白页css */
  195. .nodataBox {
  196. text-align: center;
  197. }
  198. .nodataImg {
  199. width: 400rpx;
  200. padding-top: 300rpx;
  201. }
  202. .noTxt {
  203. font-size: 30rpx;
  204. color: #999999;
  205. padding-top: 50rpx;
  206. }
  207. .noMore {
  208. text-align: center;
  209. line-height: 50rpx;
  210. color: #999999;
  211. font-size: 28rpx;
  212. }
  213. </style>