changeStoreList.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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" @click="goDetail(item.id)">更换详情</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:[1,2,3],
  53. noMoreShow: false,
  54. }
  55. },
  56. methods: {
  57. goDetail(id){
  58. uni.navigateTo({
  59. url:'changeStoreDetail?id='+id
  60. })
  61. },
  62. tabClick(num) {
  63. this.tabIndex = num;
  64. // this.page = 1;
  65. // this.getData()
  66. },
  67. search(val) {
  68. // console.log(val);
  69. this.searchValue = val
  70. // this.page = 1
  71. // this.getData()
  72. },
  73. getData() {
  74. uni.showLoading({
  75. title: '加载中'
  76. })
  77. let url = 'accompany/SuperAccounts/queryMyteam',
  78. params = {
  79. page: this.page,
  80. limit: 10,
  81. name: this.searchValue
  82. }
  83. this.$http(url, params, 'GET').then(res => {
  84. this.count = Number(res.data.count)
  85. var list = res.data.Items
  86. // 处理 undefined和null转为空白字符串
  87. list.forEach((item, index) => {
  88. for (const key in item) {
  89. item[key] = this.$praseStrEmpty(item[key])
  90. }
  91. })
  92. if (this.page == 1) {
  93. this.shopData = list
  94. } else {
  95. this.shopData = this.shopData.concat(list)
  96. }
  97. if (list.length < 10) {
  98. this.noMoreShow = false
  99. } else {
  100. this.noMoreShow = true
  101. }
  102. })
  103. }
  104. },
  105. onPullDownRefresh() {
  106. this.page = 1;
  107. // this.getData()
  108. setTimeout(function() {
  109. uni.stopPullDownRefresh();
  110. }, 1000);
  111. },
  112. onReachBottom() {
  113. this.page++;
  114. // this.getData()
  115. }
  116. }
  117. </script>
  118. <style>
  119. .content {
  120. background: #F4F5F7;
  121. min-height: 100vh;
  122. }
  123. .topView {
  124. background: #FFFFFF;
  125. position: fixed;
  126. width: 100%;
  127. height: 210rpx;
  128. z-index: 99;
  129. }
  130. .tab {
  131. background: #FFFFFF;
  132. display: flex;
  133. justify-content: space-around;
  134. line-height: 90rpx;
  135. height: 90rpx;
  136. width: 100%;
  137. }
  138. .tabLine {
  139. text-align: center;
  140. }
  141. .tabActive {
  142. color: #FF4F00;
  143. border-bottom: 4rpx solid #FF4F00;
  144. }
  145. .searchBoxBg {
  146. width: 100%;
  147. background-color: #FFFFFF;
  148. border-top: 1rpx solid #EEEEEE;
  149. }
  150. .searchBox {
  151. display: flex;
  152. height: 72rpx;
  153. margin: 24rpx;
  154. background-color: #F4F5F7;
  155. border-radius: 36rpx;
  156. }
  157. .listContent{
  158. padding-top: 210rpx;
  159. padding-bottom: 20rpx;
  160. }
  161. .itemBg {
  162. background-color: #FFFFFF;
  163. margin: 20rpx 24rpx;
  164. border-radius: 10rpx;
  165. padding: 20rpx;
  166. }
  167. .firstView{
  168. padding-bottom: 20rpx;
  169. display: flex;
  170. justify-content: space-between;
  171. }
  172. .rightView{
  173. display: flex;
  174. align-items: center;
  175. }
  176. .shopName{
  177. padding-bottom: 20rpx;
  178. color: #333333;
  179. font-size: 30rpx;
  180. }
  181. .stateView{
  182. background-color: #F8F9FB;
  183. border-radius: 10rpx;
  184. color: #333333;
  185. font-size: 26rpx;
  186. padding: 20rpx;
  187. }
  188. .detail{
  189. color: #FF2400;
  190. font-size: 26rpx;
  191. margin-top: 20rpx;
  192. width: 150rpx;
  193. height: 56rpx;
  194. line-height: 56rpx;
  195. text-align: center;
  196. border-radius: 36rpx;
  197. border: 1rpx #FF2400 solid;
  198. }
  199. /* 空白页css */
  200. .nodataBox {
  201. text-align: center;
  202. }
  203. .nodataImg {
  204. width: 400rpx;
  205. padding-top: 300rpx;
  206. }
  207. .noTxt {
  208. font-size: 30rpx;
  209. color: #999999;
  210. padding-top: 50rpx;
  211. }
  212. .noMore {
  213. text-align: center;
  214. line-height: 50rpx;
  215. color: #999999;
  216. font-size: 28rpx;
  217. }
  218. </style>