refundMoneyList.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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;">申请单号:{{item.ServiceCode}}</view>
  19. <view class="rightView">
  20. <image src="../../static/img/icon_tuikuan2.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">{{item.ShopName}}</view>
  25. <view class="itemName">{{item.itemNameList}},{{item.goodNameList}}</view>
  26. <!-- ServiceState":1待处理2退款成功3退款关闭 -->
  27. <view class="stateView" v-if="item.ServiceState==1">待平台处理</view>
  28. <view class="stateView" v-if="item.ServiceState==2">退款成功 退款金额¥{{item.Money}}元</view>
  29. <view class="stateView" v-if="item.ServiceState==3">退款关闭</view>
  30. <view style="display: flex; justify-content: flex-end;">
  31. <view class="detail" @click="goDetail(item.ID)">退款详情</view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 上拉 加载更多 -->
  36. <view class="noMore" v-if="noMoreShow">没有更多数据</view>
  37. <!-- 无数据空白页 -->
  38. <view class="nodataBox" v-if="itemData.length == 0">
  39. <image src="../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
  40. <view class="noTxt">暂无数据</view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import searchBox from '@/components/searchBox/searchBox.vue'
  46. export default {
  47. components: {
  48. searchBox
  49. },
  50. data() {
  51. return {
  52. searchValue: '',
  53. page: 1,
  54. tabIndex: 1,
  55. itemData:[],
  56. noMoreShow: false,
  57. }
  58. },
  59. onLoad() {
  60. this.getData();
  61. },
  62. onShow() {
  63. this.page = 1
  64. this.getData();
  65. },
  66. methods: {
  67. goDetail(id){
  68. uni.navigateTo({
  69. url:'refundMoneyDetail?id='+id
  70. })
  71. },
  72. tabClick(num) {
  73. this.tabIndex = num;
  74. this.page = 1;
  75. this.getData()
  76. },
  77. search(val) {
  78. // console.log(val);
  79. this.searchValue = val
  80. this.page = 1
  81. this.getData()
  82. },
  83. getData() {
  84. uni.showLoading({
  85. title: '加载中'
  86. })
  87. var serviceStateStr = ''
  88. if (this.tabIndex == 1) {
  89. serviceStateStr = '1'
  90. }
  91. let url = 'worldKeepCar/keepCarMy/listTMSheetAfterServicePage',
  92. params = {
  93. page: this.page,
  94. limit: 10,
  95. name: this.searchValue,
  96. serviceState:serviceStateStr,
  97. }
  98. this.$http(url, params, 'GET').then(res => {
  99. uni.hideLoading()
  100. var list = res.data.Items
  101. // 处理 undefined和null转为空白字符串
  102. list.forEach((item, index) => {
  103. for (const key in item) {
  104. item[key] = this.$praseStrEmpty(item[key])
  105. }
  106. })
  107. if (this.page == 1) {
  108. this.itemData = list
  109. } else {
  110. this.itemData = this.itemData.concat(list)
  111. }
  112. if (list.length < 10) {
  113. this.noMoreShow = false
  114. } else {
  115. this.noMoreShow = true
  116. }
  117. })
  118. }
  119. },
  120. onPullDownRefresh() {
  121. this.page = 1;
  122. this.getData()
  123. setTimeout(function() {
  124. uni.stopPullDownRefresh();
  125. }, 1000);
  126. },
  127. onReachBottom() {
  128. this.page++;
  129. this.getData()
  130. }
  131. }
  132. </script>
  133. <style>
  134. .content {
  135. background: #F4F5F7;
  136. min-height: 100vh;
  137. }
  138. .topView {
  139. background: #FFFFFF;
  140. position: fixed;
  141. width: 100%;
  142. height: 210rpx;
  143. z-index: 99;
  144. }
  145. .tab {
  146. background: #FFFFFF;
  147. display: flex;
  148. justify-content: space-around;
  149. line-height: 90rpx;
  150. height: 90rpx;
  151. width: 100%;
  152. }
  153. .tabLine {
  154. text-align: center;
  155. }
  156. .tabActive {
  157. color: #FF4F00;
  158. border-bottom: 4rpx solid #FF4F00;
  159. }
  160. .searchBoxBg {
  161. width: 100%;
  162. background-color: #FFFFFF;
  163. border-top: 1rpx solid #EEEEEE;
  164. }
  165. .searchBox {
  166. display: flex;
  167. height: 72rpx;
  168. margin: 24rpx;
  169. background-color: #F4F5F7;
  170. border-radius: 36rpx;
  171. }
  172. .listContent{
  173. padding-top: 210rpx;
  174. padding-bottom: 20rpx;
  175. }
  176. .itemBg {
  177. background-color: #FFFFFF;
  178. margin: 20rpx 24rpx;
  179. border-radius: 10rpx;
  180. padding: 20rpx;
  181. }
  182. .firstView{
  183. padding-bottom: 20rpx;
  184. display: flex;
  185. justify-content: space-between;
  186. }
  187. .rightView{
  188. display: flex;
  189. align-items: center;
  190. }
  191. .shopName{
  192. padding-bottom: 20rpx;
  193. color: #333333;
  194. font-size: 26rpx;
  195. }
  196. .itemName{
  197. padding-bottom: 20rpx;
  198. color: #666666;
  199. font-size: 24rpx;
  200. overflow: hidden;
  201. text-overflow: ellipsis;
  202. white-space: nowrap;
  203. }
  204. .stateView{
  205. background-color: #F8F9FB;
  206. border-radius: 10rpx;
  207. color: #333333;
  208. font-size: 26rpx;
  209. padding: 20rpx;
  210. }
  211. .detail{
  212. color: #FF2400;
  213. font-size: 26rpx;
  214. margin-top: 20rpx;
  215. width: 150rpx;
  216. height: 56rpx;
  217. line-height: 56rpx;
  218. text-align: center;
  219. border-radius: 36rpx;
  220. border: 1rpx #FF2400 solid;
  221. }
  222. /* 空白页css */
  223. .nodataBox {
  224. text-align: center;
  225. }
  226. .nodataImg {
  227. width: 400rpx;
  228. padding-top: 300rpx;
  229. }
  230. .noTxt {
  231. font-size: 30rpx;
  232. color: #999999;
  233. padding-top: 50rpx;
  234. }
  235. .noMore {
  236. text-align: center;
  237. line-height: 50rpx;
  238. color: #999999;
  239. font-size: 28rpx;
  240. }
  241. </style>