From f40b2d619ae4a0afee4c7808a03dcbd6971f5a42 Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Sun, 18 Jan 2026 13:53:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(i18n):=20=E6=B7=BB=E5=8A=A0=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E7=8E=B0=E6=9C=89=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在en.js和zh-CN.js中添加新的状态列表和错误提示文本 - 将performanceAttribution.vue中的硬编码文本替换为国际化调用 - 优化表格和搜索区域的样式一致性 --- src/components/locales/lang/en.js | 13 +++ src/components/locales/lang/zh-CN.js | 16 +++- .../financialAccount/performanceAttribution.vue | 99 +++++++++------------- 3 files changed, 70 insertions(+), 58 deletions(-) diff --git a/src/components/locales/lang/en.js b/src/components/locales/lang/en.js index 02c8876..55cf245 100644 --- a/src/components/locales/lang/en.js +++ b/src/components/locales/lang/en.js @@ -368,6 +368,7 @@ export default { getMarketListFailed: "Get markets failed", getChartDataFailed: "Get chart data failed", renderChartFailed: "Chart render failed", + getRegionFailed: "Failed to get region", // Rate confirmModify: "Confirm modify?", pleaseInputRate: "Enter rate", @@ -399,6 +400,8 @@ export default { noRoleAssigned: "No role assigned", unknownRole: "Unknown role", refundSubmitSuccess: "Refund application submitted successfully", + refundConfirmTitle: "Refund Confirmation", + refundConfirmContent: "Are you sure you want to refund order {orderNo}?", exportError: "Export failed", }, @@ -1066,6 +1069,16 @@ export default { paymentAsia: "PaymentAsia", transfer: "E-Transfer", }, + statusList: { + submitted: "Submitted", + pending: "Pending", + passed: "Passed", + recalled: "Recalled", + refunded: "Refunded", + rejected: "Rejected", + inProgress: "In Progress", + received: "Received", + }, unit: "Unit", year: "Year", month: "Month", diff --git a/src/components/locales/lang/zh-CN.js b/src/components/locales/lang/zh-CN.js index 3010cc6..c6ecbae 100644 --- a/src/components/locales/lang/zh-CN.js +++ b/src/components/locales/lang/zh-CN.js @@ -368,6 +368,7 @@ export default { getMarketListFailed: "获取市场列表失败,请稍后重试", getChartDataFailed: "获取图表数据失败,请稍后重试", renderChartFailed: "图表渲染失败,请稍后重试", + getRegionFailed: "获取地区失败", // 汇率相关 confirmModify: "确认修改?", pleaseInputRate: "请输入汇率比例", @@ -399,6 +400,8 @@ export default { noRoleAssigned: "暂未分配角色", unknownRole: "未知角色", refundSubmitSuccess: "退款申请已提交", + refundConfirmTitle: "退款确认", + refundConfirmContent: "确定要对订单 {orderNo} 进行退款吗?", exportError: "导出失败", }, @@ -1078,6 +1081,16 @@ export default { paymentAsia: "PaymentAsia-链接收款", transfer: "E-Transfer", }, + statusList: { + submitted: "已提交", + pending: "待审核", + passed: "审核通过", + recalled: "已撤回", + refunded: "已退款", + rejected: "已驳回", + inProgress: "进行中", + received: "已到账", + }, unit: "个", year: "年", month: "月", @@ -1178,9 +1191,10 @@ export default { pending: "待审核", passed: "审核通过", recalled: "已撤回", - refunded: "退款", + refunded: "已退款", rejected: "已驳回", inProgress: "进行中", + received: "已到账", }, // 退款执行 pending: "待处理", diff --git a/src/views/moneyManage/financialAccount/performanceAttribution.vue b/src/views/moneyManage/financialAccount/performanceAttribution.vue index 63a18eb..6a5556e 100644 --- a/src/views/moneyManage/financialAccount/performanceAttribution.vue +++ b/src/views/moneyManage/financialAccount/performanceAttribution.vue @@ -30,8 +30,8 @@ const paytypeList = [ const payPlatformOptions = ref([...paytypeList]) const statusOptions = [ - { label: '已到账', value: 4 }, - { label: '已退款', value: 6 } + { label: t('cash.statusList.received'), value: 4 }, + { label: t('cash.statusList.refunded'), value: 6 } ] // 地区树 @@ -103,13 +103,13 @@ const fetchData = async () => { total.value = res.data.total || 0 loading.value = false } else { - ElMessage.error(res.msg || '获取数据失败') + ElMessage.error(res.msg || t('elmessage.getDataFailed')) loading.value = false } } catch (error) { console.error(error) loading.value = false - ElMessage.error('获取数据失败') + ElMessage.error(t('elmessage.getDataFailed')) } } @@ -138,14 +138,12 @@ const handleCurrentChange = (val) => { // 退款操作 const handleRefund = (row) => { - ElMessageBox.confirm(`确定要对订单 ${row.systemTradeNo} 进行退款吗?`, '退款确认', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('elmessage.refundConfirmContent', { orderNo: row.systemTradeNo }), t('elmessage.refundConfirmTitle'), { + confirmButtonText: t('common.confirm'), + cancelButtonText: t('common.cancel'), type: 'warning' }).then(() => { - - - ElMessage.success('退款申请已提交') + ElMessage.success(t('elmessage.refundSubmitSuccess')) // 刷新列表 fetchData() }).catch(() => {}) @@ -182,7 +180,7 @@ const handleExport = async () => { } catch (error) { console.error(error) - ElMessage.error('导出失败') + ElMessage.error(t('elmessage.exportError')) } } @@ -259,11 +257,11 @@ onMounted(() => {
- 精网号: - + {{ t('common.jwcode') }}: +
- 所属地区: + {{ t('common.market') }}: { :props="{ multiple: true, emitPath: false }" collapse-tags collapse-tags-tooltip - placeholder="请选择地区" + :placeholder="t('common.marketPlaceholder')" clearable style="width: 220px;" />
- 付款时间: + {{ t('common.payTime2') }}: @@ -303,27 +301,27 @@ onMounted(() => { - - - - - + + + + + - + - + - + - + - + @@ -408,58 +406,45 @@ onMounted(() => { .search-item { display: flex; align-items: center; - + .label { - font-size: 15px; // 参考 coinConsumeDetail 的 .text size="large" - color: #000; // 或 #606266 white-space: nowrap; - margin-right: 8px; - min-width: 60px; - text-align: right; - } - - .el-input, .el-select { - width: 200px; + margin-right: 10px; + font-weight: bold; + color: #606266; } } .search-btn-group { - margin-left: 2vw; + margin-left: auto; display: flex; gap: 10px; } .table-card { - background: #E7F4FD; flex: 1; - border: none; display: flex; flex-direction: column; + overflow: hidden; + border: none; :deep(.el-card__body) { - padding: 20px; - flex: 1; + height: 100%; display: flex; flex-direction: column; - overflow: hidden; + padding: 0; } } .pagination-container { - margin-top: 15px; + padding: 15px; display: flex; - justify-content: flex-start; -} - -// 表格样式覆盖 (参考 coinConsumeDetail) -:deep(.el-table__header-wrapper), -:deep(.el-table__body-wrapper), -:deep(.el-table__cell), -:deep(.el-table__body td) { - background-color: #F3FAFE !important; // 如果想完全一致可以加这个,但有时候会影响阅读,暂保留头部颜色 + justify-content: flex-end; + background: #fff; + border-top: 1px solid #ebeef5; } -:deep(.el-table__row:hover > .el-table__cell) { - background-color: #E5EBFE !important; +.dialog-footer { + text-align: right; }