|
@ -16,7 +16,7 @@ import throttle from 'lodash/throttle' |
|
|
// 精网号去空格 |
|
|
// 精网号去空格 |
|
|
const trimJwCode = () => { |
|
|
const trimJwCode = () => { |
|
|
if (recharge.value.jwcode) { |
|
|
if (recharge.value.jwcode) { |
|
|
recharge.value.jwcode = recharge.value.jwcode.replace(/\s/g, ''); |
|
|
|
|
|
|
|
|
recharge.value.jwcode = recharge.value.jwcode.replace(/\s/g, ''); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 上传图片前的验证函数 |
|
|
// 上传图片前的验证函数 |
|
@ -77,9 +77,9 @@ const recharge = ref({ |
|
|
const add = async function () { |
|
|
const add = async function () { |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
const formattedRecharge = { ...recharge.value} |
|
|
|
|
|
|
|
|
const formattedRecharge = { ...recharge.value } |
|
|
|
|
|
|
|
|
// 将永久金币数、免费金币数和充值金额数乘以 100 |
|
|
|
|
|
|
|
|
// 将永久金币数、免费金币数和充值金额数乘以 100 |
|
|
if (formattedRecharge.permanentGold) { |
|
|
if (formattedRecharge.permanentGold) { |
|
|
formattedRecharge.permanentGold = Number(formattedRecharge.permanentGold) * 100; |
|
|
formattedRecharge.permanentGold = Number(formattedRecharge.permanentGold) * 100; |
|
|
} |
|
|
} |
|
@ -154,7 +154,7 @@ const addBefore = () => { |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if(recharge.value.money == null || recharge.value.money == '' || recharge.value.money == undefined){ |
|
|
|
|
|
|
|
|
if (recharge.value.money == null || recharge.value.money == '' || recharge.value.money == undefined) { |
|
|
ElMessage({ |
|
|
ElMessage({ |
|
|
type: 'error', |
|
|
type: 'error', |
|
|
message: '请输入充值金额' |
|
|
message: '请输入充值金额' |
|
@ -187,21 +187,20 @@ const addBefore = () => { |
|
|
// 表单验证 |
|
|
// 表单验证 |
|
|
// 开始时间改变时,重新验证结束时间 |
|
|
// 开始时间改变时,重新验证结束时间 |
|
|
const Ref = ref(null) |
|
|
const Ref = ref(null) |
|
|
|
|
|
|
|
|
const validateJwCode = (rule, value, callback) => { |
|
|
|
|
|
if (!value) { |
|
|
|
|
|
callback(new Error('精网号不能为空')); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (/[^0-9]/.test(value)) { |
|
|
|
|
|
callback(new Error('精网号只能包含数字')); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
callback(); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const rules = reactive({ |
|
|
const rules = reactive({ |
|
|
jwcode: [{ required: true, validator: validateJwCode, trigger: 'blur' }], |
|
|
|
|
|
|
|
|
jwcode: [{ |
|
|
|
|
|
required: true, validator: (rule, value, callback) => { |
|
|
|
|
|
if (!value) { |
|
|
|
|
|
callback(new Error('精网号不能为空')); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (/[^0-9]/.test(value)) { |
|
|
|
|
|
callback(new Error('精网号只能包含数字')); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
callback(); |
|
|
|
|
|
}, trigger: 'blur' |
|
|
|
|
|
}], |
|
|
activity: [{ required: true, message: '请选择活动名称', trigger: 'blur' }], |
|
|
activity: [{ required: true, message: '请选择活动名称', trigger: 'blur' }], |
|
|
permanentGold: [ |
|
|
permanentGold: [ |
|
|
{ required: true, message: '请输入永久金币数', trigger: 'blur' }, |
|
|
{ required: true, message: '请输入永久金币数', trigger: 'blur' }, |
|
@ -219,7 +218,7 @@ const rules = reactive({ |
|
|
callback(new Error('整数位数不能超过6位')); |
|
|
callback(new Error('整数位数不能超过6位')); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 检查小数位数 |
|
|
// 检查小数位数 |
|
|
if (value.includes('.')) { |
|
|
if (value.includes('.')) { |
|
|
const decimalPart = value.split('.')[1]; |
|
|
const decimalPart = value.split('.')[1]; |
|
@ -228,7 +227,7 @@ const rules = reactive({ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const numValue = Number(value); |
|
|
const numValue = Number(value); |
|
|
if (isNaN(numValue)) { |
|
|
if (isNaN(numValue)) { |
|
|
callback(new Error('请输入有效的数字')); |
|
|
callback(new Error('请输入有效的数字')); |
|
@ -280,11 +279,11 @@ const rules = reactive({ |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
rateName: [{ |
|
|
rateName: [{ |
|
|
required: true, |
|
|
|
|
|
message: '请选择货币名称', |
|
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
message: '请选择货币名称', |
|
|
trigger: 'blur' |
|
|
trigger: 'blur' |
|
|
}], |
|
|
}], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
money: [ |
|
|
money: [ |
|
|
{ required: true, message: '请输入充值金额', trigger: 'blur' }, |
|
|
{ required: true, message: '请输入充值金额', trigger: 'blur' }, |
|
|
{ |
|
|
{ |
|
@ -341,7 +340,7 @@ 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) { |
|
@ -365,7 +364,7 @@ const activity = ref([]) |
|
|
// const result = await API({ |
|
|
// const result = await API({ |
|
|
// url: '/general/activity', |
|
|
// url: '/general/activity', |
|
|
// data: { |
|
|
// data: { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
// } |
|
|
// }) |
|
|
// }) |
|
|
|
|
|
|
|
@ -387,7 +386,7 @@ const rateName = [ |
|
|
{ |
|
|
{ |
|
|
value: 'USD', |
|
|
value: 'USD', |
|
|
label: 'USD', |
|
|
label: 'USD', |
|
|
rateId: 1 |
|
|
|
|
|
|
|
|
rateId: 1 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
value: 'HKD', |
|
|
value: 'HKD', |
|
@ -436,14 +435,14 @@ const customUpload = async (options) => { |
|
|
try { |
|
|
try { |
|
|
const formData = new FormData(); |
|
|
const formData = new FormData(); |
|
|
formData.append('file', options.file); |
|
|
formData.append('file', options.file); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const response = await axios.post(import.meta.env.VITE_UPLOAD_URL, formData, { |
|
|
const response = await axios.post(import.meta.env.VITE_UPLOAD_URL, formData, { |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'multipart/form-data', |
|
|
'Content-Type': 'multipart/form-data', |
|
|
'Authorization': `Bearer ${localStorage.getItem('token')}` |
|
|
'Authorization': `Bearer ${localStorage.getItem('token')}` |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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); |
|
@ -463,7 +462,7 @@ const customUpload = async (options) => { |
|
|
const handleAvatarSuccess = (response, file) => { |
|
|
const handleAvatarSuccess = (response, file) => { |
|
|
// 直接使用 file 对象创建 Object URL |
|
|
// 直接使用 file 对象创建 Object URL |
|
|
imageUrl.value = URL.createObjectURL(file); |
|
|
imageUrl.value = URL.createObjectURL(file); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 使用服务器返回的文件路径(根据实际响应结构调整) |
|
|
// 使用服务器返回的文件路径(根据实际响应结构调整) |
|
|
if (response && response.filePath) { |
|
|
if (response && response.filePath) { |
|
|
recharge.value.voucher = response.filePath; |
|
|
recharge.value.voucher = response.filePath; |
|
@ -529,7 +528,7 @@ onMounted(async function () { |
|
|
await getAdminData() |
|
|
await getAdminData() |
|
|
// await getCurrency() |
|
|
// await getCurrency() |
|
|
// await getActivity()// 现在的活动就是文字输入框,不需要请求接口,具体等后续需求 |
|
|
// await getActivity()// 现在的活动就是文字输入框,不需要请求接口,具体等后续需求 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
console.log('上传URL:', import.meta.env.VITE_UPLOAD_URL); |
|
|
console.log('上传URL:', import.meta.env.VITE_UPLOAD_URL); |
|
@ -539,25 +538,12 @@ onMounted(() => { |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
|
|
|
|
|
|
<el-form |
|
|
|
|
|
:model="recharge" |
|
|
|
|
|
ref="Ref" |
|
|
|
|
|
:rules="rules" |
|
|
|
|
|
label-width="auto" |
|
|
|
|
|
style="max-width: 600px" |
|
|
|
|
|
class="add-form" |
|
|
|
|
|
> |
|
|
|
|
|
<el-form-item prop="jwcode" label="精网号"> |
|
|
|
|
|
<el-input v-model="recharge.jwcode" style="width: 220px" /> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
@click="getUser(recharge.jwcode)" |
|
|
|
|
|
style="margin-left: 20px" |
|
|
|
|
|
|
|
|
|
|
|
>查询</el-button |
|
|
|
|
|
> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<!-- <el-form-item prop="activity" label="活动名称"> |
|
|
|
|
|
|
|
|
<el-form :model="recharge" ref="Ref" :rules="rules" label-width="auto" style="max-width: 600px" class="add-form"> |
|
|
|
|
|
<el-form-item prop="jwcode" label="精网号"> |
|
|
|
|
|
<el-input v-model="recharge.jwcode" style="width: 220px" /> |
|
|
|
|
|
<el-button type="primary" @click="getUser(recharge.jwcode)" style="margin-left: 20px">查询</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<!-- <el-form-item prop="activity" label="活动名称"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="recharge.activity" |
|
|
v-model="recharge.activity" |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
@ -572,24 +558,20 @@ onMounted(() => { |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</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> |
|
|
|
|
|
<el-form-item prop="permanentGold" label="永久金币"> |
|
|
|
|
|
<el-input v-model="recharge.permanentGold" style="width: 100px" /> |
|
|
|
|
|
<p>个</p> |
|
|
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="freeGold" label="免费金币"> |
|
|
|
|
|
|
|
|
|
|
|
<el-input v-model="recharge.freeGold" style="width: 100px" /> |
|
|
|
|
|
<p>个</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<!-- <el-form-item label="充值金额"> |
|
|
|
|
|
|
|
|
<el-form-item prop="activity" label="活动名称"> |
|
|
|
|
|
<el-input v-model="recharge.activity" placeholder="请输入活动名称" style="width: 300px" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="permanentGold" label="永久金币"> |
|
|
|
|
|
<el-input v-model="recharge.permanentGold" style="width: 100px" /> |
|
|
|
|
|
<p>个</p> |
|
|
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="freeGold" label="免费金币"> |
|
|
|
|
|
|
|
|
|
|
|
<el-input v-model="recharge.freeGold" style="width: 100px" /> |
|
|
|
|
|
<p>个</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<!-- <el-form-item label="充值金额"> |
|
|
<el-select |
|
|
<el-select |
|
|
prop="moneys" |
|
|
prop="moneys" |
|
|
v-model="rateName" |
|
|
v-model="rateName" |
|
@ -607,203 +589,139 @@ onMounted(() => { |
|
|
<el-input prop="money" v-model="recharge.money" style="width: 200px" aria-required="true"/> |
|
|
<el-input prop="money" v-model="recharge.money" style="width: 200px" aria-required="true"/> |
|
|
</el-form-item> --> |
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
|
<el-form-item label="充值金额" required> |
|
|
|
|
|
<!-- 货币名称 --> |
|
|
|
|
|
<el-form-item prop="rateName" style="display: inline-block; margin-left:0;"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="recharge.rateName" |
|
|
|
|
|
placeholder="货币名称" |
|
|
|
|
|
style="width: 100px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in rateName" |
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 充值金额 --> |
|
|
|
|
|
<el-form-item prop="money" style="display: inline-block; margin-left:10px;"> |
|
|
|
|
|
<el-input v-model="recharge.money" style="width: 190px"/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item prop="payModel" label="收款方式"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="recharge.payModel" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
style="width: 300px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in payModel" |
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="payTime" label="交款时间"> |
|
|
|
|
|
<!-- 修改 type 属性为 datetime 以支持时分秒选择 --> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
v-model="recharge.payTime" |
|
|
|
|
|
type="datetime" |
|
|
|
|
|
style="width: 300px" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
prop="voucher" |
|
|
|
|
|
label="交款凭证" |
|
|
|
|
|
style="margin-bottom: 5px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-upload |
|
|
|
|
|
:http-request="customUpload" |
|
|
|
|
|
class="avatar-uploader" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:before-upload="beforeAvatarUpload" |
|
|
|
|
|
style="width: 100px; height: 115px" |
|
|
|
|
|
> |
|
|
|
|
|
<img |
|
|
|
|
|
v-if="imageUrl" |
|
|
|
|
|
:src="imageUrl" |
|
|
|
|
|
class="avatar" |
|
|
|
|
|
style="width: 100px; height: 115px" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-icon |
|
|
|
|
|
v-else |
|
|
|
|
|
class="avatar-uploader-icon" |
|
|
|
|
|
style="width: 100px; height: 100px" |
|
|
|
|
|
> |
|
|
|
|
|
<Plus /> |
|
|
|
|
|
</el-icon> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<p style="margin-left: 10px; color: rgb(177, 176, 176)"> |
|
|
|
|
|
仅支持.jpg .png格式,文件≤1MB |
|
|
|
|
|
</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="remark" label="备注"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="recharge.remark" |
|
|
|
|
|
style="width: 300px" |
|
|
|
|
|
:rows="2" |
|
|
|
|
|
maxlength="100" |
|
|
|
|
|
show-word-limit |
|
|
|
|
|
type="textarea" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="adminName" label="提交人"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
style="width: 300px" |
|
|
|
|
|
:value="adminData.adminName" |
|
|
|
|
|
disabled |
|
|
|
|
|
placeholder="提交人姓名" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-button @click="deleteRecharge" style="margin-left: 280px" type="success" |
|
|
|
|
|
>重置</el-button |
|
|
|
|
|
> |
|
|
|
|
|
<el-button type="primary" @click="addBefore"> 提交 </el-button> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 客户信息栏 --> |
|
|
|
|
|
<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-text size="large" style="margin-left: 20px">客户信息</el-text> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第一行:姓名 + 历史金币 --> |
|
|
|
|
|
<el-row style="margin-top: 20px"> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="姓名:"> |
|
|
|
|
|
<p>{{ user.name }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="14"> |
|
|
|
|
|
<el-form-item label="历史金币总数"> |
|
|
|
|
|
<!-- 检查 user.historySumGold 是否为有效的数字 --> |
|
|
|
|
|
<p style="color: #2fa1ff; margin-right: 5px" v-if="!isNaN(Number(user.historySumGold))"> |
|
|
|
|
|
{{ Number(user.historySumGold ) /100 }} |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 如果不是有效的数字,显示默认值 --> |
|
|
|
|
|
<p v-else></p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item style="margin-top: -23px"> |
|
|
|
|
|
<span |
|
|
|
|
|
style="display: inline; white-space: nowrap; color: #b1b1b1" |
|
|
|
|
|
v-if="user.historyPermanentGold !== undefined" |
|
|
|
|
|
>(永久金币:{{ user.historyPermanentGold /100 }};免费金币:{{ |
|
|
|
|
|
(user.historyFreeGold) /100 |
|
|
|
|
|
}};任务金币:{{ user.historyTaskGold /100}})</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第二行:精网号 + 当前金币(独立行) --> |
|
|
|
|
|
<el-row style="margin-top:-23px"> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="精网号"> |
|
|
|
|
|
<p>{{ user.jwcode }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="14"> |
|
|
|
|
|
<el-form-item label="当前金币总数" style="width: 500px"> |
|
|
|
|
|
<span |
|
|
|
|
|
style="color: #2fa1ff; margin-right: 5px" |
|
|
|
|
|
v-if="user.nowSumGold !== undefined" |
|
|
|
|
|
>{{ user.nowSumGold /100}}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<!-- 金币详情独立显示 --> |
|
|
|
|
|
<el-form-item style="margin-top: -23px"> <!-- 负边距减少间距 --> |
|
|
|
|
|
<span |
|
|
|
|
|
style="color: #b1b1b1; margin-left: 0px" |
|
|
|
|
|
v-if="user.nowPermanentGold !== undefined" |
|
|
|
|
|
>(永久金币:{{ user.nowPermanentGold /100}}; |
|
|
|
|
|
免费金币:{{ user.nowFreeGold /100}}; |
|
|
|
|
|
任务金币:{{ user.nowTaskGold /100}})</span> |
|
|
|
|
|
|
|
|
<el-form-item label="充值金额" required> |
|
|
|
|
|
<!-- 货币名称 --> |
|
|
|
|
|
<el-form-item prop="rateName" style="display: inline-block; margin-left:0;"> |
|
|
|
|
|
<el-select v-model="recharge.rateName" placeholder="货币名称" style="width: 100px"> |
|
|
|
|
|
<el-option v-for="item in rateName" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第三行:首次充值日期 + 充值次数 --> |
|
|
|
|
|
<el-row style="margin-top:-23px"> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="首次充值日期"> |
|
|
|
|
|
<p v-if="user.firstRecharge"> |
|
|
|
|
|
{{ moment(user.firstRecharge).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
|
|
</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="14"> |
|
|
|
|
|
<el-form-item label="充值次数"> |
|
|
|
|
|
<p style="color: #2fa1ff">{{ user.rechargeNum }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第四行:消费次数 + 所属门店 --> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="消费次数"> |
|
|
|
|
|
<p style="color: #2fa1ff">{{ user.consumeNum }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="所属门店"> |
|
|
|
|
|
<p>{{ user.market }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 充值金额 --> |
|
|
|
|
|
<el-form-item prop="money" style="display: inline-block; margin-left:10px;"> |
|
|
|
|
|
<el-input v-model="recharge.money" style="width: 190px" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item prop="payModel" label="收款方式"> |
|
|
|
|
|
<el-select v-model="recharge.payModel" placeholder="请选择" style="width: 300px"> |
|
|
|
|
|
<el-option v-for="item in payModel" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="payTime" label="交款时间"> |
|
|
|
|
|
<!-- 修改 type 属性为 datetime 以支持时分秒选择 --> |
|
|
|
|
|
<el-date-picker v-model="recharge.payTime" type="datetime" style="width: 300px" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="voucher" label="交款凭证" style="margin-bottom: 5px"> |
|
|
|
|
|
<el-upload :http-request="customUpload" class="avatar-uploader" :show-file-list="false" |
|
|
|
|
|
:before-upload="beforeAvatarUpload" style="width: 100px; height: 115px"> |
|
|
|
|
|
<img v-if="imageUrl" :src="imageUrl" class="avatar" style="width: 100px; height: 115px" /> |
|
|
|
|
|
<el-icon v-else class="avatar-uploader-icon" style="width: 100px; height: 100px"> |
|
|
|
|
|
<Plus /> |
|
|
|
|
|
</el-icon> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<p style="margin-left: 10px; color: rgb(177, 176, 176)"> |
|
|
|
|
|
仅支持.jpg .png格式,文件≤1MB |
|
|
|
|
|
</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="remark" label="备注"> |
|
|
|
|
|
<el-input v-model="recharge.remark" style="width: 300px" :rows="2" maxlength="100" show-word-limit |
|
|
|
|
|
type="textarea" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item prop="adminName" label="提交人"> |
|
|
|
|
|
<el-input style="width: 300px" :value="adminData.adminName" disabled placeholder="提交人姓名" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-button @click="deleteRecharge" style="margin-left: 280px" type="success">重置</el-button> |
|
|
|
|
|
<el-button type="primary" @click="addBefore"> 提交 </el-button> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 客户信息栏 --> |
|
|
|
|
|
<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-text size="large" style="margin-left: 20px">客户信息</el-text> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第一行:姓名 + 历史金币 --> |
|
|
|
|
|
<el-row style="margin-top: 20px"> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="姓名:"> |
|
|
|
|
|
<p>{{ user.name }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="14"> |
|
|
|
|
|
<el-form-item label="历史金币总数"> |
|
|
|
|
|
<!-- 检查 user.historySumGold 是否为有效的数字 --> |
|
|
|
|
|
<p style="color: #2fa1ff; margin-right: 5px" v-if="!isNaN(Number(user.historySumGold))"> |
|
|
|
|
|
{{ Number(user.historySumGold) / 100 }} |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 如果不是有效的数字,显示默认值 --> |
|
|
|
|
|
<p v-else></p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item style="margin-top: -23px"> |
|
|
|
|
|
<span style="display: inline; white-space: nowrap; color: #b1b1b1" |
|
|
|
|
|
v-if="user.historyPermanentGold !== undefined">(永久金币:{{ user.historyPermanentGold / 100 }};免费金币:{{ |
|
|
|
|
|
(user.historyFreeGold) / 100 |
|
|
|
|
|
}};任务金币:{{ user.historyTaskGold / 100 }})</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第二行:精网号 + 当前金币(独立行) --> |
|
|
|
|
|
<el-row style="margin-top:-23px"> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="精网号"> |
|
|
|
|
|
<p>{{ user.jwcode }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="14"> |
|
|
|
|
|
<el-form-item label="当前金币总数" style="width: 500px"> |
|
|
|
|
|
<span style="color: #2fa1ff; margin-right: 5px" v-if="user.nowSumGold !== undefined">{{ user.nowSumGold |
|
|
|
|
|
/100}}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<!-- 金币详情独立显示 --> |
|
|
|
|
|
<el-form-item style="margin-top: -23px"> <!-- 负边距减少间距 --> |
|
|
|
|
|
<span style="color: #b1b1b1; margin-left: 0px" v-if="user.nowPermanentGold !== undefined">(永久金币:{{ |
|
|
|
|
|
user.nowPermanentGold /100}}; |
|
|
|
|
|
免费金币:{{ user.nowFreeGold / 100 }}; |
|
|
|
|
|
任务金币:{{ user.nowTaskGold / 100 }})</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第三行:首次充值日期 + 充值次数 --> |
|
|
|
|
|
<el-row style="margin-top:-23px"> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="首次充值日期"> |
|
|
|
|
|
<p v-if="user.firstRecharge"> |
|
|
|
|
|
{{ moment(user.firstRecharge).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
|
|
</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="14"> |
|
|
|
|
|
<el-form-item label="充值次数"> |
|
|
|
|
|
<p style="color: #2fa1ff">{{ user.rechargeNum }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第四行:消费次数 + 所属门店 --> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="消费次数"> |
|
|
|
|
|
<p style="color: #2fa1ff">{{ user.consumeNum }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="所属门店"> |
|
|
|
|
|
<p>{{ user.market }}</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|