|
@@ -1,416 +1,98 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="apply-refund-page">
|
|
<view class="apply-refund-page">
|
|
|
- <!-- 退款商品 -->
|
|
|
|
|
- <view class="card">
|
|
|
|
|
- <view class="type-section">
|
|
|
|
|
- <view class="section-title">请选择售后类型</view>
|
|
|
|
|
- <view class="type-btn-group">
|
|
|
|
|
- <view class="type-btn" :class="{ active: refundType === '1' }"
|
|
|
|
|
- @click="confirmType([{ value: '1', label: '退货退款' }])">
|
|
|
|
|
- <text>退货退款</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="type-btn" :class="{ active: refundType === '2' }"
|
|
|
|
|
- @click="confirmType([{ value: '2', label: '仅退款' }])">
|
|
|
|
|
- <text>仅退款</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="card-header">
|
|
|
|
|
- <text class="card-title">退款商品</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="goods-list">
|
|
|
|
|
- <view v-for="(item, index) in orderInfo.detailVoList" :key="index" class="goods-item">
|
|
|
|
|
- <view class="checkbox-box" @click.stop="toggleCheck(item)">
|
|
|
|
|
- <u-icon v-if="item.checked" name="checkmark-circle-fill" color="#38C148" size="44"></u-icon>
|
|
|
|
|
- <u-icon v-else name="checkmark-circle" color="#ccc" size="44"></u-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
- <image :src="item.cover" mode="aspectFill" class="goods-cover"></image>
|
|
|
|
|
- <view class="goods-info">
|
|
|
|
|
- <view class="goods-name u-line-2">{{ item.bookName }}</view>
|
|
|
|
|
- <view class="goods-sku" v-if="item.isbn">ISBN: {{ item.isbn }}</view>
|
|
|
|
|
- <view class="price-box">
|
|
|
|
|
- <text class="price">¥{{ item.payPrice }}</text>
|
|
|
|
|
- <u-number-box v-model="item.refundNum" :min="1" :max="item.num"
|
|
|
|
|
- @change="calculateRefundMoney"></u-number-box>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 退款原因配置 -->
|
|
|
|
|
- <view class="card no-padding">
|
|
|
|
|
- <u-cell-group :border="false">
|
|
|
|
|
- <!-- 退款原因 -->
|
|
|
|
|
- <u-cell-item title="退款原因" :value="refundReasonText || '请选择'" @click="showReasonPicker = true" required
|
|
|
|
|
- :border-bottom="refundType === '2' ? false : true"></u-cell-item>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 货物状态 (仅退款显示) -->
|
|
|
|
|
- <u-cell-item v-if="refundType === '1'" title="货物状态" :value="shopStatusText"
|
|
|
|
|
- @click="showStatusPicker = true" required :border-bottom="false"></u-cell-item>
|
|
|
|
|
- </u-cell-group>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 退款金额与凭证 -->
|
|
|
|
|
- <view class="card no-padding">
|
|
|
|
|
- <view class="card-title" style="padding:30rpx 0 0 20rpx">退款金额:</view>
|
|
|
|
|
- <u-cell-group :border="false">
|
|
|
|
|
- <!-- 退回支付渠道 -->
|
|
|
|
|
- <u-cell-item :title="refundChannelText" :arrow="false">
|
|
|
|
|
- <view slot="right-icon" class="refund-money-box" @click="showRefundAmountPopup = true">
|
|
|
|
|
- <text class="money">¥{{ refundMoney }}</text>
|
|
|
|
|
- <view class="edit-tag" v-if="refundType === '2'">
|
|
|
|
|
- <u-icon name="edit-pen" size="24"></u-icon>
|
|
|
|
|
- <text>修改</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </u-cell-item>
|
|
|
|
|
- <!-- 上传描述和凭证 -->
|
|
|
|
|
- <u-cell-item title="上传描述和凭证" :value="uploadStatusText" @click="showUploadPopup = true" is-link
|
|
|
|
|
- :border-bottom="false"></u-cell-item>
|
|
|
|
|
- </u-cell-group>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 退货方式 (仅退货退款显示) - 单独分区 -->
|
|
|
|
|
- <view class="card no-padding" v-if="refundType === '1'">
|
|
|
|
|
- <u-cell-group :border="false">
|
|
|
|
|
- <u-cell-item title="退货方式" :value="returnMethodText || '请选择'" @click="showReturnMethodPicker = true"
|
|
|
|
|
- required></u-cell-item>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 上门取件地址 (仅上门取件显示) -->
|
|
|
|
|
- <view class="address-section" @click="chooseAddress">
|
|
|
|
|
- <view class="flex-a flex-j-b mb-20" v-if="address.name">
|
|
|
|
|
- <view class="address-label">我的地址</view>
|
|
|
|
|
- <image src="/pages-mine/static/adderss.png" style="width: 40rpx; height: 40rpx"></image>
|
|
|
|
|
- <view class="flex-d flex-1 ml-24" style="margin-right: 20rpx">
|
|
|
|
|
- <view class="flex-a flex-j-b mb-10">
|
|
|
|
|
- <view class="address-text">{{ address.name }}</view>
|
|
|
|
|
- <view class="address-text">{{ address.mobile }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="address-text">{{ address.province || '' }}{{ address.city || '' }}{{
|
|
|
|
|
- address.area || '' }}{{ address.fullAddress }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="flex-a flex-j-b" v-else>
|
|
|
|
|
- <view class="flex-a">
|
|
|
|
|
- <u-icon name="plus-circle-fill" :size="48" color="#38C148" top="2"></u-icon>
|
|
|
|
|
- <view class="ml-10 font-30 address-text">我的地址</view>
|
|
|
|
|
- <text class="u-required">*</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="flex-a">
|
|
|
|
|
- <view class="ml-10 address-text">请添加</view>
|
|
|
|
|
- <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </u-cell-group>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!-- 我的服务 - 单独分区 -->
|
|
|
|
|
- <view class="card no-padding">
|
|
|
|
|
- <view class="card-title" style="padding:30rpx 0 0 20rpx">我的服务</view>
|
|
|
|
|
- <u-cell-group :border="false">
|
|
|
|
|
- <u-cell-item title="退换无忧" value="服务生效中" :arrow="true" :border-bottom="false">
|
|
|
|
|
- <u-icon slot="icon" name="checkmark-circle-fill" color="#38C148" size="32"
|
|
|
|
|
- style="margin-right: 10rpx;"></u-icon>
|
|
|
|
|
- </u-cell-item>
|
|
|
|
|
- </u-cell-group>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 底部占位 -->
|
|
|
|
|
- <view style="height: 60rpx;"></view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 底部固定栏 -->
|
|
|
|
|
- <view class="footer-bar">
|
|
|
|
|
- <view class="footer-left" @click="showRefundAmountPopup = true">
|
|
|
|
|
- <text class="label">{{ refundChannelText }}:</text>
|
|
|
|
|
- <text class="amount">¥{{ refundMoney }}</text>
|
|
|
|
|
- <text class="detail-link">明细</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="footer-right">
|
|
|
|
|
- <u-button type="primary" shape="circle" :custom-style="submitBtnStyle" @click="submit">提交申请</u-button>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 弹窗: 退款原因 -->
|
|
|
|
|
- <u-select v-model="showReasonPicker" :list="reasonList" @confirm="confirmReason"></u-select>
|
|
|
|
|
- <!-- 弹窗: 货物状态 -->
|
|
|
|
|
- <u-select v-model="showStatusPicker" :list="statusList" @confirm="confirmStatus"></u-select>
|
|
|
|
|
- <!-- 弹窗: 退货方式 -->
|
|
|
|
|
- <u-select v-model="showReturnMethodPicker" :list="returnMethodList" :default-value="returnMethodIndex"
|
|
|
|
|
- @confirm="confirmReturnMethod"></u-select>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 弹窗: 上传描述和凭证 -->
|
|
|
|
|
- <u-popup v-model="showUploadPopup" mode="bottom" border-radius="24" height="800">
|
|
|
|
|
- <view class="popup-container full-height">
|
|
|
|
|
- <view class="popup-header">
|
|
|
|
|
- <text class="title">上传描述和凭证</text>
|
|
|
|
|
- <u-icon name="close" size="32" color="#999" @click="showUploadPopup = false"></u-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="popup-content">
|
|
|
|
|
- <view class="upload-textarea-box">
|
|
|
|
|
- <u-input v-model="description" type="textarea" placeholder="补充描述,有助于平台更好的处理售后问题" :height="100"
|
|
|
|
|
- maxlength="200" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="upload-area">
|
|
|
|
|
- <common-image-upload v-model="fileList" :max-count="5" code="shopRefund" width="160"
|
|
|
|
|
- height="160">
|
|
|
|
|
- </common-image-upload>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="popup-footer safe-area-bottom">
|
|
|
|
|
- <u-button type="primary" shape="circle" :custom-style="submitBtnStyle"
|
|
|
|
|
- @click="showUploadPopup = false">完成</u-button>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </u-popup>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 弹窗: 退款明细 -->
|
|
|
|
|
- <u-popup v-model="showRefundAmountPopup" mode="bottom" border-radius="24">
|
|
|
|
|
- <view class="popup-container">
|
|
|
|
|
- <view class="popup-header">
|
|
|
|
|
- <text class="title">{{ refundType === '2' ? '修改退款金额' : '退款金额明细' }}</text>
|
|
|
|
|
- <u-icon name="close" size="32" color="#999" @click="showRefundAmountPopup = false"></u-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="popup-content">
|
|
|
|
|
- <view class="detail-item">
|
|
|
|
|
- <view class="item-row">
|
|
|
|
|
- <u-icon name="rmb-circle" size="36" color="#666"></u-icon>
|
|
|
|
|
- <text class="item-label">{{ refundChannelText }}</text>
|
|
|
|
|
- <text v-if="refundType !== '2'" class="item-value">¥{{ refundMoney }}</text>
|
|
|
|
|
- <u-input v-else v-model="customRefundMoney" type="number" placeholder="请输入退款金额"
|
|
|
|
|
- class="money-input" @blur="validateRefundMoney" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-if="refundType === '2'" class="max-money-hint">
|
|
|
|
|
- <text>最大可退金额: ¥{{ maxRefundMoney }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <!-- 如果有红包/优惠,展示在这里 -->
|
|
|
|
|
- <view class="detail-item" v-if="otherRefundAmount > 0">
|
|
|
|
|
- <view class="item-row">
|
|
|
|
|
- <u-icon name="red-packet" size="36" color="#666"></u-icon>
|
|
|
|
|
- <text class="item-label">退回其他</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="sub-list">
|
|
|
|
|
- <view class="sub-item" v-if="orderInfo.discountMoney > 0">
|
|
|
|
|
- <text class="sub-label">优惠金额</text>
|
|
|
|
|
- <text class="sub-value">¥{{ orderInfo.discountMoney }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <!-- 预留红包字段 -->
|
|
|
|
|
- <view class="sub-item" v-if="orderInfo.redPacketMoney > 0">
|
|
|
|
|
- <text class="sub-label">红包</text>
|
|
|
|
|
- <text class="sub-value">¥{{ orderInfo.redPacketMoney }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="popup-footer safe-area-bottom">
|
|
|
|
|
- <u-button v-if="refundType === '2'" type="primary" shape="circle" :custom-style="submitBtnStyle"
|
|
|
|
|
- @click="confirmRefundMoney">确认修改</u-button>
|
|
|
|
|
- <u-button v-else type="primary" shape="circle" :custom-style="submitBtnStyle"
|
|
|
|
|
- @click="showRefundAmountPopup = false">我知道了</u-button>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </u-popup>
|
|
|
|
|
|
|
+ <refund-step-one
|
|
|
|
|
+ v-if="currentStep === 1"
|
|
|
|
|
+ :goods-list="mergedGoods"
|
|
|
|
|
+ :refund-type.sync="refundType"
|
|
|
|
|
+ :reason-list="reasonList"
|
|
|
|
|
+ :status-list="statusList"
|
|
|
|
|
+ @next="handleStepOneNext"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <refund-step-two
|
|
|
|
|
+ v-if="currentStep === 2"
|
|
|
|
|
+ :selected-goods="selectedGoods"
|
|
|
|
|
+ :refund-type="refundType"
|
|
|
|
|
+ :default-address="address"
|
|
|
|
|
+ :reason-list="reasonList"
|
|
|
|
|
+ :status-list="statusList"
|
|
|
|
|
+ @back="currentStep = 1"
|
|
|
|
|
+ @submit="handleSubmit"
|
|
|
|
|
+ />
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import CommonImageUpload from "@/components/image-upload.vue";
|
|
|
|
|
|
|
+ import RefundStepOne from '../components/refund-step-one.vue';
|
|
|
|
|
+ import RefundStepTwo from '../components/refund-step-two.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
- CommonImageUpload
|
|
|
|
|
|
|
+ RefundStepOne,
|
|
|
|
|
+ RefundStepTwo
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
orderId: '',
|
|
orderId: '',
|
|
|
- isModify: false, // 是否是修改申请模式
|
|
|
|
|
- refundOrderId: '', // 修改模式下的退款单ID
|
|
|
|
|
- orderInfo: {
|
|
|
|
|
- detailVoList: [],
|
|
|
|
|
- discountMoney: 0,
|
|
|
|
|
- redPacketMoney: 0 // 假设有
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- // 表单数据
|
|
|
|
|
|
|
+ targetDetailOrderId: '',
|
|
|
|
|
+ isModify: false,
|
|
|
|
|
+ refundOrderId: '',
|
|
|
|
|
+
|
|
|
|
|
+ orderInfo: null,
|
|
|
|
|
+ mergedGoods: [], // 合并了 applyRefundPre 返回的字段
|
|
|
|
|
+ selectedGoods: [], // Step1 选中的商品及其状态/原因
|
|
|
|
|
+
|
|
|
refundType: '1', // 1: 退货退款, 2: 仅退款
|
|
refundType: '1', // 1: 退货退款, 2: 仅退款
|
|
|
- refundTypeText: '退货退款',
|
|
|
|
|
-
|
|
|
|
|
- refundReason: '',
|
|
|
|
|
- refundReasonText: '',
|
|
|
|
|
-
|
|
|
|
|
- shopStatus: '2', // 1: 未收到货, 2: 已收到货
|
|
|
|
|
- shopStatusText: '已收到货',
|
|
|
|
|
-
|
|
|
|
|
- returnMethod: '3', // 1: 上门取件, 2: 寄件点自寄, 3: 自行寄回
|
|
|
|
|
- returnMethodText: '自行寄回',
|
|
|
|
|
-
|
|
|
|
|
- description: '',
|
|
|
|
|
- fileList: [], // 用于回显和同步状态
|
|
|
|
|
-
|
|
|
|
|
- address: {}, // 上门取件地址
|
|
|
|
|
-
|
|
|
|
|
- // 退款金额相关
|
|
|
|
|
- customRefundMoney: '', // 用户自定义的退款金额
|
|
|
|
|
-
|
|
|
|
|
- // 辅助数据
|
|
|
|
|
- showReasonPicker: false,
|
|
|
|
|
- showStatusPicker: false,
|
|
|
|
|
- showReturnMethodPicker: false,
|
|
|
|
|
- showRefundAmountPopup: false,
|
|
|
|
|
- showUploadPopup: false, // 上传弹窗
|
|
|
|
|
-
|
|
|
|
|
|
|
+ currentStep: 1,
|
|
|
|
|
+
|
|
|
reasonList: [],
|
|
reasonList: [],
|
|
|
statusList: [
|
|
statusList: [
|
|
|
{ value: '1', label: '未收到货' },
|
|
{ value: '1', label: '未收到货' },
|
|
|
{ value: '2', label: '已收到货' }
|
|
{ value: '2', label: '已收到货' }
|
|
|
],
|
|
],
|
|
|
- returnMethodList: [
|
|
|
|
|
- { value: '1', label: '上门取件' },
|
|
|
|
|
- { value: '2', label: '寄件点自寄' },
|
|
|
|
|
- { value: '3', label: '自行寄回' }
|
|
|
|
|
- ],
|
|
|
|
|
-
|
|
|
|
|
- submitBtnStyle: {
|
|
|
|
|
- width: '100%',
|
|
|
|
|
- height: '80rpx',
|
|
|
|
|
- fontSize: '30rpx',
|
|
|
|
|
- backgroundColor: '#38C148',
|
|
|
|
|
- color: '#ffffff'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ address: {} // 默认取件地址
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- computed: {
|
|
|
|
|
- returnMethodIndex() {
|
|
|
|
|
- const index = this.returnMethodList.findIndex(item => item.value === this.returnMethod);
|
|
|
|
|
- return index > -1 ? [index] : [2];
|
|
|
|
|
- },
|
|
|
|
|
- selectedGoods() {
|
|
|
|
|
- return this.orderInfo.detailVoList.filter(item => item.checked);
|
|
|
|
|
- },
|
|
|
|
|
- maxRefundMoney() {
|
|
|
|
|
- if (!this.orderInfo.detailVoList || this.orderInfo.detailVoList.length === 0) return '0.00';
|
|
|
|
|
-
|
|
|
|
|
- let totalOriginal = 0;
|
|
|
|
|
- this.orderInfo.detailVoList.forEach(item => {
|
|
|
|
|
- totalOriginal += Number(item.payPrice) * item.num;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- if (totalOriginal === 0) return '0.00';
|
|
|
|
|
-
|
|
|
|
|
- let refund = 0;
|
|
|
|
|
- this.selectedGoods.forEach(item => {
|
|
|
|
|
- refund += Number(item.payPrice) * item.refundNum;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- return refund.toFixed(2);
|
|
|
|
|
- },
|
|
|
|
|
- refundMoney() {
|
|
|
|
|
- if (this.customRefundMoney) {
|
|
|
|
|
- return this.customRefundMoney;
|
|
|
|
|
- }
|
|
|
|
|
- return this.maxRefundMoney;
|
|
|
|
|
- },
|
|
|
|
|
- refundChannelText() {
|
|
|
|
|
- const type = String(this.orderInfo.payType);
|
|
|
|
|
- if (type === '1') return '退回余额';
|
|
|
|
|
- if (type === '2') return '退回微信';
|
|
|
|
|
- return '退回支付渠道';
|
|
|
|
|
- },
|
|
|
|
|
- otherRefundAmount() {
|
|
|
|
|
- return (Number(this.orderInfo.discountMoney) || 0) + (Number(this.orderInfo.redPacketMoney) || 0);
|
|
|
|
|
- },
|
|
|
|
|
- uploadStatusText() {
|
|
|
|
|
- if ((this.description && this.description.trim().length > 0) || this.fileList.length > 0) {
|
|
|
|
|
- return '已补充';
|
|
|
|
|
- }
|
|
|
|
|
- return '上传有助于处理退款';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
this.getRefundReasons();
|
|
this.getRefundReasons();
|
|
|
if (options.isModify == '1' && options.refundOrderId) {
|
|
if (options.isModify == '1' && options.refundOrderId) {
|
|
|
this.isModify = true;
|
|
this.isModify = true;
|
|
|
this.refundOrderId = options.refundOrderId;
|
|
this.refundOrderId = options.refundOrderId;
|
|
|
|
|
+ // 修改模式暂且保留老逻辑的兼容,由于需求只给了正常流程,先重点处理正常流程
|
|
|
this.loadRefundDetail();
|
|
this.loadRefundDetail();
|
|
|
} else if (options.orderId) {
|
|
} else if (options.orderId) {
|
|
|
this.orderId = options.orderId;
|
|
this.orderId = options.orderId;
|
|
|
|
|
+ if (options.detailOrderId) {
|
|
|
|
|
+ this.targetDetailOrderId = options.detailOrderId;
|
|
|
|
|
+ }
|
|
|
this.loadOrderDetail();
|
|
this.loadOrderDetail();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ // 如果在第二步去了地址选择页,返回后更新地址
|
|
|
let selectAddr = uni.getStorageSync("selectAddr");
|
|
let selectAddr = uni.getStorageSync("selectAddr");
|
|
|
if (selectAddr) {
|
|
if (selectAddr) {
|
|
|
this.address = selectAddr;
|
|
this.address = selectAddr;
|
|
|
uni.removeStorageSync("selectAddr");
|
|
uni.removeStorageSync("selectAddr");
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onUnload() {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ refundType(newVal) {
|
|
|
|
|
+ // 切换退款类型时重新拉取预览数据
|
|
|
|
|
+ if (this.orderInfo && !this.isModify) {
|
|
|
|
|
+ this.fetchPreRefundData();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- loadRefundDetail() {
|
|
|
|
|
- // 使用退款详情接口回填数据
|
|
|
|
|
- this.$u.api.getNewRefundOrderDetailAjax({
|
|
|
|
|
- refundOrderId: this.refundOrderId
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ getRefundReasons() {
|
|
|
|
|
+ uni.$u.http.get("/token/common/getDictOptions?type=shop_order_complaints_options").then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
- const data = res.data;
|
|
|
|
|
- this.orderId = data.originOrderId; // 确保orderId存在
|
|
|
|
|
-
|
|
|
|
|
- // 构造页面需要的 orderInfo 结构
|
|
|
|
|
- // 注意:退款详情接口返回的 detailList 结构可能与订单详情的 detailVoList 略有不同,需要映射
|
|
|
|
|
- this.orderInfo = {
|
|
|
|
|
- ...data,
|
|
|
|
|
- detailVoList: data.detailList.map(item => ({
|
|
|
|
|
- ...item,
|
|
|
|
|
- num: item.num, // 原购买数量
|
|
|
|
|
- refundNum: item.refundNum // 之前申请的退款数量
|
|
|
|
|
- }))
|
|
|
|
|
- };
|
|
|
|
|
- console.log(this.orderInfo, 'orderInfo');
|
|
|
|
|
-
|
|
|
|
|
- // 回填表单数据
|
|
|
|
|
- this.refundType = String(data.refundType);
|
|
|
|
|
- // this.refundTypeText 需要根据 options 查找或直接设置,这里简单根据值设置
|
|
|
|
|
- this.refundTypeText = this.refundType === '1' ? '退货退款' : '仅退款';
|
|
|
|
|
-
|
|
|
|
|
- this.shopStatus = String(data.shopStatus);
|
|
|
|
|
- this.shopStatusText = this.shopStatus === '1' ? '未收到货' : '已收到货';
|
|
|
|
|
-
|
|
|
|
|
- this.refundReason = data.refundReason;
|
|
|
|
|
- this.refundReasonText = data.refundReason; // 假设后端直接返回文本,或者需要遍历 reasonList 匹配
|
|
|
|
|
-
|
|
|
|
|
- this.returnMethod = String(data.sendType);
|
|
|
|
|
- // 查找 returnMethodText
|
|
|
|
|
- const methodObj = this.returnMethodList.find(m => m.value === this.returnMethod);
|
|
|
|
|
- this.returnMethodText = methodObj ? methodObj.label : '';
|
|
|
|
|
-
|
|
|
|
|
- this.description = data.description || '';
|
|
|
|
|
-
|
|
|
|
|
- // 回填图片
|
|
|
|
|
- if (data.fileUrlList) {
|
|
|
|
|
- this.fileList = data.fileUrlList;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 初始化选中状态
|
|
|
|
|
- this.orderInfo.detailVoList.forEach(item => {
|
|
|
|
|
- this.$set(item, 'checked', true);
|
|
|
|
|
- // 修改模式下,默认显示上次申请的数量
|
|
|
|
|
- this.$set(item, 'refundNum', item.refundNum || 1);
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- this.address = {
|
|
|
|
|
- id: data.sendAddressId,
|
|
|
|
|
- name: data.sendName,
|
|
|
|
|
- mobile: data.sendMobile,
|
|
|
|
|
- fullAddress: data.sendAddress,
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.reasonList = res.data.map(item => ({
|
|
|
|
|
+ value: item.dictValue || item.dictLabel,
|
|
|
|
|
+ label: item.dictLabel
|
|
|
|
|
+ }));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -418,163 +100,190 @@
|
|
|
this.$u.api.getShopOrderDetailAjax({ orderId: this.orderId }).then(res => {
|
|
this.$u.api.getShopOrderDetailAjax({ orderId: this.orderId }).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
this.orderInfo = res.data;
|
|
this.orderInfo = res.data;
|
|
|
- // 初始化商品选中状态和退款数量
|
|
|
|
|
- this.orderInfo.detailVoList.forEach(item => {
|
|
|
|
|
- this.$set(item, 'checked', true);
|
|
|
|
|
- this.$set(item, 'refundNum', item.num);
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 根据状态默认选中类型
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 根据订单状态设置默认售后类型
|
|
|
if (this.orderInfo.status == '3') { // 待收货
|
|
if (this.orderInfo.status == '3') { // 待收货
|
|
|
- // 默认退货退款
|
|
|
|
|
this.refundType = '1';
|
|
this.refundType = '1';
|
|
|
- this.refundTypeText = '退货退款';
|
|
|
|
|
- this.shopStatus = '1';
|
|
|
|
|
- this.shopStatusText = '未收到货';
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.refundType = '1';
|
|
this.refundType = '1';
|
|
|
- this.refundTypeText = '退货退款';
|
|
|
|
|
- this.shopStatus = '2';
|
|
|
|
|
- this.shopStatusText = '已收到货';
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 默认使用订单收货地址作为取件地址
|
|
|
|
|
this.address = {
|
|
this.address = {
|
|
|
id: this.orderInfo.receiverAddressId,
|
|
id: this.orderInfo.receiverAddressId,
|
|
|
name: this.orderInfo.receiverName,
|
|
name: this.orderInfo.receiverName,
|
|
|
mobile: this.orderInfo.receiverMobile,
|
|
mobile: this.orderInfo.receiverMobile,
|
|
|
fullAddress: this.orderInfo.receiverAddress,
|
|
fullAddress: this.orderInfo.receiverAddress,
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ this.fetchPreRefundData();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- getRefundReasons() {
|
|
|
|
|
- uni.$u.http.get("/token/common/getDictOptions?type=shop_order_complaints_options").then(res => {
|
|
|
|
|
|
|
+ fetchPreRefundData() {
|
|
|
|
|
+ if (!this.orderInfo || !this.orderInfo.detailVoList) return;
|
|
|
|
|
+
|
|
|
|
|
+ // 此时全量传入后端进行校验
|
|
|
|
|
+ const detailOrderIdList = this.orderInfo.detailVoList.map(item => item.detailOrderId || item.id);
|
|
|
|
|
+
|
|
|
|
|
+ if (detailOrderIdList.length === 0) {
|
|
|
|
|
+ this.buildMergedGoods({});
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.$u.api.applyRefundPreAjax({
|
|
|
|
|
+ orderId: this.orderId,
|
|
|
|
|
+ detailOrderIdList: detailOrderIdList,
|
|
|
|
|
+ refundType: this.refundType
|
|
|
|
|
+ }).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
- this.reasonList = res.data.map(item => ({
|
|
|
|
|
- value: item.dictValue || item.dictLabel,
|
|
|
|
|
- label: item.dictLabel
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ const preDataMap = {};
|
|
|
|
|
+ res.data.forEach(item => {
|
|
|
|
|
+ preDataMap[item.detailOrderId] = item;
|
|
|
|
|
+ });
|
|
|
|
|
+ this.buildMergedGoods(preDataMap);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- toggleCheck(item) {
|
|
|
|
|
- item.checked = !item.checked;
|
|
|
|
|
- // 当勾选状态变化时,重置自定义退款金额,让系统重新计算
|
|
|
|
|
- this.customRefundMoney = '';
|
|
|
|
|
- },
|
|
|
|
|
- calculateRefundMoney() {
|
|
|
|
|
- // 当商品数量变化时,重置自定义退款金额,让系统重新计算
|
|
|
|
|
- this.customRefundMoney = '';
|
|
|
|
|
- },
|
|
|
|
|
- confirmType(e) {
|
|
|
|
|
- this.refundType = e[0].value;
|
|
|
|
|
- this.refundTypeText = e[0].label;
|
|
|
|
|
-
|
|
|
|
|
- // 切换类型时重置一些状态
|
|
|
|
|
- if (this.refundType === '2') { // 仅退款
|
|
|
|
|
- this.returnMethod = '';
|
|
|
|
|
- this.returnMethodText = '';
|
|
|
|
|
- } else {
|
|
|
|
|
- if (!this.returnMethod) {
|
|
|
|
|
- this.returnMethod = '3';
|
|
|
|
|
- this.returnMethodText = '自行寄回';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ buildMergedGoods(preDataMap) {
|
|
|
|
|
+ // 保留已选中的状态,如果是第一次则按 targetDetailOrderId 选中
|
|
|
|
|
+ const isFirst = this.mergedGoods.length === 0;
|
|
|
|
|
+
|
|
|
|
|
+ this.mergedGoods = this.orderInfo.detailVoList.map(item => {
|
|
|
|
|
+ const id = item.detailOrderId || item.id;
|
|
|
|
|
+ const preData = preDataMap[id] || {};
|
|
|
|
|
+
|
|
|
|
|
+ // 查找是否已经存在
|
|
|
|
|
+ const existing = this.mergedGoods.find(m => (m.detailOrderId || m.id) === id);
|
|
|
|
|
+
|
|
|
|
|
+ // 根据后端返回的字段和当前退款类型判断是否可选
|
|
|
|
|
+ let isDisabled = false;
|
|
|
|
|
+ if (this.refundType === '1') {
|
|
|
|
|
+ // 退货退款
|
|
|
|
|
+ isDisabled = preData.canRefund === 0;
|
|
|
|
|
+ } else if (this.refundType === '2') {
|
|
|
|
|
+ // 仅退款
|
|
|
|
|
+ isDisabled = preData.canRefundOnlyMoney === 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 切换退款类型时,重置自定义退款金额
|
|
|
|
|
- this.customRefundMoney = '';
|
|
|
|
|
- },
|
|
|
|
|
- confirmReason(e) {
|
|
|
|
|
- this.refundReason = e[0].value;
|
|
|
|
|
- this.refundReasonText = e[0].label;
|
|
|
|
|
|
|
+ let checked = true;
|
|
|
|
|
+ if (isDisabled) {
|
|
|
|
|
+ checked = false;
|
|
|
|
|
+ } else if (isFirst && this.targetDetailOrderId) {
|
|
|
|
|
+ checked = (String(id) === String(this.targetDetailOrderId));
|
|
|
|
|
+ } else if (existing) {
|
|
|
|
|
+ checked = existing.checked;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ ...preData, // 合并新接口的字段:canRefundNum, canRefundMoney, canModifyNum, canModifyMoney
|
|
|
|
|
+ disabled: isDisabled,
|
|
|
|
|
+ checked: checked,
|
|
|
|
|
+ refundNum: preData.canRefundNum || item.num,
|
|
|
|
|
+ refundMoney: preData.canRefundMoney || 0,
|
|
|
|
|
+ shopStatus: existing ? existing.shopStatus : '',
|
|
|
|
|
+ shopStatusText: existing ? existing.shopStatusText : '',
|
|
|
|
|
+ refundReason: existing ? existing.refundReason : '',
|
|
|
|
|
+ refundReasonText: existing ? existing.refundReasonText : '',
|
|
|
|
|
+ description: existing ? existing.description : '',
|
|
|
|
|
+ fileUrlList: existing ? existing.fileUrlList : []
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- confirmStatus(e) {
|
|
|
|
|
- this.shopStatus = e[0].value;
|
|
|
|
|
- this.shopStatusText = e[0].label;
|
|
|
|
|
|
|
+ loadRefundDetail() {
|
|
|
|
|
+ // 修改模式的兼容逻辑(如果需要的话,按原有代码逻辑映射到新组件数据结构)
|
|
|
|
|
+ this.$u.api.getNewRefundOrderDetailAjax({
|
|
|
|
|
+ refundOrderId: this.refundOrderId
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ const data = res.data;
|
|
|
|
|
+ this.orderId = data.originOrderId;
|
|
|
|
|
+ this.refundType = String(data.refundType);
|
|
|
|
|
+
|
|
|
|
|
+ this.mergedGoods = [{
|
|
|
|
|
+ ...data,
|
|
|
|
|
+ id: data.detailOrderId,
|
|
|
|
|
+ checked: true,
|
|
|
|
|
+ refundNum: data.refundNum || 1,
|
|
|
|
|
+ refundMoney: data.refundMoney || 0,
|
|
|
|
|
+ shopStatus: String(data.shopStatus),
|
|
|
|
|
+ shopStatusText: String(data.shopStatus) === '1' ? '未收到货' : '已收到货',
|
|
|
|
|
+ refundReason: data.refundReason,
|
|
|
|
|
+ refundReasonText: data.refundReason,
|
|
|
|
|
+ description: data.description || '',
|
|
|
|
|
+ fileUrlList: data.fileUrlList || [],
|
|
|
|
|
+ // 假装可以修改,修改模式后端未返回canModify,暂设1
|
|
|
|
|
+ canModifyMoney: 1,
|
|
|
|
|
+ canModifyNum: 1,
|
|
|
|
|
+ canRefundMoney: data.refundMoney || 0,
|
|
|
|
|
+ canRefundNum: data.refundNum || 1
|
|
|
|
|
+ }];
|
|
|
|
|
+
|
|
|
|
|
+ this.address = {
|
|
|
|
|
+ id: data.sendAddressId,
|
|
|
|
|
+ name: data.sendName,
|
|
|
|
|
+ mobile: data.sendMobile,
|
|
|
|
|
+ fullAddress: data.sendAddress,
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- confirmReturnMethod(e) {
|
|
|
|
|
- this.returnMethod = e[0].value;
|
|
|
|
|
- this.returnMethodText = e[0].label;
|
|
|
|
|
|
|
+ handleStepOneNext(payload) {
|
|
|
|
|
+ this.selectedGoods = payload.selectedGoods;
|
|
|
|
|
+ this.currentStep = 2;
|
|
|
},
|
|
},
|
|
|
- chooseAddress() {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pages-mine/pages/address/list?id=${this.address.id || ''}&isSelect=1`
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- validateRefundMoney() {
|
|
|
|
|
- if (!this.customRefundMoney) {
|
|
|
|
|
- this.customRefundMoney = this.maxRefundMoney;
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- const refund = Number(this.customRefundMoney);
|
|
|
|
|
- const max = Number(this.maxRefundMoney);
|
|
|
|
|
|
|
+ handleSubmit(payload) {
|
|
|
|
|
+ const { goodsList, returnMethod, address } = payload;
|
|
|
|
|
+
|
|
|
|
|
+ let params = {};
|
|
|
|
|
+
|
|
|
|
|
+ if (this.isModify) {
|
|
|
|
|
+ // 修改申请,只针对单件商品,取选中的第一件商品数据
|
|
|
|
|
+ const item = goodsList[0];
|
|
|
|
|
+ params = {
|
|
|
|
|
+ orderId: this.orderId,
|
|
|
|
|
+ refundOrderId: this.refundOrderId,
|
|
|
|
|
+ refundType: this.refundType,
|
|
|
|
|
+ sendType: returnMethod || '',
|
|
|
|
|
+ addressId: (address && address.id) ? address.id : '',
|
|
|
|
|
+ refundNum: item.refundNum,
|
|
|
|
|
+ refundMoney: item.refundMoney,
|
|
|
|
|
+ shopStatus: item.shopStatus,
|
|
|
|
|
+ refundReason: item.refundReason,
|
|
|
|
|
+ description: item.description,
|
|
|
|
|
+ fileUrlList: item.fileUrlList || []
|
|
|
|
|
+ };
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 正常申请售后,可能是多件商品
|
|
|
|
|
+ const refundDetailList = goodsList.map(item => ({
|
|
|
|
|
+ detailOrderId: item.detailOrderId || item.id,
|
|
|
|
|
+ num: item.refundNum,
|
|
|
|
|
+ refundMoney: item.refundMoney,
|
|
|
|
|
+ shopStatus: item.shopStatus,
|
|
|
|
|
+ refundReason: item.refundReason,
|
|
|
|
|
+ description: item.description,
|
|
|
|
|
+ fileUrlList: item.fileUrlList || []
|
|
|
|
|
+ }));
|
|
|
|
|
|
|
|
- if (refund > max) {
|
|
|
|
|
- this.$u.toast(`退款金额不能超过最大可退金额 ¥${max}`);
|
|
|
|
|
- this.customRefundMoney = max.toFixed(2);
|
|
|
|
|
- } else if (refund < 0) {
|
|
|
|
|
- this.$u.toast('退款金额不能为负数');
|
|
|
|
|
- this.customRefundMoney = '0.00';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- confirmRefundMoney() {
|
|
|
|
|
- this.validateRefundMoney();
|
|
|
|
|
- this.showRefundAmountPopup = false;
|
|
|
|
|
- },
|
|
|
|
|
- submit() {
|
|
|
|
|
- if (this.selectedGoods.length === 0) {
|
|
|
|
|
- this.$u.toast('请选择退款商品');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (!this.refundReason) {
|
|
|
|
|
- this.$u.toast('请选择退款原因');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (this.refundType === '1' && !this.returnMethod) {
|
|
|
|
|
- this.$u.toast('请选择退货方式');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (this.refundType === '1' && this.returnMethod === '1' && !this.address.name) {
|
|
|
|
|
- this.$u.toast('请选择取件地址');
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ params = {
|
|
|
|
|
+ orderId: this.orderId,
|
|
|
|
|
+ refundDetailList: refundDetailList,
|
|
|
|
|
+ refundType: this.refundType,
|
|
|
|
|
+ sendType: returnMethod || '',
|
|
|
|
|
+ addressId: (address && address.id) ? address.id : ''
|
|
|
|
|
+ };
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 处理图片
|
|
|
|
|
- let files = this.fileList;
|
|
|
|
|
-
|
|
|
|
|
- const params = {
|
|
|
|
|
- orderId: this.orderId,
|
|
|
|
|
- refundDetailList: this.selectedGoods.map(item => ({
|
|
|
|
|
- detailOrderId: item.detailOrderId || item.id,
|
|
|
|
|
- num: item.refundNum
|
|
|
|
|
- })),
|
|
|
|
|
- refundType: this.refundType,
|
|
|
|
|
- shopStatus: this.shopStatus,
|
|
|
|
|
- refundReason: this.refundReason,
|
|
|
|
|
- refundMoney: this.refundMoney,
|
|
|
|
|
- sendType: this.returnMethod,
|
|
|
|
|
- addressId: this.address.id || '',
|
|
|
|
|
- description: this.description,
|
|
|
|
|
- fileUrlList: files
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 附加地址信息(如果是上门取件)
|
|
|
|
|
- if (this.refundType === '1' && this.returnMethod === '1') {
|
|
|
|
|
- // 这里的参数结构需根据后端实际要求调整,这里假设后端接收 address 对象
|
|
|
|
|
- params.address = this.address;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 如果是退货退款(1) 并且是上门取件(1),传递地址对象(兼容旧逻辑)
|
|
|
|
|
+ if (this.refundType === '1' && returnMethod === '1' && address) {
|
|
|
|
|
+ params.address = address;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const api = this.isModify ? this.$u.api.refundApplyModifyAjax : this.$u.api.applyRefundAjax;
|
|
const api = this.isModify ? this.$u.api.refundApplyModifyAjax : this.$u.api.applyRefundAjax;
|
|
|
- // 修改模式下可能需要传入 refundOrderId (虽然截图只有 orderId, 但为了保险起见或者后端根据 orderId 找)
|
|
|
|
|
- // 截图显示 Request body 包含 orderId 和 refundDetailList 等。
|
|
|
|
|
- // 如果是修改,通常 orderId 指的是原订单ID。后端可能通过 orderId 找到对应的 active refund application 或者需要 refundOrderId。
|
|
|
|
|
- // 根据截图,只有 body,没有 path param。body 里有 orderId。
|
|
|
|
|
- // 如果是修改,我们可能需要额外传 refundOrderId 吗? 截图里没有显示 refundOrderId 字段。
|
|
|
|
|
- // 假设后端通过 orderId 识别当前正在进行的退款申请进行修改,或者复用 applyRefund 的逻辑只是接口不同。
|
|
|
|
|
|
|
|
|
|
|
|
+ uni.showLoading({ title: '提交中' });
|
|
|
api(params).then(res => {
|
|
api(params).then(res => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
this.$u.toast(this.isModify ? '修改成功' : '提交成功');
|
|
this.$u.toast(this.isModify ? '修改成功' : '提交成功');
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -583,6 +292,8 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.$u.toast(res.msg || (this.isModify ? '修改失败' : '提交失败'));
|
|
this.$u.toast(res.msg || (this.isModify ? '修改失败' : '提交失败'));
|
|
|
}
|
|
}
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -593,349 +304,5 @@
|
|
|
.apply-refund-page {
|
|
.apply-refund-page {
|
|
|
min-height: 100vh;
|
|
min-height: 100vh;
|
|
|
background-color: #f5f5f5;
|
|
background-color: #f5f5f5;
|
|
|
- padding: 20rpx;
|
|
|
|
|
- padding-bottom: 140rpx; // Space for fixed footer
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .card {
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- border-radius: 16rpx;
|
|
|
|
|
- margin-bottom: 20rpx;
|
|
|
|
|
- padding: 30rpx;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
-
|
|
|
|
|
- &.no-padding {
|
|
|
|
|
- padding: 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .type-section {
|
|
|
|
|
- margin-bottom: 30rpx;
|
|
|
|
|
-
|
|
|
|
|
- .section-title {
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- margin-bottom: 20rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .type-btn-group {
|
|
|
|
|
- display: flex;
|
|
|
|
|
-
|
|
|
|
|
- .type-btn {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- height: 64rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- border: 2rpx solid #e5e5e5;
|
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- transition: all 0.3s;
|
|
|
|
|
-
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-right: 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.active {
|
|
|
|
|
- border-color: #38C148;
|
|
|
|
|
- color: #38C148;
|
|
|
|
|
- background-color: rgba(56, 193, 72, 0.05);
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .card-header {
|
|
|
|
|
- padding: 10rpx 0 20rpx;
|
|
|
|
|
- border-bottom: 1rpx solid #f5f5f5;
|
|
|
|
|
- margin-bottom: 20rpx;
|
|
|
|
|
-
|
|
|
|
|
- .card-title {
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .card-title {
|
|
|
|
|
- // For simple title without header line
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .goods-list {
|
|
|
|
|
- .goods-item {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin-bottom: 30rpx;
|
|
|
|
|
-
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .checkbox-box {
|
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .goods-cover {
|
|
|
|
|
- width: 140rpx;
|
|
|
|
|
- height: 150rpx;
|
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .goods-info {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- height: 160rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
-
|
|
|
|
|
- .goods-name {
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- line-height: 1.4;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .goods-sku {
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- color: #999;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .price-box {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
-
|
|
|
|
|
- .price {
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .refund-money-box {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
-
|
|
|
|
|
- .money {
|
|
|
|
|
- font-size: 32rpx;
|
|
|
|
|
- color: #38C148; // Theme color
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .edit-tag {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- background-color: #f0f0f0;
|
|
|
|
|
- padding: 4rpx 12rpx;
|
|
|
|
|
- border-radius: 20rpx;
|
|
|
|
|
- margin-left: 16rpx;
|
|
|
|
|
-
|
|
|
|
|
- text {
|
|
|
|
|
- font-size: 22rpx;
|
|
|
|
|
- color: #666;
|
|
|
|
|
- margin-left: 4rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .address-box {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: flex-end;
|
|
|
|
|
- text-align: right;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
-
|
|
|
|
|
- .addr-detail {
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- color: #999;
|
|
|
|
|
- max-width: 300rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .footer-bar {
|
|
|
|
|
- position: fixed;
|
|
|
|
|
- bottom: 0;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- right: 0;
|
|
|
|
|
- height: 200rpx;
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- padding: 0 30rpx;
|
|
|
|
|
- box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
|
|
|
|
|
- z-index: 100;
|
|
|
|
|
- padding-bottom: constant(safe-area-inset-bottom);
|
|
|
|
|
- padding-bottom: env(safe-area-inset-bottom);
|
|
|
|
|
-
|
|
|
|
|
- .footer-left {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
-
|
|
|
|
|
- .label {
|
|
|
|
|
- font-size: 26rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .amount {
|
|
|
|
|
- font-size: 36rpx;
|
|
|
|
|
- color: #38C148;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- margin: 0 10rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .detail-link {
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- color: #999;
|
|
|
|
|
- text-decoration: underline;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .footer-right {
|
|
|
|
|
- width: 240rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .popup-container {
|
|
|
|
|
- padding: 30rpx;
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
-
|
|
|
|
|
- &.full-height {
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .popup-header {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin-bottom: 40rpx;
|
|
|
|
|
- flex-shrink: 0;
|
|
|
|
|
-
|
|
|
|
|
- .title {
|
|
|
|
|
- font-size: 32rpx;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .popup-content {
|
|
|
|
|
- margin-bottom: 40rpx;
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- overflow-y: auto;
|
|
|
|
|
-
|
|
|
|
|
- .detail-item {
|
|
|
|
|
- margin-bottom: 30rpx;
|
|
|
|
|
-
|
|
|
|
|
- .item-row {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
|
-
|
|
|
|
|
- .item-label {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- margin-left: 20rpx;
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .item-value {
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .sub-list {
|
|
|
|
|
- padding-left: 60rpx;
|
|
|
|
|
-
|
|
|
|
|
- .sub-item {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- margin-top: 10rpx;
|
|
|
|
|
- font-size: 26rpx;
|
|
|
|
|
- color: #999;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .money-input {
|
|
|
|
|
- width: 200rpx;
|
|
|
|
|
- text-align: right;
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .max-money-hint {
|
|
|
|
|
- margin-top: 10rpx;
|
|
|
|
|
- padding-left: 60rpx;
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- color: #999;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .upload-textarea-box {
|
|
|
|
|
- background-color: #f9f9f9;
|
|
|
|
|
- padding: 20rpx;
|
|
|
|
|
- border-radius: 12rpx;
|
|
|
|
|
-
|
|
|
|
|
- .counter {
|
|
|
|
|
- text-align: right;
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- color: #999;
|
|
|
|
|
- margin: 10rpx 0 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .upload-area {
|
|
|
|
|
- margin-top: 20rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .popup-footer {
|
|
|
|
|
- margin-top: 20rpx;
|
|
|
|
|
- flex-shrink: 0;
|
|
|
|
|
-
|
|
|
|
|
- &.safe-area-bottom {
|
|
|
|
|
- padding-bottom: constant(safe-area-inset-bottom);
|
|
|
|
|
- padding-bottom: env(safe-area-inset-bottom);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .address-section {
|
|
|
|
|
- padding: 26rpx 32rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .address-text {
|
|
|
|
|
- color: #333333;
|
|
|
|
|
- font-family: PingFang SC;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .address-label {
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- color: #909399;
|
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
- width: 140rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .u-required {
|
|
|
|
|
- color: #ff0000;
|
|
|
|
|
- margin-left: 8rpx;
|
|
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|