|
|
@ -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> 个</p> |
|
|
<p> 个</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> 个</p> |
|
|
<p> 个</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> |
|
|
|