Browse Source

加了界面

jiangcheng/feature-20260402142510-现金四期
ZhangYong 2 weeks ago
parent
commit
caae87cfd3
  1. 1
      src/assets/SvgIcons/wallet_management.svg
  2. 86
      src/router/index.js
  3. 1
      src/views/home.vue
  4. 906
      src/views/walletManage/WalletBalance.vue
  5. 36
      src/views/walletManage/components/WalletDetailTemplate.vue
  6. 10
      src/views/walletManage/walletDetail/BJWallet.vue
  7. 10
      src/views/walletManage/walletDetail/CAWallet.vue
  8. 11
      src/views/walletManage/walletDetail/HKWallet.vue
  9. 10
      src/views/walletManage/walletDetail/MyWallet.vue
  10. 10
      src/views/walletManage/walletDetail/SGWalletCM.vue
  11. 10
      src/views/walletManage/walletDetail/SGWalletHC.vue
  12. 10
      src/views/walletManage/walletDetail/THWalletHA.vue
  13. 10
      src/views/walletManage/walletDetail/THWalletHS.vue
  14. 10
      src/views/walletManage/walletDetail/VNWallet.vue

1
src/assets/SvgIcons/wallet_management.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775116665367" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5512" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#E84F4F" p-id="5513"></path><path d="M486.810394 1023.36001L228.926423 766.848018 800.467493 295.085389 1023.912001 517.191919c-2.805956 280.355619-230.904392 506.778082-511.928001 506.778081-8.445868 0-16.837737-0.215997-25.181606-0.61799l0.008 0.008z" fill="#D14747" p-id="5514"></path><path d="M268.16181 270.889767h485.350416c31.909501 0 57.781097 25.867596 57.781098 57.781098V656.089749c0 31.909501-25.867596 57.781097-57.781098 57.781097H268.16181c-31.909501 0-57.781097-25.867596-57.781097-57.781097V328.668865c0.002-31.911501 25.871596-57.779097 57.781097-57.779098z" fill="#F5C013" p-id="5515"></path><path d="M271.98975 288.785488L740.256433 246.196153l34.151467 438.42315-490.730332 40.343369-11.693818-436.181184 0.006 0.004z" fill="#E6E6E6" p-id="5516"></path><path d="M272.363744 293.871408l486.4004-12.261808 16.02575 408.105623-490.730332 40.33737-11.695818-436.181185z" fill="#FFFFFF" p-id="5517"></path><path d="M210.382713 328.662865h564.321182c20.125686 0 36.589428 16.463743 36.589429 36.589428V735.048515c0 20.125686-16.463743 36.589428-36.589429 36.589428h-527.731754c-20.125686 0-36.589428-16.463743-36.589428-36.589428V328.662865z" fill="#FFD630" p-id="5518"></path><path d="M801.625475 340.544679c5.991906 6.523898 9.667849 15.211762 9.667849 24.713614v369.796222c0 20.131685-16.463743 36.589428-36.589429 36.589428H246.980141c-10.277839 0-19.599694-4.293933-26.26759-11.177825l580.920923-419.923439h-0.007999v0.002z" fill="#FFC919" p-id="5519"></path><path d="M210.382713 735.048515V365.258293h546.495461c11.097827 0 20.183685 9.077858 20.183684 20.183684v329.430853c0 11.097827-9.077858 20.183685-20.183684 20.183685H210.382713v-0.008z" fill="#F5BE18" p-id="5520"></path><path d="M210.382713 719.174763V381.132045h531.463696c11.729817 0 21.325667 8.30187 21.325666 18.449712v301.141294c0 10.149841-9.59585 18.443712-21.325666 18.443712H210.382713v0.008z" fill="#FFD630" p-id="5521"></path><path d="M700.127061 474.530585h110.516273c10.011844 0 18.197716 8.243871 18.197715 18.197716v65.684974c0 9.947845-8.243871 18.197716-18.197715 18.197715h-110.516273c-28.017562 0-51.033203-22.967641-51.033203-51.033202v-0.008c0-28.067561 22.959641-51.033203 51.033203-51.033203v-0.006z" fill="#FFF490" p-id="5522"></path><path d="M704.214997 526.305776m-31.115514 0a31.115514 31.115514 0 1 0 62.231027 0 31.115514 31.115514 0 1 0-62.231027 0Z" fill="#F5BE18" p-id="5523"></path><path d="M704.214997 526.305776m-25.433603 0a25.433603 25.433603 0 1 0 50.867205 0 25.433603 25.433603 0 1 0-50.867205 0Z" fill="#E6E6E6" p-id="5524"></path></svg>

86
src/router/index.js

@ -413,6 +413,92 @@ const routes = [
} }
] ]
}, },
// 钱包管理
{
path: 'walletManage',
name: 'walletManage',
meta: {permissionId: 150},
children: [
// 钱包余额
{
path: 'walletBalance',
name: "walletBalance",
component: () => import("../views/walletManage/WalletBalance.vue"),
meta: {permissionId: 151}
},
// 钱包明细
{
path: 'walletDetail',
name: "walletDetail",
meta: {permissionId: 152},
children: [
// 香港钱包
{
path: 'hkWallet',
name: "hkWallet",
component: () => import("../views/walletManage/walletDetail/HKWallet.vue"),
meta: {permissionId: 153}
},
//新加坡HC钱包
{
path: 'sgWalletHC',
name: "sgWalletHC",
component: () => import("../views/walletManage/walletDetail/SGWalletHC.vue"),
meta: {permissionId: 154}
},
//马来钱包
{
path: 'myWallet',
name: "myWallet",
component: () => import("../views/walletManage/walletDetail/MyWallet.vue"),
meta: {permissionId: 155}
},
// 新加坡CM钱包
{
path: 'sgWalletCM',
name: "sgWalletCM",
component: () => import("../views/walletManage/walletDetail/SGWalletCM.vue"),
meta: {permissionId: 156}
},
// 加拿大钱包
{
path: 'caWallet',
name: "caWallet",
component: () => import("../views/walletManage/walletDetail/CAWallet.vue"),
meta: {permissionId: 157}
},
//泰国HS钱包
{
path: 'thWalletHS',
name: "thWalletHS",
component: () => import("../views/walletManage/walletDetail/THWalletHS.vue"),
meta: {permissionId: 158}
},
//泰国HA钱包
{
path: 'thWalletHA',
name: "thWalletHA",
component: () => import("../views/walletManage/walletDetail/THWalletHA.vue"),
meta: {permissionId: 159}
},
//越南钱包
{
path: 'vnWallet',
name: "vnWallet",
component: () => import("../views/walletManage/walletDetail/VNWallet.vue"),
meta: {permissionId: 160}
},
//北京钱包
{
path: 'bjWallet',
name: "bjWallet",
component: () => import("../views/walletManage/walletDetail/BJWallet.vue"),
meta: {permissionId: 161}
},
]
},
]
},
// 频道管理 // 频道管理
{ {
path: 'channelManage', path: 'channelManage',

1
src/views/home.vue

@ -33,6 +33,7 @@ const menuNameMap = {
'124': 'channel-management', // '124': 'channel-management', //
'128': 'permission-management', // '128': 'permission-management', //
'146': 'mutiple-language', // '146': 'mutiple-language', //
'150': 'wallet_management', //
} }
const getIconPath = (menuNameId) => { const getIconPath = (menuNameId) => {

906
src/views/walletManage/WalletBalance.vue

@ -0,0 +1,906 @@
<script setup>
//
import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia"
import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js"
const adminStore = useAdminStore()
const { adminData, menuTree, flag } = storeToRefs(adminStore)
// flag()
watch(flag, (newFlag, oldFlag) => {
// flag
if (newFlag !== oldFlag) {
console.log('员工数据flag状态改变,重新加载数据', newFlag)
get()
}
})
import { onMounted, ref, watch, nextTick } from 'vue'
import { ElMessage } from 'element-plus'
import moment from 'moment'
import API from '@/util/http.js'
import { reverseMarketMapping } from "@/utils/marketMap.js";
//
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
//
const dialogVisible = ref(false)
//
const markets = ref([])
//
// tableData
const tableData = ref([]);
const walletMap = {
1: 'historyGold',
2: 'hkGold',
3: 'sgHcGold',
4: 'myGold',
5: 'sgGold',
6: 'caGold',
7: 'thHsGold',
8: 'thHaGold',
9: 'vnGold',
10: 'bjGold'
};
const propToWalletId = {
historyGold: 1,
hkGold: 2,
sgHcGold: 3,
myGold: 4,
sgGold: 5,
caGold: 6,
thHsGold: 7,
thHaGold: 8,
vnGold: 9,
bjGold: 10
};
const tableRef = ref(null)
const scrollTableTop = () => {
tableRef.value?.setScrollTop?.(0)
}
//
const userInfo = ref({})
// ===========================================
//
const total = ref(100)
//
const getTime = ref([])
// User
const selectData = ref({
jwcode: '',
markets: [],
})
//
const getAllObj = ref({})
//
const getObj = ref({
pageNum: 1,
pageSize: 50
})
//
const sortField = ref('')
const sortOrder = ref('')
const sortWalletId = ref('')
//
// ===========================================================================
//
const get = async function (val) {
try {
//
if (typeof val === 'number') {
getObj.value.pageNum = val
}
if (selectData.value.jwcode) {
//
const numberRegex = /^\d{1,9}$/;
//
if (!numberRegex.test(selectData.value.jwcode)) {
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return
}
}
console.log('搜索参数', getObj.value, selectData.value)
//
const params = {
pageNum: getObj.value.pageNum,
pageSize: getObj.value.pageSize
}
//
if (selectData.value.jwcode) {
params.jwcode = Number(selectData.value.jwcode)
}
if (selectData.value.markets && selectData.value.markets.length > 0) {
//
params.market = String(selectData.value.markets[0])
}
if (sortField.value) {
params.sortField = sortField.value
}
if (sortOrder.value) {
params.sortOrder = sortOrder.value
}
if (sortWalletId.value !== '') {
params.sortWalletId = sortWalletId.value
}
console.log('最终请求参数', params)
const result = await API({
url: '/cashCollection/selectUserWallets',
method: 'post',
data: params
})
console.log('响应数据', result)
if (result.code === 200) {
tableData.value = result.data.list.map(item => {
const row = {
historyGold: 0,
name: item.userName,
jwcode: item.jwcode,
market: item.marketName,
hkGold: 0,
sgHcGold: 0,
myGold: 0,
sgGold: 0,
caGold: 0,
thHsGold: 0,
thHaGold: 0,
vnGold: 0,
bjGold: 0
};
if (item.walletList && Array.isArray(item.walletList)) {
item.walletList.forEach(wallet => {
const prop = walletMap[wallet.walletId];
if (prop) {
row[prop] = wallet.currentPermanentGold;
}
});
}
return row;
});
total.value = result.data.total;
} else {
ElMessage.error(result.msg || t('elmessage.getDataFailed'));
}
} catch (error) {
console.log('请求失败', error)
}
}
// selectData putExcel jwcode
const trimJwCode = () => {
if (selectData.value.jwcode) {
selectData.value.jwcode = selectData.value.jwcode.replace(/\s/g, '');
}
}
//
const search = function () {
trimJwCode();
getObj.value.pageNum = 1
get()
}
//
const reset = function () {
selectData.value = {
jwcode: '',
markets: [],
}
sortField.value = ''
sortOrder.value = ''
sortWalletId.value = ''
selectedMarketPath.value = []
//
getObj.value.pageNum = 1
get()
}
const cellClick = function (row, column) {
console.log('cellClick', column)
const walletId = propToWalletId[column.property];
const propToMarketName = {
historyGold: t('clientCount.market.historyGold'),
hkGold: t('clientCount.market.hkGold'),
sgHcGold: t('clientCount.market.sgHcGold'),
myGold: t('clientCount.market.myGold'),
sgGold: t('clientCount.market.sgCmGold'),
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]
if (marketName && walletId) {
currentWalletInfo.value = {
userName: row.name,
jwcode: row.jwcode,
marketName: row.market, //
walletName: marketName + t('clientCount.wallet'), //
currentBalance: row[column.property] || 0,
walletId: walletId
}
walletDetailQuery.value.pageNum = 1
getWalletDetail()
walletDetailVisible.value = true
}
}
//
const walletDetailVisible = ref(false)
const walletDetailList = ref([])
const walletDetailTotal = ref(0)
const walletDetailLoading = ref(false)
const currentWalletInfo = ref({})
const walletDetailQuery = ref({
pageNum: 1,
pageSize: 20
})
const getWalletRecordTypeText = (item) => {
const type = Number(item.type)
if (type === 0) {
return t('clientCount.recharge')
}
if (type === 1) {
return t('clientCount.consume')
}
if (type === 2) {
return t('clientCount.refund')
}
return item.typeText || t('clientCount.other')
}
const getWalletDetail = async () => {
walletDetailLoading.value = true
try {
const params = {
pageNum: walletDetailQuery.value.pageNum,
pageSize: walletDetailQuery.value.pageSize,
userWalletRecord: {
jwcode: Number(currentWalletInfo.value.jwcode),
walletId: currentWalletInfo.value.walletId
}
}
const result = await API({
url: '/cashCollection/selectWalletRecords',
method: 'post',
data: params
})
if (result.code === 200) {
walletDetailList.value = result.data.list.map(item => ({
time: moment(item.createTime).format('YYYY-MM-DD HH:mm:ss'),
type: getWalletRecordTypeText(item),
amount: Number(item.amount) || 0,
desc: item.description || '',
orderNo: item.orderCode,
status: item.status === 0 ? 1 : 2
}))
walletDetailTotal.value = result.data.total
} else {
ElMessage.error(result.msg || t('elmessage.getDetailFailed'))
}
} catch (error) {
console.error(error)
} finally {
walletDetailLoading.value = false
}
}
const handleWalletDetailSizeChange = (val) => {
walletDetailQuery.value.pageSize = val
walletDetailQuery.value.pageNum = 1
getWalletDetail()
}
const handleWalletDetailCurrentChange = (val) => {
walletDetailQuery.value.pageNum = val
getWalletDetail()
}
//
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
console.log('排序方式:', column.order)
if (!column.prop || !column.order) {
sortField.value = ''
sortOrder.value = ''
sortWalletId.value = ''
getObj.value.pageNum = 1
get()
return
}
if (propToWalletId[column.prop]) {
sortField.value = 'currentPermanentGold'
sortWalletId.value = propToWalletId[column.prop]
}
sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC'
getObj.value.pageNum = 1
get()
}
//
onMounted(async function () {
await get()
await getMarket()
await getExportList()
})
const handlePageSizeChange = function (val) {
getObj.value.pageSize = val
getObj.value.pageNum = 1
get()
}
const handleCurrentChange = function (val) {
getObj.value.pageNum = val
get()
}
const exportExcel = async function () {
const params = {
pageNum: 1, //
pageSize: 10000, //
}
//
if (selectData.value.jwcode) {
params.jwcode = Number(selectData.value.jwcode)
}
if (selectData.value.markets && selectData.value.markets.length > 0) {
//
params.market = String(selectData.value.markets[0])
}
const res = await API({
url: '/export/exportUserWallet',
method: 'post',
data: params
})
if (res.code === 200) {
ElMessage.success(t('elmessage.exportSuccess'))
//
} else {
ElMessage.error(res.msg || t('elmessage.exportFailed'))
}
}
const exportWalletDetail = async () => {
const params = {
pageNum: walletDetailQuery.value.pageNum,
pageSize: walletDetailQuery.value.pageSize,
userWalletRecord: {
jwcode: Number(currentWalletInfo.value.jwcode),
walletId: currentWalletInfo.value.walletId
}
}
try {
const res = await API({
url: '/export/exportUserWalletRecord',
method: 'post',
data: params
})
if (res.code === 200) {
ElMessage.success(t('elmessage.exportSuccess'))
} else {
ElMessage.error(res.msg || t('elmessage.exportFailed'))
}
} catch (error) {
console.error('导出钱包明细出错:', error)
ElMessage.error(t('elmessage.exportWalletDetailError'))
}
}
const selectWallet = async function () {
selectWalletVisible.value = true
}
const exportExcelOnlyOne = async function () {
if (!selectWalletForm.value.companyWalletId) {
ElMessage.error(t('elmessage.selectCompanyWallet'))
return
}
const params = {
pageNum: 1, //
pageSize: 10000, //
userWalletRecord: {
walletId: selectWalletForm.value.companyWalletId,
jwcode: selectData.value.jwcode ? Number(selectData.value.jwcode) : null
}
}
try {
const res = await API({
url: '/export/exportUserWalletRecord',
method: 'post',
data: params
})
if (res.code === 200) {
ElMessage.success(t('elmessage.exportSuccess'))
openExportList() //
} else {
ElMessage.error(res.msg || t('elmessage.exportFailed'))
}
} catch (error) {
console.error('导出失败:', error)
ElMessage.error(t('elmessage.exportFailed'))
} finally {
selectWalletVisible.value = false
}
}
const exportListVisible = ref(false)
const selectWalletVisible = ref(false)
const selectWalletFormRef = ref(null)
const selectWalletRules = {
companyWalletId: [
{ required: true, message: t('common_list.companyWalletPlaceholder'), trigger: 'change' }
]
}
//
const closeSelectWallet = () => {
//
selectWalletFormRef.value.resetFields()
selectWalletForm.value = {}
selectWalletVisible.value = false
}
const selectWalletForm = ref({})
const companyWalletList = ref([
{
id: 2,
name: t('clientCount.market.hkGold') + t('clientCount.wallet')
},
{
id: 3,
name: t('clientCount.market.sgHcGold')
},
{
id: 4,
name: t('clientCount.market.myGold')
},
{
id: 5,
name: t('clientCount.market.sgCmGold')
},
{
id: 6,
name: t('clientCount.market.caGold')
},
{
id: 7,
name: t('clientCount.market.thHsGold')
},
{
id: 8,
name: t('clientCount.market.thHaGold')
},
{
id: 9,
name: t('clientCount.market.vnGold')
},
{
id: 10,
name: t('clientCount.market.bjGold')
}
])
//
const openExportList = () => {
getExportList()
exportListVisible.value = true
}
//
const exportList = ref([])
//
const exportListLoading = ref(false)
//
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
if (result.code === 200) {
// type1617
const filteredData = result.data.filter(item => {
return item.type === 16 || item.type === 17;
});
exportList.value = filteredData
} else {
ElMessage.error(result.msg || t('elmessage.getExportListError'))
}
} catch (error) {
console.error('获取导出列表出错:', error)
ElMessage.error(t('elmessage.getExportListError'))
} finally {
exportListLoading.value = false
}
}
//
const downloadExportFile = (item) => {
if (item.state === 2) {
const link = document.createElement('a')
link.href = item.url
link.download = item.fileName
link.click()
} else {
ElMessage.warning(t('elmessage.exportingInProgress'))
}
}
//
const getTagType = (state) => {
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
}
//
const getTagText = (state) => {
switch (state) {
case 0:
return t('elmessage.pendingExecution');
case 1:
return t('elmessage.executing');
case 2:
return t('elmessage.executed');
case 3:
return t('elmessage.errorExecution');
default:
return t('elmessage.unknownStatus');
}
}
//
const selectedMarketPath = ref([])
const handleMarketChange = (value) => {
if (value && value.length > 0) {
const lastValue = value[value.length - 1];
//
const marketValue = reverseMarketMapping[lastValue];
selectData.value.markets = Array.isArray(marketValue) ? marketValue : [marketValue];
} else {
// []
selectData.value.markets = [];
}
};
//
const getMarket = async function () {
try {
// POST
const result = await API({
url: '/market/selectMarket',
});
//
console.log('请求成功', result)
//
const transformTree = (nodes) => {
//
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child]) //
: null;
return {
value: child.name,
label: child.name,
children: grandchildren
};
});
};
//
markets.value = transformTree(result.data)
console.log('转换后的地区树==============', markets.value)
} catch (error) {
console.log('请求失败', error)
}
}
const format3 = (num) => {
//
return num.toLocaleString('en-US')
}
</script>
<template>
<el-card class="card1" style="margin-bottom: 1vh;">
<div class="head-card">
<div class="head-card-element">
<el-text class="mx-1" size="large">{{ $t('common.jwcode') }}</el-text>
<el-input v-model="selectData.jwcode" style="width: 160px" :placeholder="$t('common.jwcodePlaceholder')" clearable />
</div>
<div class="head-card-element">
<el-text class="mx-1" size="large">{{ $t('common.market') }}</el-text>
<el-cascader v-model="selectedMarketPath" :options="markets" :placeholder="$t('common.marketPlaceholder')" clearable style="width:180px"
@change="handleMarketChange" />
</div>
<div class="head-card-element">
<!-- <el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox> -->
</div>
<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()">{{ $t('common.exportCompanyWalletDetail') }}</el-button>
<el-button type="primary" @click="openExportList">{{ $t('common.viewExportList') }}</el-button>
</div>
<!-- </div> -->
</el-card>
<el-card class="card2">
<!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 69vh; overflow-y: auto">
<el-table ref="tableRef" :data="tableData" @cellClick="cellClick" style="width: 100%; height: 69vh"
@sort-change="handleSortChange" :row-style="{ height: '50px' }">
<el-table-column type="index" :label="$t('common_list.id')" width="100px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
</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="140" />
<el-table-column prop="market" :label="$t('common_list.market')" width="140" />
<el-table-column prop="historyGold" :label="$t('clientCount.market.historyGold')" sortable="custom" min-width="140">
<template #default="scope">
<span>{{ (scope.row.historyGold || 0) }}</span>
</template>
</el-table-column>
<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="$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="$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="$t('clientCount.market.sgCmGold')" sortable="custom" min-width="150">
<template #default="scope">
<span>{{ (scope.row.sgGold || 0) }}</span>
</template>
</el-table-column>
<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="$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="$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="$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="$t('clientCount.market.bjGold')" sortable="custom" min-width="120">
<template #default="scope">
<span>{{ (scope.row.bjGold || 0) }}</span>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination" style="margin-top: 20px">
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>
</el-card>
<el-dialog v-model="exportListVisible" :title="$t('common_export.exportList')" width="80%">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" :label="$t('common_export.fileName')" />
<el-table-column prop="state" :label="$t('common_export.status')">
<template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('common_export.createTime')">
<template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :label="$t('common_export.operation')">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
{{ $t('common_export.download') }}
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button text @click="exportListVisible = false">{{ $t('common_export.close') }}</el-button>
</div>
</template>
</el-dialog>
<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="$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()">{{ $t('common.confirm') }}</el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="walletDetailVisible" width="70%" top="20vh">
<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> {{ $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;">* {{ $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="$t('clientCount.time')" align="center" width="180">
<template #default="scope">{{ scope.row.time }}</template>
</el-table-column>
<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="$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 ? t('common_list.normal') : scope.row.status === 2 ? t('common_list.refunded') : t('clientCount.exceptionData') }}
</el-tag>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer" style="display: flex; justify-content: space-between; align-items: center;">
<div class="pagination-container">
<el-pagination
background
:current-page="walletDetailQuery.pageNum"
:page-size="walletDetailQuery.pageSize"
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
:total="walletDetailTotal"
@size-change="handleWalletDetailSizeChange"
@current-change="handleWalletDetailCurrentChange"
/>
</div>
<div>
<el-button type="primary" @click="exportWalletDetail">{{ $t('common.exportExcel') }}</el-button>
<el-button text @click="walletDetailVisible = false">{{ $t('common_export.close') }}</el-button>
</div>
</div>
</template>
</el-dialog>
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
}
//
.card2 {
background: #E7F4FD;
flex: 1;
display: flex;
flex-direction: column;
:deep(.el-card__body) {
padding: 20px;
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
}
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
/* 表头 */
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
}
.pagination {
display: flex;
}
.status {
display: flex;
}
.head-card {
display: flex;
}
.head-card-element {
margin-right: 20px;
}
.head-card-btn {
margin-left: auto;
}
.custom-box {
display: flex;
flex-wrap: wrap;
row-gap: 5px;
div:nth-child(1) {
flex: 1 0 100%;
}
div {
margin-right: 20px;
}
}
</style>

36
src/views/walletManage/components/WalletDetailTemplate.vue

@ -0,0 +1,36 @@
<script setup>
import { ref, watch } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const tableData = ref([])
//
const getWalletData = async (walletType) => {
console.log('当前请求的钱包类型是:', walletType)
// TODO: API walletType
// const res = await API({ url: '/xxx', data: { type: walletType } })
// tableData.value = res.data.list
}
//
watch(
() => route.query.type, // URL ?type=xxx
(newType) => {
if (newType) {
//
getWalletData(newType)
}
},
{ immediate: true } //
)
</script>
<template>
<div>
<!-- 这里写你统一的表格搜索框等结构 -->
<el-table :data="tableData">
<!-- ... -->
</el-table>
</div>
</template>

10
src/views/walletManage/walletDetail/BJWallet.vue

@ -0,0 +1,10 @@
<!-- 北京钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="bj" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

10
src/views/walletManage/walletDetail/CAWallet.vue

@ -0,0 +1,10 @@
<!-- 加拿大钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="ca" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

11
src/views/walletManage/walletDetail/HKWallet.vue

@ -0,0 +1,11 @@
<!-- 初始界面 -->
<template>
<div>
111
<WalletDetailTemplate type="hk" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

10
src/views/walletManage/walletDetail/MyWallet.vue

@ -0,0 +1,10 @@
<!-- 马来钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="my" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

10
src/views/walletManage/walletDetail/SGWalletCM.vue

@ -0,0 +1,10 @@
<!-- 新加坡CM钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="sg_cm" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

10
src/views/walletManage/walletDetail/SGWalletHC.vue

@ -0,0 +1,10 @@
<!-- 新加坡HC钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="sg_hc" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

10
src/views/walletManage/walletDetail/THWalletHA.vue

@ -0,0 +1,10 @@
<!-- 泰国HA钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="th_ha" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

10
src/views/walletManage/walletDetail/THWalletHS.vue

@ -0,0 +1,10 @@
<!-- 泰国HS钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="th_hs" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>

10
src/views/walletManage/walletDetail/VNWallet.vue

@ -0,0 +1,10 @@
<!-- 越南钱包界面 -->
<template>
<div>
<WalletDetailTemplate type="vn" />
</div>
</template>
<script setup>
import WalletDetailTemplate from './components/WalletDetailTemplate.vue'
</script>
<style scoped></style>
Loading…
Cancel
Save