Browse Source

Merge branch 'zhangrenyuan/feature-20251209163007-多语言二期' into milestone-20251209-多语言二期

milestone-20251209-多语言二期
zhangrenyuan 4 weeks ago
parent
commit
8a3cefa918
  1. 29
      src/components/dialogs/LanguageSwitch.vue
  2. 49
      src/components/dialogs/changePassword.vue
  3. 1641
      src/components/locales/lang/en.js
  4. 27
      src/views/activityManage/activity.vue
  5. 4
      src/views/audit/bean/beanAudit.vue
  6. 6
      src/views/consume/bean/articleVideo.vue
  7. 6
      src/views/consume/bean/dieHardFan.vue
  8. 4
      src/views/consume/bean/liveStream.vue
  9. 65
      src/views/home.vue
  10. 6
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  11. 6
      src/views/moneyManage/receiveDetail/receiveHead.vue
  12. 8
      src/views/moneyManage/receiveDetail/receiveManage.vue
  13. 8
      src/views/moneyManage/receiveDetail/receiveService.vue
  14. 74
      src/views/moneyManage/receiveDetail/utils/staticData.js
  15. 981
      src/views/moneyManage/refundDetail/refundCharge.vue
  16. 1053
      src/views/moneyManage/refundDetail/refundFinance.vue
  17. 1027
      src/views/moneyManage/refundDetail/refundHeader.vue
  18. 692
      src/views/moneyManage/refundDetail/refundService.vue
  19. 6
      src/views/refund/gold/coinRefundDetail.vue
  20. 4
      src/views/usergold/gold/clientCountDetail.vue

29
src/components/dialogs/LanguageSwitch.vue

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-model="dialogVisible" v-model="dialogVisible"
title="语言切换"
:title="t('home.languageSwitch')"
width="300px" width="300px"
:close-on-click-modal="false" :close-on-click-modal="false"
append-to-body append-to-body
@ -9,10 +9,10 @@
style="background-color: rgb(243,250,254);" style="background-color: rgb(243,250,254);"
> >
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item label="切换语言">
<el-form-item :label="t('home.languageSwitch')">
<el-select <el-select
v-model="tempLang" v-model="tempLang"
placeholder="请选择语言"
:placeholder="t('home.languageDialog.placeholder')"
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
@ -27,8 +27,8 @@
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="handleConfirm"> </el-button>
<el-button @click="dialogVisible = false">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleConfirm">{{ t('common.confirm') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@ -43,7 +43,7 @@ import request from "@/util/http.js";
import {useAdminStore} from '@/store/index.js'; import {useAdminStore} from '@/store/index.js';
import {storeToRefs} from "pinia"; import {storeToRefs} from "pinia";
const {locale} = useI18n()
const { locale, t } = useI18n()
// //
const dialogVisible = ref(false) const dialogVisible = ref(false)
@ -55,17 +55,14 @@ const currentLang = computed(() => locale.value)
const tempLang = ref('') const tempLang = ref('')
// //
const langOptions = [
{label: '中文(简体)', value: 'zh-CN'},
// {label: '()', value: 'zh-TW'},
{label: 'English', value: 'en'},
// {label: '', value: 'th'},
// {label: 'Tiếng Vit', value: 'vi'}
]
const langOptions = computed(() => ([
{ label: t('home.languageDialog.options.zhCN'), value: 'zh-CN' },
{ label: t('home.languageDialog.options.en'), value: 'en' },
]))
// //
const getLangLabel = (langCode) => { const getLangLabel = (langCode) => {
const find = langOptions.find(item => item.value === langCode)
const find = langOptions.value.find(item => item.value === langCode)
return find ? find.label : langCode return find ? find.label : langCode
} }
@ -84,7 +81,7 @@ const handleConfirm = async () => {
await getMenuTree() await getMenuTree()
await selectMarket() await selectMarket()
ElMessage.success(`语言已切换为:${getLangLabel(tempLang.value)}`)
ElMessage.success(t('elmessage.languageChangedSuccess', { lang: getLangLabel(tempLang.value) }))
dialogVisible.value = false dialogVisible.value = false
// //
setTimeout(() => { setTimeout(() => {
@ -118,7 +115,7 @@ const getMenuTree = async function () {
} catch (error) { } catch (error) {
console.error('菜单数据请求失败:', error) console.error('菜单数据请求失败:', error)
// return { code: 500, msg: '' } // return { code: 500, msg: '' }
ElMessage.error('网络异常')
ElMessage.error(t('elmessage.inNetworkError'))
adminStore.clearState() adminStore.clearState()
} }
} }

49
src/components/dialogs/changePassword.vue

@ -7,10 +7,13 @@ import {ElMessage} from "element-plus";
import API from '@/util/http.js' import API from '@/util/http.js'
import PasswordSuccess from '../PasswordSuccess.vue'; import PasswordSuccess from '../PasswordSuccess.vue';
import router from "@/router/index.js"; import router from "@/router/index.js";
import { useI18n } from 'vue-i18n'
// //
const emit = defineEmits(['confirm']) const emit = defineEmits(['confirm'])
const { t } = useI18n()
const passwdFormRef = ref(null) const passwdFormRef = ref(null)
const passwd = reactive({ const passwd = reactive({
account: '', account: '',
@ -43,7 +46,7 @@ const isComplexValid = computed(() => {
watch(() => passwd.newPassword, (val) => { watch(() => passwd.newPassword, (val) => {
if (val && val === passwd.oldPassword) { if (val && val === passwd.oldPassword) {
errorMsg.value = '新密码不能与旧密码一致'
errorMsg.value = t('home.password.rules.notSameAsOld')
} else { } else {
errorMsg.value = '' errorMsg.value = ''
} }
@ -52,22 +55,22 @@ watch(() => passwd.newPassword, (val) => {
const loading = ref(false) const loading = ref(false)
// //
const rules = reactive({ const rules = reactive({
oldPassword: [{required: true, message: '请输入原密码', trigger: 'blur'}],
oldPassword: [{required: true, message: t('home.password.oldPasswordPlaceholder'), trigger: 'blur'}],
newPassword: [ newPassword: [
{required: true, message: '新密码不能为空', trigger: 'blur'},
{required: true, message: t('home.password.rules.newPasswordRequired'), trigger: 'blur'},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!/^[a-zA-Z0-9!@#$%^&*()-_+={}[\]|\\:;"'<>,.?/~\`]+$/.test(value)) { if (!/^[a-zA-Z0-9!@#$%^&*()-_+={}[\]|\\:;"'<>,.?/~\`]+$/.test(value)) {
callback(new Error('密码只能包含数字、字母或符号'));
callback(new Error(t('home.password.rules.allowedChars')));
} else if (value === passwd.oldPassword) { } else if (value === passwd.oldPassword) {
callback(new Error('新密码不能与旧密码一致'))
callback(new Error(t('home.password.rules.notSameAsOld')))
} else if (value.length < 8 || value.length > 16) { } else if (value.length < 8 || value.length > 16) {
callback(new Error('长度应在 8 到 16 个字符'))
callback(new Error(t('home.password.rules.length')))
} else { } else {
const types = [/\d/, /[a-z]/, /[A-Z]/, /[!@#$%^&*()\-_+={}[\]|\\:;"'<>,.?/~`]/]; const types = [/\d/, /[a-z]/, /[A-Z]/, /[!@#$%^&*()\-_+={}[\]|\\:;"'<>,.?/~`]/];
const matchCount = types.filter((r) => r.test(value)).length const matchCount = types.filter((r) => r.test(value)).length
if (matchCount < 2) { if (matchCount < 2) {
callback(new Error('密码至少包含两种类型(数字、字母或符号)'))
callback(new Error(t('home.password.rules.complexity')))
} else { } else {
callback() callback()
} }
@ -77,11 +80,11 @@ const rules = reactive({
} }
], ],
againPassword: [ againPassword: [
{required: true, message: '请再次输入新密码', trigger: 'blur'},
{required: true, message: t('home.password.rules.againPasswordRequired'), trigger: 'blur'},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value !== passwd.newPassword) { if (value !== passwd.newPassword) {
callback(new Error('两次输入密码不一致'))
callback(new Error(t('home.password.rules.notMatch')))
} else { } else {
callback() callback()
} }
@ -107,7 +110,7 @@ const changePassword = async function () {
if (result.code === 200) { if (result.code === 200) {
// 使 // 使
//await router.push({ name: 'PasswordSuccess' }); //await router.push({ name: 'PasswordSuccess' });
ElMessage.success('修改密码成功');
ElMessage.success(t('elmessage.resetPasswordSuccess'));
// 使 // 使
//await router.push('/PasswordSuccess'); //await router.push('/PasswordSuccess');
emit('confirm') emit('confirm')
@ -117,20 +120,20 @@ const changePassword = async function () {
router.push('/PasswordSuccess'); // pushreplace router.push('/PasswordSuccess'); // pushreplace
}, 1000); }, 1000);
}else if (result.code === 0){ }else if (result.code === 0){
ElMessage.error('原密码错误,请重新输入')
ElMessage.error(t('elmessage.oldPasswordError'))
passwd.oldPassword = ''; passwd.oldPassword = '';
}else if(result.code === 400){ }else if(result.code === 400){
// //
console.log('修改密码失败') console.log('修改密码失败')
ElMessage.error('修改密码失败')
ElMessage.error(t('elmessage.resetPasswordFailed'))
//todo //todo
} }
} catch (error) { } catch (error) {
console.error('修改密码失败', error) console.error('修改密码失败', error)
ElMessage.error('操作失败')
ElMessage.error(t('elmessage.operationFailed'))
// finally // finally
throw error throw error
} }
@ -186,34 +189,34 @@ onMounted(() => {
label-width="100px" label-width="100px"
class="password-form" class="password-form"
> >
<h3 class="form-title">修改密码</h3>
<h3 class="form-title">{{ t('home.password.title') }}</h3>
<!-- 原密码 --> <!-- 原密码 -->
<el-form-item prop="oldPassword" label="原密码">
<el-form-item prop="oldPassword" :label="t('home.password.oldPassword')">
<el-input <el-input
v-model.trim="passwd.oldPassword" v-model.trim="passwd.oldPassword"
type="password" type="password"
placeholder="请输入原密码"
:placeholder="t('home.password.oldPasswordPlaceholder')"
show-password show-password
/> />
</el-form-item> </el-form-item>
<!-- 新密码 --> <!-- 新密码 -->
<el-form-item prop="newPassword" label="新密码">
<el-form-item prop="newPassword" :label="t('home.password.newPassword')">
<el-input <el-input
v-model.trim="passwd.newPassword" v-model.trim="passwd.newPassword"
type="password" type="password"
placeholder="请输入新密码"
:placeholder="t('home.password.newPasswordPlaceholder')"
show-password show-password
/> />
</el-form-item> </el-form-item>
<!-- 重复密码 --> <!-- 重复密码 -->
<el-form-item prop="againPassword" label="重复密码">
<el-form-item prop="againPassword" :label="t('home.password.againPassword')">
<el-input <el-input
v-model.trim="passwd.againPassword" v-model.trim="passwd.againPassword"
type="password" type="password"
placeholder="请再次输入新密码"
:placeholder="t('home.password.againPasswordPlaceholder')"
show-password show-password
/> />
</el-form-item> </el-form-item>
@ -225,13 +228,13 @@ onMounted(() => {
<!-- 动态组件 --> <!-- 动态组件 -->
<component :is="isLengthValid ? SuccessFilled : CircleCloseFilled"/> <component :is="isLengthValid ? SuccessFilled : CircleCloseFilled"/>
</el-icon> </el-icon>
密码由8-16位数字字母或符号组成
{{ t('home.password.tips.lengthAndChars') }}
</div> </div>
<div :class="isComplexValid ? 'tip pass' : 'tip neutral'"> <div :class="isComplexValid ? 'tip pass' : 'tip neutral'">
<el-icon> <el-icon>
<component :is="isComplexValid ? SuccessFilled : CircleCloseFilled"/> <component :is="isComplexValid ? SuccessFilled : CircleCloseFilled"/>
</el-icon> </el-icon>
至少含2种以上字符
{{ t('home.password.tips.complexity') }}
</div> </div>
<div v-if="errorMsg" class="tip fail"> <div v-if="errorMsg" class="tip fail">
<el-icon> <el-icon>
@ -250,7 +253,7 @@ onMounted(() => {
:loading="loading" :loading="loading"
:disabled="!isLengthValid || !isComplexValid" :disabled="!isLengthValid || !isComplexValid"
> >
{{ loading ? '修改中...' : '确定' }}
{{ loading ? t('home.password.submitting') : t('common.confirm') }}
</el-button> </el-button>
</div> </div>

1641
src/components/locales/lang/en.js
File diff suppressed because it is too large
View File

27
src/views/activityManage/activity.vue

@ -81,11 +81,11 @@
<el-dialog v-model="showAdd" width="20vw" draggable align-center style="background-color: rgb(243,250,254);"> <el-dialog v-model="showAdd" width="20vw" draggable align-center style="background-color: rgb(243,250,254);">
<div class="add-item"> <div class="add-item">
<el-text size="large">{{ t('common_add.activity') }}</el-text>
<el-text size="large">{{ t('common_add.activity') }}</el-text>
<el-input v-model="addForm.activityName" style="width: 12vw" :placeholder="t('common_add.activityPlaceholder')" maxlength="200" clearable /> <el-input v-model="addForm.activityName" style="width: 12vw" :placeholder="t('common_add.activityPlaceholder')" maxlength="200" clearable />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text size="large">{{ t('common_add.businessBelong') }}</el-text>
<el-text size="large">{{ t('common_add.businessBelong') }}</el-text>
<el-radio-group v-model="addForm.businessBelong" style="width: 12vw"> <el-radio-group v-model="addForm.businessBelong" style="width: 12vw">
<el-radio size="large" value="客户归属地">{{ t('common.customerBelong') }}</el-radio> <el-radio size="large" value="客户归属地">{{ t('common.customerBelong') }}</el-radio>
<el-radio size="large" value="活动归属地">{{ t('common.activityBelong') }}</el-radio> <el-radio size="large" value="活动归属地">{{ t('common.activityBelong') }}</el-radio>
@ -97,12 +97,12 @@
style="width: 12vw" /> style="width: 12vw" />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text size="large">{{ t('common_add.startTime') }}</el-text>
<el-text size="large">{{ t('common_add.startTime') }}</el-text>
<el-date-picker v-model="addForm.startTime" type="datetime" :placeholder="t('common_add.startTime')" <el-date-picker v-model="addForm.startTime" type="datetime" :placeholder="t('common_add.startTime')"
:default-time="defaultStartTime" style="width: 12vw" /> :default-time="defaultStartTime" style="width: 12vw" />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text size="large">{{ t('common_add.endTime') }}</el-text>
<el-text size="large">{{ t('common_add.endTime') }}</el-text>
<el-date-picker v-model="addForm.endTime" type="datetime" :placeholder="t('common_add.endTime')" <el-date-picker v-model="addForm.endTime" type="datetime" :placeholder="t('common_add.endTime')"
:default-time="defaultEndTime" style="width: 12vw" /> :default-time="defaultEndTime" style="width: 12vw" />
</div> </div>
@ -119,24 +119,24 @@
</div> </div>
<div class="edit-item"> <div class="edit-item">
<el-text size="large">{{ t('common_add.businessBelong') }}</el-text>
<el-text size="large">{{ t('common_add.businessBelong') }}</el-text>
<el-radio-group v-model="editForm.businessBelong" style="width: 12vw"> <el-radio-group v-model="editForm.businessBelong" style="width: 12vw">
<el-radio size="large" value="客户归属地">{{ t('common.customerBelong') }}</el-radio> <el-radio size="large" value="客户归属地">{{ t('common.customerBelong') }}</el-radio>
<el-radio size="large" value="活动归属地">{{ t('common.activityBelong') }}</el-radio> <el-radio size="large" value="活动归属地">{{ t('common.activityBelong') }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="edit-item" v-show="editForm.businessBelong === '活动归属地'"> <div class="edit-item" v-show="editForm.businessBelong === '活动归属地'">
<el-text size="large">{{ t('common_add.market') }}</el-text>
<el-text size="large">{{ t('common_add.market') }}</el-text>
<el-cascader v-model="editForm.area" :options="marketOptions" :placeholder="t('common_add.marketPlaceholder')" clearable <el-cascader v-model="editForm.area" :options="marketOptions" :placeholder="t('common_add.marketPlaceholder')" clearable
style="width: 12vw" /> style="width: 12vw" />
</div> </div>
<div class="edit-item"> <div class="edit-item">
<el-text size="large">{{ t('common_add.startTime') }}</el-text>
<el-text size="large">{{ t('common_add.startTime') }}</el-text>
<el-date-picker v-model="editForm.startTime" type="datetime" :placeholder="t('common_add.startTime')" <el-date-picker v-model="editForm.startTime" type="datetime" :placeholder="t('common_add.startTime')"
:default-time="defaultStartTime" style="width: 12vw" /> :default-time="defaultStartTime" style="width: 12vw" />
</div> </div>
<div class="edit-item"> <div class="edit-item">
<el-text size="large">{{ t('common_add.endTime') }}</el-text>
<el-text size="large">{{ t('common_add.endTime') }}</el-text>
<el-date-picker v-model="editForm.endTime" type="datetime" :placeholder="t('common_add.endTime')" <el-date-picker v-model="editForm.endTime" type="datetime" :placeholder="t('common_add.endTime')"
:default-time="defaultEndTime" style="width: 12vw" /> :default-time="defaultEndTime" style="width: 12vw" />
</div> </div>
@ -171,9 +171,7 @@ const getActivityStatusText = (status) => {
return status return status
} }
//
const activityNameReg = /^[\\u4e00-\\u9fa5a-zA-Z0-9,。!?、;:“”()‘’《》【】{}——~,.!?:;'--()\"\"\\[\\]_&+=]+$/;
// --
const activityNameReg = /^[\u4e00-\u9fa5a-zA-Z0-9,。!?、;:“”()‘’《》【】{}——~,.!?:;'()\[\]_&+=\/-]+$/;
const tableData = ref([]) const tableData = ref([])
const pagination = ref({ const pagination = ref({
pageNum: 1, pageNum: 1,
@ -451,18 +449,19 @@ const hideAdd = () => {
} }
} }
const validateActivityName = (name) => { const validateActivityName = (name) => {
const value = name.trim()
// //
if (!name.trim()) {
if (!value) {
ElMessage.error('活动名称不能为空'); ElMessage.error('活动名称不能为空');
return false; return false;
} }
// 100 // 100
if (name.length > 100) {
if (value.length > 100) {
ElMessage.error('活动名称长度不能超过100字符'); ElMessage.error('活动名称长度不能超过100字符');
return false; return false;
} }
// //
if (!activityNameReg.test(name)) {
if (!activityNameReg.test(value)) {
ElMessage.error('活动名称仅支持汉字、英文字母、数字及常见标点,中文字符,。!?、;:“ ” ‘ ’ ()《》【】——~,英文字符, . ! ? : ; " ( ) [ ] - _ & + =/') ElMessage.error('活动名称仅支持汉字、英文字母、数字及常见标点,中文字符,。!?、;:“ ” ‘ ’ ()《》【】——~,英文字符, . ! ? : ; " ( ) [ ] - _ & + =/')
return false; return false;
} }

4
src/views/audit/bean/beanAudit.vue

@ -68,8 +68,8 @@
<el-table-column prop="name" :label="$t('audit.name')" width="120" show-overflow-tooltip /> <el-table-column prop="name" :label="$t('audit.name')" width="120" show-overflow-tooltip />
<el-table-column prop="jwcode" :label="$t('audit.jwcode')" width="120" /> <el-table-column prop="jwcode" :label="$t('audit.jwcode')" width="120" />
<el-table-column prop="market" :label="$t('audit.market')" width="120" /> <el-table-column prop="market" :label="$t('audit.market')" width="120" />
<el-table-column prop="permanentBean" :label="$t('audit.permanentBean')" width="120" sortable="custom" />
<el-table-column prop="freeBean" :label="$t('audit.freeBean')" width="120" sortable="custom" />
<el-table-column prop="permanentBean" :label="$t('audit.permanentBean')" width="170" sortable="custom" />
<el-table-column prop="freeBean" :label="$t('audit.freeBean')" width="140" sortable="custom" />
<el-table-column prop="remark" :label="$t('audit.note')" width="150" show-overflow-tooltip /> <el-table-column prop="remark" :label="$t('audit.note')" width="150" show-overflow-tooltip />
<el-table-column prop="submitName" :label="$t('audit.submitter')" width="120" /> <el-table-column prop="submitName" :label="$t('audit.submitter')" width="120" />
<el-table-column v-if="checkTab === 'reject'" prop="reason" :label="$t('audit.rejectReason')" width="120" show-overflow-tooltip /> <el-table-column v-if="checkTab === 'reject'" prop="reason" :label="$t('audit.rejectReason')" width="120" show-overflow-tooltip />

6
src/views/consume/bean/articleVideo.vue

@ -586,9 +586,9 @@ const getTagText = (state) => {
}} }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="beanNum" :label="t('common_list.beanNumTotal')" sortable="custom" width="120px" />
<el-table-column prop="buyBean" :label="t('common_list.permanentBean')" sortable="custom" width="120px" />
<el-table-column prop="freeBean" :label="t('common_list.freeBean')" sortable="custom" width="120px" />
<el-table-column prop="beanNum" :label="t('common_list.beanNumTotal')" sortable="custom" width="130px" />
<el-table-column prop="buyBean" :label="t('common_list.permanentBean')" sortable="custom" width="170px" />
<el-table-column prop="freeBean" :label="t('common_list.freeBean')" sortable="custom" width="130px" />
<el-table-column prop="articleId" :label="t('common_list.articleVideoID')" width="150px" /> <el-table-column prop="articleId" :label="t('common_list.articleVideoID')" width="150px" />
<el-table-column prop="articleName" :label="t('common_list.articleVideoTitle')" width="150px" show-overflow-tooltip /> <el-table-column prop="articleName" :label="t('common_list.articleVideoTitle')" width="150px" show-overflow-tooltip />
<el-table-column prop="author" :label="t('common_list.author')" width="120px" show-overflow-tooltip /> <el-table-column prop="author" :label="t('common_list.author')" width="120px" show-overflow-tooltip />

6
src/views/consume/bean/dieHardFan.vue

@ -561,10 +561,10 @@ const getTagText = (state) => {
<el-table-column prop="jwcode" :label="t('common_list.jwcode')" width="110px" fixed="left" /> <el-table-column prop="jwcode" :label="t('common_list.jwcode')" width="110px" fixed="left" />
<el-table-column prop="dept" :label="t('common_list.market')" width="110px" /> <el-table-column prop="dept" :label="t('common_list.market')" width="110px" />
<el-table-column prop="beanNum" :label="t('common_list.beanNum')" sortable="custom" width="120px" /> <el-table-column prop="beanNum" :label="t('common_list.beanNum')" sortable="custom" width="120px" />
<el-table-column prop="buyBean" :label="t('common_list.permanentBean')" sortable="custom" width="120px" />
<el-table-column prop="freeBean" :label="t('common_list.freeBean')" sortable="custom" width="120px" />
<el-table-column prop="buyBean" :label="t('common_list.permanentBean')" sortable="custom" width="170px" />
<el-table-column prop="freeBean" :label="t('common_list.freeBean')" sortable="custom" width="130px" />
<el-table-column prop="channel" :label="t('common_list.channel')" width="190px" show-overflow-tooltip /> <el-table-column prop="channel" :label="t('common_list.channel')" width="190px" show-overflow-tooltip />
<el-table-column prop="type" :label="t('common_list.memberType')" width="120px">
<el-table-column prop="type" :label="t('common_list.memberType')" width="140px">
<template #default="scope"> <template #default="scope">
{{consumeTypes.find(item => item.value === Number(scope.row.type))?.label || t('common_list.unknownType')}} {{consumeTypes.find(item => item.value === Number(scope.row.type))?.label || t('common_list.unknownType')}}
</template> </template>

4
src/views/consume/bean/liveStream.vue

@ -609,8 +609,8 @@ const getTagText = (state) => {
{{ scope.row.isBackpack == 1 ? t('common_list.yes') : t('common_list.no') }} {{ scope.row.isBackpack == 1 ? t('common_list.yes') : t('common_list.no') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="buyBean" :label="t('common_list.permanentBean')" sortable="custom" width="120px"/>
<el-table-column prop="freeBean" :label="t('common_list.freeBean')" sortable="custom" width="120px"/>
<el-table-column prop="buyBean" :label="t('common_list.permanentBean')" sortable="custom" width="170px"/>
<el-table-column prop="freeBean" :label="t('common_list.freeBean')" sortable="custom" width="130px"/>
<el-table-column prop="liveChannel" :label="t('common_list.channel')" width="120px" show-overflow-tooltip/> <el-table-column prop="liveChannel" :label="t('common_list.channel')" width="120px" show-overflow-tooltip/>
<el-table-column prop="liveName" :label="t('common_list.liveRoomName')" width="160px" show-overflow-tooltip/> <el-table-column prop="liveName" :label="t('common_list.liveRoomName')" width="160px" show-overflow-tooltip/>
<el-table-column prop="consumeTime" :label="t('common_list.consumetime')" sortable="custom" width="190px"/> <el-table-column prop="consumeTime" :label="t('common_list.consumetime')" sortable="custom" width="190px"/>

65
src/views/home.vue

@ -17,6 +17,9 @@ import {getOrderPage} from '@/utils/goToCheck.js'
import {groupMessages} from "@/utils/getMessage.js" import {groupMessages} from "@/utils/getMessage.js"
import {findMenuById,permissionMapping} from "@/utils/menuTreePermission.js" import {findMenuById,permissionMapping} from "@/utils/menuTreePermission.js"
import {useMessageStore} from '@/store/index.js' import {useMessageStore} from '@/store/index.js'
//
import { useI18n } from 'vue-i18n'
const {t} = useI18n();
// ------------------ ICONS ------------------ // ------------------ ICONS ------------------
const icons = import.meta.glob('@/assets/SvgIcons/*.svg', {eager: true}) const icons = import.meta.glob('@/assets/SvgIcons/*.svg', {eager: true})
@ -56,26 +59,26 @@ const openLanguageSwitch = () => {
} }
const handleLanguageChanged = (lang) => { const handleLanguageChanged = (lang) => {
ElMessage.success(`语言已切换到${lang}`)
ElMessage.success(t('elmessage.languageChangedSuccess', { lang }))
} }
// ------------------ ------------------ // ------------------ ------------------
const refreshData = async () => { const refreshData = async () => {
try { try {
ElMessage({message: '数据刷新中,请稍候...', type: 'info'});
ElMessage({ message: t('elmessage.refreshLoading'), type: 'info' })
const response = await API({url: '/Mysql', method: 'POST', data: {}}); const response = await API({url: '/Mysql', method: 'POST', data: {}});
if (response && response.code === 200) { if (response && response.code === 200) {
const currentRoute = route.fullPath; const currentRoute = route.fullPath;
router.replace('/blank'); router.replace('/blank');
setTimeout(() => router.replace(currentRoute), 10); setTimeout(() => router.replace(currentRoute), 10);
ElMessage.success('数据刷新成功');
ElMessage.success(t('elmessage.refreshSuccess'))
} else { } else {
ElMessage.error('数据刷新失败:' + (response?.msg || '未知错误'));
ElMessage.error(t('elmessage.refreshFailed', { msg: response?.msg || t('elmessage.unknownError') }))
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)
ElMessage.error('数据刷新异常,请重试');
ElMessage.error(t('elmessage.refreshError'))
} }
} }
@ -126,14 +129,14 @@ function logout() {
localStorage.removeItem('token') localStorage.removeItem('token')
adminStore.clearState() adminStore.clearState()
router.push('/login?machineId=' + machineId) router.push('/login?machineId=' + machineId)
ElMessage.success('退出成功')
ElMessage.success(t('elmessage.logoutSuccess'))
} }
// ------------------ ------------------ // ------------------ ------------------
const toggleFlag = () => { const toggleFlag = () => {
const newFlag = flag.value === 1 ? 0 : 1 const newFlag = flag.value === 1 ? 0 : 1
adminStore.setFlag(newFlag) adminStore.setFlag(newFlag)
ElMessage.success(newFlag === 1 ? '员工数据已隐藏' : '员工数据已显示')
ElMessage.success(newFlag === 1 ? t('elmessage.staffHidden') : t('elmessage.staffShown'))
} }
// ------------------ ------------------ // ------------------ ------------------
@ -290,9 +293,9 @@ const handleMessageClick = async (item) => {
closeMessageDialog() closeMessageDialog()
await router.push(getOrderPage(item.status)) await router.push(getOrderPage(item.status))
await getMessage() await getMessage()
ElMessage.success('跳转成功')
ElMessage.success(t('elmessage.jumpSuccess'))
} else { } else {
ElMessage.error('跳转失败')
ElMessage.error(t('elmessage.jumpFailed'))
} }
} }
@ -374,8 +377,8 @@ onMounted(() => getMessage())
<el-dropdown placement="top-start"> <el-dropdown placement="top-start">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<!-- 暂时使用静态路径确保设置图标正常显示 --> <!-- 暂时使用静态路径确保设置图标正常显示 -->
<img src="@/assets/SvgIcons/setting.svg" alt="设置" style="width: 4vh; height: 4vh"/>
<span>设置中心</span>
<img src="@/assets/SvgIcons/setting.svg" :alt="t('home.settingsCenter')" style="width: 4vh; height: 4vh"/>
<span>{{ t('home.settingsCenter') }}</span>
<el-icon class="arrow-icon"> <el-icon class="arrow-icon">
<ArrowUp/> <ArrowUp/>
</el-icon> </el-icon>
@ -383,13 +386,13 @@ onMounted(() => getMessage())
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<!-- <el-dropdown-item @click="refreshData()">数据刷新</el-dropdown-item>--> <!-- <el-dropdown-item @click="refreshData()">数据刷新</el-dropdown-item>-->
<el-dropdown-item @click="openLanguageSwitch">语言切换</el-dropdown-item>
<el-dropdown-item @click="openLanguageSwitch">{{ t('home.languageSwitch') }}</el-dropdown-item>
<el-dropdown-item @click="toggleFlag()"> <el-dropdown-item @click="toggleFlag()">
{{ flag === 1 ? '显示员工数据' : '隐藏员工数据' }}
{{ flag === 1 ? t('home.showStaffData') : t('home.hideStaffData') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click="message()">查看个人信息</el-dropdown-item>
<el-dropdown-item @click="openChangePassword">修改密码</el-dropdown-item>
<el-dropdown-item @click="logout">退出登录</el-dropdown-item>
<el-dropdown-item @click="message()">{{ t('home.viewProfile') }}</el-dropdown-item>
<el-dropdown-item @click="openChangePassword">{{ t('home.changePassword') }}</el-dropdown-item>
<el-dropdown-item @click="logout">{{ t('home.logout') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
@ -424,24 +427,24 @@ onMounted(() => getMessage())
</div> </div>
<!-- 查看个人信息 --> <!-- 查看个人信息 -->
<el-dialog v-model="messageVisible" title="查看个人信息" width="500px">
<el-dialog v-model="messageVisible" :title="t('home.viewProfile')" width="500px">
<el-form :model="adminData"> <el-form :model="adminData">
<el-form-item label="用户姓名" label-width="100px" label-position="left">
<el-form-item :label="t('home.dialog.userName')" label-width="100px" label-position="left">
<span class="message-font">{{ adminData.adminName }}</span> <span class="message-font">{{ adminData.adminName }}</span>
</el-form-item> </el-form-item>
<el-form-item label="精网号" label-width="100px" label-position="left">
<el-form-item :label="t('home.dialog.jwcode')" label-width="100px" label-position="left">
<span class="message-font">{{ adminData.account }}</span> <span class="message-font">{{ adminData.account }}</span>
</el-form-item> </el-form-item>
<el-form-item label="地区" label-width="100px" label-position="left">
<el-form-item :label="t('home.dialog.market')" label-width="100px" label-position="left">
<span class="message-font">{{ adminData.markets }}</span> <span class="message-font">{{ adminData.markets }}</span>
</el-form-item> </el-form-item>
<el-form-item label="注册时间" label-width="100px" label-position="left">
<el-form-item :label="t('home.dialog.registerTime')" label-width="100px" label-position="left">
<span class="message-font">{{ adminData.createTime }}</span> <span class="message-font">{{ adminData.createTime }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<div> <div>
<el-button text @click="closeMessage()">关闭</el-button>
<el-button text @click="closeMessage()">{{ t('common_export.close') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@ -458,13 +461,13 @@ onMounted(() => getMessage())
class="divider" class="divider"
direction="vertical" direction="vertical"
></el-divider> ></el-divider>
消息中心 ({{ messageNum }})
{{ t('home.messageCenter') }} ({{ messageNum }})
</div> </div>
<!-- todo 这是为了样式显示 一定要改逻辑--> <!-- todo 这是为了样式显示 一定要改逻辑-->
<div v-if="messageNum === 0"> <div v-if="messageNum === 0">
<div class="no-message"> <div class="no-message">
<el-image :src="noMessage"></el-image> <el-image :src="noMessage"></el-image>
<p class="no-message-text">暂无未办消息快去处理工作吧</p>
<p class="no-message-text">{{ t('home.noMessage') }}</p>
</div> </div>
</div> </div>
<div v-else <div v-else
@ -498,16 +501,16 @@ onMounted(() => getMessage())
</div> </div>
</div> </div>
<div class="message-desc">
<div v-if="findMenuById(menuTree, permissionMapping.refund_headquarters_finance)">[{{ item.marketName }}] </div>
<div>[{{item.name}}{{ item.jwcode }}]用户有条收款订单需审核</div>
</div>
<div class="message-desc">
<div v-if="findMenuById(menuTree, permissionMapping.refund_headquarters_finance)">[{{ item.marketName }}] </div>
<div>[{{item.name}}{{ item.jwcode }}]{{ t('home.orderNeedsReview') }}</div>
</div>
<el-button <el-button
type="primary" type="primary"
style="margin: 0 auto; display: block;" style="margin: 0 auto; display: block;"
@click="handleMessageClick(item)" @click="handleMessageClick(item)"
> >
前往查看
{{ t('home.goToView') }}
</el-button> </el-button>
</div> </div>
<el-divider <el-divider
@ -523,7 +526,7 @@ onMounted(() => getMessage())
class="view-all" class="view-all"
@click="toggleShowAll" @click="toggleShowAll"
> >
{{ showAll ? '收起' : '查看全部' }}
{{ showAll ? t('home.collapse') : t('home.viewAll') }}
</el-button> </el-button>
<div v-if="showAll" @click="scrollToTop" class="go-top"> <div v-if="showAll" @click="scrollToTop" class="go-top">
@ -532,7 +535,7 @@ onMounted(() => getMessage())
style="width: 20px; height: 20px;" style="width: 20px; height: 20px;"
fit="contain" fit="contain"
/> />
<span>返回顶部</span>
<span>{{ t('home.backToTop') }}</span>
</div> </div>
</div> </div>
</div> </div>

6
src/views/moneyManage/receiveDetail/receiveFinance.vue

@ -654,7 +654,7 @@ import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue';
// //
import { editFormRule } from './utils/recriveFormRules.js'; import { editFormRule } from './utils/recriveFormRules.js';
import { productList, MarketNameForId, CurrencyForId, marketList } from './utils/staticData.js';
import { productList, MarketNameForId, CurrencyForId, marketList, normalizeSubmitterMarket } from './utils/staticData.js';
import { useAdminStore } from '@/store/index.js'; import { useAdminStore } from '@/store/index.js';
import { hasMenuPermission } from '@/utils/menuTreePermission.js'; import { hasMenuPermission } from '@/utils/menuTreePermission.js';
@ -941,7 +941,7 @@ const getlist = async () => {
// ID=1 // ID=1
const cashRoleId = '1'; const cashRoleId = '1';
const receivedMarket = adminData.value.markets;
const receivedMarket = normalizeSubmitterMarket(adminData.value.markets);
if (activeTab.value === 'wait') searchData.value.status = 0; if (activeTab.value === 'wait') searchData.value.status = 0;
else if (activeTab.value === 'pass') searchData.value.status = 13; else if (activeTab.value === 'pass') searchData.value.status = 13;
else if (activeTab.value === 'done') searchData.value.status = 46; else if (activeTab.value === 'done') searchData.value.status = 46;
@ -975,7 +975,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket), receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId, cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect, paymentCurrency: payCurrencySelect,
submitterMarket: receivedMarket,
submitterMarket: normalizeSubmitterMarket(receivedMarket),
goodsName: goodsName, goodsName: goodsName,
// market: MarketNameForId(searchData.value.market) // market: MarketNameForId(searchData.value.market)
market: markets.value market: markets.value

6
src/views/moneyManage/receiveDetail/receiveHead.vue

@ -517,7 +517,7 @@ import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue';
// //
import { editFormRule } from './utils/recriveFormRules.js'; import { editFormRule } from './utils/recriveFormRules.js';
import { productList, MarketNameForId, CurrencyForId, marketList } from './utils/staticData.js';
import { productList, MarketNameForId, CurrencyForId, marketList, normalizeSubmitterMarket } from './utils/staticData.js';
import { useAdminStore } from '@/store/index.js'; import { useAdminStore } from '@/store/index.js';
import { hasMenuPermission } from '@/utils/menuTreePermission.js'; import { hasMenuPermission } from '@/utils/menuTreePermission.js';
@ -624,7 +624,7 @@ const exportExcel = async function () {
// } // }
const cashRoleId = '2'; const cashRoleId = '2';
const submitterMarket = adminData.value.markets;
const submitterMarket = normalizeSubmitterMarket(adminData.value.markets);
searchData.value.status = 46; searchData.value.status = 46;
const params = { const params = {
...pageInfo.value, ...pageInfo.value,
@ -829,7 +829,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket), receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId, cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect, paymentCurrency: payCurrencySelect,
submitterMarket: receivedMarket,
submitterMarket: normalizeSubmitterMarket(receivedMarket),
goodsName: goodsName, goodsName: goodsName,
//market: MarketNameForId(searchData.value.market) //market: MarketNameForId(searchData.value.market)
market: markets.value market: markets.value

8
src/views/moneyManage/receiveDetail/receiveManage.vue

@ -654,7 +654,7 @@ import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue';
// //
import { editFormRule } from './utils/recriveFormRules.js'; import { editFormRule } from './utils/recriveFormRules.js';
import { productList, MarketNameForId, CurrencyForId, marketList } from './utils/staticData.js';
import { productList, MarketNameForId, CurrencyForId, marketList, normalizeSubmitterMarket } from './utils/staticData.js';
import { useAdminStore } from '@/store/index.js'; import { useAdminStore } from '@/store/index.js';
import { hasMenuPermission } from '@/utils/menuTreePermission.js'; import { hasMenuPermission } from '@/utils/menuTreePermission.js';
@ -820,7 +820,7 @@ const exportExcel = async function () {
// } // }
const cashRoleId = '1'; const cashRoleId = '1';
const submitterMarket = adminData.value.markets;
const submitterMarket = normalizeSubmitterMarket(adminData.value.markets);
searchData.value.status = 46; searchData.value.status = 46;
const params = { const params = {
...pageInfo.value, ...pageInfo.value,
@ -941,7 +941,7 @@ const getlist = async () => {
// ID=1 // ID=1
const cashRoleId = '1'; const cashRoleId = '1';
const receivedMarket = adminData.value.markets;
const receivedMarket = normalizeSubmitterMarket(adminData.value.markets);
if (activeTab.value === 'wait') searchData.value.status = 0; if (activeTab.value === 'wait') searchData.value.status = 0;
else if (activeTab.value === 'pass') searchData.value.status = 13; else if (activeTab.value === 'pass') searchData.value.status = 13;
else if (activeTab.value === 'done') searchData.value.status = 46; else if (activeTab.value === 'done') searchData.value.status = 46;
@ -975,7 +975,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket), receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId, cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect, paymentCurrency: payCurrencySelect,
submitterMarket: receivedMarket,
submitterMarket: normalizeSubmitterMarket(receivedMarket),
goodsName: goodsName, goodsName: goodsName,
// market: MarketNameForId(searchData.value.market) // market: MarketNameForId(searchData.value.market)
market: markets.value market: markets.value

8
src/views/moneyManage/receiveDetail/receiveService.vue

@ -450,7 +450,7 @@ import _ from 'lodash'
import { isNumber } from 'lodash' import { isNumber } from 'lodash'
// //
import { addFormRule } from './utils/recriveFormRules.js' import { addFormRule } from './utils/recriveFormRules.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList } from './utils/staticData.js'
import { productList, MarketNameForId, CurrencyForId, marketList, normalizeSubmitterMarket, normalizeGoodsName, normalizePayType } from './utils/staticData.js'
// //
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
@ -575,7 +575,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket), receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId, cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect, paymentCurrency: payCurrencySelect,
submitterMarket: adminData.value.markets,
submitterMarket: normalizeSubmitterMarket(adminData.value.markets),
goodsName: goodsName, goodsName: goodsName,
market: MarketNameForId(searchData.value.market) market: MarketNameForId(searchData.value.market)
} }
@ -774,6 +774,8 @@ const handleAddForm = async () => {
url: '/cashCollection/add', url: '/cashCollection/add',
data: { data: {
...addFormData.value, ...addFormData.value,
goodsName: normalizeGoodsName(addFormData.value.goodsName),
payType: normalizePayType(addFormData.value.payType),
submitterId: adminData.value.id, submitterId: adminData.value.id,
permanentGold: (addFormData.value.permanentGold || 0) * 100, permanentGold: (addFormData.value.permanentGold || 0) * 100,
freeGold: (addFormData.value.freeGold || 0) * 100, freeGold: (addFormData.value.freeGold || 0) * 100,
@ -781,7 +783,7 @@ const handleAddForm = async () => {
paymentCurrency: CurrencyForId(addFormData.value.paymentCurrency) || '', paymentCurrency: CurrencyForId(addFormData.value.paymentCurrency) || '',
receivedMarket: MarketNameForId(addFormData.value.receivedMarket) || '', receivedMarket: MarketNameForId(addFormData.value.receivedMarket) || '',
paymentAmount: (addFormData.value.paymentAmount) * 100, paymentAmount: (addFormData.value.paymentAmount) * 100,
submitterMarket: adminData.value.markets
submitterMarket: normalizeSubmitterMarket(adminData.value.markets)
} }
}) })
if (result.code == 200) { if (result.code == 200) {

74
src/views/moneyManage/receiveDetail/utils/staticData.js

@ -213,6 +213,80 @@ export const MarketNameForId = (name) => {
return 24018 return 24018
} else if (name == t('cash.markets.VietnamHCM') || name == '越南HCM' || name == 'Vietnam HCM') { } else if (name == t('cash.markets.VietnamHCM') || name == '越南HCM' || name == 'Vietnam HCM') {
return 24022 return 24022
} else if (name == t('common.markets.headquarters') || name == '总部' || name == 'Headquarters' || name == 'HQ') {
return '总部'
} else {
return name
}
}
export const normalizeSubmitterMarket = (name) => {
if (name == t('common.markets.headquarters') || name == '总部' || name == 'Headquarters' || name == 'HQ') {
return '总部'
} else {
return name
}
}
export const normalizeGoodsName = (name) => {
if (name == t('cash.coinRecharge') || name == '金币充值' || name == 'Coin Recharge') {
return '金币充值'
} else if (name == t('cash.aiService.aiTracking') || name == 'AI机构追踪' || name == 'AI Track') {
return 'AI机构追踪'
} else if (name == t('cash.aiService.aiAttack') || name == 'AI机构出击' || name == 'AI Attack') {
return 'AI机构出击'
} else if (name == t('cash.aiService.aiFunds') || name == 'AI机构资金' || name == 'AI Funds') {
return 'AI机构资金'
} else if (name == t('cash.aiService.aiActivity') || name == 'AI机构活跃度' || name == 'AI Activity') {
return 'AI机构活跃度'
} else if (name == t('cash.aiService.superPerspective') || name == '超级机构透视' || name == 'Super View') {
return '超级机构透视'
} else if (name == t('cash.aiService.superAmbush') || name == '超级机构伏击' || name == 'Super Ambush') {
return '超级机构伏击'
} else if (name == t('cash.aiService.superHunting') || name == '超级机构猎杀' || name == 'Super Hunt') {
return '超级机构猎杀'
} else if (name == t('cash.aiService.superPulse') || name == '超级机构脉搏' || name == 'Super Pulse') {
return '超级机构脉搏'
} else if (name == t('cash.aiService.superCompass') || name == '超级机构罗盘' || name == 'Super Compass') {
return '超级机构罗盘'
} else if (name == t('cash.aiService.aiDetectionTool') || name == 'AI机构探测神器' || name == 'AI Detector') {
return 'AI机构探测神器'
} else if (name == t('cash.aiService.superDetectionTool') || name == '超级机构探测神器' || name == 'Super Detector') {
return '超级机构探测神器'
} else if (name == t('cash.staticInfoFee') || name == '静态信息费' || name == 'Static Fee') {
return '静态信息费'
} else if (name == t('cash.BGmember') || name == '博股会员' || name == 'BG Member') {
return '博股会员'
} else if (name == t('cash.HC') || name == 'HC信息费' || name == 'HC Fee') {
return 'HC信息费'
} else {
return name
}
}
export const normalizePayType = (name) => {
if (name == t('cash.payMethods.stripe') || name == 'Stripe' || name == 'Stripe-链接收款') {
return 'Stripe-链接收款'
} else if (name == t('cash.payMethods.ipay88') || name == 'Ipay88' || name == 'Ipay88-链接收款') {
return 'Ipay88-链接收款'
} else if (name == t('cash.payMethods.paymentAsia') || name == 'PaymentAsia' || name == 'PaymentAsia-链接收款') {
return 'PaymentAsia-链接收款'
} else if (name == t('cash.payMethods.transfer') || name == 'E-Transfer') {
return 'E-Transfer'
} else if (name == t('cash.payMethods.grabpay') || name == 'Grabpay') {
return 'Grabpay'
} else if (name == t('cash.payMethods.nets') || name == 'Nets') {
return 'Nets'
} else if (name == t('cash.payMethods.paypal') || name == 'PayPal') {
return 'PayPal'
} else if (name == t('cash.payMethods.bankTransfer') || name == '银行转账' || name == 'Bank Transfer') {
return '银行转账'
} else if (name == t('cash.payMethods.cash') || name == '现金' || name == 'Cash') {
return '现金'
} else if (name == t('cash.payMethods.check') || name == '支票' || name == 'Check') {
return '支票'
} else if (name == t('cash.payMethods.card') || name == '刷卡' || name == 'Card') {
return '刷卡'
} else { } else {
return name return name
} }

981
src/views/moneyManage/refundDetail/refundCharge.vue
File diff suppressed because it is too large
View File

1053
src/views/moneyManage/refundDetail/refundFinance.vue
File diff suppressed because it is too large
View File

1027
src/views/moneyManage/refundDetail/refundHeader.vue
File diff suppressed because it is too large
View File

692
src/views/moneyManage/refundDetail/refundService.vue

@ -1,226 +1,227 @@
<!-- 客服 --> <!-- 客服 -->
<template> <template>
<el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
<div class="condition">
<div class="item1">
<el-text size="large" style="width:4vw;">{{ $t('common.jwcode') }}</el-text>
<el-input v-model="searchForm.jwcode" :placeholder="$t('common.jwcodePlaceholder')" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">{{ $t('common.customerName') }}</el-text>
<el-input v-model="searchForm.name" :placeholder="$t('common.customerNamePlaceholder')" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">{{ $t('common.goodsName') }}</el-text>
<el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;" clearable />
</div>
<div class="item1" v-if="adminData.markets === '总部'">
<el-text size="large" style="width:4vw;">{{ $t('common.market') }}</el-text>
<el-cascader style="width: 9vw;" v-model="searchForm.market" :options="market" :placeholder="$t('common.marketPlaceholder')"
clearable @change="handleMarketChange" />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">{{ $t('common.orderStatus') }}</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;" clearable>
<el-option v-for="item in statusList" :key="item" :label="t('cash_refund.' + item)" :value="item" />
</el-select>
</div>
</div>
<div class="condition">
<div class="item2">
<el-text size="large" style="width:4vw;">{{ $t('cash_refund.paymentCurrency') }}</el-text>
<el-select v-model="searchForm.paymentCurrency" style="width:9vw;" clearable>
<el-option v-for="item in currencies" :key="item" :label="item" :value="item" />
</el-select>
</div>
<div class="item2">
<el-text size="large" style="width:4vw;">{{ $t('common.payType') }}</el-text>
<el-select v-model="searchForm.payType" style="width:9vw;" clearable>
<el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
</el-select>
</div>
<div class="item2" style="width: 28.5vw;">
<el-text size="large" style="width:4vw;">{{ $t('common.payTime') }}</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')"
:end-placeholder="$t('common.endTime')" style="width:22vw;" :disabled-date="disabledDate" :default-time="defaultTime"
clearable />
</div>
<div>
<el-button type="primary" @click="getRefund">{{ $t('common.search') }}</el-button>
<el-button type="success" @click="reset">{{ $t('common.reset') }}</el-button>
</div>
</div>
</el-card>
<el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);">
<el-table :data="tableData" style="height:73vh;width:82vw;background-color: rgb(243,250,254);">
<el-table-column type="index" :label="$t('common_list.id')" width="60" fixed="left">
<template #default="scope">
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
</template>
</el-table-column>
<el-table-column prop="jwcode" :label="$t('common_list.homilyId')" width="120" fixed="left" />
<el-table-column prop="name" :label="$t('common_list.name')" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="marketName" :label="$t('common_list.market')" width="120" />
<el-table-column prop="activity" :label="$t('common.activityName')" width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" :label="$t('common_list.goodsName')" width="130" show-overflow-tooltip />
<el-table-column prop="goodsNum" :label="$t('common_list.goodsNum')" width="120" />
<el-table-column prop="paymentCurrency" :label="$t('cash_refund.paymentCurrency')" width="120" />
<el-table-column prop="paymentAmount" :label="$t('cash_refund.paymentAmount')" width="120" />
<el-table-column prop="payType" :label="$t('common_list.payModel')" width="140" />
<el-table-column prop="payTime" :label="$t('common.payTime')" width="180" />
<el-table-column prop="voucher" :label="$t('cash_refund.payVoucher')" width="110px">
<template #default="scope">
<div v-if="scope.row.voucher"
style="display: flex; justify-content: center; align-items: center; cursor: pointer;"
@click="previewImage(scope.row.voucher)">
<img :src="scope.row.voucher" alt="转账凭证" style="width: auto; height: 40px;">
</div>
<div v-else style="display: flex; justify-content: center; align-items: center; height: 40px;">{{ $t('cash_refund.noVoucher') }}
</div>
</template>
</el-table-column>
<el-table-column prop="remark" :label="$t('common_list.remark')" width="150" show-overflow-tooltip />
<el-table-column prop="status" :label="$t('common_list.orderStatus')" width="120">
<template #default="scope">
{{
[10].includes(scope.row.status) ? t('cash_refund.submitted') :
[20, 30, 40].includes(scope.row.status) ? t('cash_refund.inProgress') :
[12, 22, 32].includes(scope.row.status) ? t('cash_refund.rejected') :
[11].includes(scope.row.status) ? t('cash_refund.withdrawn') :
scope.row.status === 41 ? t('audit.RefundSuccessful') :
scope.row.status
}}
</template>
</el-table-column>
<el-table-column prop="operation" :label="$t('audit.operation')" fixed="right" width="100px">
<template #default="scope">
<div class="operation">
<el-button v-if="scope.row.status === 10" type="primary" text
@click="showBackDialog(scope.row)">
{{ $t('common.cancel') }}
</el-button>
<el-button v-if="scope.row.status === 11" type="primary" text
@click="showEditDialog(scope.row)">
{{ $t('common.edit') }}
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
@size-change="handlePageSizeChange" @current-change="handleCurrentChange"
style="margin-top: 1vh;"></el-pagination>
</el-card>
<el-dialog v-model="showEdit" :title="$t('refund.addCoinRefund')" class="editDialog" overflow draggable
style="width: 40vw; background-color: #F3FAFE !important;">
<div style="display: flex;">
<div class="left">
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common.jwcode') }}</el-text>
<el-input v-model="editRow.jwcode" style="width:10vw;" disabled />
<el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
<div class="condition">
<div class="item1">
<el-text size="large" style="width:4vw;">{{ t('common.jwcode') }}</el-text>
<el-input v-model="searchForm.jwcode" :placeholder="t('common.jwcodePlaceholder')" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">{{ t('common.customerName') }}</el-text>
<el-input v-model="searchForm.name" :placeholder="t('common.customerNamePlaceholder')" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">{{ t('common.productName') }}</el-text>
<el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;" :placeholder="t('common.productNamePlaceholder')" clearable />
</div>
<div class="item1" v-if="isHeadquarters">
<el-text size="large" style="width:4vw;">{{ t('common.market') }}</el-text>
<el-cascader style="width: 9vw;" v-model="searchForm.market" :options="market" :placeholder="t('common.marketPlaceholder')"
clearable @change="handleMarketChange" />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;" multiple>{{ t('common.orderStatus') }}</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;" clearable>
<el-option v-for="item in statusList" :key="item" :label="item" :value="item" />
</el-select>
</div>
</div> </div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('elmessage.customerName') }}</el-text>
<el-input v-model="editRow.name" style="width:10vw;" disabled />
<div class="condition">
<div class="item2">
<el-text size="large" style="width:4vw;">{{ t('common.payCurrency') }}</el-text>
<el-select v-model="searchForm.paymentCurrency" style="width:9vw;" clearable>
<el-option v-for="item in currencies" :key="item" :label="item" :value="item" />
</el-select>
</div>
<div class="item2">
<el-text size="large" style="width:4vw;">{{ t('common.payModel') }}</el-text>
<el-select v-model="searchForm.payType" style="width:9vw;" clearable>
<el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
</el-select>
</div>
<div class="item2" style="width: 28.5vw;">
<el-text size="large" style="width:4vw;">{{ t('common.payTime') }}</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" :range-separator="t('common.to')" :start-placeholder="t('common.startTime')"
:end-placeholder="t('common.endTime')" style="width:22vw;" :disabled-date="disabledDate" :default-time="defaultTime"
clearable />
</div>
<div>
<el-button type="primary" @click="getRefund">{{ t('common.search') }}</el-button>
<!-- <el-button type="warning">导出excel</el-button>
<el-button type="primary">查看导出列表</el-button> -->
<el-button type="success" @click="reset">{{ t('common.reset') }}</el-button>
</div>
</div> </div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common.market') }}</el-text>
<el-input v-model="editRow.marketName" style="width:10vw;" disabled />
</el-card>
<el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);">
<el-table :data="tableData" style="height:73vh;width:82vw;background-color: rgb(243,250,254);">
<el-table-column type="index" :label="t('common_list.id')" width="60" fixed="left">
<template #default="scope">
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
</template>
</el-table-column>
<el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="name" :label="t('common_list.name')" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="marketName" :label="t('common_list.market')" width="120" />
<el-table-column prop="activity" :label="t('common_list.activity')" width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" :label="t('common_list.productName')" width="130" show-overflow-tooltip />
<el-table-column prop="goodsNum" :label="t('common_list.productNum')" width="120" />
<el-table-column prop="paymentCurrency" :label="t('common_add.payCurrency')" width="120" />
<el-table-column prop="paymentAmount" :label="t('common_add.payAmount')" width="120" />
<el-table-column prop="payType" :label="t('common_add.payMethod')" width="140" />
<el-table-column prop="payTime" :label="t('common_add.payTime')" width="180" />
<el-table-column prop="voucher" :label="t('common_add.transferVoucher')" width="110px">
<template #default="scope">
<div v-if="scope.row.voucher"
style="display: flex; justify-content: center; align-items: center; cursor: pointer;"
@click="previewImage(scope.row.voucher)">
<img :src="scope.row.voucher" alt="转账凭证" style="width: auto; height: 40px;">
</div>
<div v-else style="display: flex; justify-content: center; align-items: center; height: 40px;">{{ t('common_add.noTransferVoucher') }}
</div>
</template>
</el-table-column>
<el-table-column prop="remark" :label="t('common_list.remark')" width="150" show-overflow-tooltip />
<el-table-column prop="status" :label="t('common_list.orderStatus')" width="120">
<template #default="scope">
{{
[10].includes(scope.row.status) ? t('cash.statusList.submitted') :
[20, 30, 40].includes(scope.row.status) ? t('cash.statusList.inProgress') :
[12, 22, 32].includes(scope.row.status) ? t('cash.statusList.rejected') :
[11].includes(scope.row.status) ? t('cash.statusList.recalled') :
scope.row.status === 41 ? t('cash.statusList.refunded') : scope.row.status
}}
</template>
</el-table-column>
<el-table-column prop="operation" :label="t('common_list.operation')" fixed="right" width="140px">
<template #default="scope">
<div class="operation">
<el-button v-if="scope.row.status === 10" type="primary" text
@click="showBackDialog(scope.row)">
{{ t('common.withdraw') }}
</el-button>
<el-button v-if="scope.row.status === 11" type="primary" text
@click="showEditDialog(scope.row)">
{{ t('common.edit') }}
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
@size-change="handlePageSizeChange" @current-change="handleCurrentChange"
style="margin-top: 1vh;"></el-pagination>
</el-card>
<el-dialog v-model="showEdit" :title="t('common_add.refund')" class="editDialog" overflow draggable
style="width: 40vw; background-color: #F3FAFE !important;">
<div style="display: flex;">
<div class="left">
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.jwcode') }}</el-text>
<el-input v-model="editRow.jwcode" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.customerName') }}</el-text>
<el-input v-model="editRow.name" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.market') }}</el-text>
<el-input v-model="editRow.marketName" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.activity') }}</el-text>
<el-input v-model="editRow.activity" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.productName') }}</el-text>
<el-input v-model="editRow.goodsName" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.productNum') }}</el-text>
<el-input v-model="editRow.goodsNum" style="width:10vw;" disabled />
&nbsp;{{ t('cash.unit') }}
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.payCurrency') }}</el-text>
<el-input v-model="editRow.paymentCurrency" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.payAmount') }}</el-text>
<el-input v-model="editRow.paymentAmount" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.payMethod') }}</el-text>
<el-input v-model="editRow.payType" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.payTime') }}</el-text>
<el-date-picker v-model="editRow.payTime" type="datetime" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="editRow.voucher" :src="editRow.voucher"
style="width: 80px; height: 80px; object-fit: cover;">
<div v-else>
{{ t('common_add.noTransferVoucher') }}
</div>
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.remark') }}</el-text>
<el-input v-model="editRow.remark" style="width:10vw;" :rows="3" type="textarea" maxLength="100"
disabled show-word-limit />
</div>
</div>
<div class="right">
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.refundType') }}</el-text>
<el-radio-group v-model="editForm.refundModel">
<el-radio value="0">{{ t('common_add.refundModelAll') }}</el-radio>
<el-radio value="1">{{ t('common_add.refundModelPart') }}</el-radio>
</el-radio-group>
</div>
<div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'">
<el-text style="width:4vw;">{{ t('common_add.permanentGold') }}</el-text>
<el-input v-model="editForm.partRefundGold" style="width:5vw;" />&nbsp;&nbsp;{{ t('cash.unit') }}
</div>
<div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'">
<el-text style="width:4vw;">{{ t('common_add.freeGold') }}</el-text>
<el-input v-model="editForm.partRefundFree" style="width:5vw;" />&nbsp;&nbsp;{{ t('cash.unit') }}
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ t('common_add.refundReason') }}</el-text>
<el-input v-model="editForm.refundReason" style="width:10vw;" :rows="5" maxlength="150"
show-word-limit type="textarea" />
</div>
<div>{{ t('common_add.tip') }}</div>
<div style="display:flex;justify-content: center;margin-top: 5vh;">
<el-button type="default" @click="cancelEdit">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="submitEdit">{{ t('common.submit') }}</el-button>
</div>
</div>
</div> </div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common.activityName') }}</el-text>
<el-input v-model="editRow.activity" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common_list.goodsName') }}</el-text>
<el-input v-model="editRow.goodsName" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common_list.goodsNum') }}</el-text>
<el-input v-model="editRow.goodsNum" style="width:10vw;" disabled />
&nbsp;{{ $t('common.个') }}
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('cash_refund.paymentCurrency') }}</el-text>
<el-input v-model="editRow.paymentCurrency" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('cash_refund.paymentAmount') }}</el-text>
<el-input v-model="editRow.paymentAmount" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common_list.payModel') }}</el-text>
<el-input v-model="editRow.payType" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common.payTime') }}</el-text>
<el-date-picker v-model="editRow.payTime" type="datetime" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('cash_refund.payVoucher') }}</el-text>
<img v-if="editRow.voucher" :src="editRow.voucher"
style="width: 80px; height: 80px; object-fit: cover;">
<div v-else>
{{ $t('cash_refund.noVoucher') }}
</div>
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common_list.remark') }}</el-text>
<el-input v-model="editRow.remark" style="width:10vw;" :rows="3" type="textarea" maxLength="100"
disabled show-word-limit />
</div>
</div>
<div class="right">
<div class="add-item">
<el-text style="width:4vw;">{{ $t('cash_refund.refundModel') }}</el-text>
<el-radio-group v-model="editForm.refundModel">
<el-radio value="0">{{ $t('cash_refund.fullRefund') }}</el-radio>
<el-radio value="1">{{ $t('cash_refund.partialRefund') }}</el-radio>
</el-radio-group>
</div>
<div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'">
<el-text style="width:4vw;">{{ $t('common_list.permanentGold') }}</el-text>
<el-input v-model="editForm.partRefundGold" style="width:5vw;" />&nbsp;&nbsp;{{ $t('common.个') }}
</div>
<div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'">
<el-text style="width:4vw;">{{ $t('common_list.freeGold') }}</el-text>
<el-input v-model="editForm.partRefundFree" style="width:5vw;" />&nbsp;&nbsp;{{ $t('common.个') }}
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common_list.refundReason') }}</el-text>
<el-input v-model="editForm.refundReason" style="width:10vw;" :rows="5" maxlength="150"
show-word-limit type="textarea" />
</div>
<div>{{ $t('cash_refund.refundReasonTip') }}</div>
<div style="display:flex;justify-content: center;margin-top: 5vh;">
<el-button type="default" @click="cancelEdit">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="submitEdit">{{ $t('common.submit') }}</el-button>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
<ConfirmDialog v-model="showBack" :message="t('cash_refund.will') + t('cash_refund.withdrawRecord')" @confirm="recall" @cancel="showBack = false"
@close="showBack = false" />
<ConfirmDialog v-model="showBack" :message="t('common.willRecallOrder')" @confirm="recall" @cancel="showBack = false"
@close="showBack = false" />
<el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{ <el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{
backgroundImage: `url(${RefundRecallBackground})`, backgroundImage: `url(${RefundRecallBackground})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
}"> }">
<div class="back-text">{{ $t('cash_refund.refundAmountError') }}</div>
<div class="back-btn">
<el-button type="default" @click="showError = false">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="" style="margin-left: 2vw;">{{ $t('common.confirm') }}</el-button>
</div>
</el-dialog>
<div class="back-text">{{ t('elmessage.refundAmountError') }}</div>
<div class="back-btn">
<el-button type="default" @click="showError = false">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="" style="margin-left: 2vw;">{{ t('common.confirm') }}</el-button>
</div>
</el-dialog>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload ' const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload '
@ -233,8 +234,14 @@ import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menu
import ConfirmDialog from '@/components/dialogs/ConfirmDialog.vue' import ConfirmDialog from '@/components/dialogs/ConfirmDialog.vue'
import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import RefundRecallBackground from '@/assets/images/refund-recall.png' import RefundRecallBackground from '@/assets/images/refund-recall.png'
import { isNumber } from 'lodash'
import { re } from 'mathjs'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
const { t } = useI18n() const { t } = useI18n()
const isHeadquarters = computed(() => {
const m = adminData.value.markets
return m === t('common.markets.headquarters') || m === '总部' || m === 'Headquarters'
})
const dateRange = ref([]) const dateRange = ref([])
const searchForm = ref({ const searchForm = ref({
@ -263,42 +270,48 @@ const uploadRef = ref(null)
const showBack = ref(false) const showBack = ref(false)
const showError = ref(false) const showError = ref(false)
const isKF = adminData.value.adminName.includes('客服') const isKF = adminData.value.adminName.includes('客服')
const statusList = ref(['submitted', 'withdrawn', 'inProgress', 'RefundSuccessful', 'rejected'])
const statusList = computed(() => [
t('cash.statusList.submitted'),
t('cash.statusList.recalled'),
t('cash.statusList.inProgress'),
t('cash.statusList.refunded'),
t('cash.statusList.rejected')
])
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_customer_service_refund_pending)) {
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
const statusParam = ref([])
if (searchForm.value.statuses === 'submitted') {
statusParam.value = [10]
} else if (searchForm.value.statuses === 'withdrawn') {
statusParam.value = [11]
} else if (searchForm.value.statuses === 'inProgress') {
statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === 'RefundSuccessful') {
statusParam.value = [41]
} else if (searchForm.value.statuses === 'rejected') {
statusParam.value = [12, 22, 32]
if (!hasMenuPermission(menuTree.value, permissionMapping.view_customer_service_refund_pending)) {
ElMessage.error(t('elmessage.noPermission'))
return
} }
try {
const statusParam = ref([])
if (searchForm.value.statuses === t('cash.statusList.submitted')) {
statusParam.value = [10]
} else if (searchForm.value.statuses === t('cash.statusList.recalled')) {
statusParam.value = [11]
} else if (searchForm.value.statuses === t('cash.statusList.inProgress')) {
statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === t('cash.statusList.refunded')) {
statusParam.value = [41]
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [12, 22, 32]
}
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error(t('elmessage.invalidJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error(t('elmessage.jwcodeTooLong'))
return;
}
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error(t('elmessage.limitJwcodeLength'))
return;
}
const params = { const params = {
pageNum: pagination.value.pageNum, pageNum: pagination.value.pageNum,
@ -326,111 +339,111 @@ const getRefund = async function () {
data: params data: params
}) })
tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0
} catch (error) {
ElMessage.error(error.message || t('elmessage.requestFailed'))
}
tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0
} catch (error) {
ElMessage.error(error.message || t('elmessage.searchFailed'))
}
} }
// //
const recall = async function () { const recall = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.withdraw_customer_service_refund)) {
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
console.log(backRow.value)
const params = {
id: backRow.value.id,
status: backRow.value.status,
orderType: backRow.value.orderType
if (!hasMenuPermission(menuTree.value, permissionMapping.withdraw_customer_service_refund)) {
ElMessage.error(t('elmessage.noPermission'))
return
} }
const result = await API({
url: '/Money/update',
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || t('elmessage.addSuccess'))
showBack.value = false
getRefund()
} else {
ElMessage.error(result.msg || t('elmessage.operationFailed'))
try {
console.log(backRow.value)
const params = {
id: backRow.value.id,
status: backRow.value.status,
orderType: backRow.value.orderType
}
const result = await API({
url: '/Money/update',
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || t('elmessage.withdrawSuccess'))
showBack.value = false
getRefund()
} else {
ElMessage.error(result.msg || t('elmessage.operationFailed'))
}
} catch (error) {
ElMessage.error(error.message || t('elmessage.operationFailed'))
} }
} catch (error) {
ElMessage.error(error.message || t('elmessage.operationFailed'))
}
} }
// //
const submitEdit = async function () { const submitEdit = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.edit_customer_service_refund)) {
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
console.log(editRow.value)
if(!editForm.value.refundModel) {
ElMessage.error(t('elmessage.checkRefundModel'))
return
}else if(!editForm.value.refundReason) {
ElMessage.error(t('elmessage.checkRefundReason'))
return
}else if(editForm.value.refundModel == 1 && (!editForm.value.partRefundGold || !editForm.value.partRefundFree)) {
ElMessage.error(t('elmessage.checkRefundGold'))
return
}else if (editForm.value.refundModel == 1 && (editForm.value.partRefundGold || editForm.value.partRefundFree)) {
const isPositiveInteger = /^[1-9]\d*$/.test(editForm.value.partRefundGold)
if (!isPositiveInteger) {
ElMessage.error(t('elmessage.invalidPermanentGold'))
return
}
const isPositiveInteger1 = /^[1-9]\d*$/.test(editForm.value.partRefundFree)
if (!isPositiveInteger1) {
ElMessage.error(t('elmessage.invalidFreeGold'))
if (!hasMenuPermission(menuTree.value, permissionMapping.edit_customer_service_refund)) {
ElMessage.error(t('elmessage.noPermission'))
return return
}
} }
let params = {
id: editRow.value.id,
status: editRow.value.status,
refundModel: editForm.value.refundModel,
refundReason: editForm.value.refundReason,
jwcode: editRow.value.jwcode,
paymentAmount: editRow.value.paymentAmount,
paymentCurrency: editRow.value.paymentCurrency,
newRefundGold: (editForm.value.partRefundGold * 100),
newRefundFree: (editForm.value.partRefundFree) * 100
try {
console.log(editRow.value)
if(!editForm.value.refundModel) {
ElMessage.error(t('elmessage.selectRefundModel'))
return
}else if(!editForm.value.refundReason) {
ElMessage.error(t('elmessage.refundReasonPlaceholder'))
return
}else if(editForm.value.refundModel == 1 && (!editForm.value.partRefundGold || !editForm.value.partRefundFree)) {
ElMessage.error(t('elmessage.inputRefundBeansBoth'))
return
}else if (editForm.value.refundModel == 1 && (editForm.value.partRefundGold || editForm.value.partRefundFree)) {
const isPositiveInteger = /^[1-9]\d*$/.test(editForm.value.partRefundGold)
if (!isPositiveInteger) {
ElMessage.error(t('elmessage.checkPermanentFormat'))
return
}
const isPositiveInteger1 = /^[1-9]\d*$/.test(editForm.value.partRefundFree)
if (!isPositiveInteger1) {
ElMessage.error(t('elmessage.checkFreeFormat'))
return
}
}
let params = {
id: editRow.value.id,
status: editRow.value.status,
refundModel: editForm.value.refundModel,
refundReason: editForm.value.refundReason,
jwcode: editRow.value.jwcode,
paymentAmount: editRow.value.paymentAmount,
paymentCurrency: editRow.value.paymentCurrency,
newRefundGold: (editForm.value.partRefundGold * 100),
newRefundFree: (editForm.value.partRefundFree) * 100
} }
console.log(editRow.value.goodsName); console.log(editRow.value.goodsName);
if (editRow.value.goodsName != '金币充值') {
params.newRefundGold = ''
params.newRefundFree = ''
}
if (editRow.value.goodsName == '金币充值') {
if (editForm.value.partRefundGold > editRow.value.gold) {
ElMessage.error(t('elmessage.refundGoldExceed'))
return
}
if (editForm.value.partRefundFree > editRow.value.free) {
ElMessage.error(t('elmessage.refundFreeExceed'))
return
}
if (editRow.value.goodsName != '金币充值') {
params.newRefundGold = ''
params.newRefundFree = ''
}
if (editRow.value.goodsName == '金币充值') {
if (editForm.value.partRefundGold > editRow.value.gold) {
ElMessage.error(t('elmessage.limitRefundGoldNotExceedOriginal'))
return
}
if (editForm.value.partRefundFree > editRow.value.free) {
ElMessage.error(t('elmessage.limitRefundFreeNotExceedOriginal'))
return
}
}
const result = await API({
url: '/Money/update',
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || t('elmessage.editSuccess'))
showEdit.value = false
getRefund()
} else {
ElMessage.error(result.msg || t('elmessage.editFailed'))
}
} catch (error) {
ElMessage.error(error.message || t('elmessage.editFailed'))
} }
const result = await API({
url: '/Money/update',
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || t('elmessage.addSuccess'))
showEdit.value = false
getRefund()
} else {
ElMessage.error(result.msg || t('elmessage.addFailed'))
}
} catch (error) {
ElMessage.error(error.message || t('elmessage.addFailed'))
}
} }
const getMarket = async function () { const getMarket = async function () {
try { try {
@ -499,8 +512,29 @@ const cancelEdit = function () {
} }
showEdit.value = false showEdit.value = false
} }
const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
const currencies = computed(() => [
t('cash.currency.usd'),
t('cash.currency.hkd'),
t('cash.currency.sgd'),
t('cash.currency.myr'),
t('cash.currency.thb'),
t('cash.currency.cad'),
t('cash.currency.vnd'),
t('cash.currency.krw')
])
const channelOptions = computed(() => [
t('cash.payMethods.stripe'),
t('cash.payMethods.paymentAsia'),
t('cash.payMethods.ipay88'),
t('cash.payMethods.bankTransfer'),
t('cash.payMethods.card'),
t('cash.payMethods.cash'),
t('cash.payMethods.check'),
t('cash.payMethods.grabpay'),
t('cash.payMethods.nets'),
t('cash.payMethods.transfer'),
t('cash.payMethods.paypal')
])
const reset = function () { const reset = function () {
searchForm.value = { searchForm.value = {

6
src/views/refund/gold/coinRefundDetail.vue

@ -604,10 +604,10 @@ const getMarket = async function () {
{{ scope.row.refundModel === 0 ? $t('common_list.refundModelAll') : scope.row.refundModel === 1 ? $t('common_list.refundModelPart') : '' }} {{ scope.row.refundModel === 0 ? $t('common_list.refundModelAll') : scope.row.refundModel === 1 ? $t('common_list.refundModelPart') : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sumGold" :label="$t('common_list.refundGoldCoin')" width="150px" sortable="custom" />
<el-table-column prop="sumGold" :label="$t('common_list.refundGoldCoin')" width="160px" sortable="custom" />
<el-table-column prop="permanentGold" :label="$t('common_list.permanentGold')" width="130px" sortable="custom" /> <el-table-column prop="permanentGold" :label="$t('common_list.permanentGold')" width="130px" sortable="custom" />
<el-table-column prop="freeGold" :label="$t('common_list.freeGold')" width="110px" sortable="custom" />
<el-table-column prop="taskGold" :label="$t('common_list.taskGold')" width="110px" sortable="custom" />
<el-table-column prop="freeGold" :label="$t('common_list.freeGold')" width="130px" sortable="custom" />
<el-table-column prop="taskGold" :label="$t('common_list.taskGold')" width="130px" sortable="custom" />
<el-table-column prop="remark" :label="$t('common_list.remark')" width="160px" show-overflow-tooltip /> <el-table-column prop="remark" :label="$t('common_list.remark')" width="160px" show-overflow-tooltip />
<el-table-column prop="adminName" :label="$t('common_list.submitter')" width="100px" /> <el-table-column prop="adminName" :label="$t('common_list.submitter')" width="100px" />
<el-table-column prop="auditTime" :label="$t('common_list.refundTime')" width="180px" sortable="custom"> <el-table-column prop="auditTime" :label="$t('common_list.refundTime')" width="180px" sortable="custom">

4
src/views/usergold/gold/clientCountDetail.vue

@ -583,12 +583,12 @@ const format3 = (num) => {
<span>{{ (scope.row.permanentGold || 0) }}</span> <span>{{ (scope.row.permanentGold || 0) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="freeGold" sortable="custom" :label="$t('common_list.freeGold')" width="110">
<el-table-column prop="freeGold" sortable="custom" :label="$t('common_list.freeGold')" width="130">
<template #default="scope"> <template #default="scope">
<span>{{ (calculateFreeGold(scope.row) || 0) }}</span> <span>{{ (calculateFreeGold(scope.row) || 0) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="taskGold" sortable="custom" :label="$t('common_list.taskGold')" width="110">
<el-table-column prop="taskGold" sortable="custom" :label="$t('common_list.taskGold')" width="130">
<template #default="scope"> <template #default="scope">
<span>{{ (scope.row.taskGold || 0) }}</span> <span>{{ (scope.row.taskGold || 0) }}</span>
</template> </template>

Loading…
Cancel
Save