|
@@ -30,7 +30,9 @@
|
|
|
/>
|
|
|
<div class="user-name"
|
|
|
>{{ state.userDetail.nickname || '--' }}
|
|
|
- <span class="user-level ml-4px">V{{ state.userDetail.level || '1' }}</span>
|
|
|
+ <span class="user-level ml-4px"
|
|
|
+ >V{{ state.userDetail.vipLevel || '暂无等级' }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -149,33 +151,100 @@
|
|
|
<el-tab-pane label="订单记录" name="orders">
|
|
|
<el-skeleton v-if="state.loading.orders" :rows="5" animated />
|
|
|
<el-table v-else class="sa-table" :data="state.orders" stripe border>
|
|
|
- <el-table-column label="订单编号" prop="order_sn" width="180" align="center" />
|
|
|
- <el-table-column label="商品信息" width="300" align="left">
|
|
|
+ <el-table-column sortable="custom" prop="orderId" label="订单编号" min-width="150">
|
|
|
<template #default="{ row }">
|
|
|
- <div class="goods-info">
|
|
|
+ <div class="order-info">
|
|
|
+ <div class="order-sn">{{ row.orderId }}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="商品信息" min-width="300">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div class="sa-flex" v-if="row.orderInfoVO && row.orderInfoVO.length > 0">
|
|
|
<el-image
|
|
|
- :src="row.goods_image"
|
|
|
- style="width: 50px; height: 50px; border-radius: 4px; margin-right: 10px"
|
|
|
+ :src="row.orderInfoVO[0].image"
|
|
|
+ style="width: 60px; height: 60px; margin-right: 12px"
|
|
|
fit="cover"
|
|
|
/>
|
|
|
- <div class="goods-detail">
|
|
|
- <div class="goods-name">{{ row.goods_name || '--' }}</div>
|
|
|
+ <div>
|
|
|
+ <div class="goods-title">{{ row.orderInfoVO[0].productName }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else>-</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="规格" prop="spec" width="100" align="center" />
|
|
|
- <el-table-column label="数量" prop="quantity" width="80" align="center" />
|
|
|
- <el-table-column label="付款金额" align="center">
|
|
|
- <template #default="{ row }">৳{{ row.amount || '--' }}</template>
|
|
|
+ <el-table-column label="规格" min-width="120" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.orderInfoVO && row.orderInfoVO.length > 0">
|
|
|
+ {{ row.orderInfoVO[0].sku || '-' }}
|
|
|
+ </div>
|
|
|
+ <div v-else>-</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="订单状态" prop="status_text" width="100" align="center" />
|
|
|
- <el-table-column label="物流信息" prop="logistics_info" width="100" align="center" />
|
|
|
- <el-table-column label="下单时间" prop="created_at" width="140" align="center" />
|
|
|
- <el-table-column label="付款时间" prop="paid_at" width="140" align="center" />
|
|
|
- <el-table-column label="操作" width="80" align="center">
|
|
|
+ <el-table-column label="数量" min-width="80" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.orderInfoVO && row.orderInfoVO.length > 0">
|
|
|
+ {{ row.orderInfoVO[0].payNum || 0 }}
|
|
|
+ </div>
|
|
|
+ <div v-else>0</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="payPrice" label="付款金额" min-width="120" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>৳{{ row.payPrice || 0 }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="支付状态" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="row.paid === 1 ? 'success' : 'warning'">
|
|
|
+ {{ row.paid === 1 ? '已付款' : '待付款' }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订单状态" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="getOrderStatusType(row.status)">
|
|
|
+ {{ getOrderStatusText(row.status) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="拼团状态" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="getPinkStatusType(row.pinkStatus)">
|
|
|
+ {{ getPinkStatusText(row.pinkStatus) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="退款状态" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="getRefundStatusType(row.refundStatus)">
|
|
|
+ {{ getRefundStatusText(row.refundStatus) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="物流信息" min-width="150" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.deliveryId">
|
|
|
+ <div class="delivery-name"
|
|
|
+ >{{ row.deliveryName || '快递公司' }}:{{ row.deliveryId }}</div
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div v-else>未发货</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="下单时间" min-width="150" align="center">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button type="primary" link @click="viewOrder(row)">查看</el-button>
|
|
|
+ <div>{{ row.createTime }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="付款时间" min-width="150" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.payTime || '-' }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" min-width="80" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button type="primary" link @click="viewOrder(row)">详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -205,17 +274,35 @@
|
|
|
<el-tab-pane label="佣金记录" name="commissions">
|
|
|
<el-skeleton v-if="state.loading.commissions" :rows="5" animated />
|
|
|
<el-table v-else class="sa-table" :data="state.commissions" stripe border>
|
|
|
- <el-table-column label="佣金ID" prop="commission_id" align="center" />
|
|
|
- <el-table-column label="佣金类型" prop="type_text" align="center" />
|
|
|
- <el-table-column label="佣金说明" prop="description" />
|
|
|
- <el-table-column label="佣金金额" align="center">
|
|
|
- <template #default="{ row }"> ৳{{ row.amount || '--' }} </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="佣金状态" prop="status_text" align="center" />
|
|
|
- <el-table-column label="佣金发放时间" prop="created_at" align="center" />
|
|
|
- <el-table-column label="操作" width="80" align="center">
|
|
|
+ <el-table-column label="佣金ID" prop="id" min-width="120" align="center" />
|
|
|
+ <el-table-column label="佣金类型" min-width="150">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span class="sa-table-line-1">{{ getBizTypeText(row.bizType) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="佣金说明" min-width="200">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span class="sa-table-line-1">{{ row.memo || '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="佣金金额" min-width="120" align="center">
|
|
|
+ <template #default="{ row }"> ৳{{ row.amount || 0 }} </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="佣金状态" min-width="100" align="center">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button type="primary" link @click="viewCommission(row)">查看</el-button>
|
|
|
+ <el-tag :type="getCommissionStatusType(row.status)">
|
|
|
+ {{ getCommissionStatusText(row.status) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="createTime"
|
|
|
+ label="佣金发放时间"
|
|
|
+ min-width="160"
|
|
|
+ sortable="custom"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.createTime || '-' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -224,18 +311,46 @@
|
|
|
<el-tab-pane label="充值记录" name="recharges">
|
|
|
<el-skeleton v-if="state.loading.recharges" :rows="5" animated />
|
|
|
<el-table v-else class="sa-table" :data="state.recharges" stripe border>
|
|
|
- <el-table-column label="充值订单号" prop="order_sn" align="center" />
|
|
|
- <el-table-column label="充值渠道" prop="channel_text" align="center" />
|
|
|
- <el-table-column label="币种" prop="currency" align="center" />
|
|
|
- <el-table-column label="金额" align="center">
|
|
|
- <template #default="{ row }">৳{{ row.amount || '--' }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="状态" prop="status_text" align="center" />
|
|
|
- <el-table-column label="下单时间" prop="created_at" align="center" />
|
|
|
- <el-table-column label="成功时间" prop="success_at" align="center" />
|
|
|
- <el-table-column label="操作" width="80" align="center">
|
|
|
+ <el-table-column prop="orderNo" label="充值订单号" min-width="180" sortable="custom">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span class="sa-table-line-1">{{ row.orderNo || '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="充值渠道" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="getChannelType(row.channel)">
|
|
|
+ {{ getChannelText(row.channel) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="币种" min-width="80" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ getCurrencyText(row.currency) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="金额" min-width="120" align="center">
|
|
|
+ <template #default="{ row }"> ৳{{ row.amount || 0 }} </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="getRechargeStatusType(row.status)">
|
|
|
+ {{ getRechargeStatusText(row.status) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="下单时间" min-width="160" sortable="custom">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button type="primary" link @click="viewRecharge(row)">查看</el-button>
|
|
|
+ {{ row.createTime || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="成功时间" min-width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.successTime || '--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" min-width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button link type="primary" @click="viewRecharge(row)">详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -244,22 +359,68 @@
|
|
|
<el-tab-pane label="提现记录" name="withdraws">
|
|
|
<el-skeleton v-if="state.loading.withdraws" :rows="5" animated />
|
|
|
<el-table v-else class="sa-table" :data="state.withdraws" stripe border>
|
|
|
- <el-table-column label="提款订单号" prop="order_sn" width="150" align="center" />
|
|
|
- <el-table-column label="退款类型" prop="type_text" width="100" align="center" />
|
|
|
- <el-table-column label="提款渠道" prop="channel_text" width="100" align="center" />
|
|
|
- <el-table-column label="币种" prop="currency" width="80" align="center" />
|
|
|
- <el-table-column label="提款金额" width="100" align="center">
|
|
|
- <template #default="{ row }">৳{{ row.amount || '--' }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="状态" prop="status_text" width="100" align="center" />
|
|
|
- <el-table-column label="收款银行" prop="bank_name" width="100" align="center" />
|
|
|
- <el-table-column label="收款账户名称" prop="account_name" align="center" />
|
|
|
- <el-table-column label="收款账户" prop="account_number" align="center" />
|
|
|
- <el-table-column label="下单时间" prop="created_at" width="140" align="center" />
|
|
|
- <el-table-column label="成功时间" prop="success_at" width="140" align="center" />
|
|
|
- <el-table-column label="操作" width="80" align="center">
|
|
|
+ <el-table-column prop="orderNo" label="提款订单号" min-width="180" sortable="custom">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span class="sa-table-line-1">{{ row.orderNo || '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="提款类型" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="row.accountType === 1 ? 'primary' : 'success'">
|
|
|
+ {{ getAccountTypeText(row.accountType) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="提款渠道" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="getChannelType(row.channel)">
|
|
|
+ {{ getChannelText(row.channel) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="币种" min-width="80" align="center">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button type="primary" link @click="viewWithdraw(row)">查看</el-button>
|
|
|
+ {{ getCurrencyText(row.currency) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="提款金额" min-width="120" align="center">
|
|
|
+ <template #default="{ row }"> ৳{{ row.amount || 0 }} </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" min-width="100" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="getWithdrawStatusType(row.status)">
|
|
|
+ {{ getWithdrawStatusText(row.status) }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="收款银行" min-width="150" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.bank || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="收款账户名称" min-width="130" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.bankAccountName || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="收款账户" min-width="160" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.bankAccount || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="transTime" label="下单时间" min-width="160" sortable="custom">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.transTime || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="成功时间" min-width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.successTime || '--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" min-width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button link type="primary" @click="viewWithdraw(row)">详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -290,15 +451,20 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, reactive, onMounted } from 'vue';
|
|
|
- import { ElMessage } from 'element-plus';
|
|
|
import { useModal, usePagination } from '@/sheep/hooks';
|
|
|
- import { api } from '../user.service';
|
|
|
+ import { api, userUtils } from '../user.service';
|
|
|
+ import {
|
|
|
+ api as orderApi,
|
|
|
+ getOrderStatusInfo,
|
|
|
+ getRefundStatusInfo,
|
|
|
+ getPinkStatusInfo,
|
|
|
+ } from '../../order/order.service';
|
|
|
+ import { api as financeApi, financeUtils } from '../../finance/finance.service';
|
|
|
import userEdit from './edit.vue';
|
|
|
import OrderDetail from '../../order/order/detail.vue';
|
|
|
import userDetail from './detail.vue';
|
|
|
- import RechargeEdit from '../../finance/recharge/edit.vue';
|
|
|
- import WithdrawEdit from '../../finance/withdraw/edit.vue';
|
|
|
- import CommissionEdit from '../../finance/commission/edit.vue';
|
|
|
+ import RechargeDetail from '../../finance/recharge/detail.vue';
|
|
|
+ import WithdrawDetail from '../../finance/withdraw/detail.vue';
|
|
|
|
|
|
const props = defineProps({
|
|
|
modal: {
|
|
@@ -374,21 +540,36 @@
|
|
|
];
|
|
|
};
|
|
|
|
|
|
- // 获取状态文本
|
|
|
- function getStatusText(status) {
|
|
|
- switch (status) {
|
|
|
- case 1:
|
|
|
- return '正常';
|
|
|
- case 2:
|
|
|
- return '禁止提现';
|
|
|
- case 3:
|
|
|
- return '禁止登录';
|
|
|
- case 4:
|
|
|
- return '禁止下单';
|
|
|
- default:
|
|
|
- return '-';
|
|
|
- }
|
|
|
- }
|
|
|
+ // 使用各个service中的状态处理函数,避免重复代码
|
|
|
+ // 用户状态处理函数
|
|
|
+ const getStatusText = userUtils.getUserStatusText;
|
|
|
+
|
|
|
+ // 订单状态处理函数
|
|
|
+ const getOrderStatusText = (status) => getOrderStatusInfo(status).text;
|
|
|
+ const getOrderStatusType = (status) => getOrderStatusInfo(status).type;
|
|
|
+
|
|
|
+ // 退款状态处理函数
|
|
|
+ const getRefundStatusText = (status) => getRefundStatusInfo(status).text;
|
|
|
+ const getRefundStatusType = (status) => getRefundStatusInfo(status).type;
|
|
|
+
|
|
|
+ // 拼团状态处理函数
|
|
|
+ const getPinkStatusText = (status) => getPinkStatusInfo(status).text;
|
|
|
+ const getPinkStatusType = (status) => getPinkStatusInfo(status).type;
|
|
|
+
|
|
|
+ // 财务相关状态处理函数
|
|
|
+ const getChannelText = financeUtils.getChannelText;
|
|
|
+ const getChannelType = financeUtils.getChannelType;
|
|
|
+ const getCurrencyText = financeUtils.getCurrencyText;
|
|
|
+ const getRechargeStatusText = financeUtils.getRechargeStatusText;
|
|
|
+ const getWithdrawStatusText = financeUtils.getWithdrawStatusText;
|
|
|
+ const getAccountTypeText = financeUtils.getAccountTypeText;
|
|
|
+ const getRechargeStatusType = (status) => financeUtils.getStatusType(status, 'recharge');
|
|
|
+ const getWithdrawStatusType = (status) => financeUtils.getStatusType(status, 'withdraw');
|
|
|
+
|
|
|
+ // 佣金相关状态处理函数
|
|
|
+ const getBizTypeText = financeUtils.getBizTypeText;
|
|
|
+ const getCommissionStatusText = financeUtils.getCommissionStatusText;
|
|
|
+ const getCommissionStatusType = financeUtils.getCommissionStatusType;
|
|
|
|
|
|
// 获取用户详情
|
|
|
const loading = ref(false);
|
|
@@ -399,6 +580,8 @@
|
|
|
if (code == '200') {
|
|
|
state.userDetail = data;
|
|
|
initBasicInfoTableData();
|
|
|
+ // 用户详情获取完成后,加载当前激活的tab数据
|
|
|
+ await loadTabData(state.activeTab);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('获取用户详情失败:', error);
|
|
@@ -409,6 +592,12 @@
|
|
|
// 统一数据获取函数
|
|
|
const fetchTabData = async (tabType, page = 1) => {
|
|
|
try {
|
|
|
+ // 确保用户详情已获取,特别是手机号
|
|
|
+ if (!state.userDetail.phoneNo) {
|
|
|
+ console.warn('用户手机号未获取,跳过数据请求');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
const requestData = {
|
|
|
page,
|
|
|
size: pageData.size,
|
|
@@ -419,9 +608,13 @@
|
|
|
|
|
|
switch (tabType) {
|
|
|
case 'orders':
|
|
|
- // TODO: 实现订单记录获取
|
|
|
- state.orders = [];
|
|
|
- return;
|
|
|
+ // 获取用户订单记录 - 使用订单API,添加用户手机号筛选
|
|
|
+ response = await orderApi.order.list({
|
|
|
+ ...requestData,
|
|
|
+ userPhone: state.userDetail.phoneNo, // 使用用户手机号筛选
|
|
|
+ });
|
|
|
+ stateKey = 'orders';
|
|
|
+ break;
|
|
|
case 'subordinates':
|
|
|
response = await api.list.myUsers({
|
|
|
...requestData,
|
|
@@ -431,19 +624,40 @@
|
|
|
stateKey = 'subordinates';
|
|
|
break;
|
|
|
case 'commissions':
|
|
|
- // TODO: 实现佣金记录获取
|
|
|
- state.commissions = [];
|
|
|
- return;
|
|
|
+ // 获取用户佣金记录 - 使用佣金API,添加用户手机号筛选
|
|
|
+ response = await financeApi.commission.list(
|
|
|
+ {
|
|
|
+ ...requestData,
|
|
|
+ userPhone: state.userDetail.phoneNo, // 使用用户手机号筛选
|
|
|
+ },
|
|
|
+ false,
|
|
|
+ );
|
|
|
+ stateKey = 'commissions';
|
|
|
+ break;
|
|
|
case 'recharges':
|
|
|
- // TODO: 实现充值记录获取
|
|
|
- state.recharges = [];
|
|
|
- return;
|
|
|
+ // 获取用户充值记录 - 使用充值API,添加用户手机号筛选
|
|
|
+ response = await financeApi.recharge.list(
|
|
|
+ {
|
|
|
+ ...requestData,
|
|
|
+ userPhone: state.userDetail.phoneNo, // 使用用户手机号筛选
|
|
|
+ },
|
|
|
+ false,
|
|
|
+ );
|
|
|
+ stateKey = 'recharges';
|
|
|
+ break;
|
|
|
case 'withdraws':
|
|
|
- // TODO: 实现提现记录获取
|
|
|
- state.withdraws = [];
|
|
|
- return;
|
|
|
+ // 获取用户提现记录 - 使用提现API,添加用户手机号筛选
|
|
|
+ response = await financeApi.withdraw.list(
|
|
|
+ {
|
|
|
+ ...requestData,
|
|
|
+ userPhone: state.userDetail.phoneNo, // 使用用户手机号筛选
|
|
|
+ },
|
|
|
+ false,
|
|
|
+ );
|
|
|
+ stateKey = 'withdraws';
|
|
|
+ break;
|
|
|
case 'addresses':
|
|
|
- // TODO: 实现收货地址获取
|
|
|
+ // 获取用户收货地址(暂时留空,后端还在开发)
|
|
|
state.addresses = [];
|
|
|
return;
|
|
|
default:
|
|
@@ -481,16 +695,6 @@
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- // 发短信
|
|
|
- const onSendSms = () => {
|
|
|
- ElMessage.info('发短信功能待开发');
|
|
|
- };
|
|
|
-
|
|
|
- // APP推送
|
|
|
- const onAppPush = () => {
|
|
|
- ElMessage.info('APP推送功能待开发');
|
|
|
- };
|
|
|
-
|
|
|
// 编辑资料
|
|
|
const onEdit = () => {
|
|
|
useModal(
|
|
@@ -512,12 +716,13 @@
|
|
|
|
|
|
// 统一模态框打开函数
|
|
|
const openDetailModal = (type, row) => {
|
|
|
+ console.log(row);
|
|
|
const modalConfigs = {
|
|
|
order: {
|
|
|
component: OrderDetail,
|
|
|
title: '订单详情',
|
|
|
width: '90%',
|
|
|
- id: row.order_sn,
|
|
|
+ id: row.id,
|
|
|
},
|
|
|
subordinateUser: {
|
|
|
component: userDetail,
|
|
@@ -527,23 +732,17 @@
|
|
|
id: row.id,
|
|
|
hasConfirm: true,
|
|
|
},
|
|
|
- commission: {
|
|
|
- component: CommissionEdit,
|
|
|
- title: '佣金详情',
|
|
|
- width: '80%',
|
|
|
- id: row.commission_id,
|
|
|
- },
|
|
|
recharge: {
|
|
|
- component: RechargeEdit,
|
|
|
+ component: RechargeDetail,
|
|
|
title: '充值详情',
|
|
|
width: '80%',
|
|
|
- id: row.order_sn,
|
|
|
+ id: row.id,
|
|
|
},
|
|
|
withdraw: {
|
|
|
- component: WithdrawEdit,
|
|
|
+ component: WithdrawDetail,
|
|
|
title: '提现详情',
|
|
|
width: '80%',
|
|
|
- id: row.order_sn,
|
|
|
+ id: row.id,
|
|
|
},
|
|
|
};
|
|
|
|
|
@@ -554,7 +753,7 @@
|
|
|
|
|
|
if (hasConfirm) {
|
|
|
useModal(component, modalOptions, {
|
|
|
- confirm: () => getData(),
|
|
|
+ confirm: () => getUserDetail(),
|
|
|
});
|
|
|
} else {
|
|
|
useModal(component, modalOptions);
|
|
@@ -564,17 +763,14 @@
|
|
|
// 各类详情查看函数(保持向后兼容)
|
|
|
const viewOrder = (row) => openDetailModal('order', row);
|
|
|
const viewSubordinateUser = (row) => openDetailModal('subordinateUser', row);
|
|
|
- const viewCommission = (row) => openDetailModal('commission', row);
|
|
|
const viewRecharge = (row) => openDetailModal('recharge', row);
|
|
|
const viewWithdraw = (row) => openDetailModal('withdraw', row);
|
|
|
|
|
|
onMounted(() => {
|
|
|
// 先初始化基本信息表格数据(防止模板报错)
|
|
|
initBasicInfoTableData();
|
|
|
- // 初始化用户详情和基本信息
|
|
|
+ // 初始化用户详情和基本信息(会在获取完成后自动加载tab数据)
|
|
|
getUserDetail();
|
|
|
- // 默认加载当前激活的tab数据
|
|
|
- loadTabData(state.activeTab);
|
|
|
});
|
|
|
</script>
|
|
|
|