123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- <template>
- <view class="content">
- <view class="topView">
- <!-- tab -->
- <view class="tab">
- <view class="tabLine" :class="{tabActive:tabIndex==1}" @click="tabClick(1)">
- <view class="orderNum" v-show="num>0">{{num}}</view>
- 待处理</view>
- <view class="tabLine" :class="{tabActive:tabIndex==2}" @click="tabClick(2)">申请记录</view>
- </view>
- <!-- 搜索 -->
- <view class="searchBoxBg">
- <searchBox placeholder="订单号、售后单号" @search='search($event)'></searchBox>
- </view>
- </view>
-
- <!-- list -->
- <view class="listContent">
- <view class="itemBg" v-for="(item,index) in itemData">
- <view class="firstView">
- <view style="font-size: 24rpx; color: #999999;">申请单号:{{item.ServiceCode}}</view>
- <view class="rightView">
- <image src="../../static/img/icon_tuikuan2.png" mode="aspectFit" style="width: 30rpx; height: 30rpx;"></image>
- <view style="color: #666666; font-size: 24rpx; margin-left: 10rpx;">退款</view>
- </view>
- </view>
-
- <view class="shopName">{{item.ShopName}}</view>
- <view class="itemName">{{item.itemNameList}},{{item.goodNameList}}</view>
- <view class="itemName">车牌号:{{item.PlateNumber?item.PlateNumber:''}}</view>
- <!-- ServiceState":1待处理2退款成功3退款关闭 -->
- <view class="stateView" v-if="item.ServiceState==1">待平台处理</view>
-
- <view class="stateView" v-if="item.ServiceState==2">退款成功 退款金额¥{{item.Money}}元</view>
- <view class="stateView" v-if="item.ServiceState==3">退款关闭</view>
-
- <view style="display: flex; justify-content: flex-end;">
- <view class="detail" @click="goDetail(item.ID)">退款详情</view>
- </view>
- </view>
- </view>
-
-
- <!-- 上拉 加载更多 -->
- <view class="noMore" v-if="noMoreShow">没有更多数据</view>
- <!-- 无数据空白页 -->
- <view class="nodataBox" v-if="itemData.length == 0">
- <image src="../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
- <view class="noTxt">暂无数据</view>
- </view>
-
- </view>
- </template>
- <script>
- import searchBox from '@/components/searchBox/searchBox.vue'
- export default {
- components: {
- searchBox
- },
- data() {
- return {
- searchValue: '',
- page: 1,
- tabIndex: 1,
- itemData:[],
- noMoreShow: false,
- num:'',
- }
- },
- onLoad() {
- this.getData();
- },
- onShow() {
- this.page = 1
- this.getData();
- },
- methods: {
- goDetail(id){
- uni.navigateTo({
-
- url:'refundMoneyDetail?id='+id
- })
- },
- tabClick(num) {
- this.tabIndex = num;
- this.page = 1;
- this.getData()
- },
- search(val) {
- // console.log(val);
- this.searchValue = val
- this.page = 1
- this.getData()
- },
- getData() {
- uni.showLoading({
- title: '加载中'
- })
- var serviceStateStr = ''
- if (this.tabIndex == 1) {
- serviceStateStr = '1'
- }
- let url = 'worldKeepCar/keepCarMy/listTMSheetAfterServicePage',
- params = {
- page: this.page,
- limit: 10,
- name: this.searchValue,
- serviceState:serviceStateStr,
- }
- this.$http(url, params, 'GET').then(res => {
- uni.hideLoading()
- var list = res.data.Items
- this.num = res.data.afterService
-
- // 处理 undefined和null转为空白字符串
- list.forEach((item, index) => {
- for (const key in item) {
- item[key] = this.$praseStrEmpty(item[key])
- }
- })
-
-
- if (this.page == 1) {
- this.itemData = list
- } else {
- this.itemData = this.itemData.concat(list)
- }
-
- if (list.length < 10) {
- this.noMoreShow = false
- } else {
- this.noMoreShow = true
- }
-
- })
- }
- },
-
-
- onPullDownRefresh() {
- this.page = 1;
- this.getData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- onReachBottom() {
- this.page++;
- this.getData()
- }
- }
- </script>
- <style>
- .content {
- background: #F4F5F7;
- min-height: 100vh;
- }
- .topView {
- background: #FFFFFF;
- position: fixed;
- width: 100%;
- height: 210rpx;
- z-index: 99;
- }
- .tab {
- background: #FFFFFF;
- display: flex;
- justify-content: space-around;
- line-height: 90rpx;
- height: 90rpx;
- width: 100%;
- }
- .tabLine {
- text-align: center;
- position: relative;
- }
-
- .tabActive {
- color: #FF4F00;
- border-bottom: 4rpx solid #FF4F00;
- }
- .orderNum {
- line-height: 26rpx;
- background: #FF4F00;
- padding: 0 8rpx;
- border-radius: 13rpx;
- color: #FFFFFF;
- font-size: 20rpx;
- position: absolute;
- top: 10rpx;
- right: -10rpx;
- z-index: 11;
- }
- .searchBoxBg {
-
- width: 100%;
- background-color: #FFFFFF;
- border-top: 1rpx solid #EEEEEE;
- }
- .searchBox {
- display: flex;
- height: 72rpx;
- margin: 24rpx;
- background-color: #F4F5F7;
- border-radius: 36rpx;
- }
- .listContent{
- padding-top: 210rpx;
- padding-bottom: 20rpx;
- }
- .itemBg {
- background-color: #FFFFFF;
- margin: 20rpx 24rpx;
- border-radius: 10rpx;
- padding: 20rpx;
- }
- .firstView{
- padding-bottom: 20rpx;
- display: flex;
- justify-content: space-between;
-
- }
- .rightView{
- display: flex;
- align-items: center;
- }
- .shopName{
- padding-bottom: 20rpx;
- color: #333333;
- font-size: 30rpx;
- }
- .itemName{
- padding-bottom: 20rpx;
- color: #666666;
- font-size: 24rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .stateView{
- background-color: #F8F9FB;
- border-radius: 10rpx;
- color: #333333;
- font-size: 26rpx;
-
- padding: 20rpx;
- }
- .detail{
- color: #FF2400;
- font-size: 26rpx;
- margin-top: 20rpx;
- width: 150rpx;
- height: 56rpx;
- line-height: 56rpx;
- text-align: center;
- border-radius: 36rpx;
- border: 1rpx #FF2400 solid;
-
- }
-
- /* 空白页css */
- .nodataBox {
- text-align: center;
- }
-
- .nodataImg {
- width: 400rpx;
- padding-top: 300rpx;
- }
-
- .noTxt {
- font-size: 30rpx;
- color: #999999;
- padding-top: 50rpx;
- }
-
- .noMore {
- text-align: center;
- line-height: 50rpx;
- color: #999999;
- font-size: 28rpx;
- }
- </style>
|