diff --git a/src/components/dialogs/ConfirmDialog.vue b/src/components/dialogs/ConfirmDialog.vue
index 716978f..35d3fc2 100644
--- a/src/components/dialogs/ConfirmDialog.vue
+++ b/src/components/dialogs/ConfirmDialog.vue
@@ -14,7 +14,7 @@
@close="handleClose">
- 将要{{ message }}
+ {{ $t('common.will') }}{{ message }}
@@ -34,6 +34,7 @@
-
-
\ No newline at end of file
+
diff --git a/src/components/locales/lang/en.js b/src/components/locales/lang/en.js
index 88b11ce..3236083 100644
--- a/src/components/locales/lang/en.js
+++ b/src/components/locales/lang/en.js
@@ -1,10 +1,102 @@
export default {
+ // Common Group
common: {
+ // Filters
+ jwcode: 'jwcode',
+ jwcodePlaceholder: 'Please enter jwcode',
+ activityName: 'Activity Name',
+ activityNamePlaceholder: 'Please enter activity name',
+ goodsName: 'Goods Name',
+ goodsNamePlaceholder: 'Please enter goods name',
+ payModel: 'Payment Method',
+ payModelPlaceholder: 'Please select payment method',
+ refundType: 'Refund Type',
+ refundTypePlaceholder: 'Please select refund type',
+ market: 'Market',
+ marketPlaceholder: 'Please select market',
+ submitTime: 'Submit Time',
+ auditTime: 'Audit Time',
+ startTime: 'Start Time',
+ to: 'To',
+ endTime: 'End Time',
+
+ // Button Group
+ search: 'Search',
+ reset: 'Reset',
+ edit: 'Edit',
+ pass: 'Pass',
+ reject: 'Reject',
+ cancel: 'Cancel',
confirm: 'Confirm',
- cancel: 'Cancel'
+
+ // Currency Types
+ SGD: 'SGD',
+ goldCoin: '', // Gold Coin label intentionally empty
},
- audit: {
- rechargeAudit: 'Recharge Audit',
- status: 'Status'
- }
-}
\ No newline at end of file
+
+ // Audit Group
+ audit: {
+ // Audit Common
+ refundTypeOptions: {
+ '商品退款': 'Product Refund',
+ '金币退款': 'Gold Refund',
+ },
+ waitAudit: 'Pending Audit',
+ passed: 'Approved',
+ rejected: 'Rejected',
+ permanentGold: 'Permanent',
+ freeGold: 'Free',
+ taskGold: 'Task',
+
+ // Audit Common - List Fields
+ id: 'ID',
+ name: 'Name',
+ jwcode: 'JW Code',
+ market: 'Market',
+ activityName: 'Activity Name',
+ currencyName: 'Currency Name',
+ rechargeAmount: 'Recharge Amount',
+ note: 'Note',
+ payModel: 'Payment Method',
+ paymentVoucher: 'Payment Voucher',
+ submitter: 'Submitter',
+ auditor: 'Auditor',
+ rejectReason: 'Reject Reason',
+ rejectReasonPlaceholder: 'Please enter reject reason',
+ paymentTime: 'Payment Time',
+ submitTime: 'Submit Time',
+ auditTime: 'Audit Time',
+ operation: 'Operation',
+
+ // Supplement Fields for Refund Audit
+ orderCode: 'Order Number',
+ refundType: 'Refund Type',
+ refundModel: 'Refund Method',
+ allRefund: 'Full Refund',
+ partialRefund: 'Partial Refund',
+ refundGoods: 'Refund Goods',
+
+ // Gold Recharge Audit ------------------------
+ rechargeAudit: 'Recharge Audit',
+ rechargeSGD: 'Recharge SGD',
+ totalGold: 'Total Gold',
+ // 添加支付方式翻译
+ payMethods: {
+ bankTransfer: 'Bank Transfer',
+ cash: 'Cash',
+ check: 'Check',
+ card: 'Card Payment',
+ grabpay: 'Grabpay',
+ nets: 'Nets',
+ paypal: 'PayPal',
+ stripe: 'Stripe - Link Payment',
+ ipay88: 'Ipay88 - Link Payment',
+ paymentAsia: 'PaymentAsia - Link Payment',
+ other: 'Other'
+ },
+
+ // Gold Refund Audit --------------------------
+ refundAudit: 'Refund Audit',
+ refundTotalGold: 'Total Refund',
+ },
+}
diff --git a/src/components/locales/lang/th.js b/src/components/locales/lang/th.js
index e535453..0852e71 100644
--- a/src/components/locales/lang/th.js
+++ b/src/components/locales/lang/th.js
@@ -1,10 +1,34 @@
export default {
common: {
- confirm: 'ยืนยัน',
- cancel: 'ยกเลิก'
+ jwcode: 'jwcode',
+ jwcodePlaceholder: 'กรุณาใส่ jwcode',
+ activityName: 'ชื่อกิจกรรม',
+ activityNamePlaceholder: 'กรุณาใส่ชื่อกิจกรรม',
+ goodsName: 'ชื่อสินค้า',
+ goodsNamePlaceholder: 'กรุณาใส่ชื่อสินค้า',
+ refundType: 'ประเภทการคืนเงิน',
+ refundTypePlaceholder: 'กรุณาเลือกประเภทการคืนเงิน',
+ payModel: 'วิธีการชำระเงิน',
+ payModelPlaceholder: 'กรุณาเลือกวิธีการชำระเงิน',
+ market: 'ตลาด',
+ marketPlaceholder: 'กรุณาเลือกตลาด',
+ submitTime: 'เวลาส่ง',
+ auditTime: 'เวลาตรวจสอบ',
+ startTime: 'เวลาเริ่มต้น',
+ to: 'ถึง',
+ endTime: 'เวลาสิ้นสุด',
+ search: 'ค้นหา',
+ reset: 'รีเซ็ต',
},
- audit: {
+ audit: {
rechargeAudit: 'การตรวจสอบการเติมเงิน',
- status: 'สถานะ'
+ refundAudit: 'การตรวจสอบการคืนเงิน',
+ refundTypeOptions: {
+ '商品退款': 'คืนเงินสินค้า',
+ '金币退款': 'คืนเงินทอง',
+ },
+ waitAudit: 'รอตรวจสอบ',
+ passed: 'อนุมัติ',
+ rejected: 'ปฏิเสธ',
}
}
\ No newline at end of file
diff --git a/src/components/locales/lang/zh-CN.js b/src/components/locales/lang/zh-CN.js
index b23152c..277ca47 100644
--- a/src/components/locales/lang/zh-CN.js
+++ b/src/components/locales/lang/zh-CN.js
@@ -1,10 +1,115 @@
export default {
+ // 通用组
common: {
- confirm: '确定',
- cancel: '取消'
+ // 筛选
+ jwcode: '精网号',
+ jwcodePlaceholder: '请输入精网号',
+ activityName: '活动名称',
+ activityNamePlaceholder: '请输入活动名称',
+ goodsName: '商品名称',
+ goodsNamePlaceholder: '请输入商品名称',
+ payModel: '支付方式',
+ payModelPlaceholder: '请选择支付方式',
+ refundType: '退款类型',
+ refundTypePlaceholder: '请选择退款类型',
+ market: '所属地区',
+ marketPlaceholder: '请选择所属地区',
+ submitTime: '提交时间',
+ auditTime: '审核时间',
+ startTime: '起始时间',
+ to: '至',
+ endTime: '结束时间',
+ // 按钮组
+ search: '查询',
+ reset: '重置',
+ edit: '编辑',
+ pass: '通过',
+ reject: '驳回',
+ cancel: '取消',
+ confirm: '确认',
+ // 币种类型
+ SGD: '新币',
+ goldCoin: '金币',
+ // 对话框标题
+ will: '将要',
+ },
+ // 提示信息组
+ elmessage : {
+ noPermission: '暂无权限',
+ checkJwcodeFormat: '请检查精网号格式',
+ rejectReasonPlaceholder: '请输入驳回理由',
+
+
+ rejectSuccess: '驳回操作成功',
+ rejectFailed: '驳回操作失败',
+ operationFailed: '操作失败',
+ approveSuccess: '审核通过成功',
+ approveFailed: '审核通过失败',
+ },
+ // 审核组
+ audit: { // 按照项目文件名分配
+ // 审核通用 ---------------------------------
+ refundTypeOptions: {
+ '商品退款': '商品退款',
+ '金币退款': '金币退款',
+ },
+ waitAudit: '待审核',
+ passed: '已通过',
+ rejected: '已驳回',
+ permanentGold: '永久金币',
+ freeGold: '免费金币',
+ taskGold: '任务金币',
+ // 审核通用-充值审核列表字段
+ id: '序号',
+ name: '姓名',
+ jwcode: '精网号',
+ market: '所属地区',
+ activityName: '活动名称',
+ currencyName: '货币名称',
+ rechargeAmount: '充值金额',
+ note: '备注',
+ payModel: '支付方式',
+ paymentVoucher: '支付凭证',
+ submitter: '提交人',
+ auditor: '审核人',
+ rejectReason: '驳回理由',
+ rejectReasonPlaceholder: '请输入驳回理由',
+ paymentTime: '交款时间',
+ submitTime: '提交时间',
+ auditTime: '审核时间',
+ operation: '操作',
+ // 审核通用-充值审核列表字段-补充退款审核列表字段
+ orderCode: '订单号',
+ refundType: '退款类型',
+ refundModel: '退款方式',
+ allRefund: '全部退款',
+ partialRefund: '部分退款',
+ refundGoods: '退款商品',
+
+ // 金币充值审核 --------------------------------
+ rechargeAudit: '充值审核',
+ rechargeSGD: '充值新币',
+ totalGold: '总金币数',
+ // 添加支付方式翻译
+ payMethods: {
+ bankTransfer: '银行转账',
+ cash: '现金',
+ check: '支票',
+ card: '刷卡',
+ grabpay: 'Grabpay',
+ nets: 'Nets',
+ paypal: 'PayPal',
+ stripe: 'Stripe-链接收款',
+ ipay88: 'Ipay88-链接收款',
+ paymentAsia: 'PaymentAsia-链接收款',
+ other: '其他'
+ },
+ // 金币退款审核 --------------------------------
+ refundAudit: '退款审核',
+ refundTotalGold: '退款总金币数',
+
+ // 对话框的标题
+ rejectRecord: '驳回该记录!',
+ passRecord: '通过该记录!',
},
- audit: {
- rechargeAudit: '充值审核', // 你的需求字段
- status: '状态'
- }
}
\ No newline at end of file
diff --git a/src/views/audit/gold/audit.vue b/src/views/audit/gold/audit.vue
index 3689595..ff7b891 100644
--- a/src/views/audit/gold/audit.vue
+++ b/src/views/audit/gold/audit.vue
@@ -16,7 +16,7 @@
@click="navigateTo('refundAudit')"
v-if="hasRefund"
>
- 退款审核
+ {{ $t('audit.refundAudit') }}
diff --git a/src/views/audit/gold/rechargeAudit.vue b/src/views/audit/gold/rechargeAudit.vue
index 1beee61..3a316b8 100644
--- a/src/views/audit/gold/rechargeAudit.vue
+++ b/src/views/audit/gold/rechargeAudit.vue
@@ -3,24 +3,24 @@
- 精网号:
-
+ {{ $t('common.jwcode') }}:
+
- 活动名称:
-
+ {{ $t('common.activityName') }}:
+
- 支付方式:
-
+ {{ $t('common.payModel') }}:
+
- 所属地区:
- {{ $t('common.market') }}:
+
@@ -29,10 +29,10 @@
- {{ activeName === 'wait' ? '提交时间:' : '审核时间:' }}
+ {{ activeName === 'wait' ? $t('common.submitTime') : $t('common.auditTime') }}
-
今
@@ -42,8 +42,8 @@
- 查询
- 重置
+ {{ $t('common.search') }}
+ {{ $t('common.reset') }}
@@ -56,7 +56,7 @@
@click="handleButtonClick('wait')"
class="custom-tab-button"
>
- 待审核
+ {{ $t('audit.waitAudit') }}
- 已通过
+ {{ $t('audit.passed') }}
- 已驳回
+ {{ $t('audit.rejected') }}
- 充值新币:{{ format3(stats.permanentGolds) }}新币
- 总金币数:{{ format3((stats.permanentGolds + stats.freeGolds + stats.taskGolds).toFixed(2))
- }}金币
- 永久金币:{{ format3(stats.permanentGolds.toFixed(2)) }}金币
- 免费金币:{{ format3(stats.freeGolds.toFixed(2)) }}金币
+ {{ $t('audit.rechargeSGD') }}:{{ format3(stats.permanentGolds) }} {{ $t('common.SGD') }}
+ {{ $t('audit.totalGold') }}:{{ format3((stats.permanentGolds + stats.freeGolds + stats.taskGolds).toFixed(2))
+ }}{{ $t('common.goldCoin') }}
+ {{ $t('audit.permanentGold') }}:{{ format3(stats.permanentGolds.toFixed(2)) }}{{ $t('common.goldCoin') }}
+ {{ $t('audit.freeGold') }}:{{ format3(stats.freeGolds.toFixed(2)) }}{{ $t('common.goldCoin') }}
-
+
{{ scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize }}
-
-
-
-
-
-
+
+
+
+
+
+
{{ scope.row.money / 100 }}
-
+
{{ scope.row.permanentGold / 100 }}
-
+
{{ (scope.row.freeGold) / 100 }}
-
-
-
+
+
+
-
![支付凭证]()
+
--
-
-
+
-
-
+
+
{{ moment(scope.row.payTime).format('YYYY-MM-DD HH:mm:ss') }}
-
+
{{
@@ -137,23 +137,23 @@
}}
-
+
{{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }}
-
+
- 通过
+ {{ $t('common.pass') }}
- 驳回
+ {{ $t('common.reject') }}
@@ -166,23 +166,23 @@
-
+
-
-
+
{
// 当flag状态改变时,重新发送请求
@@ -301,47 +304,47 @@ const getObj = ref({
const payModel = [
{
value: '银行转账',
- label: '银行转账'
+ label: t('audit.payMethods.bankTransfer')
},
{
value: '现金',
- label: '现金'
+ label: t('audit.payMethods.cash')
},
{
value: '支票',
- label: '支票'
+ label: t('audit.payMethods.check')
},
{
value: '刷卡',
- label: '刷卡'
+ label: t('audit.payMethods.card')
},
{
value: 'Grabpay',
- label: 'Grabpay'
+ label: t('audit.payMethods.grabpay')
},
{
value: 'Nets',
- label: 'Nets'
+ label: t('audit.payMethods.nets')
},
{
value: 'PayPal',
- label: 'PayPal'
+ label: t('audit.payMethods.paypal')
},
{
value: 'Stripe-链接收款',
- label: 'Stripe-链接收款'
+ label: t('audit.payMethods.stripe')
},
{
value: 'Ipay88-链接收款',
- label: 'Ipay88-链接收款'
+ label: t('audit.payMethods.ipay88')
},
{
value: 'PaymentAsia-链接收款',
- label: 'PaymentAsia-链接收款'
+ label: t('audit.payMethods.paymentAsia')
},
{
value: '其他',
- label: '其他'
+ label: t('audit.payMethods.other')
}
]
// 统计合计数
@@ -354,13 +357,13 @@ const stats = ref({
})
// 表单验证
const rules = reactive({
- rejectReason: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }]
+ rejectReason: [{ required: true, message: t('audit.rejectReasonPlaceholder'), trigger: 'blur' }]
})
// 搜索方法
const getRecharge = async function (val) {
if (!hasrechargeWaitShow) {
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
try {
@@ -380,7 +383,7 @@ const getRecharge = async function (val) {
const numberRegex = /^\d{1,9}$/;
// 检查是否不是数字
if (!numberRegex.test(rechargeAudit.value.jwcode)) {
- ElMessage.error('请检查精网号格式')
+ ElMessage.error(t('common.checkJwcodeFormat'))
return
}
}
@@ -538,7 +541,7 @@ const handleButtonClick = function (name) {
activeName.value = name
if (name === 'wait') {
if(!hasrechargeWait){
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
if(hasrechargeWaitShow){
@@ -546,13 +549,13 @@ const handleButtonClick = function (name) {
}
} else if (name === 'pass') {
if(!hasrechargeThrough){
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
adminPass()
} else if (name === 'reject') {
if(!hasrechargeReject){
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
adminReject()
@@ -610,7 +613,7 @@ const clicked = ref(false);
// 显示通过确认对话框
const showApproveDialog = (row) => {
if(!hasrechargeWaitThough){
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
currentRecord.value = row
@@ -628,14 +631,14 @@ const handleApproveConfirm = async () => {
rejectReason: ''
}
await request({ url: '/audit/audit', data: params })
- ElMessage.success('审核通过成功')
+ ElMessage.success(t('elmessage.approveSuccess'))
approveDialogVisible.value = false
await getRecharge()
clicked.value = false
await getStats()
} catch (error) {
- console.error('审核通过失败', error)
- ElMessage.error('操作失败')
+ console.error(t('elmessage.approveFailed'), error)
+ ElMessage.error(t('elmessage.operationFailed'))
clicked.value = false
}
}
@@ -675,7 +678,7 @@ const handleApproveClose = () => {
// }
const showRejectDialog = (row) => {
if(!hasrechargeWaitReject){
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
currentRecord.value = row
@@ -688,13 +691,13 @@ const cancelClicked = ref(false)
const handleReject = async () => {
// 在showRejectDialog已经添加过了权限检查,此处应该是可以不用添加的
if(!hasrechargeWaitReject){
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
cancelClicked.value = true
if (!rejectReason.value.trim()) {
- ElMessage.warning('请输入驳回理由')
+ ElMessage.warning(t('elmessage.rejectReasonPlaceholder'))
return
}
try {
@@ -706,14 +709,14 @@ const handleReject = async () => {
}
await request({ url: '/audit/audit', data: params })
- ElMessage.success('驳回操作成功')
+ ElMessage.success(t('elmessage.rejectSuccess'))
rejectReasonDialogVisible.value = false
await getRecharge()
cancelClicked.value = false
await getStats()
} catch (error) {
- console.error('驳回操作失败', error)
- ElMessage.error('操作失败')
+ console.error(t('elmessage.rejectFailed'), error)
+ ElMessage.error(t('elmessage.operationFailed'))
}
}
// 确认驳回后显示理由输入框
@@ -729,6 +732,13 @@ const handleRejectCancel = () => {
const handleRejectClose = () => {
rejectDialogVisible.value = false
}
+
+// 处理驳回理由对话框关闭/取消操作
+const handleRejectReasonCancel = () => {
+ rejectReasonDialogVisible.value = false
+ cancelClicked.value = false // 重置禁用状态
+ rejectReason.value = '' // 清空驳回理由
+}
// 处理排序事件
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
diff --git a/src/views/audit/gold/refundAudit.vue b/src/views/audit/gold/refundAudit.vue
index e9ea614..d90fa4c 100644
--- a/src/views/audit/gold/refundAudit.vue
+++ b/src/views/audit/gold/refundAudit.vue
@@ -3,26 +3,29 @@
- 精网号:
-
+ {{ $t('common.jwcode') }}:
+
- 商品名称:
-
+ {{ $t('common.goodsName') }}:
+
- 退款类型:
-
-
-
+ {{ $t('common.refundType') }}:
+
+
+
- 所属地区:
+ {{ $t('common.market') }}:
+ :placeholder="$t('common.marketPlaceholder')" clearable @change="handleMarketChange" />
@@ -30,11 +33,12 @@
- {{ activeName === 'wait' ? '提交时间:' : '审核时间:' }}
+ {{ activeName === 'wait' ? $t('common.submitTime') : $t('common.auditTime') }}
-
+
今
昨
@@ -42,8 +46,8 @@
- 查询
- 重置
+ {{ $t('common.search') }}
+ {{ $t('common.reset') }}
@@ -53,68 +57,70 @@
- 待审核
+ {{ $t('audit.waitAudit') }}
- 已通过
+ {{ $t('audit.passed') }}
- 已驳回
+ {{ $t('audit.rejected') }}
- 退款总金币数:{{
+ {{ $t('audit.refundTotalGold') }}:{{
format3((stats.permanentGolds + stats.freeGolds + stats.taskGolds).toFixed(2))
- }}金币
- 永久金币:{{ format3(stats.permanentGolds.toFixed(2)) }}金币
-免费金币:{{ format3(stats.freeGolds.toFixed(2)) }}金币
- 任务金币:{{ format3(stats.taskGolds.toFixed(2)) }}金币
+ }}{{ $t('common.goldCoin') }}
+ {{ $t('audit.permanentGold') }}:{{ format3(stats.permanentGolds.toFixed(2)) }}{{ $t('common.goldCoin')
+ }}
+ {{ $t('audit.freeGold') }}:{{ format3(stats.freeGolds.toFixed(2)) }}{{ $t('common.goldCoin')
+ }}
+ {{ $t('audit.taskGold') }}:{{ format3(stats.taskGolds.toFixed(2)) }}{{ $t('common.goldCoin') }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
- {{ row.refundModel === 0 ? '全部退款' : '部分退款' }}
+ {{ row.refundModel === 0 ? $t('audit.allRefund') : $t('audit.partialRefund') }}
-
-
+
+
{{ row.sumGold / 100 }}
-
+
{{ row.permanentGold / 100 }}
-
+
{{ (row.freeJune + row.freeDecember) / 100 }}
-
+
{{ row.taskGold / 100 }}
-
-
-
+
+
-
-
+
+
{{
checkTab === 'pending'
@@ -124,25 +130,23 @@
-
+
{{ row.auditTime ? moment(row.auditTime).format('YYYY-MM-DD HH:mm:ss') : '--' }}
+ prop="operation" :label="$t('audit.operation')" width="150px">
-
- 通过
+
+ {{ $t('common.pass') }}
-
- 驳回
+
+ {{ $t('common.reject') }}
@@ -153,38 +157,29 @@
@current-change="handleCurrentChange">
-
-
+
+
-
-
+
+
-
+
-
+
@@ -198,16 +193,18 @@ import { storeToRefs } from "pinia";
import dayjs from "dayjs";
import { permissionMapping, hasMenuPermission } from "@/utils/menuTreePermission.js"
import ConfirmDialog from '@/components/dialogs/ConfirmDialog.vue';
+import { useI18n } from 'vue-i18n';
+const { t } = useI18n();
const adminStore = useAdminStore();
const { adminData, menuTree, flag } = storeToRefs(adminStore);
// 监听全局flag状态变化
- watch(flag, (newFlag, oldFlag) => {
+watch(flag, (newFlag, oldFlag) => {
// 当flag状态改变时,重新发送请求
if (newFlag !== oldFlag) {
get()
getStats()
-
+
}
})
@@ -219,7 +216,7 @@ const defaultTime = [
const activeTimeRange = ref('')
const currentRecord = ref(null) // 当前行信息
const rejectDialogVisible = ref(false)
-const rejectReasonDialogVisible = ref(false)
+const rejectReasonDialogVisible = ref(false)
const rejectReason = ref('')
const approveDialogVisible = ref(false)
@@ -330,7 +327,7 @@ const getRefundGoods = async () => {
// 搜索方法
const get = async function (val) {
if (!hasrefundWaitShow) {
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
try {
@@ -365,7 +362,7 @@ const get = async function (val) {
// 检查是否不是数字
if (!numberRegex.test(searchForm.value.jwcode)) {
- ElMessage.error('请检查精网号格式')
+ ElMessage.error(t('elmessage.checkJwcodeFormat'))
// 上面提示过了
return
}
@@ -381,10 +378,10 @@ const get = async function (val) {
const clicked = ref(false);
// 显示通过确认对话框
const showApproveDialog = (row) => {
- if(!hasrefundWaitThough){
- ElMessage.error('暂无权限')
- return
- }
+ if (!hasrefundWaitThough) {
+ ElMessage.error(t('elmessage.noPermission'))
+ return
+ }
currentRecord.value = row
approveDialogVisible.value = true
}
@@ -399,14 +396,14 @@ const handleApproveConfirm = async () => {
rejectReason: ''
}
await API({ url: '/audit/audit', data: params })
- ElMessage.success('审核通过成功')
+ ElMessage.success(t('elmessage.approveSuccess'))
approveDialogVisible.value = false
await get()
clicked.value = false
await getStats()
} catch (error) {
- console.error('审核通过失败', error)
- ElMessage.error('操作失败')
+ console.error(t('elmessage.approveFailed'), error)
+ ElMessage.error(t('elmessage.operationFailed'))
}
}
// 处理通过取消操作
@@ -420,7 +417,7 @@ const handleApproveClose = () => {
// 显示驳回对话框
const showRejectDialog = (row) => {
if (!hasrefundWaitReject) {
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
currentRecord.value = row
@@ -432,13 +429,13 @@ const cancelClicked = ref(false)
// 处理驳回操作
const handleReject = async () => {
if (!hasrefundWaitReject) {
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
cancelClicked.value = true
if (!rejectReason.value.trim()) {
- ElMessage.warning('请输入驳回理由')
+ ElMessage.warning(t('elmessage.rejectReasonPlaceholder'))
return
}
try {
@@ -449,15 +446,15 @@ const handleReject = async () => {
rejectReason: rejectReason.value
}
await API({ url: '/audit/audit', data: params })
- ElMessage.success('驳回成功')
+ ElMessage.success(t('elmessage.rejectSuccess'))
rejectReasonDialogVisible.value = false
await get()
cancelClicked.value = false
await getStats()
console.log('看看驳回参数', params)
} catch (error) {
- console.error('驳回失败', error)
- ElMessage.error('操作失败')
+ console.error(t('elmessage.rejectFailed'), error)
+ ElMessage.error(t('elmessage.operationFailed'))
}
}
// 确认驳回后显示理由输入框
@@ -474,6 +471,12 @@ const handleRejectClose = () => {
rejectDialogVisible.value = false
}
+// 处理驳回理由对话框关闭和取消操作
+const handleRejectReasonCancel = () => {
+ rejectReasonDialogVisible.value = false
+ cancelClicked.value = false // 重置禁用状态
+ rejectReason.value = '' // 清空驳回理由
+}
const getStats = async () => {
if (!hasrefundWaitShow) {
return
@@ -578,7 +581,7 @@ const handleButtonClick = function (name) {
activeName.value = name
if (name === 'wait') {
if (!hasrefundWait) {
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
if (hasrefundWaitShow) {
@@ -586,13 +589,13 @@ const handleButtonClick = function (name) {
}
} else if (name === 'pass') {
if (!hasrefundThrough) {
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
adminPass()
} else if (name === 'reject') {
if (!hasrefundReject) {
- ElMessage.error('暂无权限')
+ ElMessage.error(t('elmessage.noPermission'))
return
}
adminReject()