diff --git a/src/assets/SvgIcons/wallet_management.svg b/src/assets/SvgIcons/wallet_management.svg index f031c3c..d003715 100644 --- a/src/assets/SvgIcons/wallet_management.svg +++ b/src/assets/SvgIcons/wallet_management.svg @@ -1 +1,27 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/locales/lang/en.js b/src/components/locales/lang/en.js index 409ea55..de90e99 100644 --- a/src/components/locales/lang/en.js +++ b/src/components/locales/lang/en.js @@ -422,6 +422,7 @@ export default { // Common List Fields common_list: { + marketName: "Region", id: "No.", originalChinese: "Chinese", english: "English", diff --git a/src/components/locales/lang/zh-CN.js b/src/components/locales/lang/zh-CN.js index 831b778..73dd923 100644 --- a/src/components/locales/lang/zh-CN.js +++ b/src/components/locales/lang/zh-CN.js @@ -422,6 +422,7 @@ export default { // 通用列表字段组 common_list: { + marketName: "所属地区", id: "序号", originalChinese: "原始中文", english: "英文", @@ -944,7 +945,7 @@ export default { transactionCurrency: "交易币种", transactionDesc: "交易说明", transactionOrderNo: "交易单号", - transactionStatus: "交易状态", + transactionStatus: "状态", exceptionData: "异常数据", time: "时间", market: { diff --git a/src/views/walletManage/WalletBalance.vue b/src/views/walletManage/WalletBalance.vue index b11524d..b35a905 100644 --- a/src/views/walletManage/WalletBalance.vue +++ b/src/views/walletManage/WalletBalance.vue @@ -6,7 +6,7 @@ import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js" const adminStore = useAdminStore() const { adminData, menuTree, flag } = storeToRefs(adminStore) // 监听全局flag状态变化(员工数据的) - watch(flag, (newFlag, oldFlag) => { +watch(flag, (newFlag, oldFlag) => { // 当flag状态改变时,重新发送请求 if (newFlag !== oldFlag) { console.log('员工数据flag状态改变,重新加载数据', newFlag) @@ -106,18 +106,18 @@ const get = async function (val) { } 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]) @@ -143,7 +143,7 @@ const get = async function (val) { data: params }) console.log('响应数据', result) - + if (result.code === 200) { tableData.value = result.data.list.map(item => { const row = { @@ -161,7 +161,7 @@ const get = async function (val) { vnGold: 0, bjGold: 0 }; - + if (item.walletList && Array.isArray(item.walletList)) { item.walletList.forEach(wallet => { const prop = walletMap[wallet.walletId]; @@ -211,31 +211,31 @@ 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') + 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 } - 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 + walletDetailQuery.value.pageNum = 1 + getWalletDetail() + walletDetailVisible.value = true } } @@ -275,25 +275,25 @@ const getWalletDetail = async () => { 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 + 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')) + ElMessage.error(result.msg || t('elmessage.getDetailFailed')) } } catch (error) { console.error(error) @@ -366,10 +366,10 @@ const exportExcel = async function () { params.market = String(selectData.value.markets[0]) } - const res = await API({ - url: '/export/exportUserWallet', - method: 'post', - data: params + const res = await API({ + url: '/export/exportUserWallet', + method: 'post', + data: params }) if (res.code === 200) { ElMessage.success(t('elmessage.exportSuccess')) @@ -390,10 +390,10 @@ const exportWalletDetail = async () => { } try { - const res = await API({ - url: '/export/exportUserWalletRecord', - method: 'post', - data: params + const res = await API({ + url: '/export/exportUserWalletRecord', + method: 'post', + data: params }) if (res.code === 200) { ElMessage.success(t('elmessage.exportSuccess')) @@ -414,7 +414,7 @@ const exportExcelOnlyOne = async function () { ElMessage.error(t('elmessage.selectCompanyWallet')) return } - + const params = { pageNum: 1, // 导出通常从第一页开始 pageSize: 10000, // 导出大量数据,或者不传让后端处理全部?通常传大值 @@ -425,10 +425,10 @@ const exportExcelOnlyOne = async function () { } try { - const res = await API({ - url: '/export/exportUserWalletRecord', - method: 'post', - data: params + const res = await API({ + url: '/export/exportUserWalletRecord', + method: 'post', + data: params }) if (res.code === 200) { ElMessage.success(t('elmessage.exportSuccess')) @@ -629,102 +629,106 @@ const format3 = (num) => { - - + + - + @@ -773,19 +778,24 @@ const format3 = (num) => { - - + + - + @@ -797,10 +807,13 @@ const format3 = (num) => { - + @@ -809,16 +822,9 @@ const format3 = (num) => {