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", //判断订单是否能申请售后
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", //商品订单售后修改申请
};

View File

@ -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)}`);
}
}
},
};

View File

@ -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);
});
}
}

View File

@ -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 {

View File

@ -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'
});
});
}
},

View File

@ -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>

View File

@ -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>

View File

@ -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()indexonShow
uni.navigateBack();
return true; //
},
methods: {
getServiceTypeText(type) {
return type === 1 ? '退货退款' : '仅退款';
return type === 1 ? '退款' : (type === 2 ? '退货退款' : '换货');
},
//

View File

@ -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;

View File

@ -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'
});
});
}
},

View File

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

View File

@ -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 {

View File

@ -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)}`);
},
}
};