|
|
@@ -17,7 +17,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态">
|
|
|
<el-select v-model="rmbSearch.status" placeholder="请选择" clearable>
|
|
|
- <el-option v-for="item in rmbStatusOpt" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-option v-for="item in rmbStatusOpt" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -36,7 +37,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态">
|
|
|
<el-select v-model="usdtSearch.status" placeholder="请选择" clearable>
|
|
|
- <el-option v-for="item in usdtStatusOpt" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-option v-for="item in usdtStatusOpt" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -48,47 +50,189 @@
|
|
|
|
|
|
<!-- 提现订单(RMB)板块 -->
|
|
|
<div v-show="activeTab === 'rmb'">
|
|
|
- <YMTable
|
|
|
- ref="rmbTable"
|
|
|
- :table-key="1"
|
|
|
- :index="true"
|
|
|
- :selection="true"
|
|
|
- :table-options="rmbTableOptions"
|
|
|
- :edit-form="rmbEditForm"
|
|
|
- :edit-config="rmbEditConfig"
|
|
|
- :columns="rmbColumns"
|
|
|
- :actions-width="120"
|
|
|
- :rows-actions="rmbRowsActions"
|
|
|
- :show-summary="false"
|
|
|
- :apis="rmbApis"
|
|
|
- :alertTip="rmbAlertTip"
|
|
|
- :custom-style="{ height: 'calc(100vh - 150px)' }"
|
|
|
- @onResponse="onRmbResponse"
|
|
|
- />
|
|
|
+ <YMTable ref="rmbTable" :table-key="1" :index="true" :selection="true" :table-options="rmbTableOptions"
|
|
|
+ :edit-form="rmbEditForm" :edit-config="rmbEditConfig" :columns="rmbColumns" :actions-width="160"
|
|
|
+ :rows-actions="rmbRowsActions" :show-summary="false" :apis="rmbApis" :alertTip="rmbAlertTip"
|
|
|
+ :custom-style="{ height: 'calc(100vh - 150px)' }" @onResponse="onRmbResponse">
|
|
|
+ <!-- 提现金额 -->
|
|
|
+ <template #amount="{ row }">
|
|
|
+ <span style="color: #18C80A;">
|
|
|
+ {{ row.amount != null ? Number(row.amount).toFixed(2) : '--' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 手续费 -->
|
|
|
+ <template #fee="{ row }">
|
|
|
+ <span style="color: #F56C6C;">
|
|
|
+ {{ row.fee != null ? Number(row.fee).toFixed(2) : '--' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 是否加锁 -->
|
|
|
+ <template #is_locked="{ row }">
|
|
|
+ <span :style="{ color: row.is_locked === 1 ? '#F3061F' : '#18C80A' }">
|
|
|
+ {{ row.is_locked === 1 ? '是' : '否' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 状态 -->
|
|
|
+ <template #status="{ row }">
|
|
|
+ <span :style="{ color: rmbStatusColorMap[row.status] || '#606266' }">
|
|
|
+ {{(rmbStatusOpt.find(item => item.value === row.status) || { label: '--' }).label}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </YMTable>
|
|
|
</div>
|
|
|
|
|
|
<!-- 提现订单(USDT)板块 -->
|
|
|
<div v-show="activeTab === 'usdt'">
|
|
|
- <YMTable
|
|
|
- ref="usdtTable"
|
|
|
- :table-key="2"
|
|
|
- :index="false"
|
|
|
- :selection="true"
|
|
|
- :table-options="usdtTableOptions"
|
|
|
- :edit-form="usdtEditForm"
|
|
|
- :edit-config="usdtEditConfig"
|
|
|
- :columns="usdtColumns"
|
|
|
- :rows-actions="usdtRowsActions"
|
|
|
- :show-summary="false"
|
|
|
- :apis="usdtApis"
|
|
|
- :custom-style="{ height: 'calc(100vh - 150px)' }"
|
|
|
- :alertTip="usdtAlertTip"
|
|
|
- @onResponse="onUsdtResponse"
|
|
|
- />
|
|
|
+ <YMTable ref="usdtTable" :table-key="2" :index="false" :selection="true" :table-options="usdtTableOptions"
|
|
|
+ :edit-form="usdtEditForm" :edit-config="usdtEditConfig" :columns="usdtColumns" :rows-actions="usdtRowsActions"
|
|
|
+ :show-summary="false" :apis="usdtApis" :custom-style="{ height: 'calc(100vh - 150px)' }"
|
|
|
+ :alertTip="usdtAlertTip" @onResponse="onUsdtResponse">
|
|
|
+ <!-- 提现金额 -->
|
|
|
+ <template #amount="{ row }">
|
|
|
+ <span style="color: #18C80A;">
|
|
|
+ {{ row.amount != null ? Number(row.amount).toFixed(2) : '--' }} USDT
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 手续费 -->
|
|
|
+ <template #service_charge="{ row }">
|
|
|
+ <span style="color: #F56C6C;">
|
|
|
+ {{ row.service_charge != null ? Number(row.service_charge).toFixed(2) : '--' }} USDT
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 是否加锁 -->
|
|
|
+ <template #is_locked="{ row }">
|
|
|
+ <span :style="{ color: row.is_locked === 1 ? '#F3061F' : '#18C80A' }">
|
|
|
+ {{ row.is_locked === 1 ? '是' : '否' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 状态 -->
|
|
|
+ <template #status="{ row }">
|
|
|
+ <span :style="{ color: usdtStatusColorMap[row.status] || '#606266' }">
|
|
|
+ {{(usdtStatusOpt.find(item => item.value === row.status) || { label: '--' }).label}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 费率 -->
|
|
|
+ <template #exchange_rate="{ row }">
|
|
|
+ <span style="color: #0B17FF;">
|
|
|
+ {{ row.exchange_rate != null ? formatNumber(row.exchange_rate, 2) : '--' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 提现后余额 -->
|
|
|
+ <template #after_balance="{ row }">
|
|
|
+ <span style="color: #0B17FF;">
|
|
|
+ {{ row.after_balance != null ? Number(row.after_balance).toFixed(2) : '--' }} RMB
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </YMTable>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 通用空 Dialog(保留) -->
|
|
|
<Dialog ref="dialog">
|
|
|
- <template slot="content"/>
|
|
|
+ <template slot="content" />
|
|
|
+ </Dialog>
|
|
|
+
|
|
|
+ <!-- ========== RMB 查看弹窗 ========== -->
|
|
|
+ <Dialog ref="rmbViewDialog" :dialog-actions="{
|
|
|
+ width: '800px',
|
|
|
+ title: '提现订单详情(RMB)',
|
|
|
+ confirmButtom: false,
|
|
|
+ }">
|
|
|
+ <template slot="content">
|
|
|
+ <div style="display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 0; max-height: 500px; overflow-y: auto;">
|
|
|
+ <!-- 字段展示(flex 网格) -->
|
|
|
+ <div v-for="field in rmbViewFields" :key="field.prop"
|
|
|
+ style="flex: 0 0 calc(33.33% - 12px); background: #f5f7fa; border-radius: 6px; padding: 12px 16px; box-sizing: border-box; border: 1px solid #e4e7ed;">
|
|
|
+ <div style="font-size: 13px; color: #909399; margin-bottom: 4px;">{{ field.label }}</div>
|
|
|
+ <!-- 特殊字段样式 -->
|
|
|
+ <div v-if="field.type === 'amount'" style="color: #18C80A; font-size: 15px;">{{ field.value }}</div>
|
|
|
+ <div v-else-if="field.type === 'fee'" style="color: #F56C6C; font-size: 15px;">{{ field.value }}</div>
|
|
|
+ <div v-else-if="field.type === 'is_locked'"
|
|
|
+ :style="{ color: field.rawValue === 1 ? '#F3061F' : '#18C80A', fontSize: '15px' }">{{ field.value }}</div>
|
|
|
+ <div v-else-if="field.type === 'status'"
|
|
|
+ :style="{ color: rmbStatusColorMap[field.rawValue] || '#606266', fontSize: '15px' }">{{ field.value }}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="field.type === 'info'" style="font-size: 15px; color: #0B17FF; line-height: 1.6;"
|
|
|
+ v-html="field.value"></div>
|
|
|
+ <div v-else style="color: #303133; font-size: 15px; word-break: break-all;">{{ field.value }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 操作按钮(复用列表逻辑) -->
|
|
|
+ <div style="margin-top: 20px; text-align: center; border-top: 1px solid #e4e7ed; padding-top: 16px;">
|
|
|
+ <!-- 上锁 -->
|
|
|
+ <el-button v-if="rmbViewRow && rmbViewRow.status === 0 && rmbViewRow.is_locked === 0" type="warning"
|
|
|
+ size="small" @click="handleRmbViewAction('lock')">上锁</el-button>
|
|
|
+ <!-- 解锁 -->
|
|
|
+ <el-button v-if="rmbViewRow && rmbViewRow.status === 0 && rmbViewRow.is_locked === 1" type="success"
|
|
|
+ size="small" @click="handleRmbViewAction('unlock')">解锁</el-button>
|
|
|
+ <!-- 通过 -->
|
|
|
+ <el-button v-if="rmbViewRow && rmbViewRow.status === 0 && rmbViewRow.type === 2" type="primary" size="small"
|
|
|
+ @click="handleRmbViewAction('pass')">通过</el-button>
|
|
|
+ <!-- 驳回 -->
|
|
|
+ <el-button v-if="rmbViewRow && rmbViewRow.status === 0 && rmbViewRow.type === 2" type="danger" size="small"
|
|
|
+ @click="handleRmbViewAction('reject')">驳回</el-button>
|
|
|
+ <!-- 备注 -->
|
|
|
+ <el-button type="info" size="small" @click="handleRmbViewAction('note')">备注</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </Dialog>
|
|
|
+
|
|
|
+ <!-- ========== USDT 查看弹窗 ========== -->
|
|
|
+ <Dialog ref="usdtViewDialog" :dialog-actions="{
|
|
|
+ width: '800px',
|
|
|
+ title: '提现订单详情(USDT)',
|
|
|
+ confirmButtom: false,
|
|
|
+ }">
|
|
|
+ <template slot="content">
|
|
|
+ <div style="display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 0; max-height: 500px; overflow-y: auto;">
|
|
|
+ <div v-for="field in usdtViewFields" :key="field.prop"
|
|
|
+ style="flex: 0 0 calc(33.33% - 12px); background: #f5f7fa; border-radius: 6px; padding: 12px 16px; box-sizing: border-box; border: 1px solid #e4e7ed;">
|
|
|
+ <div style="font-size: 13px; color: #909399; margin-bottom: 4px;">{{ field.label }}</div>
|
|
|
+ <!-- 特殊字段样式 -->
|
|
|
+ <div v-if="field.type === 'amount'" style="color: #18C80A; font-size: 15px;">{{ field.value }}</div>
|
|
|
+ <div v-else-if="field.type === 'service_charge'" style="color: #F56C6C; font-size: 15px;">{{ field.value }}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="field.type === 'is_locked'"
|
|
|
+ :style="{ color: field.rawValue === 1 ? '#F3061F' : '#18C80A', fontSize: '15px' }">{{ field.value }}</div>
|
|
|
+ <div v-else-if="field.type === 'status'"
|
|
|
+ :style="{ color: usdtStatusColorMap[field.rawValue] || '#606266', fontSize: '15px' }">{{ field.value }}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="field.type === 'exchange_rate'" style="color: #0B17FF; font-size: 15px;">{{ field.value }}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="field.type === 'after_balance'" style="color: #0B17FF; font-size: 15px;">{{ field.value }}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="field.type === 'to_account'" style="color: #18C80A; font-size: 15px;" v-html="field.value">
|
|
|
+ </div>
|
|
|
+ <div v-else-if="field.type === 'deduct_amount'" style="color: #E6A23C; font-size: 15px;"
|
|
|
+ v-html="field.value"></div>
|
|
|
+ <div v-else style="color: #303133; font-size: 15px; word-break: break-all;">{{ field.value }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <div style="margin-top: 20px; text-align: center; border-top: 1px solid #e4e7ed; padding-top: 16px;">
|
|
|
+ <!-- 上锁 -->
|
|
|
+ <el-button v-if="usdtViewRow && usdtViewRow.status === 0 && usdtViewRow.is_locked === 0" type="warning"
|
|
|
+ size="small" @click="handleUsdtViewAction('lock')">上锁</el-button>
|
|
|
+ <!-- 解锁 -->
|
|
|
+ <el-button v-if="usdtViewRow && usdtViewRow.status === 0 && usdtViewRow.is_locked === 1" type="success"
|
|
|
+ size="small" @click="handleUsdtViewAction('unlock')">解锁</el-button>
|
|
|
+ <!-- 通过 -->
|
|
|
+ <el-button v-if="usdtViewRow && usdtViewRow.status === 0" type="primary" size="small"
|
|
|
+ @click="handleUsdtViewAction('pass')">通过</el-button>
|
|
|
+ <!-- 驳回 -->
|
|
|
+ <el-button v-if="usdtViewRow && usdtViewRow.status === 0" type="danger" size="small"
|
|
|
+ @click="handleUsdtViewAction('reject')">驳回</el-button>
|
|
|
+ <!-- 备注 -->
|
|
|
+ <el-button type="info" size="small" @click="handleUsdtViewAction('note')">备注</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</Dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -133,25 +277,41 @@ export default {
|
|
|
options: [
|
|
|
{ label: '会员ID', value: ['member_id'] },
|
|
|
{ label: '用户名称', value: ['first_name'] },
|
|
|
- { label: '异常信息', vShow: (row) => row?.admin_note ? true : false, value: ['admin_note'] }
|
|
|
+ { label: '备注', vShow: (row) => row?.admin_note ? true : false, value: ['admin_note'] }
|
|
|
]
|
|
|
},
|
|
|
{ label: '订单号', prop: 'order_no' },
|
|
|
{ label: '提现金额', prop: 'amount', method: (row) => Number(row.amount)?.toFixed(2) },
|
|
|
{
|
|
|
- label: '银行卡',
|
|
|
+ label: '信息',
|
|
|
width: '180px',
|
|
|
html: true,
|
|
|
- method: (row) => `${row?.account}(${row?.bank_name})<br/>账户:${row?.card_no} `
|
|
|
+ method: (row) => `<span style="color: #0B17FF;">${row.account || ''}(${row.bank_name || ''})<br/>账户:${row.card_no || ''}</span>`
|
|
|
},
|
|
|
{ label: '手续费', prop: 'fee', method: (row) => Number(row.fee)?.toFixed(2) },
|
|
|
{ label: '是否加锁', prop: 'is_locked', method: (row) => row.is_locked === 1 ? '是' : '否' },
|
|
|
- { label: '状态', method: (row) => { return this.rmbStatusOpt.filter(item => item.value === row.status)[0]?.label } },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'status',
|
|
|
+ method: (row) => {
|
|
|
+ const found = this.rmbStatusOpt.find(item => item.value === row.status);
|
|
|
+ return found ? found.label : '--';
|
|
|
+ }
|
|
|
+ },
|
|
|
{ label: '原因', prop: 'remark' },
|
|
|
{ label: '备注', prop: 'admin_note' },
|
|
|
{ label: '申请时间', prop: 'created_at' }
|
|
|
],
|
|
|
rmbRowsActions: [
|
|
|
+ // ---------- 新增查看按钮 ----------
|
|
|
+ {
|
|
|
+ key: 'view',
|
|
|
+ label: '查看',
|
|
|
+ method: (row) => {
|
|
|
+ this.rmbViewRow = { ...row };
|
|
|
+ this.$refs.rmbViewDialog.open();
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
key: 'lock',
|
|
|
label: '上锁',
|
|
|
@@ -166,7 +326,7 @@ export default {
|
|
|
this.onRmbSubmit()
|
|
|
this.$message({ type: 'success', message: '操作成功' })
|
|
|
})
|
|
|
- }).catch(() => {})
|
|
|
+ }).catch(() => { })
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -183,7 +343,7 @@ export default {
|
|
|
this.onRmbSubmit()
|
|
|
this.$message({ type: 'success', message: '操作成功' })
|
|
|
})
|
|
|
- }).catch(() => {})
|
|
|
+ }).catch(() => { })
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -255,7 +415,7 @@ export default {
|
|
|
options: [
|
|
|
{ label: '会员ID', value: ['member_id'] },
|
|
|
{ label: '用户名称', value: ['username'] },
|
|
|
- { label: '异常信息', vShow: (row) => row?.user_admin_note ? true : false, value: ['user_admin_note'] }
|
|
|
+ { label: '备注', vShow: (row) => row?.user_admin_note ? true : false, value: ['user_admin_note'] }
|
|
|
]
|
|
|
},
|
|
|
{ label: '提现金额', prop: 'amount', method: (row) => Number(row.amount)?.toFixed(2) + ' USDT' },
|
|
|
@@ -263,39 +423,46 @@ export default {
|
|
|
{ label: '费率', width: 50, prop: 'exchange_rate', method: (row) => this.formatNumber(row.exchange_rate, 2) },
|
|
|
{
|
|
|
label: '到账金额',
|
|
|
- prop: 'to_account',
|
|
|
html: true,
|
|
|
method: (row) => {
|
|
|
- return `
|
|
|
- <div class="amount-display">
|
|
|
- <div class="usd-amount">${this.formatNumber(row.to_account_usdt)} USDT</div>
|
|
|
- </div>
|
|
|
- `
|
|
|
+ return `<span style="color: #18C80A;">${this.formatNumber(row.to_account_usdt)} USDT</span>`;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
label: '扣除金额',
|
|
|
html: true,
|
|
|
method: (row) => {
|
|
|
- const amount = row.amount || 0
|
|
|
- const exchangeRate = row.exchange_rate || 1
|
|
|
- const convertedAmount = amount * exchangeRate
|
|
|
- return `
|
|
|
- <div class="amount-display">
|
|
|
- <div class="cny-amount">${this.formatNumber(convertedAmount)} RMB</div>
|
|
|
- </div>
|
|
|
- `
|
|
|
+ const amount = row.amount || 0;
|
|
|
+ const exchangeRate = row.exchange_rate || 1;
|
|
|
+ const convertedAmount = amount * exchangeRate;
|
|
|
+ return `<span style="color: #E6A23C;">${this.formatNumber(convertedAmount)} RMB</span>`;
|
|
|
}
|
|
|
},
|
|
|
{ label: '提现后余额', prop: 'after_balance', method: (row) => Number(row.after_balance)?.toFixed(2) + ' RMB' },
|
|
|
{ label: '钱包地址', prop: 'address', width: 130 },
|
|
|
{ label: '是否加锁', prop: 'is_locked', method: (row) => row.is_locked === 1 ? '是' : '否' },
|
|
|
- { label: '状态', method: (row) => { return this.usdtStatusOpt.filter(item => item.value === row.status)[0]?.label } },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'status',
|
|
|
+ method: (row) => {
|
|
|
+ const found = this.usdtStatusOpt.find(item => item.value === row.status);
|
|
|
+ return found ? found.label : '--';
|
|
|
+ }
|
|
|
+ },
|
|
|
{ label: '原因', prop: 'remark' },
|
|
|
{ label: '申请时间', prop: 'created_at' },
|
|
|
{ label: '备注', prop: 'admin_note' }
|
|
|
],
|
|
|
usdtRowsActions: [
|
|
|
+ // ---------- 新增查看按钮 ----------
|
|
|
+ {
|
|
|
+ key: 'view',
|
|
|
+ label: '查看',
|
|
|
+ method: (row) => {
|
|
|
+ this.usdtViewRow = { ...row };
|
|
|
+ this.$refs.usdtViewDialog.open();
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
key: 'lock',
|
|
|
label: '上锁',
|
|
|
@@ -310,7 +477,7 @@ export default {
|
|
|
this.onUsdtSubmit()
|
|
|
this.$message({ type: 'success', message: '操作成功' })
|
|
|
})
|
|
|
- }).catch(() => {})
|
|
|
+ }).catch(() => { })
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -327,7 +494,7 @@ export default {
|
|
|
this.onUsdtSubmit()
|
|
|
this.$message({ type: 'success', message: '操作成功' })
|
|
|
})
|
|
|
- }).catch(() => {})
|
|
|
+ }).catch(() => { })
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -374,7 +541,76 @@ export default {
|
|
|
pass: { show: false }
|
|
|
},
|
|
|
usdtEditForm: [],
|
|
|
- usdtEditConfig: {}
|
|
|
+ usdtEditConfig: {},
|
|
|
+
|
|
|
+ // RMB 状态颜色映射
|
|
|
+ rmbStatusColorMap: {
|
|
|
+ 0: '#E6A23C',
|
|
|
+ 1: '#409EFF',
|
|
|
+ 2: '#67C23A',
|
|
|
+ 3: '#F56C6C',
|
|
|
+ 4: '#909399',
|
|
|
+ 5: '#E6A23C',
|
|
|
+ 6: '#909399'
|
|
|
+ },
|
|
|
+ // USDT 状态颜色映射
|
|
|
+ usdtStatusColorMap: {
|
|
|
+ 0: '#409EFF',
|
|
|
+ 1: '#67C23A',
|
|
|
+ 2: '#F56C6C',
|
|
|
+ 3: '#909399'
|
|
|
+ },
|
|
|
+
|
|
|
+ // ---------- 查看弹窗数据 ----------
|
|
|
+ rmbViewRow: null,
|
|
|
+ usdtViewRow: null,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // RMB 查看字段
|
|
|
+ rmbViewFields() {
|
|
|
+ if (!this.rmbViewRow) return []
|
|
|
+ const row = this.rmbViewRow
|
|
|
+ const infoHtml = `${row.account || ''}(${row.bank_name || ''})<br/>账户:${row.card_no || ''}`
|
|
|
+ return [
|
|
|
+ { label: '会员ID', prop: 'member_id', value: row.member_id },
|
|
|
+ { label: '会员昵称', prop: 'first_name', value: row.first_name || '--' },
|
|
|
+ { label: '订单号', prop: 'order_no', value: row.order_no || '--' },
|
|
|
+ { label: '提现金额', prop: 'amount', value: row.amount != null ? Number(row.amount).toFixed(2) : '--', type: 'amount' },
|
|
|
+ { label: '信息', prop: 'info', value: infoHtml, type: 'info' },
|
|
|
+ { label: '手续费', prop: 'fee', value: row.fee != null ? Number(row.fee).toFixed(2) : '--', type: 'fee' },
|
|
|
+ { label: '是否加锁', prop: 'is_locked', value: row.is_locked === 1 ? '是' : '否', type: 'is_locked', rawValue: row.is_locked },
|
|
|
+ { label: '状态', prop: 'status', value: (this.rmbStatusOpt.find(item => item.value === row.status) || { label: '--' }).label, type: 'status', rawValue: row.status },
|
|
|
+ { label: '原因', prop: 'remark', value: row.remark || '--' },
|
|
|
+ { label: '备注', prop: 'admin_note', value: row.admin_note || '--' },
|
|
|
+ { label: '申请时间', prop: 'created_at', value: row.created_at || '--' },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ // USDT 查看字段
|
|
|
+ usdtViewFields() {
|
|
|
+ if (!this.usdtViewRow) return []
|
|
|
+ const row = this.usdtViewRow
|
|
|
+ const toAccountHtml = `<span style="color: #18C80A;">${this.formatNumber(row.to_account_usdt)} USDT</span>`
|
|
|
+ const amount = row.amount || 0
|
|
|
+ const exchangeRate = row.exchange_rate || 1
|
|
|
+ const deductAmount = amount * exchangeRate
|
|
|
+ const deductHtml = `<span style="color: #E6A23C;">${this.formatNumber(deductAmount)} RMB</span>`
|
|
|
+ return [
|
|
|
+ { label: '会员ID', prop: 'member_id', value: row.member_id },
|
|
|
+ { label: '会员昵称', prop: 'first_name', value: row.first_name || '--' },
|
|
|
+ { label: '提现金额', prop: 'amount', value: row.amount != null ? Number(row.amount).toFixed(2) + ' USDT' : '--', type: 'amount' },
|
|
|
+ { label: '手续费', prop: 'service_charge', value: row.service_charge != null ? Number(row.service_charge).toFixed(2) + ' USDT' : '--', type: 'service_charge' },
|
|
|
+ { label: '费率', prop: 'exchange_rate', value: row.exchange_rate != null ? this.formatNumber(row.exchange_rate, 2) : '--', type: 'exchange_rate' },
|
|
|
+ { label: '到账金额', prop: 'to_account', value: toAccountHtml, type: 'to_account' },
|
|
|
+ { label: '扣除金额', prop: 'deduct_amount', value: deductHtml, type: 'deduct_amount' },
|
|
|
+ { label: '提现后余额', prop: 'after_balance', value: row.after_balance != null ? Number(row.after_balance).toFixed(2) + ' RMB' : '--', type: 'after_balance' },
|
|
|
+ { label: '钱包地址', prop: 'address', value: row.address || '--' },
|
|
|
+ { label: '是否加锁', prop: 'is_locked', value: row.is_locked === 1 ? '是' : '否', type: 'is_locked', rawValue: row.is_locked },
|
|
|
+ { label: '状态', prop: 'status', value: (this.usdtStatusOpt.find(item => item.value === row.status) || { label: '--' }).label, type: 'status', rawValue: row.status },
|
|
|
+ { label: '原因', prop: 'remark', value: row.remark || '--' },
|
|
|
+ { label: '申请时间', prop: 'created_at', value: row.created_at || '--' },
|
|
|
+ { label: '备注', prop: 'admin_note', value: row.admin_note || '--' },
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -387,7 +623,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- // Tab栏点击跳转方法
|
|
|
+ // Tab切换
|
|
|
handleTabChange(val) {
|
|
|
if (val === 'rmb') {
|
|
|
this.onRmbSubmit()
|
|
|
@@ -396,13 +632,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // 公用格式化方法
|
|
|
+ // 公用格式化
|
|
|
formatNumber(num, decimals = 2) {
|
|
|
if (isNaN(num)) return '0.00'
|
|
|
return Number(num).toFixed(decimals).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
|
|
},
|
|
|
|
|
|
- // RMB 相关方法
|
|
|
+ // ---------- RMB 列表方法 ----------
|
|
|
onRmbResponse(data) {
|
|
|
this.rmbAlertTip = `总金额:${data.total_amount}(RMB);已处理:${data.total_success}(RMB);失败金额:${data.total_fail}(RMB)`
|
|
|
},
|
|
|
@@ -445,7 +681,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // USDT 相关方法
|
|
|
+ // ---------- USDT 列表方法 ----------
|
|
|
onUsdtResponse(data) {
|
|
|
this.usdtAlertTip = `总金额:${data.total_amount}(USTD);已处理:${data.total_success}(USTD);失败金额:${data.total_fail}(USTD)`
|
|
|
},
|
|
|
@@ -486,6 +722,145 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ // ---------- RMB 查看弹窗操作 ----------
|
|
|
+ handleRmbViewAction(action) {
|
|
|
+ const row = this.rmbViewRow
|
|
|
+ if (!row) return
|
|
|
+ const closeDialog = () => {
|
|
|
+ this.$refs.rmbViewDialog.close()
|
|
|
+ }
|
|
|
+ switch (action) {
|
|
|
+ case 'lock':
|
|
|
+ this.$confirm('确定要上锁吗?', '提示', { type: 'warning' }).then(() => {
|
|
|
+ rmbPaymentOrderSetIsLocked({ ids: [row.id], is_locked: 1 }).then(() => {
|
|
|
+ this.onRmbSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'unlock':
|
|
|
+ this.$confirm('确定要解锁吗?', '提示', { type: 'warning' }).then(() => {
|
|
|
+ rmbPaymentOrderSetIsLocked({ ids: [row.id], is_locked: 0 }).then(() => {
|
|
|
+ this.onRmbSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'pass':
|
|
|
+ this.setRmbStatus({ ids: [row.id], status: 1 })
|
|
|
+ // 在 setRmbStatus 成功后关闭弹窗(但该方法内部无 close,需额外处理)
|
|
|
+ // 改造:直接调用 audit 并关闭
|
|
|
+ this.$confirm('确定通过审核?', '提示', { type: 'warning' }).then(() => {
|
|
|
+ audit({ ids: [row.id], status: 1 }).then(() => {
|
|
|
+ this.onRmbSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'reject':
|
|
|
+ this.$prompt('请输入原因', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern: /^\S+$/,
|
|
|
+ inputErrorMessage: '请输入原因'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ audit({ ids: [row.id], status: 3, remark: value }).then(() => {
|
|
|
+ this.onRmbSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'note':
|
|
|
+ this.$prompt('请输入备注', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern: /^\S+$/,
|
|
|
+ inputErrorMessage: '请输入备注'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ withdrawssetRmbNote({ id: row.id, admin_note: value }).then(() => {
|
|
|
+ this.onRmbSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // ---------- USDT 查看弹窗操作 ----------
|
|
|
+ handleUsdtViewAction(action) {
|
|
|
+ const row = this.usdtViewRow
|
|
|
+ if (!row) return
|
|
|
+ const closeDialog = () => {
|
|
|
+ this.$refs.usdtViewDialog.close()
|
|
|
+ }
|
|
|
+ switch (action) {
|
|
|
+ case 'lock':
|
|
|
+ this.$confirm('确定要上锁吗?', '提示', { type: 'warning' }).then(() => {
|
|
|
+ usdtWithdrawSetIsLocked({ ids: [row.id], is_locked: 1 }).then(() => {
|
|
|
+ this.onUsdtSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'unlock':
|
|
|
+ this.$confirm('确定要解锁吗?', '提示', { type: 'warning' }).then(() => {
|
|
|
+ usdtWithdrawSetIsLocked({ ids: [row.id], is_locked: 0 }).then(() => {
|
|
|
+ this.onUsdtSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'pass':
|
|
|
+ this.$confirm('确定通过审核?', '提示', { type: 'warning' }).then(() => {
|
|
|
+ withdrawStatus({ ids: [row.id], status: 1 }).then(() => {
|
|
|
+ this.onUsdtSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'reject':
|
|
|
+ this.$prompt('请输入原因', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern: /^\S+$/,
|
|
|
+ inputErrorMessage: '请输入原因'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ withdrawStatus({ ids: [row.id], status: 2, remark: value }).then(() => {
|
|
|
+ this.onUsdtSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ case 'note':
|
|
|
+ this.$prompt('请输入备注', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern: /^\S+$/,
|
|
|
+ inputErrorMessage: '请输入备注'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ withdrawsetNote({ id: row.id, admin_note: value }).then(() => {
|
|
|
+ this.onUsdtSubmit()
|
|
|
+ this.$message({ type: 'success', message: '操作成功' })
|
|
|
+ closeDialog()
|
|
|
+ })
|
|
|
+ }).catch(() => { })
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -502,10 +877,12 @@ export default {
|
|
|
padding-left: 20px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
+
|
|
|
.tab-group {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
+
|
|
|
.search-form {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|