|
|
|
@ -158,7 +158,7 @@ const get = async function (val) { |
|
|
|
}); |
|
|
|
total.value = result.data.size; |
|
|
|
} else { |
|
|
|
ElMessage.error(result.msg || '获取数据失败'); |
|
|
|
ElMessage.error(result.msg || t('elmessage.getDataFailed')); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
@ -194,15 +194,15 @@ const cellClick = function (row, column) { |
|
|
|
console.log('cellClick', column) |
|
|
|
const walletId = propToWalletId[column.property]; |
|
|
|
const propToMarketName = { |
|
|
|
hkGold: '香港', |
|
|
|
sgHcGold: '新加坡HC', |
|
|
|
myGold: '马来西亚', |
|
|
|
sgGold: '新加坡', |
|
|
|
caGold: '加拿大', |
|
|
|
thHsGold: '泰国HS', |
|
|
|
thHaGold: '泰国HA', |
|
|
|
vnGold: '越南', |
|
|
|
bjGold: '北京' |
|
|
|
hkGold: t('clientCount.market.hkGold'), |
|
|
|
sgHcGold: t('clientCount.market.sgHcGold'), |
|
|
|
myGold: t('clientCount.market.myGold'), |
|
|
|
sgGold: t('clientCount.market.sgGold'), |
|
|
|
caGold: t('clientCount.market.caGold'), |
|
|
|
thHsGold: t('clientCount.market.thHsGold'), |
|
|
|
thHaGold: t('clientCount.market.thHaGold'), |
|
|
|
vnGold: t('clientCount.market.vnGold'), |
|
|
|
bjGold: t('clientCount.market.bjGold') |
|
|
|
} |
|
|
|
const marketName = propToMarketName[column.property] |
|
|
|
|
|
|
|
@ -211,7 +211,7 @@ const cellClick = function (row, column) { |
|
|
|
userName: row.name, |
|
|
|
jwcode: row.jwcode, |
|
|
|
marketName: row.market, // 用户所属地区 |
|
|
|
walletName: marketName + '钱包', // 钱包名称 |
|
|
|
walletName: marketName + t('clientCount.wallet'), // 钱包名称 |
|
|
|
currentBalance: row[column.property] || 0, |
|
|
|
walletId: walletId |
|
|
|
} |
|
|
|
@ -253,7 +253,7 @@ const getWalletDetail = async () => { |
|
|
|
if (result.code === 200) { |
|
|
|
walletDetailList.value = result.data.list.map(item => ({ |
|
|
|
time: item.createTime, |
|
|
|
type: item.type === 0 ? '充值' : '消耗', |
|
|
|
type: item.type === 0 ? t('common.recharge') : t('common.consume'), |
|
|
|
amount: item.type === 1 ? -Math.abs(item.amount) : Math.abs(item.amount), |
|
|
|
desc: item.description, |
|
|
|
orderNo: item.orderCode, |
|
|
|
@ -261,7 +261,7 @@ const getWalletDetail = async () => { |
|
|
|
})) |
|
|
|
walletDetailTotal.value = result.data.total |
|
|
|
} else { |
|
|
|
ElMessage.error(result.msg || '获取明细失败') |
|
|
|
ElMessage.error(result.msg || t('elmessage.getDetailFailed')) |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error(error) |
|
|
|
@ -328,7 +328,7 @@ const exportExcel = async function () { |
|
|
|
ElMessage.success(t('elmessage.exportSuccess')) |
|
|
|
// 不需要立即打开导出列表 |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg || '导出失败') |
|
|
|
ElMessage.error(res.msg || t('elmessage.exportFailed')) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -351,11 +351,11 @@ const exportWalletDetail = async () => { |
|
|
|
if (res.code === 200) { |
|
|
|
ElMessage.success(t('elmessage.exportSuccess')) |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg || '导出失败') |
|
|
|
ElMessage.error(res.msg || t('elmessage.exportFailed')) |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error('导出钱包明细出错:', error) |
|
|
|
ElMessage.error('导出钱包明细出错') |
|
|
|
ElMessage.error(t('elmessage.exportWalletDetailError')) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -364,7 +364,7 @@ const selectWallet = async function () { |
|
|
|
} |
|
|
|
const exportExcelOnlyOne = async function () { |
|
|
|
if (!selectWalletForm.value.companyWalletId) { |
|
|
|
ElMessage.error('请选择公司钱包') |
|
|
|
ElMessage.error(t('elmessage.selectCompanyWallet')) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -388,11 +388,11 @@ const exportExcelOnlyOne = async function () { |
|
|
|
ElMessage.success(t('elmessage.exportSuccess')) |
|
|
|
openExportList() // 导出成功后打开导出列表 |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg || '导出失败') |
|
|
|
ElMessage.error(res.msg || t('elmessage.exportFailed')) |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error('导出失败:', error) |
|
|
|
ElMessage.error('导出失败') |
|
|
|
ElMessage.error(t('elmessage.exportFailed')) |
|
|
|
} finally { |
|
|
|
selectWalletVisible.value = false |
|
|
|
} |
|
|
|
@ -404,7 +404,7 @@ const selectWalletVisible = ref(false) |
|
|
|
const selectWalletFormRef = ref(null) |
|
|
|
const selectWalletRules = { |
|
|
|
companyWalletId: [ |
|
|
|
{ required: true, message: '请选择公司钱包', trigger: 'change' } |
|
|
|
{ required: true, message: t('common_list.companyWalletPlaceholder'), trigger: 'change' } |
|
|
|
] |
|
|
|
} |
|
|
|
// 关闭选择公司钱包弹窗 |
|
|
|
@ -419,39 +419,39 @@ const selectWalletForm = ref({}) |
|
|
|
const companyWalletList = ref([ |
|
|
|
{ |
|
|
|
id: 1, |
|
|
|
name: '香港钱包' |
|
|
|
name: t('clientCount.market.hkGold') + t('clientCount.wallet') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 2, |
|
|
|
name: '新加坡HC' |
|
|
|
name: t('clientCount.market.sgHcGold') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 3, |
|
|
|
name: '马来西亚' |
|
|
|
name: t('clientCount.market.myGold') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 4, |
|
|
|
name: '新加坡CM' |
|
|
|
name: t('clientCount.market.sgCmGold') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 5, |
|
|
|
name: '加拿大' |
|
|
|
name: t('clientCount.market.caGold') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 6, |
|
|
|
name: '泰国HS' |
|
|
|
name: t('clientCount.market.thHsGold') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 7, |
|
|
|
name: '泰国HA' |
|
|
|
name: t('clientCount.market.thHaGold') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 8, |
|
|
|
name: '越南' |
|
|
|
name: t('clientCount.market.vnGold') |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 9, |
|
|
|
name: '北京' |
|
|
|
name: t('clientCount.market.bjGold') |
|
|
|
} |
|
|
|
]) |
|
|
|
// 打开导出列表弹窗 |
|
|
|
@ -600,7 +600,7 @@ const format3 = (num) => { |
|
|
|
<el-button type="primary" @click="search()">{{ $t('common.search') }}</el-button> |
|
|
|
<el-button @click="reset" type="success">{{ $t('common.reset') }}</el-button> |
|
|
|
<el-button type="primary" @click="exportExcel()">{{ $t('common.exportExcel') }}</el-button> |
|
|
|
<el-button type="primary" @click="selectWallet()">导出公司钱包明细</el-button> |
|
|
|
<el-button type="primary" @click="selectWallet()">{{ $t('common.exportCompanyWalletDetail') }}</el-button> |
|
|
|
<el-button type="primary" @click="openExportList">{{ $t('common.viewExportList') }}</el-button> |
|
|
|
</div> |
|
|
|
<!-- </div> --> |
|
|
|
@ -618,49 +618,49 @@ const format3 = (num) => { |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" :label="$t('common_list.name')" width="140" /> |
|
|
|
<el-table-column prop="jwcode" :label="$t('common_list.jwcode')" width="160" /> |
|
|
|
<el-table-column prop="jwcode" :label="$t('common_list.jwcode')" width="140" /> |
|
|
|
<el-table-column prop="market" :label="$t('common_list.market')" width="140" /> |
|
|
|
<el-table-column prop="hkGold" label="香港" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="hkGold" :label="$t('clientCount.market.hkGold')" sortable="custom" min-width="140"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.hkGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="sgHcGold" label="新加坡HC" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="sgHcGold" :label="$t('clientCount.market.sgHcGold')" sortable="custom" min-width="150"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.sgHcGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="myGold" label="马来西亚" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="myGold" :label="$t('clientCount.market.myGold')" sortable="custom" min-width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.myGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="sgGold" label="新加坡" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="sgGold" :label="$t('clientCount.market.sgGold')" sortable="custom" min-width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.sgGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="caGold" label="加拿大" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="caGold" :label="$t('clientCount.market.caGold')" sortable="custom" min-width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.caGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="thHsGold" label="泰国HS" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="thHsGold" :label="$t('clientCount.market.thHsGold')" sortable="custom" min-width="140"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.thHsGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="thHaGold" label="泰国HA" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="thHaGold" :label="$t('clientCount.market.thHaGold')" sortable="custom" min-width="140"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.thHaGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="vnGold" label="越南" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="vnGold" :label="$t('clientCount.market.vnGold')" sortable="custom" min-width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.vnGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="bjGold" label="北京" sortable="custom" min-width="120"> |
|
|
|
<el-table-column prop="bjGold" :label="$t('clientCount.market.bjGold')" sortable="custom" min-width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ (scope.row.bjGold || 0) }}</span> |
|
|
|
</template> |
|
|
|
@ -707,15 +707,15 @@ const format3 = (num) => { |
|
|
|
|
|
|
|
<el-dialog v-model="selectWalletVisible" width="30%" top="20%" :before-close="closeSelectWallet"> |
|
|
|
<el-form :model="selectWalletForm" :rules="selectWalletRules" ref="selectWalletFormRef" label-width="120px"> |
|
|
|
<el-form-item label="公司钱包" prop="companyWalletId" style="margin-top: 30px;"> |
|
|
|
<el-select v-model="selectWalletForm.companyWalletId" placeholder="请选择公司钱包" style="width: 80%;"> |
|
|
|
<el-form-item :label="$t('common_list.companyWallet')" prop="companyWalletId" style="margin-top: 30px;"> |
|
|
|
<el-select v-model="selectWalletForm.companyWalletId" :placeholder="$t('common_list.companyWalletPlaceholder')" style="width: 80%;"> |
|
|
|
<el-option v-for="item in companyWalletList" :key="item.id" :label="item.name" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<template #footer> |
|
|
|
<div style="display: flex; justify-content: flex-end;"> |
|
|
|
<el-button type="primary" @click="exportExcelOnlyOne()">确定</el-button> |
|
|
|
<el-button type="primary" @click="exportExcelOnlyOne()">{{ $t('common.confirm') }}</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
@ -724,32 +724,32 @@ const format3 = (num) => { |
|
|
|
<template #header> |
|
|
|
<div class="wallet-detail-header" style="display: flex; gap: 40px; justify-content: space-between; align-items: center; font-size: 16px;"> |
|
|
|
<span style="font-weight: bold; color: #F56C6C;">* {{ currentWalletInfo.walletName }}</span> |
|
|
|
<span><span style="color: #F56C6C;">*</span> 用户: {{ currentWalletInfo.userName }} (ID: {{ currentWalletInfo.jwcode }})</span> |
|
|
|
<span><span style="color: #F56C6C;">*</span> 地区: {{ currentWalletInfo.marketName }}</span> |
|
|
|
<span><span style="color: #F56C6C;">*</span> {{ $t('clientCount.user') }}: {{ currentWalletInfo.userName }} (ID: {{ currentWalletInfo.jwcode }})</span> |
|
|
|
<span><span style="color: #F56C6C;">*</span> {{ $t('common.market') }}: {{ currentWalletInfo.marketName }}</span> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 15px; font-size: 16px;"> |
|
|
|
<span style="color: #F56C6C; font-weight: bold;">* 当前余额: {{ format3(currentWalletInfo.currentBalance || 0) }} 金币</span> |
|
|
|
<span style="color: #F56C6C; font-weight: bold;">* {{ $t('clientCount.currentBalance') }}: {{ format3(currentWalletInfo.currentBalance || 0) }} {{ $t('common.goldCoin') }}</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<el-table :data="walletDetailList" v-loading="walletDetailLoading" style="width: 100%; height: 50vh; overflow-y: auto;" border stripe> |
|
|
|
<el-table-column prop="time" label="时间" align="center" width="180"> |
|
|
|
<el-table-column prop="time" :label="$t('clientCount.time')" align="center" width="180"> |
|
|
|
<template #default="scope">{{ scope.row.time }}</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="type" label="交易类型" align="center" width="120" /> |
|
|
|
<el-table-column prop="amount" label="金额" align="center" width="120"> |
|
|
|
<el-table-column prop="type" :label="$t('clientCount.transactionType')" align="center" width="120" /> |
|
|
|
<el-table-column prop="amount" :label="$t('common_list.money')" align="center" width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<span :style="{ color: scope.row.amount >= 0 ? '#67C23A' : '#F56C6C', fontWeight: 'bold' }"> |
|
|
|
{{ scope.row.amount > 0 ? '+' + format3(scope.row.amount) : format3(scope.row.amount) }} |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="desc" label="交易说明" align="center" /> |
|
|
|
<el-table-column prop="orderNo" label="交易单号" align="center" width="220" /> |
|
|
|
<el-table-column prop="status" label="交易状态" align="center" width="220" fixed="right"> |
|
|
|
<el-table-column prop="desc" :label="$t('clientCount.transactionDesc')" align="center" /> |
|
|
|
<el-table-column prop="orderNo" :label="$t('clientCount.transactionOrderNo')" align="center" width="220" /> |
|
|
|
<el-table-column prop="status" :label="$t('clientCount.transactionStatus')" align="center" width="220" fixed="right"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-tag :type="scope.row.status === 1 ? 'success' : scope.row.status === 2 ? 'danger' : 'info'" :effect="scope.row.status === 1 ? 'light' : 'plain'"> |
|
|
|
{{ scope.row.status === 1 ? '正常' : scope.row.status === 2 ? '已退款' : '异常数据' }} |
|
|
|
{{ scope.row.status === 1 ? $t('common.normal') : scope.row.status === 2 ? $t('common_list.refunded') : $t('clientCount.exceptionData') }} |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|