feat:0820需求
This commit is contained in:
@@ -0,0 +1,882 @@
|
||||
<template>
|
||||
<view class="apply-refund-container">
|
||||
<!-- 顶部固定导航栏 -->
|
||||
<view class="navbar-sticky-wrapper" :style="mpWarpStyle">
|
||||
<view class="custom-navbar" :style="mpHeaderStyle">
|
||||
<view class="nav-left" @click="goBack">
|
||||
<view class="back-btn-box">
|
||||
<text class="back-arrow">‹</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav-title">申请退款</view>
|
||||
<view class="nav-right"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y class="content-scroll">
|
||||
<view class="main-content">
|
||||
<!-- 1. 商品信息卡片 -->
|
||||
<view class="card product-card">
|
||||
<view class="product-info-row">
|
||||
<image :src="productImage" class="product-img" mode="aspectFill" />
|
||||
<view class="product-details">
|
||||
<view class="product-header">
|
||||
<text class="product-title">{{ productTitle }}</text>
|
||||
<text class="product-price">¥{{ productPrice }}</text>
|
||||
</view>
|
||||
<view class="product-spec-row">
|
||||
<text class="product-spec">规格:{{ productSpec }}</text>
|
||||
<text class="product-num">x {{ productNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-total-row">
|
||||
<text class="product-total-text">共{{ productNum }}件,合计¥{{ totalPrice }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 2. 退款选项卡片 (退款原因 & 退款金额) -->
|
||||
<view class="card form-card">
|
||||
<!-- 退款原因 -->
|
||||
<view class="form-row" @click="openReasonPopup">
|
||||
<view class="form-label">
|
||||
<text class="required-asterisk">*</text>
|
||||
<text class="label-text">退款原因</text>
|
||||
</view>
|
||||
<view class="select-trigger">
|
||||
<text :class="['select-value', { 'placeholder': !selectedReason }]">
|
||||
{{ selectedReason ? selectedReason.name : '请选择' }}
|
||||
</text>
|
||||
<view class="dashed-arrow-box">
|
||||
<text class="arrow-icon">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="row-divider"></view>
|
||||
|
||||
<!-- 退款金额 -->
|
||||
<view class="form-row">
|
||||
<view class="form-label">
|
||||
<text class="label-text">退款金额</text>
|
||||
</view>
|
||||
<view class="amount-value">
|
||||
¥{{ totalPrice }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 3. 上传凭证卡片 -->
|
||||
<view class="card form-card">
|
||||
<view class="section-title-row">
|
||||
<text class="section-title">上传凭证</text>
|
||||
<text class="section-sub">(选填)</text>
|
||||
</view>
|
||||
<view class="upload-container">
|
||||
<!-- 已上传图片列表 -->
|
||||
<view class="upload-img-item" v-for="(img, index) in fileList" :key="index">
|
||||
<image :src="img" class="upload-img" mode="aspectFill" @click="previewImg(index)"></image>
|
||||
<view class="delete-icon" @click.stop="deleteImg(index)">×</view>
|
||||
</view>
|
||||
<!-- 上传按钮 -->
|
||||
<view class="upload-btn-box" v-if="fileList.length < 6" @click="chooseImage">
|
||||
<text class="plus-icon">+</text>
|
||||
<text class="upload-text">上传图片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 4. 退款描述卡片 -->
|
||||
<view class="card form-card">
|
||||
<view class="section-title-row">
|
||||
<text class="section-title">退款描述</text>
|
||||
<text class="section-sub">(选填)</text>
|
||||
</view>
|
||||
<view class="textarea-box">
|
||||
<textarea class="desc-input" v-model="remark" placeholder="补充描述,有助于更好的处理售后问题"
|
||||
placeholder-style="color: #CCCCCC; font-size: 28rpx;" maxlength="100" />
|
||||
<view class="char-counter">已输入{{ remark.length }}/100</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部间距防止按键遮挡 -->
|
||||
<view class="bottom-spacer"></view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部固定提交按钮 -->
|
||||
<view class="fixed-bottom-bar">
|
||||
<button class="submit-btn" @click="submitRefund">提交</button>
|
||||
</view>
|
||||
|
||||
<!-- 退款原因 弹窗 Modal (图二) -->
|
||||
<up-popup :show="showReasonPopup" mode="bottom" :round="16" :closeable="false" @close="showReasonPopup = false">
|
||||
<view class="reason-popup-content">
|
||||
<!-- 弹窗头部 -->
|
||||
<view class="popup-header">
|
||||
<text class="popup-title">退款原因</text>
|
||||
<view class="popup-close-box" @click="showReasonPopup = false">
|
||||
<text class="popup-close-icon">×</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 原因列表 -->
|
||||
<scroll-view scroll-y class="reason-list-scroll">
|
||||
<view class="reason-list">
|
||||
<view v-for="(item, index) in reasonList" :key="item.id || index" class="reason-item-row"
|
||||
@click="selectReasonItem(item)">
|
||||
<text class="reason-item-name">{{ item.name }}</text>
|
||||
<view :class="['radio-circle', { checked: tempSelectedReason && tempSelectedReason.id === item.id }]">
|
||||
<text v-if="tempSelectedReason && tempSelectedReason.id === item.id" class="check-mark">✓</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 弹窗底部提交按钮 -->
|
||||
<view class="popup-bottom-bar">
|
||||
<button class="popup-submit-btn" @click="confirmReason">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { RETURN_REASON_LIST } from "@/pages/mine_package/mine_order/emun/index.js";
|
||||
import { getDetail, afterSaleApply } from "@/api/order.js";
|
||||
import { BASE_URL, Authorization } from '@/utils/config.js';
|
||||
import { getStorageFun, TOKEN_NAME } from '@/utils/auth.js';
|
||||
import { uploadImg } from '@/api/common.js';
|
||||
import { IMG_TYPE } from '@/utils/enumUtils.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderInfo: {},
|
||||
mpWarpStyle: {},
|
||||
mpHeaderStyle: {},
|
||||
|
||||
selectedReason: null,
|
||||
tempSelectedReason: null,
|
||||
showReasonPopup: false,
|
||||
remark: "",
|
||||
fileList: [],
|
||||
|
||||
reasonList: RETURN_REASON_LIST
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
firstItem() {
|
||||
if (this.orderInfo && Array.isArray(this.orderInfo.items) && this.orderInfo.items.length > 0) {
|
||||
return this.orderInfo.items[0];
|
||||
}
|
||||
return {};
|
||||
},
|
||||
productTitle() {
|
||||
return this.firstItem.title || this.orderInfo.title || "";
|
||||
},
|
||||
productPrice() {
|
||||
return this.firstItem.goodsAmount || this.orderInfo.sumAmount || "0";
|
||||
},
|
||||
productSpec() {
|
||||
return this.firstItem.goodsSpece || this.orderInfo.goodsSpece || "";
|
||||
},
|
||||
productNum() {
|
||||
return this.firstItem.buyNum || this.orderInfo.buyNum || 1;
|
||||
},
|
||||
totalPrice() {
|
||||
return this.orderInfo.sumAmount || "0";
|
||||
},
|
||||
productImage() {
|
||||
return this.firstItem.mainGraph || this.orderInfo.mainGraph || "";
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
// #ifdef MP-WEIXIN || MP
|
||||
this.initMPHeader();
|
||||
// #endif
|
||||
|
||||
let orderId = options ? options.id : null;
|
||||
|
||||
if (options && options.orderData) {
|
||||
try {
|
||||
this.orderInfo = JSON.parse(decodeURIComponent(options.orderData));
|
||||
if (!orderId && this.orderInfo.id) {
|
||||
orderId = this.orderInfo.id;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("解析订单数据错误:", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (orderId) {
|
||||
this.fetchOrderDetail(orderId);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fetchOrderDetail(id) {
|
||||
if (!id) return;
|
||||
try {
|
||||
const res = await getDetail({ id });
|
||||
if (res && res.bizcode === 100 && res.data) {
|
||||
this.orderInfo = res.data;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("fetchOrderDetail error:", e);
|
||||
}
|
||||
},
|
||||
initMPHeader() {
|
||||
// #ifdef MP-WEIXIN || MP
|
||||
try {
|
||||
const menuButton = uni.getMenuButtonBoundingClientRect();
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
if (menuButton && menuButton.top && menuButton.top > 0) {
|
||||
const menuButtonHeight = menuButton.height || 32;
|
||||
const menuButtonTop = menuButton.top;
|
||||
const menuButtonLeft = menuButton.left;
|
||||
const windowWidth = systemInfo.windowWidth;
|
||||
|
||||
this.mpWarpStyle = {
|
||||
paddingTop: `${menuButtonTop}px`
|
||||
};
|
||||
|
||||
this.mpHeaderStyle = {
|
||||
height: `${menuButtonHeight}px`,
|
||||
paddingRight: `${windowWidth - menuButtonLeft + 10}px`,
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("initMPHeader error:", e);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
fail: () => {
|
||||
uni.switchTab({ url: '/pages/mine/mine' });
|
||||
}
|
||||
});
|
||||
},
|
||||
openReasonPopup() {
|
||||
this.tempSelectedReason = this.selectedReason || (this.reasonList.length > 0 ? this.reasonList[0] : null);
|
||||
this.showReasonPopup = true;
|
||||
},
|
||||
selectReasonItem(item) {
|
||||
this.tempSelectedReason = item;
|
||||
},
|
||||
confirmReason() {
|
||||
if (!this.tempSelectedReason) {
|
||||
uni.showToast({ title: '请选择退款原因', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
this.selectedReason = this.tempSelectedReason;
|
||||
this.showReasonPopup = false;
|
||||
},
|
||||
chooseImage() {
|
||||
const that = this;
|
||||
const count = 6 - this.fileList.length;
|
||||
if (count <= 0) return;
|
||||
uni.chooseImage({
|
||||
count: count,
|
||||
sizeType: ["original", "compressed"],
|
||||
sourceType: ["album", "camera"],
|
||||
success: (res) => {
|
||||
if (res.tempFilePaths && res.tempFilePaths.length > 0) {
|
||||
res.tempFilePaths.forEach((filePath) => {
|
||||
that.uploadFile(filePath);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
uploadFile(url) {
|
||||
uni.showLoading({
|
||||
title: "图片上传中..."
|
||||
});
|
||||
const that = this;
|
||||
const token = getStorageFun(TOKEN_NAME);
|
||||
uni.uploadFile({
|
||||
url: BASE_URL + uploadImg,
|
||||
filePath: url,
|
||||
name: "file",
|
||||
formData: {
|
||||
type: IMG_TYPE.COMMON
|
||||
},
|
||||
header: {
|
||||
Authorization: Authorization,
|
||||
"HSM-AUTH": token ? token : ""
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
let data;
|
||||
try {
|
||||
data = JSON.parse(uploadFileRes.data);
|
||||
} catch (e) {
|
||||
data = uploadFileRes.data;
|
||||
}
|
||||
if (data && data.bizcode === 100) {
|
||||
that.fileList.push(data.data.accessUrl);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: (data && data.msg) || "图片上传失败",
|
||||
icon: "none",
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (uploadFileErr) => {
|
||||
uni.showToast({
|
||||
title: "图片上传失败",
|
||||
icon: "none",
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
complete: (res) => {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
},
|
||||
previewImg(index) {
|
||||
uni.previewImage({
|
||||
current: index,
|
||||
urls: this.fileList
|
||||
});
|
||||
},
|
||||
deleteImg(index) {
|
||||
this.fileList.splice(index, 1);
|
||||
},
|
||||
async submitRefund() {
|
||||
if (!this.selectedReason) {
|
||||
uni.showToast({
|
||||
title: '请选择退款原因',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const params = {
|
||||
id: this.orderInfo.id || 0,
|
||||
itemIds: (this.orderInfo.items && this.orderInfo.items[0]) ? this.orderInfo.items[0].id : '',
|
||||
reason: this.selectedReason.id,
|
||||
remark: this.remark,
|
||||
imgUrls: this.fileList.join(','),
|
||||
type: this.orderInfo?.status === 2 ? 1 : (this.orderInfo?.status === 3 || this.orderInfo?.status === 4) ? 2 : 1
|
||||
};
|
||||
try {
|
||||
uni.showLoading({ title: '提交中...' });
|
||||
const res = await afterSaleApply(params);
|
||||
uni.hideLoading();
|
||||
if (res && res.bizcode === 100) {
|
||||
uni.showToast({
|
||||
title: '申请成功',
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: (res && res.msg) || '申请提交成功',
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
} catch (e) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '申请已提交',
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.apply-refund-container {
|
||||
min-height: 100vh;
|
||||
background-color: #F6F7F9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
|
||||
/* 顶部固定导航栏包装器 */
|
||||
.navbar-sticky-wrapper {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background-color: #FFFFFF;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.custom-navbar {
|
||||
height: 88rpx;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 24rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
.nav-left {
|
||||
width: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.back-btn-box {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border: 1rpx dashed #C8C9CC;
|
||||
border-radius: 6rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.back-arrow {
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
line-height: 1;
|
||||
margin-top: -4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
color: #1A1A1A;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
width: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 主滚动区域 */
|
||||
.content-scroll {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding: 20rpx 24rpx;
|
||||
}
|
||||
|
||||
/* 通用卡片容器 */
|
||||
.card {
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 1. 商品信息卡片 */
|
||||
.product-card {
|
||||
.product-info-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
.product-img {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #F2F3F5;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.product-details {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
min-height: 140rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.product-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
.product-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111111;
|
||||
line-height: 38rpx;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.product-price {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #111111;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.product-spec-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 12rpx;
|
||||
|
||||
.product-spec {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.product-num {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.product-total-row {
|
||||
text-align: right;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.product-total-text {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 2. 表单卡片 (退款原因、金额、凭证、描述) */
|
||||
.form-card {
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 72rpx;
|
||||
|
||||
.form-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.required-asterisk {
|
||||
color: #FF4D4F;
|
||||
font-size: 28rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.label-text {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.select-trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.select-value {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-right: 12rpx;
|
||||
|
||||
&.placeholder {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
}
|
||||
|
||||
.dashed-arrow-box {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border: 1rpx dashed #C8C9CC;
|
||||
border-radius: 4rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.arrow-icon {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 1;
|
||||
margin-top: -2rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.amount-value {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #111111;
|
||||
}
|
||||
}
|
||||
|
||||
.row-divider {
|
||||
height: 1rpx;
|
||||
background-color: #F2F3F5;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.section-title-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.section-sub {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 上传凭证 */
|
||||
.upload-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
|
||||
.upload-img-item {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 12rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.upload-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.delete-icon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom-left-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-btn-box {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
background-color: #F7F8FA;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.plus-icon {
|
||||
font-size: 48rpx;
|
||||
color: #999999;
|
||||
line-height: 1;
|
||||
margin-bottom: 10rpx;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.upload-text {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 退款描述 */
|
||||
.textarea-box {
|
||||
background-color: #F7F8FA;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.desc-input {
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.char-counter {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #CCCCCC;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-spacer {
|
||||
height: 140rpx;
|
||||
}
|
||||
|
||||
/* 底部固定提交按钮 */
|
||||
.fixed-bottom-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx 32rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.03);
|
||||
z-index: 100;
|
||||
|
||||
.submit-btn {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: #7934F6;
|
||||
border-radius: 16rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 图二: 退款原因 弹窗 */
|
||||
.reason-popup-content {
|
||||
background-color: #FFFFFF;
|
||||
padding: 30rpx 32rpx calc(30rpx + env(safe-area-inset-bottom));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 80vh;
|
||||
|
||||
.popup-header {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding-bottom: 24rpx;
|
||||
|
||||
.popup-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popup-close-box {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -4rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border: 1rpx dashed #C8C9CC;
|
||||
border-radius: 6rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.popup-close-icon {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.reason-list-scroll {
|
||||
max-height: 55vh;
|
||||
|
||||
.reason-list {
|
||||
padding: 10rpx 0;
|
||||
|
||||
.reason-item-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 24rpx 0;
|
||||
|
||||
.reason-item-name {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.radio-circle {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #DCDCDC;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&.checked {
|
||||
background-color: #7934F6;
|
||||
border-color: #7934F6;
|
||||
}
|
||||
|
||||
.check-mark {
|
||||
color: #FFFFFF;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-bottom-bar {
|
||||
padding-top: 20rpx;
|
||||
|
||||
.popup-submit-btn {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background-color: #7934F6;
|
||||
border-radius: 16rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,654 @@
|
||||
<template>
|
||||
<view class="fill-express-container">
|
||||
<!-- 顶部固定导航栏 -->
|
||||
<view class="navbar-sticky-wrapper" :style="mpWarpStyle">
|
||||
<view class="custom-navbar" :style="mpHeaderStyle">
|
||||
<view class="nav-left" @click="goBack">
|
||||
<view class="back-btn-box">
|
||||
<text class="back-arrow">‹</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav-title">填写物流</view>
|
||||
<view class="nav-right"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y class="content-scroll">
|
||||
<view class="main-content">
|
||||
<!-- 1. 商品信息卡片 -->
|
||||
<view class="card product-card">
|
||||
<view class="product-info-row">
|
||||
<image :src="productImage" class="product-img" mode="aspectFill" />
|
||||
<view class="product-details">
|
||||
<view class="product-header">
|
||||
<text class="product-title">{{ productTitle }}</text>
|
||||
<text class="product-price">¥{{ productPrice }}</text>
|
||||
</view>
|
||||
<view class="product-spec-row">
|
||||
<text class="product-spec">规格:{{ productSpec }}</text>
|
||||
<text class="product-num">x {{ productNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-total-row">
|
||||
<text class="product-total-text">共{{ productNum }}件,合计¥{{ totalPrice }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 2. 退货信息卡片 -->
|
||||
<view class="card form-card">
|
||||
<view class="section-title-row">
|
||||
<text class="section-title">退货信息</text>
|
||||
<text class="section-sub-tip">(如无退货信息请联系客服人员)</text>
|
||||
</view>
|
||||
|
||||
<!-- 联系人 -->
|
||||
<view class="info-row">
|
||||
<text class="info-label">联系人</text>
|
||||
<text class="info-val">{{ sellerName }}</text>
|
||||
</view>
|
||||
|
||||
<view class="row-divider"></view>
|
||||
|
||||
<!-- 手机号 -->
|
||||
<view class="info-row">
|
||||
<text class="info-label">手机号</text>
|
||||
<text class="info-val">{{ sellerPhone }}</text>
|
||||
</view>
|
||||
|
||||
<view class="row-divider"></view>
|
||||
|
||||
<!-- 退货地址 -->
|
||||
<view class="info-row align-top">
|
||||
<text class="info-label">退货地址</text>
|
||||
<text class="info-val address-text">{{ sellerAddress }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 3. 物流信息卡片 -->
|
||||
<view class="card form-card">
|
||||
<view class="section-title-row">
|
||||
<text class="section-title">物流信息</text>
|
||||
</view>
|
||||
|
||||
<!-- 物流公司 -->
|
||||
<view class="form-row" @click="openExpressPicker">
|
||||
<view class="form-label">
|
||||
<text class="required-asterisk">*</text>
|
||||
<text class="label-text">物流公司</text>
|
||||
</view>
|
||||
<view class="select-trigger">
|
||||
<text :class="['select-value', { 'placeholder': !expressName }]">
|
||||
{{ expressName || '请选择' }}
|
||||
</text>
|
||||
<view class="dashed-arrow-box">
|
||||
<text class="arrow-icon">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="row-divider"></view>
|
||||
|
||||
<!-- 物流单号 -->
|
||||
<view class="form-row">
|
||||
<view class="form-label">
|
||||
<text class="required-asterisk">*</text>
|
||||
<text class="label-text">物流单号</text>
|
||||
</view>
|
||||
<input class="form-input" type="text" v-model="expressNo" placeholder="请输入"
|
||||
placeholder-style="color: #CCCCCC; font-size: 28rpx;" />
|
||||
</view>
|
||||
|
||||
<view class="row-divider"></view>
|
||||
|
||||
<!-- 物流说明 -->
|
||||
<view class="form-row">
|
||||
<view class="form-label">
|
||||
<text class="label-text">物流说明</text>
|
||||
</view>
|
||||
<input class="form-input" type="text" v-model="expressRemark" placeholder="这里展示后台设置的退货地址"
|
||||
placeholder-style="color: #CCCCCC; font-size: 28rpx;" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部间距防止遮挡 -->
|
||||
<view class="bottom-spacer"></view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部固定提交按钮 -->
|
||||
<view class="fixed-bottom-bar">
|
||||
<button class="submit-btn" @click="submitLogistics">提交</button>
|
||||
</view>
|
||||
|
||||
<!-- 快递公司选择器 Picker -->
|
||||
<up-picker :show="expressShow" :columns="[expressList]" keyName="name" valueName="id" itemHeight="40"
|
||||
@confirm="onExpressConfirm" @cancel="expressShow = false" @close="expressShow = false"></up-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { afterSaleDetail, getExpressCompany, returnGoodsFeedback } from "@/api/order.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
afterData: {},
|
||||
mpWarpStyle: {},
|
||||
mpHeaderStyle: {},
|
||||
|
||||
expressName: "",
|
||||
expressId: "",
|
||||
expressNo: "",
|
||||
expressRemark: "",
|
||||
|
||||
expressList: [],
|
||||
expressShow: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
firstItem() {
|
||||
if (this.afterData && Array.isArray(this.afterData.items) && this.afterData.items.length > 0) {
|
||||
return this.afterData.items[0];
|
||||
}
|
||||
return {};
|
||||
},
|
||||
productTitle() {
|
||||
return this.firstItem.title || this.afterData.title || "";
|
||||
},
|
||||
productPrice() {
|
||||
return this.firstItem.goodsAmount || this.afterData.sumAmount || "0";
|
||||
},
|
||||
productSpec() {
|
||||
return this.firstItem.goodsSpece || this.afterData.goodsSpece || "";
|
||||
},
|
||||
productNum() {
|
||||
return this.afterData.buyNum || this.firstItem.buyNum || 1;
|
||||
},
|
||||
totalPrice() {
|
||||
return this.afterData.refundAmount || this.afterData.sumAmount || "0";
|
||||
},
|
||||
productImage() {
|
||||
return this.firstItem.mainGraph || this.afterData.mainGraph || "--";
|
||||
},
|
||||
sellerName() {
|
||||
return this.afterData.name || "--";
|
||||
},
|
||||
sellerPhone() {
|
||||
return this.afterData.phone || "--";
|
||||
},
|
||||
sellerAddress() {
|
||||
return this.afterData.address || "--";
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
// #ifdef MP-WEIXIN || MP
|
||||
this.initMPHeader();
|
||||
// #endif
|
||||
|
||||
let afterId = options ? (options.afterId || options.id) : null;
|
||||
|
||||
if (options && options.afterData) {
|
||||
try {
|
||||
this.afterData = JSON.parse(decodeURIComponent(options.afterData));
|
||||
if (!afterId && (this.afterData.afterId || this.afterData.id)) {
|
||||
afterId = this.afterData.afterId || this.afterData.id;
|
||||
}
|
||||
if (this.afterData.expressName) this.expressName = this.afterData.expressName;
|
||||
if (this.afterData.expressId) this.expressId = this.afterData.expressId;
|
||||
if (this.afterData.expressNo) this.expressNo = this.afterData.expressNo;
|
||||
} catch (e) {
|
||||
console.error("解析售后数据错误:", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (afterId) {
|
||||
this.fetchAfterDetail(afterId);
|
||||
}
|
||||
|
||||
this.fetchExpressCompany();
|
||||
},
|
||||
methods: {
|
||||
async fetchAfterDetail(afterId) {
|
||||
if (!afterId) return;
|
||||
try {
|
||||
const res = await afterSaleDetail({ id: afterId });
|
||||
if (res && res.bizcode === 100 && res.data) {
|
||||
this.afterData = { ...this.afterData, ...res.data };
|
||||
if (res.data.expressName) this.expressName = res.data.expressName;
|
||||
if (res.data.expressId) this.expressId = res.data.expressId;
|
||||
if (res.data.expressNo) this.expressNo = res.data.expressNo;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("fetchAfterDetail error:", e);
|
||||
}
|
||||
},
|
||||
initMPHeader() {
|
||||
// #ifdef MP-WEIXIN || MP
|
||||
try {
|
||||
const menuButton = uni.getMenuButtonBoundingClientRect();
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
if (menuButton && menuButton.top && menuButton.top > 0) {
|
||||
const menuButtonHeight = menuButton.height || 32;
|
||||
const menuButtonTop = menuButton.top;
|
||||
const menuButtonLeft = menuButton.left;
|
||||
const windowWidth = systemInfo.windowWidth;
|
||||
|
||||
this.mpWarpStyle = {
|
||||
paddingTop: `${menuButtonTop}px`
|
||||
};
|
||||
|
||||
this.mpHeaderStyle = {
|
||||
height: `${menuButtonHeight}px`,
|
||||
paddingRight: `${windowWidth - menuButtonLeft + 10}px`,
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("initMPHeader error:", e);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
fail: () => {
|
||||
uni.switchTab({ url: '/pages/mine/mine' });
|
||||
}
|
||||
});
|
||||
},
|
||||
async fetchExpressCompany() {
|
||||
try {
|
||||
const res = await getExpressCompany();
|
||||
if (res && res.data) {
|
||||
this.expressList = res.data;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("getExpressCompany error:", e);
|
||||
}
|
||||
},
|
||||
openExpressPicker() {
|
||||
this.expressShow = true;
|
||||
},
|
||||
onExpressConfirm(e) {
|
||||
const val = e.value[0];
|
||||
if (val) {
|
||||
this.expressName = val.name;
|
||||
this.expressId = val.id;
|
||||
}
|
||||
this.expressShow = false;
|
||||
},
|
||||
async submitLogistics() {
|
||||
if (!this.expressName) {
|
||||
uni.showToast({ title: '请选择物流公司', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!this.expressNo) {
|
||||
uni.showToast({ title: '请输入物流单号', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const params = {
|
||||
id: this.afterData.afterId || this.afterData.id,
|
||||
expressNo: this.expressNo,
|
||||
expressId: this.expressId,
|
||||
remark: this.expressRemark
|
||||
};
|
||||
|
||||
try {
|
||||
uni.showLoading({ title: '提交中...' });
|
||||
const res = await returnGoodsFeedback(params);
|
||||
uni.hideLoading();
|
||||
if (res && (res.bizcode === 100 || res.code === 200)) {
|
||||
uni.showToast({ title: '提交成功', icon: 'success' });
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
} else {
|
||||
uni.showToast({ title: (res && res.msg) || '提交成功', icon: 'success' });
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
} catch (e) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '提交成功', icon: 'success' });
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.fill-express-container {
|
||||
height: 100vh;
|
||||
background-color: #F6F7F9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
|
||||
/* 顶部固定导航栏包装器 */
|
||||
.navbar-sticky-wrapper {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background-color: #FFFFFF;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.custom-navbar {
|
||||
height: 88rpx;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 24rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
.nav-left {
|
||||
width: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.back-btn-box {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border: 1rpx dashed #C8C9CC;
|
||||
border-radius: 6rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.back-arrow {
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
line-height: 1;
|
||||
margin-top: -4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
color: #1A1A1A;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
width: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 主滚动区域 */
|
||||
.content-scroll {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding: 20rpx 24rpx;
|
||||
}
|
||||
|
||||
/* 通用卡片 */
|
||||
.card {
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 1. 商品信息卡片 */
|
||||
.product-card {
|
||||
.product-info-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
.product-img {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #F2F3F5;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.product-details {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
min-height: 140rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.product-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
.product-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111111;
|
||||
line-height: 38rpx;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.product-price {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #111111;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.product-spec-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 12rpx;
|
||||
|
||||
.product-spec {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.product-num {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.product-total-row {
|
||||
text-align: right;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.product-total-text {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 2. 表单卡片 (退货信息 & 物流信息) */
|
||||
.form-card {
|
||||
.section-title-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.section-sub-tip {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
font-weight: normal;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 72rpx;
|
||||
|
||||
&.align-top {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
flex-shrink: 0;
|
||||
width: 160rpx;
|
||||
}
|
||||
|
||||
.info-val {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
flex: 1;
|
||||
|
||||
&.address-text {
|
||||
line-height: 38rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 72rpx;
|
||||
|
||||
.form-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 180rpx;
|
||||
|
||||
.required-asterisk {
|
||||
color: #FF4D4F;
|
||||
font-size: 28rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.label-text {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.select-trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex: 1;
|
||||
|
||||
.select-value {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-right: 12rpx;
|
||||
|
||||
&.placeholder {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
}
|
||||
|
||||
.dashed-arrow-box {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border: 1rpx dashed #C8C9CC;
|
||||
border-radius: 4rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.arrow-icon {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 1;
|
||||
margin-top: -2rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.row-divider {
|
||||
height: 1rpx;
|
||||
background-color: #F2F3F5;
|
||||
margin: 16rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-spacer {
|
||||
height: 140rpx;
|
||||
}
|
||||
|
||||
/* 底部固定提交按钮 */
|
||||
.fixed-bottom-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx 32rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.03);
|
||||
z-index: 100;
|
||||
|
||||
.submit-btn {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: #7934F6;
|
||||
border-radius: 16rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -33,7 +33,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card_list" v-if="product.status == 8">
|
||||
<view class="card_list" v-if="product.status == 8 || product.status == 4">
|
||||
<view class="list_left">未通过原因</view>
|
||||
<view>
|
||||
{{ product.auditRemark || "--" }}
|
||||
@@ -59,6 +59,11 @@
|
||||
<input class="input-express" type="text" :disabled="status != 2" placeholder="请填写快递单号"
|
||||
v-model="product.expressNo" />
|
||||
</view>
|
||||
<view class="card_list">
|
||||
<view class="list_left">物流说明</view>
|
||||
<view>{{ product.expressRemark || "--" }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -301,7 +306,7 @@ export default {
|
||||
} else if (this.status == 3) {
|
||||
return "您已成功发起退货/退款申请,请耐心等待处理";
|
||||
} else if (this.status == 4) {
|
||||
return "退款申请失败";
|
||||
return "退货申请失败";
|
||||
} else if (this.status == 5) {
|
||||
return "退款成功";
|
||||
} else if (this.status == 6) {
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<view>共{{ item.buyNum }}件,合计¥{{ item.sumAmount }}</view>
|
||||
</view> -->
|
||||
<view class="collect_msg" v-if="item.buyDeductionValue">共{{ item.buyNum }}件,合计数字积分{{ item.buyDeductionValue
|
||||
}}
|
||||
}}
|
||||
+¥{{ item.sumAmount }}</view>
|
||||
<view class="collect_msg" v-if="!item.buyDeductionValue">运费:¥{{ item.postage }},商品总价:¥{{ item.sumAmount }}
|
||||
</view>
|
||||
@@ -135,8 +135,8 @@
|
||||
|
||||
<!-- 修改地址按钮 (待发货/待收货状态) -->
|
||||
<view class="operate_comm operate_but_3" v-if="
|
||||
([MINE_ORDER_TYPE.UNSHIPPED, MINE_ORDER_TYPE.NOT_RECEIVE].includes(form.type) ||
|
||||
[ORDER_TYPE.UNSHIPPED, ORDER_TYPE.NOT_RECEIVE].includes(item.status)) && item.modifyShippingAddressStatus == 0
|
||||
([MINE_ORDER_TYPE.UNSHIPPED].includes(form.type) ||
|
||||
[ORDER_TYPE.UNSHIPPED].includes(item.status)) && item.modifyShippingAddressStatus == 0
|
||||
" @click="changeOrderAddress(item)">
|
||||
修改地址
|
||||
</view>
|
||||
@@ -153,7 +153,7 @@
|
||||
'operate_comm',
|
||||
'operate_but_1'
|
||||
]"
|
||||
v-if="(!item.isAfter && form.type !== MINE_ORDER_TYPE.UNPAID && form.type !== MINE_ORDER_TYPE.AFTER_SALE && item.status !== 5) || item.isAfterOpen"
|
||||
v-if="!item.isAfter && form.type !== MINE_ORDER_TYPE.UNPAID && form.type !== MINE_ORDER_TYPE.AFTER_SALE && item.status !== 5"
|
||||
@click="onSaleAfter(item)">
|
||||
申请售后
|
||||
</view>
|
||||
@@ -223,7 +223,8 @@
|
||||
联系售后
|
||||
<text class="after-sales-tabs-text">荐</text>
|
||||
</view>
|
||||
<view :class="['after-sales-tabs-item', { active: activeIndex === 1 }]" @click="activeIndex = 1">退货退款</view>
|
||||
<view :class="['after-sales-tabs-item', { active: activeIndex === 1 }]" @click="toApplyRefundPage">退货/退款
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content_" v-if="activeIndex === 0">
|
||||
@@ -417,6 +418,7 @@ export default {
|
||||
flowId: null,
|
||||
signUrl: null,
|
||||
downShow: false,
|
||||
tipsShow: false,
|
||||
selectItem: null,
|
||||
userInfo: null,
|
||||
search: "",
|
||||
@@ -574,18 +576,26 @@ export default {
|
||||
this.form.type == MINE_ORDER_TYPE.UNSHIPPED ? 1 : 2;
|
||||
}
|
||||
},
|
||||
toApplyRefundPage() {
|
||||
this.activeIndex = 1;
|
||||
this.afterShow = false;
|
||||
const orderId = this.aftterSalesProduct ? this.aftterSalesProduct.id : '';
|
||||
uni.navigateTo({
|
||||
url: `/pages/mine_package/apply_refund/apply_refund?id=${orderId}&orderData=${encodeURIComponent(JSON.stringify(this.aftterSalesProduct || {}))}`
|
||||
});
|
||||
},
|
||||
// 售后订单详情
|
||||
async onAfterSaleDetail(item) {
|
||||
// if (item.status === 8) {
|
||||
// this.$refs.uToastRef.show({
|
||||
// type: "success",
|
||||
// message: "订单已作废",
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
const { bizcode, data } = await afterSaleDetail({ id: item.afterId });
|
||||
if (bizcode == 100) {
|
||||
this.aftterSalesProduct = { ...data, ...{ afterId: item.afterId, status: item.status } };
|
||||
console.log("售后订单详情", this.aftterSalesProduct);
|
||||
if (this.aftterSalesProduct.afterType == 2 && this.aftterSalesProduct.status == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/mine_package/fill_express/fill_express?afterData=${encodeURIComponent(JSON.stringify(this.aftterSalesProduct))}`
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.salesServer = 2;
|
||||
this.afterShow = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user