diff --git a/src/router/index.js b/src/router/index.js
index 8fdbb28..edd59b0 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -31,7 +31,7 @@ const routes = [
{
path: '/goldManage',
name: 'goldManage',
- meta:{permissionId:3},
+ meta: { permissionId: 3 },
children: [
// 审核
{
@@ -46,14 +46,14 @@ const routes = [
path: 'rechargeAudit',
name: "rechargeAudit",
component: () => import("../views/audit/gold/rechargeAudit.vue"),
- meta: { permissionId: [28,30,31,32,33,34,35] } // 对应"查看充值审核"id=11、"充值审批"id=12
+ meta: { permissionId: [28, 30, 31, 32, 33, 34, 35] } // 对应"查看充值审核"id=11、"充值审批"id=12
},
// 退款审核
{
path: 'refundAudit',
name: "refundAudit",
component: () => import("../views/audit/gold/refundAudit.vue"),
- meta: { permissionId: [29,36,37,38,39,40,41] } // 对应"查看退款审核"id=13、"退款审批"id=14
+ meta: { permissionId: [29, 36, 37, 38, 39, 40, 41] } // 对应"查看退款审核"id=13、"退款审批"id=14
},
]
}, {
@@ -61,13 +61,13 @@ const routes = [
name: "beanAudit",
component: () => import("../views/audit/bean/beanAudit.vue"),
meta: { permissionId: 15 },
- children: [
+ children: [
// 充值审核
{
path: 'addbeanAudit',
name: "addbeanAudit",
component: () => import("../views/audit/bean/beanAudit.vue"),
- meta: { permissionId: [42,43,44,45,46,47] } // 对应"查看充值审核"id=11、"充值审批"id=12
+ meta: { permissionId: [42, 43, 44, 45, 46, 47] } // 对应"查看充值审核"id=11、"充值审批"id=12
},
]
},
@@ -141,14 +141,14 @@ const routes = [
path: '/rate',
name: "rate",
component: () => import("../views/managerecharge/rate.vue"),
- meta: { permissionId: [16,48,49] } // 对应"汇率查看"id=15、"汇率修改"id=16
+ meta: { permissionId: [16, 48, 49] } // 对应"汇率查看"id=15、"汇率修改"id=16
},
// 金币充值
{
path: '/coinRecharge',
name: "coinRecharge",
component: () => import("../views/recharge/gold/coinRecharge.vue"),
- meta: { permissionId: 17 },
+ meta: { permissionId: 17 },
// redirect: '/coinRecharge/add',
children: [
// 金币新增充值
@@ -174,7 +174,7 @@ const routes = [
name: "beanRecharge",
component: () => import("../views/recharge/bean/beanRecharge.vue"),
// redirect: '/coinRecharge/add',
- meta: { permissionId: 18 },
+ meta: { permissionId: 18 },
children: [
// 金豆新增充值
{
@@ -200,7 +200,7 @@ const routes = [
]
},
- // 金币退款
+ // 金币退款
{
path: '/coinRefund',
name: "coinRefund",
@@ -300,10 +300,10 @@ const routes = [
]
},
{
- path:'/moneyManage',
- name:'moneyManage',
- meta:{permissionId:4},
- children:[
+ path: '/moneyManage',
+ name: 'moneyManage',
+ meta: { permissionId: 4 },
+ children: [
// 收款明细
{
path: 'receiveDetail',
@@ -338,29 +338,36 @@ const routes = [
{
path: 'refundDetail',
name: "refundDetail",
- //component: () => import("../views/moneyManage/refundDetail/refundDetail.vue"),
+ component: () => import("../views/moneyManage/refundDetail/refundDetail.vue"),
meta: { permissionId: 75 },
- children:[
+ children: [
// 客服页面
{
- path: 'service',
+ path: 'refundService',
name: "refundService",
component: () => import("../views/moneyManage/refundDetail/refundService.vue"),
- meta: { permissionId: 75 }
+ meta: { permissionId: 80 }
},
- // 地区财务及地区负责人页面
+ // 地区财务页面
+ {
+ path: 'refundFinance',
+ name: "refundFinance",
+ component: () => import("../views/moneyManage/refundDetail/refundFinance.vue"),
+ meta: { permissionId: 81 }
+ },
+ // 地区负责人页面
{
- path: 'refundArea',
- name: "refundArea",
- component: () => import("../views/moneyManage/refundDetail/refundArea.vue"),
- meta: { permissionId: 75 }
+ path: 'refundCharge',
+ name: "refundCharge",
+ component: () => import("../views/moneyManage/refundDetail/refundCharge.vue"),
+ meta: { permissionId: 82 }
},
//总部管理员及财务
{
path: 'refundHeader',
name: "refundHeader",
component: () => import("../views/moneyManage/refundDetail/refundHeader.vue"),
- meta: { permissionId: 75 }
+ meta: { permissionId: 83 }
},
]
},
@@ -452,7 +459,7 @@ router.beforeEach(async (to, from, next) => {
// 拿权限id
userPermissionIds = getAllPermissionIds(menuTree.value)
- console.log("userPermissionIds",userPermissionIds)
+ console.log("userPermissionIds", userPermissionIds)
// 2.4 权限验证(逻辑不变)
console.log('to.meta:', to.meta)
diff --git a/src/utils/menuTreePermission.js b/src/utils/menuTreePermission.js
index ed0b860..4c48619 100644
--- a/src/utils/menuTreePermission.js
+++ b/src/utils/menuTreePermission.js
@@ -40,7 +40,7 @@ export const permissionMapping = {
receiveService:77, // 收款-地区客服
receiveArea:78, // 收款-地区财务/负责人
receiveHeader:79, // 收款-总部财务/管理员
- refundService:80, // 退款-地区客服
+ refundService:80, // 退款-地区客服
refundFinance:81, // 退款-地区财务
refundCharge:82, // 退款-地区负责人
refundHeader:83, // 退款-总部财务/管理员
@@ -135,7 +135,7 @@ export const permissionMapping = {
refundHeaderProgShow:113, // 退款-总部财务/管理员进度查看
// 特殊,5级
- updateData:114, // 手动拉取数据
+ updateData:115, // 手动拉取数据
}
// 递归查找菜单中是否存在目标id
diff --git a/src/views/moneyManage/executor/executor.vue b/src/views/moneyManage/executor/executor.vue
index 37bf450..7d3d43e 100644
--- a/src/views/moneyManage/executor/executor.vue
+++ b/src/views/moneyManage/executor/executor.vue
@@ -1,23 +1,23 @@
-
+
姓名
-
+
-
+
精网号
-
+
所属地区
-
+
-
+
产品名称
-
+
-
+
退款币种
@@ -25,68 +25,71 @@
-
+
退款途径
-
-
+
-
+
订单状态
-
+
+
+
-
-
付款时间
+
+ 退款时间
- 重置
- 查询
+ 查询
+ 重置
导出excel
查看导出列表
-
- 新增
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ scope.row.refundType === 1 ? '部分退款' : '全部退款' }}
+
+
+
+
+
+
+
+
+ 无退款截图
+
+
+
+
+
+ {{ scope.row.status === 41 ? '已完成' : '待处理' }}
+
+
+
-
-
-
- 通过
-
-
-
- 取消
-
- 确认
-
-
-
-
- 驳回
+
+ 提交
+
+
+ 编辑
@@ -102,79 +105,66 @@
精网号
-
+
客户姓名
-
+
所属地区
-
+
产品名称
-
+
退款类型
-
-
-
+
+ {{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }}
+
付款币种
-
-
-
+
付款金额
-
+
支付方式
-
-
-
+
付款时间
-
+
提交人
-
+
转账凭证
-
-
-
-
-
-
-
-
-
-
+
![]()
+
+ 无转账凭证
+
备注
-
+
退款币种
-
+
@@ -183,38 +173,65 @@
退款途径
-
-
+
+
退款时间
-
+
+
+
+
支付凭证
+
+
+
+
+
+
+
+
备注
-
- 取消
- 提交
+ 取消
+ 提交
\ No newline at end of file
diff --git a/src/views/moneyManage/refundDetail/refundHeader.vue b/src/views/moneyManage/refundDetail/refundHeader.vue
index 35aadba..5fd897b 100644
--- a/src/views/moneyManage/refundDetail/refundHeader.vue
+++ b/src/views/moneyManage/refundDetail/refundHeader.vue
@@ -1,5 +1,4 @@
-
-
+
@@ -13,7 +12,7 @@
所属地区
-
+
产品名称
@@ -21,7 +20,7 @@
订单状态
-
+
@@ -42,62 +41,47 @@
:disabled-date="disabledDate" />
- 重置
- 查询
+ 查询
+ 重置
导出excel
查看导出列表
-
- 地区客服编辑
- 审核1
- 审核2
- 看看步骤条
- 看看撤回
- 退款金额有误
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ scope.row.refundType === 1 ? '部分退款' : '全部退款' }}
+
+
+
+
-
-
+
+
+ {{
+ [30, 40].includes(scope.row.status) ? '审核中' :
+ scope.row.status === 32 ? '审核驳回' :
+ scope.row.status === 41 ? '退款完成' : scope.row.status
+ }}
+
+
+
-
-
-
- 通过
-
-
-
- 取消
-
- 确认
-
-
-
-
- 驳回
+
+ 审核
+
+
+ 查看进度
@@ -109,72 +93,22 @@
style="margin-top: 1vh;">
-
-
-
- 精网号
-
-
-
- 姓名
-
-
-
- 所属地区
-
-
-
- 活动名称
-
-
-
- 商品名称
-
-
-
- 付款币种
-
-
-
- 付款金额
-
-
-
- 支付方式
-
-
-
- 付款时间
-
-
-
- 银行流水订单号
-
-
-
-
-
- 驳回
- 通过
-
-
-
-
+
退款申请信息
退款类型
-
退款金额
-
退款备注
-
@@ -183,121 +117,101 @@
精网号
-
+
所属地区
-
+
产品名称
-
+
付款金额
-
+
到账金额
-
+
支付方式
-
-
-
- 付款金额
-
-
-
- 银行流水订单号
-
-
-
- 审核人
-
+
-
转账凭证
-
-
-
-
-
-
-
-
-
-
+
转账凭证
+
![]()
+
+ 无转账凭证
+
客户姓名
-
+
活动名称
-
+
付款币种
-
+
到账币种
-
+
手续费
-
+
付款时间
-
+
提交人
-
+
到账时间
-
+
备注
-
+
-
转交信息
-
+
驳回信息
+
+ 驳回备注
+
+
+
执行人
-
-
+
+
+
+ 驳回
+ 通过
+
+
+ 取消
+ 确定
+
+
+ 取消
+ 确定
+
@@ -365,80 +279,27 @@ const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
-//客服
-const isKF = ref(adminData.value.adminName.includes('客服'))
-// 地区
-const isDQ = ref(adminData.value.adminName.includes('财务') || adminData.value.adminName.includes('经理') && !adminData.value.adminName.includes('总部'))
-// 总部
-const isZB = ref(adminData.value.adminName.includes('总部') || adminData.value.adminName.includes('管理员'))
const searchForm = ref({
- jwcode: ''
+ jwcode: '',
+ markets: [],
+ statuses: []
})
const addForm = ref({
- jwcode: ''
-})
-const auditForm = ref({
- refundType: ''
+ remark: ''
})
+const showReject = ref(false)
+const showExecutor = ref(false)
+const auditRow = ref({})// 审核回显
+const dateRange = ref([])
const pagination = ref({
pageNum: 1,
pageSize: 50,
total: 0
})
-const tableData = ref([])
-const showAdd = ref(false)
-const showAudit1 = ref(false)
const showAudit2 = ref(false)
+const tableData = ref([])
const showSteps = ref(false)
const uploadRef = ref(null)
-const showBack = ref(false)
-const showError = ref(false)
-const executor = ref([
- {
- value: '305485',
- label: '新:Zoe'
- },
- {
- value: '200723',
- label: '马:Jennifer'
- },
- {
- value: '301388',
- label: '港:林育平'
- },
- {
- value: '839448',
- label: '加:Mandy'
- },
- {
- value: '304904',
- label: '泰:杨丽娇'
- },
- {
- value: '315915',
- label: '越:范秋霞'
- }
-])
-const products = ref([
- {
- value: '1',
- label: '产品1'
- },
- {
- value: '2',
- label: '产品2'
- }
-])
-const currencies = ref([
- {
- value: 'CNY',
- label: '人民币'
- },
- {
- value: 'USD',
- label: '美元'
- }
-])
const payments = ref([{
value: '银行转账',
label: '银行转账'
@@ -501,130 +362,162 @@ const payments = ref([{
}
])
const statusList = ref([
+ { value: 30, label: '待审核' },
+ { value: 40, label: '审核通过' },
+ { value: 32, label: '审核驳回' },
+ { value: 41, label: '退款完成' }
+])
+const executorList = ref([
{
- value: '10',
- label: '地区财务待审核'
+ value: '305485',
+ label: '新:Zoe'
},
{
- value: '12',
- label: '地区财务驳回'
+ value: '200723',
+ label: '马:Jennifer'
},
{
- value: '20',
- label: '地区负责人待审核'
+ value: '301388',
+ label: '港:林育平'
},
{
- value: '22',
- label: '地区负责人驳回'
+ value: '839448',
+ label: '加:Mandy'
},
{
- value: '30',
- label: '总部财务待审核'
+ value: '304904',
+ label: '泰:杨丽娇'
},
{
- value: '32',
- label: '总部财务驳回'
+ value: '315915',
+ label: '越:范秋霞'
},
{
- value: '40',
- label: '执行人待处理'
+ value: '90047681',
+ label: '李慧琳演示机'
},
{
- value: '41',
- label: '退款完成'
+ value: '90047947',
+ label: '宋彤彤'
}
])
// 查全部
const getRefund = async function () {
+ if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderShow)) {
+ ElMessage.error('无此权限')
+ return
+ }
try {
+ searchForm.value.statuses = [30, 32, 40, 41] // 默认:看不到进度没到这里的
+
const params = {
- cashCollection: {
- status: null,
- //10:地区财务待审核;12:地区财务驳回;
+ pageNum: pagination.value.pageNum,
+ pageSize: pagination.value.pageSize,
+ cashRecordDone: {
+ jwcode: searchForm.value.jwcode,
+ name: searchForm.value.name,
+ markets: searchForm.value.markets,
+ goodsName: searchForm.value.goodsName,
+ statuses: searchForm.value.statuses,//10:地区财务待审核;12:地区财务驳回;
// 20:地区负责人待审核;22:地区负责人驳回;
// 30:总部财务待审核;32:总部财务驳回;
// 40:执行人待处理;41:执行人已处理,退款完成;
- orderCode: null,//订单号
- name: null,//姓名
- jwcode: null,//精网号
- market: null,//地区
- goodsName: null,//商品名
- refundModel: null,//退款类型,
- startTime: "",
- endTime: ""
+ paymentCurrency: searchForm.value.paymentCurrency,
+ payType: searchForm.value.payType,
+ startTime: dateRange.value && dateRange.value[0] ? moment(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
+ endtime: dateRange.value && dateRange.value[1] ? moment(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
+ adminId: adminData.value.id
}
}
const result = await API({
- url: '/hljw/api/refund/query',
+ url: '/Money/select',
method: 'POST',
data: params
})
- tableData.value = result.data || []
+ tableData.value = result.data.list || []
} catch (error) {
ElMessage.error(error.message || '查询失败')
}
}
-const handleImageChange = (file) => {
- uploadRef.value.submit()
-}
-const beforeUpload = (file) => {
- const isJPG = file.type === 'image/jpeg'
- const isPNG = file.type === 'image/png'
- const isLt1 = file.size / 1024 < 1024
-
- if (!isJPG && !isPNG) {
- ElMessage.error('上传图片只能是 JPG 或 PNG 格式')
- return false
- }
- if (!isLt1) {
- ElMessage.error('上传图片大小不能超过1MB')
- return false
+// 审核通过
+const handlePass = async function () {
+ if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) {
+ ElMessage.error('无此权限')
+ return
}
- return true
-}
-const handleUploadSuccess = (response, file, fileList) => {
try {
- addForm.value.imageUrl = response.data.url
- console.log('==========================', response.data.url)
+ const params = {
+ id: auditRow.value.id,
+ executor: addForm.value.executor,
+ status: 40,
+ adminId: adminData.value.id
+ }
+ const result = await API({
+ url: '/Money/review',
+ data: params
+ })
+ if (result.code === 200) {
+ ElMessage.success('审核通过')
+ showAudit2.value = false
+ getRefund()
+ }
} catch (error) {
- console.log('看看报错信息', error)
- ElMessage.error(response.data.msg || '图片上传失败')
+ ElMessage.error(error.message || '审核失败')
}
}
-const handleUploadError = (error) => {
- console.error('上传失败:', error)
- addForm.value.imageUrl = null
- ElMessage.error('图片上传失败,请重试')
-}
-const customUpload = async (options) => {
+// 审核驳回
+const handleReject = async function () {
+ if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) {
+ ElMessage.error('无此权限')
+ return
+ }
try {
- const formData = new FormData()
- formData.append('file', options.file)
-
- const response = await API({
- url: uploadUrl,
- method: 'POST',
- data: formData,
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
+ const params = {
+ id: auditRow.value.id,
+ status: 32,
+ rejectReason: addForm.value.remark,
+ adminId: adminData.value.id
+ }
+ const result = await API({
+ url: '/Money/review',
+ data: params
})
- if (response.code === 200 && response.data) {
- handleUploadSuccess(response, options.file, [options.file])
- ElMessage.success(response.msg || '上传成功')
- } else {
- ElMessage.error(response.msg || '上传失败')
+ if (result.code === 200) {
+ ElMessage.success('审核驳回')
+ showAudit2.value = false
+ getRefund()
}
} catch (error) {
- console.error('上传错误:', error)
- ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
+ ElMessage.error(error.message || '审核失败')
}
}
-
+const hideReject = function () {
+ showReject.value = false
+ addForm.value.remark = ''
+}
+const reset = function () {
+ searchForm.value = {
+ jwcode: ''
+ }
+ dateRange.value = []
+ getRefund()
+}
+const showStep = function (row) {
+ if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderProgShow)) {
+ ElMessage.error('无此权限')
+ return
+ }
+ showSteps.value = true
+}
+const showAudit = function (row) {
+ auditRow.value = row
+ showAudit2.value = true
+}
onMounted(() => {
console.log('???????????????????', adminData.value)
+ getRefund()
})