Browse Source

feat: 金币充值模块的语言包中文模块,添加完成

zhangrenyuan/feature-20251125114759-多语言
zhangrenyuan 3 days ago
parent
commit
0a3c521361
  1. 163
      src/components/locales/lang/zh-CN.js
  2. 197
      src/views/recharge/gold/addCoinRecharge.vue
  3. 7
      src/views/recharge/gold/coinRecharge.vue
  4. 121
      src/views/recharge/gold/coinRechargeDetail.vue

163
src/components/locales/lang/zh-CN.js

@ -1,3 +1,5 @@
import { UploadFilled } from "@element-plus/icons-vue";
export default { export default {
// 通用组 // 通用组
common: { common: {
@ -14,6 +16,9 @@ export default {
refundTypePlaceholder: '请选择退款类型', refundTypePlaceholder: '请选择退款类型',
market: '所属地区', market: '所属地区',
marketPlaceholder: '请选择所属地区', marketPlaceholder: '请选择所属地区',
rechargePlatform: '充值平台',
rechargePlatformPlaceholder: '请选择充值平台',
rechargeTime: '充值时间',
submitTime: '提交时间', submitTime: '提交时间',
auditTime: '审核时间', auditTime: '审核时间',
startTime: '起始时间', startTime: '起始时间',
@ -21,13 +26,21 @@ export default {
endTime: '结束时间', endTime: '结束时间',
// 按钮组 // 按钮组
search: '查询', search: '查询',
exportExcel: '导出Excel',
viewExportList: '查看导出列表',
reset: '重置', reset: '重置',
edit: '编辑', edit: '编辑',
pass: '通过', pass: '通过',
reject: '驳回', reject: '驳回',
cancel: '取消', cancel: '取消',
confirm: '确认', confirm: '确认',
confrimRecharge: '确认充值',
// 币种计量单位类型 // 币种计量单位类型
rechargeSGD: '充值新币',
totalGoldCoin: '总金币数',
permanentGold: '永久金币',
freeGold: '免费金币',
taskGold: '任务金币',
SGD: '新币', SGD: '新币',
goldCoin: '金币', goldCoin: '金币',
: '条', : '条',
@ -37,20 +50,132 @@ export default {
}, },
// 提示信息组 // 提示信息组
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: '暂无权限', noPermission: '暂无权限',
checkJwcodeFormat: '请检查精网号格式', checkJwcodeFormat: '请检查精网号格式',
rejectReasonPlaceholder: '请输入驳回理由', rejectReasonPlaceholder: '请输入驳回理由',
rejectSuccess: '驳回成功', rejectSuccess: '驳回成功',
rejectFailed: '驳回失败', rejectFailed: '驳回失败',
operationFailed: '操作失败', operationFailed: '操作失败',
approveSuccess: '审核通过成功', approveSuccess: '审核通过成功',
approveFailed: '审核通过失败', 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: { // 按照项目文件名分配 audit: { // 按照项目文件名分配
// 审核通用 ---------------------------------
// 审核通用 ----------------------------------------------------------
refundTypeOptions: { refundTypeOptions: {
'商品退款': '商品退款', '商品退款': '商品退款',
'金币退款': '金币退款', '金币退款': '金币退款',
@ -90,13 +215,11 @@ export default {
// 审核通用-金豆审核列表字段补充 // 审核通用-金豆审核列表字段补充
permanentBean: '付费金豆', permanentBean: '付费金豆',
freeBean: '免费金豆', freeBean: '免费金豆',
// 金币充值审核 -------------------------------- // 金币充值审核 --------------------------------
rechargeAudit: '充值审核', rechargeAudit: '充值审核',
rechargeSGD: '充值新币', rechargeSGD: '充值新币',
totalGold: '总金币数', totalGold: '总金币数',
// 添加支付方式翻译
// 添加支付方式
payMethods: { payMethods: {
bankTransfer: '银行转账', bankTransfer: '银行转账',
cash: '现金', cash: '现金',
@ -113,7 +236,7 @@ export default {
// 金币退款审核 -------------------------------- // 金币退款审核 --------------------------------
refundAudit: '退款审核', refundAudit: '退款审核',
refundTotalGold: '退款总金币数', refundTotalGold: '退款总金币数',
// 金豆审核 ---------------------------------
// 金豆审核 ------------------------------------
totalNum: '总条数', totalNum: '总条数',
totalBean: '总金豆数', totalBean: '总金豆数',
permanentBean: '付费金豆', permanentBean: '付费金豆',
@ -122,4 +245,30 @@ export default {
rejectRecord: '驳回该记录!', rejectRecord: '驳回该记录!',
passRecord: '通过该记录!', 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: '其他'
},
},
} }

197
src/views/recharge/gold/addCoinRecharge.vue

@ -7,6 +7,9 @@ import API from '@/util/http.js'
import moment from 'moment' import moment from 'moment'
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import Decimal from 'decimal.js'; import Decimal from 'decimal.js';
//
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
// fixedAdminId // fixedAdminId
// const fixedAdminId = 1; // const fixedAdminId = 1;
@ -23,11 +26,11 @@ const beforeAvatarUpload = (file) => {
const isLt1M = file.size / 1024 / 1024 < 1; const isLt1M = file.size / 1024 / 1024 < 1;
if (!isImage) { if (!isImage) {
ElMessage.error('只能上传 JPG/PNG 图片!');
ElMessage.error(t('elmessage.onlyUploadJPGPNG'));
return false; return false;
} }
if (!isLt1M) { if (!isLt1M) {
ElMessage.error('图片大小不能超过 1MB!');
ElMessage.error(t('elmessage.limitImageSize'));
return false; return false;
} }
return true; return true;
@ -124,7 +127,7 @@ const add = async function () {
// //
console.log('请求成功', result) console.log('请求成功', result)
// //
ElMessage.success('添加成功')
ElMessage.success(t('elmessage.addSuccess'))
// //
deleteRecharge() deleteRecharge()
user.value = {} user.value = {}
@ -199,7 +202,7 @@ const addBefore = () => {
if (!valid) { if (!valid) {
ElMessage({ ElMessage({
type: 'error', type: 'error',
message: '请检查输入内容'
message: t('elmessage.checkInputContent')
}); });
return; return;
} }
@ -208,7 +211,7 @@ const addBefore = () => {
if (Number(recharge.value.permanentGold) === 0 && Number(recharge.value.freeGold) === 0) { if (Number(recharge.value.permanentGold) === 0 && Number(recharge.value.freeGold) === 0) {
ElMessage({ ElMessage({
type: 'error', type: 'error',
message: '永久金币和免费金币不能同时为0'
message: t('elmessage.permanentAndFreeNoZero')
}); });
return; return;
} }
@ -217,7 +220,7 @@ const addBefore = () => {
if (!recharge.value.rateName) { if (!recharge.value.rateName) {
ElMessage({ ElMessage({
type: 'error', type: 'error',
message: '请选择币种'
message: t('elmessage.checkRate')
}); });
return; return;
} }
@ -226,7 +229,7 @@ const addBefore = () => {
if (!recharge.value.money) { if (!recharge.value.money) {
ElMessage({ ElMessage({
type: 'error', type: 'error',
message: '请输入充值金额'
message: t('elmessage.checkMoney')
}); });
return; return;
} }
@ -240,7 +243,7 @@ const addBefore = () => {
// //
if (!user.value.jwcode) { if (!user.value.jwcode) {
ElMessage.warning('请先查询用户信息')
ElMessage.warning(t('elmessage.checkUserInfo'))
return return
} }
@ -270,19 +273,19 @@ const rules = reactive({
jwcode: [{ jwcode: [{
required: true, validator: (rule, value, callback) => { required: true, validator: (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error('精网号不能为空'));
callback(new Error(t('elmessage.noEmptyJwcode')));
return; return;
} }
if (/[^0-9]/.test(value)) { if (/[^0-9]/.test(value)) {
callback(new Error('精网号只能包含数字'));
callback(new Error(t('elmessage.limitDigitJwcode')));
return; return;
} }
callback(); callback();
}, trigger: 'blur' }, trigger: 'blur'
}], }],
activity: [{required: true, message: '请输入活动名称', trigger: 'blur'}],
activity: [{required: true, message: t('elmessage.checkActivity'), trigger: 'blur'}],
permanentGold: [ permanentGold: [
{required: true, message: '请输入永久金币数', trigger: 'change'},
{required: true, message: t('elmessage.checkPermanentGold'), trigger: 'change'},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value) { if (!value) {
@ -290,14 +293,14 @@ const rules = reactive({
} }
// //
if (/[^0-9.]/.test(value)) { if (/[^0-9.]/.test(value)) {
callback(new Error('不能包含特殊符号或负数'));
callback(new Error(t('elmessage.limitNoSpecialChar')));
return; return;
} }
// //
const integerPart = value.split('.')[0]; const integerPart = value.split('.')[0];
if (integerPart.length > 6) { if (integerPart.length > 6) {
callback(new Error('整数位数不能超过6位'));
callback(new Error(t('elmessage.limitSix')));
return; return;
} }
@ -305,16 +308,16 @@ const rules = reactive({
if (value.includes('.')) { if (value.includes('.')) {
const decimalPart = value.split('.')[1]; const decimalPart = value.split('.')[1];
if (decimalPart.length > 2) { if (decimalPart.length > 2) {
callback(new Error('小数位数不能超过两位'));
callback(new Error(t('elmessage.limitTwoDecimal')));
return; return;
} }
} }
const numValue = Number(value); const numValue = Number(value);
if (isNaN(numValue)) { if (isNaN(numValue)) {
callback(new Error('请输入有效的数字'));
callback(new Error(t('elmessage.checkNumber')));
} else if (numValue < 0) { } else if (numValue < 0) {
callback(new Error('输入金额不能小于0'));
callback(new Error(t('elmessage.limitZero')));
} else { } else {
callback(); callback();
} }
@ -323,7 +326,7 @@ const rules = reactive({
} }
], ],
freeGold: [ freeGold: [
{required: true, message: '请输入免费金币数', trigger: 'change'},
{required: true, message: t('elmessage.checkFreeGold'), trigger: 'change'},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value) { if (!value) {
@ -331,14 +334,14 @@ const rules = reactive({
} }
// //
if (/[^0-9.]/.test(value)) { if (/[^0-9.]/.test(value)) {
callback(new Error('不能包含特殊符号或负数'));
callback(new Error(t('elmessage.limitNoSpecialChar')));
return; return;
} }
// //
const integerPart = value.split('.')[0]; const integerPart = value.split('.')[0];
if (integerPart.length > 6) { if (integerPart.length > 6) {
callback(new Error('整数位数不能超过6位'));
callback(new Error(t('elmessage.limitSix')));
return; return;
} }
@ -346,16 +349,16 @@ const rules = reactive({
if (value.includes('.')) { if (value.includes('.')) {
const decimalPart = value.split('.')[1]; const decimalPart = value.split('.')[1];
if (decimalPart.length > 2) { if (decimalPart.length > 2) {
callback(new Error('小数位数不能超过两位'));
callback(new Error(t('elmessage.limitTwoDecimal')));
return; return;
} }
} }
const numValue = Number(value); const numValue = Number(value);
if (isNaN(numValue)) { if (isNaN(numValue)) {
callback(new Error('请输入有效的数字'));
callback(new Error(t('elmessage.checkNumber')));
} else if (numValue < 0) { } else if (numValue < 0) {
callback(new Error('输入金额不能小于0'));
callback(new Error(t('elmessage.limitZero')));
} else { } else {
callback(); callback();
} }
@ -365,24 +368,24 @@ const rules = reactive({
], ],
rateName: [{ rateName: [{
required: true, required: true,
message: '请选择货币名称',
message: t('elmessage.checkRate'),
trigger: 'blur' trigger: 'blur'
}], }],
money: [ money: [
{required: true, message: '请输入充值金额', trigger: 'blur'},
{required: true, message: t('elmessage.checkMoney'), trigger: 'blur'},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
// //
if (/[^0-9.]/.test(value)) { if (/[^0-9.]/.test(value)) {
callback(new Error('不能包含特殊符号或负数'));
callback(new Error(t('elmessage.limitNoSpecialChar')));
return; return;
} }
// //
const integerPart = value.split('.')[0]; const integerPart = value.split('.')[0];
if (integerPart.length > 6) { if (integerPart.length > 6) {
callback(new Error('整数位数不能超过6位'));
callback(new Error(t('elmessage.limitSix')));
return; return;
} }
@ -390,16 +393,16 @@ const rules = reactive({
if (value.includes('.')) { if (value.includes('.')) {
const decimalPart = value.split('.')[1]; const decimalPart = value.split('.')[1];
if (decimalPart.length > 2) { if (decimalPart.length > 2) {
callback(new Error('小数位数不能超过两位'));
callback(new Error(t('elmessage.limitTwoDecimal')));
return; return;
} }
} }
const numValue = Number(value); const numValue = Number(value);
if (isNaN(numValue)) { if (isNaN(numValue)) {
callback(new Error('请输入有效的数字'));
callback(new Error(t('elmessage.checkNumber')));
} else if (numValue < 0) { } else if (numValue < 0) {
callback(new Error('输入金额不能小于0'));
callback(new Error(t('elmessage.limitZero')));
} else { } else {
callback(); callback();
} }
@ -407,8 +410,8 @@ const rules = reactive({
trigger: 'blur' 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(); trimJwCode();
// //
if (!jwcode) { if (!jwcode) {
ElMessage.warning('精网号不能为空');
ElMessage.warning(t('elmessage.noEmptyJwcode'));
return; return;
} }
// //
if (!/^\d{1,9}$/.test(jwcode)) { if (!/^\d{1,9}$/.test(jwcode)) {
ElMessage.warning('精网号必须为数字且不超过九位');
ElMessage.warning(t('elmessage.limitJwcodeNine'));
deleteRecharge() deleteRecharge()
return; return;
} }
@ -440,15 +443,15 @@ const getUser = async function (jwcode) {
if (result.code === 0) { if (result.code === 0) {
ElMessage.error(result.msg); ElMessage.error(result.msg);
} else if (result.data === null) { } else if (result.data === null) {
ElMessage.error("用户不存在");
ElMessage.error(t('elmessage.noUser'));
} else { } else {
user.value = result.data; user.value = result.data;
console.log("用户信息", user.value); console.log("用户信息", user.value);
ElMessage.success("查询成功");
ElMessage.success(t('elmessage.searchSuccess'));
} }
} catch (error) { } catch (error) {
console.log("请求失败", 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) { if (response.data.code === 200 && response.data.data) {
// //
handleAvatarSuccess(response.data, options.file); handleAvatarSuccess(response.data, options.file);
ElMessage.success('上传成功');
ElMessage.success(t('elmessage.uploadSuccess'));
} else { } else {
ElMessage.error(response.data.msg || '上传失败');
ElMessage.error(response.data.msg || t('elmessage.uploadFailed'));
} }
} catch (error) { } catch (error) {
console.error('上传错误:', 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 = [ const payModel = [
{ {
value: '银行转账', value: '银行转账',
label: '银行转账'
label: t('audit.payMethods.bankTransfer')
}, },
{ {
value: '现金', value: '现金',
label: '现金'
label: t('audit.payMethods.cash')
}, },
{ {
value: '支票', value: '支票',
label: '支票'
label: t('audit.payMethods.check')
}, },
{ {
value: '刷卡', value: '刷卡',
label: '刷卡'
label: t('audit.payMethods.card')
}, },
{ {
value: 'Grabpay', value: 'Grabpay',
label: 'Grabpay'
label: t('audit.payMethods.grabpay')
}, },
{ {
value: 'Nets', value: 'Nets',
label: 'Nets'
label: t('audit.payMethods.nets')
}, },
{ {
value: 'PayPal', value: 'PayPal',
label: 'PayPal'
label: t('audit.payMethods.paypal')
}, },
{ {
value: 'Stripe-链接收款', value: 'Stripe-链接收款',
label: 'Stripe-链接收款'
label: t('audit.payMethods.stripe')
}, },
{ {
value: 'Ipay88-链接收款', value: 'Ipay88-链接收款',
label: 'Ipay88-链接收款'
label: t('audit.payMethods.ipay88')
}, },
{ {
value: 'PaymentAsia-链接收款', value: 'PaymentAsia-链接收款',
label: 'PaymentAsia-链接收款'
label: t('audit.payMethods.paymentAsia')
}, },
{ {
value: '其他', value: '其他',
label: '其他'
label: t('audit.payMethods.other')
} }
] ]
@ -640,24 +643,24 @@ onMounted(() => {
<div class="left"> <div class="left">
<el-form :model="recharge" ref="Ref" :rules="rules" label-width="auto" label-position="right" <el-form :model="recharge" ref="Ref" :rules="rules" label-width="auto" label-position="right"
style="min-width: 420px" class="add-form"> style="min-width: 420px" class="add-form">
<el-form-item prop="jwcode" label="精网号">
<el-form-item prop="jwcode" :label="$t('common_add.jwcode')">
<el-input v-model="recharge.jwcode" style="width: 220px"/> <el-input v-model="recharge.jwcode" style="width: 220px"/>
<el-button type="primary" @click="getUser(recharge.jwcode)" style="margin-left: 20px">查询</el-button>
<el-button type="primary" @click="getUser(recharge.jwcode)" style="margin-left: 20px">{{ $t('common.search') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="activity" label="活动名称">
<el-input v-model="recharge.activity" placeholder="请输入活动名称" style="width: 300px"/>
<el-form-item prop="activity" :label="$t('common_add.activity')">
<el-input v-model="recharge.activity" :placeholder="$t('common_add.activityPlaceholder')" style="width: 300px"/>
</el-form-item> </el-form-item>
<el-form-item prop="permanentGold" label="永久金币">
<el-form-item prop="permanentGold" :label="$t('common_add.permanentGold')">
<el-input v-model="recharge.permanentGold" placeholder="0" style="width: 100px"/> <el-input v-model="recharge.permanentGold" placeholder="0" style="width: 100px"/>
<p>&nbsp;</p> <p>&nbsp;</p>
</el-form-item> </el-form-item>
<el-form-item prop="freeGold" label="免费金币">
<el-form-item prop="freeGold" :label="$t('common_add.freeGold')">
<el-input v-model="recharge.freeGold" placeholder="0" style="width: 100px"/> <el-input v-model="recharge.freeGold" placeholder="0" style="width: 100px"/>
<p>&nbsp;</p> <p>&nbsp;</p>
</el-form-item> </el-form-item>
<el-form-item label="充值金额" required>
<el-form-item :label="$t('common_add.rechargeAmount')" required>
<el-form-item prop="rateName" style="display: inline-block; margin-left:0;"> <el-form-item prop="rateName" style="display: inline-block; margin-left:0;">
<el-select v-model="recharge.rateName" placeholder="货币名称" style="width: 100px">
<el-select v-model="recharge.rateName" :placeholder="$t('common_add.currencyName')" style="width: 100px">
<el-option v-for="item in rateName" :key="item.value" :label="item.label" :value="item.value"/> <el-option v-for="item in rateName" :key="item.value" :label="item.label" :value="item.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -666,16 +669,16 @@ onMounted(() => {
</el-form-item> </el-form-item>
</el-form-item> </el-form-item>
<el-form-item prop="payModel" label="收款方式">
<el-select v-model="recharge.payModel" placeholder="请选择" style="width: 300px">
<el-form-item prop="payModel" :label="$t('common_add.payModel')">
<el-select v-model="recharge.payModel" :placeholder="$t('common_add.payModelPlaceholder')" style="width: 300px">
<el-option v-for="item in payModel" :key="item.value" :label="item.label" :value="item.value"/> <el-option v-for="item in payModel" :key="item.value" :label="item.label" :value="item.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="payTime" label="交款时间">
<el-form-item prop="payTime" :label="$t('common_add.paymentTime')">
<!-- 修改 type 属性为 datetime 以支持时分秒选择 --> <!-- 修改 type 属性为 datetime 以支持时分秒选择 -->
<el-date-picker v-model="recharge.payTime" type="datetime" style="width: 300px"/> <el-date-picker v-model="recharge.payTime" type="datetime" style="width: 300px"/>
</el-form-item> </el-form-item>
<el-form-item prop="voucher" label="交款凭证" style="margin-bottom: 5px">
<el-form-item prop="voucher" :label="$t('common_add.paymentVoucher')" style="margin-bottom: 5px">
<el-upload :http-request="customUpload" class="avatar-uploader" :show-file-list="false" <el-upload :http-request="customUpload" class="avatar-uploader" :show-file-list="false"
:before-upload="beforeAvatarUpload" style="width: 100px; height: 115px"> :before-upload="beforeAvatarUpload" style="width: 100px; height: 115px">
<img v-if="imageUrl" :src="imageUrl" class="avatar" style="width: 100px; height: 115px"/> <img v-if="imageUrl" :src="imageUrl" class="avatar" style="width: 100px; height: 115px"/>
@ -684,16 +687,16 @@ onMounted(() => {
</el-icon> </el-icon>
</el-upload> </el-upload>
<p style="margin-left: 10px; color: rgb(177, 176, 176)"> <p style="margin-left: 10px; color: rgb(177, 176, 176)">
仅支持.jpg .png格式文件1MB
{{ $t('common_add.paymentVoucherPlaceholder') }}
</p> </p>
</el-form-item> </el-form-item>
<el-form-item prop="remark" label="备注">
<el-form-item prop="remark" :label="$t('common_add.remark')">
<el-input v-model="recharge.remark" style="width: 300px" :rows="4" maxlength="100" show-word-limit <el-input v-model="recharge.remark" style="width: 300px" :rows="4" maxlength="100" show-word-limit
type="textarea"/> type="textarea"/>
</el-form-item> </el-form-item>
<el-button @click="deleteRecharge" style="margin-left: 220px;margin-top:20px" type="success">重置</el-button>
<el-button type="primary" style="margin-top:20px" :disabled="addDisabled" @click="addBefore"> 提交</el-button>
<el-button @click="deleteRecharge" style="margin-left: 220px;margin-top:20px" type="success">{{ $t('common.reset') }}</el-button>
<el-button type="primary" style="margin-top:20px" :disabled="addDisabled" @click="addBefore"> {{ $t('common.confirm') }}</el-button>
</el-form> </el-form>
</div> </div>
@ -701,28 +704,28 @@ onMounted(() => {
<!-- 客户信息栏 --> <!-- 客户信息栏 -->
<el-card v-if="user.jwcode" style="width: 800px; float: right" class="customer-info"> <el-card v-if="user.jwcode" style="width: 800px; float: right" class="customer-info">
<el-form :model="user" label-width="auto" style="max-width: 1000px" label-position="left"> <el-form :model="user" label-width="auto" style="max-width: 1000px" label-position="left">
<el-text size="large" style="margin-left: 20px">客户信息</el-text>
<el-text size="large" style="margin-left: 20px">{{ $t('common_add_user.customerInfo') }}</el-text>
<!-- 第一行姓名 + 历史金币 --> <!-- 第一行姓名 + 历史金币 -->
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="姓名">
<el-form-item :label="$t('common_add_user.name')">
<p>{{ user.name }}</p> <p>{{ user.name }}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-form-item label="当前金币总数" style="width: 500px">
<el-form-item :label="$t('common_add_user.currentGoldCoinTotal')" style="width: 500px">
<span style="color: #2fa1ff; margin-right: 5px" v-if="user.nowSumGold !== undefined">{{ <span style="color: #2fa1ff; margin-right: 5px" v-if="user.nowSumGold !== undefined">{{
user.nowSumGold user.nowSumGold
}}</span> }}</span>
</el-form-item> </el-form-item>
<!-- 金币详情独立显示 --> <!-- 金币详情独立显示 -->
<el-form-item style="margin-top: -23px"> <!-- 负边距减少间距 --> <el-form-item style="margin-top: -23px"> <!-- 负边距减少间距 -->
<span style="color: #b1b1b1; margin-left: 0px" v-if="user.nowPermanentGold !== undefined">(永久金币:{{
<span style="color: #b1b1b1; margin-left: 0px" v-if="user.nowPermanentGold !== undefined">({{ $t('common_add_user.permanentGold') }}:{{
user.nowPermanentGold user.nowPermanentGold
}}; }};
免费金币:{{ user.nowFreeGold }};
任务金币:{{ user.nowTaskGold }})</span>
{{ $t('common_add_user.freeGold') }}:{{ user.nowFreeGold }};
{{ $t('common_add_user.taskGold') }}:{{ user.nowTaskGold }})</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -730,16 +733,16 @@ onMounted(() => {
<!-- 第二行精网号 + 当前金币独立行 --> <!-- 第二行精网号 + 当前金币独立行 -->
<el-row> <el-row>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="精网号">
<el-form-item :label="$t('common_add_user.jwcode')">
<p>{{ user.jwcode }}</p> <p>{{ user.jwcode }}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-form-item label="消费次数">
<el-form-item :label="$t('common_add_user.consumptionTimes')">
<p style="color: #2fa1ff">{{ user.consumeNum }} </p> <p style="color: #2fa1ff">{{ user.consumeNum }} </p>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: -23px"> <!-- 负边距减少间距 --> <el-form-item style="margin-top: -23px"> <!-- 负边距减少间距 -->
<p style="font-size: small; color: #b1b1b1">(仅统计2025-01-01后的数据)</p>
<p style="font-size: small; color: #b1b1b1">({{ $t('common_add_user.onlyStatisticsDataAfter20250101') }})</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -759,7 +762,7 @@ onMounted(() => {
<!-- 第四行消费次数 + 所属门店 --> <!-- 第四行消费次数 + 所属门店 -->
<el-row> <el-row>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="所属门店">
<el-form-item :label="$t('common_add_user.store')">
<p>{{ user.market }}</p> <p>{{ user.market }}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -770,39 +773,39 @@ onMounted(() => {
</div> </div>
<el-dialog v-model="FirstRechargeDialogVisible" title="操作确认"
<el-dialog v-model="FirstRechargeDialogVisible" :title="$t('common_add.operationConfirm')"
:before-close="FirstRechargeDialogVisiblehandleClose" :before-close="FirstRechargeDialogVisiblehandleClose"
:close-on-click-modal="false" width="400px"> :close-on-click-modal="false" width="400px">
<!-- 内容整体居中且收窄 --> <!-- 内容整体居中且收窄 -->
<div class="confirm-body"> <div class="confirm-body">
<!-- 用户信息 --> <!-- 用户信息 -->
<div> <div>
<div class="field-label">用户信息</div>
<div class="field-label">{{ $t('common_add.userInfo') }}</div>
<el-input :model-value="user.jwcode + (user.name ? '' + user.name + '' : '')" disabled/> <el-input :model-value="user.jwcode + (user.name ? '' + user.name + '' : '')" disabled/>
</div> </div>
<!-- 活动名称 --> <!-- 活动名称 -->
<div class="field"> <div class="field">
<div class="field-label">活动名称</div>
<div class="field-label">{{ $t('common_add.activity') }}</div>
<el-input v-model="recharge.activity" disabled/> <el-input v-model="recharge.activity" disabled/>
</div> </div>
<!-- 金币信息同一行左右排列 --> <!-- 金币信息同一行左右排列 -->
<el-row :gutter="20" class="coins-row"> <el-row :gutter="20" class="coins-row">
<el-col :span="12"> <el-col :span="12">
<div class="field"> <div class="field">
<div class="field-label">永久金币</div>
<div class="field-label">{{ $t('common_add.permanentGold') }}</div>
<el-input v-model="recharge.permanentGold" disabled/> <el-input v-model="recharge.permanentGold" disabled/>
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="field"> <div class="field">
<div class="field-label">免费金币</div>
<div class="field-label">{{ $t('common_add.freeGold') }}</div>
<el-input v-model="recharge.freeGold" disabled/> <el-input v-model="recharge.freeGold" disabled/>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="field"> <div class="field">
<div class="field-label">备注</div>
<div class="field-label">{{ $t('common_add.remark') }}</div>
<el-input v-model="recharge.remark" disabled/> <el-input v-model="recharge.remark" disabled/>
</div> </div>
@ -812,37 +815,37 @@ onMounted(() => {
<!-- 底部按钮居中 --> <!-- 底部按钮居中 -->
<template #footer> <template #footer>
<div class="dialog-footer-center"> <div class="dialog-footer-center">
<el-button @click="FirstRechargeDialogVisibleCancel"> </el-button>
<el-button type="primary" @click="FistRechargeDialogVisibleContinue">确认充值</el-button>
<el-button @click="FirstRechargeDialogVisibleCancel">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="FistRechargeDialogVisibleContinue">{{ $t('common.confirmRecharge') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<el-dialog v-model="RechargeDialogVisible" title="操作确认" :before-close="RechargeDialogVisiblehandleClose"
<el-dialog v-model="RechargeDialogVisible" :title="$t('common_add.operationConfirm')" :before-close="RechargeDialogVisiblehandleClose"
:close-on-click-modal="false" width="480px"> :close-on-click-modal="false" width="480px">
<!-- 内容整体居中且收窄 --> <!-- 内容整体居中且收窄 -->
<div class="confirm-body"> <div class="confirm-body">
<!-- 用户信息 --> <!-- 用户信息 -->
<div> <div>
<div class="field-label">用户信息</div>
<div class="field-label">{{ $t('common_add.userInfo') }}</div>
<el-input :model-value="user.jwcode + (user.name ? '' + user.name + '' : '')" disabled/> <el-input :model-value="user.jwcode + (user.name ? '' + user.name + '' : '')" disabled/>
</div> </div>
<!-- 活动名称 --> <!-- 活动名称 -->
<div class="field"> <div class="field">
<div class="field-label">活动名称</div>
<div class="field-label">{{ $t('common_add.activity') }}</div>
<el-input v-model="recharge.activity" disabled/> <el-input v-model="recharge.activity" disabled/>
</div> </div>
<!-- 金币信息同一行左右排列 --> <!-- 金币信息同一行左右排列 -->
<el-row :gutter="20" class="coins-row"> <el-row :gutter="20" class="coins-row">
<el-col :span="12"> <el-col :span="12">
<div class="field"> <div class="field">
<div class="field-label">永久金币</div>
<div class="field-label">{{ $t('common_add.permanentGold') }}</div>
<el-input v-model="recharge.permanentGold" disabled/> <el-input v-model="recharge.permanentGold" disabled/>
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="field"> <div class="field">
<div class="field-label">免费金币</div>
<div class="field-label">{{ $t('common_add.freeGold') }}</div>
<el-input v-model="recharge.freeGold" disabled/> <el-input v-model="recharge.freeGold" disabled/>
</div> </div>
</el-col> </el-col>
@ -852,17 +855,17 @@ onMounted(() => {
<el-icon :size="24" color="#FFD700"> <el-icon :size="24" color="#FFD700">
<WarnTriangleFilled/> <WarnTriangleFilled/>
</el-icon> </el-icon>
<p>重复充值风险提示</p>
<p>{{ $t('common_add.prompt') }}</p>
</div> </div>
<!-- 记录 + 虚线分隔 --> <!-- 记录 + 虚线分隔 -->
<div> <div>
<el-divider border-style="dashed"/> <el-divider border-style="dashed"/>
<p>检测到该用户近期有相似充值记录</p>
· {{ ReadCookiesTime }} 充值永久金币: {{ recharge.permanentGold }}
免费金币: {{ recharge.freeGold }}(操作人{{ adminData.adminName }})
<p>{{ $t('common_add.similarRechargeRecords') }}</p>
· {{ ReadCookiesTime }} {{ $t('common_add.rechargePermanentGold') }}: {{ recharge.permanentGold }}
{{ $t('common_add.freeGold') }}: {{ recharge.freeGold }}({{ $t('common_add.operator') }}{{ adminData.adminName }})
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<p>是否继续操作</p>
<p>{{ $t('common_add.continueOperation') }}</p>
</div> </div>
</div> </div>
@ -870,8 +873,8 @@ onMounted(() => {
<!-- 底部按钮居中 --> <!-- 底部按钮居中 -->
<template #footer> <template #footer>
<div class="dialog-footer-center"> <div class="dialog-footer-center">
<el-button @click="RechargeDialogVisibleCancel"> </el-button>
<el-button type="primary" @click="RechargeDialogVisibleContinue">确认充值</el-button>
<el-button @click="RechargeDialogVisibleCancel">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="RechargeDialogVisibleContinue">{{ $t('common.confirmRecharge') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>

7
src/views/recharge/gold/coinRecharge.vue

@ -6,13 +6,13 @@
:class="{ 'active-btn': activeTab === 'coinRechargeDetail' }" :class="{ 'active-btn': activeTab === 'coinRechargeDetail' }"
@click="navigateTo('coinRechargeDetail')" @click="navigateTo('coinRechargeDetail')"
v-if="hasDetail"> v-if="hasDetail">
金币充值明细
{{ $t('recharge.coinRechargeDetail') }}
</el-button> </el-button>
<el-button class="no-active-btn" <el-button class="no-active-btn"
:class="{ 'active-btn': activeTab === 'addCoinRecharge' }" :class="{ 'active-btn': activeTab === 'addCoinRecharge' }"
@click="navigateTo('addCoinRecharge')" @click="navigateTo('addCoinRecharge')"
v-if="hasAdd"> v-if="hasAdd">
新增充值
{{ $t('recharge.addCoinRecharge') }}
</el-button> </el-button>
</el-button-group> </el-button-group>
</div> </div>
@ -25,6 +25,9 @@ import {useRoute, useRouter} from 'vue-router';
import {storeToRefs} from "pinia"; import {storeToRefs} from "pinia";
import {useAdminStore} from "@/store/index.js"; import {useAdminStore} from "@/store/index.js";
import {hasMenuPermission, permissionMapping} from "@/utils/menuTreePermission.js"; import {hasMenuPermission, permissionMapping} from "@/utils/menuTreePermission.js";
//
import { useI18n } from 'vue-i18n';
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();

121
src/views/recharge/gold/coinRechargeDetail.vue

@ -9,6 +9,9 @@ import { storeToRefs } from 'pinia'
import { useAdminStore } from '@/store/index.js' import { useAdminStore } from '@/store/index.js'
const adminStore = useAdminStore() const adminStore = useAdminStore()
const { flag } = storeToRefs(adminStore) const { flag } = storeToRefs(adminStore)
//
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
// //
// const showEmployeeData = ref(false) // const showEmployeeData = ref(false)
@ -229,7 +232,7 @@ const getActivity = async function () {
activity.value = result.data.map(item => ({ value: item, label: item })); activity.value = result.data.map(item => ({ value: item, label: item }));
} else { } else {
console.error('活动数据格式错误', result) console.error('活动数据格式错误', result)
ElMessage.error('活动数据格式错误,请联系管理员')
ElMessage.error($t('elmessage.activityFormatError'))
} }
console.log('activity', activity.value) console.log('activity', activity.value)
@ -293,11 +296,11 @@ const getPlatform = async () => {
platform.value = result.data.map(item => ({ value: item, label: item })); platform.value = result.data.map(item => ({ value: item, label: item }));
} else { } else {
console.error('充值方式格式错误', result) console.error('充值方式格式错误', result)
ElMessage.error('充值方式格式错误,请联系管理员')
ElMessage.error($t('elmessage.rechargeFormatError'))
} }
} catch (error) { } catch (error) {
console.error('获取充值方式失败:', error); console.error('获取充值方式失败:', error);
ElMessage.error('获取充值方式失败,请稍后重试');
ElMessage.error($t('elmessage.getRechargeError'))
} finally { } finally {
isLoadingPlatform.value = false isLoadingPlatform.value = false
} }
@ -336,7 +339,7 @@ const get = async function (val) {
// //
if (!numberRegex.test(rechargeUser.value.jwcode)) { if (!numberRegex.test(rechargeUser.value.jwcode)) {
ElMessage.error('请检查精网号格式')
ElMessage.error($t('elmessage.checkJwcodeFormat'))
// //
return return
} }
@ -509,13 +512,13 @@ const exportExcel = async function () {
try { try {
const res = await API({ url: '/export/exportRecharge', data: params }) const res = await API({ url: '/export/exportRecharge', data: params })
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('导出成功')
ElMessage.success($t('elmessage.exportSuccess'))
} else { } else {
ElMessage.error(res.message || '导出失败,请稍后重试')
ElMessage.error(res.message || $t('elmessage.exportFailed'))
} }
} catch (error) { } catch (error) {
console.log('请求失败', error) console.log('请求失败', error)
ElMessage.error('导出失败,请稍后重试')
ElMessage.error($t('elmessage.exportFailed'))
} }
} }
@ -542,11 +545,11 @@ const getExportList = async () => {
}); });
exportList.value = filteredData exportList.value = filteredData
} else { } else {
ElMessage.error(result.msg || '获取导出列表失败')
ElMessage.error(result.msg || $t('elmessage.getExportListError'))
} }
} catch (error) { } catch (error) {
console.error('获取导出列表出错:', error) console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
ElMessage.error($t('elmessage.getExportListError'))
} finally { } finally {
exportListLoading.value = false exportListLoading.value = false
} }
@ -559,7 +562,7 @@ const downloadExportFile = (item) => {
link.download = item.fileName link.download = item.fileName
link.click() link.click()
} else { } else {
ElMessage.warning('文件还在导出中,请稍后再试')
ElMessage.warning($t('elmessage.exportingInProgress'))
} }
} }
// //
@ -581,15 +584,15 @@ const getTagType = (state) => {
const getTagText = (state) => { const getTagText = (state) => {
switch (state) { switch (state) {
case 0: case 0:
return '待执行';
return $t('elmessage.pendingExecution');
case 1: case 1:
return '执行中';
return $t('elmessage.executing');
case 2: case 2:
return '执行完成';
return $t('elmessage.executed');
case 3: case 3:
return '执行出错';
return $t('elmessage.errorExecution');
default: default:
return '未知状态';
return $t('elmessage.unknownStatus');
} }
} }
@ -601,23 +604,23 @@ const getTagText = (state) => {
<el-col style="margin-bottom: 1vh"> <el-col style="margin-bottom: 1vh">
<div class="select"> <div class="select">
<div class="selectRow"> <div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="rechargeUser.jwcode" placeholder="请输入精网号" clearable />
<el-text class="text" size="large">{{ $t('common.jwcode') }}</el-text>
<el-input class="selectContent" v-model="rechargeUser.jwcode" :placeholder="$t('common.jwcodePlaceholder')" clearable />
</div> </div>
<div class="selectRow"> <div class="selectRow">
<el-text class="text" size="large">活动名称</el-text>
<el-select class="selectContent" v-model="rechargeUser.activity" placeholder="请选择活动名称" clearable>
<el-text class="text" size="large">{{ $t('common.activityName') }}</el-text>
<el-select class="selectContent" v-model="rechargeUser.activity" :placeholder="$t('common.activityNamePlaceholder')" clearable>
<el-option v-for="item in activity" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in activity" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
<div class="selectRow" style="width: 15vw;"> <div class="selectRow" style="width: 15vw;">
<el-text class="text" size="large">所属地区</el-text>
<el-cascader class="selectContent" v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区"
<el-text class="text" size="large">{{ $t('common.market') }}</el-text>
<el-cascader class="selectContent" v-model="selectedMarketPath" :options="market" :placeholder="$t('common.marketPlaceholder')"
clearable @change="handleMarketChange" /> clearable @change="handleMarketChange" />
</div> </div>
<div class="selectRow" style="width: 15vw;"> <div class="selectRow" style="width: 15vw;">
<el-text class="text" size="large">充值平台</el-text>
<el-select class="selectContent" v-model="rechargeUser.payPlatform" placeholder="请选择充值平台" clearable>
<el-text class="text" size="large">{{ $t('common.rechargePlatform') }}</el-text>
<el-select class="selectContent" v-model="rechargeUser.payPlatform" :placeholder="$t('common.rechargePlatformPlaceholder')" clearable>
<el-option v-for="item in platform" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in platform" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
@ -627,9 +630,9 @@ const getTagText = (state) => {
<el-col> <el-col>
<div class="select"> <div class="select">
<div class="selectRow" style="width: 36vw;"> <div class="selectRow" style="width: 36vw;">
<el-text class="text" size="large">充值时间</el-text>
<el-date-picker class="selectContent" v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间" end-placeholder="结束时间" style="margin-right:1vw;width:25vw"
<el-text class="text" size="large">{{ $t('common.rechargeTime') }}</el-text>
<el-date-picker class="selectContent" v-model="getTime" type="datetimerange" :range-separator="$t('common.to')"
:start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" style="margin-right:1vw;width:25vw"
@change="handleDatePickerChange" :default-time="defaultTime" :disabled-date="disabledDate" /> @change="handleDatePickerChange" :default-time="defaultTime" :disabled-date="disabledDate" />
<div v-if="false"> <div v-if="false">
<el-button @click="getToday()" style="margin-left: 1vw" <el-button @click="getToday()" style="margin-left: 1vw"
@ -646,10 +649,10 @@ const getTagText = (state) => {
</div> </div>
</div> </div>
<div class="selectRow" style="justify-content: flex-start;"> <div class="selectRow" style="justify-content: flex-start;">
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel()">导出Excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="reset()">重置</el-button>
<el-button type="primary" @click="search()">{{ $t('common.search') }}</el-button>
<el-button type="primary" @click="exportExcel()">{{ $t('common.exportExcel') }}</el-button>
<el-button type="primary" @click="openExportList">{{ $t('common.viewExportList') }}</el-button>
<el-button type="success" @click="reset()">{{ $t('common.reset') }}</el-button>
</div> </div>
</div> </div>
@ -658,41 +661,41 @@ const getTagText = (state) => {
<el-card class="card2"> <el-card class="card2">
<div class="goldStatistics"> <div class="goldStatistics">
充值新币{{ format3(permanentGolds) }}新币&nbsp;&nbsp;&nbsp;&nbsp;
总金币数{{ format3(permanentGolds + freeGolds) }}金币&nbsp;&nbsp;&nbsp;&nbsp;
永久金币{{ format3(permanentGolds) }}金币&nbsp;&nbsp;&nbsp;&nbsp;
免费金币{{ format3(freeGolds) }}金币
{{ $t('common.rechargeSGD') }}{{ format3(permanentGolds) }} {{ $t('common.SGD') }}&nbsp;&nbsp;&nbsp;&nbsp;
{{ $t('common.totalGoldCoin') }}{{ format3(permanentGolds + freeGolds) }} {{ $t('common.goldCoin') }}&nbsp;&nbsp;&nbsp;&nbsp;
{{ $t('common.permanentGold') }}{{ format3(permanentGolds) }} {{ $t('common.goldCoin') }}&nbsp;&nbsp;&nbsp;&nbsp;
{{ $t('common.freeGold') }}{{ format3(freeGolds) }} {{ $t('common.goldCoin') }}
</div> </div>
<!-- 设置表格容器的高度和滚动样式 --> <!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 66vh;"> <div style="height: 66vh;">
<el-table :data="tableData" height="66vh" @sort-change="handleSortChange"> <el-table :data="tableData" height="66vh" @sort-change="handleSortChange">
<el-table-column type="index" label="序号" width="80px" fixed="left">
<el-table-column type="index" :label="$t('common_list.id')" width="80px" fixed="left">
<template #default="scope"> <template #default="scope">
<span>{{ <span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="left" prop="name" label="姓名" width="150px" />
<el-table-column fixed="left" prop="jwcode" label="精网号" width="110px" />
<el-table-column prop="market" label="所属地区" width="100px" />
<el-table-column prop="activity" label="活动名称" width="110px" show-overflow-tooltip />
<el-table-column prop="rateName" label="货币名称" width="110px" />
<el-table-column prop="money" sortable="custom" label="充值金额" width="110px" />
<el-table-column prop="permanentGold" label="永久金币" sortable="custom" width="110px" />
<el-table-column prop="freeGold" label="免费金币" sortable="custom" width="110px" />
<el-table-column prop="payPlatform" label="充值平台" width="110px" />
<el-table-column prop="payModel" label="支付方式" width="100px" />
<el-table-column prop="remark" label="备注" width="150px" show-overflow-tooltip />
<el-table-column prop="isRefund" label="订单状态" width="200px" show-overflow-tooltip>
<el-table-column fixed="left" prop="name" :label="$t('common_list.name')" width="150px" />
<el-table-column fixed="left" prop="jwcode" :label="$t('common_list.jwcode')" width="110px" />
<el-table-column prop="market" :label="$t('common_list.market')" width="100px" />
<el-table-column prop="activity" :label="$t('common_list.activity')" width="110px" show-overflow-tooltip />
<el-table-column prop="rateName" :label="$t('common_list.rateName')" width="110px" />
<el-table-column prop="money" sortable="custom" :label="$t('common_list.rechargeAmount')" width="110px" />
<el-table-column prop="permanentGold" :label="$t('common_list.permanentGold')" sortable="custom" width="110px" />
<el-table-column prop="freeGold" :label="$t('common_list.freeGold')" sortable="custom" width="110px" />
<el-table-column prop="payPlatform" :label="$t('common_list.rechargePlatform')" width="110px" />
<el-table-column prop="payModel" :label="$t('common_list.payModel')" width="100px" />
<el-table-column prop="remark" :label="$t('common_list.remark')" width="150px" show-overflow-tooltip />
<el-table-column prop="isRefund" :label="$t('common_list.orderStatus')" width="200px" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.isRefund == 0">正常</span>
<span v-else-if="scope.row.isRefund == 1">已退款</span>
<span v-else>未知状态</span>
<span v-if="scope.row.isRefund == 0">{{ $t('recharge.normal') }}</span>
<span v-else-if="scope.row.isRefund == 1">{{ $t('recharge.refunded') }}</span>
<span v-else>{{ $t('recharge.unknown') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="adminName" label="提交人" width="100px" />
<el-table-column prop="auditTime" sortable label="充值时间" width="200px">
<el-table-column prop="adminName" :label="$t('common_list.submitter')" width="100px" />
<el-table-column prop="auditTime" sortable :label="$t('common_list.rechargeTime')" width="200px">
<template #default="scope"> <template #default="scope">
{{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }} {{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
@ -709,33 +712,33 @@ const getTagText = (state) => {
</el-card> </el-card>
<!-- 导出弹窗 --> <!-- 导出弹窗 -->
<el-dialog v-model="exportListVisible" title="导出列表" width="80%">
<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 :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<el-table-column prop="fileName" :label="$t('common_export.fileName')" />
<el-table-column prop="state" :label="$t('common_export.status')">
<template #default="scope"> <template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> <el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }} {{ getTagText(scope.row.state) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createTime" :label="$t('common_export.createTime')">
<template #default="scope"> <template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} {{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作">
<el-table-column :label="$t('common_export.operation')">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" <el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2"> :disabled="scope.row.state !== 2">
下载
{{ $t('common_export.download') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
<el-button text @click="exportListVisible = false">{{ $t('common_export.close') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>

Loading…
Cancel
Save