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. 1647
      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. 59
      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. 299
      src/views/moneyManage/refundDetail/refundCharge.vue
  16. 381
      src/views/moneyManage/refundDetail/refundFinance.vue
  17. 319
      src/views/moneyManage/refundDetail/refundHeader.vue
  18. 224
      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>
<el-dialog
v-model="dialogVisible"
title="语言切换"
:title="t('home.languageSwitch')"
width="300px"
:close-on-click-modal="false"
append-to-body
@ -9,10 +9,10 @@
style="background-color: rgb(243,250,254);"
>
<el-form label-width="80px">
<el-form-item label="切换语言">
<el-form-item :label="t('home.languageSwitch')">
<el-select
v-model="tempLang"
placeholder="请选择语言"
:placeholder="t('home.languageDialog.placeholder')"
style="width: 100%"
>
<el-option
@ -27,8 +27,8 @@
<template #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>
</template>
</el-dialog>
@ -43,7 +43,7 @@ import request from "@/util/http.js";
import {useAdminStore} from '@/store/index.js';
import {storeToRefs} from "pinia";
const {locale} = useI18n()
const { locale, t } = useI18n()
//
const dialogVisible = ref(false)
@ -55,17 +55,14 @@ const currentLang = computed(() => locale.value)
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 find = langOptions.find(item => item.value === langCode)
const find = langOptions.value.find(item => item.value === langCode)
return find ? find.label : langCode
}
@ -84,7 +81,7 @@ const handleConfirm = async () => {
await getMenuTree()
await selectMarket()
ElMessage.success(`语言已切换为:${getLangLabel(tempLang.value)}`)
ElMessage.success(t('elmessage.languageChangedSuccess', { lang: getLangLabel(tempLang.value) }))
dialogVisible.value = false
//
setTimeout(() => {
@ -118,7 +115,7 @@ const getMenuTree = async function () {
} catch (error) {
console.error('菜单数据请求失败:', error)
// return { code: 500, msg: '' }
ElMessage.error('网络异常')
ElMessage.error(t('elmessage.inNetworkError'))
adminStore.clearState()
}
}

49
src/components/dialogs/changePassword.vue

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

1647
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);">
<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 />
</div>
<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 size="large" value="客户归属地">{{ t('common.customerBelong') }}</el-radio>
<el-radio size="large" value="活动归属地">{{ t('common.activityBelong') }}</el-radio>
@ -97,12 +97,12 @@
style="width: 12vw" />
</div>
<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')"
:default-time="defaultStartTime" style="width: 12vw" />
</div>
<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')"
:default-time="defaultEndTime" style="width: 12vw" />
</div>
@ -119,24 +119,24 @@
</div>
<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 size="large" value="客户归属地">{{ t('common.customerBelong') }}</el-radio>
<el-radio size="large" value="活动归属地">{{ t('common.activityBelong') }}</el-radio>
</el-radio-group>
</div>
<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
style="width: 12vw" />
</div>
<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')"
:default-time="defaultStartTime" style="width: 12vw" />
</div>
<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')"
:default-time="defaultEndTime" style="width: 12vw" />
</div>
@ -171,9 +171,7 @@ const getActivityStatusText = (status) => {
return status
}
//
const activityNameReg = /^[\\u4e00-\\u9fa5a-zA-Z0-9,。!?、;:“”()‘’《》【】{}——~,.!?:;'--()\"\"\\[\\]_&+=]+$/;
// --
const activityNameReg = /^[\u4e00-\u9fa5a-zA-Z0-9,。!?、;:“”()‘’《》【】{}——~,.!?:;'()\[\]_&+=\/-]+$/;
const tableData = ref([])
const pagination = ref({
pageNum: 1,
@ -451,18 +449,19 @@ const hideAdd = () => {
}
}
const validateActivityName = (name) => {
const value = name.trim()
//
if (!name.trim()) {
if (!value) {
ElMessage.error('活动名称不能为空');
return false;
}
// 100
if (name.length > 100) {
if (value.length > 100) {
ElMessage.error('活动名称长度不能超过100字符');
return false;
}
//
if (!activityNameReg.test(name)) {
if (!activityNameReg.test(value)) {
ElMessage.error('活动名称仅支持汉字、英文字母、数字及常见标点,中文字符,。!?、;:“ ” ‘ ’ ()《》【】——~,英文字符, . ! ? : ; " ( ) [ ] - _ & + =/')
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="jwcode" :label="$t('audit.jwcode')" 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="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 />

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

@ -586,9 +586,9 @@ const getTagText = (state) => {
}}
</template>
</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="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 />

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="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="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="type" :label="t('common_list.memberType')" width="120px">
<el-table-column prop="type" :label="t('common_list.memberType')" width="140px">
<template #default="scope">
{{consumeTypes.find(item => item.value === Number(scope.row.type))?.label || t('common_list.unknownType')}}
</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') }}
</template>
</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="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"/>

59
src/views/home.vue

@ -17,6 +17,9 @@ import {getOrderPage} from '@/utils/goToCheck.js'
import {groupMessages} from "@/utils/getMessage.js"
import {findMenuById,permissionMapping} from "@/utils/menuTreePermission.js"
import {useMessageStore} from '@/store/index.js'
//
import { useI18n } from 'vue-i18n'
const {t} = useI18n();
// ------------------ ICONS ------------------
const icons = import.meta.glob('@/assets/SvgIcons/*.svg', {eager: true})
@ -56,26 +59,26 @@ const openLanguageSwitch = () => {
}
const handleLanguageChanged = (lang) => {
ElMessage.success(`语言已切换到${lang}`)
ElMessage.success(t('elmessage.languageChangedSuccess', { lang }))
}
// ------------------ ------------------
const refreshData = async () => {
try {
ElMessage({message: '数据刷新中,请稍候...', type: 'info'});
ElMessage({ message: t('elmessage.refreshLoading'), type: 'info' })
const response = await API({url: '/Mysql', method: 'POST', data: {}});
if (response && response.code === 200) {
const currentRoute = route.fullPath;
router.replace('/blank');
setTimeout(() => router.replace(currentRoute), 10);
ElMessage.success('数据刷新成功');
ElMessage.success(t('elmessage.refreshSuccess'))
} else {
ElMessage.error('数据刷新失败:' + (response?.msg || '未知错误'));
ElMessage.error(t('elmessage.refreshFailed', { msg: response?.msg || t('elmessage.unknownError') }))
}
} catch (error) {
console.error(error)
ElMessage.error('数据刷新异常,请重试');
ElMessage.error(t('elmessage.refreshError'))
}
}
@ -126,14 +129,14 @@ function logout() {
localStorage.removeItem('token')
adminStore.clearState()
router.push('/login?machineId=' + machineId)
ElMessage.success('退出成功')
ElMessage.success(t('elmessage.logoutSuccess'))
}
// ------------------ ------------------
const toggleFlag = () => {
const newFlag = flag.value === 1 ? 0 : 1
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()
await router.push(getOrderPage(item.status))
await getMessage()
ElMessage.success('跳转成功')
ElMessage.success(t('elmessage.jumpSuccess'))
} else {
ElMessage.error('跳转失败')
ElMessage.error(t('elmessage.jumpFailed'))
}
}
@ -374,8 +377,8 @@ onMounted(() => getMessage())
<el-dropdown placement="top-start">
<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">
<ArrowUp/>
</el-icon>
@ -383,13 +386,13 @@ onMounted(() => getMessage())
<template #dropdown>
<el-dropdown-menu>
<!-- <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()">
{{ flag === 1 ? '显示员工数据' : '隐藏员工数据' }}
{{ flag === 1 ? t('home.showStaffData') : t('home.hideStaffData') }}
</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>
</template>
</el-dropdown>
@ -424,24 +427,24 @@ onMounted(() => getMessage())
</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-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>
</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>
</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>
</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>
</el-form-item>
</el-form>
<template #footer>
<div>
<el-button text @click="closeMessage()">关闭</el-button>
<el-button text @click="closeMessage()">{{ t('common_export.close') }}</el-button>
</div>
</template>
</el-dialog>
@ -458,13 +461,13 @@ onMounted(() => getMessage())
class="divider"
direction="vertical"
></el-divider>
消息中心 ({{ messageNum }})
{{ t('home.messageCenter') }} ({{ messageNum }})
</div>
<!-- todo 这是为了样式显示 一定要改逻辑-->
<div v-if="messageNum === 0">
<div class="no-message">
<el-image :src="noMessage"></el-image>
<p class="no-message-text">暂无未办消息快去处理工作吧</p>
<p class="no-message-text">{{ t('home.noMessage') }}</p>
</div>
</div>
<div v-else
@ -500,14 +503,14 @@ onMounted(() => getMessage())
<div class="message-desc">
<div v-if="findMenuById(menuTree, permissionMapping.refund_headquarters_finance)">[{{ item.marketName }}] </div>
<div>[{{item.name}}{{ item.jwcode }}]用户有条收款订单需审核</div>
<div>[{{item.name}}{{ item.jwcode }}]{{ t('home.orderNeedsReview') }}</div>
</div>
<el-button
type="primary"
style="margin: 0 auto; display: block;"
@click="handleMessageClick(item)"
>
前往查看
{{ t('home.goToView') }}
</el-button>
</div>
<el-divider
@ -523,7 +526,7 @@ onMounted(() => getMessage())
class="view-all"
@click="toggleShowAll"
>
{{ showAll ? '收起' : '查看全部' }}
{{ showAll ? t('home.collapse') : t('home.viewAll') }}
</el-button>
<div v-if="showAll" @click="scrollToTop" class="go-top">
@ -532,7 +535,7 @@ onMounted(() => getMessage())
style="width: 20px; height: 20px;"
fit="contain"
/>
<span>返回顶部</span>
<span>{{ t('home.backToTop') }}</span>
</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 { 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 { hasMenuPermission } from '@/utils/menuTreePermission.js';
@ -941,7 +941,7 @@ const getlist = async () => {
// ID=1
const cashRoleId = '1';
const receivedMarket = adminData.value.markets;
const receivedMarket = normalizeSubmitterMarket(adminData.value.markets);
if (activeTab.value === 'wait') searchData.value.status = 0;
else if (activeTab.value === 'pass') searchData.value.status = 13;
else if (activeTab.value === 'done') searchData.value.status = 46;
@ -975,7 +975,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect,
submitterMarket: receivedMarket,
submitterMarket: normalizeSubmitterMarket(receivedMarket),
goodsName: goodsName,
// market: MarketNameForId(searchData.value.market)
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 { 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 { hasMenuPermission } from '@/utils/menuTreePermission.js';
@ -624,7 +624,7 @@ const exportExcel = async function () {
// }
const cashRoleId = '2';
const submitterMarket = adminData.value.markets;
const submitterMarket = normalizeSubmitterMarket(adminData.value.markets);
searchData.value.status = 46;
const params = {
...pageInfo.value,
@ -829,7 +829,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect,
submitterMarket: receivedMarket,
submitterMarket: normalizeSubmitterMarket(receivedMarket),
goodsName: goodsName,
//market: MarketNameForId(searchData.value.market)
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 { 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 { hasMenuPermission } from '@/utils/menuTreePermission.js';
@ -820,7 +820,7 @@ const exportExcel = async function () {
// }
const cashRoleId = '1';
const submitterMarket = adminData.value.markets;
const submitterMarket = normalizeSubmitterMarket(adminData.value.markets);
searchData.value.status = 46;
const params = {
...pageInfo.value,
@ -941,7 +941,7 @@ const getlist = async () => {
// ID=1
const cashRoleId = '1';
const receivedMarket = adminData.value.markets;
const receivedMarket = normalizeSubmitterMarket(adminData.value.markets);
if (activeTab.value === 'wait') searchData.value.status = 0;
else if (activeTab.value === 'pass') searchData.value.status = 13;
else if (activeTab.value === 'done') searchData.value.status = 46;
@ -975,7 +975,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect,
submitterMarket: receivedMarket,
submitterMarket: normalizeSubmitterMarket(receivedMarket),
goodsName: goodsName,
// market: MarketNameForId(searchData.value.market)
market: markets.value

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

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

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

@ -213,6 +213,80 @@ export const MarketNameForId = (name) => {
return 24018
} else if (name == t('cash.markets.VietnamHCM') || name == '越南HCM' || name == 'Vietnam HCM') {
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 {
return name
}

299
src/views/moneyManage/refundDetail/refundCharge.vue

@ -3,97 +3,96 @@
<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 />
<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 />
<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-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.goodsNamePlaceholder')" clearable />
:placeholder="t('common.productNamePlaceholder')" 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.markets" :options="market" :placeholder="$t('common.marketPlaceholder')"
<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.markets" :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;" :placeholder="$t('common.orderStatus')" clearable>
<el-text size="large" style="width:4vw;">{{ t('common.orderStatus') }}</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;" :placeholder="t('common.orderStatusPlaceholder')" clearable>
<el-option v-for="item in statusList" :label="item" :value="item" :key="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;" :placeholder="$t('common.payModelPlaceholder')" clearable>
<el-text size="large" style="width:4vw;">{{ t('common.payCurrency') }}</el-text>
<el-select v-model="searchForm.paymentCurrency" style="width:9vw;" :placeholder="t('common.payCurrencyPlaceholder')" 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;" :placeholder="$t('common.payModelPlaceholder')" clearable>
<el-text size="large" style="width:4vw;">{{ t('common.payModel') }}</el-text>
<el-select v-model="searchForm.payType" style="width:9vw;" :placeholder="t('common.payModelPlaceholder')" 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('cash_refund.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;" @change="handleDatePickerChange" clearable
<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;" @change="handleDatePickerChange" clearable
:disabled-date="disabledDate" :default-time="defaultTime" />
</div>
<div>
<el-button type="primary" @click="getRefund">{{ $t('common.search') }}</el-button>
<el-button type="warning" @click="exportExcel()">{{ $t('common.exportExcel') }}</el-button>
<el-button type="primary" @click="openExportList">{{ $t('common.viewExportList') }}</el-button>
<el-button type="success" @click="reset">{{ $t('common.reset') }}</el-button>
<el-button type="primary" @click="getRefund">{{ t('common.search') }}</el-button>
<el-button type="warning" @click="exportExcel()">{{ t('common.exportExcel') }}</el-button>
<el-button type="primary" @click="openExportList">{{ t('common.viewExportList') }}</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">
<el-table-column type="index" :label="$t('common_list.id')" width="60" fixed="left">
<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="name" :label="$t('common_list.homilyId')" width="120" fixed="left" />
<el-table-column prop="jwcode" :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="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="refundModel" :label="$t('cash_refund.refundModel')" width="120">
<el-table-column prop="name" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="jwcode" :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="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="refundModel" :label="t('common_list.refundModel')" width="120">
<template #default="scope">
{{ scope.row.refundModel === 1 ? $t('cash_refund.partialRefund') : $t('cash_refund.fullRefund') }}
{{ scope.row.refundModel === 1 ? t('common_list.refundModelPart') : t('common_list.refundModelAll') }}
</template>
</el-table-column>
<el-table-column prop="submitter" :label="$t('common_list.submitter')" width="120" />
<el-table-column prop="refundReason" :label="$t('common_list.refundReason')" width="120" show-overflow-tooltip />
<el-table-column prop="remark" :label="$t('common_list.remark')" width="150" show-overflow-tooltip />
<el-table-column prop="status" :label="$t('common.orderStatus')" width="120">
<el-table-column prop="submitter" :label="t('common_list.submitter')" width="120" />
<el-table-column prop="refundReason" :label="t('common_list.refundReason')" width="120" show-overflow-tooltip />
<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">
{{
[20].includes(scope.row.status) ? $t('audit.waitAudit') :
[30, 40].includes(scope.row.status) ? $t('audit.passed') :
[22, 32].includes(scope.row.status) ? $t('audit.rejected') :
scope.row.status === 41 ? $t('audit.RefundSuccessful') : scope.row.status
[20].includes(scope.row.status) ? t('cash.statusList.pending') :
[30, 40].includes(scope.row.status) ? t('cash.statusList.passed') :
[22, 32].includes(scope.row.status) ? t('cash.statusList.rejected') :
scope.row.status === 41 ? t('cash.refundSuccess') : scope.row.status
}}
</template>
</el-table-column>
<el-table-column :label="$t('audit.operation')" fixed="right" width="100px">
<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 === 20" type="primary" text @click="showAudit(scope.row)">
{{ $t('audit.audit') }}
{{ t('common.audit') }}
</el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)">
{{ $t('cash_refund.viewProgress') }}
{{ t('common.viewProgress') }}
</el-button>
</div>
</template>
@ -105,126 +104,126 @@
style="margin-top: 1vh;"></el-pagination>
</el-card>
<el-dialog v-model="showAudit2" :title="$t('cash_refund.audit')" class="audit2" width="35vw" overflow draggable
<el-dialog v-model="showAudit2" :title="t('common.audit')" class="audit2" width="35vw" overflow draggable
style="background-color: #F3FAFE !important;">
<div class="top">
<el-button @click="" class="smallTitle" size="small">{{ $t('cash_refund.refundApplicationInfo') }}</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.refundApplyInfo') }}</el-button>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.refundModel') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.refundModel') }}</el-text>
<el-select v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
<el-option :label="$t('cash_refund.fullRefund')" :value="0"></el-option>
<el-option :label="$t('cash_refund.partialRefund')" :value="1"></el-option>
<el-option :label="t('common_add.refundModelAll')" :value="0"></el-option>
<el-option :label="t('common_add.refundModelPart')" :value="1"></el-option>
</el-select>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common.permanentGold') }}</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled />&nbsp;{{ $t('common.个') }}
<el-text style="width:4vw;" size="small">{{ t('common_add.permanentGold') }}</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled /><span>&nbsp;{{ t('common.个') }}</span>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common.freeGold') }}</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled />&nbsp;{{ $t('common.个') }}
<el-text style="width:4vw;" size="small">{{ t('common_add.freeGold') }}</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled /><span>&nbsp;{{ t('common.个') }}</span>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.refundReason') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.refundReason') }}</el-text>
<el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100"
show-word-limit type="textarea" disabled />
</div>
</div>
<el-button @click="" class="smallTitle" size="small">{{ $t('cash_refund.originalOrderInfo') }}</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.originalOrderInfo') }}</el-button>
<div class="center">
<div class="center-left">
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.jwcode') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.jwcode') }}</el-text>
<el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.market') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.market') }}</el-text>
<el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.goodsName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.productName') }}</el-text>
<el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.paymentCurrency') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payCurrency') }}</el-text>
<el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.paymentAmount') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payAmount') }}</el-text>
<el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.payTime') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payTime') }}</el-text>
<el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;">{{ $t('cash_refund.payVoucher') }}</el-text>
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="auditRow.payVoucher" :src="auditRow.payVoucher"
style="width: 80px; height: 80px; object-fit: cover;">
<div v-else>
{{ $t('cash_refund.noVoucher') }}
{{ t('common_add.noTransferVoucher') }}
</div>
</div>
</div>
<div class="center-right">
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.customerName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.customerName') }}</el-text>
<el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.activityName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.activity') }}</el-text>
<el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.payModel') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payMethod') }}</el-text>
<el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedCurrency') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveCurrency') }}</el-text>
<el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedAmount') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveAmount') }}</el-text>
<el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedTime') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveTime') }}</el-text>
<el-input v-model="auditRow.receivedTime" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.handlingCharge') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.fee') }}</el-text>
<el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.submitter') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.submitter') }}</el-text>
<el-input v-model="auditRow.submitter" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.remark') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.remark') }}</el-text>
<el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled />
</div>
</div>
</div>
<div class="bottom">
<el-button class="smallTitle" size="small" v-show="showReject">{{ $t('cash_refund.rejectionInfo') }}</el-button>
<el-button class="smallTitle" size="small" v-show="showReject">{{ t('common.rejectInfo') }}</el-button>
<div class="bottom-item" v-show="showReject">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.rejectionRemark') }}</el-text>
<el-input v-model="addForm.remark" :placeholder="$t('cash_refund.placeholder.rejectionRemark')" size="small" style="width:10vw;" :row="3"
<el-text style="width:4vw;" size="small">{{ t('common_add.rejectRemark') }}</el-text>
<el-input v-model="addForm.remark" :placeholder="t('common_add.rejectRemarkPlaceholder')" size="small" style="width:10vw;" :row="3"
maxlength="100" type="textarea" show-word-limit clearable />
</div>
<div style="text-align: center;" v-show="!showReject">
<el-button type="default" @click="showReject = true">{{ $t('common.reject') }}</el-button>
<el-button type="primary" @click="handlePass">{{ $t('common.pass') }}</el-button>
<el-button type="default" @click="showReject = true">{{ t('common.reject') }}</el-button>
<el-button type="primary" @click="handlePass">{{ t('common.pass') }}</el-button>
</div>
<div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleReject">{{ $t('common.confirm') }}</el-button>
<el-button type="default" @click="hideReject">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleReject">{{ t('common.confirm') }}</el-button>
</div>
</div>
</el-dialog>
<el-dialog v-model="showSteps" :title="$t('refundProgress.title')" overflow draggable width="1206px" height="506px" :style="{
<el-dialog v-model="showSteps" :title="t('cash.refundProgress')" overflow draggable width="1206px" height="506px" :style="{
backgroundImage: `url(${RefundChargeBackground})`,
backgroundSize: 'cover',
backgroundPosition: 'center'
@ -235,110 +234,110 @@
<el-step>
<template #title>
<div>
{{ $t('refundProgress.submitter') }}<br>{{ submitter || $t('refundProgress.unknownSubmitter') }}
{{ t('common_list.submitter') }}<br>{{ submitter || t('common.unknownSubmitter') }}
</div>
</template>
<template #icon>
<img src="@/assets/images/refund-approved.png" alt="已完成">
<img src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.areaFinance') }}<br>{{ areaFinance || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.areaFinance') }}<br>{{ areaFinance || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 2" src="@/assets/images/refund-rejected.png" alt="已驳回">
<img v-else-if="currentStep === 1" src="@/assets/images/refund-approving.png" alt="待审核">
<img v-else-if="currentStep > 2" src="@/assets/images/refund-approved.png" alt="已审核">
<img v-if="currentStep === 2" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 1" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 2" src="@/assets/images/refund-approved.png" :alt="t('common.passed')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.areaCharge') }}<br>{{ areaCharge || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.areaCharge') }}<br>{{ areaCharge || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 4" src="@/assets/images/refund-rejected.png" alt="已驳回">
<img v-else-if="currentStep === 3" src="@/assets/images/refund-approving.png" alt="待审核">
<img v-if="currentStep === 4" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 3" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 3 && currentStep != 4"
src="@/assets/images/refund-approved.png" alt="已审核">
<img v-else-if="currentStep < 3" src="@/assets/images/refund-waiting.png" alt="未开始">
src="@/assets/images/refund-approved.png" :alt="t('common.audited')">
<img v-else-if="currentStep < 3" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.headFinance') }}<br>{{ headFinance || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.headFinance') }}<br>{{ headFinance || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 6" src="@/assets/images/refund-rejected.png" alt="已驳回">
<img v-else-if="currentStep === 5" src="@/assets/images/refund-approving.png" alt="待审核">
<img v-if="currentStep === 6" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 5" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 5 && currentStep != 6"
src="@/assets/images/refund-approved.png" alt="已审核">
<img v-else-if="currentStep < 5" src="@/assets/images/refund-waiting.png" alt="未开始">
src="@/assets/images/refund-approved.png" :alt="t('common.audited')">
<img v-else-if="currentStep < 5" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.executor') }}<br>{{ executor || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.executor') }}<br>{{ executor || t('common.noExecutorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 7" src="@/assets/images/refund-approving.png" alt="待处理">
<img v-else-if="currentStep === 8" src="@/assets/images/refund-approved.png" alt="已完成">
<img v-else-if="currentStep < 7" src="@/assets/images/refund-waiting.png" alt="未开始">
<img v-if="currentStep === 7" src="@/assets/images/refund-approving.png" :alt="t('common_list.pending')">
<img v-else-if="currentStep === 8" src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
<img v-else-if="currentStep < 7" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
</el-steps>
</div>
<div class="steps-btn">
<el-button type="primary" @click="showSteps = false">{{ $t('common.confirm') }}</el-button>
<el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button>
</div>
</div>
</el-dialog>
<el-dialog v-model="exportListVisible" :title="$t('common_export.exportList')" width="80%">
<el-dialog v-model="exportListVisible" :title="t('common_export.exportList')" width="80%">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" :label="$t('common_export.fileName')" />
<el-table-column prop="state" :label="$t('common_export.status')">
<el-table-column prop="fileName" :label="t('common_export.fileName')" />
<el-table-column prop="state" :label="t('common_export.status')">
<template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('common_export.createTime')">
<el-table-column prop="createTime" :label="t('common_export.createTime')">
<template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :label="$t('common_export.operation')">
<el-table-column :label="t('common_export.operation')">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
{{ $t('common_export.download') }}
{{ t('common_export.download') }}
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button text @click="exportListVisible = false">{{ $t('common_export.close') }}</el-button>
<el-button text @click="exportListVisible = false">{{ t('common_export.close') }}</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus'
import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload '
@ -352,12 +351,18 @@ import moment from 'moment'
import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import RefundChargeBackground from '@/assets/images/refund-progress.png'
import { isNumber } from 'lodash'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const currentStep = ref(0)//
const searchForm = ref({
jwcode: '',
markets: []
})
const isHeadquarters = computed(() => {
const m = adminData.value.markets
return m === t('common.markets.headquarters') || m === '总部' || m === 'Headquarters'
})
const isReject = ref(false)//
const addForm = ref({
remark: ''
@ -395,25 +400,51 @@ const statusStepMap = {
40: [7, false],
41: [8, false]
}
const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
const statusList = ref(['待审核', '审核通过', '已驳回', '退款成功'])
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 statusList = computed(() => [
t('cash.statusList.pending'),
t('cash.statusList.passed'),
t('cash.statusList.rejected'),
t('cash.refundSuccess')
])
//
const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_manager_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
const payCurrencySelect = ref('')
const statuses = ref([20, 22, 30, 32, 40, 41]) //
if (searchForm.value.statuses === '审核通过') {
if (searchForm.value.statuses === t('cash.statusList.passed')) {
statuses.value = [30, 40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statuses.value = [22, 32]
} else if (searchForm.value.statuses === '待审核') {
} else if (searchForm.value.statuses === t('cash.statusList.pending')) {
statuses.value = [20]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statuses.value = [41]
} else {
statuses.value = [20, 22, 30, 32, 40, 41]
@ -425,13 +456,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return;
}
@ -468,13 +499,13 @@ const getRefund = async function () {
tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0
} catch (error) {
ElMessage.error(error.message || '查询失败')
ElMessage.error(error.message || t('elmessage.searchFailed'))
}
}
//
const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
@ -491,18 +522,18 @@ const handlePass = async function () {
data: params
})
if (result.code === 200) {
ElMessage.success('审核通过')
ElMessage.success(t('elmessage.approveSuccess'))
showAudit2.value = false
getRefund()
}
} catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
}
}
//
const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
@ -520,19 +551,19 @@ const handleReject = async function () {
data: params
})
if (result.code === 200) {
ElMessage.success('审核驳回')
ElMessage.success(t('elmessage.rejectSuccess'))
getRefund()
addForm.value.remark = ''
showAudit2.value = false
showReject.value = false
}
} catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
}
}
const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_manager_refund_progress)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}
@ -639,7 +670,7 @@ const exportExcel = async function () {
}
const res = await API({ url: '/export/exportFinance', data: params })
if (res.code === 200) {
ElMessage.success('导出成功')
ElMessage.success(t('elmessage.exportSuccess'))
}
}
const openExportList = () => {
@ -656,11 +687,11 @@ const getExportList = async () => {
})
exportList.value = filteredData
} else {
ElMessage.error(result.msg || '获取导出列表失败')
ElMessage.error(result.msg || t('elmessage.getExportListError'))
}
} catch (error) {
console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
ElMessage.error(t('elmessage.getExportListError'))
} finally {
exportListLoading.value = false
}
@ -672,7 +703,7 @@ const downloadExportFile = (item) => {
link.download = item.fileName
link.click()
} else {
ElMessage.warning('文件还在导出中,请稍后再试')
ElMessage.warning(t('elmessage.exportingInProgress'))
}
}
//
@ -694,15 +725,15 @@ const getTagType = (state) => {
const getTagText = (state) => {
switch (state) {
case 0:
return '待执行';
return t('elmessage.pendingExecution');
case 1:
return '执行中';
return t('elmessage.executing');
case 2:
return '执行完成';
return t('elmessage.executed');
case 3:
return '执行出错';
return t('elmessage.errorExecution');
default:
return '未知状态';
return t('elmessage.unknownStatus');
}
}
const hideReject = function () {

381
src/views/moneyManage/refundDetail/refundFinance.vue

@ -3,95 +3,95 @@
<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 />
<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 />
<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-text size="large" style="width:4vw;">{{ t('common.productName') }}</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.markets" :options="market" :placeholder="$t('common.marketPlaceholder')"
<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.markets" :options="market" :placeholder="t('common.marketPlaceholder')"
clearable @change="handleMarketChange" />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">{{ $t('common_list.orderStatus') }}</el-text>
<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" :label="t('cash_refund.' + item)" :value="item" :key="item" />
<el-option v-for="item in statusList" :label="item" :value="item" :key="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-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.payType') }}</el-text>
<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;" @change="handleDatePickerChange" clearable
<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;" @change="handleDatePickerChange" clearable
:disabled-date="disabledDate" :default-time="defaultTime" />
</div>
<div>
<el-button type="primary" @click="getRefund">{{ $t('common.search') }}</el-button>
<el-button type="warning" @click="exportExcel()">{{ $t('common.exportExcel') }}</el-button>
<el-button type="primary" @click="openExportList">{{ $t('common.viewExportList') }}</el-button>
<el-button type="success" @click="reset">{{ $t('common.reset') }}</el-button>
<el-button type="primary" @click="getRefund">{{ t('common.search') }}</el-button>
<el-button type="warning" @click="exportExcel()">{{ t('common.exportExcel') }}</el-button>
<el-button type="primary" @click="openExportList">{{ t('common.viewExportList') }}</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">
<el-table-column type="index" :label="$t('common_list.id')" width="60" fixed="left">
<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="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="refundModel" :label="$t('cash_refund.refundModel')" width="120">
<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="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="refundModel" :label="t('common_list.refundModel')" width="120">
<template #default="scope">
{{ scope.row.refundModel === 1 ? t('cash_refund.partialRefund') : t('cash_refund.fullRefund') }}
{{ scope.row.refundModel === 1 ? t('common_list.refundModelPart') : t('common_list.refundModelAll') }}
</template>
</el-table-column>
<el-table-column prop="submitter" :label="$t('common_list.submitter')" width="120" />
<el-table-column prop="refundReason" :label="$t('common_list.refundReason')" width="120" show-overflow-tooltip />
<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">
<el-table-column prop="submitter" :label="t('common_list.submitter')" width="120" />
<el-table-column prop="refundReason" :label="t('common_list.refundReason')" width="120" show-overflow-tooltip />
<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('audit.waitAudit') :
[20, 30, 40].includes(scope.row.status) ? t('audit.passed') :
[12, 22, 32].includes(scope.row.status) ? t('audit.rejected') :
[41].includes(scope.row.status) ? t('audit.RefundSuccessful') : scope.row.status
[10].includes(scope.row.status) ? t('cash.statusList.pending') :
[20, 30, 40].includes(scope.row.status) ? t('cash.statusList.passed') :
[12, 22, 32].includes(scope.row.status) ? t('cash.statusList.rejected') :
[41].includes(scope.row.status) ? t('cash.refundSuccess') : scope.row.status
}}
</template>
</el-table-column>
<el-table-column prop="operation" :label="$t('audit.operation')" fixed="right" width="100px">
<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="showAudit2(scope.row)">
{{ $t('audit.audit') }}
{{ t('common.audit') }}
</el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)">
{{ $t('cash_refund.viewProgress') }}
{{ t('common.viewProgress') }}
</el-button>
</div>
</template>
@ -103,126 +103,126 @@
style="margin-top: 1vh;"></el-pagination>
</el-card>
<el-dialog v-model="showAudit" :title="$t('audit.audit')" class="audit" width="35vw" overflow draggable
<el-dialog v-model="showAudit" :title="t('common.audit')" class="audit" width="35vw" overflow draggable
style="background-color: #F3FAFE !important;">
<div class="top">
<el-button @click="" class="smallTitle" size="small">{{ $t('cash_refund.refundApplicationInfo') }}</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.refundApplyInfo') }}</el-button>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.refundModel') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.refundModel') }}</el-text>
<el-select v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
<el-option :label="$t('cash_refund.fullRefund')" :value="0"></el-option>
<el-option :label="$t('cash_refund.partialRefund')" :value="1"></el-option>
<el-option :label="t('common_add.refundModelAll')" :value="0"></el-option>
<el-option :label="t('common_add.refundModelPart')" :value="1"></el-option>
</el-select>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.permanentGold') }}</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled />&nbsp;{{ $t('common.个') }}
<el-text style="width:4vw;" size="small">{{ t('common_add.permanentGold') }}</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled /><span>&nbsp;{{ t('cash.unit') }}</span>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.freeGold') }}</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled />&nbsp;{{ $t('common.个') }}
<el-text style="width:4vw;" size="small">{{ t('common_add.freeGold') }}</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled /><span>&nbsp;{{ t('cash.unit') }}</span>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.refundReason') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.refundReason') }}</el-text>
<el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100"
show-word-limit type="textarea" disabled />
</div>
</div>
<el-button @click="" class="smallTitle" size="small">{{ $t('cash_refund.originalOrderInfo') }}</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.originalOrderInfo') }}</el-button>
<div class="center">
<div class="center-left">
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.jwcode') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.jwcode') }}</el-text>
<el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.market') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.market') }}</el-text>
<el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.goodsName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.productName') }}</el-text>
<el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.paymentCurrency') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payCurrency') }}</el-text>
<el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.paymentAmount') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payAmount') }}</el-text>
<el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.payTime') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payTime') }}</el-text>
<el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;">{{ $t('cash_refund.payVoucher') }}</el-text>
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="auditRow.payVoucher" :src="auditRow.payVoucher"
style="width: 80px; height: 80px; object-fit: cover;">
<div v-else>
{{ $t('cash_refund.noVoucher') }}
{{ t('common_add.noTransferVoucher') }}
</div>
</div>
</div>
<div class="center-right">
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.customerName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.customerName') }}</el-text>
<el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.activityName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.activity') }}</el-text>
<el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.payModel') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payMethod') }}</el-text>
<el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedCurrency') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveCurrency') }}</el-text>
<el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedAmount') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveAmount') }}</el-text>
<el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedTime') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveTime') }}</el-text>
<el-input v-model="auditRow.receivedTime" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.handlingCharge') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.fee') }}</el-text>
<el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.submitter') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.submitter') }}</el-text>
<el-input v-model="auditRow.submitter" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.remark') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.remark') }}</el-text>
<el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled />
</div>
</div>
</div>
<div class="bottom">
<el-button class="smallTitle" size="small" v-show="showReject">{{ $t('cash_refund.rejectionInfo') }}</el-button>
<el-button class="smallTitle" size="small" v-show="showReject">{{ t('common.reject') }}</el-button>
<div class="bottom-item" v-show="showReject">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.rejectionRemark') }}</el-text>
<el-input v-model="addForm.remark" :placeholder="$t('cash_refund.placeholder.rejectionRemark')" size="small" style="width:10vw;" :row="3"
<el-text style="width:4vw;" size="small">{{ t('common_add.rejectReason') }}</el-text>
<el-input v-model="addForm.remark" :placeholder="t('common_add.rejectReasonPlaceholder')" size="small" style="width:10vw;" :row="3"
maxlength="100" type="textarea" show-word-limit clearable />
</div>
<div style="text-align: center;" v-show="!showReject">
<el-button type="default" @click="showReject = true">{{ $t('common.reject') }}</el-button>
<el-button type="primary" @click="handlePass">{{ $t('common.pass') }}</el-button>
<el-button type="default" @click="showReject = true">{{ t('common.reject') }}</el-button>
<el-button type="primary" @click="handlePass">{{ t('common.pass') }}</el-button>
</div>
<div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleReject">{{ $t('common.confirm') }}</el-button>
<el-button type="default" @click="hideReject">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleReject">{{ t('common.confirm') }}</el-button>
</div>
</div>
</el-dialog>
<el-dialog v-model="showSteps" :title="$t('refundProgress.title')" overflow draggable width="1206px" height="506px" :style="{
<el-dialog v-model="showSteps" :title="t('cash.refundProgress')" overflow draggable width="1206px" height="506px" :style="{
backgroundImage: `url(${RefundFinanceBackground})`,
backgroundSize: 'cover',
backgroundPosition: 'center'
@ -233,111 +233,111 @@
<el-step>
<template #title>
<div>
{{ $t('refundProgress.submitter') }}<br>{{ submitter || t('refundProgress.unknownSubmitter') }}
{{ t('common_list.submitter') }}<br>{{ submitter || t('common.unknownSubmitter') }}
</div>
</template>
<template #icon>
<img src="@/assets/images/refund-approved.png" alt="Completed">
<img src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.areaFinance') }}<br>{{ areaFinance || t('refundProgress.notRecorded') }}
{{ t('cash.progress.areaFinance') }}<br>{{ areaFinance || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 2" src="@/assets/images/refund-rejected.png" alt="Rejected">
<img v-else-if="currentStep === 1" src="@/assets/images/refund-approving.png" alt="Pending">
<img v-else-if="currentStep > 2" src="@/assets/images/refund-approved.png" alt="Approved">
<img v-if="currentStep === 2" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 1" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 2" src="@/assets/images/refund-approved.png" :alt="t('common.passed')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.areaCharge') }}<br>{{ areaCharge || t('refundProgress.notRecorded') }}
{{ t('cash.progress.areaCharge') }}<br>{{ areaCharge || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 4" src="@/assets/images/refund-rejected.png" alt="Rejected">
<img v-else-if="currentStep === 3" src="@/assets/images/refund-approving.png" alt="Pending">
<img v-if="currentStep === 4" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 3" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 3 && currentStep != 4"
src="@/assets/images/refund-approved.png" alt="Approved">
<img v-else-if="currentStep < 3" src="@/assets/images/refund-waiting.png" alt="Not Started">
src="@/assets/images/refund-approved.png" :alt="t('common.passed')">
<img v-else-if="currentStep < 3" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.headFinance') }}<br>{{ headFinance || t('refundProgress.notRecorded') }}
{{ t('cash.progress.headFinance') }}<br>{{ headFinance || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 6" src="@/assets/images/refund-rejected.png" alt="Rejected">
<img v-else-if="currentStep === 5" src="@/assets/images/refund-approving.png" alt="Pending">
<img v-if="currentStep === 6" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 5" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 5 && currentStep != 6"
src="@/assets/images/refund-approved.png" alt="Approved">
<img v-else-if="currentStep < 5" src="@/assets/images/refund-waiting.png" alt="Not Started">
src="@/assets/images/refund-approved.png" :alt="t('common.passed')">
<img v-else-if="currentStep < 5" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.executor') }}<br>{{ executor || t('refundProgress.notRecorded') }}
{{ t('cash.progress.executor') }}<br>{{ executor || t('common.noExecutorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 7" src="@/assets/images/refund-approving.png" alt="Pending">
<img v-else-if="currentStep === 8" src="@/assets/images/refund-approved.png" alt="Completed">
<img v-else-if="currentStep < 7" src="@/assets/images/refund-waiting.png" alt="Not Started">
<img v-if="currentStep === 7" src="@/assets/images/refund-approving.png" :alt="t('common_list.pending')">
<img v-else-if="currentStep === 8" src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
<img v-else-if="currentStep < 7" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
</el-steps>
</div>
<div class="steps-btn">
<el-button type="primary" @click="showSteps = false">{{ $t('common.confirm') }}</el-button>
<el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button>
</div>
</div>
</el-dialog>
<el-dialog v-model="exportListVisible" :title="$t('common_export.exportList')" width="80%">
<el-dialog v-model="exportListVisible" :title="t('common_export.exportList')" width="80%">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" :label="$t('common_export.fileName')" />
<el-table-column prop="state" :label="$t('common_export.status')">
<el-table-column prop="fileName" :label="t('common_export.fileName')" />
<el-table-column prop="state" :label="t('common_export.status')">
<template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('common_export.createTime')">
<el-table-column prop="createTime" :label="t('common_export.createTime')">
<template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :label="$t('common_export.operation')">
<el-table-column :label="t('common_export.operation')">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
{{ $t('common_export.download') }}
{{ t('common_export.download') }}
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button text @click="exportListVisible = false">{{ $t('common_export.close') }}</el-button>
<el-button text @click="exportListVisible = false">{{ t('common_export.close') }}</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus'
import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload '
@ -350,6 +350,7 @@ import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menu
import moment from 'moment'
import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import RefundFinanceBackground from '@/assets/images/refund-progress.png'
import { isNumber } from 'lodash'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
@ -358,6 +359,10 @@ const searchForm = ref({
jwcode: '',
markets: []
})
const isHeadquarters = computed(() => {
const m = adminData.value.markets
return m === t('common.markets.headquarters') || m === '总部' || m === 'Headquarters'
})
const dateRange = ref([])
const addForm = ref({
remark: ''
@ -387,69 +392,6 @@ const exportListVisible = ref(false)
const exportList = ref([])
//
const exportListLoading = ref(false)
const payments = ref([{
value: '银行转账',
label: '银行转账'
},
{
value: '现金',
label: '现金'
},
{
value: '支票',
label: '支票'
},
{
value: '刷卡',
label: '刷卡'
},
{
value: 'Grabpay',
label: 'Grabpay'
},
{
value: 'Nets',
label: 'Nets'
},
{
value: 'PayPal',
label: 'PayPal'
},
{
value: 'Stripe-链接收款',
label: 'Stripe-链接收款'
},
{
value: 'Ipay88-链接收款',
label: 'Ipay88-链接收款'
},
{
value: 'PaymentAsia-链接收款',
label: 'PaymentAsia-链接收款'
},
{
value: 'Stripe-Link平台',
label: 'Stripe-Link平台'
},
{
value: 'PaymentAsia-Link平台',
label: 'PaymentAsia-Link平台'
},
{
value: 'FirstData-Link平台-Link平台',
label: 'FirstData-Link平台-Link平台'
},
{
value: 'IOS-Link平台',
label: 'IOS-Link平台'
},
{
value: 'Ipay88-Link平台',
label: 'Ipay88-Link平台'
}
])
// status [step, isReject]
const statusStepMap = {
10: [1, false],
12: [2, true],
@ -460,25 +402,50 @@ const statusStepMap = {
40: [7, false],
41: [8, false]
}
// key i18n
const statusList = ref(['waitAudit', 'passed', 'rejected', 'RefundSuccessful'])
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 statusList = computed(() => [
t('cash.statusList.pending'),
t('cash.statusList.passed'),
t('cash.statusList.rejected'),
t('cash.refundSuccess')
])
//
const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_finance_refund)) {
ElMessage.error(t('elmessage.noPermissionAreaRefundView'))
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
const statusParam = ref([10, 20, 22, 30, 32, 40, 41])
if (searchForm.value.statuses === 'passed') {
if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === 'rejected') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [12, 22, 32]
} else if (searchForm.value.statuses === 'waitAudit') {
} else if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [10]
} else if (searchForm.value.statuses === 'RefundSuccessful') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41]
} else {
statusParam.value = [10, 20, 22, 30, 32, 40, 41]
@ -490,12 +457,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error(t('elmessage.invalidJwcodeFormat'))
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error(t('elmessage.jwcodeTooLong'))
ElMessage.error(t('elmessage.limitJwcodeLength'))
return;
}
@ -525,14 +493,14 @@ const getRefund = async function () {
tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0
} catch (error) {
ElMessage.error(error.message || t('elmessage.requestFailed'))
ElMessage.error(error.message || t('elmessage.searchFailed'))
}
}
//
const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
ElMessage.error(t('elmessage.noPermissionAreaRefundAudit'))
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
@ -545,14 +513,12 @@ const handlePass = async function () {
}
const result = await API({
url: '/Money/review',
params
data: params
})
if (result.code === 200) {
ElMessage.success(t('elmessage.approveSuccess'))
showAudit.value = false
getRefund()
} else {
ElMessage.error(result.msg || t('elmessage.approveFailed'))
}
} catch (error) {
ElMessage.error(error.message || t('elmessage.approveFailed'))
@ -562,18 +528,14 @@ const handlePass = async function () {
//
const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
ElMessage.error(t('elmessage.noPermissionAreaRefundAudit'))
return
}
if (!addForm.value.remark.trim()) {
ElMessage.warning(t('elmessage.rejectReasonPlaceholder'))
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
const params = {
id: auditRow.value.id,
status: 12,
rejectReason: addForm.value.remark.trim(),
rejectReason: addForm.value.remark,
areaFinance: adminData.value.adminName,
auditId: auditRow.value.auditId,
orderCode: auditRow.value.orderCode,
@ -581,7 +543,7 @@ const handleReject = async function () {
}
const result = await API({
url: '/Money/review',
params
data: params
})
if (result.code === 200) {
ElMessage.success(t('elmessage.rejectSuccess'))
@ -589,17 +551,12 @@ const handleReject = async function () {
getRefund()
addForm.value.remark = ''
showReject.value = false
} else {
ElMessage.error(result.msg || t('elmessage.rejectFailed'))
}
} catch (error) {
ElMessage.error(error.message || t('elmessage.rejectFailed'))
ElMessage.error(error.message || t('elmessage.approveFailed'))
}
}
const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
const getMarket = async function () {
try {
const result = await API({
@ -626,7 +583,7 @@ const getMarket = async function () {
const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_finance_refund_progress)) {
ElMessage.error(t('elmessage.noPermissionAreaRefundTrack'))
ElMessage.error(t('elmessage.noPermission'))
return
}
@ -650,13 +607,13 @@ const showStep = function (row) {
const exportExcel = async function () {
const statusParam = ref([10, 20, 22, 30, 32, 40, 41])
if (searchForm.value.statuses === 'passed') {
if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === 'rejected') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [12, 22, 32]
} else if (searchForm.value.statuses === 'waitAudit') {
} else if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [10]
} else if (searchForm.value.statuses === 'RefundSuccessful') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41]
} else {
statusParam.value = [10, 20, 22, 30, 32, 40, 41]
@ -668,12 +625,13 @@ const exportExcel = async function () {
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error(t('elmessage.invalidJwcodeFormat'))
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error(t('elmessage.jwcodeTooLong'))
ElMessage.error(t('elmessage.limitJwcodeLength'))
return;
}
@ -712,7 +670,9 @@ const getExportList = async () => {
try {
const result = await API({ url: '/export/export' })
if (result.code === 200) {
const filteredData = result.data.filter(item => item.type === 12) // 12=
const filteredData = result.data.filter(item => {
return item.type === 12
})
exportList.value = filteredData
} else {
ElMessage.error(result.msg || t('elmessage.getExportListError'))
@ -748,11 +708,16 @@ const getTagType = (state) => {
const getTagText = (state) => {
switch (state) {
case 0: return t('elmessage.pendingExecution');
case 1: return t('elmessage.executing');
case 2: return t('elmessage.executed');
case 3: return t('elmessage.errorExecution');
default: return t('elmessage.unknownStatus');
case 0:
return t('elmessage.pendingExecution');
case 1:
return t('elmessage.executing');
case 2:
return t('elmessage.executed');
case 3:
return t('elmessage.errorExecution');
default:
return t('elmessage.unknownStatus');
}
}

319
src/views/moneyManage/refundDetail/refundHeader.vue

@ -3,97 +3,96 @@
<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 />
<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 />
<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-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.goodsNamePlaceholder')" clearable />
:placeholder="t('common.productNamePlaceholder')" 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.markets" :options="market" :placeholder="$t('common.marketPlaceholder')"
<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.markets" :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;" :placeholder="$t('common.orderStatus')" clearable>
<el-text size="large" style="width:4vw;">{{ t('common.orderStatus') }}</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;" :placeholder="t('common.orderStatusPlaceholder')" clearable>
<el-option v-for="item in statusList" :label="item" :value="item" :key="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;" :placeholder="$t('common.payModelPlaceholder')" clearable>
<el-text size="large" style="width:4vw;">{{ t('common.payCurrency') }}</el-text>
<el-select v-model="searchForm.paymentCurrency" style="width:9vw;" :placeholder="t('common.payCurrencyPlaceholder')" 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;" :placeholder="$t('common.payModelPlaceholder')" clearable>
<el-text size="large" style="width:4vw;">{{ t('common.payModel') }}</el-text>
<el-select v-model="searchForm.payType" style="width:9vw;" :placeholder="t('common.payModelPlaceholder')" 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('cash_refund.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;" @change="handleDatePickerChange" clearable
<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;" @change="handleDatePickerChange" clearable
:disabled-date="disabledDate" :default-time="defaultTime" />
</div>
<div>
<el-button type="primary" @click="getRefund">{{ $t('common.search') }}</el-button>
<el-button type="warning" @click="exportExcel()">{{ $t('common.exportExcel') }}</el-button>
<el-button type="primary" @click="openExportList">{{ $t('common.viewExportList') }}</el-button>
<el-button type="success" @click="reset">{{ $t('common.reset') }}</el-button>
<el-button type="primary" @click="getRefund">{{ t('common.search') }}</el-button>
<el-button type="warning" @click="exportExcel()">{{ t('common.exportExcel') }}</el-button>
<el-button type="primary" @click="openExportList">{{ t('common.viewExportList') }}</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">
<el-table-column type="index" :label="$t('common_list.id')" width="60" fixed="left">
<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="name" :label="$t('common_list.homilyId')" width="120" fixed="left" />
<el-table-column prop="jwcode" :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="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="refundModel" :label="$t('cash_refund.refundModel')" width="120">
<el-table-column prop="name" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="jwcode" :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="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="refundModel" :label="t('common_list.refundModel')" width="120">
<template #default="scope">
{{ scope.row.refundModel === 1 ? $t('cash_refund.partialRefund') : $t('cash_refund.fullRefund') }}
{{ scope.row.refundModel === 1 ? t('common_list.refundModelPart') : t('common_list.refundModelAll') }}
</template>
</el-table-column>
<el-table-column prop="submitter" :label="$t('common_list.submitter')" width="120" />
<el-table-column prop="refundReason" :label="$t('common_list.refundReason')" width="120" show-overflow-tooltip />
<el-table-column prop="remark" :label="$t('common_list.remark')" width="150" show-overflow-tooltip />
<el-table-column prop="status" :label="$t('common.orderStatus')" width="120">
<el-table-column prop="submitter" :label="t('common_list.submitter')" width="120" />
<el-table-column prop="refundReason" :label="t('common_list.refundReason')" width="120" show-overflow-tooltip />
<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">
{{
[30].includes(scope.row.status) ? $t('audit.waitAudit') :
[40].includes(scope.row.status) ? $t('audit.passed') :
scope.row.status === 32 ? $t('audit.rejected') :
scope.row.status === 41 ? $t('audit.RefundSuccessful') : scope.row.status
[30].includes(scope.row.status) ? t('cash.statusList.pending') :
[40].includes(scope.row.status) ? t('cash.statusList.passed') :
scope.row.status === 32 ? t('cash.statusList.rejected') :
scope.row.status === 41 ? t('cash.refundSuccess') : scope.row.status
}}
</template>
</el-table-column>
<el-table-column :label="$t('audit.operation')" fixed="right" width="100px">
<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 === 30" type="primary" text @click="showAudit(scope.row)">
{{ $t('audit.audit') }}
{{ t('common.audit') }}
</el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)">
{{ $t('cash_refund.viewProgress') }}
{{ t('common.viewProgress') }}
</el-button>
</div>
</template>
@ -105,137 +104,137 @@
style="margin-top: 1vh;"></el-pagination>
</el-card>
<el-dialog v-model="showAudit2" :title="$t('cash_refund.audit')" class="audit2" width="35vw" overflow draggable
<el-dialog v-model="showAudit2" :title="t('common.audit')" class="audit2" width="35vw" overflow draggable
style="background-color: #F3FAFE !important;">
<div class="top">
<el-button @click="" class="smallTitle" size="small">{{ $t('cash_refund.refundApplicationInfo') }}</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.refundApplyInfo') }}</el-button>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.refundModel') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.refundModel') }}</el-text>
<el-select v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
<el-option :label="$t('cash_refund.fullRefund')" :value="0"></el-option>
<el-option :label="$t('cash_refund.partialRefund')" :value="1"></el-option>
<el-option :label="t('common_add.refundModelAll')" :value="0"></el-option>
<el-option :label="t('common_add.refundModelPart')" :value="1"></el-option>
</el-select>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common.permanentGold') }}</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled />&nbsp;{{ $t('common.个') }}
<el-text style="width:4vw;" size="small">{{ t('common_add.permanentGold') }}</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled /><span>&nbsp;{{ t('cash.unit') }}</span>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common.freeGold') }}</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled />&nbsp;{{ $t('common.个') }}
<el-text style="width:4vw;" size="small">{{ t('common_add.freeGold') }}</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled /><span>&nbsp;{{ t('cash.unit') }}</span>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.refundReason') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.refundReason') }}</el-text>
<el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100"
show-word-limit type="textarea" disabled />
</div>
</div>
<el-button @click="" class="smallTitle" size="small">{{ $t('cash_refund.originalOrderInfo') }}</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.originalOrderInfo') }}</el-button>
<div class="center">
<div class="center-left">
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.jwcode') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.jwcode') }}</el-text>
<el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.goodsName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.productName') }}</el-text>
<el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('common.market') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.market') }}</el-text>
<el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.paymentCurrency') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payCurrency') }}</el-text>
<el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.paymentAmount') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payAmount') }}</el-text>
<el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.payTime') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payTime') }}</el-text>
<el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;">{{ $t('cash_refund.payVoucher') }}</el-text>
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="auditRow.payVoucher" :src="auditRow.payVoucher"
style="width: 80px; height: 80px; object-fit: cover;">
<div v-else>
{{ $t('cash_refund.noVoucher') }}
{{ t('common_add.noTransferVoucher') }}
</div>
</div>
</div>
<div class="center-right">
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.customerName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.customerName') }}</el-text>
<el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.activityName') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.activity') }}</el-text>
<el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common.payModel') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.payMethod') }}</el-text>
<el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedCurrency') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveCurrency') }}</el-text>
<el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedAmount') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveAmount') }}</el-text>
<el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.receivedTime') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.receiveTime') }}</el-text>
<el-input v-model="auditRow.receivedTime" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.handlingCharge') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.fee') }}</el-text>
<el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.submitter') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.submitter') }}</el-text>
<el-input v-model="auditRow.submitter" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">{{ $t('common_list.remark') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('common_add.remark') }}</el-text>
<el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled />
</div>
</div>
</div>
<div class="bottom">
<el-button class="smallTitle" size="small" v-show="showReject">{{ $t('cash_refund.rejectionInfo') }}</el-button>
<el-button class="smallTitle" size="small" v-show="showReject">{{ t('common.rejectInfo') }}</el-button>
<div class="bottom-item" v-show="showReject">
<el-text style="width:4vw;" size="small">{{ $t('cash_refund.rejectionRemark') }}</el-text>
<el-input v-model="addForm.remark" :placeholder="$t('cash_refund.placeholder.rejectionRemark')" size="small" style="width:10vw;" :row="3"
<el-text style="width:4vw;" size="small">{{ t('common_add.rejectRemark') }}</el-text>
<el-input v-model="addForm.remark" :placeholder="t('common_add.rejectRemarkPlaceholder')" size="small" style="width:10vw;" :row="3"
maxlength="100" type="textarea" show-word-limit clearable />
</div>
<div class="bottom-item" v-show="showExecutor">
<el-text style="width:4vw;" size="small">{{ $t('refundProgress.executor') }}</el-text>
<el-text style="width:4vw;" size="small">{{ t('cash.progress.executor') }}</el-text>
<el-select v-model="addForm.executor" style="width:9vw;">
<el-option v-for="item in executorList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div style="text-align: center;" v-show="!showReject && !showExecutor">
<el-button type="default" @click="showReject = true">{{ $t('common.reject') }}</el-button>
<el-button type="primary" @click="showExecutor = true">{{ $t('common.pass') }}</el-button>
<el-button type="default" @click="showReject = true">{{ t('common.reject') }}</el-button>
<el-button type="primary" @click="showExecutor = true">{{ t('common.pass') }}</el-button>
</div>
<div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleReject">{{ $t('common.confirm') }}</el-button>
<el-button type="default" @click="hideReject">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleReject">{{ t('common.confirm') }}</el-button>
</div>
<div style="text-align: center;" v-show="showExecutor">
<el-button type="default" @click="hideExecutor">{{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="handlePass">{{ $t('common.confirm') }}</el-button>
<el-button type="default" @click="hideExecutor">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="handlePass">{{ t('common.confirm') }}</el-button>
</div>
</div>
</el-dialog>
<el-dialog v-model="showSteps" :title="$t('refundProgress.title')" overflow draggable width="1206px" height="506px" :style="{
<el-dialog v-model="showSteps" :title="t('cash.refundProgress')" overflow draggable width="1206px" height="506px" :style="{
backgroundImage: `url(${BackgroundSvg})`,
backgroundSize: 'cover',
backgroundPosition: 'center'
@ -246,104 +245,104 @@
<el-step>
<template #title>
<div>
{{ $t('refundProgress.submitter') }}<br>{{ submitter || $t('refundProgress.unknownSubmitter') }}
{{ t('common_list.submitter') }}<br>{{ submitter || t('common.unknownSubmitter') }}
</div>
</template>
<template #icon>
<img src="@/assets/images/refund-approved.png" alt="已完成">
<img src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.areaFinance') }}<br>{{ areaFinance || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.areaFinance') }}<br>{{ areaFinance || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 2" src="@/assets/images/refund-rejected.png" alt="已驳回">
<img v-else-if="currentStep === 1" src="@/assets/images/refund-approving.png" alt="待审核">
<img v-else-if="currentStep > 2" src="@/assets/images/refund-approved.png" alt="已审核">
<img v-if="currentStep === 2" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 1" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 2" src="@/assets/images/refund-approved.png" :alt="t('common.passed')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.areaCharge') }}<br>{{ areaCharge || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.areaCharge') }}<br>{{ areaCharge || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 4" src="@/assets/images/refund-rejected.png" alt="已驳回">
<img v-else-if="currentStep === 3" src="@/assets/images/refund-approving.png" alt="待审核">
<img v-if="currentStep === 4" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 3" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 3 && currentStep != 4"
src="@/assets/images/refund-approved.png" alt="已审核">
<img v-else-if="currentStep < 3" src="@/assets/images/refund-waiting.png" alt="未开始">
src="@/assets/images/refund-approved.png" :alt="t('common.passed')">
<img v-else-if="currentStep < 3" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.headFinance') }}<br>{{ headFinance || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.headFinance') }}<br>{{ headFinance || t('common.noAuditorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 6" src="@/assets/images/refund-rejected.png" alt="已驳回">
<img v-else-if="currentStep === 5" src="@/assets/images/refund-approving.png" alt="待审核">
<img v-if="currentStep === 6" src="@/assets/images/refund-rejected.png" :alt="t('common.rejected')">
<img v-else-if="currentStep === 5" src="@/assets/images/refund-approving.png" :alt="t('common.pendingAudit')">
<img v-else-if="currentStep > 5 && currentStep != 6"
src="@/assets/images/refund-approved.png" alt="已审核">
<img v-else-if="currentStep < 5" src="@/assets/images/refund-waiting.png" alt="未开始">
src="@/assets/images/refund-approved.png" :alt="t('common.passed')">
<img v-else-if="currentStep < 5" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
<el-step>
<template #title>
<div>
{{ $t('refundProgress.executor') }}<br>{{ executor || $t('refundProgress.notRecorded') }}
{{ t('cash.progress.executor') }}<br>{{ executor || t('common.noExecutorRecorded') }}
</div>
</template>
<template #icon>
<img v-if="currentStep === 7" src="@/assets/images/refund-approving.png" alt="待处理">
<img v-else-if="currentStep === 8" src="@/assets/images/refund-approved.png" alt="已完成">
<img v-else-if="currentStep < 7" src="@/assets/images/refund-waiting.png" alt="未开始">
<img v-if="currentStep === 7" src="@/assets/images/refund-approving.png" :alt="t('common_list.pending')">
<img v-else-if="currentStep === 8" src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
<img v-else-if="currentStep < 7" src="@/assets/images/refund-waiting.png" :alt="t('common_list.activityStatus.notStarted')">
</template>
</el-step>
</el-steps>
</div>
<div class="steps-btn">
<el-button type="primary" @click="showSteps = false">{{ $t('common.confirm') }}</el-button>
<el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button>
</div>
</div>
</el-dialog>
<el-dialog v-model="exportListVisible" :title="$t('common_export.exportList')" width="80%">
<el-dialog v-model="exportListVisible" :title="t('common_export.exportList')" width="80%">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" :label="$t('common_export.fileName')" />
<el-table-column prop="state" :label="$t('common_export.status')">
<el-table-column prop="fileName" :label="t('common_export.fileName')" />
<el-table-column prop="state" :label="t('common_export.status')">
<template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('common_export.createTime')">
<el-table-column prop="createTime" :label="t('common_export.createTime')">
<template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :label="$t('common_export.operation')">
<el-table-column :label="t('common_export.operation')">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
{{ $t('common_export.download') }}
{{ t('common_export.download') }}
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button text @click="exportListVisible = false">{{ $t('common_export.close') }}</el-button>
<el-button text @click="exportListVisible = false">{{ t('common_export.close') }}</el-button>
</div>
</template>
</el-dialog>
@ -418,10 +417,42 @@ const statusStepMap = {
40: [7, false],
41: [8, false]
}
const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
const statusList = ref(['待审核', '审核通过', '已驳回', '退款成功'])
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
import { computed } from 'vue'
const isHeadquarters = computed(() => {
const m = adminData.value.markets
return m === t('common.markets.headquarters') || m === '总部' || m === 'Headquarters'
})
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 statusList = computed(() => [
t('cash.statusList.pending'),
t('cash.statusList.passed'),
t('cash.statusList.rejected'),
t('cash.refundSuccess')
])
const executorList = ref([
{
value: '305485',
@ -459,18 +490,18 @@ const executorList = ref([
//
const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_headquarters_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
const statusParam = ref([30, 32, 40, 41])//
if (searchForm.value.statuses === '待审核') {
if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [30]
} else if (searchForm.value.statuses === '审核通过') {
} else if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [32]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41]
} else {
statusParam.value = [30, 32, 40, 41]
@ -482,13 +513,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return;
}
@ -518,13 +549,13 @@ const getRefund = async function () {
tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0
} catch (error) {
ElMessage.error(error.message || '查询失败')
ElMessage.error(error.message || t('elmessage.searchFailed'))
}
}
//
const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
@ -546,19 +577,19 @@ const handlePass = async function () {
data: params
})
if (result.code === 200) {
ElMessage.success('审核通过')
ElMessage.success(t('elmessage.approveSuccess'))
showAudit2.value = false
getRefund()
hideExecutor()
}
} catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
}
}
//
const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}
try {
@ -576,14 +607,14 @@ const handleReject = async function () {
data: params
})
if (result.code === 200) {
ElMessage.success('审核驳回')
ElMessage.success(t('elmessage.rejectSuccess'))
showAudit2.value = false
getRefund()
addForm.value.remark = ''
showReject.value = false
}
} catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
}
}
const getMarket = async function () {
@ -621,13 +652,13 @@ const hideReject = function () {
}
const exportExcel = async function () {
const statusParam = ref([30, 32, 40, 41])//
if (searchForm.value.statuses === '待审核') {
if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [30]
} else if (searchForm.value.statuses === '审核通过') {
} else if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [32]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41]
} else {
statusParam.value = [30, 32, 40, 41]
@ -639,13 +670,13 @@ const exportExcel = async function () {
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return;
}
@ -668,9 +699,9 @@ const exportExcel = async function () {
const res = await API({ url: '/export/exportFinance', data: params })
if (res.code === 200) {
ElMessage.success('导出成功')
ElMessage.success(t('elmessage.exportSuccess'))
} else {
ElMessage.error(res.msg || '导出失败')
ElMessage.error(res.msg || t('elmessage.exportFailed'))
}
}
const openExportList = () => {
@ -687,11 +718,11 @@ const getExportList = async () => {
})
exportList.value = filteredData
} else {
ElMessage.error(result.msg || '获取导出列表失败')
ElMessage.error(result.msg || t('elmessage.getExportListError'))
}
} catch (error) {
console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
ElMessage.error(t('elmessage.getExportListError'))
} finally {
exportListLoading.value = false
}
@ -703,7 +734,7 @@ const downloadExportFile = (item) => {
link.download = item.fileName
link.click()
} else {
ElMessage.warning('文件还在导出中,请稍后再试')
ElMessage.warning(t('elmessage.exportingInProgress'))
}
}
const getTagType = (state) => {
@ -724,15 +755,15 @@ const getTagType = (state) => {
const getTagText = (state) => {
switch (state) {
case 0:
return '待执行';
return t('elmessage.pendingExecution');
case 1:
return '执行中';
return t('elmessage.executing');
case 2:
return '执行完成';
return t('elmessage.executed');
case 3:
return '执行出错';
return t('elmessage.errorExecution');
default:
return '未知状态';
return t('elmessage.unknownStatus');
}
}
const reset = function () {
@ -749,7 +780,7 @@ const reset = function () {
}
const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_headquarters_refund_progress)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return
}

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

@ -3,106 +3,107 @@
<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 />
<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 />
<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 />
<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="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')"
<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;">{{ $t('common.orderStatus') }}</el-text>
<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="t('cash_refund.' + item)" :value="item" />
<el-option v-for="item in statusList" :key="item" :label="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-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.payType') }}</el-text>
<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"
<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>
<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>
</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">
<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">
<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('cash_refund.noVoucher') }}
<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">
<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
[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('audit.operation')" fixed="right" width="100px">
<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.cancel') }}
{{ t('common.withdraw') }}
</el-button>
<el-button v-if="scope.row.status === 11" type="primary" text
@click="showEditDialog(scope.row)">
{{ $t('common.edit') }}
{{ t('common.edit') }}
</el-button>
</div>
</template>
@ -114,96 +115,96 @@
style="margin-top: 1vh;"></el-pagination>
</el-card>
<el-dialog v-model="showEdit" :title="$t('refund.addCoinRefund')" class="editDialog" overflow draggable
<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.jwcode') }}</el-text>
<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('elmessage.customerName') }}</el-text>
<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.market') }}</el-text>
<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.activityName') }}</el-text>
<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_list.goodsName') }}</el-text>
<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_list.goodsNum') }}</el-text>
<el-text style="width:4vw;">{{ t('common_add.productNum') }}</el-text>
<el-input v-model="editRow.goodsNum" style="width:10vw;" disabled />
&nbsp;{{ $t('common.个') }}
&nbsp;{{ t('cash.unit') }}
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('cash_refund.paymentCurrency') }}</el-text>
<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('cash_refund.paymentAmount') }}</el-text>
<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_list.payModel') }}</el-text>
<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.payTime') }}</el-text>
<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('cash_refund.payVoucher') }}</el-text>
<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('cash_refund.noVoucher') }}
{{ t('common_add.noTransferVoucher') }}
</div>
</div>
<div class="add-item">
<el-text style="width:4vw;">{{ $t('common_list.remark') }}</el-text>
<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('cash_refund.refundModel') }}</el-text>
<el-text style="width:4vw;">{{ t('common_add.refundType') }}</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 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_list.permanentGold') }}</el-text>
<el-input v-model="editForm.partRefundGold" style="width:5vw;" />&nbsp;&nbsp;{{ $t('common.个') }}
<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_list.freeGold') }}</el-text>
<el-input v-model="editForm.partRefundFree" style="width:5vw;" />&nbsp;&nbsp;{{ $t('common.个') }}
<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_list.refundReason') }}</el-text>
<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('cash_refund.refundReasonTip') }}</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>
<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>
<ConfirmDialog v-model="showBack" :message="t('cash_refund.will') + t('cash_refund.withdrawRecord')" @confirm="recall" @cancel="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="{
@ -211,16 +212,16 @@
backgroundSize: 'cover',
backgroundPosition: 'center'
}">
<div class="back-text">{{ $t('cash_refund.refundAmountError') }}</div>
<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>
<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>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus'
import API from '@/util/http.js'
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 { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import RefundRecallBackground from '@/assets/images/refund-recall.png'
import { isNumber } from 'lodash'
import { re } from 'mathjs'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const isHeadquarters = computed(() => {
const m = adminData.value.markets
return m === t('common.markets.headquarters') || m === '总部' || m === 'Headquarters'
})
const dateRange = ref([])
const searchForm = ref({
@ -263,7 +270,13 @@ const uploadRef = ref(null)
const showBack = ref(false)
const showError = ref(false)
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 () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_customer_service_refund_pending)) {
@ -272,15 +285,15 @@ const getRefund = async function () {
}
try {
const statusParam = ref([])
if (searchForm.value.statuses === 'submitted') {
if (searchForm.value.statuses === t('cash.statusList.submitted')) {
statusParam.value = [10]
} else if (searchForm.value.statuses === 'withdrawn') {
} else if (searchForm.value.statuses === t('cash.statusList.recalled')) {
statusParam.value = [11]
} else if (searchForm.value.statuses === 'inProgress') {
} else if (searchForm.value.statuses === t('cash.statusList.inProgress')) {
statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === 'RefundSuccessful') {
} else if (searchForm.value.statuses === t('cash.statusList.refunded')) {
statusParam.value = [41]
} else if (searchForm.value.statuses === 'rejected') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [12, 22, 32]
}
@ -290,13 +303,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error(t('elmessage.invalidJwcodeFormat'))
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return;
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error(t('elmessage.jwcodeTooLong'))
ElMessage.error(t('elmessage.limitJwcodeLength'))
return;
}
@ -329,7 +342,7 @@ const getRefund = async function () {
tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0
} catch (error) {
ElMessage.error(error.message || t('elmessage.requestFailed'))
ElMessage.error(error.message || t('elmessage.searchFailed'))
}
}
//
@ -350,7 +363,7 @@ const recall = async function () {
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || t('elmessage.addSuccess'))
ElMessage.success(result.msg || t('elmessage.withdrawSuccess'))
showBack.value = false
getRefund()
} else {
@ -369,23 +382,23 @@ const submitEdit = async function () {
try {
console.log(editRow.value)
if(!editForm.value.refundModel) {
ElMessage.error(t('elmessage.checkRefundModel'))
ElMessage.error(t('elmessage.selectRefundModel'))
return
}else if(!editForm.value.refundReason) {
ElMessage.error(t('elmessage.checkRefundReason'))
ElMessage.error(t('elmessage.refundReasonPlaceholder'))
return
}else if(editForm.value.refundModel == 1 && (!editForm.value.partRefundGold || !editForm.value.partRefundFree)) {
ElMessage.error(t('elmessage.checkRefundGold'))
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.invalidPermanentGold'))
ElMessage.error(t('elmessage.checkPermanentFormat'))
return
}
const isPositiveInteger1 = /^[1-9]\d*$/.test(editForm.value.partRefundFree)
if (!isPositiveInteger1) {
ElMessage.error(t('elmessage.invalidFreeGold'))
ElMessage.error(t('elmessage.checkFreeFormat'))
return
}
}
@ -409,11 +422,11 @@ const submitEdit = async function () {
}
if (editRow.value.goodsName == '金币充值') {
if (editForm.value.partRefundGold > editRow.value.gold) {
ElMessage.error(t('elmessage.refundGoldExceed'))
ElMessage.error(t('elmessage.limitRefundGoldNotExceedOriginal'))
return
}
if (editForm.value.partRefundFree > editRow.value.free) {
ElMessage.error(t('elmessage.refundFreeExceed'))
ElMessage.error(t('elmessage.limitRefundFreeNotExceedOriginal'))
return
}
}
@ -422,14 +435,14 @@ const submitEdit = async function () {
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || t('elmessage.addSuccess'))
ElMessage.success(result.msg || t('elmessage.editSuccess'))
showEdit.value = false
getRefund()
} else {
ElMessage.error(result.msg || t('elmessage.addFailed'))
ElMessage.error(result.msg || t('elmessage.editFailed'))
}
} catch (error) {
ElMessage.error(error.message || t('elmessage.addFailed'))
ElMessage.error(error.message || t('elmessage.editFailed'))
}
}
const getMarket = async function () {
@ -499,8 +512,29 @@ const cancelEdit = function () {
}
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 () {
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') : '' }}
</template>
</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="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="adminName" :label="$t('common_list.submitter')" width="100px" />
<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>
</template>
</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">
<span>{{ (calculateFreeGold(scope.row) || 0) }}</span>
</template>
</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">
<span>{{ (scope.row.taskGold || 0) }}</span>
</template>

Loading…
Cancel
Save