Compare commits

...

8 Commits

Author SHA1 Message Date
赵毅
9ae7f9e088 优化退款成功和自行寄回页面 2025-09-12 17:13:55 +08:00
赵毅
866ee54a0b 修改商家已处理的页面 2025-09-12 16:11:31 +08:00
赵毅
4098389254 修改售后列表页面的状态展示 2025-09-12 15:40:40 +08:00
赵毅
984593109e 修改换货页面 2025-09-12 15:34:05 +08:00
赵毅
ee60321a03 完成售后页和处理页面的修改申请 2025-09-12 15:07:15 +08:00
赵毅
9557a51e28 修改售后商家处理页的服务类型展示 2025-09-12 11:03:23 +08:00
赵毅
fb5ddc3e9a 完成售后页和处理页面的撤销申请 2025-09-12 10:34:53 +08:00
赵毅
5cb0984e00 点击提交申请时将弹窗数据重置为默认 2025-09-12 09:06:42 +08:00
13 changed files with 269 additions and 137 deletions

View File

@ -6,4 +6,5 @@ export const apiArr = {
isAllow: "/api/v2/wechat/commodity/after-sales/is-allow", //判断订单是否能申请售后 isAllow: "/api/v2/wechat/commodity/after-sales/is-allow", //判断订单是否能申请售后
revokeApply: "/api/v2/wechat/commodity/after-sales/revoke-apply", //撤销售后申请 revokeApply: "/api/v2/wechat/commodity/after-sales/revoke-apply", //撤销售后申请
changeGoodsList: "/api/v2/wechat/commodity/after-sales/change-goods-list", //商品售后换货商品列表 changeGoodsList: "/api/v2/wechat/commodity/after-sales/change-goods-list", //商品售后换货商品列表
updateApply: "/api/v2/wechat/commodity/after-sales/update-apply", //商品订单售后修改申请
}; };

View File

@ -6,7 +6,8 @@
<view class="header"> <view class="header">
<view class="company-info"> <view class="company-info">
<text class="company-name">{{ item.commodity_order_item[0].goods_name }}</text> <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> </view>
<text class="order-time">提交订单{{ formatDate(item.create_time) }}</text> <text class="order-time">提交订单{{ formatDate(item.create_time) }}</text>
</view> </view>
@ -32,7 +33,7 @@
<!-- 退款状态 --> <!-- 退款状态 -->
<view class="status-container"> <view class="status-container">
<view class="status-item" @click="pendingPage(item)"> <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;">{{ <text class="status-desc">商家将在<text style="color: #e73b05;">{{
calculateProcessingTime(item.create_time) }}</text>内处理</text> calculateProcessingTime(item.create_time) }}</text>内处理</text>
<view class="arrow-right"></view> <view class="arrow-right"></view>
@ -41,7 +42,7 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<view class="action-buttons"> <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> <button class="cancel-btn" @click="cancelApplication(item)">撤销申请</button>
</view> </view>
</view> </view>
@ -74,6 +75,14 @@ export default {
currentAfterSale: this.afterSaleList, currentAfterSale: this.afterSaleList,
}; };
}, },
watch: {
afterSaleList: {
handler(newVal) {
this.currentAfterSale = newVal;
},
deep: true
}
},
methods: { methods: {
getList() { getList() {
const params = { const params = {
@ -88,13 +97,20 @@ export default {
this.currentAfterSale = res.after_sales_list; 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 = { const statusMap = {
1: '商家待处理', 1: '商家待处理',
2: '已撤销', 2: '商家已同意',
3: '已完成', 3: '商家已拒绝',
4: '已拒绝'
}; };
return statusMap[status] || '未知状态'; return statusMap[status] || '未知状态';
}, },
@ -112,8 +128,8 @@ export default {
const seconds = String(date.getSeconds()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}, },
modifyApplication() { modifyApplication(item) {
console.log('修改申请'); NavgateTo(`../apply/index?item=${JSON.stringify(item)}`);
}, },
cancelApplication(item) { cancelApplication(item) {
uni.showModal({ uni.showModal({
@ -128,7 +144,11 @@ export default {
this.getList(); this.getList();
uni.showToast({ uni.showToast({
title: '订单撤销成功', title: '订单撤销成功',
icon: 'success' icon: 'success',
// duration: 1500,
// success: () => {
// this.$emit('revokeApply');
// }
}); });
}); });
} }
@ -136,10 +156,22 @@ export default {
}); });
}, },
pendingPage(item) { pendingPage(item) {
NavgateTo(`/packages/myOrders/pending/index?item=${JSON.stringify(item)}`); // console.log("🚀 ~ pendingPage ~ item:", item)
// NavgateTo(`/packages/myOrders/sendBack/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)}`); // 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)}`);
}
} }
}, },
}; };

View File

@ -72,7 +72,7 @@
退货退款</view> 退货退款</view>
<view :class="['asTab2', selectedAfterSaleType2 === 1 ? 'active' : '']" <view :class="['asTab2', selectedAfterSaleType2 === 1 ? 'active' : '']"
@click="selectAfterSaleType2(1)"> @click="selectAfterSaleType2(1)">
退 退
</view> </view>
</view> </view>
<view class="reason-list" v-if="selectedAfterSaleType2 === 0"> <view class="reason-list" v-if="selectedAfterSaleType2 === 0">
@ -103,14 +103,15 @@ import {
upload, upload,
NavgateTo NavgateTo
} from '../../../utils'; } from '../../../utils';
import { apiArr } from "../../../api/afterSale";
export default { export default {
data() { data() {
return { return {
currentAfterSale: null, currentAfterSale: null,
afterSalePopup2: false, afterSalePopup2: false,
afterSalePopup3: false, selectedAfterSaleType2: 0, // 0:退/退, 1:退
selectedAfterSaleType2: 0, // 0:退/退, 1:退
selectedAsReason: 0, selectedAsReason: 0,
selectedServiceType: '', selectedServiceType: '',
selectedRefundReason: '', selectedRefundReason: '',
@ -119,9 +120,10 @@ export default {
postage: 0, postage: 0,
refundDescription: '', refundDescription: '',
refundMethod: '自行寄回', refundMethod: '自行寄回',
merchantAddress: '衡水市路北街道中心北大街世纪名城41号楼', merchantAddress: '',
merchantContact: '高尚 18032753127', merchantContact: '',
imgList: [], imgList: [],
afterSalesType: 2,
applyRefundReasons: [ applyRefundReasons: [
'商品质量问题', '商品质量问题',
'商品与描述不符', '商品与描述不符',
@ -143,8 +145,10 @@ export default {
this.currentAfterSale = item; this.currentAfterSale = item;
// 退 // 退
if (item) { if (item) {
this.refundAmount = item.sales_price || 0; this.refundAmount = item.refund_amount || 0;
this.maxRefundAmount = item.sales_price || 0; this.maxRefundAmount = item.sales_price || 0;
this.merchantAddress = item.supplier_address || '未设置';
this.merchantContact = `${item.supplier_name} ${item.supplier_phone}` || '未设置';
} }
}, },
methods: { methods: {
@ -153,12 +157,13 @@ export default {
this.afterSalePopup2 = false; this.afterSalePopup2 = false;
}, },
closeAfterSalePopup3() {
this.afterSalePopup3 = false;
},
// //
selectAfterSaleType2(index) { selectAfterSaleType2(index) {
if (index == 0) {
this.afterSalesType = 2;
} else {
this.afterSalesType = 1;
}
this.selectedAfterSaleType2 = index; this.selectedAfterSaleType2 = index;
}, },
@ -169,7 +174,7 @@ export default {
// 退 // 退
confirmAfterSaleCancel2() { confirmAfterSaleCancel2() {
const afterSaleTypes = ['退货退款', '退']; const afterSaleTypes = ['退货退款', '退'];
const selectedType = afterSaleTypes[this.selectedAfterSaleType2]; const selectedType = afterSaleTypes[this.selectedAfterSaleType2];
console.log('选中的售后类型:', selectedType); console.log('选中的售后类型:', selectedType);
@ -191,7 +196,6 @@ export default {
// 退 // 退
openAfterSalePopup2(type) { openAfterSalePopup2(type) {
this.afterSalePopup3 = false;
this.afterSalePopup2 = true; this.afterSalePopup2 = true;
}, },
@ -213,16 +217,14 @@ export default {
// 退 // 退
modifyRefundAmount() { modifyRefundAmount() {
console.log('修改退款金额'); console.log('修改退款金额');
// 退
}, },
// //
viewAddressDetails() { viewAddressDetails() {
console.log('查看地址详情'); console.log('查看地址详情');
//
}, },
// 退 //
submitRefundApplication() { submitRefundApplication() {
if (!this.selectedServiceType || !this.selectedRefundReason) { if (!this.selectedServiceType || !this.selectedRefundReason) {
uni.showToast({ uni.showToast({
@ -232,26 +234,38 @@ export default {
return; return;
} }
// const params = {
const refundInfo = { id: this.currentAfterSale.id,
serviceType: this.selectedServiceType, after_sales_type: this.afterSalesType,
refundReason: this.selectedRefundReason, after_sales_reason: this.selectedRefundReason,
refundAmount: this.refundAmount, refund_amount: this.refundAmount,
maxRefundAmount: this.maxRefundAmount, application_description: this.refundDescription,
postage: this.postage, application_images: this.imgList && this.imgList.length > 0 ?
refundDescription: this.refundDescription, this.imgList.map(img => img.url).join(',') : '',
refundMethod: this.refundMethod, receiving_address: this.merchantAddress
merchantAddress: this.merchantAddress, }
merchantContact: this.merchantContact, console.log("🚀 ~ submitRefundApplication ~ params:", params)
imgList: this.imgList request(apiArr.updateApply, "POST", params).then((res) => {
}; uni.showToast({
console.log('提交退款申请:', refundInfo); title: '申请提交成功',
icon: 'success'
});
this.afterSalePopup3 = false; //
// const updatedAfterSale = {
uni.showToast({ ...this.currentAfterSale,
title: '退款申请提交成功', after_sales_type: this.afterSalesType,
icon: 'success' 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);
}); });
} }
} }

View File

@ -213,12 +213,9 @@ page {
.goods-desc { .goods-desc {
font-size: 26rpx; font-size: 26rpx;
color: #ff4d4f; color: #999999;
background-color: #fff2f0;
padding: 4rpx 12rpx;
border-radius: 8rpx; border-radius: 8rpx;
display: inline-block; display: inline-block;
margin: 10rpx 0;
} }
.goods-price { .goods-price {

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="container page"> <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-item">
<view class="step-line"></view> <view class="step-line"></view>
<view class="step-circle active"></view> <view class="step-circle active"></view>
@ -30,15 +30,15 @@
</view> </view>
</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-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> <text class="status-desc">由于您主动撤销换货申请,换货关闭</text>
</view> </view>
<view class="status-tip"> <view class="status-tip" v-if="currentAfterSale.review_status === 3">
<text class="status-title">换货关闭</text> <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> <text class="status-desc" style="color: #f63b08;">商家拒绝了您的换货申请,换货关闭</text>
</view> </view>
@ -59,16 +59,14 @@
class="copy-icon" @click="copyRefundNo"/> --> class="copy-icon" @click="copyRefundNo"/> -->
</view> </view>
</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> </view>
</view> </view>
<button class="addOrderIdBtn" @click="addOrderId">填写单号</button> <button class="addOrderIdBtn" @click="addOrderId">填写单号</button>
</view> </view>
<!-- 商品信息 --> <!-- 商品信息 -->
<view> <view>
<view class="goods-info"> <view class="goods-info">
@ -82,10 +80,10 @@
v-if="currentAfterSale.commodity_order_item[0].is_support_same_day === 1">当日达</text> v-if="currentAfterSale.commodity_order_item[0].is_support_same_day === 1">当日达</text>
{{ currentAfterSale.commodity_order_item[0].goods_name }} {{ currentAfterSale.commodity_order_item[0].goods_name }}
</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"> <text class="goods-price">
{{ '¥' + currentAfterSale.commodity_order_item[0].sales_price.toFixed(2) + '/个' }} {{ '¥' + 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> </text>
</view> </view>
</view> </view>
@ -105,7 +103,7 @@
</view> </view>
<view class="info-item"> <view class="info-item">
<text class="info-label">换货数量</text> <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>
<view class="info-item"> <view class="info-item">
<text class="info-label">申请时间</text> <text class="info-label">申请时间</text>
@ -118,7 +116,7 @@
</view> </view>
<view class="info-item"> <view class="info-item">
<text class="info-label">收货地址</text> <text class="info-label">收货地址</text>
<text class="info-value">{{ currentAfterSale.user_address }}</text> <text class="info-value">{{ currentAfterSale.receiving_address }}</text>
</view> </view>
<view class="info-item" v-if="false"> <view class="info-item" v-if="false">
<text class="info-label">退款完结</text> <text class="info-label">退款完结</text>
@ -128,7 +126,7 @@
</view> </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="cancel-btn" @click="cancelRefund">撤销申请</button>
<button class="urge-btn" @click="modifyRefund">修改申请</button> <button class="urge-btn" @click="modifyRefund">修改申请</button>
</view> </view>
@ -199,6 +197,7 @@ import {
upload, upload,
NavgateTo NavgateTo
} from '../../../utils'; } from '../../../utils';
import { apiArr } from "../../../api/afterSale";
export default { export default {
data() { data() {
@ -219,7 +218,7 @@ export default {
}, },
methods: { methods: {
getServiceTypeText(type) { getServiceTypeText(type) {
return type === 1 ? '退货退款' : '仅退款'; return type === 1 ? '仅退款' : (type === 2 ? '退货退款' : '换货');
}, },
// //
@ -281,10 +280,14 @@ export default {
confirmColor: "#ff4d4f", confirmColor: "#ff4d4f",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
// const params = {
uni.showToast({ id: this.currentAfterSale.id,
title: '订单撤销成功', }
icon: 'success' request(apiArr.revokeApply, "POST", params).then((res) => {
uni.showToast({
title: '订单撤销成功',
icon: 'success'
});
}); });
} }
}, },

View File

@ -16,7 +16,7 @@
<rated /> <rated />
</view> </view>
<view v-if="selectedTab === 8"> <view v-if="selectedTab === 8">
<afterSale :afterSaleList="afterSaleList" /> <afterSale :afterSaleList="afterSaleList" @revokeApply="revokeApply" />
</view> </view>
<view v-else> <view v-else>
<view v-for="(item, index) in orderData" :key="index"> <view v-for="(item, index) in orderData" :key="index">
@ -337,6 +337,7 @@ export default {
}) })
}) })
this.orderData = res.order_list; this.orderData = res.order_list;
this.getAfterSaleList();
}); });
}, },
getAfterSaleList() { getAfterSaleList() {
@ -345,21 +346,26 @@ export default {
} }
request(afterSaleApi.afterSalesList, "POST", params).then((res) => { request(afterSaleApi.afterSalesList, "POST", params).then((res) => {
res.after_sales_list.forEach(item => { res.after_sales_list.forEach(item => {
// 退URL item.commodity_order_item?.forEach(good => {
if (item.return_images) { good.commodity_pic = picUrl + good.commodity_pic;
const images = item.return_images.split(','); })
const processedImages = images.map(img => picUrl + img).join(',');
item.return_images = processedImages;
}
}) })
this.afterSaleList = res.after_sales_list; this.afterSaleList = res.after_sales_list;
}); });
},
//
revokeApply() {
this.getOrderList();
} }
}, },
onLoad(options) { onLoad(options) {
this.getOrderList(); this.getOrderList();
this.getAfterSaleList(); },
onShow() {
this.getOrderList();
uni.removeStorageSync('afterSaleItem')
}, },
}; };
</script> </script>

View File

@ -273,7 +273,10 @@ export default {
showSize: false,// showSize: false,//
currentGG: {},// currentGG: {},//
currentGGIndex: 0, currentGGIndex: 0,
afterSalesType: 0, // 1:退 2:退退 3: afterSalesType: 2, // 1:退 2:退退 3:
merchantContact: '', //
merchantAddress: '', //
refundDescription: '', refundDescription: '',
refundMethod: '自行寄回', refundMethod: '自行寄回',
@ -361,6 +364,9 @@ export default {
console.log('售后商品 - 选中的售后类型:', selectedType); console.log('售后商品 - 选中的售后类型:', selectedType);
console.log('选中的售后商品:', this.selectedAsGood); console.log('选中的售后商品:', this.selectedAsGood);
this.merchantContact = `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone}`;
this.merchantAddress = this.orderItem.supplier_address;
this.afterSalePopup = false; this.afterSalePopup = false;
this.afterSalePopup2 = true; this.afterSalePopup2 = true;
}, },
@ -510,8 +516,8 @@ export default {
postage: 0, // 0 postage: 0, // 0
refundDescription: this.refundDescription, refundDescription: this.refundDescription,
refundMethod: this.refundMethod, refundMethod: this.refundMethod,
merchantAddress: this.orderItem.receiving_address, merchantAddress: this.orderItem.supplier_address,
merchantContact: `${this.orderItem.receiving_name} ${this.orderItem.receiving_phone}`, merchantContact: `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone}`,
imgList: this.imgList, imgList: this.imgList,
changeServiceId: this.changeServiceId, changeServiceId: this.changeServiceId,
}; };
@ -520,7 +526,29 @@ export default {
this.afterSalePopup3 = false; this.afterSalePopup3 = false;
// 退 // 退
this.$emit('refundSubmitted', refundInfo); 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> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="container"> <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"> <view class="progress-item active">
<text class="progress-text">商家处理</text> <text class="progress-text">商家处理</text>
</view> </view>
@ -15,7 +15,7 @@
</view> </view>
</view> </view>
<view class="progress-container"> <view class="progress-container" v-if="currentAfterSale.process_status === 2">
<view class="progress-item active"> <view class="progress-item active">
<text class="progress-text">商家处理</text> <text class="progress-text">商家处理</text>
</view> </view>
@ -26,13 +26,13 @@
</view> </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-title">请等待商家处理</text>
<text class="status-desc"><text style="font-weight: bold;">2</text>后商家未处理将自动同意</text> <text class="status-desc"><text style="font-weight: bold;">2</text>后商家未处理将自动同意</text>
<text class="status-desc">您已成功发起退款申请请耐心等待商家处理</text> <text class="status-desc">您已成功发起退款申请请耐心等待商家处理</text>
</view> </view>
<view class="status-tip"> <view class="status-tip" v-if="currentAfterSale.review_status === 3">
<text class="status-title">商家拒绝申请,请您处理</text> <text class="status-title">商家拒绝申请,请您处理</text>
<text class="status-desc"><text style="color: #f63b08;">2</text>后未处理将自动关闭</text> <text class="status-desc"><text style="color: #f63b08;">2</text>后未处理将自动关闭</text>
</view> </view>
@ -91,7 +91,7 @@
</view> </view>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<view class="action-buttons"> <view class="action-buttons" v-if="currentAfterSale.process_status === 1">
<button class="cancel-btn" @click="cancelRefund">撤销申请</button> <button class="cancel-btn" @click="cancelRefund">撤销申请</button>
<button class="modify-btn" @click="modifyRefund">修改申请</button> <button class="modify-btn" @click="modifyRefund">修改申请</button>
<button class="urge-btn" @click="urgeProcess">催处理</button> <button class="urge-btn" @click="urgeProcess">催处理</button>
@ -117,7 +117,6 @@
</template> </template>
<script> <script>
import { apiArr } from "../../../api/afterSale"; import { apiArr } from "../../../api/afterSale";
import { import {
isPhone, isPhone,
@ -139,14 +138,27 @@ export default {
// //
this.pickerDefaultDate = new Date(this.currentAfterSale.create_time); this.pickerDefaultDate = new Date(this.currentAfterSale.create_time);
}, },
onShow() {
const storageAfterSale = uni.getStorageSync('afterSaleItem');
if (storageAfterSale) {
this.currentAfterSale = storageAfterSale;
uni.removeStorageSync('afterSaleItem');
}
},
onLoad(options) { onLoad(options) {
const item = JSON.parse(options?.item); const item = JSON.parse(options?.item);
console.log("🚀 ~ onLoad ~ item:", item) console.log("🚀 ~ onLoad ~ item:", item)
this.currentAfterSale = item; this.currentAfterSale = item;
}, },
// onBackPress
onBackPress() {
// 使uni.navigateBack()indexonShow
uni.navigateBack();
return true; //
},
methods: { methods: {
getServiceTypeText(type) { getServiceTypeText(type) {
return type === 1 ? '退货退款' : '仅退款'; return type === 1 ? '退款' : (type === 2 ? '退货退款' : '换货');
}, },
// //

View File

@ -107,6 +107,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
position: relative;
} }
.asGoodTag { .asGoodTag {
@ -141,12 +142,9 @@
.goods-desc { .goods-desc {
font-size: 26rpx; font-size: 26rpx;
color: #ff4d4f; color: #999999;
background-color: #fff2f0;
padding: 4rpx 12rpx;
border-radius: 8rpx; border-radius: 8rpx;
display: inline-block; display: inline-block;
margin: 10rpx 0;
} }
.goods-price { .goods-price {
@ -164,10 +162,9 @@
.refund-amount { .refund-amount {
font-size: 28rpx; font-size: 28rpx;
align-self: flex-start; align-self: flex-start;
margin-top: 20rpx;
font-weight: 500; font-weight: 500;
position: relative; position: absolute;
left: 140rpx; right: 10rpx;
} }
.refund-info { .refund-info {
@ -262,6 +259,18 @@
text-align: center; 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{ .bottomImg{
width: 70rpx; width: 70rpx;
height: 80rpx; height: 80rpx;

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="container"> <view class="container">
<!-- 进度条 --> <!-- 进度条 -->
<view class="progress-container" v-if="false"> <view class="progress-container">
<view class="progress-item"> <view class="progress-item">
<text class="progress-text">商家处理</text> <text class="progress-text">商家处理</text>
</view> </view>
@ -15,7 +15,7 @@
</view> </view>
</view> </view>
<view class="progress-container"> <view class="progress-container" v-if="false">
<view class="progress-item"> <view class="progress-item">
<text class="progress-text">商家处理</text> <text class="progress-text">商家处理</text>
</view> </view>
@ -46,10 +46,10 @@
{{ currentAfterSale.commodity_order_item[0].goods_name }} {{ currentAfterSale.commodity_order_item[0].goods_name }}
<text class="refund-amount">退款¥{{ currentAfterSale.refund_amount.toFixed(2) }}</text> <text class="refund-amount">退款¥{{ currentAfterSale.refund_amount.toFixed(2) }}</text>
</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"> <text class="goods-price">
{{ '¥' + currentAfterSale.commodity_order_item[0].sales_price.toFixed(2) + '/个' }} {{ '¥' + 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> </text>
</view> </view>
</view> </view>
@ -87,12 +87,12 @@
</view> </view>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<view class="action-buttons" v-if="false"> <view class="action-buttons">
<button class="modify-btn" @click="modifyRefund">寄件详情</button> <button class="modify-btn" @click="shippingDetails">寄件详情</button>
<button class="cancel-btn" @click="moneyGo">钱款去向</button> <button class="moneyGo-btn" @click="moneyGo">钱款去向</button>
</view> </view>
<view class="action-buttons"> <view class="action-buttons" v-if="false">
<button class="cancel-btn" @click="cancelRefund">撤销申请</button> <button class="cancel-btn" @click="cancelRefund">撤销申请</button>
<button class="urge-btn" @click="modifyRefund">修改申请</button> <button class="urge-btn" @click="modifyRefund">修改申请</button>
</view> </view>
@ -104,7 +104,7 @@
<!-- 弹窗头部 --> <!-- 弹窗头部 -->
<view class="popup-header"> <view class="popup-header">
<text class="header-title">退款总额 ¥{{ currentAfterSale.refund_amount ? <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> <text class="close-btn" @click="closeMoneyGoPopup">取消</text>
</view> </view>
@ -118,7 +118,7 @@
</view> </view>
<text class="method-text">退回微信</text> <text class="method-text">退回微信</text>
<text class="method-amount">{{ currentAfterSale.refund_amount ? '¥' + <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>
</view> </view>
<!-- 退款状态 --> <!-- 退款状态 -->
@ -155,6 +155,7 @@ import {
upload, upload,
NavgateTo NavgateTo
} from '../../../utils'; } from '../../../utils';
import { apiArr } from "../../../api/afterSale";
export default { export default {
data() { data() {
@ -175,7 +176,7 @@ export default {
}, },
methods: { methods: {
getServiceTypeText(type) { getServiceTypeText(type) {
return type === 1 ? '退货退款' : '仅退款'; return type === 1 ? '仅退款' : (type === 2 ? '退货退款' : '换货');
}, },
// //
@ -236,11 +237,15 @@ export default {
confirmText: "确认撤销", confirmText: "确认撤销",
confirmColor: "#ff4d4f", confirmColor: "#ff4d4f",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
// const params = {
uni.showToast({ id: this.currentAfterSale.id,
title: '订单撤销成功', }
icon: 'success' request(apiArr.revokeApply, "POST", params).then((res) => {
uni.showToast({
title: '订单撤销成功',
icon: 'success'
});
}); });
} }
}, },

View File

@ -137,9 +137,9 @@ export default {
}; };
console.log('提交物流信息:', logisticsInfo); console.log('提交物流信息:', logisticsInfo);
// //
uni.showToast({ uni.showToast({
title: '物流信息提交成功', title: '提交成功',
icon: 'success' icon: 'success'
}); });
} }

View File

@ -108,6 +108,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
position: relative;
} }
.asGoodTag { .asGoodTag {
@ -142,12 +143,9 @@
.goods-desc { .goods-desc {
font-size: 26rpx; font-size: 26rpx;
color: #ff4d4f; color: #999999;
background-color: #fff2f0;
padding: 4rpx 12rpx;
border-radius: 8rpx; border-radius: 8rpx;
display: inline-block; display: inline-block;
margin: 10rpx 0;
} }
.goods-price { .goods-price {
@ -165,10 +163,9 @@
.refund-amount { .refund-amount {
font-size: 28rpx; font-size: 28rpx;
align-self: flex-start; align-self: flex-start;
margin-top: 20rpx;
font-weight: 500; font-weight: 500;
position: relative; position: absolute;
left: 140rpx; right: 10rpx;
} }
.refund-info { .refund-info {

View File

@ -22,11 +22,15 @@
<view class="status-desc2">需您自行联系快递公司退回请不要邮寄到付</view> <view class="status-desc2">需您自行联系快递公司退回请不要邮寄到付</view>
<view class="info-item" style="border: none;"> <view class="info-item" style="border: none;">
<text class="info-label">商家地址</text> <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> <text class="copy-icon" @click="copyAdress"></text>
</view> </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>
<view class="hr"></view> <view class="hr"></view>
@ -44,10 +48,11 @@
{{ currentAfterSale.commodity_order_item[0].goods_name }} {{ currentAfterSale.commodity_order_item[0].goods_name }}
<text class="refund-amount">退款¥{{ currentAfterSale.refund_amount.toFixed(2) }}</text> <text class="refund-amount">退款¥{{ currentAfterSale.refund_amount.toFixed(2) }}</text>
</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"> <text class="goods-price">
{{ '¥' + currentAfterSale.commodity_order_item[0].sales_price.toFixed(2) + '/个' }} {{ '¥' + 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> </text>
</view> </view>
</view> </view>
@ -82,8 +87,10 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<view class="action-buttons"> <view class="action-buttons">
<!-- 填写完物流单号后不显示图片和平台介入按钮 -->
<view> <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> </view>
<button class="modify-btn" @click="modifyRefund">平台介入</button> <button class="modify-btn" @click="modifyRefund">平台介入</button>
<button class="cancel-btn" @click="cancelRefund">撤销申请</button> <button class="cancel-btn" @click="cancelRefund">撤销申请</button>
@ -99,12 +106,14 @@ import {
upload, upload,
NavgateTo NavgateTo
} from '../../../utils'; } from '../../../utils';
import { apiArr } from "../../../api/afterSale";
export default { export default {
data() { data() {
return { return {
currentAfterSale: {}, currentAfterSale: {},
pickerDefaultDate: new Date() pickerDefaultDate: new Date(),
logisticsInfo: null
}; };
}, },
created() { created() {
@ -115,10 +124,25 @@ export default {
const item = JSON.parse(options?.item); const item = JSON.parse(options?.item);
console.log("🚀 ~ onLoad ~ item:", item) console.log("🚀 ~ onLoad ~ item:", item)
this.currentAfterSale = item; this.currentAfterSale = item;
this.getLogisticsInfo();
},
onShow() {
//
this.getLogisticsInfo();
}, },
methods: { methods: {
//
getLogisticsInfo() {
const info = uni.getStorageSync('logisticsInfo');
if (info) {
this.logisticsInfo = info;
// storage
// uni.removeStorageSync('logisticsInfo');
}
},
getServiceTypeText(type) { getServiceTypeText(type) {
return type === 1 ? '退货退款' : '仅退款'; return type === 1 ? '仅退款' : (type === 2 ? '退货退款' : '换货');
}, },
// //
@ -131,7 +155,7 @@ export default {
// //
copyAdress() { copyAdress() {
uni.setClipboardData({ uni.setClipboardData({
data: this.currentAfterSale.after_sales_no, data: this.currentAfterSale.supplier_address,
success: () => { success: () => {
uni.showToast({ uni.showToast({
title: '复制成功', title: '复制成功',
@ -147,7 +171,7 @@ export default {
}); });
}, },
addOrderId(){ addOrderId() {
NavgateTo(`../returnLogistics/index?item=${JSON.stringify(this.currentAfterSale)}`); NavgateTo(`../returnLogistics/index?item=${JSON.stringify(this.currentAfterSale)}`);
}, },
@ -180,10 +204,14 @@ export default {
confirmColor: "#ff4d4f", confirmColor: "#ff4d4f",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
// const params = {
uni.showToast({ id: this.currentAfterSale.id,
title: '订单撤销成功', }
icon: 'success' request(apiArr.revokeApply, "POST", params).then((res) => {
uni.showToast({
title: '订单撤销成功',
icon: 'success'
});
}); });
} }
}, },
@ -192,7 +220,7 @@ export default {
// //
modifyRefund() { modifyRefund() {
NavgateTo(`../apply/index?item=${JSON.stringify(this.currentAfterSale)}`); // NavgateTo(`../apply/index?item=${JSON.stringify(this.currentAfterSale)}`);
}, },
} }
}; };