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", //判断订单是否能申请售后
|
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", //商品订单售后修改申请
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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)}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
@ -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'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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()返回上一页,触发index页面的onShow生命周期
|
||||||
|
uni.navigateBack();
|
||||||
|
return true; // 阻止默认返回行为
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getServiceTypeText(type) {
|
getServiceTypeText(type) {
|
||||||
return type === 1 ? '退货退款' : '仅退款';
|
return type === 1 ? '退款' : (type === 2 ? '退货退款' : '换货');
|
||||||
},
|
},
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -137,9 +137,9 @@ export default {
|
|||||||
};
|
};
|
||||||
console.log('提交物流信息:', logisticsInfo);
|
console.log('提交物流信息:', logisticsInfo);
|
||||||
|
|
||||||
// 这里可以添加提交后的处理逻辑
|
// 显示成功提示
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '物流信息提交成功',
|
title: '提交成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
@ -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)}`);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user