diff --git a/src/components/locales/lang/zh-CN.js b/src/components/locales/lang/zh-CN.js index 277ca47..8918833 100644 --- a/src/components/locales/lang/zh-CN.js +++ b/src/components/locales/lang/zh-CN.js @@ -27,9 +27,11 @@ export default { reject: '驳回', cancel: '取消', confirm: '确认', - // 币种类型 + // 币种计量单位类型 SGD: '新币', goldCoin: '金币', + 条: '条', + goldBean: '金豆', // 对话框标题 will: '将要', }, @@ -40,8 +42,8 @@ export default { rejectReasonPlaceholder: '请输入驳回理由', - rejectSuccess: '驳回操作成功', - rejectFailed: '驳回操作失败', + rejectSuccess: '驳回成功', + rejectFailed: '驳回失败', operationFailed: '操作失败', approveSuccess: '审核通过成功', approveFailed: '审核通过失败', @@ -85,6 +87,10 @@ export default { allRefund: '全部退款', partialRefund: '部分退款', refundGoods: '退款商品', + // 审核通用-金豆审核列表字段补充 + permanentBean: '付费金豆', + freeBean: '免费金豆', + // 金币充值审核 -------------------------------- rechargeAudit: '充值审核', @@ -107,7 +113,11 @@ export default { // 金币退款审核 -------------------------------- refundAudit: '退款审核', refundTotalGold: '退款总金币数', - + // 金豆审核 --------------------------------- + totalNum: '总条数', + totalBean: '总金豆数', + permanentBean: '付费金豆', + freeBean: '免费金豆', // 对话框的标题 rejectRecord: '驳回该记录!', passRecord: '通过该记录!', diff --git a/src/views/audit/bean/beanAudit.vue b/src/views/audit/bean/beanAudit.vue index 1818529..be24f86 100644 --- a/src/views/audit/bean/beanAudit.vue +++ b/src/views/audit/bean/beanAudit.vue @@ -3,13 +3,13 @@
- 精网号: - {{ $t('common.jwcode') }}: +
- 所属地区: - {{ $t('common.market') }}: +
@@ -17,18 +17,18 @@
- 提交时间: - 审核时间: - {{ $t('common.submitTime') }}: + {{ $t('common.auditTime') }}: +
- 查询 - 重置 + {{ t('common.search') }} + {{ t('common.reset') }}
@@ -40,62 +40,62 @@
- 待审核 + {{ $t('audit.waitAudit') }} - 已通过 + {{ $t('audit.passed') }} - 已驳回 + {{ $t('audit.rejected') }}
- 总条数:{{ format3(stats.num) }}条     - 总金豆数:{{ format3(stats.beanNum) }}金豆     - 付费金豆:{{ format3(stats.permanentBean) }}金豆     - 免费金豆:{{ format3(stats.freeBean) }}金豆 + {{ $t('audit.totalNum') }}:{{ format3(stats.num) }}{{ $t('common.条') }}     + {{ $t('audit.totalBean') }}:{{ format3(stats.beanNum) }}{{ $t('common.goldBean') }}     + {{ $t('audit.permanentBean') }}:{{ format3(stats.permanentBean) }}{{ $t('common.goldBean') }}     + {{ $t('audit.freeBean') }}:{{ format3(stats.freeBean) }}{{ $t('common.goldBean') }}
- + - - - - - - - - - - + + + + + + + + + + - + + prop="operation" :label="$t('audit.operation')" width="200px"> @@ -109,23 +109,23 @@ - + - - + + { if (!hasbeanWaitShow) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } try { @@ -353,7 +356,7 @@ const getStats = async () => { // 显示通过对话框 const showApproveDialog = (row) => { if (!hasbeanWaitThough) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } passRow.value.id = row.id @@ -365,7 +368,7 @@ const showApproveDialog = (row) => { // (发现问题:加了防抖,名称为handleApprove,修改名称一致即可) const handleApproveConfirm = async function() {// 不要再传row了!哪有row!!! if (!hasbeanWaitThough) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } clicked.value = true @@ -375,14 +378,14 @@ const handleApproveConfirm = async function() {// 不要再传row了!哪有row auditName: adminData.value.adminName } await API({ url: '/beanAudit/status1', 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')) } } // 处理通过取消操作 @@ -396,12 +399,12 @@ const handleApproveClose = () => { // 处理驳回操作 const handleReject = async () => { if (!hasbeanWaitReject) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } cancelClicked.value = true if (!reason.value.trim()) { - ElMessage.warning('请输入驳回理由') + ElMessage.warning(t('elmessage.rejectReasonPlaceholder')) return } try { @@ -411,14 +414,14 @@ const handleReject = async () => { reason: reason.value } await API({ url: '/beanAudit/status2', data: params }) - ElMessage.success('驳回成功') + ElMessage.success(t('elmessage.rejectSuccess')) rejectReasonDialogVisible.value = false await get() cancelClicked.value = false await getStats() } catch (error) { - console.error('驳回失败', error) - ElMessage.error('操作失败') + console.error(t('elmessage.rejectFailed'), error) + ElMessage.error(t('elmessage.operationFailed')) } } // 确认驳回后显示理由输入框 @@ -434,6 +437,12 @@ const handleRejectCancel = () => { const handleRejectClose = () => { rejectDialogVisible.value = false } +// 处理驳回理由对话框关闭和取消操作 +const handleRejectReasonCancel = () => { + rejectReasonDialogVisible.value = false + cancelClicked.value = false // 重置禁用状态 + reason.value = '' // 清空驳回理由 +} // 这个防抖好像还不能放在定义之前(handleApproveConfirm) const throttledHandleApprove = _.throttle(handleApproveConfirm, 5000, { trailing: false @@ -441,7 +450,7 @@ const throttledHandleApprove = _.throttle(handleApproveConfirm, 5000, { // 显示驳回对话框 const showRejectDialog = (row) => { if (!hasbeanWaitReject) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } rejectRow.value.id = row.id @@ -505,19 +514,19 @@ const handleClick = async function (tab) { checkTab.value = tab.props.name if (tab.props.name === 'pending') { if (!hasbeanWait) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } adminWait() } else if (tab.props.name === 'pass') { if (!hasbeanThrough) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } adminPass() } else if (tab.props.name === 'reject') { if (!hasbeanReject) { - ElMessage.error('暂无权限') + ElMessage.error(t('elmessage.noPermission')) return } adminReject()