|
|
|
@ -1,13 +1,16 @@ |
|
|
|
<script setup> |
|
|
|
import {onMounted, reactive, ref, watch} from "vue"; |
|
|
|
import {ElIcon, ElMessage} from "element-plus"; |
|
|
|
import { onMounted, reactive, ref, watch } from "vue"; |
|
|
|
import { ElIcon, ElMessage } from "element-plus"; |
|
|
|
import moment from "moment"; |
|
|
|
import request from "@/util/http.js" |
|
|
|
import Cookies from 'js-cookie'; |
|
|
|
import {useAdminStore} from "@/store/index.js"; |
|
|
|
import {storeToRefs} from "pinia"; |
|
|
|
import {WarnTriangleFilled} from "@element-plus/icons-vue"; |
|
|
|
import { useAdminStore } from "@/store/index.js"; |
|
|
|
import { storeToRefs } from "pinia"; |
|
|
|
import { WarnTriangleFilled } from "@element-plus/icons-vue"; |
|
|
|
import dayjs from "dayjs"; |
|
|
|
// 国际化 |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
const adminStore = useAdminStore(); |
|
|
|
const { adminData, menuTree } = storeToRefs(adminStore); |
|
|
|
@ -22,7 +25,7 @@ const trimJwCode = () => { |
|
|
|
if (!isNaN(numeric)) { |
|
|
|
addConsume.value.jwcode = numeric |
|
|
|
} else { |
|
|
|
ElMessage.error("精网号格式不正确,请输入数字") |
|
|
|
ElMessage.error(t('elmessage.limitDigitJwcode')) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -64,18 +67,18 @@ const addConsume = ref({ |
|
|
|
const Ref = ref(null) |
|
|
|
const rules = reactive({ |
|
|
|
jwcode: [ |
|
|
|
{ required: true, message: "请输入精网号", trigger: "blur" }, |
|
|
|
{ required: true, message: t('elmessage.checkJwcode'), trigger: "blur" }, |
|
|
|
], |
|
|
|
goodsName: [{ required: true, message: "请选择商品", trigger: "change" }], |
|
|
|
goodsName: [{ required: true, message: t('elmessage.checkGoodsName'), trigger: "change" }], |
|
|
|
sumGold: [ |
|
|
|
{ required: true, message: "消耗金币总数不能为空", trigger: "blur" }, |
|
|
|
{ required: true, message: t('elmessage.noEmptySumGold'), trigger: "blur" }, |
|
|
|
{ |
|
|
|
validator: (rule, value, callback) => { |
|
|
|
// 允许0开头的小数(如0.1)但不允许单独的0 |
|
|
|
const isValid = /^(0\.\d{1,2})|([1-9]\d*(\.\d{1,2})?)$/.test(value); |
|
|
|
|
|
|
|
if (!isValid) { |
|
|
|
callback(new Error("请输入大于0的正数(可包含最多两位小数)")); |
|
|
|
callback(new Error(t('elmessage.limitPositiveNumber'))); |
|
|
|
} else { |
|
|
|
callback(); |
|
|
|
} |
|
|
|
@ -93,7 +96,7 @@ function validateInput() { |
|
|
|
trimJwCode(); |
|
|
|
|
|
|
|
if (user.value.jwcode == null) { |
|
|
|
ElMessage.warning("请先查询用户信息"); |
|
|
|
ElMessage.warning(t('elmessage.checkUserInfo')); |
|
|
|
addConsume.value.sumGold = null; |
|
|
|
user.value = {}; |
|
|
|
return false; |
|
|
|
@ -115,7 +118,7 @@ function validateInput() { |
|
|
|
} |
|
|
|
// 验证金币不能为负数 |
|
|
|
if (sumGold < 0) { |
|
|
|
ElMessage.warning("消耗金币总数不能为负数"); |
|
|
|
ElMessage.warning(t('elmessage.limitNegativeNumber')); |
|
|
|
addConsume.value.sumGold = null; |
|
|
|
return false; |
|
|
|
} |
|
|
|
@ -131,14 +134,14 @@ function validateInput() { |
|
|
|
// 截断整数部分到6位并提示 |
|
|
|
const truncatedInteger = integerPart.slice(0, 6); |
|
|
|
addConsume.value.sumGold = parseFloat(truncatedInteger); |
|
|
|
ElMessage.info('整数部分最多允许6位'); |
|
|
|
ElMessage.info(t('elmessage.limitSix')); |
|
|
|
return; // 直接返回,不再处理小数部分 |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 纯整数情况 |
|
|
|
if (sumGoldStr.length > 6) { |
|
|
|
addConsume.value.sumGold = parseFloat(sumGoldStr.slice(0, 6)); |
|
|
|
ElMessage.info('整数部分最多允许6位'); |
|
|
|
ElMessage.info(t('elmessage.limitSix')); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -150,7 +153,7 @@ function validateInput() { |
|
|
|
// 截断到两位小数并提示 |
|
|
|
const truncatedValue = parseFloat(sumGoldStr.slice(0, sumGoldStr.indexOf('.') + 3)); |
|
|
|
addConsume.value.sumGold = truncatedValue; |
|
|
|
ElMessage.info('最多允许输入两位小数'); |
|
|
|
ElMessage.info(t('elmessage.limitTwoDecimal')); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -159,7 +162,7 @@ function validateInput() { |
|
|
|
// 验证金币总和 |
|
|
|
const totalAvailableGold = (user.value.nowSumGold) |
|
|
|
if (user.value.jwcode && sumGold > totalAvailableGold) { |
|
|
|
ElMessage.error("消耗金币总数超过可用金币总和"); |
|
|
|
ElMessage.error(t('elmessage.limitExceeded')); |
|
|
|
// 将sumGold设置为null |
|
|
|
addConsume.value.sumGold = null; |
|
|
|
return false; |
|
|
|
@ -228,7 +231,7 @@ const add = async function () { |
|
|
|
|
|
|
|
console.log("addConsume.value", addConsume.value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addDisabled.value = true |
|
|
|
// 发送POST请求 |
|
|
|
@ -255,7 +258,7 @@ const add = async function () { |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
console.error("请求失败", error); |
|
|
|
ElMessage.error("添加失败,请检查网络连接或联系管理员"); |
|
|
|
ElMessage.error(t('elmessage.addFailed')); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@ -273,10 +276,10 @@ function handleResponse(result) { |
|
|
|
expires: |
|
|
|
1, path: '/' |
|
|
|
}); |
|
|
|
ElMessage.success("添加成功"); |
|
|
|
ElMessage.success(t('elmessage.addSuccess')); |
|
|
|
console.log("请求成功", result); |
|
|
|
} else { |
|
|
|
ElMessage.error(result.msg || "添加失败,未知错误"); |
|
|
|
ElMessage.error(result.msg || t('elmessage.addFailedUnknown')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -385,7 +388,7 @@ const addBefore = () => { |
|
|
|
if (!valid) { |
|
|
|
ElMessage({ |
|
|
|
type: 'error', |
|
|
|
message: '请检查输入内容' |
|
|
|
message: t('elmessage.checkInputContent') |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -409,13 +412,13 @@ const getUser = async function (jwcode) { |
|
|
|
try { |
|
|
|
// 验证精网号 |
|
|
|
if (!jwcode) { |
|
|
|
ElMessage.warning('精网号不能为空'); |
|
|
|
ElMessage.warning(t('elmessage.noEmptyJwcode')); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 验证精网号是否为数字 |
|
|
|
if (!/^\d{1,9}$/.test(jwcode)) { |
|
|
|
ElMessage.warning('精网号必须为数字且不超过九位'); |
|
|
|
ElMessage.warning(t('elmessage.limitJwcodeNine')); |
|
|
|
resetForm() |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -445,7 +448,7 @@ const getUser = async function (jwcode) { |
|
|
|
historyTaskGold: result.data.historyTaskGold |
|
|
|
}; |
|
|
|
|
|
|
|
ElMessage.success("查询成功"); |
|
|
|
ElMessage.success(t('elmessage.searchSuccess')); |
|
|
|
// 检查sumGold是否有值,如果有则重新计算金币分配 |
|
|
|
if (addConsume.value.sumGold) { |
|
|
|
const parsedSumGold = parseFloat(addConsume.value.sumGold); |
|
|
|
@ -461,16 +464,16 @@ const getUser = async function (jwcode) { |
|
|
|
|
|
|
|
|
|
|
|
} else if (!result.data) { |
|
|
|
ElMessage.warning("用户不存在"); |
|
|
|
ElMessage.warning(t('elmessage.noUser')); |
|
|
|
user.value.jwcode = null |
|
|
|
addConsume.value.jwcode = null |
|
|
|
// resetForm(); // 重置表单 |
|
|
|
} else { |
|
|
|
ElMessage.warning(result.msg || "请检查查询参数"); |
|
|
|
ElMessage.warning(result.msg || t('elmessage.checkQueryParams')); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error("请求失败", error); |
|
|
|
ElMessage.error("查询失败,请检查网络连接或精网号是否正确"); |
|
|
|
ElMessage.error(t('elmessage.queryFailed')); |
|
|
|
resetForm(); // 重置表单 |
|
|
|
} |
|
|
|
}; |
|
|
|
@ -534,20 +537,22 @@ onMounted(async function () { |
|
|
|
<div class="left"> |
|
|
|
<el-form :model="addConsume" ref="Ref" :rules="rules" style="min-width: 420px;" class="add-form" |
|
|
|
label-width="auto" label-position="right"> |
|
|
|
<el-form-item prop="jwcode" label="精网号" style="margin-top: 50px"> |
|
|
|
<el-form-item prop="jwcode" :label="t('common_add.jwcode')" style="margin-top: 50px"> |
|
|
|
<el-input v-model="addConsume.jwcode" style="width: 200px;" /> |
|
|
|
<el-button type="primary" @click="getUser(addConsume.jwcode)" style="margin-left: 20px">查询 |
|
|
|
<el-button type="primary" @click="getUser(addConsume.jwcode)" style="margin-left: 20px"> |
|
|
|
{{ t('common.search') }} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="goodsName" label="商品名称"> |
|
|
|
<el-select v-model="addConsume.goodsName" placeholder="请选择商品" style="width: 200px" clearable filterable> |
|
|
|
<el-form-item prop="goodsName" :label="t('common_add.goodsName')"> |
|
|
|
<el-select v-model="addConsume.goodsName" :placeholder="t('common_add.goodsNamePlaceholder')" |
|
|
|
style="width: 200px" clearable filterable> |
|
|
|
<el-option v-for="(item, index) in goods" :key="index" :label="item.label" :value="item" /> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="sumGold" label="消耗金币总数"> |
|
|
|
<el-form-item prop="sumGold" :label="t('common_add.consumeTotalGold')"> |
|
|
|
<el-input v-model="addConsume.sumGold" style="width: 120px" @input="validateInput()" |
|
|
|
@change="calculateCoins(addConsume.sumGold)" /> |
|
|
|
</el-form-item> |
|
|
|
@ -555,21 +560,21 @@ onMounted(async function () { |
|
|
|
|
|
|
|
<!-- 三类金币自动计算(禁用状态,不可编辑) --> |
|
|
|
|
|
|
|
<el-form-item prop="permanentGold" label="永久金币"> |
|
|
|
<el-form-item prop="permanentGold" :label="t('common_add.permanentGold')"> |
|
|
|
<el-input v-model="addConsume.permanentGold" disabled style="width: 120px"> |
|
|
|
<template #default="scope">{{ scope.row.permanentGold }}</template> |
|
|
|
</el-input> |
|
|
|
<p style="margin-right: 0px"> 个</p> |
|
|
|
<p style="margin-right: 0px"> {{ $t('common.个') }}</p> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="freeCoin" label="免费金币"> |
|
|
|
<el-form-item prop="freeCoin" :label="t('common_add.freeGold')"> |
|
|
|
<el-input disabled v-model="addConsume.freeGold" style="width: 120px" /> |
|
|
|
<p style="margin-right: 0px"> 个</p> |
|
|
|
<p style="margin-right: 0px"> {{ $t('common.个') }}</p> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="taskGold" label="任务金币"> |
|
|
|
<el-form-item prop="taskGold" :label="t('common_add.taskGold')"> |
|
|
|
<el-input disabled v-model="addConsume.taskGold" style="width: 120px" /> |
|
|
|
<p style="margin-right: 20px"> 个</p> |
|
|
|
<p style="margin-right: 20px"> {{ $t('common.个') }}</p> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="remark" label="备注"> |
|
|
|
@ -577,8 +582,11 @@ onMounted(async function () { |
|
|
|
type="textarea" /> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-button type="success" @click="resetForm()" style="margin-left: 200px;margin-top:10px">重置</el-button> |
|
|
|
<el-button type="primary" :disabled="addDisabled" @click="addBefore" style="margin-top:10px"> 提交</el-button> |
|
|
|
<el-button type="success" @click="resetForm()" style="margin-left: 200px;margin-top:10px">{{ t('common.reset') |
|
|
|
}}</el-button> |
|
|
|
<el-button type="primary" :disabled="addDisabled" @click="addBefore" style="margin-top:10px">{{ |
|
|
|
t('common.submit') |
|
|
|
}}</el-button> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -586,28 +594,29 @@ onMounted(async function () { |
|
|
|
<!-- 客户信息栏 --> |
|
|
|
<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-text size="large" style="margin-left: 20px">{{ $t('common_add_user.customerInfo') }}</el-text> |
|
|
|
|
|
|
|
<!-- 第一行:姓名 + 历史金币 --> |
|
|
|
<el-row style="margin-top: 20px"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="姓名"> |
|
|
|
<el-form-item :label="$t('common_add_user.name')"> |
|
|
|
<p>{{ user.name }}</p> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<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">{{ |
|
|
|
user.nowSumGold |
|
|
|
}}</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 |
|
|
|
}}; |
|
|
|
免费金币:{{ user.nowFreeGold }}; |
|
|
|
任务金币:{{ user.nowTaskGold }})</span> |
|
|
|
<span style="color: #b1b1b1; margin-left: 0px" v-if="user.nowPermanentGold !== undefined">({{ |
|
|
|
$t('common_add_user.permanentGold') }}:{{ |
|
|
|
user.nowPermanentGold |
|
|
|
}}; |
|
|
|
{{ $t('common_add_user.freeGold') }}:{{ user.nowFreeGold }}; |
|
|
|
{{ $t('common_add_user.taskGold') }}:{{ user.nowTaskGold }})</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -615,16 +624,18 @@ onMounted(async function () { |
|
|
|
<!-- 第二行:精网号 + 当前金币(独立行) --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="精网号"> |
|
|
|
<el-form-item :label="$t('common_add_user.jwcode')"> |
|
|
|
<p>{{ user.jwcode }}</p> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14"> |
|
|
|
<el-form-item label="消费次数"> |
|
|
|
<el-form-item :label="$t('common_add_user.consumptionTimes')"> |
|
|
|
<p style="color: #2fa1ff">{{ user.consumeNum }} </p> |
|
|
|
</el-form-item> |
|
|
|
<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-col> |
|
|
|
</el-row> |
|
|
|
@ -644,7 +655,7 @@ onMounted(async function () { |
|
|
|
<!-- 第四行:消费次数 + 所属门店 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="所属门店"> |
|
|
|
<el-form-item :label="$t('common_add_user.store')"> |
|
|
|
<p>{{ user.market }}</p> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -653,42 +664,42 @@ onMounted(async function () { |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="FirstConsumeDialogVisible" title="操作确认" :before-close="FirstConsumeDialogVisiblehandleClose" |
|
|
|
:close-on-click-modal="false" width="480px"> |
|
|
|
<el-dialog v-model="FirstConsumeDialogVisible" :title="$t('common_add.operationConfirm')" |
|
|
|
:before-close="FirstConsumeDialogVisiblehandleClose" :close-on-click-modal="false" width="480px"> |
|
|
|
<!-- 内容整体居中且收窄 --> |
|
|
|
<div class="confirm-body"> |
|
|
|
<!-- 用户信息 --> |
|
|
|
<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 /> |
|
|
|
</div> |
|
|
|
<!-- 活动名称 --> |
|
|
|
<!-- 商品名称 --> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">商品名称</div> |
|
|
|
<div class="field-label">{{ $t('common_add.goodsName') }}</div> |
|
|
|
<el-input v-model="addConsume.goodsName.value" disabled /> |
|
|
|
</div> |
|
|
|
<!--金币总数 --> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">金币总数</div> |
|
|
|
<div class="field-label">{{ $t('common_add.totalGold') }}</div> |
|
|
|
<el-input v-model="addConsume.sumGold" disabled /> |
|
|
|
</div> |
|
|
|
<!-- 金币详细信息(同一行左右排列) --> |
|
|
|
<el-row :gutter="20" class="coins-row"> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">永久金币</div> |
|
|
|
<div class="field-label">{{ $t('common_add.permanentGold') }}</div> |
|
|
|
<el-input v-model="addConsume.permanentGold" disabled /> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">免费金币</div> |
|
|
|
<div class="field-label">{{ $t('common_add.freeGold') }}</div> |
|
|
|
<el-input v-model="addConsume.freeGold" disabled /> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">任务金币</div> |
|
|
|
<div class="field-label">{{ $t('common_add.taskGold') }}</div> |
|
|
|
<el-input v-model="addConsume.taskGold" disabled /> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
@ -696,7 +707,7 @@ onMounted(async function () { |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">备注</div> |
|
|
|
<div class="field-label">{{ $t('common_add.remark') }}</div> |
|
|
|
<el-input v-model="addConsume.remark" disabled /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -704,49 +715,49 @@ onMounted(async function () { |
|
|
|
<!-- 底部按钮(居中) --> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer-center"> |
|
|
|
<el-button @click="FirstConsumeDialogVisibleCancel">取 消</el-button> |
|
|
|
<el-button type="primary" @click="FirstConsumeDialogVisibleContinue">确认购买</el-button> |
|
|
|
<el-button @click="FirstConsumeDialogVisibleCancel">{{ $t('common.cancel') }}</el-button> |
|
|
|
<el-button type="primary" @click="FirstConsumeDialogVisibleContinue">{{ $t('common.confirm') }}</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="ConsumeDialogVisible" title="操作确认" :before-close="ConsumeDialogVisiblehandleClose" |
|
|
|
<el-dialog v-model="ConsumeDialogVisible" :title="$t('common_add.operationConfirm')" :before-close="ConsumeDialogVisiblehandleClose" |
|
|
|
:close-on-click-modal="false" width="480px"> |
|
|
|
<!-- 内容整体居中且收窄 --> |
|
|
|
<div class="confirm-body"> |
|
|
|
<!-- 用户信息 --> |
|
|
|
<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 /> |
|
|
|
</div> |
|
|
|
<!-- 活动名称 --> |
|
|
|
<!-- 商品名称 --> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">商品名称</div> |
|
|
|
<div class="field-label">{{ $t('common_add.goodsName') }}</div> |
|
|
|
<el-input v-model="addConsume.goodsName.value" disabled /> |
|
|
|
</div> |
|
|
|
<!--金币总数 --> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">金币总数</div> |
|
|
|
<div class="field-label">{{ $t('common_add.totalGold') }}</div> |
|
|
|
<el-input v-model="addConsume.sumGold" disabled /> |
|
|
|
</div> |
|
|
|
<!-- 金币详细信息(同一行左右排列) --> |
|
|
|
<el-row :gutter="20" class="coins-row"> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">永久金币</div> |
|
|
|
<div class="field-label">{{ $t('common_add.permanentGold') }}</div> |
|
|
|
<el-input v-model="addConsume.permanentGold" disabled /> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">免费金币</div> |
|
|
|
<div class="field-label">{{ $t('common_add.freeGold') }}</div> |
|
|
|
<el-input v-model="addConsume.freeGold" disabled /> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field-label">任务金币</div> |
|
|
|
<div class="field-label">{{ $t('common_add.taskGold') }}</div> |
|
|
|
<el-input v-model="addConsume.taskGold" disabled /> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
@ -757,16 +768,16 @@ onMounted(async function () { |
|
|
|
<el-icon :size="24" color="#FFD700"> |
|
|
|
<WarnTriangleFilled /> |
|
|
|
</el-icon> |
|
|
|
<p>重复购买风险提示</p> |
|
|
|
<p>{{ $t('common_add.prompt') }}</p> |
|
|
|
</div> |
|
|
|
<!-- 记录 + 虚线分隔 --> |
|
|
|
<div> |
|
|
|
<el-divider border-style="dashed" /> |
|
|
|
<p>检测到该用户近期有相似消费记录:</p> |
|
|
|
· {{ ReadCookiesTime }} 购买 【{{ addConsume.goodsName.value }}】(操作人: {{ adminData.adminName }}) |
|
|
|
<p>{{ $t('common_add.similarRechargeRecords') }}</p> |
|
|
|
· {{ ReadCookiesTime }} {{ $t('common_add.buy') }} 【{{ addConsume.goodsName.value }}】({{ $t('common_add.operator') }}: {{ adminData.adminName }}) |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<p>是否继续操作?</p> |
|
|
|
<p>{{ $t('common_add.continueOperation') }}</p> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -774,8 +785,8 @@ onMounted(async function () { |
|
|
|
<!-- 底部按钮(居中) --> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer-center"> |
|
|
|
<el-button @click="ConsumeDialogVisibleCancel">取 消</el-button> |
|
|
|
<el-button type="primary" @click="ConsumeDialogVisibleContinue">确认购买</el-button> |
|
|
|
<el-button @click="ConsumeDialogVisibleCancel">{{ $t('common.cancel') }}</el-button> |
|
|
|
<el-button type="primary" @click="ConsumeDialogVisibleContinue">{{ $t('common.confirm') }}</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
|