mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 07:55:53 +08:00
fix: 投诉相关处理
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="speak-way" v-else>暂无对话</view>
|
||||
<div v-if="complainDetail.complainStatus!='COMPLETE'">
|
||||
<view class="tips">回复对话</view>
|
||||
<view class="cell-item complain-content">
|
||||
<view class="cell-view content">
|
||||
@@ -42,6 +43,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-btn" @click="handleSubmit">回复</view>
|
||||
</div>
|
||||
<view class="tips">平台仲裁</view>
|
||||
<u-cell-group>
|
||||
<u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item>
|
||||
|
||||
@@ -28,9 +28,8 @@
|
||||
<view class="complain-speak"> {{ item.complainTopic }} </view>
|
||||
</view>
|
||||
<view class="complain-btn">
|
||||
<u-tag mode="plain" @click="handleClear(item)" class="complain-tag" text="撤销投诉" type="info" v-if="
|
||||
item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL'
|
||||
" />
|
||||
<u-tag mode="plain" @click="handleClear(item)" class="complain-tag" text="撤销投诉" type="info"
|
||||
v-if="item.complainStatus === 'APPLYING' || item.complainStatus === 'NEW'" />
|
||||
<u-tag mode="plain" @click="handleInfo(item)" class="complain-tag" text="投诉详情" type="info" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,47 +1,29 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="navbar">
|
||||
<view
|
||||
v-for="(item, index) in navList"
|
||||
:key="index"
|
||||
class="nav-item"
|
||||
:class="{ current: tabCurrentIndex === index }"
|
||||
@click="tabClick(index)"
|
||||
>{{ item.text }}</view
|
||||
>
|
||||
<view v-for="(item, index) in navList" :key="index" class="nav-item"
|
||||
:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
|
||||
</view>
|
||||
<swiper
|
||||
:current="tabCurrentIndex"
|
||||
class="swiper-box"
|
||||
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)"
|
||||
>
|
||||
<swiper :current="tabCurrentIndex" class="swiper-box" 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
|
||||
text="暂无订单"
|
||||
mode="list"
|
||||
v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
|
||||
></u-empty>
|
||||
<u-empty text="暂无订单" mode="list"
|
||||
v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></u-empty>
|
||||
<!-- 订单列表 -->
|
||||
<view
|
||||
class="seller-view"
|
||||
:key="oderIndex"
|
||||
v-for="(order, oderIndex) in tabItem.orderList"
|
||||
>
|
||||
<view class="seller-view" :key="oderIndex" v-for="(order, oderIndex) in tabItem.orderList">
|
||||
<!-- 店铺名称 -->
|
||||
<view class="seller-info u-flex u-row-between">
|
||||
<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 class="order-sn">{{
|
||||
order.orderStatus | orderStatusList
|
||||
@@ -49,32 +31,16 @@
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<view
|
||||
class="goods-item-view"
|
||||
@click="navigateToOrderDetail(order.sn)"
|
||||
>
|
||||
<view
|
||||
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 class="goods-item-view" @click="navigateToOrderDetail(order.sn)">
|
||||
<view 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 class="goods-info">
|
||||
<view
|
||||
v-if="order.orderItems.length <= 1"
|
||||
class="goods-title u-line-2"
|
||||
>{{ order.groupName }}</view
|
||||
>
|
||||
<view
|
||||
v-if="order.orderItems.length <= 1"
|
||||
class="goods-price"
|
||||
>
|
||||
<view v-if="order.orderItems.length <= 1" class="goods-title u-line-2">
|
||||
{{ order.groupName }}</view>
|
||||
<view v-if="order.orderItems.length <= 1" class="goods-price">
|
||||
¥{{ order.flowPrice | unitPrice }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,64 +58,27 @@
|
||||
</view>
|
||||
<view class="goods-btn flex flex-a-c">
|
||||
<!-- 全部 -->
|
||||
<view
|
||||
ripple
|
||||
class="pay-btn"
|
||||
shape="circle"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.pay"
|
||||
@click="waitPay(order)"
|
||||
>立即付款</view
|
||||
>
|
||||
<view ripple class="pay-btn" shape="circle" size="mini"
|
||||
v-if="order.allowOperationVO.pay" @click="waitPay(order)">立即付款</view>
|
||||
<!-- 取消订单 -->
|
||||
<view
|
||||
ripple
|
||||
class="cancel-btn"
|
||||
shape="circle"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.cancel"
|
||||
@click="onCancel(order.sn)"
|
||||
>
|
||||
<view ripple class="cancel-btn" shape="circle" size="mini"
|
||||
v-if="order.allowOperationVO.cancel" @click="onCancel(order.sn)">
|
||||
取消订单
|
||||
</view>
|
||||
<!-- 等待收货 -->
|
||||
<view
|
||||
ripple
|
||||
shape="circle"
|
||||
class="rebuy-btn"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.showLogistics"
|
||||
@click="navigateToLogistics(order)"
|
||||
>
|
||||
<view ripple shape="circle" class="rebuy-btn" size="mini"
|
||||
v-if="order.allowOperationVO.showLogistics" @click="navigateToLogistics(order)">
|
||||
查看物流
|
||||
</view>
|
||||
<view
|
||||
ripple
|
||||
shape="circle"
|
||||
class="pay-btn"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.rog"
|
||||
@click="onRog(order.sn)"
|
||||
>
|
||||
<view ripple shape="circle" class="pay-btn" size="mini"
|
||||
v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
|
||||
确认收货
|
||||
</view>
|
||||
<view
|
||||
ripple
|
||||
shape="circle"
|
||||
class="cancel-btn"
|
||||
size="mini"
|
||||
<view ripple shape="circle" class="cancel-btn" size="mini"
|
||||
v-if="order.groupAfterSaleStatus && ( order.groupAfterSaleStatus.includes('NOT_APPLIED') || order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))"
|
||||
@click="applyService(order)"
|
||||
>
|
||||
@click="applyService(order)">
|
||||
退款/售后
|
||||
</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>
|
||||
@@ -158,66 +87,43 @@
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-popup
|
||||
class="cancel-popup"
|
||||
v-model="cancelShow"
|
||||
mode="bottom"
|
||||
length="60%"
|
||||
>
|
||||
<u-popup class="cancel-popup" v-model="cancelShow" mode="bottom" length="60%">
|
||||
<view class="header">取消订单</view>
|
||||
<view class="body">
|
||||
<view class="title"
|
||||
>取消订单后,本单享有的优惠可能会一并取消,是否继续?</view
|
||||
>
|
||||
<view class="title">取消订单后,本单享有的优惠可能会一并取消,是否继续?</view>
|
||||
<view>
|
||||
<u-radio-group v-model="reason">
|
||||
<view class="value">
|
||||
<view
|
||||
class="radio-view"
|
||||
:key="index"
|
||||
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 class="radio-view" :key="index" 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>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<u-button
|
||||
size="medium"
|
||||
ripple
|
||||
v-if="reason"
|
||||
shape="circle"
|
||||
@click="submitCancel"
|
||||
>提交</u-button
|
||||
>
|
||||
<u-button size="medium" ripple v-if="reason" shape="circle" @click="submitCancel">提交</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-toast ref="uToast" />
|
||||
<u-modal
|
||||
:confirm-color="lightColor"
|
||||
v-model="rogShow"
|
||||
:show-cancel-button="true"
|
||||
:content="'是否确认收货?'"
|
||||
@confirm="confirmRog"
|
||||
></u-modal>
|
||||
<u-modal :confirm-color="lightColor" v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'"
|
||||
@confirm="confirmRog"></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
|
||||
import { getOrderList, cancelOrder, confirmReceipt } from "@/api/order.js";
|
||||
import { getClearReason } from "@/api/after-sale.js";
|
||||
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
|
||||
export default {
|
||||
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
|
||||
import {
|
||||
getOrderList,
|
||||
cancelOrder,
|
||||
confirmReceipt
|
||||
} from "@/api/order.js";
|
||||
import {
|
||||
getClearReason
|
||||
} from "@/api/after-sale.js";
|
||||
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
|
||||
export default {
|
||||
components: {
|
||||
uniLoadMore,
|
||||
},
|
||||
@@ -328,7 +234,7 @@ export default {
|
||||
// this.loadData(this.status);
|
||||
},
|
||||
onShow() {
|
||||
if(this.$options.filters.tipsToLogin()){
|
||||
if (this.$options.filters.tipsToLogin()) {
|
||||
if (!this.tabCurrentIndex) {
|
||||
this.initData(0);
|
||||
}
|
||||
@@ -377,7 +283,44 @@ export default {
|
||||
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) {
|
||||
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(() => {
|
||||
this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
if (this.$store.state.isShowToast) {
|
||||
uni.hideLoading()
|
||||
};
|
||||
}, 600);
|
||||
},
|
||||
//取消订单
|
||||
@@ -481,7 +428,10 @@ export default {
|
||||
title: "请稍后",
|
||||
});
|
||||
setTimeout(() => {
|
||||
let { stateTip, stateTipColor } = this.orderStateExp(9);
|
||||
let {
|
||||
stateTip,
|
||||
stateTipColor
|
||||
} = this.orderStateExp(9);
|
||||
item = Object.assign(item, {
|
||||
state: 9,
|
||||
stateTip,
|
||||
@@ -492,7 +442,9 @@ export default {
|
||||
let list = this.navList[1].orderList;
|
||||
let index = list.findIndex((val) => val.id === item.id);
|
||||
index !== -1 && list.splice(index, 1);
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
if (this.$store.state.isShowToast) {
|
||||
uni.hideLoading()
|
||||
};
|
||||
}, 600);
|
||||
},
|
||||
|
||||
@@ -540,7 +492,9 @@ export default {
|
||||
* 提交取消订单(未付款)
|
||||
*/
|
||||
submitCancel() {
|
||||
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
|
||||
cancelOrder(this.orderSn, {
|
||||
reason: this.reason
|
||||
}).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "订单已取消",
|
||||
@@ -602,8 +556,7 @@ export default {
|
||||
console.log(order);
|
||||
return;
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
|
||||
url: "/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -612,33 +565,32 @@ export default {
|
||||
*/
|
||||
navigateToLogistics(order) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/order/deliverDetail?order_sn=" + order.sn,
|
||||
url: "/pages/order/deliverDetail?order_sn=" + order.sn,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page,
|
||||
.content {
|
||||
page,
|
||||
.content {
|
||||
background: $page-color-base;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
.swiper-box {
|
||||
height: calc(100vh - 40px);
|
||||
// #ifdef H5
|
||||
height: calc(100vh - 40px - 44px);
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
.list-scroll-content {
|
||||
.list-scroll-content {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar {
|
||||
.navbar {
|
||||
display: flex;
|
||||
height: 40px;
|
||||
padding: 0 5px;
|
||||
@@ -672,13 +624,13 @@ page,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.uni-swiper-item {
|
||||
.uni-swiper-item {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.seller-view {
|
||||
.seller-view {
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
margin: 20rpx 0rpx;
|
||||
@@ -688,21 +640,20 @@ page,
|
||||
padding: 0 20rpx;
|
||||
|
||||
.seller-name {
|
||||
flex:10;
|
||||
flex: 10;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
text-align: center;
|
||||
.name {
|
||||
margin-left: 15rpx;
|
||||
margin-top: -2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order-sn {
|
||||
flex:2;
|
||||
width:120rpx;
|
||||
flex: 2;
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
color: $aider-light-color;
|
||||
font-size: 26rpx;
|
||||
@@ -759,15 +710,16 @@ page,
|
||||
color: #909399;
|
||||
size: 24rpx;
|
||||
flex: 1;
|
||||
|
||||
.price {
|
||||
color: $main-color;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-popup {
|
||||
.cancel-popup {
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -786,6 +738,7 @@ page,
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 20rpx 0;
|
||||
|
||||
.radio-view {
|
||||
margin: 20rpx 0rpx;
|
||||
}
|
||||
@@ -795,34 +748,38 @@ page,
|
||||
.footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.goods-btn{
|
||||
}
|
||||
|
||||
.goods-btn {
|
||||
display: flex;
|
||||
}
|
||||
.cancel-btn,.pay-btn,.rebuy-btn{
|
||||
}
|
||||
|
||||
.cancel-btn,
|
||||
.pay-btn,
|
||||
.rebuy-btn {
|
||||
text-align: center;
|
||||
margin-left: 15rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 14rpx 20rpx;
|
||||
border-radius: 100px;
|
||||
|
||||
}
|
||||
.cancel-btn {
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
color: #333639 !important;
|
||||
background: rgba(46, 51, 56, .05) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.pay-btn {
|
||||
.pay-btn {
|
||||
|
||||
background-color: $light-color !important;
|
||||
|
||||
color: #ffffff !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rebuy-btn {
|
||||
.rebuy-btn {
|
||||
color: $light-color !important;
|
||||
border-color: $light-color !important;
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user