fix: 投诉相关处理

This commit is contained in:
Chopper711
2025-02-21 16:16:57 +08:00
parent e95aed8e38
commit db7cfcea85
3 changed files with 737 additions and 779 deletions

View File

@@ -35,6 +35,7 @@
</view> </view>
</view> </view>
<view class="speak-way" v-else>暂无对话</view> <view class="speak-way" v-else>暂无对话</view>
<div v-if="complainDetail.complainStatus!='COMPLETE'">
<view class="tips">回复对话</view> <view class="tips">回复对话</view>
<view class="cell-item complain-content"> <view class="cell-item complain-content">
<view class="cell-view content"> <view class="cell-view content">
@@ -42,6 +43,7 @@
</view> </view>
</view> </view>
<view class="submit-btn" @click="handleSubmit">回复</view> <view class="submit-btn" @click="handleSubmit">回复</view>
</div>
<view class="tips">平台仲裁</view> <view class="tips">平台仲裁</view>
<u-cell-group> <u-cell-group>
<u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item> <u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item>

View File

@@ -28,9 +28,8 @@
<view class="complain-speak"> {{ item.complainTopic }} </view> <view class="complain-speak"> {{ item.complainTopic }} </view>
</view> </view>
<view class="complain-btn"> <view class="complain-btn">
<u-tag mode="plain" @click="handleClear(item)" class="complain-tag" text="撤销投诉" type="info" v-if=" <u-tag mode="plain" @click="handleClear(item)" class="complain-tag" text="撤销投诉" type="info"
item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL' v-if="item.complainStatus === 'APPLYING' || item.complainStatus === 'NEW'" />
" />
<u-tag mode="plain" @click="handleInfo(item)" class="complain-tag" text="投诉详情" type="info" /> <u-tag mode="plain" @click="handleInfo(item)" class="complain-tag" text="投诉详情" type="info" />
</view> </view>
</view> </view>

View File

@@ -1,47 +1,29 @@
<template> <template>
<view class="content"> <view class="content">
<view class="navbar"> <view class="navbar">
<view <view v-for="(item, index) in navList" :key="index" class="nav-item"
v-for="(item, index) in navList" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
:key="index"
class="nav-item"
:class="{ current: tabCurrentIndex === index }"
@click="tabClick(index)"
>{{ item.text }}</view
>
</view> </view>
<swiper <swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
:current="tabCurrentIndex" <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
class="swiper-box" <scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData(tabIndex)">
duration="300"
@change="changeTab"
>
<swiper-item
class="tab-content"
v-for="(tabItem, tabIndex) in navList"
:key="tabIndex"
>
<scroll-view
class="list-scroll-content"
scroll-y
@scrolltolower="loadData(tabIndex)"
>
<!-- 空白页 --> <!-- 空白页 -->
<u-empty <u-empty text="暂无订单" mode="list"
text="暂无订单" v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></u-empty>
mode="list"
v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
></u-empty>
<!-- 订单列表 --> <!-- 订单列表 -->
<view <view class="seller-view" :key="oderIndex" v-for="(order, oderIndex) in tabItem.orderList">
class="seller-view"
:key="oderIndex"
v-for="(order, oderIndex) in tabItem.orderList"
>
<!-- 店铺名称 --> <!-- 店铺名称 -->
<view class="seller-info u-flex u-row-between"> <view class="seller-info u-flex u-row-between">
<view class="seller-name wes" @click="navigateToStore(order)"> <view class="seller-name wes" @click="navigateToStore(order)">
<view class="name wes">{{ order.storeName }}</view> <view class="name">{{ order.storeName }}</view>
<view class="name" v-if="order.orderPromotionType">
<u-tag
:text="renderOrderTag(order.orderPromotionType)"
:color="renderOrderTagColor(order.orderPromotionType)"
/>
</view>
</view> </view>
<view class="order-sn">{{ <view class="order-sn">{{
order.orderStatus | orderStatusList order.orderStatus | orderStatusList
@@ -49,32 +31,16 @@
</view> </view>
<view> <view>
<view> <view>
<view <view class="goods-item-view" @click="navigateToOrderDetail(order.sn)">
class="goods-item-view" <view class="goods-img" v-for="(goods, goodsIndex) in order.orderItems"
@click="navigateToOrderDetail(order.sn)" :key="goodsIndex">
> <u-image border-radius="6" width="100%" height="100%"
<view :src="goods.image"></u-image>
class="goods-img"
v-for="(goods, goodsIndex) in order.orderItems"
:key="goodsIndex"
>
<u-image
border-radius="6"
width="100%"
height="100%"
:src="goods.image"
></u-image>
</view> </view>
<view class="goods-info"> <view class="goods-info">
<view <view v-if="order.orderItems.length <= 1" class="goods-title u-line-2">
v-if="order.orderItems.length <= 1" {{ order.groupName }}</view>
class="goods-title u-line-2" <view v-if="order.orderItems.length <= 1" class="goods-price">
>{{ order.groupName }}</view
>
<view
v-if="order.orderItems.length <= 1"
class="goods-price"
>
{{ order.flowPrice | unitPrice }} {{ order.flowPrice | unitPrice }}
</view> </view>
</view> </view>
@@ -92,64 +58,27 @@
</view> </view>
<view class="goods-btn flex flex-a-c"> <view class="goods-btn flex flex-a-c">
<!-- 全部 --> <!-- 全部 -->
<view <view ripple class="pay-btn" shape="circle" size="mini"
ripple v-if="order.allowOperationVO.pay" @click="waitPay(order)">立即付款</view>
class="pay-btn"
shape="circle"
size="mini"
v-if="order.allowOperationVO.pay"
@click="waitPay(order)"
>立即付款</view
>
<!-- 取消订单 --> <!-- 取消订单 -->
<view <view ripple class="cancel-btn" shape="circle" size="mini"
ripple v-if="order.allowOperationVO.cancel" @click="onCancel(order.sn)">
class="cancel-btn"
shape="circle"
size="mini"
v-if="order.allowOperationVO.cancel"
@click="onCancel(order.sn)"
>
取消订单 取消订单
</view> </view>
<!-- 等待收货 --> <!-- 等待收货 -->
<view <view ripple shape="circle" class="rebuy-btn" size="mini"
ripple v-if="order.allowOperationVO.showLogistics" @click="navigateToLogistics(order)">
shape="circle"
class="rebuy-btn"
size="mini"
v-if="order.allowOperationVO.showLogistics"
@click="navigateToLogistics(order)"
>
查看物流 查看物流
</view> </view>
<view <view ripple shape="circle" class="pay-btn" size="mini"
ripple v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
shape="circle"
class="pay-btn"
size="mini"
v-if="order.allowOperationVO.rog"
@click="onRog(order.sn)"
>
确认收货 确认收货
</view> </view>
<view <view ripple shape="circle" class="cancel-btn" size="mini"
ripple
shape="circle"
class="cancel-btn"
size="mini"
v-if="order.groupAfterSaleStatus && ( order.groupAfterSaleStatus.includes('NOT_APPLIED') || order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))" v-if="order.groupAfterSaleStatus && ( order.groupAfterSaleStatus.includes('NOT_APPLIED') || order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))"
@click="applyService(order)" @click="applyService(order)">
>
退款/售后 退款/售后
</view> </view>
<!-- TODO 后续完善 -->
<!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="
order.orderStatus === 'CANCELLED' ||
order.orderStatus === 'COMPLETE'
" @click="reBuy(order)">
再次购买
</u-button> -->
</view> </view>
</view> </view>
</view> </view>
@@ -158,64 +87,41 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<u-popup <u-popup class="cancel-popup" v-model="cancelShow" mode="bottom" length="60%">
class="cancel-popup"
v-model="cancelShow"
mode="bottom"
length="60%"
>
<view class="header">取消订单</view> <view class="header">取消订单</view>
<view class="body"> <view class="body">
<view class="title" <view class="title">取消订单后本单享有的优惠可能会一并取消是否继续</view>
>取消订单后,本单享有的优惠可能会一并取消,是否继续?</view
>
<view> <view>
<u-radio-group v-model="reason"> <u-radio-group v-model="reason">
<view class="value"> <view class="value">
<view <view class="radio-view" :key="index" v-for="(item, index) in cancelList">
class="radio-view" <u-radio :active-color="lightColor" label-size="25" shape="circle" :name="item.reason"
:key="index" @change="reasonChange">{{ item.reason }}</u-radio>
v-for="(item, index) in cancelList"
>
<u-radio
:active-color="lightColor"
label-size="25"
shape="circle"
:name="item.reason"
@change="reasonChange"
>{{ item.reason }}</u-radio
>
</view> </view>
</view> </view>
</u-radio-group> </u-radio-group>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<u-button <u-button size="medium" ripple v-if="reason" shape="circle" @click="submitCancel">提交</u-button>
size="medium"
ripple
v-if="reason"
shape="circle"
@click="submitCancel"
>提交</u-button
>
</view> </view>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-modal <u-modal :confirm-color="lightColor" v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'"
:confirm-color="lightColor" @confirm="confirmRog"></u-modal>
v-model="rogShow"
:show-cancel-button="true"
:content="'是否确认收货?'"
@confirm="confirmRog"
></u-modal>
</view> </view>
</template> </template>
<script> <script>
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue"; import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
import { getOrderList, cancelOrder, confirmReceipt } from "@/api/order.js"; import {
import { getClearReason } from "@/api/after-sale.js"; getOrderList,
cancelOrder,
confirmReceipt
} from "@/api/order.js";
import {
getClearReason
} from "@/api/after-sale.js";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js"; import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
export default { export default {
components: { components: {
@@ -377,7 +283,44 @@ export default {
url: "/pages/product/shopPage?id=" + val.storeId, url: "/pages/product/shopPage?id=" + val.storeId,
}); });
}, },
renderOrderTag(orderPromotionType) {
switch (orderPromotionType) {
case "NORMAL":
return "普通订单";
case "PINTUAN":
return "拼团订单";
break;
case "GIFT":
return "赠品订单";
break;
case "POINTS":
return "积分订单";
break;
case "KANJIA":
return "砍价订单";
default:
return "";
}
},
renderOrderTagColor(orderPromotionType) {
switch (orderPromotionType) {
case "NORMAL":
return "main";
case "PINTUAN":
return "red";
break;
case "GIFT":
return "blue";
break;
case "POINTS":
return "black";
break;
case "KANJIA":
return "pink";
default:
return "";
}
},
/** /**
* 取消订单 * 取消订单
*/ */
@@ -391,7 +334,9 @@ export default {
if (res.data.result.length >= 1) { if (res.data.result.length >= 1) {
this.cancelList = res.data.result; this.cancelList = res.data.result;
} }
if (this.$store.state.isShowToast){ uni.hideLoading() }; if (this.$store.state.isShowToast) {
uni.hideLoading()
};
}); });
}, },
@@ -472,7 +417,9 @@ export default {
}); });
setTimeout(() => { setTimeout(() => {
this.navList[this.tabCurrentIndex].orderList.splice(index, 1); this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
if (this.$store.state.isShowToast){ uni.hideLoading() }; if (this.$store.state.isShowToast) {
uni.hideLoading()
};
}, 600); }, 600);
}, },
//取消订单 //取消订单
@@ -481,7 +428,10 @@ export default {
title: "请稍后", title: "请稍后",
}); });
setTimeout(() => { setTimeout(() => {
let { stateTip, stateTipColor } = this.orderStateExp(9); let {
stateTip,
stateTipColor
} = this.orderStateExp(9);
item = Object.assign(item, { item = Object.assign(item, {
state: 9, state: 9,
stateTip, stateTip,
@@ -492,7 +442,9 @@ export default {
let list = this.navList[1].orderList; let list = this.navList[1].orderList;
let index = list.findIndex((val) => val.id === item.id); let index = list.findIndex((val) => val.id === item.id);
index !== -1 && list.splice(index, 1); index !== -1 && list.splice(index, 1);
if (this.$store.state.isShowToast){ uni.hideLoading() }; if (this.$store.state.isShowToast) {
uni.hideLoading()
};
}, 600); }, 600);
}, },
@@ -540,7 +492,9 @@ export default {
* 提交取消订单(未付款) * 提交取消订单(未付款)
*/ */
submitCancel() { submitCancel() {
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => { cancelOrder(this.orderSn, {
reason: this.reason
}).then((res) => {
if (res.data.success) { if (res.data.success) {
uni.showToast({ uni.showToast({
title: "订单已取消", title: "订单已取消",
@@ -602,8 +556,7 @@ export default {
console.log(order); console.log(order);
return; return;
uni.navigateTo({ uni.navigateTo({
url: url: "/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
"/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
}); });
}, },
@@ -612,8 +565,7 @@ export default {
*/ */
navigateToLogistics(order) { navigateToLogistics(order) {
uni.navigateTo({ uni.navigateTo({
url: url: "/pages/order/deliverDetail?order_sn=" + order.sn,
"/pages/order/deliverDetail?order_sn=" + order.sn,
}); });
}, },
}, },
@@ -693,10 +645,9 @@ page,
font-weight: 600; font-weight: 600;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
text-align: center;
.name { .name {
margin-left: 15rpx; margin-left: 15rpx;
margin-top: -2rpx;
} }
} }
@@ -759,6 +710,7 @@ page,
color: #909399; color: #909399;
size: 24rpx; size: 24rpx;
flex: 1; flex: 1;
.price { .price {
color: $main-color; color: $main-color;
@@ -786,6 +738,7 @@ page,
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 20rpx 0; margin: 20rpx 0;
.radio-view { .radio-view {
margin: 20rpx 0rpx; margin: 20rpx 0rpx;
} }
@@ -796,10 +749,14 @@ page,
text-align: center; text-align: center;
} }
} }
.goods-btn { .goods-btn {
display: flex; display: flex;
} }
.cancel-btn,.pay-btn,.rebuy-btn{
.cancel-btn,
.pay-btn,
.rebuy-btn {
text-align: center; text-align: center;
margin-left: 15rpx; margin-left: 15rpx;
font-size: 24rpx; font-size: 24rpx;
@@ -807,6 +764,7 @@ page,
border-radius: 100px; border-radius: 100px;
} }
.cancel-btn { .cancel-btn {
color: #333639 !important; color: #333639 !important;
background: rgba(46, 51, 56, .05) !important; background: rgba(46, 51, 56, .05) !important;
@@ -825,4 +783,3 @@ page,
background-color: #ffffff !important; background-color: #ffffff !important;
} }
</style> </style>