|
@@ -1,135 +1,167 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="new-app-container layout-vertical">
|
|
<div class="new-app-container layout-vertical">
|
|
|
- <YMTableSearch
|
|
|
|
|
- :loading="loading"
|
|
|
|
|
- :search-form="searchForm"
|
|
|
|
|
- @onValueChange="onValueChange"
|
|
|
|
|
- @submit="onSubmit"
|
|
|
|
|
- />
|
|
|
|
|
- <YMTable
|
|
|
|
|
- ref="table"
|
|
|
|
|
- :apis="apis"
|
|
|
|
|
- :columns="columns"
|
|
|
|
|
- :custom-style="{ height: 'calc(100vh - 200px)' }"
|
|
|
|
|
- :index="true"
|
|
|
|
|
- :rows-actions="rowsActions"
|
|
|
|
|
- :selection="false"
|
|
|
|
|
- :show-summary="false"
|
|
|
|
|
- :table-key="1"
|
|
|
|
|
- :table-options="tableOptions"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <YMTableSearch :loading="loading" :search-form="searchForm" @onValueChange="onValueChange" @submit="onSubmit" />
|
|
|
|
|
+ <YMTable ref="table" :apis="apis" :columns="columns" :custom-style="{ height: 'calc(100vh - 200px)' }" :index="true"
|
|
|
|
|
+ :rows-actions="rowsActions" :selection="false" :show-summary="false" :table-key="1" :table-options="tableOptions"
|
|
|
|
|
+ :actions-width="140">
|
|
|
|
|
+ <!-- 赛事信息插槽(安全处理空值) -->
|
|
|
<template #game_info="{ row }">
|
|
<template #game_info="{ row }">
|
|
|
- <div v-if="row" style="line-height: 1.5; font-size: 12px;height: 70px;display: flex;flex-direction: column;justify-content: center;">
|
|
|
|
|
|
|
+ <div v-if="row"
|
|
|
|
|
+ style="line-height: 1.5; font-size: 12px;height: 70px;display: flex;flex-direction: column;justify-content: center;">
|
|
|
<div>{{ row.detail ? row.detail.game_time : '--' }}</div>
|
|
<div>{{ row.detail ? row.detail.game_time : '--' }}</div>
|
|
|
<div style="font-weight: bold; color: #303133;">
|
|
<div style="font-weight: bold; color: #303133;">
|
|
|
{{ row.home_team || '--' }} vs {{ row.guest_team || '--' }}
|
|
{{ row.home_team || '--' }} vs {{ row.guest_team || '--' }}
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="opacity: 0;height: 0px;">1</div>
|
|
|
|
|
- <div v-if="(row.detail && row.detail.fixture_status)">
|
|
|
|
|
- 赛况: <span v-if="(row.detail && row.detail.fixture_status)">{{ (row.detail && row.detail.fixture_status) ? row.detail.fixture_status.long : '--' }}</span>
|
|
|
|
|
- <span v-if="(row.detail && row.detail.fixture_status) ">
|
|
|
|
|
- ({{ (row.detail && row.detail.fixture_status) ? row.detail.fixture_status.seconds : '--' }})
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <div v-if="row.detail && row.detail.fixture_status">
|
|
|
|
|
+ 赛况: <span>{{ row.detail.fixture_status.long || '--' }}</span>
|
|
|
|
|
+ <span>({{ row.detail.fixture_status.seconds || '--' }})</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div v-else>赛况: --</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <span v-if="row.detail && row.detail.half_score">半场: {{ row.detail ? row.detail.half_score : '--' }}</span>
|
|
|
|
|
|
|
+ <span v-if="row.detail && row.detail.half_score">半场: {{ row.detail.half_score }}</span>
|
|
|
<span v-if="row.detail && row.detail.score && row.detail.half_score"> / </span>
|
|
<span v-if="row.detail && row.detail.score && row.detail.half_score"> / </span>
|
|
|
- <span v-if="row.detail && row.detail.score">
|
|
|
|
|
- 全场: {{ row.detail ? row.detail.score : '--' }}
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <span v-if="row.detail && row.detail.score">全场: {{ row.detail.score }}</span>
|
|
|
|
|
+ <span v-if="!row.detail || (!row.detail.half_score && !row.detail.score)">--</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
+ <!-- 玩法信息插槽 -->
|
|
|
<template #odd_name="{ row }">
|
|
<template #odd_name="{ row }">
|
|
|
<div v-if="row" style="line-height: 1.5; font-size: 12px;height: 70px;">
|
|
<div v-if="row" style="line-height: 1.5; font-size: 12px;height: 70px;">
|
|
|
<div style="font-weight: bold; color: #303133;">{{ row.odd_name || '--' }}</div>
|
|
<div style="font-weight: bold; color: #303133;">{{ row.odd_name || '--' }}</div>
|
|
|
<div>玩法: {{ row.odd_value || '--' }}</div>
|
|
<div>玩法: {{ row.odd_value || '--' }}</div>
|
|
|
- <div style="opacity: 0;height: 0px;">1</div>
|
|
|
|
|
|
|
+ <div style="opacity: 0;height: 0px;">1</div>
|
|
|
<div>盘口: {{ row.handicap || '--' }}</div>
|
|
<div>盘口: {{ row.handicap || '--' }}</div>
|
|
|
<div>赔率: {{ row.odd || '--' }}</div>
|
|
<div>赔率: {{ row.odd || '--' }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</YMTable>
|
|
</YMTable>
|
|
|
|
|
|
|
|
|
|
+ <!-- 扣款弹窗 -->
|
|
|
<el-dialog :visible.sync="debitDialogVisible" title="扣款操作" width="450px" @close="resetDebitForm">
|
|
<el-dialog :visible.sync="debitDialogVisible" title="扣款操作" width="450px" @close="resetDebitForm">
|
|
|
<el-form ref="debitForm" :model="debitForm" :rules="debitRules" label-width="100px">
|
|
<el-form ref="debitForm" :model="debitForm" :rules="debitRules" label-width="100px">
|
|
|
<el-form-item label="扣款金额" prop="amount">
|
|
<el-form-item label="扣款金额" prop="amount">
|
|
|
- <el-input-number
|
|
|
|
|
- v-model="debitForm.amount"
|
|
|
|
|
- :min="0.01"
|
|
|
|
|
- :precision="2"
|
|
|
|
|
- placeholder="请输入扣款金额"
|
|
|
|
|
- style="width: 100%;"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-input-number v-model="debitForm.amount" :min="0.01" :precision="2" placeholder="请输入扣款金额"
|
|
|
|
|
+ style="width: 100%;">
|
|
|
</el-input-number>
|
|
</el-input-number>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-form-item label="备注" prop="remark">
|
|
|
- <el-input
|
|
|
|
|
- v-model="debitForm.remark"
|
|
|
|
|
- :rows="3"
|
|
|
|
|
- placeholder="请输入备注信息(选填)"
|
|
|
|
|
- type="textarea"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-input v-model="debitForm.remark" :rows="3" placeholder="请输入备注信息(选填)" type="textarea">
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="debitDialogVisible = false">取 消</el-button>
|
|
|
|
|
- <el-button :loading="loading" type="primary" @click="submitDebitOrder">确 定</el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <el-button @click="debitDialogVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button :loading="loading" type="primary" @click="submitDebitOrder">确 定</el-button>
|
|
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <!-- 充值弹窗 -->
|
|
|
<el-dialog :visible.sync="rechargeDialogVisible" title="充值操作" width="450px" @close="resetRechargeForm">
|
|
<el-dialog :visible.sync="rechargeDialogVisible" title="充值操作" width="450px" @close="resetRechargeForm">
|
|
|
<el-form ref="rechargeForm" :model="rechargeForm" :rules="rechargeRules" label-width="100px">
|
|
<el-form ref="rechargeForm" :model="rechargeForm" :rules="rechargeRules" label-width="100px">
|
|
|
<el-form-item label="充值金额" prop="amount">
|
|
<el-form-item label="充值金额" prop="amount">
|
|
|
- <el-input-number
|
|
|
|
|
- v-model="rechargeForm.amount"
|
|
|
|
|
- :min="0.01"
|
|
|
|
|
- :precision="2"
|
|
|
|
|
- placeholder="请输入充值金额"
|
|
|
|
|
- style="width: 100%;"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-input-number v-model="rechargeForm.amount" :min="0.01" :precision="2" placeholder="请输入充值金额"
|
|
|
|
|
+ style="width: 100%;">
|
|
|
</el-input-number>
|
|
</el-input-number>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-form-item label="备注" prop="remark">
|
|
|
- <el-input
|
|
|
|
|
- v-model="rechargeForm.remark"
|
|
|
|
|
- :rows="3"
|
|
|
|
|
- placeholder="请输入备注信息(选填)"
|
|
|
|
|
- type="textarea"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-input v-model="rechargeForm.remark" :rows="3" placeholder="请输入备注信息(选填)" type="textarea">
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="rechargeDialogVisible = false">取 消</el-button>
|
|
|
|
|
- <el-button :loading="loading" type="primary" @click="submitRechargeOrder">确 定</el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <el-button @click="rechargeDialogVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button :loading="loading" type="primary" @click="submitRechargeOrder">确 定</el-button>
|
|
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ========== 查看详情弹窗(含操作按钮) ========== -->
|
|
|
|
|
+ <Dialog ref="viewDialog" :dialog-actions="{
|
|
|
|
|
+ width: '820px',
|
|
|
|
|
+ title: '订单详情',
|
|
|
|
|
+ confirmButtom: false
|
|
|
|
|
+ }">
|
|
|
|
|
+ <template slot="content">
|
|
|
|
|
+ <!-- 详情展示区 -->
|
|
|
|
|
+ <div style="display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 0; max-height: 400px; overflow-y: auto;">
|
|
|
|
|
+ <div v-for="field in viewFields" :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 === 'game_info'" style="font-size: 13px; line-height: 1.6;" v-html="field.value">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 玩法信息 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'odd_info'" style="font-size: 13px; line-height: 1.6;" v-html="field.value">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 滚球 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'is_roll'"
|
|
|
|
|
+ :style="{ color: field.rawValue === 1 ? '#E6A23C' : '#909399', fontSize: '15px' }">
|
|
|
|
|
+ {{ field.value }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 订单状态 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'status'" :style="{ color: field.color, fontSize: '15px' }">{{ field.value }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 中奖状态 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'is_win'" :style="{ color: field.color, fontSize: '15px' }">{{ field.value }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 结算状态 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'settlement_status'" :style="{ color: field.color, fontSize: '15px' }">{{
|
|
|
|
|
+ field.value }}</div>
|
|
|
|
|
+ <!-- 支付状态 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'pay_status'"
|
|
|
|
|
+ :style="{ color: field.rawValue === 1 ? '#67C23A' : '#909399', fontSize: '15px' }">
|
|
|
|
|
+ {{ field.value }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 退款状态 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'return_status'" :style="{ color: field.color, fontSize: '15px' }">{{
|
|
|
|
|
+ field.value }}</div>
|
|
|
|
|
+ <!-- 金额字段 -->
|
|
|
|
|
+ <div v-else-if="field.type === 'amount'" style="color: #303133; font-size: 15px;">{{ 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: 16px; text-align: center; border-top: 1px solid #e4e7ed; padding-top: 16px;">
|
|
|
|
|
+ <!-- 退款按钮 -->
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="viewRow && viewRow.pay_status === 1 && viewRow.settlement_status === 0 && viewRow.status === 1 && viewRow.return_status === 0"
|
|
|
|
|
+ type="warning" size="small" @click="handleRefundFromView">退款</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 充值按钮 -->
|
|
|
|
|
+ <el-button v-if="viewRow && viewRow.pay_status === 1" type="primary" size="small"
|
|
|
|
|
+ @click="handleRechargeFromView">充值</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 扣款按钮 -->
|
|
|
|
|
+ <el-button v-if="viewRow && viewRow.pay_status === 1" type="danger" size="small"
|
|
|
|
|
+ @click="handleDeductionFromView">扣款</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </Dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import Dialog from '@/components/Dialog/index.vue'
|
|
|
import { orderRefund, walletOrderDebiting, walletOrderTopUp } from '@/api/data'
|
|
import { orderRefund, walletOrderDebiting, walletOrderTopUp } from '@/api/data'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ Dialog
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
loading: false,
|
|
loading: false,
|
|
|
queryData: {},
|
|
queryData: {},
|
|
|
|
|
+ viewRow: null,
|
|
|
|
|
|
|
|
// 搜索表单配置
|
|
// 搜索表单配置
|
|
|
searchForm: [
|
|
searchForm: [
|
|
|
{ label: 'ID', type: 'input', prop: 'id', clearable: true },
|
|
{ label: 'ID', type: 'input', prop: 'id', clearable: true },
|
|
|
{ label: '订单号', prop: 'order_id', type: 'input' },
|
|
{ label: '订单号', prop: 'order_id', type: 'input' },
|
|
|
- // { label: '用户ID', prop: 'user_id', type: 'input' },
|
|
|
|
|
- {
|
|
|
|
|
- label: '会员昵称',
|
|
|
|
|
- type: 'input',
|
|
|
|
|
- prop: 'first_name',
|
|
|
|
|
- clearable: true
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ { label: '会员昵称', type: 'input', prop: 'first_name', clearable: true },
|
|
|
{ label: '会员ID', prop: 'member_id', type: 'input', clearable: true },
|
|
{ label: '会员ID', prop: 'member_id', type: 'input', clearable: true },
|
|
|
{ label: '赛事ID', prop: 'issue', type: 'input' },
|
|
{ label: '赛事ID', prop: 'issue', type: 'input' },
|
|
|
{
|
|
{
|
|
@@ -148,7 +180,7 @@ export default {
|
|
|
options: [
|
|
options: [
|
|
|
{ label: '已取消', value: -1 },
|
|
{ label: '已取消', value: -1 },
|
|
|
{ label: '下注中', value: 0 },
|
|
{ label: '下注中', value: 0 },
|
|
|
- { label: '下注成功', value: 1 } // 注:根据你下面的字段映射,这里1对应“已支付”或“已成功”
|
|
|
|
|
|
|
+ { label: '下注成功', value: 1 }
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -184,29 +216,21 @@ export default {
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- // API 接口配置
|
|
|
|
|
apis: {
|
|
apis: {
|
|
|
list: {
|
|
list: {
|
|
|
- url: 'order/list', // 请将此处替换为实际的接口地址
|
|
|
|
|
|
|
+ url: 'order/list',
|
|
|
dataParam: 'data.data',
|
|
dataParam: 'data.data',
|
|
|
resultParam: 'data',
|
|
resultParam: 'data',
|
|
|
init: false
|
|
init: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 表格整体配置
|
|
|
|
|
tableOptions: {
|
|
tableOptions: {
|
|
|
- add: {
|
|
|
|
|
- show: false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ add: { show: false }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 表格列配置
|
|
|
|
|
columns: [
|
|
columns: [
|
|
|
- {
|
|
|
|
|
- label: 'ID',
|
|
|
|
|
- prop: 'id',
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ { label: 'ID', prop: 'id' },
|
|
|
{
|
|
{
|
|
|
label: '订单号',
|
|
label: '订单号',
|
|
|
prop: 'order_id',
|
|
prop: 'order_id',
|
|
@@ -219,36 +243,15 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // { label: '用户ID', prop: 'user_id', width: 100 },
|
|
|
|
|
- {
|
|
|
|
|
- label: '会员ID',
|
|
|
|
|
- prop: 'member_id',
|
|
|
|
|
- width: 120
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '会员昵称',
|
|
|
|
|
- prop: 'first_name',
|
|
|
|
|
- width: 150
|
|
|
|
|
- },
|
|
|
|
|
- // {
|
|
|
|
|
- // label: '账户类型',
|
|
|
|
|
- // prop: 'is_faker',
|
|
|
|
|
- // width: 90,
|
|
|
|
|
- // html: true,
|
|
|
|
|
- // method: (row) => {
|
|
|
|
|
- // const isFaker = row.is_faker === 1
|
|
|
|
|
- // const color = isFaker ? '#F56C6C' : '#67C23A'
|
|
|
|
|
- // const text = isFaker ? '虚拟账户' : '真实账户'
|
|
|
|
|
- // return `<span style="color: ${color}">${text}</span>`
|
|
|
|
|
- // }
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ { label: '会员ID', prop: 'member_id', width: 120 },
|
|
|
|
|
+ { label: '会员昵称', prop: 'first_name', width: 150 },
|
|
|
{ label: '赛事ID', prop: 'issue', width: 120 },
|
|
{ label: '赛事ID', prop: 'issue', width: 120 },
|
|
|
{
|
|
{
|
|
|
label: '赛事信息',
|
|
label: '赛事信息',
|
|
|
prop: 'game_info',
|
|
prop: 'game_info',
|
|
|
width: 220,
|
|
width: 220,
|
|
|
slot: true,
|
|
slot: true,
|
|
|
- className: 'custom-game-col' // 给该列表格单元格增加自定义类名
|
|
|
|
|
|
|
+ className: 'custom-game-col'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: '滚球',
|
|
label: '滚球',
|
|
@@ -266,9 +269,9 @@ export default {
|
|
|
label: '玩法',
|
|
label: '玩法',
|
|
|
prop: 'odd_name',
|
|
prop: 'odd_name',
|
|
|
width: 180,
|
|
width: 180,
|
|
|
- slot: true // 开启插槽
|
|
|
|
|
|
|
+ slot: true
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
label: '订单状态',
|
|
label: '订单状态',
|
|
|
prop: 'status',
|
|
prop: 'status',
|
|
|
width: 90,
|
|
width: 90,
|
|
@@ -284,10 +287,8 @@ export default {
|
|
|
return match ? `<span style="color: ${match.color}">${match.text}</span>` : '--'
|
|
return match ? `<span style="color: ${match.color}">${match.text}</span>` : '--'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 这里移除了原来的 '赔率'(odd)、'赔率玩法'(odd_value)、'盘口'(handicp) 三列
|
|
|
|
|
{ label: '下注失败的原因', prop: 'failure' },
|
|
{ label: '下注失败的原因', prop: 'failure' },
|
|
|
{ label: '下注金额(RMB)', prop: 'amount', width: 100 },
|
|
{ label: '下注金额(RMB)', prop: 'amount', width: 100 },
|
|
|
- // { label: 'RMB汇率', prop: 'cny_rate', width: 100 },
|
|
|
|
|
{ label: '派奖金额(RMB)', prop: 'win_amount', width: 100 },
|
|
{ label: '派奖金额(RMB)', prop: 'win_amount', width: 100 },
|
|
|
{ label: '盈亏金额(RMB)', prop: 'profit_and_loss', width: 100 },
|
|
{ label: '盈亏金额(RMB)', prop: 'profit_and_loss', width: 100 },
|
|
|
{
|
|
{
|
|
@@ -305,7 +306,6 @@ export default {
|
|
|
return match ? `<span style="color: ${match.color}">${match.text}</span>` : '--'
|
|
return match ? `<span style="color: ${match.color}">${match.text}</span>` : '--'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
{
|
|
{
|
|
|
label: '结算状态',
|
|
label: '结算状态',
|
|
|
prop: 'settlement_status',
|
|
prop: 'settlement_status',
|
|
@@ -356,161 +356,224 @@ export default {
|
|
|
{ label: '创建时间', prop: 'create_time', width: 160 }
|
|
{ label: '创建时间', prop: 'create_time', width: 160 }
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- // 表格右侧操作列
|
|
|
|
|
rowsActions: [
|
|
rowsActions: [
|
|
|
|
|
+ {
|
|
|
|
|
+ key: 'view',
|
|
|
|
|
+ label: '查看',
|
|
|
|
|
+ method: (row) => {
|
|
|
|
|
+ this.viewRow = { ...row }
|
|
|
|
|
+ this.$refs.viewDialog.open()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
key: 'refund',
|
|
key: 'refund',
|
|
|
label: '退款',
|
|
label: '退款',
|
|
|
- // 判断是否禁用按钮
|
|
|
|
|
disabled: (row) => {
|
|
disabled: (row) => {
|
|
|
- // 条件: 1.支付状态已支付(1) 2.结算状态未结算(0) 3.订单状态已支付(1) 4.退款状态未退款(0)
|
|
|
|
|
const canRefund =
|
|
const canRefund =
|
|
|
row.pay_status === 1 &&
|
|
row.pay_status === 1 &&
|
|
|
row.settlement_status === 0 &&
|
|
row.settlement_status === 0 &&
|
|
|
row.status === 1 &&
|
|
row.status === 1 &&
|
|
|
row.return_status === 0
|
|
row.return_status === 0
|
|
|
-
|
|
|
|
|
- // disabled 为 true 时禁用按钮,所以这里取反
|
|
|
|
|
return !canRefund
|
|
return !canRefund
|
|
|
},
|
|
},
|
|
|
method: (row) => {
|
|
method: (row) => {
|
|
|
this.handleRefund(row)
|
|
this.handleRefund(row)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
{
|
|
{
|
|
|
key: 'topUp',
|
|
key: 'topUp',
|
|
|
label: '充值',
|
|
label: '充值',
|
|
|
- // 判断是否禁用按钮
|
|
|
|
|
- disabled: (row) => {
|
|
|
|
|
- // 条件: 1.支付状态已支付(1) 2.结算状态未结算(0) 3.订单状态已支付(1) 4.退款状态未退款(0)
|
|
|
|
|
- const canRefund =
|
|
|
|
|
- row.pay_status === 1
|
|
|
|
|
-
|
|
|
|
|
- // disabled 为 true 时禁用按钮,所以这里取反
|
|
|
|
|
- return !canRefund
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ disabled: (row) => !(row.pay_status === 1),
|
|
|
method: (row) => {
|
|
method: (row) => {
|
|
|
this.handleWalletOrderRecharging(row)
|
|
this.handleWalletOrderRecharging(row)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
{
|
|
{
|
|
|
key: 'deduction',
|
|
key: 'deduction',
|
|
|
label: '扣款',
|
|
label: '扣款',
|
|
|
- // 判断是否禁用按钮
|
|
|
|
|
- disabled: (row) => {
|
|
|
|
|
- // 条件: 1.支付状态已支付(1) 2.结算状态未结算(0) 3.订单状态已支付(1) 4.退款状态未退款(0)
|
|
|
|
|
- const canRefund =
|
|
|
|
|
- row.pay_status === 1
|
|
|
|
|
-
|
|
|
|
|
- // disabled 为 true 时禁用按钮,所以这里取反
|
|
|
|
|
- return !canRefund
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ disabled: (row) => !(row.pay_status === 1),
|
|
|
method: (row) => {
|
|
method: (row) => {
|
|
|
this.handleWalletOrderDebiting(row)
|
|
this.handleWalletOrderDebiting(row)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- // 扣款弹窗相关的状态
|
|
|
|
|
debitDialogVisible: false,
|
|
debitDialogVisible: false,
|
|
|
debitForm: {
|
|
debitForm: {
|
|
|
amount: undefined,
|
|
amount: undefined,
|
|
|
remark: '',
|
|
remark: '',
|
|
|
order_id: '',
|
|
order_id: '',
|
|
|
- order_type: 'sport' // 默认传 sport
|
|
|
|
|
|
|
+ order_type: 'sport'
|
|
|
},
|
|
},
|
|
|
debitRules: {
|
|
debitRules: {
|
|
|
- amount: [
|
|
|
|
|
- { required: true, message: '请输入扣款金额', trigger: 'blur' }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ amount: [{ required: true, message: '请输入扣款金额', trigger: 'blur' }]
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 充值弹窗相关的状态
|
|
|
|
|
rechargeDialogVisible: false,
|
|
rechargeDialogVisible: false,
|
|
|
rechargeForm: {
|
|
rechargeForm: {
|
|
|
amount: undefined,
|
|
amount: undefined,
|
|
|
remark: '',
|
|
remark: '',
|
|
|
order_id: '',
|
|
order_id: '',
|
|
|
- order_type: 'sport' // 默认传 sport
|
|
|
|
|
|
|
+ order_type: 'sport'
|
|
|
},
|
|
},
|
|
|
rechargeRules: {
|
|
rechargeRules: {
|
|
|
- amount: [
|
|
|
|
|
- { required: true, message: '请输入充值金额', trigger: 'blur' }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ amount: [{ required: true, message: '请输入充值金额', trigger: 'blur' }]
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ viewFields() {
|
|
|
|
|
+ if (!this.viewRow) return []
|
|
|
|
|
+ const row = this.viewRow
|
|
|
|
|
+
|
|
|
|
|
+ // 安全构建赛事信息 HTML
|
|
|
|
|
+ const detail = row.detail || {}
|
|
|
|
|
+ const fixtureStatus = detail.fixture_status || null
|
|
|
|
|
+ const fixtureLong = fixtureStatus ? fixtureStatus.long : '--'
|
|
|
|
|
+ const fixtureSeconds = fixtureStatus ? fixtureStatus.seconds : '--'
|
|
|
|
|
|
|
|
|
|
+ const gameInfoHtml = `
|
|
|
|
|
+ <div style="line-height: 1.6;">
|
|
|
|
|
+ <div style="font-weight: bold; color: #303133;">${row.home_team || '--'} vs ${row.guest_team || '--'}</div>
|
|
|
|
|
+ <div>比赛时间: ${detail.game_time || '--'}</div>
|
|
|
|
|
+ <div>赛况: ${fixtureLong} ${fixtureSeconds !== '--' ? `(${fixtureSeconds})` : ''}</div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ ${detail.half_score ? `半场: ${detail.half_score}` : ''}
|
|
|
|
|
+ ${detail.score && detail.half_score ? ' / ' : ''}
|
|
|
|
|
+ ${detail.score ? `全场: ${detail.score}` : ''}
|
|
|
|
|
+ ${!detail.half_score && !detail.score ? '--' : ''}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ `
|
|
|
|
|
+
|
|
|
|
|
+ const oddInfoHtml = `
|
|
|
|
|
+ <div style="line-height: 1.6;">
|
|
|
|
|
+ <div style="font-weight: bold; color: #303133;">${row.odd_name || '--'}</div>
|
|
|
|
|
+ <div>玩法: ${row.odd_value || '--'}</div>
|
|
|
|
|
+ <div>盘口: ${row.handicap || '--'}</div>
|
|
|
|
|
+ <div>赔率: ${row.odd || '--'}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ `
|
|
|
|
|
+
|
|
|
|
|
+ const statusMap = {
|
|
|
|
|
+ 0: { text: '下注中', color: '#909399' },
|
|
|
|
|
+ 1: { text: '下注成功', color: '#67C23A' },
|
|
|
|
|
+ 2: { text: '已退款', color: '#E6A23C' },
|
|
|
|
|
+ '-1': { text: '已取消', color: '#F56C6C' }
|
|
|
|
|
+ }
|
|
|
|
|
+ const statusMatch = statusMap[row.status] || { text: '--', color: '#909399' }
|
|
|
|
|
+
|
|
|
|
|
+ const winMap = {
|
|
|
|
|
+ 0: { text: '未中奖', color: '#909399' },
|
|
|
|
|
+ 1: { text: '已中奖', color: '#67C23A' },
|
|
|
|
|
+ 2: { text: '和局', color: '#E6A23C' }
|
|
|
|
|
+ }
|
|
|
|
|
+ const winMatch = winMap[row.is_win] || { text: '--', color: '#909399' }
|
|
|
|
|
+
|
|
|
|
|
+ const settlementMap = {
|
|
|
|
|
+ 0: { text: '未结算', color: '#909399' },
|
|
|
|
|
+ 1: { text: '已结算', color: '#67C23A' },
|
|
|
|
|
+ 2: { text: '已取消', color: '#F56C6C' }
|
|
|
|
|
+ }
|
|
|
|
|
+ const settlementMatch = settlementMap[row.settlement_status] || { text: '--', color: '#909399' }
|
|
|
|
|
+
|
|
|
|
|
+ const returnMap = {
|
|
|
|
|
+ 0: { text: '未退款', color: '#909399' },
|
|
|
|
|
+ 1: { text: '退款申请中', color: '#E6A23C' },
|
|
|
|
|
+ 2: { text: '退款已同意', color: '#67C23A' },
|
|
|
|
|
+ 3: { text: '退款已驳回', color: '#F56C6C' }
|
|
|
|
|
+ }
|
|
|
|
|
+ const returnMatch = returnMap[row.return_status] || { text: '--', color: '#909399' }
|
|
|
|
|
+
|
|
|
|
|
+ const payText = row.pay_status === 1 ? '已支付' : '待付款'
|
|
|
|
|
+
|
|
|
|
|
+ return [
|
|
|
|
|
+ { label: 'ID', prop: 'id', value: row.id },
|
|
|
|
|
+ { label: '订单号', prop: 'order_id', value: row.order_id || '--' },
|
|
|
|
|
+ { label: '会员ID', prop: 'member_id', value: row.member_id },
|
|
|
|
|
+ { label: '会员昵称', prop: 'first_name', value: row.first_name || '--' },
|
|
|
|
|
+ { label: '赛事ID', prop: 'issue', value: row.issue || '--' },
|
|
|
|
|
+ { label: '赛事信息', prop: 'game_info', value: gameInfoHtml, type: 'game_info' },
|
|
|
|
|
+ { label: '滚球', prop: 'is_roll', value: row.is_roll === 1 ? '滚球' : '非滚球', type: 'is_roll', rawValue: row.is_roll },
|
|
|
|
|
+ { label: '玩法', prop: 'odd_info', value: oddInfoHtml, type: 'odd_info' },
|
|
|
|
|
+ { label: '订单状态', prop: 'status', value: statusMatch.text, type: 'status', color: statusMatch.color },
|
|
|
|
|
+ { label: '下注失败的原因', prop: 'failure', value: row.failure || '--' },
|
|
|
|
|
+ { label: '下注金额(RMB)', prop: 'amount', value: row.amount != null ? row.amount : '--', type: 'amount' },
|
|
|
|
|
+ { label: '派奖金额(RMB)', prop: 'win_amount', value: row.win_amount != null ? row.win_amount : '--', type: 'amount' },
|
|
|
|
|
+ { label: '盈亏金额(RMB)', prop: 'profit_and_loss', value: row.profit_and_loss != null ? row.profit_and_loss : '--', type: 'amount' },
|
|
|
|
|
+ { label: '中奖状态', prop: 'is_win', value: winMatch.text, type: 'is_win', color: winMatch.color },
|
|
|
|
|
+ { label: '结算状态', prop: 'settlement_status', value: settlementMatch.text, type: 'settlement_status', color: settlementMatch.color },
|
|
|
|
|
+ { label: '支付状态', prop: 'pay_status', value: payText, type: 'pay_status', rawValue: row.pay_status },
|
|
|
|
|
+ { label: '支付时间', prop: 'pay_time', value: row.pay_time || '--' },
|
|
|
|
|
+ { label: '退款状态', prop: 'return_status', value: returnMatch.text, type: 'return_status', color: returnMatch.color },
|
|
|
|
|
+ { label: '备注', prop: 'remark', value: row.remark || '--' },
|
|
|
|
|
+ { label: '退款申请时间', prop: 'return_apply_time', value: row.return_apply_time || '--' },
|
|
|
|
|
+ { label: '退款处理时间', prop: 'return_operation_time', value: row.return_operation_time || '--' },
|
|
|
|
|
+ { label: '创建时间', prop: 'create_time', value: row.create_time || '--' },
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.onSubmit()
|
|
this.onSubmit()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- onValueChange(val) {
|
|
|
|
|
- // 可以在此处处理额外的数据联动逻辑
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ onValueChange(val) { },
|
|
|
onSubmit(params = {}) {
|
|
onSubmit(params = {}) {
|
|
|
this.queryData = params
|
|
this.queryData = params
|
|
|
this.$refs.table.getList(params)
|
|
this.$refs.table.getList(params)
|
|
|
},
|
|
},
|
|
|
- // 处理退款逻辑
|
|
|
|
|
- handleRefund(row) {
|
|
|
|
|
- this.$confirm(`确定要对订单号 ${row.order_id} 进行退款操作吗?`, '退款确认', {
|
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- }).then(async() => {
|
|
|
|
|
- try {
|
|
|
|
|
- this.loading = true
|
|
|
|
|
- // 调用接口,传入参数 id
|
|
|
|
|
- const res = await orderRefund({ id: [row.id] })
|
|
|
|
|
|
|
|
|
|
- // 这里的判断条件 (res.code === 200) 请根据你实际的后端返回格式进行调整
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- this.$message.success('退款成功')
|
|
|
|
|
- // 刷新当前表格数据
|
|
|
|
|
- this.onSubmit(this.queryData)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error(res.msg || '退款失败')
|
|
|
|
|
|
|
+ // ---------- 退款(返回 Promise,便于弹窗关闭) ----------
|
|
|
|
|
+ handleRefund(row) {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ this.$confirm(`确定要对订单号 ${row.order_id} 进行退款操作吗?`, '退款确认', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ const res = await orderRefund({ id: [row.id] })
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ this.$message.success('退款成功')
|
|
|
|
|
+ this.onSubmit(this.queryData)
|
|
|
|
|
+ resolve()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(res.msg || '退款失败')
|
|
|
|
|
+ reject()
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error(error)
|
|
|
|
|
+ this.$message.error('退款请求异常')
|
|
|
|
|
+ reject()
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ this.loading = false
|
|
|
}
|
|
}
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(error)
|
|
|
|
|
- this.$message.error('退款请求异常')
|
|
|
|
|
- } finally {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- // 取消弹窗
|
|
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ reject() // 用户取消
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // 1. 点击列表中的【扣款】按钮触发,用于打开弹窗
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // ---------- 扣款(打开弹窗,不返回 Promise) ----------
|
|
|
handleWalletOrderDebiting(row) {
|
|
handleWalletOrderDebiting(row) {
|
|
|
- // 初始化表单数据
|
|
|
|
|
this.debitForm = {
|
|
this.debitForm = {
|
|
|
amount: undefined,
|
|
amount: undefined,
|
|
|
remark: '',
|
|
remark: '',
|
|
|
- // 注意:根据你的后端需求,这里取 row.id 还是 row.order_id
|
|
|
|
|
order_id: row.id,
|
|
order_id: row.id,
|
|
|
order_type: 'sport'
|
|
order_type: 'sport'
|
|
|
}
|
|
}
|
|
|
this.debitDialogVisible = true
|
|
this.debitDialogVisible = true
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 2. 弹窗内的【确定】按钮触发,用于提交接口
|
|
|
|
|
submitDebitOrder() {
|
|
submitDebitOrder() {
|
|
|
- this.$refs.debitForm.validate(async(valid) => {
|
|
|
|
|
|
|
+ this.$refs.debitForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
try {
|
|
try {
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
- // 提交接口,传入拼装好的表单数据
|
|
|
|
|
const res = await walletOrderDebiting(this.debitForm)
|
|
const res = await walletOrderDebiting(this.debitForm)
|
|
|
-
|
|
|
|
|
if (res.code === 0 || res.success) {
|
|
if (res.code === 0 || res.success) {
|
|
|
this.$message.success('扣款成功')
|
|
this.$message.success('扣款成功')
|
|
|
- this.debitDialogVisible = false // 关闭弹窗
|
|
|
|
|
- // 刷新当前表格数据
|
|
|
|
|
|
|
+ this.debitDialogVisible = false
|
|
|
this.onSubmit(this.queryData)
|
|
this.onSubmit(this.queryData)
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error(res.msg || '扣款失败')
|
|
this.$message.error(res.msg || '扣款失败')
|
|
@@ -521,46 +584,32 @@ export default {
|
|
|
} finally {
|
|
} finally {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- return false
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 3. 弹窗关闭时重置表单校验状态
|
|
|
|
|
resetDebitForm() {
|
|
resetDebitForm() {
|
|
|
- if (this.$refs.debitForm) {
|
|
|
|
|
- this.$refs.debitForm.resetFields()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (this.$refs.debitForm) this.$refs.debitForm.resetFields()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- // 1. 点击列表中的【充值】按钮触发,用于打开弹窗
|
|
|
|
|
|
|
+ // ---------- 充值(打开弹窗) ----------
|
|
|
handleWalletOrderRecharging(row) {
|
|
handleWalletOrderRecharging(row) {
|
|
|
- // 初始化表单数据
|
|
|
|
|
this.rechargeForm = {
|
|
this.rechargeForm = {
|
|
|
amount: undefined,
|
|
amount: undefined,
|
|
|
remark: '',
|
|
remark: '',
|
|
|
- // 注意确认这里是取 row.id 还是 row.order_id
|
|
|
|
|
order_id: row.id,
|
|
order_id: row.id,
|
|
|
order_type: 'sport'
|
|
order_type: 'sport'
|
|
|
}
|
|
}
|
|
|
this.rechargeDialogVisible = true
|
|
this.rechargeDialogVisible = true
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 2. 弹窗内的【确定】按钮触发,用于提交充值接口
|
|
|
|
|
submitRechargeOrder() {
|
|
submitRechargeOrder() {
|
|
|
this.$refs.rechargeForm.validate(async (valid) => {
|
|
this.$refs.rechargeForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
try {
|
|
try {
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
- // 提交接口,注意这里替换为你真实的充值接口方法名
|
|
|
|
|
const res = await walletOrderTopUp(this.rechargeForm)
|
|
const res = await walletOrderTopUp(this.rechargeForm)
|
|
|
-
|
|
|
|
|
if (res.code === 0 || res.success) {
|
|
if (res.code === 0 || res.success) {
|
|
|
this.$message.success('充值成功')
|
|
this.$message.success('充值成功')
|
|
|
- this.rechargeDialogVisible = false // 关闭弹窗
|
|
|
|
|
- // 刷新当前表格数据
|
|
|
|
|
|
|
+ this.rechargeDialogVisible = false
|
|
|
this.onSubmit(this.queryData)
|
|
this.onSubmit(this.queryData)
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error(res.msg || '充值失败')
|
|
this.$message.error(res.msg || '充值失败')
|
|
@@ -571,27 +620,41 @@ export default {
|
|
|
} finally {
|
|
} finally {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- return false
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 3. 弹窗关闭时重置表单校验状态
|
|
|
|
|
resetRechargeForm() {
|
|
resetRechargeForm() {
|
|
|
- if (this.$refs.rechargeForm) {
|
|
|
|
|
- this.$refs.rechargeForm.resetFields()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (this.$refs.rechargeForm) this.$refs.rechargeForm.resetFields()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // ---------- 查看弹窗内操作包装 ----------
|
|
|
|
|
+ handleRefundFromView() {
|
|
|
|
|
+ // 退款操作:执行退款,成功后不关闭查看弹窗(仅刷新列表)
|
|
|
|
|
+ this.handleRefund(this.viewRow)
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ // 退款成功,列表已刷新,查看弹窗保持打开
|
|
|
|
|
+ // 若希望更新显示的数据,可在此重新获取该行数据(可选)
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ // 用户取消或失败,不做任何事
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ handleRechargeFromView() {
|
|
|
|
|
+ // 充值:直接打开充值弹窗,不关闭查看弹窗
|
|
|
|
|
+ this.handleWalletOrderRecharging(this.viewRow)
|
|
|
|
|
+ },
|
|
|
|
|
+ handleDeductionFromView() {
|
|
|
|
|
+ // 扣款:直接打开扣款弹窗,不关闭查看弹窗
|
|
|
|
|
+ this.handleWalletOrderDebiting(this.viewRow)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-/* 强制覆盖 element-ui 表格单元格默认的截断样式 */
|
|
|
|
|
::v-deep .custom-game-col .cell {
|
|
::v-deep .custom-game-col .cell {
|
|
|
white-space: normal !important;
|
|
white-space: normal !important;
|
|
|
overflow: visible !important;
|
|
overflow: visible !important;
|
|
|
text-overflow: clip !important;
|
|
text-overflow: clip !important;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|