|
|
@@ -9,13 +9,13 @@
|
|
|
</template>
|
|
|
|
|
|
<el-steps :active="currentStep" align-center finish-status="success" class="mb-6">
|
|
|
- <el-step title="转账授权签约" :description="authorizeStatusText" />
|
|
|
- <el-step title="开通资金专户" :description="accountStatusText" />
|
|
|
+ <el-step title="转账授权签约 & 开通资金账户" :description="authorizeStatusText" />
|
|
|
+ <!-- <el-step title="开通资金账户" :description="accountStatusText" /> -->
|
|
|
<el-step title="账户充值" :description="depositStatusText" />
|
|
|
<el-step title="进行转账" />
|
|
|
</el-steps>
|
|
|
|
|
|
- <div v-if="!accountData.account_book_id && authorizeStatus !== 'AUTHORIZED'" class="warning-box">
|
|
|
+ <!-- <div v-if="!accountData.account_book_id" class="warning-box">
|
|
|
<el-alert
|
|
|
title="您还未完成转账授权签约,无法开通资金专户"
|
|
|
type="warning"
|
|
|
@@ -27,68 +27,18 @@
|
|
|
<el-button type="primary" link @click="$emit('goTab', 'authorize')">转账授权签约</el-button>
|
|
|
</template>
|
|
|
</el-alert>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</el-card>
|
|
|
|
|
|
- <el-row :gutter="16" class="mt-4">
|
|
|
- <el-col :span="6">
|
|
|
- <el-card shadow="hover">
|
|
|
- <div class="stat-item">
|
|
|
- <div class="stat-label">签约状态</div>
|
|
|
- <div class="stat-value">
|
|
|
- <el-tag :type="getAuthorizeStatusType(authorizeStatus)">
|
|
|
- {{ authorizeStatusText }}
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <!-- <el-col :span="6">
|
|
|
- <el-card shadow="hover">
|
|
|
- <div class="stat-item">
|
|
|
- <div class="stat-label">专户状态</div>
|
|
|
- <div class="stat-value">
|
|
|
- <el-tag :type="getAccountStatusType(accountData.status)">
|
|
|
- {{ accountData.status || '未开通' }}
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-col> -->
|
|
|
-
|
|
|
- <el-col :span="6">
|
|
|
- <el-card shadow="hover">
|
|
|
- <div class="stat-item">
|
|
|
- <div class="stat-label">专户ID</div>
|
|
|
- <div class="stat-value text-truncate">
|
|
|
- {{ accountData.account_book_id || '-' }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="6">
|
|
|
- <el-card shadow="hover">
|
|
|
- <div class="stat-item">
|
|
|
- <div class="stat-label">账户余额</div>
|
|
|
- <div class="stat-value balance-value">
|
|
|
- ¥{{ accountData.balance || '0.00' }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-card class="mt-4">
|
|
|
- <template #header>
|
|
|
+ <el-card class="">
|
|
|
+ <!-- <template #header>
|
|
|
<div class="card-header">
|
|
|
<span>快捷操作</span>
|
|
|
</div>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
|
|
|
<div class="quick-actions">
|
|
|
- <div class="action-item" :class="{ disabled: authorizeStatus !== 'AUTHORIZED' }">
|
|
|
+ <div class="action-item" :class="{ disabled: authorizeStatus === 'AUTHORIZED' || !!accountData.account_book_id }">
|
|
|
<div class="action-icon">
|
|
|
<el-icon :size="32"><Document /></el-icon>
|
|
|
</div>
|
|
|
@@ -106,7 +56,7 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
|
|
|
- <div class="action-item" :class="{ disabled: authorizeStatus !== 'AUTHORIZED' || !!accountData.account_book_id }">
|
|
|
+ <div class="action-item" :class="{ disabled: authorizeStatus === 'AUTHORIZED' || !!accountData.account_book_id }">
|
|
|
<div class="action-icon">
|
|
|
<el-icon :size="32"><Coin /></el-icon>
|
|
|
</div>
|
|
|
@@ -119,27 +69,27 @@
|
|
|
<el-button
|
|
|
v-hasPerm="['module_payment:account:create']"
|
|
|
type="primary"
|
|
|
- :disabled="authorizeStatus !== 'AUTHORIZED' || !!accountData.account_book_id"
|
|
|
+ :disabled="authorizeStatus === 'AUTHORIZED' || !!accountData.account_book_id"
|
|
|
@click="$emit('goTab', 'create')"
|
|
|
>
|
|
|
{{ accountData.account_book_id ? '已开通' : '去开通' }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
|
|
|
- <div class="action-item" :class="{ disabled: !accountData.account_book_id || accountData.status !== 'ACTIVE' }">
|
|
|
+ <div class="action-item" :class="{ disabled: !accountData.account_book_id}">
|
|
|
<div class="action-icon">
|
|
|
<el-icon :size="32"><Wallet /></el-icon>
|
|
|
</div>
|
|
|
<div class="action-title">账户充值</div>
|
|
|
<div class="action-desc">
|
|
|
<template v-if="!accountData.account_book_id">需先开通专户</template>
|
|
|
- <template v-else-if="accountData.status !== 'ACTIVE'">专户状态异常</template>
|
|
|
+ <template v-else-if="accountData.status !== 'ON'">专户状态异常</template>
|
|
|
<template v-else>立即充值</template>
|
|
|
</div>
|
|
|
<el-button
|
|
|
v-hasPerm="['module_payment:account:deposit']"
|
|
|
type="primary"
|
|
|
- :disabled="!accountData.account_book_id || accountData.status !== 'ACTIVE'"
|
|
|
+ :disabled="!accountData.account_book_id"
|
|
|
@click="$emit('goTab', 'deposit')"
|
|
|
>
|
|
|
去充值
|
|
|
@@ -168,6 +118,56 @@
|
|
|
</div>
|
|
|
</el-card>
|
|
|
|
|
|
+ <el-row :gutter="16" class="mt-4">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-label">签约状态</div>
|
|
|
+ <div class="stat-value">
|
|
|
+ <el-tag :type="getAuthorizeStatusType(authorizeStatus)">
|
|
|
+ {{ authorizeStatusText }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-label">账户状态</div>
|
|
|
+ <div class="stat-value">
|
|
|
+ <el-tag :type="getAccountStatusType(accountData.status)">
|
|
|
+ {{ accountData.status || '未开通' }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-label">账户号</div>
|
|
|
+ <div class="stat-value text-truncate">
|
|
|
+ {{ accountData.account_book_id || '-' }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-label">账户余额</div>
|
|
|
+ <div class="stat-value balance-value">
|
|
|
+ ¥{{ accountData.balance || '0.00' }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
<el-card class="mt-4">
|
|
|
<template #header>
|
|
|
<div class="card-header">
|
|
|
@@ -181,14 +181,15 @@
|
|
|
<el-empty description="暂无交易记录" />
|
|
|
</template>
|
|
|
<el-table-column prop="out_biz_no" label="订单号" min-width="180" show-overflow-tooltip />
|
|
|
- <el-table-column prop="amount" label="金额" min-width="100">
|
|
|
+ <el-table-column prop="amount" label="转账金额" min-width="100">
|
|
|
<template #default="{ row }">
|
|
|
- <span :class="row.payee_info ? 'expense' : 'income'">
|
|
|
- {{ row.payee_info ? '-' : '+' }}¥{{ row.amount }}
|
|
|
+ <span class="amount">
|
|
|
+ <!-- {{ row.payee_info ? '-' : '+' }}¥{{ row.amount }} -->
|
|
|
+ ¥{{ row.amount }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="payee_info.name" label="对方" min-width="120" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="payee_info.name" label="收款方" min-width="120" show-overflow-tooltip>
|
|
|
<template #default="{ row }">
|
|
|
{{ row.payee_info?.name || '-' }}
|
|
|
</template>
|
|
|
@@ -196,7 +197,7 @@
|
|
|
<el-table-column prop="status" label="状态" min-width="100">
|
|
|
<template #default="{ row }">
|
|
|
<el-tag :type="getTransferStatusType(row.status)">
|
|
|
- {{ row.status }}
|
|
|
+ {{ getStatusLabel(row.status) }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -234,11 +235,11 @@ const recentTransfers = ref<any[]>([]);
|
|
|
|
|
|
const currentEnterpriseId = computed(() => props.enterpriseId || enterpriseStore.getCurrentEnterprise?.enterprise_id);
|
|
|
|
|
|
-const authorizeStatus = computed(() => 'ACTIVE');
|
|
|
+const authorizeStatus = computed(() => !!accountData.value.account_book_id ? "AUTHORIZED" : 'PENDING');
|
|
|
|
|
|
const currentStep = computed(() => {
|
|
|
if (authorizeStatus.value !== "AUTHORIZED") return 0;
|
|
|
- if (!accountData.value.account_book_id) return 1;
|
|
|
+ // if (!accountData.value.account_book_id) return 1;
|
|
|
if (!accountData.value.balance || accountData.value.balance <= 0) return 2;
|
|
|
return 3;
|
|
|
});
|
|
|
@@ -253,6 +254,16 @@ const authorizeStatusText = computed(() => {
|
|
|
return map[authorizeStatus.value] || authorizeStatus.value;
|
|
|
});
|
|
|
|
|
|
+function getStatusLabel(status: string) {
|
|
|
+ const map: Record<string, string> = {
|
|
|
+ DEALING: "处理中",
|
|
|
+ SUCCESS: "成功",
|
|
|
+ FAIL: "失败",
|
|
|
+ REFUND: "退票",
|
|
|
+ };
|
|
|
+ return map[status] || status;
|
|
|
+}
|
|
|
+
|
|
|
const accountStatusText = computed(() => {
|
|
|
if (!accountData.value.account_book_id) return "未开通";
|
|
|
const map: Record<string, string> = {
|
|
|
@@ -280,9 +291,9 @@ function getAuthorizeStatusType(status: string) {
|
|
|
|
|
|
function getAccountStatusType(status: string) {
|
|
|
const map: Record<string, any> = {
|
|
|
- ACTIVE: "success",
|
|
|
- FROZEN: "warning",
|
|
|
- CLOSED: "danger",
|
|
|
+ ON: "success",
|
|
|
+ // FROZEN: "warning",
|
|
|
+ // CLOSED: "danger",
|
|
|
};
|
|
|
return map[status] || "info";
|
|
|
}
|
|
|
@@ -307,7 +318,6 @@ async function fetchAccountInfo() {
|
|
|
const account = res.data.data[0];
|
|
|
accountData.value = {
|
|
|
account_book_id: account.account_book_id,
|
|
|
- // account.available_amount转换成number保留两位小数显示
|
|
|
balance: Number(account.available_amount),
|
|
|
status: account.enable_status,
|
|
|
scene: account.scene,
|
|
|
@@ -439,11 +449,7 @@ onMounted(() => {
|
|
|
padding: 16px 0;
|
|
|
}
|
|
|
|
|
|
-.expense {
|
|
|
- color: #f56c6c;
|
|
|
-}
|
|
|
-
|
|
|
-.income {
|
|
|
+.amount {
|
|
|
color: #67c23a;
|
|
|
}
|
|
|
</style>
|