2021-05-13 11:03:32 +08:00
|
|
|
<template>
|
|
|
|
<view>
|
2021-05-14 17:31:40 +08:00
|
|
|
<view class="seller-view" v-for="(item, index) in complaionData" :key="index">
|
2021-05-13 11:03:32 +08:00
|
|
|
<view class="seller-info u-flex u-row-between">
|
|
|
|
<view class="seller-name">
|
|
|
|
<view class="name">{{ item.storeName }}</view>
|
|
|
|
</view>
|
|
|
|
<view class="order-sn">{{ statusData[item.complainStatus] }}</view>
|
|
|
|
</view>
|
|
|
|
<u-line color="#DCDFE6"></u-line>
|
|
|
|
<view class="goods-item-view">
|
|
|
|
<view class="goods-img" @click="handleToGoods(item)">
|
2021-05-14 17:31:40 +08:00
|
|
|
<u-image border-radius="6" width="131rpx" height="131rpx" :src="item.goodsImage"></u-image>
|
2021-05-13 11:03:32 +08:00
|
|
|
</view>
|
|
|
|
<view class="goods-info" @click="handleToGoods(item)">
|
|
|
|
<view class="goods-title u-line-2">{{ item.goodsName }}</view>
|
|
|
|
<view class="goods-price">
|
|
|
|
¥{{ item.goodsPrice | unitPrice }}
|
|
|
|
<!-- <span>+{{ '1' }}积分</span> -->
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="goods-num">
|
|
|
|
<view>x{{ item.num }}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="complain-item-view">
|
|
|
|
<view class="complain-time"> {{ item.createTime }} </view>
|
|
|
|
<view class="complain-speak"> {{ item.complainTopic }} </view>
|
|
|
|
</view>
|
|
|
|
<view class="complain-btn">
|
2021-05-14 17:31:40 +08:00
|
|
|
<u-tag mode="plain" @click="handleClear(item)" class="complain-tag" text="撤销投诉" type="info" v-if="
|
2021-05-13 11:03:32 +08:00
|
|
|
item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL'
|
2021-05-14 17:31:40 +08:00
|
|
|
" />
|
|
|
|
<u-tag mode="plain" @click="handleInfo(item)" class="complain-tag" text="投诉详情" type="info" />
|
2021-05-13 11:03:32 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2021-05-14 17:31:40 +08:00
|
|
|
|
|
|
|
<u-empty v-if="empty" :style="{'marginTop':complaionDetail.total == 0 ? '200rpx':'0rpx'}" class="empty" style="" text="暂无投诉列表" mode="list"></u-empty>
|
|
|
|
|
|
|
|
<u-modal show-cancel-button @confirm="handleClearConfirm" v-model="show" :content="content"></u-modal>
|
2021-05-13 11:03:32 +08:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { getComplain, clearComplain } from "@/api/after-sale";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
statusData: {
|
|
|
|
NEW: "新订单",
|
|
|
|
NO_APPLY: "未申请",
|
|
|
|
APPLYING: "申请中",
|
|
|
|
COMPLETE: "已完成",
|
|
|
|
EXPIRED: "已失效",
|
|
|
|
CANCEL: "已取消",
|
|
|
|
},
|
|
|
|
show: false,
|
|
|
|
content: "是否撤销投诉?",
|
|
|
|
params: {
|
|
|
|
pageNumber: 1,
|
|
|
|
pageSize: 20,
|
|
|
|
},
|
2021-05-14 17:31:40 +08:00
|
|
|
complaionDetail: "", //返回的整个response
|
|
|
|
complaionData: [], //投诉列表
|
2021-05-13 11:03:32 +08:00
|
|
|
empty: false,
|
2021-05-14 17:31:40 +08:00
|
|
|
checkComplainData: "", //存储投诉信息
|
2021-05-13 11:03:32 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.init();
|
|
|
|
},
|
2021-05-14 17:31:40 +08:00
|
|
|
/**
|
|
|
|
* 触底加载
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
onReachBottom() {
|
2021-05-14 17:31:40 +08:00
|
|
|
if (
|
|
|
|
this.complaionDetail &&
|
|
|
|
this.complaionDetail.total < this.params.pageNumber * this.params.pageSize
|
|
|
|
) {
|
|
|
|
this.params.pageNumber++;
|
|
|
|
this.init();
|
|
|
|
}
|
2021-05-13 11:03:32 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
// 点击跳转到商品
|
|
|
|
handleToGoods(val) {
|
2022-09-15 15:40:50 +08:00
|
|
|
uni.navigateTo({
|
2021-05-14 17:31:40 +08:00
|
|
|
url: "/pages/product/goods?id=" + val.skuId + "&goodsId=" + val.goodsId,
|
2021-05-13 11:03:32 +08:00
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2021-05-14 17:31:40 +08:00
|
|
|
/**
|
|
|
|
* 点击撤销投诉
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
handleClear(val) {
|
|
|
|
this.show = true;
|
2021-05-14 17:31:40 +08:00
|
|
|
this.checkComplainData = val;
|
2021-05-13 11:03:32 +08:00
|
|
|
},
|
2021-05-14 17:31:40 +08:00
|
|
|
/**
|
|
|
|
* 执行撤销
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
handleClearConfirm() {
|
2021-05-14 17:31:40 +08:00
|
|
|
clearComplain(this.checkComplainData.id).then((res) => {
|
2021-05-13 11:03:32 +08:00
|
|
|
if (res.data.success) {
|
|
|
|
uni.showToast({
|
|
|
|
title: "撤销成功",
|
|
|
|
duration: 2000,
|
|
|
|
icon: "none",
|
|
|
|
});
|
|
|
|
this.complaionData = [];
|
|
|
|
this.params.pageNumber = 1;
|
|
|
|
this.init();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
2021-05-14 17:31:40 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 查看详情
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
handleInfo(val) {
|
2022-09-15 15:40:50 +08:00
|
|
|
uni.navigateTo({
|
2021-05-13 11:03:32 +08:00
|
|
|
url: "./complainInfo?id=" + val.id,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2021-05-14 17:31:40 +08:00
|
|
|
/**
|
|
|
|
* 初始化投诉列表
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
init() {
|
|
|
|
uni.showLoading({
|
|
|
|
title: "加载中",
|
|
|
|
});
|
|
|
|
getComplain(this.params).then((res) => {
|
2021-05-14 17:31:40 +08:00
|
|
|
this.complaionDetail = res.data.result;
|
2021-05-13 11:03:32 +08:00
|
|
|
if (res.data.result.records.length >= 1) {
|
|
|
|
this.complaionData.push(...res.data.result.records);
|
|
|
|
} else {
|
|
|
|
this.empty = true;
|
|
|
|
}
|
|
|
|
uni.hideLoading();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import "../goods.scss";
|
|
|
|
|
|
|
|
.complain-item-view {
|
|
|
|
border-bottom: 2rpx solid #f5f7fa;
|
|
|
|
border-top: 2rpx solid #f5f7fa;
|
|
|
|
padding: 20rpx 30rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.complain-time {
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #999;
|
|
|
|
}
|
|
|
|
/deep/ .seller-name {
|
|
|
|
width: auto !important;
|
|
|
|
}
|
|
|
|
.complain-btn {
|
|
|
|
padding: 20rpx 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-end;
|
|
|
|
margin-right: 30rpx;
|
|
|
|
}
|
|
|
|
.complain-tag {
|
|
|
|
margin-left: 10rpx;
|
|
|
|
}
|
2021-05-14 17:31:40 +08:00
|
|
|
.empty {
|
|
|
|
margin-top: 40rpx;
|
|
|
|
}
|
2021-05-13 11:03:32 +08:00
|
|
|
</style>
|