From 0a3c5213616064720f9797dddde5cd1589805f1a Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Thu, 27 Nov 2025 15:12:54 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E9=87=91=E5=B8=81=E5=85=85?= =?UTF-8?q?=E5=80=BC=E6=A8=A1=E5=9D=97=E7=9A=84=E8=AF=AD=E8=A8=80=E5=8C=85?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=A8=A1=E5=9D=97=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/locales/lang/zh-CN.js | 169 +++++++++++++++++++-- src/views/recharge/gold/addCoinRecharge.vue | 197 +++++++++++++------------ src/views/recharge/gold/coinRecharge.vue | 7 +- src/views/recharge/gold/coinRechargeDetail.vue | 121 +++++++-------- 4 files changed, 326 insertions(+), 168 deletions(-) diff --git a/src/components/locales/lang/zh-CN.js b/src/components/locales/lang/zh-CN.js index 8918833..8944b14 100644 --- a/src/components/locales/lang/zh-CN.js +++ b/src/components/locales/lang/zh-CN.js @@ -1,3 +1,5 @@ +import { UploadFilled } from "@element-plus/icons-vue"; + export default { // 通用组 common: { @@ -14,6 +16,9 @@ export default { refundTypePlaceholder: '请选择退款类型', market: '所属地区', marketPlaceholder: '请选择所属地区', + rechargePlatform: '充值平台', + rechargePlatformPlaceholder: '请选择充值平台', + rechargeTime: '充值时间', submitTime: '提交时间', auditTime: '审核时间', startTime: '起始时间', @@ -21,13 +26,21 @@ export default { endTime: '结束时间', // 按钮组 search: '查询', + exportExcel: '导出Excel', + viewExportList: '查看导出列表', reset: '重置', edit: '编辑', pass: '通过', reject: '驳回', cancel: '取消', confirm: '确认', + confrimRecharge: '确认充值', // 币种计量单位类型 + rechargeSGD: '充值新币', + totalGoldCoin: '总金币数', + permanentGold: '永久金币', + freeGold: '免费金币', + taskGold: '任务金币', SGD: '新币', goldCoin: '金币', 条: '条', @@ -36,21 +49,133 @@ export default { will: '将要', }, // 提示信息组 - elmessage : { + elmessage: { + // 通用 + addSuccess: '添加成功', + searchSuccess: '查询成功', + jwcodeError: '精网号错误', + // 校验精网号,充值等输入 + checkInputContent: '请检查输入内容', + permanentAndFreeNoZero: '永久金币和免费金币不能同时为0', + checkRate: '请选择币种名称', + checkMoney: '请输入充值金额', + checkUserInfo: '请先查询用户信息', + checkActivity: '请输入活动名称', + checkPermanentGold: '请输入永久金币数', + checkFreeGold: '请输入免费金币数', + checkNumber: '请输入有效的数字', + checkPayModel: '请选择付款方式', + checkPayTime: '请选择交款时间', + // 校验提示(error) + noEmptyJwcode: '精网号不能为空', + noUser: '用户不存在', + limitDigitJwcode: '精网号只能包含数字', + limitNoSpecialChar: '不能包含特殊符号或负数', + limitSix: '整数位数不能超过6位', + limitTwoDecimal: '小数位数不能超过两位', + limitZero: '输入金额不能小于0', + limitJwcodeNine: '精网号必须为数字且不超过九位', + // 图片上传 + onlyUploadJPGPNG: '只能上传 JPG/PNG 图片!', + limitImageSize: '图片大小不能超过 1MB!', + uploadSuccess: '上传成功', + UploadFailed: '上传失败', + // 审核 noPermission: '暂无权限', checkJwcodeFormat: '请检查精网号格式', rejectReasonPlaceholder: '请输入驳回理由', - - rejectSuccess: '驳回成功', rejectFailed: '驳回失败', operationFailed: '操作失败', approveSuccess: '审核通过成功', approveFailed: '审核通过失败', + activityFormatError: '活动数据格式错误,请联系管理员', + rechargeFormatError: '充值方式格式错误,请联系管理员', + getRechargeError: '获取充值方式失败,请稍后重试', + // 导出相关 + exportSuccess: '导出成功', + exportFailed: '导出失败,请稍后重试', + getExportListError: '获取导出列表失败,请稍后重试', + exportingInProgress: '文件还在导出中,请稍后再试', + // 导出状态标签 + pendingExecution: '待执行', + executing: '执行中', + executed: '执行完成', + errorExecution: '执行出错', + unknownStatus: '未知状态', + }, + + // 通用列表字段组 + common_list: { + id: '序号', + name: '姓名', + jwcode: '精网号', + market: '所属地区', + activity: '活动名称', + rateName: '货币名称', + rechargeAmount: '充值金额', + permanentGold: '永久金币', + freeGold: '免费金币', + rechargePlatform: '充值平台', + payModel: '支付方式', + remark: '备注', + orderStatus: '订单状态', + submitter: '提交人', + rechargeTime: '充值时间', + }, + + // 通用导出字段组 + common_export: { + exportList: '导出列表', + fileName: '文件名称', + status: '状态', + createTime: '创建时间', + operation: '操作', + download: '下载', + close: '关闭', }, - // 审核组 + + // 新增表单字段组 + common_add: { + jwcode: '精网号', + activity: '活动名称', + activityPlaceholder: '请输入活动名称', + permanentGold: '永久金币', + freeGold: '免费金币', + rechargeAmount: '充值金额', + currencyName: '货币名称', + payModel: '收款方式', + payModelPlaceholder: '请选择收款方式', + paymentTime: '交款时间', + paymentVoucher: '交款凭证', + paymentVoucherPlaceholder: '仅支持.jpg .png格式,文件≤1MB', + remark: '备注', + // 确认表单 + operationConfirm: '操作确认', + userInfo: '用户信息', + prompt: '重复充值风险提示', + similarRechargeRecords: '检测到该用户近期有相似充值记录', + rechargePermanentGold: '充值永久金币', + operator: '操作人', + continueOperation: '是否继续操作', + }, + // 新增表单客户信息字段组 + common_add_user: { + customerInfo: '客户信息', + name: '姓名', + currentGoldCoinTotal: '当前金币总数', + permanentGold: '永久金币', + freeGold: '免费金币', + taskGold: '任务金币', + jwcode: '精网号', + consumptionTimes: '消费次数', + onlyStatisticsDataAfter20250101: '仅统计2025-01-01后的数据', + store: '所属门店', + }, + + // 审核组 audit: { // 按照项目文件名分配 - // 审核通用 --------------------------------- + // 审核通用 ---------------------------------------------------------- refundTypeOptions: { '商品退款': '商品退款', '金币退款': '金币退款', @@ -90,13 +215,11 @@ export default { // 审核通用-金豆审核列表字段补充 permanentBean: '付费金豆', freeBean: '免费金豆', - - // 金币充值审核 -------------------------------- - rechargeAudit: '充值审核', + rechargeAudit: '充值审核', rechargeSGD: '充值新币', totalGold: '总金币数', - // 添加支付方式翻译 + // 添加支付方式 payMethods: { bankTransfer: '银行转账', cash: '现金', @@ -113,7 +236,7 @@ export default { // 金币退款审核 -------------------------------- refundAudit: '退款审核', refundTotalGold: '退款总金币数', - // 金豆审核 --------------------------------- + // 金豆审核 ------------------------------------ totalNum: '总条数', totalBean: '总金豆数', permanentBean: '付费金豆', @@ -122,4 +245,30 @@ export default { rejectRecord: '驳回该记录!', passRecord: '通过该记录!', }, + + recharge: { + // 金币充值明细 --------------------------------- + coinRechargeDetail: '金币充值明细', + // 订单状态 + normal: '正常', + refunded: '已退款', + unknown: '未知状态', + // 金币新增充值 --------------------------------- + addCoinRecharge: '新增充值', + // 支付方式 + // 添加支付方式 + payMethods: { + bankTransfer: '银行转账', + cash: '现金', + check: '支票', + card: '刷卡', + grabpay: 'Grabpay', + nets: 'Nets', + paypal: 'PayPal', + stripe: 'Stripe-链接收款', + ipay88: 'Ipay88-链接收款', + paymentAsia: 'PaymentAsia-链接收款', + other: '其他' + }, + }, } \ No newline at end of file diff --git a/src/views/recharge/gold/addCoinRecharge.vue b/src/views/recharge/gold/addCoinRecharge.vue index 9d4c38f..1fcaff2 100644 --- a/src/views/recharge/gold/addCoinRecharge.vue +++ b/src/views/recharge/gold/addCoinRecharge.vue @@ -7,6 +7,9 @@ import API from '@/util/http.js' import moment from 'moment' import Cookies from 'js-cookie'; import Decimal from 'decimal.js'; +// 国际化 +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); // 定义 fixedAdminId // const fixedAdminId = 1; @@ -23,11 +26,11 @@ const beforeAvatarUpload = (file) => { const isLt1M = file.size / 1024 / 1024 < 1; if (!isImage) { - ElMessage.error('只能上传 JPG/PNG 图片!'); + ElMessage.error(t('elmessage.onlyUploadJPGPNG')); return false; } if (!isLt1M) { - ElMessage.error('图片大小不能超过 1MB!'); + ElMessage.error(t('elmessage.limitImageSize')); return false; } return true; @@ -124,7 +127,7 @@ const add = async function () { // 将响应结果存储到响应式数据中 console.log('请求成功', result) // 显示成功消息 - ElMessage.success('添加成功') + ElMessage.success(t('elmessage.addSuccess')) // 重置表单 deleteRecharge() user.value = {} @@ -199,7 +202,7 @@ const addBefore = () => { if (!valid) { ElMessage({ type: 'error', - message: '请检查输入内容' + message: t('elmessage.checkInputContent') }); return; } @@ -208,7 +211,7 @@ const addBefore = () => { if (Number(recharge.value.permanentGold) === 0 && Number(recharge.value.freeGold) === 0) { ElMessage({ type: 'error', - message: '永久金币和免费金币不能同时为0' + message: t('elmessage.permanentAndFreeNoZero') }); return; } @@ -217,7 +220,7 @@ const addBefore = () => { if (!recharge.value.rateName) { ElMessage({ type: 'error', - message: '请选择币种' + message: t('elmessage.checkRate') }); return; } @@ -226,7 +229,7 @@ const addBefore = () => { if (!recharge.value.money) { ElMessage({ type: 'error', - message: '请输入充值金额' + message: t('elmessage.checkMoney') }); return; } @@ -240,7 +243,7 @@ const addBefore = () => { // 检查是否有用户信息 if (!user.value.jwcode) { - ElMessage.warning('请先查询用户信息') + ElMessage.warning(t('elmessage.checkUserInfo')) return } @@ -270,19 +273,19 @@ const rules = reactive({ jwcode: [{ required: true, validator: (rule, value, callback) => { if (!value) { - callback(new Error('精网号不能为空')); + callback(new Error(t('elmessage.noEmptyJwcode'))); return; } if (/[^0-9]/.test(value)) { - callback(new Error('精网号只能包含数字')); + callback(new Error(t('elmessage.limitDigitJwcode'))); return; } callback(); }, trigger: 'blur' }], - activity: [{required: true, message: '请输入活动名称', trigger: 'blur'}], + activity: [{required: true, message: t('elmessage.checkActivity'), trigger: 'blur'}], permanentGold: [ - {required: true, message: '请输入永久金币数', trigger: 'change'}, + {required: true, message: t('elmessage.checkPermanentGold'), trigger: 'change'}, { validator: (rule, value, callback) => { if (!value) { @@ -290,14 +293,14 @@ const rules = reactive({ } // 检查是否包含特殊符号 if (/[^0-9.]/.test(value)) { - callback(new Error('不能包含特殊符号或负数')); + callback(new Error(t('elmessage.limitNoSpecialChar'))); return; } // 检查整数位数 const integerPart = value.split('.')[0]; if (integerPart.length > 6) { - callback(new Error('整数位数不能超过6位')); + callback(new Error(t('elmessage.limitSix'))); return; } @@ -305,16 +308,16 @@ const rules = reactive({ if (value.includes('.')) { const decimalPart = value.split('.')[1]; if (decimalPart.length > 2) { - callback(new Error('小数位数不能超过两位')); + callback(new Error(t('elmessage.limitTwoDecimal'))); return; } } const numValue = Number(value); if (isNaN(numValue)) { - callback(new Error('请输入有效的数字')); + callback(new Error(t('elmessage.checkNumber'))); } else if (numValue < 0) { - callback(new Error('输入金额不能小于0')); + callback(new Error(t('elmessage.limitZero'))); } else { callback(); } @@ -323,7 +326,7 @@ const rules = reactive({ } ], freeGold: [ - {required: true, message: '请输入免费金币数', trigger: 'change'}, + {required: true, message: t('elmessage.checkFreeGold'), trigger: 'change'}, { validator: (rule, value, callback) => { if (!value) { @@ -331,14 +334,14 @@ const rules = reactive({ } // 检查是否包含特殊符号 if (/[^0-9.]/.test(value)) { - callback(new Error('不能包含特殊符号或负数')); + callback(new Error(t('elmessage.limitNoSpecialChar'))); return; } // 检查整数位数 const integerPart = value.split('.')[0]; if (integerPart.length > 6) { - callback(new Error('整数位数不能超过6位')); + callback(new Error(t('elmessage.limitSix'))); return; } @@ -346,16 +349,16 @@ const rules = reactive({ if (value.includes('.')) { const decimalPart = value.split('.')[1]; if (decimalPart.length > 2) { - callback(new Error('小数位数不能超过两位')); + callback(new Error(t('elmessage.limitTwoDecimal'))); return; } } const numValue = Number(value); if (isNaN(numValue)) { - callback(new Error('请输入有效的数字')); + callback(new Error(t('elmessage.checkNumber'))); } else if (numValue < 0) { - callback(new Error('输入金额不能小于0')); + callback(new Error(t('elmessage.limitZero'))); } else { callback(); } @@ -365,24 +368,24 @@ const rules = reactive({ ], rateName: [{ required: true, - message: '请选择货币名称', + message: t('elmessage.checkRate'), trigger: 'blur' }], money: [ - {required: true, message: '请输入充值金额', trigger: 'blur'}, + {required: true, message: t('elmessage.checkMoney'), trigger: 'blur'}, { validator: (rule, value, callback) => { // 检查是否包含特殊符号 if (/[^0-9.]/.test(value)) { - callback(new Error('不能包含特殊符号或负数')); + callback(new Error(t('elmessage.limitNoSpecialChar'))); return; } // 检查整数位数 const integerPart = value.split('.')[0]; if (integerPart.length > 6) { - callback(new Error('整数位数不能超过6位')); + callback(new Error(t('elmessage.limitSix'))); return; } @@ -390,16 +393,16 @@ const rules = reactive({ if (value.includes('.')) { const decimalPart = value.split('.')[1]; if (decimalPart.length > 2) { - callback(new Error('小数位数不能超过两位')); + callback(new Error(t('elmessage.limitTwoDecimal'))); return; } } const numValue = Number(value); if (isNaN(numValue)) { - callback(new Error('请输入有效的数字')); + callback(new Error(t('elmessage.checkNumber'))); } else if (numValue < 0) { - callback(new Error('输入金额不能小于0')); + callback(new Error(t('elmessage.limitZero'))); } else { callback(); } @@ -407,8 +410,8 @@ const rules = reactive({ trigger: 'blur' } ], - payModel: [{required: true, message: '请选择付款方式', trigger: 'blur'}], - payTime: [{required: true, message: '请选择交款时间', trigger: 'blur'}] + payModel: [{required: true, message: t('elmessage.checkPayModel'), trigger: 'blur'}], + payTime: [{required: true, message: t('elmessage.checkPayTime'), trigger: 'blur'}] }); // 查找客户信息的方法 @@ -417,13 +420,13 @@ const getUser = async function (jwcode) { trimJwCode(); // 验证精网号 if (!jwcode) { - ElMessage.warning('精网号不能为空'); + ElMessage.warning(t('elmessage.noEmptyJwcode')); return; } // 验证精网号是否为数字 if (!/^\d{1,9}$/.test(jwcode)) { - ElMessage.warning('精网号必须为数字且不超过九位'); + ElMessage.warning(t('elmessage.limitJwcodeNine')); deleteRecharge() return; } @@ -440,15 +443,15 @@ const getUser = async function (jwcode) { if (result.code === 0) { ElMessage.error(result.msg); } else if (result.data === null) { - ElMessage.error("用户不存在"); + ElMessage.error(t('elmessage.noUser')); } else { user.value = result.data; console.log("用户信息", user.value); - ElMessage.success("查询成功"); + ElMessage.success(t('elmessage.searchSuccess')); } } catch (error) { console.log("请求失败", error); - ElMessage.error("精网号错误"); + ElMessage.error(t('elmessage.jwcodeError')); } } @@ -515,13 +518,13 @@ const customUpload = async (options) => { if (response.data.code === 200 && response.data.data) { // 传递原始文件对象和响应数据 handleAvatarSuccess(response.data, options.file); - ElMessage.success('上传成功'); + ElMessage.success(t('elmessage.uploadSuccess')); } else { - ElMessage.error(response.data.msg || '上传失败'); + ElMessage.error(response.data.msg || t('elmessage.uploadFailed')); } } catch (error) { console.error('上传错误:', error); - ElMessage.error(`上传失败: ${error.response?.data?.message || error.message}`); + ElMessage.error(`${t('elmessage.uploadFailed')}: ${error.response?.data?.message || error.message}`); } }; @@ -550,47 +553,47 @@ const handleAvatarSuccess = (response, file) => { const payModel = [ { value: '银行转账', - label: '银行转账' + label: t('audit.payMethods.bankTransfer') }, { value: '现金', - label: '现金' + label: t('audit.payMethods.cash') }, { value: '支票', - label: '支票' + label: t('audit.payMethods.check') }, { value: '刷卡', - label: '刷卡' + label: t('audit.payMethods.card') }, { value: 'Grabpay', - label: 'Grabpay' + label: t('audit.payMethods.grabpay') }, { value: 'Nets', - label: 'Nets' + label: t('audit.payMethods.nets') }, { value: 'PayPal', - label: 'PayPal' + label: t('audit.payMethods.paypal') }, { value: 'Stripe-链接收款', - label: 'Stripe-链接收款' + label: t('audit.payMethods.stripe') }, { value: 'Ipay88-链接收款', - label: 'Ipay88-链接收款' + label: t('audit.payMethods.ipay88') }, { value: 'PaymentAsia-链接收款', - label: 'PaymentAsia-链接收款' + label: t('audit.payMethods.paymentAsia') }, { value: '其他', - label: '其他' + label: t('audit.payMethods.other') } ] @@ -640,24 +643,24 @@ onMounted(() => {
- + - 查询 + {{ $t('common.search') }} - - + + - +

 个

- +

 个

- + - + @@ -666,16 +669,16 @@ onMounted(() => { - - + + - + - + @@ -684,16 +687,16 @@ onMounted(() => {

- 仅支持.jpg .png格式,文件≤1MB + {{ $t('common_add.paymentVoucherPlaceholder') }}

- + - 重置 - 提交 + {{ $t('common.reset') }} + {{ $t('common.confirm') }}
@@ -701,28 +704,28 @@ onMounted(() => { - 客户信息 + {{ $t('common_add_user.customerInfo') }} - +

{{ user.name }}

- + {{ user.nowSumGold }} - (永久金币:{{ + ({{ $t('common_add_user.permanentGold') }}:{{ user.nowPermanentGold }}; - 免费金币:{{ user.nowFreeGold }}; - 任务金币:{{ user.nowTaskGold }}) + {{ $t('common_add_user.freeGold') }}:{{ user.nowFreeGold }}; + {{ $t('common_add_user.taskGold') }}:{{ user.nowTaskGold }})
@@ -730,16 +733,16 @@ onMounted(() => { - +

{{ user.jwcode }}

- +

{{ user.consumeNum }}

-

(仅统计2025-01-01后的数据)

+

({{ $t('common_add_user.onlyStatisticsDataAfter20250101') }})

@@ -759,7 +762,7 @@ onMounted(() => { - +

{{ user.market }}

@@ -770,39 +773,39 @@ onMounted(() => { -
-
用户信息
+
{{ $t('common_add.userInfo') }}
-
活动名称
+
{{ $t('common_add.activity') }}
-
永久金币
+
{{ $t('common_add.permanentGold') }}
-
免费金币
+
{{ $t('common_add.freeGold') }}
-
备注
+
{{ $t('common_add.remark') }}
@@ -812,37 +815,37 @@ onMounted(() => { -
-
用户信息
+
{{ $t('common_add.userInfo') }}
-
活动名称
+
{{ $t('common_add.activity') }}
-
永久金币
+
{{ $t('common_add.permanentGold') }}
-
免费金币
+
{{ $t('common_add.freeGold') }}
@@ -852,17 +855,17 @@ onMounted(() => { -

重复充值风险提示

+

{{ $t('common_add.prompt') }}

-

检测到该用户近期有相似充值记录:

- · {{ ReadCookiesTime }} 充值永久金币: {{ recharge.permanentGold }} - 免费金币: {{ recharge.freeGold }}(操作人:{{ adminData.adminName }}) +

{{ $t('common_add.similarRechargeRecords') }}

+ · {{ ReadCookiesTime }} {{ $t('common_add.rechargePermanentGold') }}: {{ recharge.permanentGold }} + {{ $t('common_add.freeGold') }}: {{ recharge.freeGold }}({{ $t('common_add.operator') }}:{{ adminData.adminName }})
-

是否继续操作?

+

{{ $t('common_add.continueOperation') }}

@@ -870,8 +873,8 @@ onMounted(() => {
diff --git a/src/views/recharge/gold/coinRecharge.vue b/src/views/recharge/gold/coinRecharge.vue index b51a8d2..ccaca69 100644 --- a/src/views/recharge/gold/coinRecharge.vue +++ b/src/views/recharge/gold/coinRecharge.vue @@ -6,13 +6,13 @@ :class="{ 'active-btn': activeTab === 'coinRechargeDetail' }" @click="navigateTo('coinRechargeDetail')" v-if="hasDetail"> - 金币充值明细 + {{ $t('recharge.coinRechargeDetail') }} - 新增充值 + {{ $t('recharge.addCoinRecharge') }} @@ -25,6 +25,9 @@ import {useRoute, useRouter} from 'vue-router'; import {storeToRefs} from "pinia"; import {useAdminStore} from "@/store/index.js"; import {hasMenuPermission, permissionMapping} from "@/utils/menuTreePermission.js"; +// 国际化 +import { useI18n } from 'vue-i18n'; + const router = useRouter(); const route = useRoute(); diff --git a/src/views/recharge/gold/coinRechargeDetail.vue b/src/views/recharge/gold/coinRechargeDetail.vue index 4908422..6b9153b 100644 --- a/src/views/recharge/gold/coinRechargeDetail.vue +++ b/src/views/recharge/gold/coinRechargeDetail.vue @@ -9,6 +9,9 @@ import { storeToRefs } from 'pinia' import { useAdminStore } from '@/store/index.js' const adminStore = useAdminStore() const { flag } = storeToRefs(adminStore) +// 国际化 +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); //新增员工数数据复选框,默认不勾选 // const showEmployeeData = ref(false) @@ -229,7 +232,7 @@ const getActivity = async function () { activity.value = result.data.map(item => ({ value: item, label: item })); } else { console.error('活动数据格式错误', result) - ElMessage.error('活动数据格式错误,请联系管理员') + ElMessage.error($t('elmessage.activityFormatError')) } console.log('activity', activity.value) @@ -293,11 +296,11 @@ const getPlatform = async () => { platform.value = result.data.map(item => ({ value: item, label: item })); } else { console.error('充值方式格式错误', result) - ElMessage.error('充值方式格式错误,请联系管理员') + ElMessage.error($t('elmessage.rechargeFormatError')) } } catch (error) { console.error('获取充值方式失败:', error); - ElMessage.error('获取充值方式失败,请稍后重试'); + ElMessage.error($t('elmessage.getRechargeError')) } finally { isLoadingPlatform.value = false } @@ -336,7 +339,7 @@ const get = async function (val) { // 检查是否不是数字 if (!numberRegex.test(rechargeUser.value.jwcode)) { - ElMessage.error('请检查精网号格式') + ElMessage.error($t('elmessage.checkJwcodeFormat')) // 上面提示过了 return } @@ -509,13 +512,13 @@ const exportExcel = async function () { try { const res = await API({ url: '/export/exportRecharge', data: params }) if (res.code === 200) { - ElMessage.success('导出成功') + ElMessage.success($t('elmessage.exportSuccess')) } else { - ElMessage.error(res.message || '导出失败,请稍后重试') + ElMessage.error(res.message || $t('elmessage.exportFailed')) } } catch (error) { console.log('请求失败', error) - ElMessage.error('导出失败,请稍后重试') + ElMessage.error($t('elmessage.exportFailed')) } } @@ -542,11 +545,11 @@ const getExportList = async () => { }); exportList.value = filteredData } else { - ElMessage.error(result.msg || '获取导出列表失败') + ElMessage.error(result.msg || $t('elmessage.getExportListError')) } } catch (error) { console.error('获取导出列表出错:', error) - ElMessage.error('获取导出列表失败,请稍后重试') + ElMessage.error($t('elmessage.getExportListError')) } finally { exportListLoading.value = false } @@ -559,7 +562,7 @@ const downloadExportFile = (item) => { link.download = item.fileName link.click() } else { - ElMessage.warning('文件还在导出中,请稍后再试') + ElMessage.warning($t('elmessage.exportingInProgress')) } } //根据状态返回对应的标签类型 @@ -581,15 +584,15 @@ const getTagType = (state) => { const getTagText = (state) => { switch (state) { case 0: - return '待执行'; + return $t('elmessage.pendingExecution'); case 1: - return '执行中'; + return $t('elmessage.executing'); case 2: - return '执行完成'; + return $t('elmessage.executed'); case 3: - return '执行出错'; + return $t('elmessage.errorExecution'); default: - return '未知状态'; + return $t('elmessage.unknownStatus'); } } @@ -601,23 +604,23 @@ const getTagText = (state) => {
- 精网号: - + {{ $t('common.jwcode') }}: +
- 活动名称: - + {{ $t('common.activityName') }}: +
- 所属地区: - {{ $t('common.market') }}: +
- 充值平台: - + {{ $t('common.rechargePlatform') }}: +
@@ -627,9 +630,9 @@ const getTagText = (state) => {
- 充值时间: - {{ $t('common.rechargeTime') }}: +
{
- 查询 - 导出Excel - 查看导出列表 - 重置 + {{ $t('common.search') }} + {{ $t('common.exportExcel') }} + {{ $t('common.viewExportList') }} + {{ $t('common.reset') }}
@@ -658,41 +661,41 @@ const getTagText = (state) => {
- 充值新币:{{ format3(permanentGolds) }}新币     - 总金币数:{{ format3(permanentGolds + freeGolds) }}金币     - 永久金币:{{ format3(permanentGolds) }}金币     - 免费金币:{{ format3(freeGolds) }}金币 + {{ $t('common.rechargeSGD') }}:{{ format3(permanentGolds) }} {{ $t('common.SGD') }}     + {{ $t('common.totalGoldCoin') }}:{{ format3(permanentGolds + freeGolds) }} {{ $t('common.goldCoin') }}     + {{ $t('common.permanentGold') }}:{{ format3(permanentGolds) }} {{ $t('common.goldCoin') }}     + {{ $t('common.freeGold') }}:{{ format3(freeGolds) }} {{ $t('common.goldCoin') }}
- + - - - - - - - - - - - - + + + + + + + + + + + + - - + + @@ -709,33 +712,33 @@ const getTagText = (state) => { - + - - + + - + - +