Compare commits
8 Commits
998a14c878
...
9ae7f9e088
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ae7f9e088 | ||
|
|
866ee54a0b | ||
|
|
4098389254 | ||
|
|
984593109e | ||
|
|
ee60321a03 | ||
|
|
9557a51e28 | ||
|
|
fb5ddc3e9a | ||
|
|
5cb0984e00 |
@ -6,4 +6,5 @@ export const apiArr = {
|
||||
isAllow: "/api/v2/wechat/commodity/after-sales/is-allow", //判断订单是否能申请售后
|
||||
revokeApply: "/api/v2/wechat/commodity/after-sales/revoke-apply", //撤销售后申请
|
||||
changeGoodsList: "/api/v2/wechat/commodity/after-sales/change-goods-list", //商品售后换货商品列表
|
||||
updateApply: "/api/v2/wechat/commodity/after-sales/update-apply", //商品订单售后修改申请
|
||||
};
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
<view class="header">
|
||||
<view class="company-info">
|
||||
<text class="company-name">{{ item.commodity_order_item[0].goods_name }}</text>
|
||||
<text class="after-sale-no">{{ item.after_sales_type === 1 ? '退款' : (item.after_sales_type === 2 ? '退货瑞款' : '换货') }}</text>
|
||||
<text class="after-sale-no">{{ item.after_sales_type === 1 ? '退款' : (item.after_sales_type === 2
|
||||
? '退货瑞款' : '换货') }}</text>
|
||||
</view>
|
||||
<text class="order-time">提交订单:{{ formatDate(item.create_time) }}</text>
|
||||
</view>
|
||||
@ -32,7 +33,7 @@
|
||||
<!-- 退款状态 -->
|
||||
<view class="status-container">
|
||||
<view class="status-item" @click="pendingPage(item)">
|
||||
<text class="status-label">{{ getStatusText(item.after_sales_status) }}</text>
|
||||
<text class="status-label">{{ getStatusText(item) }}</text>
|
||||
<text class="status-desc">商家将在<text style="color: #e73b05;">{{
|
||||
calculateProcessingTime(item.create_time) }}</text>内处理</text>
|
||||
<view class="arrow-right"></view>
|
||||
@ -41,7 +42,7 @@
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="action-buttons">
|
||||
<button class="modify-btn" @click="modifyApplication">修改申请</button>
|
||||
<button class="modify-btn" @click="modifyApplication(item)">修改申请</button>
|
||||
<button class="cancel-btn" @click="cancelApplication(item)">撤销申请</button>
|
||||
</view>
|
||||
</view>
|
||||
@ -74,6 +75,14 @@ export default {
|
||||
currentAfterSale: this.afterSaleList,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
afterSaleList: {
|
||||
handler(newVal) {
|
||||
this.currentAfterSale = newVal;
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
const params = {
|
||||
@ -88,13 +97,20 @@ export default {
|
||||
this.currentAfterSale = res.after_sales_list;
|
||||
});
|
||||
},
|
||||
getStatusText(status) {
|
||||
// 根据状态码返回对应的状态文本
|
||||
getStatusText(item) {
|
||||
if (item.after_sales_status === 2) {
|
||||
return '已撤销';
|
||||
}
|
||||
if (item.process_status === 2) {
|
||||
return '已完成';
|
||||
} else if (item.process_status === 3) {
|
||||
return '已取消';
|
||||
}
|
||||
const status = item.review_status;
|
||||
const statusMap = {
|
||||
1: '商家待处理',
|
||||
2: '已撤销',
|
||||
3: '已完成',
|
||||
4: '已拒绝'
|
||||
2: '商家已同意',
|
||||
3: '商家已拒绝',
|
||||
};
|
||||
return statusMap[status] || '未知状态';
|
||||
},
|
||||
@ -112,8 +128,8 @@ export default {
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
},
|
||||
modifyApplication() {
|
||||
console.log('修改申请');
|
||||
modifyApplication(item) {
|
||||
NavgateTo(`../apply/index?item=${JSON.stringify(item)}`);
|
||||
},
|
||||
cancelApplication(item) {
|
||||
uni.showModal({
|
||||
@ -128,7 +144,11 @@ export default {
|
||||
this.getList();
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
icon: 'success',
|
||||
// duration: 1500,
|
||||
// success: () => {
|
||||
// this.$emit('revokeApply');
|
||||
// }
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -136,10 +156,22 @@ export default {
|
||||
});
|
||||
},
|
||||
pendingPage(item) {
|
||||
NavgateTo(`/packages/myOrders/pending/index?item=${JSON.stringify(item)}`); //拒绝申请
|
||||
// NavgateTo(`/packages/myOrders/sendBack/index?item=${JSON.stringify(item)}`); //自行寄回
|
||||
// NavgateTo(`/packages/myOrders/refundOver/index?item=${JSON.stringify(item)}`); //退款成功
|
||||
// NavgateTo(`/packages/myOrders/changeInfo/index?item=${JSON.stringify(item)}`); //换货
|
||||
console.log("🚀 ~ pendingPage ~ item:", item)
|
||||
// NavgateTo(`/packages/myOrders/sendBack/index?item=${JSON.stringify(item)}`);
|
||||
|
||||
if (item.after_sales_type === 3) {
|
||||
if (item.review_status === 2) {
|
||||
NavgateTo(`/packages/myOrders/sendBack/index?item=${JSON.stringify(item)}`); //自行寄回
|
||||
return;
|
||||
}
|
||||
NavgateTo(`/packages/myOrders/changeInfo/index?item=${JSON.stringify(item)}`)
|
||||
} else {
|
||||
if (item.refund_completed_time) {
|
||||
NavgateTo(`/packages/myOrders/refundOver/index?item=${JSON.stringify(item)}`); //退款成功
|
||||
return;
|
||||
}
|
||||
NavgateTo(`/packages/myOrders/pending/index?item=${JSON.stringify(item)}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
退货退款</view>
|
||||
<view :class="['asTab2', selectedAfterSaleType2 === 1 ? 'active' : '']"
|
||||
@click="selectAfterSaleType2(1)">
|
||||
退货
|
||||
退款
|
||||
</view>
|
||||
</view>
|
||||
<view class="reason-list" v-if="selectedAfterSaleType2 === 0">
|
||||
@ -103,14 +103,15 @@ import {
|
||||
upload,
|
||||
NavgateTo
|
||||
} from '../../../utils';
|
||||
import { apiArr } from "../../../api/afterSale";
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentAfterSale: null,
|
||||
afterSalePopup2: false,
|
||||
afterSalePopup3: false,
|
||||
selectedAfterSaleType2: 0, // 0:退货/退款, 1:退货
|
||||
selectedAfterSaleType2: 0, // 0:退货/退款, 1:退款
|
||||
selectedAsReason: 0,
|
||||
selectedServiceType: '',
|
||||
selectedRefundReason: '',
|
||||
@ -119,9 +120,10 @@ export default {
|
||||
postage: 0,
|
||||
refundDescription: '',
|
||||
refundMethod: '自行寄回',
|
||||
merchantAddress: '衡水市路北街道中心北大街世纪名城41号楼',
|
||||
merchantContact: '高尚 18032753127',
|
||||
merchantAddress: '',
|
||||
merchantContact: '',
|
||||
imgList: [],
|
||||
afterSalesType: 2,
|
||||
applyRefundReasons: [
|
||||
'商品质量问题',
|
||||
'商品与描述不符',
|
||||
@ -143,8 +145,10 @@ export default {
|
||||
this.currentAfterSale = item;
|
||||
// 设置初始退款金额等数据
|
||||
if (item) {
|
||||
this.refundAmount = item.sales_price || 0;
|
||||
this.refundAmount = item.refund_amount || 0;
|
||||
this.maxRefundAmount = item.sales_price || 0;
|
||||
this.merchantAddress = item.supplier_address || '未设置';
|
||||
this.merchantContact = `${item.supplier_name} ${item.supplier_phone}` || '未设置';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -153,12 +157,13 @@ export default {
|
||||
this.afterSalePopup2 = false;
|
||||
},
|
||||
|
||||
closeAfterSalePopup3() {
|
||||
this.afterSalePopup3 = false;
|
||||
},
|
||||
|
||||
// 选择售后类型
|
||||
selectAfterSaleType2(index) {
|
||||
if (index == 0) {
|
||||
this.afterSalesType = 2;
|
||||
} else {
|
||||
this.afterSalesType = 1;
|
||||
}
|
||||
this.selectedAfterSaleType2 = index;
|
||||
},
|
||||
|
||||
@ -169,7 +174,7 @@ export default {
|
||||
|
||||
// 确认退款原因选择
|
||||
confirmAfterSaleCancel2() {
|
||||
const afterSaleTypes = ['退货退款', '退货'];
|
||||
const afterSaleTypes = ['退货退款', '退款'];
|
||||
const selectedType = afterSaleTypes[this.selectedAfterSaleType2];
|
||||
console.log('选中的售后类型:', selectedType);
|
||||
|
||||
@ -191,7 +196,6 @@ export default {
|
||||
|
||||
// 打开选择服务类型或退款原因弹窗
|
||||
openAfterSalePopup2(type) {
|
||||
this.afterSalePopup3 = false;
|
||||
this.afterSalePopup2 = true;
|
||||
},
|
||||
|
||||
@ -213,16 +217,14 @@ export default {
|
||||
// 修改退款金额
|
||||
modifyRefundAmount() {
|
||||
console.log('修改退款金额');
|
||||
// 这里可以添加修改退款金额的逻辑
|
||||
},
|
||||
|
||||
// 查看地址详情
|
||||
viewAddressDetails() {
|
||||
console.log('查看地址详情');
|
||||
// 这里可以添加查看地址详情的逻辑
|
||||
},
|
||||
|
||||
// 提交退款申请
|
||||
// 提交修改申请
|
||||
submitRefundApplication() {
|
||||
if (!this.selectedServiceType || !this.selectedRefundReason) {
|
||||
uni.showToast({
|
||||
@ -232,26 +234,38 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
// 输出弹窗中的所有内容
|
||||
const refundInfo = {
|
||||
serviceType: this.selectedServiceType,
|
||||
refundReason: this.selectedRefundReason,
|
||||
refundAmount: this.refundAmount,
|
||||
maxRefundAmount: this.maxRefundAmount,
|
||||
postage: this.postage,
|
||||
refundDescription: this.refundDescription,
|
||||
refundMethod: this.refundMethod,
|
||||
merchantAddress: this.merchantAddress,
|
||||
merchantContact: this.merchantContact,
|
||||
imgList: this.imgList
|
||||
};
|
||||
console.log('提交退款申请:', refundInfo);
|
||||
const params = {
|
||||
id: this.currentAfterSale.id,
|
||||
after_sales_type: this.afterSalesType,
|
||||
after_sales_reason: this.selectedRefundReason,
|
||||
refund_amount: this.refundAmount,
|
||||
application_description: this.refundDescription,
|
||||
application_images: this.imgList && this.imgList.length > 0 ?
|
||||
this.imgList.map(img => img.url).join(',') : '',
|
||||
receiving_address: this.merchantAddress
|
||||
}
|
||||
console.log("🚀 ~ submitRefundApplication ~ params:", params)
|
||||
request(apiArr.updateApply, "POST", params).then((res) => {
|
||||
uni.showToast({
|
||||
title: '申请提交成功',
|
||||
icon: 'success'
|
||||
});
|
||||
|
||||
this.afterSalePopup3 = false;
|
||||
// 这里可以添加提交后的处理逻辑
|
||||
uni.showToast({
|
||||
title: '退款申请提交成功',
|
||||
icon: 'success'
|
||||
// 构造更新后的数据
|
||||
const updatedAfterSale = {
|
||||
...this.currentAfterSale,
|
||||
after_sales_type: this.afterSalesType,
|
||||
after_sales_reason: this.selectedRefundReason,
|
||||
refund_amount: this.refundAmount,
|
||||
application_description: this.refundDescription,
|
||||
application_images: this.imgList && this.imgList.length > 0 ?
|
||||
this.imgList.map(img => img.url).join(',') : ''
|
||||
};
|
||||
|
||||
setTimeout(() => {
|
||||
this.currentAfterSale = updatedAfterSale;
|
||||
uni.setStorageSync('afterSaleItem', updatedAfterSale);
|
||||
}, 1500);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,12 +213,9 @@ page {
|
||||
|
||||
.goods-desc {
|
||||
font-size: 26rpx;
|
||||
color: #ff4d4f;
|
||||
background-color: #fff2f0;
|
||||
padding: 4rpx 12rpx;
|
||||
color: #999999;
|
||||
border-radius: 8rpx;
|
||||
display: inline-block;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.goods-price {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="container page">
|
||||
<!-- 进度指示器 -->
|
||||
<view class="process-steps_top" v-if="false">
|
||||
<view class="process-steps_top" v-if="currentAfterSale.process_status === 1">
|
||||
<view class="step-item">
|
||||
<view class="step-line"></view>
|
||||
<view class="step-circle active"></view>
|
||||
@ -30,15 +30,15 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="status-tip" v-if="false">
|
||||
<view class="status-tip" v-if="currentAfterSale.process_status === 3">
|
||||
<text class="status-title">换货关闭</text>
|
||||
<text class="status-desc">2025年7月25日 11:30</text>
|
||||
<text class="status-desc">{{ formatDate(currentAfterSale.revoke_time) }}</text>
|
||||
<text class="status-desc">由于您主动撤销换货申请,换货关闭。</text>
|
||||
</view>
|
||||
|
||||
<view class="status-tip">
|
||||
<view class="status-tip" v-if="currentAfterSale.review_status === 3">
|
||||
<text class="status-title">换货关闭</text>
|
||||
<text class="status-desc">2025年7月25日 11:30</text>
|
||||
<text class="status-desc">{{ formatDate(currentAfterSale.review_time) }}</text>
|
||||
<text class="status-desc" style="color: #f63b08;">商家拒绝了您的换货申请,换货关闭</text>
|
||||
</view>
|
||||
|
||||
@ -59,16 +59,14 @@
|
||||
class="copy-icon" @click="copyRefundNo"/> -->
|
||||
</view>
|
||||
</view>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/af_update_address.png" class="icon_2" />
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/af_update_address.png"
|
||||
class="icon_2" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="addOrderIdBtn" @click="addOrderId">填写单号</button>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 商品信息 -->
|
||||
<view>
|
||||
<view class="goods-info">
|
||||
@ -82,10 +80,10 @@
|
||||
v-if="currentAfterSale.commodity_order_item[0].is_support_same_day === 1">当日达</text>
|
||||
{{ currentAfterSale.commodity_order_item[0].goods_name }}
|
||||
</text>
|
||||
<text class="goods-desc">{{ ite.after_sales_reason }}</text>
|
||||
<text class="goods-desc">{{ currentAfterSale.commodity_order_item[0].goods_spec }}</text>
|
||||
<text class="goods-price">
|
||||
{{ '¥' + currentAfterSale.commodity_order_item[0].sales_price.toFixed(2) + '/个' }}
|
||||
<text class="goods-count">X{{ currentAfterSale.commodity_order_item[0].count }}</text>
|
||||
<text class="goods-count">X{{ currentAfterSale.after_sales_goods.split('@')[0] }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -105,7 +103,7 @@
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">换货数量</text>
|
||||
<text class="info-value">{{ currentAfterSale.commodity_order_item[0].count }}</text>
|
||||
<text class="info-value">{{ currentAfterSale.change_goods }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">申请时间</text>
|
||||
@ -118,7 +116,7 @@
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">收货地址</text>
|
||||
<text class="info-value">{{ currentAfterSale.user_address }}</text>
|
||||
<text class="info-value">{{ currentAfterSale.receiving_address }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="false">
|
||||
<text class="info-label">退款完结</text>
|
||||
@ -128,7 +126,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="action-buttons" v-if="false">
|
||||
<view class="action-buttons" v-if="currentAfterSale.process_status === 1">
|
||||
<button class="cancel-btn" @click="cancelRefund">撤销申请</button>
|
||||
<button class="urge-btn" @click="modifyRefund">修改申请</button>
|
||||
</view>
|
||||
@ -199,6 +197,7 @@ import {
|
||||
upload,
|
||||
NavgateTo
|
||||
} from '../../../utils';
|
||||
import { apiArr } from "../../../api/afterSale";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -219,7 +218,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getServiceTypeText(type) {
|
||||
return type === 1 ? '退货退款' : '仅退款';
|
||||
return type === 1 ? '仅退款' : (type === 2 ? '退货退款' : '换货');
|
||||
},
|
||||
|
||||
// 格式化日期
|
||||
@ -281,10 +280,14 @@ export default {
|
||||
confirmColor: "#ff4d4f",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 撤销售后接口
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
const params = {
|
||||
id: this.currentAfterSale.id,
|
||||
}
|
||||
request(apiArr.revokeApply, "POST", params).then((res) => {
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<rated />
|
||||
</view>
|
||||
<view v-if="selectedTab === 8">
|
||||
<afterSale :afterSaleList="afterSaleList" />
|
||||
<afterSale :afterSaleList="afterSaleList" @revokeApply="revokeApply" />
|
||||
</view>
|
||||
<view v-else>
|
||||
<view v-for="(item, index) in orderData" :key="index">
|
||||
@ -337,6 +337,7 @@ export default {
|
||||
})
|
||||
})
|
||||
this.orderData = res.order_list;
|
||||
this.getAfterSaleList();
|
||||
});
|
||||
},
|
||||
getAfterSaleList() {
|
||||
@ -345,21 +346,26 @@ export default {
|
||||
}
|
||||
request(afterSaleApi.afterSalesList, "POST", params).then((res) => {
|
||||
res.after_sales_list.forEach(item => {
|
||||
// 处理退货图片,多个URL用逗号分隔
|
||||
if (item.return_images) {
|
||||
const images = item.return_images.split(',');
|
||||
const processedImages = images.map(img => picUrl + img).join(',');
|
||||
item.return_images = processedImages;
|
||||
}
|
||||
item.commodity_order_item?.forEach(good => {
|
||||
good.commodity_pic = picUrl + good.commodity_pic;
|
||||
})
|
||||
})
|
||||
this.afterSaleList = res.after_sales_list;
|
||||
});
|
||||
},
|
||||
|
||||
// 处理订单撤销成功事件
|
||||
revokeApply() {
|
||||
this.getOrderList();
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.getOrderList();
|
||||
this.getAfterSaleList();
|
||||
},
|
||||
onShow() {
|
||||
this.getOrderList();
|
||||
uni.removeStorageSync('afterSaleItem')
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -273,7 +273,10 @@ export default {
|
||||
showSize: false,//选择款式弹窗
|
||||
currentGG: {},//当前选择的款式
|
||||
currentGGIndex: 0,
|
||||
afterSalesType: 0, // 服务类型 1:仅退款 2:退货退款 3:换货
|
||||
afterSalesType: 2, // 服务类型 1:仅退款 2:退货退款 3:换货
|
||||
|
||||
merchantContact: '', // 商家信息
|
||||
merchantAddress: '', // 商家地址
|
||||
|
||||
refundDescription: '',
|
||||
refundMethod: '自行寄回',
|
||||
@ -361,6 +364,9 @@ export default {
|
||||
console.log('售后商品 - 选中的售后类型:', selectedType);
|
||||
console.log('选中的售后商品:', this.selectedAsGood);
|
||||
|
||||
this.merchantContact = `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone}`;
|
||||
this.merchantAddress = this.orderItem.supplier_address;
|
||||
|
||||
this.afterSalePopup = false;
|
||||
this.afterSalePopup2 = true;
|
||||
},
|
||||
@ -510,8 +516,8 @@ export default {
|
||||
postage: 0, // 假设邮费为0
|
||||
refundDescription: this.refundDescription,
|
||||
refundMethod: this.refundMethod,
|
||||
merchantAddress: this.orderItem.receiving_address,
|
||||
merchantContact: `${this.orderItem.receiving_name} ${this.orderItem.receiving_phone}`,
|
||||
merchantAddress: this.orderItem.supplier_address,
|
||||
merchantContact: `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone}`,
|
||||
imgList: this.imgList,
|
||||
changeServiceId: this.changeServiceId,
|
||||
};
|
||||
@ -520,7 +526,29 @@ export default {
|
||||
this.afterSalePopup3 = false;
|
||||
// 触发父组件事件,传递退款信息
|
||||
this.$emit('refundSubmitted', refundInfo);
|
||||
}
|
||||
|
||||
// 重置弹窗中的数据为默认值
|
||||
this.resetAfterSaleData();
|
||||
},
|
||||
|
||||
// 重置售后数据为默认值
|
||||
resetAfterSaleData() {
|
||||
this.selectedAsGood = '';
|
||||
this.selectedAfterSaleType = 0; // 0:退货/退款, 1:换货
|
||||
this.selectedAfterSaleType2 = 0; // 0:退货/退款, 1:退款
|
||||
this.selectedAsReason = 0;
|
||||
this.selectedReason = 0; // 换货原因
|
||||
this.selectedServiceType = '';
|
||||
this.selectedRefundReason = '';
|
||||
this.changeRefundReason = ''; // 换货原因回显
|
||||
this.changeServiceName = ''; // 换货商品回显
|
||||
this.changeServiceId = ''; // 换货商品id
|
||||
this.changeGoodsList = []; // 换货商品列表
|
||||
this.currentGG = {}; // 当前选择的款式
|
||||
this.currentGGIndex = 0;
|
||||
this.refundDescription = '';
|
||||
this.imgList = [];
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 进度条 -->
|
||||
<view class="progress-container" v-if="false">
|
||||
<view class="progress-container" v-if="currentAfterSale.process_status === 1">
|
||||
<view class="progress-item active">
|
||||
<text class="progress-text">商家处理</text>
|
||||
</view>
|
||||
@ -15,7 +15,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="progress-container">
|
||||
<view class="progress-container" v-if="currentAfterSale.process_status === 2">
|
||||
<view class="progress-item active">
|
||||
<text class="progress-text">商家处理</text>
|
||||
</view>
|
||||
@ -26,13 +26,13 @@
|
||||
</view>
|
||||
|
||||
<!-- 状态提示 -->
|
||||
<view class="status-tip" v-if="false">
|
||||
<view class="status-tip" v-if="currentAfterSale.process_status === 1">
|
||||
<text class="status-title">请等待商家处理</text>
|
||||
<text class="status-desc"><text style="font-weight: bold;">2天</text>后商家未处理将自动同意</text>
|
||||
<text class="status-desc">您已成功发起退款申请,请耐心等待商家处理</text>
|
||||
</view>
|
||||
|
||||
<view class="status-tip">
|
||||
<view class="status-tip" v-if="currentAfterSale.review_status === 3">
|
||||
<text class="status-title">商家拒绝申请,请您处理</text>
|
||||
<text class="status-desc"><text style="color: #f63b08;">2天</text>后未处理将自动关闭</text>
|
||||
</view>
|
||||
@ -91,7 +91,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="action-buttons">
|
||||
<view class="action-buttons" v-if="currentAfterSale.process_status === 1">
|
||||
<button class="cancel-btn" @click="cancelRefund">撤销申请</button>
|
||||
<button class="modify-btn" @click="modifyRefund">修改申请</button>
|
||||
<button class="urge-btn" @click="urgeProcess">催处理</button>
|
||||
@ -117,7 +117,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { apiArr } from "../../../api/afterSale";
|
||||
import {
|
||||
isPhone,
|
||||
@ -139,14 +138,27 @@ export default {
|
||||
// 初始化日期选择器默认值为当前申请时间
|
||||
this.pickerDefaultDate = new Date(this.currentAfterSale.create_time);
|
||||
},
|
||||
onShow() {
|
||||
const storageAfterSale = uni.getStorageSync('afterSaleItem');
|
||||
if (storageAfterSale) {
|
||||
this.currentAfterSale = storageAfterSale;
|
||||
uni.removeStorageSync('afterSaleItem');
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const item = JSON.parse(options?.item);
|
||||
console.log("🚀 ~ onLoad ~ item:", item)
|
||||
this.currentAfterSale = item;
|
||||
},
|
||||
// 添加onBackPress生命周期钩子,处理左上角返回按钮点击事件
|
||||
onBackPress() {
|
||||
// 确保使用uni.navigateBack()返回上一页,触发index页面的onShow生命周期
|
||||
uni.navigateBack();
|
||||
return true; // 阻止默认返回行为
|
||||
},
|
||||
methods: {
|
||||
getServiceTypeText(type) {
|
||||
return type === 1 ? '退货退款' : '仅退款';
|
||||
return type === 1 ? '退款' : (type === 2 ? '退货退款' : '换货');
|
||||
},
|
||||
|
||||
// 格式化日期
|
||||
|
||||
@ -107,6 +107,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.asGoodTag {
|
||||
@ -141,12 +142,9 @@
|
||||
|
||||
.goods-desc {
|
||||
font-size: 26rpx;
|
||||
color: #ff4d4f;
|
||||
background-color: #fff2f0;
|
||||
padding: 4rpx 12rpx;
|
||||
color: #999999;
|
||||
border-radius: 8rpx;
|
||||
display: inline-block;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.goods-price {
|
||||
@ -164,10 +162,9 @@
|
||||
.refund-amount {
|
||||
font-size: 28rpx;
|
||||
align-self: flex-start;
|
||||
margin-top: 20rpx;
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
left: 140rpx;
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
}
|
||||
|
||||
.refund-info {
|
||||
@ -262,6 +259,18 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.moneyGo-btn{
|
||||
width: 220rpx;
|
||||
height: 80rpx;
|
||||
background-color: #ff370b;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 40rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bottomImg{
|
||||
width: 70rpx;
|
||||
height: 80rpx;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 进度条 -->
|
||||
<view class="progress-container" v-if="false">
|
||||
<view class="progress-container">
|
||||
<view class="progress-item">
|
||||
<text class="progress-text">商家处理</text>
|
||||
</view>
|
||||
@ -15,7 +15,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="progress-container">
|
||||
<view class="progress-container" v-if="false">
|
||||
<view class="progress-item">
|
||||
<text class="progress-text">商家处理</text>
|
||||
</view>
|
||||
@ -46,10 +46,10 @@
|
||||
{{ currentAfterSale.commodity_order_item[0].goods_name }}
|
||||
<text class="refund-amount">退款:¥{{ currentAfterSale.refund_amount.toFixed(2) }}</text>
|
||||
</text>
|
||||
<text class="goods-desc">{{ ite.after_sales_reason }}</text>
|
||||
<text class="goods-desc">{{ currentAfterSale.commodity_order_item[0].goods_spec }}</text>
|
||||
<text class="goods-price">
|
||||
{{ '¥' + currentAfterSale.commodity_order_item[0].sales_price.toFixed(2) + '/个' }}
|
||||
<text class="goods-count">X{{ currentAfterSale.commodity_order_item[0].count }}</text>
|
||||
<text class="goods-count">X{{ currentAfterSale.after_sales_goods.split('@')[0] }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -87,12 +87,12 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="action-buttons" v-if="false">
|
||||
<button class="modify-btn" @click="modifyRefund">寄件详情</button>
|
||||
<button class="cancel-btn" @click="moneyGo">钱款去向</button>
|
||||
<view class="action-buttons">
|
||||
<button class="modify-btn" @click="shippingDetails">寄件详情</button>
|
||||
<button class="moneyGo-btn" @click="moneyGo">钱款去向</button>
|
||||
</view>
|
||||
|
||||
<view class="action-buttons">
|
||||
<view class="action-buttons" v-if="false">
|
||||
<button class="cancel-btn" @click="cancelRefund">撤销申请</button>
|
||||
<button class="urge-btn" @click="modifyRefund">修改申请</button>
|
||||
</view>
|
||||
@ -104,7 +104,7 @@
|
||||
<!-- 弹窗头部 -->
|
||||
<view class="popup-header">
|
||||
<text class="header-title">退款总额 ¥{{ currentAfterSale.refund_amount ?
|
||||
currentAfterSale.refund_amount.toFixed(2) : '34.18' }}</text>
|
||||
currentAfterSale.refund_amount.toFixed(2) : '0.00' }}</text>
|
||||
<text class="close-btn" @click="closeMoneyGoPopup">取消</text>
|
||||
</view>
|
||||
|
||||
@ -118,7 +118,7 @@
|
||||
</view>
|
||||
<text class="method-text">退回微信</text>
|
||||
<text class="method-amount">{{ currentAfterSale.refund_amount ? '¥' +
|
||||
currentAfterSale.refund_amount.toFixed(2) : '¥34.18' }}</text>
|
||||
currentAfterSale.refund_amount.toFixed(2) : '¥0.0' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 退款状态 -->
|
||||
@ -155,6 +155,7 @@ import {
|
||||
upload,
|
||||
NavgateTo
|
||||
} from '../../../utils';
|
||||
import { apiArr } from "../../../api/afterSale";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -175,7 +176,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getServiceTypeText(type) {
|
||||
return type === 1 ? '退货退款' : '仅退款';
|
||||
return type === 1 ? '仅退款' : (type === 2 ? '退货退款' : '换货');
|
||||
},
|
||||
|
||||
// 格式化日期
|
||||
@ -236,11 +237,15 @@ export default {
|
||||
confirmText: "确认撤销",
|
||||
confirmColor: "#ff4d4f",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 撤销售后接口
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
if (res.confirm) {
|
||||
const params = {
|
||||
id: this.currentAfterSale.id,
|
||||
}
|
||||
request(apiArr.revokeApply, "POST", params).then((res) => {
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@ -137,9 +137,9 @@ export default {
|
||||
};
|
||||
console.log('提交物流信息:', logisticsInfo);
|
||||
|
||||
// 这里可以添加提交后的处理逻辑
|
||||
// 显示成功提示
|
||||
uni.showToast({
|
||||
title: '物流信息提交成功',
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
|
||||
@ -108,6 +108,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.asGoodTag {
|
||||
@ -142,12 +143,9 @@
|
||||
|
||||
.goods-desc {
|
||||
font-size: 26rpx;
|
||||
color: #ff4d4f;
|
||||
background-color: #fff2f0;
|
||||
padding: 4rpx 12rpx;
|
||||
color: #999999;
|
||||
border-radius: 8rpx;
|
||||
display: inline-block;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.goods-price {
|
||||
@ -165,10 +163,9 @@
|
||||
.refund-amount {
|
||||
font-size: 28rpx;
|
||||
align-self: flex-start;
|
||||
margin-top: 20rpx;
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
left: 140rpx;
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
}
|
||||
|
||||
.refund-info {
|
||||
|
||||
@ -22,11 +22,15 @@
|
||||
<view class="status-desc2">需您自行联系快递公司退回,请不要邮寄到付</view>
|
||||
<view class="info-item" style="border: none;">
|
||||
<text class="info-label">商家地址</text>
|
||||
<text class="info-value">{{ currentAfterSale.after_sales_no }}</text>
|
||||
<text class="info-value">{{ currentAfterSale.supplier_address }}</text>
|
||||
<text class="copy-icon" @click="copyAdress"></text>
|
||||
</view>
|
||||
|
||||
<button class="addOrderIdBtn" @click="addOrderId">填写单号</button>
|
||||
<button class="addOrderIdBtn" @click="addOrderId" v-if="true">填写单号</button>
|
||||
<view class="logistics-info" v-else>
|
||||
<text>退货物流:</text>
|
||||
<text v-if="false"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="hr"></view>
|
||||
@ -44,10 +48,11 @@
|
||||
{{ currentAfterSale.commodity_order_item[0].goods_name }}
|
||||
<text class="refund-amount">退款:¥{{ currentAfterSale.refund_amount.toFixed(2) }}</text>
|
||||
</text>
|
||||
<text class="goods-desc">{{ ite.after_sales_reason }}</text>
|
||||
<text class="goods-desc">{{ currentAfterSale.commodity_order_item[0].goods_spec }}</text>
|
||||
<text class="goods-price">
|
||||
{{ '¥' + currentAfterSale.commodity_order_item[0].sales_price.toFixed(2) + '/个' }}
|
||||
<text class="goods-count">X{{ currentAfterSale.commodity_order_item[0].count }}</text>
|
||||
<text class="goods-count">X{{ currentAfterSale.after_sales_goods.split('@')[0] }}
|
||||
</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -82,8 +87,10 @@
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="action-buttons">
|
||||
<!-- 填写完物流单号后不显示图片和平台介入按钮 -->
|
||||
<view>
|
||||
<image class="bottomImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/secdBack_bottom.png" alt=""/>
|
||||
<image class="bottomImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/secdBack_bottom.png"
|
||||
alt="" />
|
||||
</view>
|
||||
<button class="modify-btn" @click="modifyRefund">平台介入</button>
|
||||
<button class="cancel-btn" @click="cancelRefund">撤销申请</button>
|
||||
@ -99,12 +106,14 @@ import {
|
||||
upload,
|
||||
NavgateTo
|
||||
} from '../../../utils';
|
||||
import { apiArr } from "../../../api/afterSale";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentAfterSale: {},
|
||||
pickerDefaultDate: new Date()
|
||||
pickerDefaultDate: new Date(),
|
||||
logisticsInfo: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -115,10 +124,25 @@ export default {
|
||||
const item = JSON.parse(options?.item);
|
||||
console.log("🚀 ~ onLoad ~ item:", item)
|
||||
this.currentAfterSale = item;
|
||||
this.getLogisticsInfo();
|
||||
},
|
||||
onShow() {
|
||||
// 页面显示时检查是否有新的物流信息
|
||||
this.getLogisticsInfo();
|
||||
},
|
||||
methods: {
|
||||
// 获取物流信息
|
||||
getLogisticsInfo() {
|
||||
const info = uni.getStorageSync('logisticsInfo');
|
||||
if (info) {
|
||||
this.logisticsInfo = info;
|
||||
// 可选:清空storage,避免下次进入还显示旧数据
|
||||
// uni.removeStorageSync('logisticsInfo');
|
||||
}
|
||||
},
|
||||
|
||||
getServiceTypeText(type) {
|
||||
return type === 1 ? '退货退款' : '仅退款';
|
||||
return type === 1 ? '仅退款' : (type === 2 ? '退货退款' : '换货');
|
||||
},
|
||||
|
||||
// 格式化日期
|
||||
@ -131,7 +155,7 @@ export default {
|
||||
// 赋值商家地址
|
||||
copyAdress() {
|
||||
uni.setClipboardData({
|
||||
data: this.currentAfterSale.after_sales_no,
|
||||
data: this.currentAfterSale.supplier_address,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '复制成功',
|
||||
@ -147,7 +171,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
addOrderId(){
|
||||
addOrderId() {
|
||||
NavgateTo(`../returnLogistics/index?item=${JSON.stringify(this.currentAfterSale)}`);
|
||||
},
|
||||
|
||||
@ -180,10 +204,14 @@ export default {
|
||||
confirmColor: "#ff4d4f",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 撤销售后接口
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
const params = {
|
||||
id: this.currentAfterSale.id,
|
||||
}
|
||||
request(apiArr.revokeApply, "POST", params).then((res) => {
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -192,7 +220,7 @@ export default {
|
||||
|
||||
// 修改申请
|
||||
modifyRefund() {
|
||||
NavgateTo(`../apply/index?item=${JSON.stringify(this.currentAfterSale)}`);
|
||||
// NavgateTo(`../apply/index?item=${JSON.stringify(this.currentAfterSale)}`);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user