Browse Source

feat(i18n): 添加多语言支持并更新退款相关页面

为退款服务和管理页面添加国际化支持,包括中英文翻译
更新退款申请、审核流程和状态显示的文本
优化表单字段和按钮的多语言处理
添加新的翻译键和对应的文本内容
milestone-20251209-多语言二期^2
zhangrenyuan 1 month ago
parent
commit
49b7cb625d
  1. 35
      src/components/locales/lang/en.js
  2. 35
      src/components/locales/lang/zh-CN.js
  3. 296
      src/views/moneyManage/refundDetail/refundCharge.vue
  4. 363
      src/views/moneyManage/refundDetail/refundFinance.vue
  5. 316
      src/views/moneyManage/refundDetail/refundHeader.vue
  6. 228
      src/views/moneyManage/refundDetail/refundService.vue

35
src/components/locales/lang/en.js

@ -109,6 +109,8 @@ export default {
uploadHint: "Drag file here or click", uploadHint: "Drag file here or click",
pendingFee: "Fee Pending", pendingFee: "Fee Pending",
viewRejectReason: "Reject Reason", viewRejectReason: "Reject Reason",
viewProgress: "View Progress",
viewProgress: "View Progress",
// Buttons-Date // Buttons-Date
today: "Today", today: "Today",
yesterday: "Yesterday", yesterday: "Yesterday",
@ -157,6 +159,9 @@ export default {
}, },
noData: "No Data", noData: "No Data",
all: "All", all: "All",
unknownSubmitter: "Unknown submitter",
noAuditorRecorded: "No auditor recorded",
noExecutorRecorded: "No executor recorded",
}, },
// Permission Module // Permission Module
@ -224,6 +229,10 @@ export default {
checkAccountFormat: "Check OA format", checkAccountFormat: "Check OA format",
deviceLimitReached: "Device limit reached", deviceLimitReached: "Device limit reached",
noParentRoleMarket: "Parent role has no region", noParentRoleMarket: "Parent role has no region",
inputRefundBeansBoth: "Enter refund coin and free coin counts",
limitRefundGoldNotExceedOriginal: "Refund coins cannot exceed original coins",
limitRefundFreeNotExceedOriginal: "Refund free coins cannot exceed original free coins",
refundAmountError: "Refund amount incorrect",
roleAddSuccess: "Role {roleName} added", roleAddSuccess: "Role {roleName} added",
enableSuccess: "Enabled", enableSuccess: "Enabled",
disableSuccess: "Disabled", disableSuccess: "Disabled",
@ -407,11 +416,11 @@ export default {
payPlatform: "Platform", payPlatform: "Platform",
type: "Type", type: "Type",
orderNo: "Order No.", orderNo: "Order No.",
number: "Qty",
number: "number",
money: "Amount", money: "Amount",
goodsName: "Product Name", goodsName: "Product Name",
productName: "Product", productName: "Product",
productNum: "Qty",
productNum: "productNum",
refundType: "Refund Type", refundType: "Refund Type",
refundModel: "Refund Method", refundModel: "Refund Method",
refundModelAll: "Full Refund", refundModelAll: "Full Refund",
@ -422,6 +431,7 @@ export default {
refundChannels: "Refund Via", refundChannels: "Refund Via",
refundVoucher: "Refund IMG", refundVoucher: "Refund IMG",
refundSuccess: "Refund Success", refundSuccess: "Refund Success",
refundReason: "Refund Reason",
activity: "Activity", activity: "Activity",
businessBelong: "Region", businessBelong: "Region",
startTime: "Start Time", startTime: "Start Time",
@ -452,8 +462,9 @@ export default {
updateTime: "Update Time", updateTime: "Update Time",
receiveTime: "Received Time", receiveTime: "Received Time",
rejectTime: "Reject Time", rejectTime: "Reject Time",
rejectReason: "Reason",
operation: "Action",
rejectReason: "Reject Reason",
refundReason: "Refund Reason",
operation: "Operation",
// Gold Bean // Gold Bean
permanentBean: "Paid Beans", permanentBean: "Paid Beans",
freeBean: "Free Beans", freeBean: "Free Beans",
@ -505,7 +516,7 @@ export default {
fileName: "File Name", fileName: "File Name",
status: "Status", status: "Status",
createTime: "Created At", createTime: "Created At",
operation: "Action",
operation: "Operation",
download: "Download", download: "Download",
close: "Close", close: "Close",
}, },
@ -528,6 +539,8 @@ export default {
vietnamesePlaceholder: "Enter Vietnamese", vietnamesePlaceholder: "Enter Vietnamese",
addTranslation: "Add Trans", addTranslation: "Add Trans",
editTranslation: "Edit Trans", editTranslation: "Edit Trans",
refundApplyInfo: "Refund Request Info",
originalOrderInfo: "Original Order Info",
// User & Role // User & Role
addUserPermission: "Add User Perm", addUserPermission: "Add User Perm",
editUserPermission: "Edit User Perm", editUserPermission: "Edit User Perm",
@ -567,7 +580,7 @@ export default {
goodsName: "Product", goodsName: "Product",
productName: "Product", productName: "Product",
productNamePlaceholder: "Select product", productNamePlaceholder: "Select product",
productNum: "Qty",
productNum: "productNum",
productNumPlaceholder: "Enter quantity", productNumPlaceholder: "Enter quantity",
numUnit: "Unit", numUnit: "Unit",
payCurrency: "Pay Currency", payCurrency: "Pay Currency",
@ -689,7 +702,7 @@ export default {
paymentTime: "Pay Time", paymentTime: "Pay Time",
submitTime: "Submit Time", submitTime: "Submit Time",
auditTime: "Audit Time", auditTime: "Audit Time",
operation: "Action",
operation: "Operation",
// Refund Audit List // Refund Audit List
orderCode: "Order No.", orderCode: "Order No.",
refundType: "Type", refundType: "Type",
@ -982,6 +995,13 @@ export default {
// Cash Management // Cash Management
cash: { cash: {
refundProgress: "Refund Progress",
progress: {
areaFinance: "Area Finance",
areaCharge: "Area Manager",
headFinance: "HQ Finance",
executor: "Executor",
},
receiveCashDataTitle: "Note", receiveCashDataTitle: "Note",
receiveCashDataContent: receiveCashDataContent:
"All receipt pages: Default sort by payment time (desc)", "All receipt pages: Default sort by payment time (desc)",
@ -1100,6 +1120,7 @@ export default {
taiwanStockPackage: "TW Pack", taiwanStockPackage: "TW Pack",
}, },
statusList: { statusList: {
submitted: "Submitted",
pending: "Pending", pending: "Pending",
passed: "Passed", passed: "Passed",
recalled: "Recalled", recalled: "Recalled",

35
src/components/locales/lang/zh-CN.js

@ -92,6 +92,7 @@ export default {
pass: "通过", pass: "通过",
close: "关闭", close: "关闭",
reject: "驳回", reject: "驳回",
rejectInfo: "驳回信息",
cancel: "取消", cancel: "取消",
confirm: "确认", confirm: "确认",
submit: "提交", submit: "提交",
@ -109,12 +110,14 @@ export default {
uploadHint: "将文件拖到此处,或点击上传", uploadHint: "将文件拖到此处,或点击上传",
pendingFee: "待填写手续费", pendingFee: "待填写手续费",
viewRejectReason: "查看驳回理由", viewRejectReason: "查看驳回理由",
viewProgress: "查看进度",
// 按钮组-日期 // 按钮组-日期
today: "今", today: "今",
yesterday: "昨", yesterday: "昨",
last7Days: "近7天", last7Days: "近7天",
// 按钮组-现金管理-审核 // 按钮组-现金管理-审核
pendingAudit: "待审核", pendingAudit: "待审核",
audited: "已审核",
passed: "已通过", passed: "已通过",
completed: "已完成", completed: "已完成",
withdrawn: "已撤回", withdrawn: "已撤回",
@ -154,11 +157,12 @@ export default {
// 市场 // 市场
markets: { markets: {
headquarters: "总部", headquarters: "总部",
}
,
noData: "暂无数据"
,
all: "全部"
},
noData: "暂无数据",
all: "全部",
unknownSubmitter: "未知提交人",
noAuditorRecorded: "未记录审核人",
noExecutorRecorded: "未记录执行人"
}, },
// 权限模块 // 权限模块
@ -223,6 +227,10 @@ export default {
checkAccountFormat: "请检查OA号格式", checkAccountFormat: "请检查OA号格式",
deviceLimitReached: "设备数量已达上限", deviceLimitReached: "设备数量已达上限",
noParentRoleMarket: "该上级角色无归属地区", noParentRoleMarket: "该上级角色无归属地区",
inputRefundBeansBoth: "请输入退款金币数和免费金币数",
limitRefundGoldNotExceedOriginal: "退款金币数不能大于原金币数",
limitRefundFreeNotExceedOriginal: "退款免费金币数不能大于原免费金币数",
refundAmountError: "退款金额填写有误",
roleAddSuccess: "角色{roleName}添加成功", roleAddSuccess: "角色{roleName}添加成功",
enableSuccess: "启用成功", enableSuccess: "启用成功",
disableSuccess: "禁用成功", disableSuccess: "禁用成功",
@ -423,6 +431,7 @@ export default {
refundChannels: "退款途径", refundChannels: "退款途径",
refundVoucher: "退款截图", refundVoucher: "退款截图",
refundSuccess: "退款成功", refundSuccess: "退款成功",
refundReason: "退款理由",
activity: "活动名称", activity: "活动名称",
businessBelong: "业绩归属地", businessBelong: "业绩归属地",
startTime: "开始时间", startTime: "开始时间",
@ -454,6 +463,7 @@ export default {
receiveTime: "到账时间", receiveTime: "到账时间",
rejectTime: "驳回时间", rejectTime: "驳回时间",
rejectReason: "驳回理由", rejectReason: "驳回理由",
rejectRemark: "驳回备注",
operation: "操作", operation: "操作",
// 金豆相关 // 金豆相关
permanentBean: "付费金豆", permanentBean: "付费金豆",
@ -531,6 +541,8 @@ export default {
vietnamesePlaceholder: "请输入越南文", vietnamesePlaceholder: "请输入越南文",
addTranslation: "新增翻译", addTranslation: "新增翻译",
editTranslation: "编辑翻译", editTranslation: "编辑翻译",
refundApplyInfo: "退款申请信息",
originalOrderInfo: "原订单信息",
// 用户与角色管理 // 用户与角色管理
addUserPermission: "新增用户权限", addUserPermission: "新增用户权限",
editUserPermission: "编辑用户权限", editUserPermission: "编辑用户权限",
@ -555,6 +567,8 @@ export default {
customerNamePlaceholder: "请输入客户姓名", customerNamePlaceholder: "请输入客户姓名",
rejectReason: "驳回理由", rejectReason: "驳回理由",
rejectReasonPlaceholder: "请输入驳回理由", rejectReasonPlaceholder: "请输入驳回理由",
rejectRemark: "驳回备注",
rejectRemarkPlaceholder: "请输入驳回备注",
market: "所属地区", market: "所属地区",
marketPlaceholder: "请输入所属地区", marketPlaceholder: "请输入所属地区",
activity: "活动名称", activity: "活动名称",
@ -1009,6 +1023,13 @@ export default {
// 现金管理 // 现金管理
cash: { cash: {
refundProgress: "退款进度",
progress: {
areaFinance: "地区财务",
areaCharge: "地区负责人",
headFinance: "总部财务",
executor: "指定执行人",
},
// 收款管理 // 收款管理
receiveCashDataTitle: "数据说明", receiveCashDataTitle: "数据说明",
receiveCashDataContent: "收款的所有页面:订单记录默认按照付款时间降序排列", receiveCashDataContent: "收款的所有页面:订单记录默认按照付款时间降序排列",
@ -1132,11 +1153,13 @@ export default {
}, },
// 审核状态 // 审核状态
statusList: { statusList: {
submitted: "已提交",
pending: "待审核", pending: "待审核",
passed: "通过",
passed: "审核通过",
recalled: "已撤回", recalled: "已撤回",
refunded: "退款", refunded: "退款",
rejected: "已驳回", rejected: "已驳回",
inProgress: "进行中",
}, },
// 执行明细 // 执行明细
pending: "待处理", pending: "待处理",

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

@ -3,96 +3,96 @@
<el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);"> <el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
<div class="condition"> <div class="condition">
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">精网号</el-text>
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">客户姓名</el-text>
<el-input v-model="searchForm.name" placeholder="请输入客户姓名" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">产品名称</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;" <el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;"
placeholder="请选择产品名称" clearable />
:placeholder="t('common.productNamePlaceholder')" clearable />
</div> </div>
<div class="item1" v-if="adminData.markets === '总部'">
<el-text size="large" style="width:4vw;">所属地区</el-text>
<el-cascader style="width: 9vw;" v-model="searchForm.markets" :options="market" placeholder="请选择所属地区"
<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" /> clearable @change="handleMarketChange" />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">订单状态</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;" placeholder="请选择订单状态" 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-option v-for="item in statusList" :label="item" :value="item" :key="item" />
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="condition"> <div class="condition">
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">付款币种</el-text>
<el-select v-model="searchForm.paymentCurrency" style="width:9vw;" placeholder="请选择付款币种" 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-option v-for="item in currencies" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">支付方式</el-text>
<el-select v-model="searchForm.payType" style="width:9vw;" placeholder="请选择支付方式" 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-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2" style="width: 28.5vw;"> <div class="item2" style="width: 28.5vw;">
<el-text size="large" style="width:4vw;">付款时间</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" 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" /> :disabled-date="disabledDate" :default-time="defaultTime" />
</div> </div>
<div> <div>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="warning" @click="exportExcel()">导出excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="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>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);"> <el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);">
<el-table :data="tableData" style="height:73vh;width:82vw"> <el-table :data="tableData" style="height:73vh;width:82vw">
<el-table-column type="index" label="序号" width="60" fixed="left">
<el-table-column type="index" :label="t('common_list.id')" width="60" fixed="left">
<template #default="scope"> <template #default="scope">
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }} {{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="Homily ID" width="120" fixed="left" /> <el-table-column prop="name" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="jwcode" label="姓名" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="marketName" label="所属地区" width="120" />
<el-table-column prop="goodsName" label="产品名称" width="130" show-overflow-tooltip />
<el-table-column prop="goodsNum" label="产品数量" width="120" />
<el-table-column prop="refundModel" label="退款方式" width="120">
<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"> <template #default="scope">
{{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }}
{{ scope.row.refundModel === 1 ? t('common_list.refundModelPart') : t('common_list.refundModelAll') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitter" label="提交人" width="120" />
<el-table-column prop="refundReason" label="退款理由" width="120" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="status" label="订单状态" 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"> <template #default="scope">
{{ {{
[20].includes(scope.row.status) ? '待审核' :
[30, 40].includes(scope.row.status) ? '审核通过' :
[22, 32].includes(scope.row.status) ? '已驳回' :
scope.row.status === 41 ? '退款成功' : 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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<el-table-column prop="operation" :label="t('common_list.operation')" fixed="right" width="140px">
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-button v-if="scope.row.status === 20" type="primary" text @click="showAudit(scope.row)"> <el-button v-if="scope.row.status === 20" type="primary" text @click="showAudit(scope.row)">
审核
{{ t('common.audit') }}
</el-button> </el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)"> <el-button v-else type="primary" text @click="showStep(scope.row)">
查看进度
{{ t('common.viewProgress') }}
</el-button> </el-button>
</div> </div>
</template> </template>
@ -104,126 +104,126 @@
style="margin-top: 1vh;"></el-pagination> style="margin-top: 1vh;"></el-pagination>
</el-card> </el-card>
<el-dialog v-model="showAudit2" title="审核" 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;"> style="background-color: #F3FAFE !important;">
<div class="top"> <div class="top">
<el-button @click="" class="smallTitle" size="small">退款申请信息</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.refundApplyInfo') }}</el-button>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">退款方式</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-select v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
<el-option label="全部退款" :value="0"></el-option>
<el-option label="部分退款" :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> </el-select>
</div> </div>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">永久金币</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled />&nbsp;
<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>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">免费金币</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled />&nbsp;
<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>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">退款理由</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" <el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100"
show-word-limit type="textarea" disabled /> show-word-limit type="textarea" disabled />
</div> </div>
</div> </div>
<el-button @click="" class="smallTitle" size="small">原订单信息</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.originalOrderInfo') }}</el-button>
<div class="center"> <div class="center">
<div class="center-left"> <div class="center-left">
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">精网号</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 /> <el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">所属地区</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 /> <el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">产品名称</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 /> <el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款币种</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 /> <el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款金额</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 /> <el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款时间</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 /> <el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;">转账凭证</el-text>
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="auditRow.payVoucher" :src="auditRow.payVoucher" <img v-if="auditRow.payVoucher" :src="auditRow.payVoucher"
style="width: 80px; height: 80px; object-fit: cover;"> style="width: 80px; height: 80px; object-fit: cover;">
<div v-else> <div v-else>
无转账凭证
{{ t('common_add.noTransferVoucher') }}
</div> </div>
</div> </div>
</div> </div>
<div class="center-right"> <div class="center-right">
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">客户姓名</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 /> <el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">活动名称</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 /> <el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">支付方式</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 /> <el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账币种</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 /> <el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账金额</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 /> <el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账时间</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 /> <el-input v-model="auditRow.receivedTime" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">手续费</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 /> <el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">提交人</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 /> <el-input v-model="auditRow.submitter" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">备注</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" <el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled /> type="textarea" show-word-limit disabled />
</div> </div>
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
<el-button class="smallTitle" size="small" v-show="showReject">{{ t('common.rejectInfo') }}</el-button>
<div class="bottom-item" v-show="showReject"> <div class="bottom-item" v-show="showReject">
<el-text style="width:4vw;" size="small">驳回备注</el-text>
<el-input v-model="addForm.remark" placeholder="请输入驳回备注" 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 /> maxlength="100" type="textarea" show-word-limit clearable />
</div> </div>
<div style="text-align: center;" v-show="!showReject"> <div style="text-align: center;" v-show="!showReject">
<el-button type="default" @click="showReject = true">驳回</el-button>
<el-button type="primary" @click="handlePass">通过</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>
<div style="text-align: center;" v-show="showReject"> <div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">取消</el-button>
<el-button type="primary" @click="handleReject">确定</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>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="showSteps" 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})`, backgroundImage: `url(${RefundChargeBackground})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
@ -234,110 +234,110 @@
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
提交人<br>{{ submitter || '未知提交人' }}
{{ t('common_list.submitter') }}<br>{{ submitter || t('common.unknownSubmitter') }}
</div> </div>
</template> </template>
<template #icon> <template #icon>
<img src="@/assets/images/refund-approved.png" alt="已完成">
<img src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
</template> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
地区财务<br>{{ areaFinance || '未记录审核人' }}
{{ t('cash.progress.areaFinance') }}<br>{{ areaFinance || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
地区负责人<br>{{ areaCharge || '未记录审核人' }}
{{ t('cash.progress.areaCharge') }}<br>{{ areaCharge || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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" <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
总部财务<br>{{ headFinance || '未记录审核人' }}
{{ t('cash.progress.headFinance') }}<br>{{ headFinance || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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" <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
指定执行人<br>{{ executor || '未记录执行人' }}
{{ t('cash.progress.executor') }}<br>{{ executor || t('common.noExecutorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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> </template>
</el-step> </el-step>
</el-steps> </el-steps>
</div> </div>
<div class="steps-btn"> <div class="steps-btn">
<el-button type="primary" @click="showSteps = false">确定</el-button>
<el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="exportListVisible" title="导出列表" 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 :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<el-table-column prop="fileName" :label="t('common_export.fileName')" />
<el-table-column prop="state" :label="t('common_export.status')">
<template #default="scope"> <template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> <el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }} {{ getTagText(scope.row.state) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createTime" :label="t('common_export.createTime')">
<template #default="scope"> <template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} {{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作">
<el-table-column :label="t('common_export.operation')">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" <el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2"> :disabled="scope.row.state !== 2">
下载
{{ t('common_export.download') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
<el-button text @click="exportListVisible = false">{{ t('common_export.close') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload' const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
@ -351,12 +351,18 @@ import moment from 'moment'
import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import RefundChargeBackground from '@/assets/images/refund-progress.png' import RefundChargeBackground from '@/assets/images/refund-progress.png'
import { isNumber } from 'lodash' import { isNumber } from 'lodash'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const currentStep = ref(0)// const currentStep = ref(0)//
const searchForm = ref({ const searchForm = ref({
jwcode: '', jwcode: '',
markets: [] markets: []
}) })
const isHeadquarters = computed(() => {
const m = adminData.value.markets
return m === t('common.markets.headquarters') || m === '总部' || m === 'Headquarters'
})
const isReject = ref(false)// const isReject = ref(false)//
const addForm = ref({ const addForm = ref({
remark: '' remark: ''
@ -394,25 +400,51 @@ const statusStepMap = {
40: [7, false], 40: [7, false],
41: [8, 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 () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_manager_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_manager_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
const payCurrencySelect = ref('') const payCurrencySelect = ref('')
const statuses = ref([20, 22, 30, 32, 40, 41]) // 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] statuses.value = [30, 40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statuses.value = [22, 32] statuses.value = [22, 32]
} else if (searchForm.value.statuses === '待审核') {
} else if (searchForm.value.statuses === t('cash.statusList.pending')) {
statuses.value = [20] statuses.value = [20]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statuses.value = [41] statuses.value = [41]
} else { } else {
statuses.value = [20, 22, 30, 32, 40, 41] statuses.value = [20, 22, 30, 32, 40, 41]
@ -424,13 +456,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
} }
// 400 // 400
if (searchForm.value.jwcode.length > 8) { if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
@ -467,13 +499,13 @@ const getRefund = async function () {
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
} catch (error) { } catch (error) {
ElMessage.error(error.message || '查询失败')
ElMessage.error(error.message || t('elmessage.searchFailed'))
} }
} }
// //
const handlePass = async function () { const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
@ -490,18 +522,18 @@ const handlePass = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('审核通过')
ElMessage.success(t('elmessage.approveSuccess'))
showAudit2.value = false showAudit2.value = false
getRefund() getRefund()
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
} }
} }
// //
const handleReject = async function () { const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
@ -519,19 +551,19 @@ const handleReject = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('审核驳回')
ElMessage.success(t('elmessage.rejectSuccess'))
getRefund() getRefund()
addForm.value.remark = '' addForm.value.remark = ''
showAudit2.value = false showAudit2.value = false
showReject.value = false showReject.value = false
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
} }
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_manager_refund_progress)) { if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_manager_refund_progress)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
@ -638,7 +670,7 @@ const exportExcel = async function () {
} }
const res = await API({ url: '/export/exportFinance', data: params }) const res = await API({ url: '/export/exportFinance', data: params })
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('导出成功')
ElMessage.success(t('elmessage.exportSuccess'))
} }
} }
const openExportList = () => { const openExportList = () => {
@ -655,11 +687,11 @@ const getExportList = async () => {
}) })
exportList.value = filteredData exportList.value = filteredData
} else { } else {
ElMessage.error(result.msg || '获取导出列表失败')
ElMessage.error(result.msg || t('elmessage.getExportListError'))
} }
} catch (error) { } catch (error) {
console.error('获取导出列表出错:', error) console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
ElMessage.error(t('elmessage.getExportListError'))
} finally { } finally {
exportListLoading.value = false exportListLoading.value = false
} }
@ -671,7 +703,7 @@ const downloadExportFile = (item) => {
link.download = item.fileName link.download = item.fileName
link.click() link.click()
} else { } else {
ElMessage.warning('文件还在导出中,请稍后再试')
ElMessage.warning(t('elmessage.exportingInProgress'))
} }
} }
// //
@ -693,15 +725,15 @@ const getTagType = (state) => {
const getTagText = (state) => { const getTagText = (state) => {
switch (state) { switch (state) {
case 0: case 0:
return '待执行';
return t('elmessage.pendingExecution');
case 1: case 1:
return '执行中';
return t('elmessage.executing');
case 2: case 2:
return '执行完成';
return t('elmessage.executed');
case 3: case 3:
return '执行出错';
return t('elmessage.errorExecution');
default: default:
return '未知状态';
return t('elmessage.unknownStatus');
} }
} }
const hideReject = function () { const hideReject = function () {

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

@ -3,24 +3,24 @@
<el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);"> <el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
<div class="condition"> <div class="condition">
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">精网号</el-text>
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">客户姓名</el-text>
<el-input v-model="searchForm.name" placeholder="请输入客户姓名" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">产品名称</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 /> <el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;" clearable />
</div> </div>
<div class="item1" v-if="adminData.markets === '总部'">
<el-text size="large" style="width:4vw;">所属地区</el-text>
<el-cascader style="width: 9vw;" v-model="searchForm.markets" :options="market" placeholder="请选择所属地区"
<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" /> clearable @change="handleMarketChange" />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">订单状态</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-select v-model="searchForm.statuses" style="width:9vw;" clearable>
<el-option v-for="item in statusList" :label="item" :value="item" :key="item" /> <el-option v-for="item in statusList" :label="item" :value="item" :key="item" />
</el-select> </el-select>
@ -28,70 +28,70 @@
</div> </div>
<div class="condition"> <div class="condition">
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">付款币种</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-select v-model="searchForm.paymentCurrency" style="width:9vw;" clearable>
<el-option v-for="item in currencies" :key="item" :label="item" :value="item" /> <el-option v-for="item in currencies" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">支付方式</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-select v-model="searchForm.payType" style="width:9vw;" clearable>
<el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" /> <el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2" style="width: 28.5vw;"> <div class="item2" style="width: 28.5vw;">
<el-text size="large" style="width:4vw;">付款时间</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" 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" /> :disabled-date="disabledDate" :default-time="defaultTime" />
</div> </div>
<div> <div>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="warning" @click="exportExcel()">导出excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="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>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);"> <el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);">
<el-table :data="tableData" style="height:73vh;width:82vw"> <el-table :data="tableData" style="height:73vh;width:82vw">
<el-table-column type="index" label="序号" width="60" fixed="left">
<el-table-column type="index" :label="t('common_list.id')" width="60" fixed="left">
<template #default="scope"> <template #default="scope">
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }} {{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" /> <el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="name" label="姓名" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="marketName" label="所属地区" width="120" />
<el-table-column prop="goodsName" label="产品名称" width="130" show-overflow-tooltip />
<el-table-column prop="goodsNum" label="产品数量" width="120" />
<el-table-column prop="refundModel" label="退款方式" width="120">
<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"> <template #default="scope">
{{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }}
{{ scope.row.refundModel === 1 ? t('common_list.refundModelPart') : t('common_list.refundModelAll') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitter" label="提交人" width="120" />
<el-table-column prop="refundReason" label="退款理由" width="120" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="status" label="订单状态" 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"> <template #default="scope">
{{ {{
[10].includes(scope.row.status) ? '待审核' :
[20, 30, 40].includes(scope.row.status) ? '审核通过' :
[12, 22, 32].includes(scope.row.status) ? '已驳回' :
[41].includes(scope.row.status) ? '退款成功' : 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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<el-table-column prop="operation" :label="t('common_list.operation')" fixed="right" width="140px">
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-button v-if="scope.row.status === 10" type="primary" text @click="showAudit2(scope.row)"> <el-button v-if="scope.row.status === 10" type="primary" text @click="showAudit2(scope.row)">
审核
{{ t('common.audit') }}
</el-button> </el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)"> <el-button v-else type="primary" text @click="showStep(scope.row)">
查看进度
{{ t('common.viewProgress') }}
</el-button> </el-button>
</div> </div>
</template> </template>
@ -103,126 +103,126 @@
style="margin-top: 1vh;"></el-pagination> style="margin-top: 1vh;"></el-pagination>
</el-card> </el-card>
<el-dialog v-model="showAudit" title="审核" 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;"> style="background-color: #F3FAFE !important;">
<div class="top"> <div class="top">
<el-button @click="" class="smallTitle" size="small">退款申请信息</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.refundApplyInfo') }}</el-button>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">退款方式</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-select v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
<el-option label="全部退款" :value="0"></el-option>
<el-option label="部分退款" :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> </el-select>
</div> </div>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">永久金币</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled />&nbsp;
<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>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">免费金币</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled />&nbsp;
<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>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">退款理由</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" <el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100"
show-word-limit type="textarea" disabled /> show-word-limit type="textarea" disabled />
</div> </div>
</div> </div>
<el-button @click="" class="smallTitle" size="small">原订单信息</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.originalOrderInfo') }}</el-button>
<div class="center"> <div class="center">
<div class="center-left"> <div class="center-left">
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">精网号</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 /> <el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">所属地区</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 /> <el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">产品名称</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 /> <el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款币种</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 /> <el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款金额</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 /> <el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款时间</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 /> <el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;">转账凭证</el-text>
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="auditRow.payVoucher" :src="auditRow.payVoucher" <img v-if="auditRow.payVoucher" :src="auditRow.payVoucher"
style="width: 80px; height: 80px; object-fit: cover;"> style="width: 80px; height: 80px; object-fit: cover;">
<div v-else> <div v-else>
无转账凭证
{{ t('common_add.noTransferVoucher') }}
</div> </div>
</div> </div>
</div> </div>
<div class="center-right"> <div class="center-right">
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">客户姓名</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 /> <el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">活动名称</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 /> <el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">支付方式</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 /> <el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账币种</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 /> <el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账金额</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 /> <el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账时间</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 /> <el-input v-model="auditRow.receivedTime" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">手续费</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 /> <el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">提交人</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 /> <el-input v-model="auditRow.submitter" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">备注</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" <el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled /> type="textarea" show-word-limit disabled />
</div> </div>
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
<el-button class="smallTitle" size="small" v-show="showReject">{{ t('common.reject') }}</el-button>
<div class="bottom-item" v-show="showReject"> <div class="bottom-item" v-show="showReject">
<el-text style="width:4vw;" size="small">驳回备注</el-text>
<el-input v-model="addForm.remark" placeholder="请输入驳回备注" 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 /> maxlength="100" type="textarea" show-word-limit clearable />
</div> </div>
<div style="text-align: center;" v-show="!showReject"> <div style="text-align: center;" v-show="!showReject">
<el-button type="default" @click="showReject = true">驳回</el-button>
<el-button type="primary" @click="handlePass">通过</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>
<div style="text-align: center;" v-show="showReject"> <div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">取消</el-button>
<el-button type="primary" @click="handleReject">确定</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>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="showSteps" 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})`, backgroundImage: `url(${RefundFinanceBackground})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
@ -233,110 +233,110 @@
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
提交人<br>{{ submitter || '未知提交人' }}
{{ t('common_list.submitter') }}<br>{{ submitter || t('common.unknownSubmitter') }}
</div> </div>
</template> </template>
<template #icon> <template #icon>
<img src="@/assets/images/refund-approved.png" alt="已完成">
<img src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
</template> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
地区财务<br>{{ areaFinance || '未记录审核人' }}
{{ t('cash.progress.areaFinance') }}<br>{{ areaFinance || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
地区负责人<br>{{ areaCharge || '未记录审核人' }}
{{ t('cash.progress.areaCharge') }}<br>{{ areaCharge || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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" <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
总部财务<br>{{ headFinance || '未记录审核人' }}
{{ t('cash.progress.headFinance') }}<br>{{ headFinance || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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" <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
指定执行人<br>{{ executor || '未记录执行人' }}
{{ t('cash.progress.executor') }}<br>{{ executor || t('common.noExecutorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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> </template>
</el-step> </el-step>
</el-steps> </el-steps>
</div> </div>
<div class="steps-btn"> <div class="steps-btn">
<el-button type="primary" @click="showSteps = false">确定</el-button>
<el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="exportListVisible" title="导出列表" 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 :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<el-table-column prop="fileName" :label="t('common_export.fileName')" />
<el-table-column prop="state" :label="t('common_export.status')">
<template #default="scope"> <template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> <el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }} {{ getTagText(scope.row.state) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createTime" :label="t('common_export.createTime')">
<template #default="scope"> <template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} {{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作">
<el-table-column :label="t('common_export.operation')">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" <el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2"> :disabled="scope.row.state !== 2">
下载
{{ t('common_export.download') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
<el-button text @click="exportListVisible = false">{{ t('common_export.close') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload' const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
@ -350,12 +350,18 @@ import moment from 'moment'
import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import RefundFinanceBackground from '@/assets/images/refund-progress.png' import RefundFinanceBackground from '@/assets/images/refund-progress.png'
import { isNumber } from 'lodash' import { isNumber } from 'lodash'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const currentStep = ref(0)// const currentStep = ref(0)//
const searchForm = ref({ const searchForm = ref({
jwcode: '', jwcode: '',
markets: [] markets: []
}) })
const isHeadquarters = computed(() => {
const m = adminData.value.markets
return m === t('common.markets.headquarters') || m === '总部' || m === 'Headquarters'
})
const dateRange = ref([]) const dateRange = ref([])
const addForm = ref({ const addForm = ref({
remark: '' remark: ''
@ -385,67 +391,6 @@ const exportListVisible = ref(false)
const exportList = ref([]) const exportList = ref([])
// //
const exportListLoading = ref(false) 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平台'
}
])
const statusStepMap = { const statusStepMap = {
10: [1, false], 10: [1, false],
12: [2, true], 12: [2, true],
@ -456,22 +401,50 @@ const statusStepMap = {
40: [7, false], 40: [7, false],
41: [8, false] 41: [8, false]
} }
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 () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_finance_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_finance_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
const statusParam = ref([10, 20, 22, 30, 32, 40, 41]) const statusParam = ref([10, 20, 22, 30, 32, 40, 41])
if (searchForm.value.statuses === '审核通过') {
if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [20, 30, 40] statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [12, 22, 32] statusParam.value = [12, 22, 32]
} else if (searchForm.value.statuses === '待审核') {
} else if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [10] statusParam.value = [10]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41] statusParam.value = [41]
} else { } else {
statusParam.value = [10, 20, 22, 30, 32, 40, 41] statusParam.value = [10, 20, 22, 30, 32, 40, 41]
@ -483,13 +456,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
} }
// 400 // 400
if (searchForm.value.jwcode.length > 8) { if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
@ -522,13 +495,13 @@ const getRefund = async function () {
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
} catch (error) { } catch (error) {
ElMessage.error(error.message || '查询失败')
ElMessage.error(error.message || t('elmessage.searchFailed'))
} }
} }
// //
const handlePass = async function () { const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
@ -544,18 +517,18 @@ const handlePass = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('审核通过')
ElMessage.success(t('elmessage.approveSuccess'))
showAudit.value = false showAudit.value = false
getRefund() getRefund()
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
} }
} }
// //
const handleReject = async function () { const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
@ -573,18 +546,16 @@ const handleReject = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('审核驳回')
ElMessage.success(t('elmessage.rejectSuccess'))
showAudit.value = false showAudit.value = false
getRefund() getRefund()
addForm.value.remark = '' addForm.value.remark = ''
showReject.value = false showReject.value = false
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '审核失败')
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 () { const getMarket = async function () {
try { try {
@ -617,7 +588,7 @@ const getMarket = async function () {
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_finance_refund_progress)) { if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_finance_refund_progress)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
@ -641,13 +612,13 @@ const showStep = function (row) {
} }
const exportExcel = async function () { const exportExcel = async function () {
const statusParam = ref([10, 20, 22, 30, 32, 40, 41]) const statusParam = ref([10, 20, 22, 30, 32, 40, 41])
if (searchForm.value.statuses === '审核通过') {
if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [20, 30, 40] statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [12, 22, 32] statusParam.value = [12, 22, 32]
} else if (searchForm.value.statuses === '待审核') {
} else if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [10] statusParam.value = [10]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41] statusParam.value = [41]
} else { } else {
statusParam.value = [10, 20, 22, 30, 32, 40, 41] statusParam.value = [10, 20, 22, 30, 32, 40, 41]
@ -659,13 +630,13 @@ const exportExcel = async function () {
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
} }
// 400 // 400
if (searchForm.value.jwcode.length > 8) { if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
@ -691,9 +662,9 @@ const exportExcel = async function () {
const res = await API({ url: '/export/exportFinance', data: params }) const res = await API({ url: '/export/exportFinance', data: params })
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('导出成功')
ElMessage.success(t('elmessage.exportSuccess'))
} else { } else {
ElMessage.error(res.msg || '导出失败')
ElMessage.error(res.msg || t('elmessage.exportFailed'))
} }
} }
const openExportList = () => { const openExportList = () => {
@ -710,11 +681,11 @@ const getExportList = async () => {
}) })
exportList.value = filteredData exportList.value = filteredData
} else { } else {
ElMessage.error(result.msg || '获取导出列表失败')
ElMessage.error(result.msg || t('elmessage.getExportListError'))
} }
} catch (error) { } catch (error) {
console.error('获取导出列表出错:', error) console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
ElMessage.error(t('elmessage.getExportListError'))
} finally { } finally {
exportListLoading.value = false exportListLoading.value = false
} }
@ -726,7 +697,7 @@ const downloadExportFile = (item) => {
link.download = item.fileName link.download = item.fileName
link.click() link.click()
} else { } else {
ElMessage.warning('文件还在导出中,请稍后再试')
ElMessage.warning(t('elmessage.exportingInProgress'))
} }
} }
// //
@ -748,15 +719,15 @@ const getTagType = (state) => {
const getTagText = (state) => { const getTagText = (state) => {
switch (state) { switch (state) {
case 0: case 0:
return '待执行';
return t('elmessage.pendingExecution');
case 1: case 1:
return '执行中';
return t('elmessage.executing');
case 2: case 2:
return '执行完成';
return t('elmessage.executed');
case 3: case 3:
return '执行出错';
return t('elmessage.errorExecution');
default: default:
return '未知状态';
return t('elmessage.unknownStatus');
} }
} }
const showAudit2 = function (row) { const showAudit2 = function (row) {

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

@ -3,96 +3,96 @@
<el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);"> <el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
<div class="condition"> <div class="condition">
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">精网号</el-text>
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">客户姓名</el-text>
<el-input v-model="searchForm.name" placeholder="请输入客户姓名" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">产品名称</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;" <el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;"
placeholder="请选择产品名称" clearable />
:placeholder="t('common.productNamePlaceholder')" clearable />
</div> </div>
<div class="item1" v-if="adminData.markets === '总部'">
<el-text size="large" style="width:4vw;">所属地区</el-text>
<el-cascader style="width: 9vw;" v-model="searchForm.markets" :options="market" placeholder="请选择所属地区"
<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" /> clearable @change="handleMarketChange" />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">订单状态</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;" placeholder="请选择订单状态" 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-option v-for="item in statusList" :label="item" :value="item" :key="item" />
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="condition"> <div class="condition">
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">付款币种</el-text>
<el-select v-model="searchForm.paymentCurrency" style="width:9vw;" placeholder="请选择付款币种" 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-option v-for="item in currencies" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">支付方式</el-text>
<el-select v-model="searchForm.payType" style="width:9vw;" placeholder="请选择支付方式" 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-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2" style="width: 28.5vw;"> <div class="item2" style="width: 28.5vw;">
<el-text size="large" style="width:4vw;">付款时间</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" 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" /> :disabled-date="disabledDate" :default-time="defaultTime" />
</div> </div>
<div> <div>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="warning" @click="exportExcel()">导出excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="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>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);"> <el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);">
<el-table :data="tableData" style="height:73vh;width:82vw"> <el-table :data="tableData" style="height:73vh;width:82vw">
<el-table-column type="index" label="序号" width="60" fixed="left">
<el-table-column type="index" :label="t('common_list.id')" width="60" fixed="left">
<template #default="scope"> <template #default="scope">
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }} {{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="Homily ID" width="120" fixed="left" /> <el-table-column prop="name" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="jwcode" label="姓名" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="marketName" label="所属地区" width="120" />
<el-table-column prop="goodsName" label="产品名称" width="130" show-overflow-tooltip />
<el-table-column prop="goodsNum" label="产品数量" width="120" />
<el-table-column prop="refundModel" label="退款方式" width="120">
<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"> <template #default="scope">
{{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }}
{{ scope.row.refundModel === 1 ? t('common_list.refundModelPart') : t('common_list.refundModelAll') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitter" label="提交人" width="120" />
<el-table-column prop="refundReason" label="退款理由" width="120" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="status" label="订单状态" 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"> <template #default="scope">
{{ {{
[30].includes(scope.row.status) ? '待审核' :
[40].includes(scope.row.status) ? '审核通过' :
scope.row.status === 32 ? '已驳回' :
scope.row.status === 41 ? '退款成功' : 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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<el-table-column prop="operation" :label="t('common_list.operation')" fixed="right" width="140px">
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-button v-if="scope.row.status === 30" type="primary" text @click="showAudit(scope.row)"> <el-button v-if="scope.row.status === 30" type="primary" text @click="showAudit(scope.row)">
审核
{{ t('common.audit') }}
</el-button> </el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)"> <el-button v-else type="primary" text @click="showStep(scope.row)">
查看进度
{{ t('common.viewProgress') }}
</el-button> </el-button>
</div> </div>
</template> </template>
@ -104,137 +104,137 @@
style="margin-top: 1vh;"></el-pagination> style="margin-top: 1vh;"></el-pagination>
</el-card> </el-card>
<el-dialog v-model="showAudit2" title="审核" 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;"> style="background-color: #F3FAFE !important;">
<div class="top"> <div class="top">
<el-button @click="" class="smallTitle" size="small">退款申请信息</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.refundApplyInfo') }}</el-button>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">退款方式</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-select v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
<el-option label="全部退款" :value="0"></el-option>
<el-option label="部分退款" :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> </el-select>
</div> </div>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">永久金币</el-text>
<el-input v-model="auditRow.gold" size="small" style="width:10vw;" disabled />&nbsp;
<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>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">免费金币</el-text>
<el-input v-model="auditRow.free" size="small" style="width:10vw;" disabled />&nbsp;
<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>
<div class="top-item"> <div class="top-item">
<el-text style="width:4vw;" size="small">退款理由</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" <el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100"
show-word-limit type="textarea" disabled /> show-word-limit type="textarea" disabled />
</div> </div>
</div> </div>
<el-button @click="" class="smallTitle" size="small">原订单信息</el-button>
<el-button @click="" class="smallTitle" size="small">{{ t('common_add.originalOrderInfo') }}</el-button>
<div class="center"> <div class="center">
<div class="center-left"> <div class="center-left">
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">精网号</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 /> <el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">产品名称</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 /> <el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">所属地区</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 /> <el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款币种</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 /> <el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款金额</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 /> <el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;" size="small">付款时间</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 /> <el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="center-item"> <div class="center-item">
<el-text style="width:4vw;">转账凭证</el-text>
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="auditRow.payVoucher" :src="auditRow.payVoucher" <img v-if="auditRow.payVoucher" :src="auditRow.payVoucher"
style="width: 80px; height: 80px; object-fit: cover;"> style="width: 80px; height: 80px; object-fit: cover;">
<div v-else> <div v-else>
无转账凭证
{{ t('common_add.noTransferVoucher') }}
</div> </div>
</div> </div>
</div> </div>
<div class="center-right"> <div class="center-right">
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">客户姓名</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 /> <el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">活动名称</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 /> <el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">支付方式</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 /> <el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账币种</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 /> <el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账金额</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 /> <el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">到账时间</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 /> <el-input v-model="auditRow.receivedTime" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">手续费</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 /> <el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">提交人</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 /> <el-input v-model="auditRow.submitter" size="small" style="width:10vw;" disabled />
</div> </div>
<div class="right-item"> <div class="right-item">
<el-text style="width:4vw;" size="small">备注</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" <el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled /> type="textarea" show-word-limit disabled />
</div> </div>
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
<el-button class="smallTitle" size="small" v-show="showReject">{{ t('common.rejectInfo') }}</el-button>
<div class="bottom-item" v-show="showReject"> <div class="bottom-item" v-show="showReject">
<el-text style="width:4vw;" size="small">驳回备注</el-text>
<el-input v-model="addForm.remark" placeholder="请输入驳回备注" 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 /> maxlength="100" type="textarea" show-word-limit clearable />
</div> </div>
<div class="bottom-item" v-show="showExecutor"> <div class="bottom-item" v-show="showExecutor">
<el-text style="width:4vw;" size="small">执行人</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-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-option v-for="item in executorList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
<div style="text-align: center;" v-show="!showReject && !showExecutor"> <div style="text-align: center;" v-show="!showReject && !showExecutor">
<el-button type="default" @click="showReject = true">驳回</el-button>
<el-button type="primary" @click="showExecutor = true">通过</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>
<div style="text-align: center;" v-show="showReject"> <div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">取消</el-button>
<el-button type="primary" @click="handleReject">确定</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>
<div style="text-align: center;" v-show="showExecutor"> <div style="text-align: center;" v-show="showExecutor">
<el-button type="default" @click="hideExecutor">取消</el-button>
<el-button type="primary" @click="handlePass">确定</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>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="showSteps" 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})`, backgroundImage: `url(${BackgroundSvg})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
@ -245,104 +245,104 @@
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
提交人<br>{{ submitter || '未知提交人' }}
{{ t('common_list.submitter') }}<br>{{ submitter || t('common.unknownSubmitter') }}
</div> </div>
</template> </template>
<template #icon> <template #icon>
<img src="@/assets/images/refund-approved.png" alt="已完成">
<img src="@/assets/images/refund-approved.png" :alt="t('common.completed')">
</template> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
地区财务<br>{{ areaFinance || '未记录审核人' }}
{{ t('cash.progress.areaFinance') }}<br>{{ areaFinance || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
地区负责人<br>{{ areaCharge || '未记录审核人' }}
{{ t('cash.progress.areaCharge') }}<br>{{ areaCharge || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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" <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
总部财务<br>{{ headFinance || '未记录审核人' }}
{{ t('cash.progress.headFinance') }}<br>{{ headFinance || t('common.noAuditorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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" <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> </template>
</el-step> </el-step>
<el-step> <el-step>
<template #title> <template #title>
<div> <div>
指定执行人<br>{{ executor || '未记录执行人' }}
{{ t('cash.progress.executor') }}<br>{{ executor || t('common.noExecutorRecorded') }}
</div> </div>
</template> </template>
<template #icon> <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> </template>
</el-step> </el-step>
</el-steps> </el-steps>
</div> </div>
<div class="steps-btn"> <div class="steps-btn">
<el-button type="primary" @click="showSteps = false">确定</el-button>
<el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="exportListVisible" title="导出列表" 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 :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<el-table-column prop="fileName" :label="t('common_export.fileName')" />
<el-table-column prop="state" :label="t('common_export.status')">
<template #default="scope"> <template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> <el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }} {{ getTagText(scope.row.state) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createTime" :label="t('common_export.createTime')">
<template #default="scope"> <template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} {{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作">
<el-table-column :label="t('common_export.operation')">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" <el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2"> :disabled="scope.row.state !== 2">
下载
{{ t('common_export.download') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
<el-button text @click="exportListVisible = false">{{ t('common_export.close') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@ -417,10 +417,42 @@ const statusStepMap = {
40: [7, false], 40: [7, false],
41: [8, 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([ const executorList = ref([
{ {
value: '305485', value: '305485',
@ -458,18 +490,18 @@ const executorList = ref([
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_headquarters_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.view_headquarters_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
const statusParam = ref([30, 32, 40, 41])// const statusParam = ref([30, 32, 40, 41])//
if (searchForm.value.statuses === '待审核') {
if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [30] statusParam.value = [30]
} else if (searchForm.value.statuses === '审核通过') {
} else if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [40] statusParam.value = [40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [32] statusParam.value = [32]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41] statusParam.value = [41]
} else { } else {
statusParam.value = [30, 32, 40, 41] statusParam.value = [30, 32, 40, 41]
@ -481,13 +513,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
} }
// 400 // 400
if (searchForm.value.jwcode.length > 8) { if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
@ -517,13 +549,13 @@ const getRefund = async function () {
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
} catch (error) { } catch (error) {
ElMessage.error(error.message || '查询失败')
ElMessage.error(error.message || t('elmessage.searchFailed'))
} }
} }
// //
const handlePass = async function () { const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
@ -545,19 +577,19 @@ const handlePass = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('审核通过')
ElMessage.success(t('elmessage.approveSuccess'))
showAudit2.value = false showAudit2.value = false
getRefund() getRefund()
hideExecutor() hideExecutor()
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
} }
} }
// //
const handleReject = async function () { const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
@ -575,14 +607,14 @@ const handleReject = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('审核驳回')
ElMessage.success(t('elmessage.rejectSuccess'))
showAudit2.value = false showAudit2.value = false
getRefund() getRefund()
addForm.value.remark = '' addForm.value.remark = ''
showReject.value = false showReject.value = false
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '审核失败')
ElMessage.error(error.message || t('elmessage.approveFailed'))
} }
} }
const getMarket = async function () { const getMarket = async function () {
@ -620,13 +652,13 @@ const hideReject = function () {
} }
const exportExcel = async function () { const exportExcel = async function () {
const statusParam = ref([30, 32, 40, 41])// const statusParam = ref([30, 32, 40, 41])//
if (searchForm.value.statuses === '待审核') {
if (searchForm.value.statuses === t('cash.statusList.pending')) {
statusParam.value = [30] statusParam.value = [30]
} else if (searchForm.value.statuses === '审核通过') {
} else if (searchForm.value.statuses === t('cash.statusList.passed')) {
statusParam.value = [40] statusParam.value = [40]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [32] statusParam.value = [32]
} else if (searchForm.value.statuses === '退款成功') {
} else if (searchForm.value.statuses === t('cash.refundSuccess')) {
statusParam.value = [41] statusParam.value = [41]
} else { } else {
statusParam.value = [30, 32, 40, 41] statusParam.value = [30, 32, 40, 41]
@ -638,13 +670,13 @@ const exportExcel = async function () {
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
} }
// 400 // 400
if (searchForm.value.jwcode.length > 8) { if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
@ -667,9 +699,9 @@ const exportExcel = async function () {
const res = await API({ url: '/export/exportFinance', data: params }) const res = await API({ url: '/export/exportFinance', data: params })
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('导出成功')
ElMessage.success(t('elmessage.exportSuccess'))
} else { } else {
ElMessage.error(res.msg || '导出失败')
ElMessage.error(res.msg || t('elmessage.exportFailed'))
} }
} }
const openExportList = () => { const openExportList = () => {
@ -686,11 +718,11 @@ const getExportList = async () => {
}) })
exportList.value = filteredData exportList.value = filteredData
} else { } else {
ElMessage.error(result.msg || '获取导出列表失败')
ElMessage.error(result.msg || t('elmessage.getExportListError'))
} }
} catch (error) { } catch (error) {
console.error('获取导出列表出错:', error) console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
ElMessage.error(t('elmessage.getExportListError'))
} finally { } finally {
exportListLoading.value = false exportListLoading.value = false
} }
@ -702,7 +734,7 @@ const downloadExportFile = (item) => {
link.download = item.fileName link.download = item.fileName
link.click() link.click()
} else { } else {
ElMessage.warning('文件还在导出中,请稍后再试')
ElMessage.warning(t('elmessage.exportingInProgress'))
} }
} }
const getTagType = (state) => { const getTagType = (state) => {
@ -723,15 +755,15 @@ const getTagType = (state) => {
const getTagText = (state) => { const getTagText = (state) => {
switch (state) { switch (state) {
case 0: case 0:
return '待执行';
return t('elmessage.pendingExecution');
case 1: case 1:
return '执行中';
return t('elmessage.executing');
case 2: case 2:
return '执行完成';
return t('elmessage.executed');
case 3: case 3:
return '执行出错';
return t('elmessage.errorExecution');
default: default:
return '未知状态';
return t('elmessage.unknownStatus');
} }
} }
const reset = function () { const reset = function () {
@ -748,7 +780,7 @@ const reset = function () {
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_headquarters_refund_progress)) { if (!hasMenuPermission(menuTree.value, permissionMapping.track_headquarters_refund_progress)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }

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

@ -3,24 +3,24 @@
<el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);"> <el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
<div class="condition"> <div class="condition">
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">精网号</el-text>
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">客户姓名</el-text>
<el-input v-model="searchForm.name" placeholder="请输入客户姓名" 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>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">产品名称</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>
<div class="item1" v-if="adminData.markets === '总部'">
<el-text size="large" style="width:4vw;">所属地区</el-text>
<el-cascader style="width: 9vw;" v-model="searchForm.market" :options="market" placeholder="请选择所属地区"
<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" /> clearable @change="handleMarketChange" />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;" multiple>订单状态</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-select v-model="searchForm.statuses" style="width:9vw;" clearable>
<el-option v-for="item in statusList" :key="item" :label="item" :value="item" /> <el-option v-for="item in statusList" :key="item" :label="item" :value="item" />
</el-select> </el-select>
@ -28,82 +28,82 @@
</div> </div>
<div class="condition"> <div class="condition">
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">付款币种</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-select v-model="searchForm.paymentCurrency" style="width:9vw;" clearable>
<el-option v-for="item in currencies" :key="item" :label="item" :value="item" /> <el-option v-for="item in currencies" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2"> <div class="item2">
<el-text size="large" style="width:4vw;">支付方式</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-select v-model="searchForm.payType" style="width:9vw;" clearable>
<el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" /> <el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="item2" style="width: 28.5vw;"> <div class="item2" style="width: 28.5vw;">
<el-text size="large" style="width:4vw;">付款时间</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" 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 /> clearable />
</div> </div>
<div> <div>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="primary" @click="getRefund">{{ t('common.search') }}</el-button>
<!-- <el-button type="warning">导出excel</el-button> <!-- <el-button type="warning">导出excel</el-button>
<el-button type="primary">查看导出列表</el-button> --> <el-button type="primary">查看导出列表</el-button> -->
<el-button type="success" @click="reset">重置</el-button>
<el-button type="success" @click="reset">{{ t('common.reset') }}</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);"> <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 :data="tableData" style="height:73vh;width:82vw;background-color: rgb(243,250,254);">
<el-table-column type="index" label="序号" width="60" fixed="left">
<el-table-column type="index" :label="t('common_list.id')" width="60" fixed="left">
<template #default="scope"> <template #default="scope">
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }} {{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" /> <el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="name" label="姓名" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="marketName" label="所属地区" width="120" />
<el-table-column prop="activity" label="活动名称" width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" label="产品名称" width="130" show-overflow-tooltip />
<el-table-column prop="goodsNum" label="产品数量" width="120" />
<el-table-column prop="paymentCurrency" label="付款币种" width="120" />
<el-table-column prop="paymentAmount" label="付款金额" width="120" />
<el-table-column prop="payType" label="支付方式" width="140" />
<el-table-column prop="payTime" label="付款时间" width="180" />
<el-table-column prop="voucher" label="转账凭证" width="110px">
<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"> <template #default="scope">
<div v-if="scope.row.voucher" <div v-if="scope.row.voucher"
style="display: flex; justify-content: center; align-items: center; cursor: pointer;" style="display: flex; justify-content: center; align-items: center; cursor: pointer;"
@click="previewImage(scope.row.voucher)"> @click="previewImage(scope.row.voucher)">
<img :src="scope.row.voucher" alt="转账凭证" style="width: auto; height: 40px;"> <img :src="scope.row.voucher" alt="转账凭证" style="width: auto; height: 40px;">
</div> </div>
<div v-else style="display: flex; justify-content: center; align-items: center; height: 40px;">无转账凭证
<div v-else style="display: flex; justify-content: center; align-items: center; height: 40px;">{{ t('common_add.noTransferVoucher') }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="status" label="订单状态" 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"> <template #default="scope">
{{ {{
[10].includes(scope.row.status) ? '已提交' :
[20, 30, 40].includes(scope.row.status) ? '进行中' :
[12, 22, 32].includes(scope.row.status) ? '已驳回' :
[11].includes(scope.row.status) ? '已撤回' :
scope.row.status === 41 ? '已退款' : 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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<el-table-column prop="operation" :label="t('common_list.operation')" fixed="right" width="140px">
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-button v-if="scope.row.status === 10" type="primary" text <el-button v-if="scope.row.status === 10" type="primary" text
@click="showBackDialog(scope.row)"> @click="showBackDialog(scope.row)">
撤回
{{ t('common.withdraw') }}
</el-button> </el-button>
<el-button v-if="scope.row.status === 11" type="primary" text <el-button v-if="scope.row.status === 11" type="primary" text
@click="showEditDialog(scope.row)"> @click="showEditDialog(scope.row)">
编辑
{{ t('common.edit') }}
</el-button> </el-button>
</div> </div>
</template> </template>
@ -115,96 +115,96 @@
style="margin-top: 1vh;"></el-pagination> style="margin-top: 1vh;"></el-pagination>
</el-card> </el-card>
<el-dialog v-model="showEdit" title="退款" 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;"> style="width: 40vw; background-color: #F3FAFE !important;">
<div style="display: flex;"> <div style="display: flex;">
<div class="left"> <div class="left">
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">精网号</el-text>
<el-text style="width:4vw;">{{ t('common_add.jwcode') }}</el-text>
<el-input v-model="editRow.jwcode" style="width:10vw;" disabled /> <el-input v-model="editRow.jwcode" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">客户姓名</el-text>
<el-text style="width:4vw;">{{ t('common_add.customerName') }}</el-text>
<el-input v-model="editRow.name" style="width:10vw;" disabled /> <el-input v-model="editRow.name" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">所属地区</el-text>
<el-text style="width:4vw;">{{ t('common_add.market') }}</el-text>
<el-input v-model="editRow.marketName" style="width:10vw;" disabled /> <el-input v-model="editRow.marketName" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">活动名称</el-text>
<el-text style="width:4vw;">{{ t('common_add.activity') }}</el-text>
<el-input v-model="editRow.activity" style="width:10vw;" disabled /> <el-input v-model="editRow.activity" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">产品名称</el-text>
<el-text style="width:4vw;">{{ t('common_add.productName') }}</el-text>
<el-input v-model="editRow.goodsName" style="width:10vw;" disabled /> <el-input v-model="editRow.goodsName" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">产品数量</el-text>
<el-text style="width:4vw;">{{ t('common_add.productNum') }}</el-text>
<el-input v-model="editRow.goodsNum" style="width:10vw;" disabled /> <el-input v-model="editRow.goodsNum" style="width:10vw;" disabled />
&nbsp;
&nbsp;{{ t('cash.unit') }}
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款币种</el-text>
<el-text style="width:4vw;">{{ t('common_add.payCurrency') }}</el-text>
<el-input v-model="editRow.paymentCurrency" style="width:10vw;" disabled /> <el-input v-model="editRow.paymentCurrency" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款金额</el-text>
<el-text style="width:4vw;">{{ t('common_add.payAmount') }}</el-text>
<el-input v-model="editRow.paymentAmount" style="width:10vw;" disabled /> <el-input v-model="editRow.paymentAmount" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">支付方式</el-text>
<el-text style="width:4vw;">{{ t('common_add.payMethod') }}</el-text>
<el-input v-model="editRow.payType" style="width:10vw;" disabled /> <el-input v-model="editRow.payType" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款时间</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 /> <el-date-picker v-model="editRow.payTime" type="datetime" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">转账凭证</el-text>
<el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
<img v-if="editRow.voucher" :src="editRow.voucher" <img v-if="editRow.voucher" :src="editRow.voucher"
style="width: 80px; height: 80px; object-fit: cover;"> style="width: 80px; height: 80px; object-fit: cover;">
<div v-else> <div v-else>
无转账凭证
{{ t('common_add.noTransferVoucher') }}
</div> </div>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">备注</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" <el-input v-model="editRow.remark" style="width:10vw;" :rows="3" type="textarea" maxLength="100"
disabled show-word-limit /> disabled show-word-limit />
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款类型</el-text>
<el-text style="width:4vw;">{{ t('common_add.refundType') }}</el-text>
<el-radio-group v-model="editForm.refundModel"> <el-radio-group v-model="editForm.refundModel">
<el-radio value="0">全部退款</el-radio>
<el-radio value="1">部分退款</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> </el-radio-group>
</div> </div>
<div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'"> <div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'">
<el-text style="width:4vw;">永久金币</el-text>
<el-input v-model="editForm.partRefundGold" style="width:5vw;" />&nbsp;&nbsp;
<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>
<div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'"> <div class="add-item" v-show="editRow.goodsName === '金币充值' && editForm.refundModel === '1'">
<el-text style="width:4vw;">免费金币</el-text>
<el-input v-model="editForm.partRefundFree" style="width:5vw;" />&nbsp;&nbsp;
<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>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款理由</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" <el-input v-model="editForm.refundReason" style="width:10vw;" :rows="5" maxlength="150"
show-word-limit type="textarea" /> show-word-limit type="textarea" />
</div> </div>
<div>ps:请在退款理由表明用户的退款需求</div>
<div>{{ t('common_add.tip') }}</div>
<div style="display:flex;justify-content: center;margin-top: 5vh;"> <div style="display:flex;justify-content: center;margin-top: 5vh;">
<el-button type="default" @click="cancelEdit">取消</el-button>
<el-button type="primary" @click="submitEdit">提交</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> </div>
</div> </div>
</el-dialog> </el-dialog>
<ConfirmDialog v-model="showBack" message="撤回该信息!" @confirm="recall" @cancel="showBack = false"
<ConfirmDialog v-model="showBack" :message="t('common.willRecallOrder')" @confirm="recall" @cancel="showBack = false"
@close="showBack = false" /> @close="showBack = false" />
<el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{ <el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{
@ -212,15 +212,15 @@
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
}"> }">
<div class="back-text">退 </div>
<div class="back-text">{{ t('elmessage.refundAmountError') }}</div>
<div class="back-btn"> <div class="back-btn">
<el-button type="default" @click="showError = false">取消</el-button>
<el-button type="primary" @click="" style="margin-left: 2vw;">确定</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> </div>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload' const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
@ -236,6 +236,13 @@ import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/ut
import RefundRecallBackground from '@/assets/images/refund-recall.png' import RefundRecallBackground from '@/assets/images/refund-recall.png'
import { isNumber } from 'lodash' import { isNumber } from 'lodash'
import { re } from 'mathjs' import { re } from 'mathjs'
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 dateRange = ref([]) const dateRange = ref([])
const searchForm = ref({ const searchForm = ref({
@ -264,24 +271,30 @@ const uploadRef = ref(null)
const showBack = ref(false) const showBack = ref(false)
const showError = ref(false) const showError = ref(false)
const isKF = adminData.value.adminName.includes('客服') const isKF = adminData.value.adminName.includes('客服')
const statusList = ref(['已提交', '已撤回', '进行中', '已退款', '已驳回'])
const statusList = computed(() => [
t('cash.statusList.submitted'),
t('cash.statusList.recalled'),
t('cash.statusList.inProgress'),
t('cash.statusList.refunded'),
t('cash.statusList.rejected')
])
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_customer_service_refund_pending)) { if (!hasMenuPermission(menuTree.value, permissionMapping.view_customer_service_refund_pending)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
const statusParam = ref([]) const statusParam = ref([])
if (searchForm.value.statuses === '已提交') {
if (searchForm.value.statuses === t('cash.statusList.submitted')) {
statusParam.value = [10] statusParam.value = [10]
} else if (searchForm.value.statuses === '已撤回') {
} else if (searchForm.value.statuses === t('cash.statusList.recalled')) {
statusParam.value = [11] statusParam.value = [11]
} else if (searchForm.value.statuses === '进行中') {
} else if (searchForm.value.statuses === t('cash.statusList.inProgress')) {
statusParam.value = [20, 30, 40] statusParam.value = [20, 30, 40]
} else if (searchForm.value.statuses === '已退款') {
} else if (searchForm.value.statuses === t('cash.statusList.refunded')) {
statusParam.value = [41] statusParam.value = [41]
} else if (searchForm.value.statuses === '已驳回') {
} else if (searchForm.value.statuses === t('cash.statusList.rejected')) {
statusParam.value = [12, 22, 32] statusParam.value = [12, 22, 32]
} }
@ -291,13 +304,13 @@ const getRefund = async function () {
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
} }
// 400 // 400
if (searchForm.value.jwcode.length > 8) { if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
@ -330,13 +343,13 @@ const getRefund = async function () {
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
} catch (error) { } catch (error) {
ElMessage.error(error.message || '查询失败')
ElMessage.error(error.message || t('elmessage.searchFailed'))
} }
} }
// //
const recall = async function () { const recall = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.withdraw_customer_service_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.withdraw_customer_service_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
@ -351,42 +364,42 @@ const recall = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success(result.msg || '撤回成功')
ElMessage.success(result.msg || t('elmessage.withdrawSuccess'))
showBack.value = false showBack.value = false
getRefund() getRefund()
} else { } else {
ElMessage.error(result.msg || '撤回失败')
ElMessage.error(result.msg || t('elmessage.operationFailed'))
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '撤回失败')
ElMessage.error(error.message || t('elmessage.operationFailed'))
} }
} }
// //
const submitEdit = async function () { const submitEdit = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.edit_customer_service_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.edit_customer_service_refund)) {
ElMessage.error('无此权限')
ElMessage.error(t('elmessage.noPermission'))
return return
} }
try { try {
console.log(editRow.value) console.log(editRow.value)
if(!editForm.value.refundModel) { if(!editForm.value.refundModel) {
ElMessage.error('请选择退款方式')
ElMessage.error(t('elmessage.selectRefundModel'))
return return
}else if(!editForm.value.refundReason) { }else if(!editForm.value.refundReason) {
ElMessage.error('请输入退款理由')
ElMessage.error(t('elmessage.refundReasonPlaceholder'))
return return
}else if(editForm.value.refundModel == 1 && (!editForm.value.partRefundGold || !editForm.value.partRefundFree)) { }else if(editForm.value.refundModel == 1 && (!editForm.value.partRefundGold || !editForm.value.partRefundFree)) {
ElMessage.error('请输入退款金币数和免费金币数')
ElMessage.error(t('elmessage.inputRefundBeansBoth'))
return return
}else if (editForm.value.refundModel == 1 && (editForm.value.partRefundGold || editForm.value.partRefundFree)) { }else if (editForm.value.refundModel == 1 && (editForm.value.partRefundGold || editForm.value.partRefundFree)) {
const isPositiveInteger = /^[1-9]\d*$/.test(editForm.value.partRefundGold) const isPositiveInteger = /^[1-9]\d*$/.test(editForm.value.partRefundGold)
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的永久金币数')
ElMessage.error(t('elmessage.checkPermanentFormat'))
return return
} }
const isPositiveInteger1 = /^[1-9]\d*$/.test(editForm.value.partRefundFree) const isPositiveInteger1 = /^[1-9]\d*$/.test(editForm.value.partRefundFree)
if (!isPositiveInteger1) { if (!isPositiveInteger1) {
ElMessage.error('请输入正确的免费金币数')
ElMessage.error(t('elmessage.checkFreeFormat'))
return return
} }
} }
@ -410,11 +423,11 @@ const submitEdit = async function () {
} }
if (editRow.value.goodsName == '金币充值') { if (editRow.value.goodsName == '金币充值') {
if (editForm.value.partRefundGold > editRow.value.gold) { if (editForm.value.partRefundGold > editRow.value.gold) {
ElMessage.error('退款金币数不能大于原金币数')
ElMessage.error(t('elmessage.limitRefundGoldNotExceedOriginal'))
return return
} }
if (editForm.value.partRefundFree > editRow.value.free) { if (editForm.value.partRefundFree > editRow.value.free) {
ElMessage.error('退款免费金币数不能大于原免费金币数')
ElMessage.error(t('elmessage.limitRefundFreeNotExceedOriginal'))
return return
} }
} }
@ -423,14 +436,14 @@ const submitEdit = async function () {
data: params data: params
}) })
if (result.code === 200) { if (result.code === 200) {
ElMessage.success(result.msg || '编辑成功')
ElMessage.success(result.msg || t('elmessage.editSuccess'))
showEdit.value = false showEdit.value = false
getRefund() getRefund()
} else { } else {
ElMessage.error(result.msg || '编辑失败')
ElMessage.error(result.msg || t('elmessage.editFailed'))
} }
} catch (error) { } catch (error) {
ElMessage.error(error.message || '编辑失败')
ElMessage.error(error.message || t('elmessage.editFailed'))
} }
} }
const getMarket = async function () { const getMarket = async function () {
@ -500,8 +513,29 @@ const cancelEdit = function () {
} }
showEdit.value = false showEdit.value = false
} }
const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
const currencies = computed(() => [
t('cash.currency.usd'),
t('cash.currency.hkd'),
t('cash.currency.sgd'),
t('cash.currency.myr'),
t('cash.currency.thb'),
t('cash.currency.cad'),
t('cash.currency.vnd'),
t('cash.currency.krw')
])
const channelOptions = computed(() => [
t('cash.payMethods.stripe'),
t('cash.payMethods.paymentAsia'),
t('cash.payMethods.ipay88'),
t('cash.payMethods.bankTransfer'),
t('cash.payMethods.card'),
t('cash.payMethods.cash'),
t('cash.payMethods.check'),
t('cash.payMethods.grabpay'),
t('cash.payMethods.nets'),
t('cash.payMethods.transfer'),
t('cash.payMethods.paypal')
])
const reset = function () { const reset = function () {
searchForm.value = { searchForm.value = {

Loading…
Cancel
Save