Browse Source

合并

zhangyong/milestone-20250913-现金管理
lihuilin 1 month ago
parent
commit
1408c4202d
  1. 2
      .env.development
  2. 6
      src/components/workspace/CashManagement.vue
  3. 55
      src/router/index.js
  4. 4
      src/utils/menuTreePermission.js
  5. 416
      src/views/moneyManage/executor/executor.vue
  6. 467
      src/views/moneyManage/refundDetail/refundCharge.vue
  7. 28
      src/views/moneyManage/refundDetail/refundDetail.vue
  8. 710
      src/views/moneyManage/refundDetail/refundFinance.vue
  9. 502
      src/views/moneyManage/refundDetail/refundHeader.vue
  10. 471
      src/views/moneyManage/refundDetail/refundService.vue

2
.env.development

@ -3,7 +3,7 @@ VITE_API_BASE='https://hwjb.homilychart.com/dev/admin'
# VITE_API_BASE='http://54.255.212.181:10704/' # VITE_API_BASE='http://54.255.212.181:10704/'
# 正式环境 # 正式环境
# VITE_API_BASE='http://54.255.212.181:10705/' # VITE_API_BASE='http://54.255.212.181:10705/'
VITE_UPLOAD_URL=http://39.101.133.168:8828/hljw/api/aws/upload
# VITE_UPLOAD_URL=http://39.101.133.168:8828/hljw/api/aws/upload
# VITE_API_BASE='http://192.168.9.28:8081/' # VITE_API_BASE='http://192.168.9.28:8081/'
# sunjiabei # sunjiabei
# VITE_API_BASE='http://192.168.9.28:8081/' # VITE_API_BASE='http://192.168.9.28:8081/'

6
src/components/workspace/CashManagement.vue

@ -37,9 +37,15 @@
<div class="chart-container"> <div class="chart-container">
<!-- 左侧数据列表 --> <!-- 左侧数据列表 -->
<div class="market-data"> <div class="market-data">
<<<<<<< HEAD
<div v-if="marksFlag" v-for="market in cashData.markets" :key="market.name" class="market-item"> <div v-if="marksFlag" v-for="market in cashData.markets" :key="market.name" class="market-item">
<span class="market-name">{{ market.name }}</span> <span class="market-name">{{ market.name }}</span>
<span class="market-value">{{ market.value.toLocaleString() }} 新币</span> <span class="market-value">{{ market.value.toLocaleString() }} 新币</span>
=======
<div v-for="market in cashData.markets" :key="market.name" class="market-item">
<span class="market-name">{{ market.name }}:</span>
<span class="market-value">{{ market.value.toLocaleString() }}</span>
>>>>>>> lihuilin/feature-20250923114949-现金
</div> </div>
<div v-else> <div v-else>
<div v-for="item in cashData.markets" :key="item.name" class="market-item"> <div v-for="item in cashData.markets" :key="item.name" class="market-item">

55
src/router/index.js

@ -31,7 +31,7 @@ const routes = [
{ {
path: '/goldManage', path: '/goldManage',
name: 'goldManage', name: 'goldManage',
meta:{permissionId:3},
meta: { permissionId: 3 },
children: [ children: [
// 审核 // 审核
{ {
@ -46,14 +46,14 @@ const routes = [
path: 'rechargeAudit', path: 'rechargeAudit',
name: "rechargeAudit", name: "rechargeAudit",
component: () => import("../views/audit/gold/rechargeAudit.vue"), 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', path: 'refundAudit',
name: "refundAudit", name: "refundAudit",
component: () => import("../views/audit/gold/refundAudit.vue"), 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", name: "beanAudit",
component: () => import("../views/audit/bean/beanAudit.vue"), component: () => import("../views/audit/bean/beanAudit.vue"),
meta: { permissionId: 15 }, meta: { permissionId: 15 },
children: [
children: [
// 充值审核 // 充值审核
{ {
path: 'addbeanAudit', path: 'addbeanAudit',
name: "addbeanAudit", name: "addbeanAudit",
component: () => import("../views/audit/bean/beanAudit.vue"), 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', path: '/rate',
name: "rate", name: "rate",
component: () => import("../views/managerecharge/rate.vue"), 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', path: '/coinRecharge',
name: "coinRecharge", name: "coinRecharge",
component: () => import("../views/recharge/gold/coinRecharge.vue"), component: () => import("../views/recharge/gold/coinRecharge.vue"),
meta: { permissionId: 17 },
meta: { permissionId: 17 },
// redirect: '/coinRecharge/add', // redirect: '/coinRecharge/add',
children: [ children: [
// 金币新增充值 // 金币新增充值
@ -174,7 +174,7 @@ const routes = [
name: "beanRecharge", name: "beanRecharge",
component: () => import("../views/recharge/bean/beanRecharge.vue"), component: () => import("../views/recharge/bean/beanRecharge.vue"),
// redirect: '/coinRecharge/add', // redirect: '/coinRecharge/add',
meta: { permissionId: 18 },
meta: { permissionId: 18 },
children: [ children: [
// 金豆新增充值 // 金豆新增充值
{ {
@ -200,7 +200,7 @@ const routes = [
] ]
}, },
// 金币退款
// 金币退款
{ {
path: '/coinRefund', path: '/coinRefund',
name: "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', path: 'receiveDetail',
@ -338,29 +338,36 @@ const routes = [
{ {
path: 'refundDetail', path: 'refundDetail',
name: "refundDetail", name: "refundDetail",
//component: () => import("../views/moneyManage/refundDetail/refundDetail.vue"),
component: () => import("../views/moneyManage/refundDetail/refundDetail.vue"),
meta: { permissionId: 75 }, meta: { permissionId: 75 },
children:[
children: [
// 客服页面 // 客服页面
{ {
path: 'service',
path: 'refundService',
name: "refundService", name: "refundService",
component: () => import("../views/moneyManage/refundDetail/refundService.vue"), 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', path: 'refundHeader',
name: "refundHeader", name: "refundHeader",
component: () => import("../views/moneyManage/refundDetail/refundHeader.vue"), component: () => import("../views/moneyManage/refundDetail/refundHeader.vue"),
meta: { permissionId: 75 }
meta: { permissionId: 83 }
}, },
] ]
}, },
@ -452,7 +459,7 @@ router.beforeEach(async (to, from, next) => {
// 拿权限id // 拿权限id
userPermissionIds = getAllPermissionIds(menuTree.value) userPermissionIds = getAllPermissionIds(menuTree.value)
console.log("userPermissionIds",userPermissionIds)
console.log("userPermissionIds", userPermissionIds)
// 2.4 权限验证(逻辑不变) // 2.4 权限验证(逻辑不变)
console.log('to.meta:', to.meta) console.log('to.meta:', to.meta)

4
src/utils/menuTreePermission.js

@ -40,7 +40,7 @@ export const permissionMapping = {
receiveService:77, // 收款-地区客服 receiveService:77, // 收款-地区客服
receiveArea:78, // 收款-地区财务/负责人 receiveArea:78, // 收款-地区财务/负责人
receiveHeader:79, // 收款-总部财务/管理员 receiveHeader:79, // 收款-总部财务/管理员
refundService:80, // 退款-地区客服
refundService:80, // 退款-地区客服
refundFinance:81, // 退款-地区财务 refundFinance:81, // 退款-地区财务
refundCharge:82, // 退款-地区负责人 refundCharge:82, // 退款-地区负责人
refundHeader:83, // 退款-总部财务/管理员 refundHeader:83, // 退款-总部财务/管理员
@ -135,7 +135,7 @@ export const permissionMapping = {
refundHeaderProgShow:113, // 退款-总部财务/管理员进度查看 refundHeaderProgShow:113, // 退款-总部财务/管理员进度查看
// 特殊,5级 // 特殊,5级
updateData:114, // 手动拉取数据
updateData:115, // 手动拉取数据
} }
// 递归查找菜单中是否存在目标id // 递归查找菜单中是否存在目标id

416
src/views/moneyManage/executor/executor.vue

@ -1,23 +1,23 @@
<template> <template>
<el-card style="margin-bottom: 0.5vh;"> <el-card style="margin-bottom: 0.5vh;">
<div class="condition1"> <div class="condition1">
<div class="condition-item">
<div class="search">
<el-text size="large" style="width:4vw;">姓名</el-text> <el-text size="large" style="width:4vw;">姓名</el-text>
<el-input v-model="searchForm.username" placeholder="请输入姓名" style="width:9vw;" clearable />
<el-input v-model="searchForm.name" placeholder="请输入姓名" style="width:9vw;" clearable />
</div> </div>
<div class="condition-item">
<div class="search">
<el-text size="large" style="width:4vw;">精网号</el-text> <el-text size="large" style="width:4vw;">精网号</el-text>
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width:9vw;" clearable /> <el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width:9vw;" clearable />
</div> </div>
<div class="condition-item">
<div class="search">
<el-text size="large" style="width:4vw;">所属地区</el-text> <el-text size="large" style="width:4vw;">所属地区</el-text>
<el-input v-model="searchForm.area" placeholder="请输入所属地区" style="width:9vw;" clearable />
<el-input v-model="searchForm.marketName" placeholder="请输入所属地区" style="width:9vw;" clearable />
</div> </div>
<div class="condition-item">
<div class="search">
<el-text size="large" style="width:4vw;">产品名称</el-text> <el-text size="large" style="width:4vw;">产品名称</el-text>
<el-input v-model="searchForm.productName" placeholder="请输入产品名称" style="width:9vw;" clearable />
<el-input v-model="searchForm.goodsName" placeholder="请输入产品名称" style="width:9vw;" clearable />
</div> </div>
<div class="condition-item">
<div class="search">
<el-text size="large" style="width:4vw;">退款币种</el-text> <el-text size="large" style="width:4vw;">退款币种</el-text>
<el-select v-model="searchForm.payType" style="width:9vw;"> <el-select v-model="searchForm.payType" style="width:9vw;">
<el-option v-for="item in payments" :key="item" :label="item" :value="item" /> <el-option v-for="item in payments" :key="item" :label="item" :value="item" />
@ -25,68 +25,71 @@
</div> </div>
</div> </div>
<div class="condition1"> <div class="condition1">
<div class="condition-item2">
<div class="search2">
<el-text size="large" style="width:4vw;">退款途径</el-text> <el-text size="large" style="width:4vw;">退款途径</el-text>
<el-select v-model="searchForm.auditStatus" style="width:9vw;">
<el-option v-for="item in auditStatusOptions" :key="item.value" :label="item.label"
<el-select v-model="searchForm.refundChannels" style="width:9vw;">
<el-option v-for="item in channelOptions" :key="item.value" :label="item.label"
:value="item.value" /> :value="item.value" />
</el-select> </el-select>
</div> </div>
<div class="condition-item2">
<div class="search2">
<el-text size="large" style="width:4vw;">订单状态</el-text> <el-text size="large" style="width:4vw;">订单状态</el-text>
<el-input v-model="searchForm.productName" placeholder="请输入订单状态" style="width:9vw;" clearable />
<el-select v-model="searchForm.statuses" style="width:9vw;">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div> </div>
<div class="condition-item2" style="width: 28vw;">
<el-text size="large" style="width:4vw;">款时间</el-text>
<div class="search2" style="width: 28vw;">
<el-text size="large" style="width:4vw;">退款时间</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间" <el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width:22vw;" @change="handleDatePickerChange" end-placeholder="结束时间" style="width:22vw;" @change="handleDatePickerChange"
:disabled-date="disabledDate" /> :disabled-date="disabledDate" />
</div> </div>
<div> <div>
<el-button type="success">重置</el-button>
<el-button type="primary">查询</el-button>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="editRow" @click="reset">重置</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>
</div> </div>
</div> </div>
</el-card> </el-card>
<div style="height:4vh;">
<el-button type="primary" @click="showEdit = true">新增</el-button>
</div>
<el-card> <el-card>
<el-table :data="tableData" style="height:60vh;width:82vw"> <el-table :data="tableData" style="height:60vh;width:82vw">
<el-table-column type="index" label="序号" width="60" fixed="left" /> <el-table-column type="index" label="序号" width="60" fixed="left" />
<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="jwcode" label="姓名" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="market" label="所属地区" width="120" />
<el-table-column prop="refundType" label="产品名称" width="120" />
<el-table-column prop="refundType" label="退款类型" width="120" />
<el-table-column prop="refundType" label="退款币种" width="120" />
<el-table-column prop="refundType" label="退款金额" width="120" />
<el-table-column prop="refundType" label="退款途径" width="120" />
<el-table-column prop="refundType" label="退款截图" width="120" />
<el-table-column prop="refundType" label="退款时间" width="120" />
<el-table-column prop="adminName" label="订单状态" width="120" />
<el-table-column prop="operation" label="操作" fixed="right" width="150px">
<el-table-column prop="marketName" label="所属地区" width="120" />
<el-table-column prop="goodsName" label="产品名称" width="120" />
<el-table-column prop="goodNum" label="产品数量" width="120" />
<el-table-column prop="refundType" label="退款方式" width="120">
<template #default="scope">
{{ scope.row.refundType === 1 ? '部分退款' : '全部退款' }}
</template>
</el-table-column>
<el-table-column prop="refundCurrency" label="退款币种" width="120" />
<el-table-column prop="refundAmount" label="退款金额" width="120" />
<el-table-column prop="refundChannels" label="退款途径" width="120" />
<el-table-column prop="refundVoucher" label="退款截图" width="120" show-overflow-tooltip>
<template #default="scope">
<img v-if="scope.row.refundVoucher" :src="scope.row.refundVoucher" style="width: 40px; height: 40px;" />
<span v-else>无退款截图</span>
</template>
</el-table-column>
<el-table-column prop="refundTime" label="退款时间" width="180" />
<el-table-column prop="status" label="订单状态" width="120">
<template #default="scope">
{{ scope.row.status === 41 ? '已完成' : '待处理' }}
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-popconfirm title="确定要通过此条记录吗?" @confirm="handleApprove(scope.row)">
<template #reference>
<el-button v-if="hasrefundWaitThough" :disabled="clicked || cancelClicked"
type="primary" text>
通过
</el-button>
</template>
<template #actions="{ confirm, cancel }">
<el-button size="small" @click="cancel">取消</el-button>
<el-button type="primary" size="small" :disabled="clicked" @click="confirm">
确认
</el-button>
</template>
</el-popconfirm>
<el-button v-if="hasrefundWaitReject" :disabled="clicked || cancelClicked" type="primary" text
@click="showRejectDialog(scope.row)">
驳回
<el-button v-if="scope.row.status === 40" type="primary" text
@click="showEditDialog(scope.row)">
提交
</el-button>
<el-button v-else type="primary" text @click="showEditDialog(scope.row)">
编辑
</el-button> </el-button>
</div> </div>
</template> </template>
@ -102,79 +105,66 @@
<div class="left"> <div class="left">
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">精网号</el-text> <el-text style="width:4vw;">精网号</el-text>
<el-input v-model="editForm.jwcode" placeholder="请输入精网号" style="width:10vw;" clearable />
<el-input v-model="editRow.jwcode" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">客户姓名</el-text> <el-text style="width:4vw;">客户姓名</el-text>
<el-input v-model="editForm.name" placeholder="请输入客户姓名" style="width:10vw;" clearable />
<el-input v-model="editRow.name" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">所属地区</el-text> <el-text style="width:4vw;">所属地区</el-text>
<el-input v-model="editForm.market" placeholder="请输入所属地区" style="width:10vw;" clearable />
<el-input v-model="editRow.marketName" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">产品名称</el-text> <el-text style="width:4vw;">产品名称</el-text>
<el-input v-model="editForm.orderCode" placeholder="请输入产品名称" style="width:10vw;" clearable />
<el-input v-model="editRow.goodsName" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">退款类型</el-text> <el-text style="width:4vw;">退款类型</el-text>
<el-select v-model="editForm.refundType" placeholder="请选择退款类型" style="width:10vw;" clearable>
<el-option v-for="item in products" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="editRow.refundModel" style="width:10vw;" disabled>
{{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }}
</el-input>
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">付款币种</el-text> <el-text style="width:4vw;">付款币种</el-text>
<el-select v-model="editForm.refundCurrency" placeholder="请选择付款币种" style="width:10vw;" clearable>
<el-option v-for="item in currencies" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
<el-input v-model="editRow.paymentCurrency" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">付款金额</el-text> <el-text style="width:4vw;">付款金额</el-text>
<el-input v-model="editForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
<el-input v-model="editRow.paymentAmount" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">支付方式</el-text> <el-text style="width:4vw;">支付方式</el-text>
<el-select v-model="editForm.paymentMethod" placeholder="请选择支付方式" style="width:10vw;">
<el-option v-for="item in payments" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="editRow.payType" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">付款时间</el-text> <el-text style="width:4vw;">付款时间</el-text>
<el-date-picker v-model="editForm.payTime" type="datetime" placeholder="请选择付款时间" style="width:10vw;" clearable />
<el-date-picker v-model="editRow.payTime" type="datetime" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">提交人</el-text> <el-text style="width:4vw;">提交人</el-text>
<el-input v-model="editForm.submitter" placeholder="请输入提交人" style="width:10vw;" clearable />
<el-input v-model="editRow.submitterName" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">转账凭证</el-text> <el-text style="width:4vw;">转账凭证</el-text>
<el-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
<el-upload ref="uploadRef" list-type="picture-card" :auto-upload="false"
:http-request="customUpload" :on-change="handleImageChange"
:on-success="handleUploadSuccess" :on-error="handleUploadError"
:before-upload="beforeUpload" :show-file-list="false">
<template #default>
<img v-if="editForm.imageUrl" :src="editForm.imageUrl"
style="width: 100%; height: 100%; object-fit: cover;">
<el-icon v-else>
<Plus />
</el-icon>
</template>
</el-upload>
</el-form-item>
<img v-if="editRow.voucher" :src="editRow.voucher"
style="width: 100%; height: 100%; object-fit: cover;">
<div v-else>
无转账凭证
</div>
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">备注</el-text> <el-text style="width:4vw;">备注</el-text>
<el-input v-model="editForm.remark" placeholder="请输入备注" style="width:10vw;" :row="3"
maxlength="100" type="textarea" show-word-limit clearable />
<el-input v-model="editForm.remark" style="width:10vw;" :row="3" disabled maxlength="100"
type="textarea" show-word-limit clearable />
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">退款币种</el-text> <el-text style="width:4vw;">退款币种</el-text>
<el-select v-model="editForm.refundCurrency" placeholder="请选择退款币种" style="width:10vw;"> <el-select v-model="editForm.refundCurrency" placeholder="请选择退款币种" style="width:10vw;">
<el-option v-for="item in currencies" :key="item.value" :label="item.label" :value="item.value" />
<el-option v-for="item in currencies" :key="item.value" :label="item.label"
:value="item.value" />
</el-select> </el-select>
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
@ -183,38 +173,65 @@
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">退款途径</el-text> <el-text style="width:4vw;">退款途径</el-text>
<el-select v-model="editForm.refundWay" placeholder="请选择退款途径" style="width:10vw;">
<el-option v-for="item in refundWays" :key="item.value" :label="item.label" :value="item.value" />
<el-select v-model="editForm.refundChannels" placeholder="请选择退款途径" style="width:10vw;">
<el-option v-for="item in channelOptions" :key="item.value" :label="item.label"
:value="item.value" />
</el-select> </el-select>
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">退款时间</el-text> <el-text style="width:4vw;">退款时间</el-text>
<el-date-picker v-model="editForm.refundTime" type="datetime" placeholder="请选择退款时间" style="width:10vw;" clearable />
<el-date-picker v-model="editForm.refundTime" type="datetime" placeholder="请选择退款时间"
style="width:10vw;" clearable />
</div>
<div class="dialog-item">
<el-text style="width:4vw;">支付凭证</el-text>
<el-upload ref="uploadRef" :http-request="customUpload" list-type="picture-card"
:auto-upload="false" :on-change="handleImageChange" :before-upload="beforeUpload"
:show-file-list="false">
<template #default>
<img v-if="editForm.imageUrl" :src="editForm.imageUrl"
style="width: 100%; height: 100%; object-fit: cover;">
<el-icon v-else>
<Plus />
</el-icon>
</template>
</el-upload>
</div> </div>
<div class="dialog-item"> <div class="dialog-item">
<el-text style="width:4vw;">备注</el-text> <el-text style="width:4vw;">备注</el-text>
<el-input v-model="editForm.remark" placeholder="请输入备注" style="width:10vw;" :rows="3"
<el-input v-model="editForm.refundRemark" placeholder="请输入备注" style="width:10vw;" :rows="3"
maxlength="100" show-word-limit type="textarea" clearable /> maxlength="100" show-word-limit type="textarea" clearable />
</div> </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="" style="margin-right: 2vw;">取消</el-button>
<el-button type="primary" @click="">提交</el-button>
<el-button type="default" @click="hideEditDialog" style="margin-right: 2vw;">取消</el-button>
<el-button type="primary" @click="submitRefund">提交</el-button>
</div> </div>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'
import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
import dayjs from 'dayjs'
import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia"
import { Delete, Download, Plus, ZoomIn } from '@element-plus/icons-vue'
const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
const dateRange = ref([])
const tableData = ref([]) const tableData = ref([])
const editRow = ref({})//
const pagination = ref({ const pagination = ref({
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,
total: 0 total: 0
}) })
const uploadRef = ref(null)
const searchForm = ref({ const searchForm = ref({
jwcode: '' jwcode: ''
}) })
@ -222,6 +239,225 @@ const showEdit = ref(false)
const editForm = ref({ const editForm = ref({
jwcode: '' jwcode: ''
}) })
//
const getRefund = async function () {
try {
searchForm.value.statuses = [40, 41] //
const params = {
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,//1012
// 2022
// 3032
// 4041退
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,
account: adminData.value.account
}
}
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
tableData.value = result.data.list || []
} catch (error) {
ElMessage.error(error.message || '查询失败')
}
}
//
const submitRefund = async function () {
try {
const params = {
refundVoucher: editForm.value.imageUrl,
refundTime: editForm.value.refundTime ? dayjs(editForm.value.refundTime).format('YYYY-MM-DD HH:mm:ss') : "",
refundRemark: editForm.value.refundRemark,
id: editRow.value.id,
refundCurrency: editForm.value.refundCurrency,
refundAmount: editForm.value.refundAmount,
refundChannels: editForm.value.refundChannels,
status: 41
}
const result = await API({
url: '/Money/executor',
data: params
})
if (result.code === 200) {
ElMessage.success('提交成功')
hideEditDialog()
getRefund()
} else {
ElMessage.error(result.data.msg || '提交失败')
}
} catch (error) {
ElMessage.error(error.message || '提交失败')
}
}
const showEditDialog = (row) => {
editRow.value = row
showEdit.value = true
}
const hideEditDialog = () => {
showEdit.value = false
editForm.value = {
jwcode: ''
}
}
const statusList = ref([
{
value: 40,
label: '待处理',
},
{
value: 41,
label: '退款完成'
}
])
const channelOptions = 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 currencies = ref([
{
value: '新币',
label: '新币'
},
{
value: '港币',
label: '港币'
},
{
value: '马币',
label: '马币'
},
{
value: '加币',
label: '加币'
},
{
value: '泰铢',
label: '泰铢'
},
{
value: '越南盾',
label: '越南盾'
}
])
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
}
return true
}
const customUpload = async (options) => {
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'
}
})
if (response.code === 200 && response.data) {
editForm.value.imageUrl = response.data.url
ElMessage.success(response.msg || '上传成功')
} else {
ElMessage.error(response.msg || '上传失败')
}
} catch (error) {
console.error('上传错误:', error)
ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
}
}
onMounted(() => {
console.log('???????????????????', adminData.value)
getRefund()
})
</script> </script>
<style scoped> <style scoped>
.condition1 { .condition1 {
@ -230,7 +466,7 @@ const editForm = ref({
align-items: center; align-items: center;
height: 4vh; height: 4vh;
.condition-item {
.search {
width: 18%; width: 18%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -238,7 +474,7 @@ const editForm = ref({
margin-right: 0.5vw; margin-right: 0.5vw;
} }
.condition-item2 {
.search2 {
width: 18%; width: 18%;
display: flex; display: flex;
align-items: center; align-items: center;

467
src/views/moneyManage/refundDetail/refundArea.vue → src/views/moneyManage/refundDetail/refundCharge.vue

@ -1,4 +1,4 @@
<!-- 各地财务&各地负责人 -->
<!-- 各地负责人 -->
<template> <template>
<el-card style="margin-bottom: 0.5vh;"> <el-card style="margin-bottom: 0.5vh;">
<div class="condition"> <div class="condition">
@ -12,7 +12,7 @@
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">所属地区</el-text> <el-text size="large" style="width:4vw;">所属地区</el-text>
<el-input v-model="searchForm.market" placeholder="请输入所属地区" style="width:9vw;" clearable />
<el-input v-model="searchForm.markets" placeholder="请输入所属地区" 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;">产品名称</el-text>
@ -20,7 +20,7 @@
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">订单状态</el-text> <el-text size="large" style="width:4vw;">订单状态</el-text>
<el-select v-model="searchForm.status" style="width:9vw;">
<el-select v-model="searchForm.statuses" style="width:9vw;">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
@ -41,40 +41,48 @@
:disabled-date="disabledDate" /> :disabled-date="disabledDate" />
</div> </div>
<div> <div>
<el-button type="success">重置</el-button>
<el-button type="primary">查询</el-button>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="success" @click="reset">重置</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>
</div> </div>
</div> </div>
</el-card> </el-card>
<div style="display: flex;">
<el-button type="primary" @click="showAudit1 = true">审核1</el-button>
<el-button type="primary" @click="showAudit2 = true">审核2</el-button>
<el-button type="primary" @click="showSteps = true">看看步骤条</el-button>
<el-button type="primary" @click="showError = true">退款金额有误</el-button>
</div>
<el-card style="margin-top: 0.5vh;"> <el-card style="margin-top: 0.5vh;">
<el-table :data="tableData" style="height:64vh;width:82vw"> <el-table :data="tableData" style="height:64vh;width:82vw">
<el-table-column type="index" label="序号" width="60" fixed="left" /> <el-table-column type="index" label="序号" width="60" fixed="left" />
<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="jwcode" label="姓名" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="market" label="所属地区" width="120" />
<el-table-column prop="refundType" label="产品名称" width="120" />
<el-table-column prop="refundType" label="产品数量" width="120" />
<el-table-column prop="refundType" label="退款方式" width="120" />
<el-table-column prop="refundType" label="提交人" width="120" />
<el-table-column prop="refundType" label="退款理由" width="120" />
<el-table-column prop="marketName" label="所属地区" width="120" />
<el-table-column prop="goodsName" label="产品名称" width="120" />
<el-table-column prop="goodNum" label="产品数量" width="120" />
<el-table-column prop="refundType" label="退款方式" width="120">
<template #default="scope">
{{ scope.row.refundType === 1 ? '部分退款' : '全部退款' }}
</template>
</el-table-column>
<el-table-column prop="submitterName" label="提交人" width="120" />
<el-table-column prop="refundReason" label="退款理由" width="120" />
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip /> <el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="adminName" label="订单状态" width="120" />
<el-table-column prop="operation" label="操作" fixed="right" width="150px" >
<el-table-column prop="status" label="订单状态" width="120">
<template #default="scope">
{{
[20,30, 40].includes(scope.row.status) ? '审核中' :
[22,32].includes(scope.row.status) ? '审核驳回' :
scope.row.status === 41 ? '退款完成' : scope.row.status
}}
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px" >
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-button v-if="row.status === '待审核'" type="primary" text @click="showAudit1 = true">
<el-button v-if="scope.row.status === 20" type="primary" text @click="showAudit(scope.row)">
审核 审核
</el-button> </el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)">
查看进度
</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -85,72 +93,22 @@
style="margin-top: 1vh;"></el-pagination> style="margin-top: 1vh;"></el-pagination>
</el-card> </el-card>
<el-dialog v-model="showAudit1" title="审核" overflow draggable width="20vw">
<div class="audit1">
<div class="audit-item">
<el-text style="width:4vw;">精网号</el-text>
<el-input v-model="addForm.jwcode" placeholder="请输入精网号" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">姓名</el-text>
<el-input v-model="addForm.name" placeholder="请输入客户姓名" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">所属地区</el-text>
<el-input v-model="addForm.market" placeholder="请输入所属地区" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">活动名称</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入活动名称" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">产品名称</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入活动名称" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">付款币种</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">付款金额</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">支付方式</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">付款时间</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">银行流水订单号</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
</div>
<div style="display:flex;justify-content: center;">
<el-button type="primary" @click="">驳回</el-button>
<el-button type="primary" @click="">通过</el-button>
</div>
</el-dialog>
<el-dialog v-model="showAudit2" title="审核" class="audit2" overflow draggable>
<el-dialog v-model="showAudit2" title="审核" class="audit2" width="35vw" overflow draggable>
<div class="top"> <div class="top">
<el-button @click="" class="smallTitle" size="small">退款申请信息</el-button> <el-button @click="" class="smallTitle" size="small">退款申请信息</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">退款类型</el-text>
<el-input v-model="auditForm.refundType" placeholder="请输入退款类型" size="small" style="width:10vw;"
<el-input v-model="auditRow.refundModel" placeholder="请输入退款类型" size="small" style="width:10vw;"
clearable></el-input> clearable></el-input>
</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">退款金额</el-text>
<el-input v-model="auditForm.refundAmount" placeholder="请输入退款金额" size="small" style="width:10vw;"
<el-input v-model="auditRow.paymentAmount" placeholder="请输入退款金额" size="small" style="width:10vw;"
clearable></el-input> clearable></el-input>
</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">退款备注</el-text>
<el-input v-model="auditForm.refundReason" placeholder="请输入退款备注" size="small" style="width:10vw;"
<el-input v-model="auditRow.refundReason" placeholder="请输入退款备注" size="small" style="width:10vw;"
:rows="3" maxlength="100" show-word-limit type="textarea" /> :rows="3" maxlength="100" show-word-limit type="textarea" />
</div> </div>
</div> </div>
@ -159,115 +117,90 @@
<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">精网号</el-text>
<el-input v-model="addForm.jwcode" placeholder="请输入精网号" size="small" style="width:10vw;"
clearable />
<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">所属地区</el-text>
<el-input v-model="addForm.name" placeholder="请输入所属地区" size="small" style="width:10vw;" clearable />
<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">产品名称</el-text>
<el-input v-model="addForm.productName" placeholder="请输入产品名称" size="small" style="width:10vw;"
clearable />
<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">付款金额</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入付款金额" size="small" style="width:10vw;"
clearable />
<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">到账金额</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入到账金额" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.receivedAmount" 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">支付方式</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入支付方式" size="small" style="width:10vw;"
clearable />
</div>
<!-- <div class="center-item">
<el-text style="width:4vw;" size="small">提交人</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" size="small" style="width:10vw;"
clearable />
</div> -->
<div class="center-item">
<el-text style="width:3vw;padding-right: 1vw;" size="small">银行流水订单号</el-text>
<el-input size="small" v-model="addForm.bankOrderNo" placeholder="请输入银行流水订单号" style="width:10vw;"
clearable />
<el-input v-model="auditRow.payType" 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-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
<el-upload ref="uploadRef" :auto-upload="false" :http-request="customUpload"
list-type="picture-card" :on-change="handleImageChange" class="image"
:on-success="handleUploadSuccess" :on-error="handleUploadError"
:before-upload="beforeUpload" :show-file-list="false">
<template #default>
<img v-if="addForm.imageUrl" :src="addForm.imageUrl"
style="width: 100%; height: 100%; object-fit: cover;">
<el-icon v-else>
<Plus />
</el-icon>
</template>
</el-upload>
</el-form-item>
<el-text style="width:4vw;">转账凭证</el-text>
<img v-if="auditRow.voucher" :src="auditRow.voucher" style="width: 100%; height: 100%; object-fit: cover;">
<div v-else>
无转账凭证
</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">客户姓名</el-text>
<el-input v-model="addForm.customerName" placeholder="请输入客户姓名" size="small" style="width:10vw;"
clearable />
<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">活动名称</el-text>
<el-input v-model="addForm.activityName" placeholder="请输入活动名称" size="small" style="width:10vw;"
clearable />
<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">付款币种</el-text>
<el-input v-model="addForm.paymentCurrency" placeholder="请输入付款币种" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.paymentCurrency" 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">到账币种</el-text>
<el-input v-model="addForm.receiveCurrency" placeholder="请输入到账币种" size="small" style="width:10vw;"
clearable />
<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">手续费</el-text>
<el-input v-model="addForm.fee" placeholder="请输入手续费" size="small" style="width:10vw;" clearable />
<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">付款时间</el-text>
<el-input v-model="addForm.paymentTime" placeholder="请输入付款时间" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.payTime" 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">提交人</el-text>
<el-input v-model="addForm.submitUser" placeholder="请输入提交人" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.submitterName" 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">到账时间</el-text>
<el-input v-model="addForm.receiveTime" placeholder="请输入到账时间" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.receiveTime" 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">备注</el-text>
<el-input v-model="addForm.remark" placeholder="请输入备注" size="small" style="width:10vw;" :row="3"
clearable />
<el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled />
</div> </div>
</div> </div>
</div> </div>
<el-button @click="" class="smallTitle" size="small">转交信息</el-button>
<div class="bottom"> <div class="bottom">
<div class="bottom-item">
<el-text style="width:4vw;" size="small">执行人</el-text>
<el-select v-model="addForm.executor" size="small" placeholder="请选择执行人" style="width:10vw;">
<el-option v-for="item in executor" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
<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"
maxlength="100" type="textarea" show-word-limit clearable />
</div>
<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>
</div>
<div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">取消</el-button>
<el-button type="primary" @click="handleReject">确定</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -337,71 +270,24 @@ const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js" import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
const searchForm = ref({ const searchForm = ref({
jwcode: ''
jwcode: '',
markets:[]
}) })
const addForm = ref({ const addForm = ref({
jwcode: ''
})
const auditForm = ref({
refundType: ''
remark: ''
}) })
const showReject = ref(false)
const auditRow = ref({})//
const dateRange = ref([])
const pagination = ref({ const pagination = ref({
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,
total: 0 total: 0
}) })
const tableData = ref([])
const showAudit1 = ref(false)
const showAudit2 = ref(false) const showAudit2 = ref(false)
const tableData = ref([])
const showSteps = ref(false) const showSteps = ref(false)
const uploadRef = ref(null) const uploadRef = ref(null)
const showError = ref(false)
const executor = ref([
{
value: '1',
label: '亲爱的佳丽老师'
},
{
value: '2',
label: '张三'
},
{
value: '3',
label: '李四'
},
{
value: '4',
label: '王五'
},
{
value: '5',
label: '赵六'
},
{
value: '6',
label: '弘历黄总'
}
])
const products = ref([
{
value: '1',
label: '产品1'
},
{
value: '2',
label: '产品2'
}
])
const currencies = ref([
{
value: 'CNY',
label: '人民币'
},
{
value: 'USD',
label: '美元'
}
])
const payments = ref([{ const payments = ref([{
value: '银行转账', value: '银行转账',
label: '银行转账' label: '银行转账'
@ -464,130 +350,144 @@ const payments = ref([{
} }
]) ])
const statusList = ref([ const statusList = ref([
{
value: '10',
label: '地区财务待审核'
},
{
value: '12',
label: '地区财务驳回'
},
{
value: '20',
label: '地区负责人待审核'
},
{
value: '22',
label: '地区负责人驳回'
},
{
value: '30',
label: '总部财务待审核'
},
{
value: '32',
label: '总部财务驳回'
},
{
value: '40',
label: '执行人待处理'
},
{
value: '41',
label: '退款完成'
}
{
value: 20,
label: '待审核',
},
{
value: '审核通过',
label: '审核通过'
},
{
value: '审核驳回',
label: '审核驳回'
},
{
value: 41,
label: '退款完成'
}
]) ])
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeShow)) {
ElMessage.error('无此权限')
return
}
try { try {
searchForm.value.statuses = [20,22,30,32,40,41] //
if(searchForm.value.statuses === '审核通过'){
statuses = [30,40]
}else if(searchForm.value.statuses === '审核驳回'){
statuses = [22,32]
}
const params = { const params = {
cashCollection: {
status: null,
//1012
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,//1012
// 2022 // 2022
// 3032 // 3032
// 4041退 // 4041退
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({ const result = await API({
url: '/hljw/api/refund/query',
url: '/Money/select',
method: 'POST', method: 'POST',
data: params data: params
}) })
tableData.value = result.data || []
tableData.value = result.data.list || []
} catch (error) { } catch (error) {
ElMessage.error(error.message || '查询失败') 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
//
const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeAudit)) {
ElMessage.error('无此权限')
return
} }
if (!isLt1) {
ElMessage.error('上传图片大小不能超过1MB')
return false
}
return true
}
const handleUploadSuccess = (response, file, fileList) => {
try { try {
addForm.value.imageUrl = response.data.url
console.log('==========================', response.data.url)
const params = {
id: auditRow.value.id,
status: 30,
rejectReason: addForm.value.remark,
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) { } 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.refundChargeAudit)) {
ElMessage.error('无此权限')
return
}
try { 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: 22,
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('审核驳回')
showAudit.value = false
getRefund()
} }
} catch (error) { } catch (error) {
console.error('上传错误:', error)
ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
ElMessage.error(error.message || '审核失败')
} }
} }
const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeProgShow)) {
ElMessage.error('无此权限')
return
}
showSteps.value = true
}
const hideReject = function () {
showReject.value = false
addForm.value.remark = ''
}
const reset = function () {
searchForm.value = {
jwcode: ''
}
dateRange.value = []
getRefund()
}
const showAudit = function (row) {
auditRow.value = row
showAudit2.value = true
}
onMounted(() => { onMounted(() => {
console.log('???????????????????', adminData.value) console.log('???????????????????', adminData.value)
getRefund()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -624,8 +524,9 @@ onMounted(() => {
} }
.audit2 { .audit2 {
width: 30vw;
height: auto;
display: flex;
justify-content: center;
.top { .top {
width: 30vw; width: 30vw;
@ -648,7 +549,7 @@ onMounted(() => {
.center { .center {
display: flex; display: flex;
width: 30vw; width: 30vw;
height: 41vh;
height: 35vh;
.dialog-item { .dialog-item {
display: flex; display: flex;
@ -658,6 +559,7 @@ onMounted(() => {
.center-left { .center-left {
width: 60%; width: 60%;
height: 35vh;
.image { .image {
width: 4vw !important; width: 4vw !important;
@ -678,6 +580,7 @@ onMounted(() => {
} }
.center-right { .center-right {
height: 35vh;
.right-item { .right-item {
display: flex; display: flex;

28
src/views/moneyManage/refundDetail/refundDetail.vue

@ -27,29 +27,31 @@ const navigateTo = (name) => {
const initPermissions = () => { const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return if (!menuTree.value || !menuTree.value.length) return
isService.value = hasMenuPermission(menuTree.value, permissionMapping.)
isArea.value = hasMenuPermission(menuTree.value, permissionMapping.)
isHeader.value = hasMenuPermission(menuTree.value, permissionMapping.)
console.log('====================================', isService.value, isArea.value,isHeader.value)
isService.value = hasMenuPermission(menuTree.value, permissionMapping.refundService)
isFinance.value = hasMenuPermission(menuTree.value, permissionMapping.refundFinance)
isCharge.value = hasMenuPermission(menuTree.value, permissionMapping.refundCharge)
isHeader.value = hasMenuPermission(menuTree.value, permissionMapping.refundHeader)
console.log('====================================', isService.value, isFinance.value,isCharge.value,isHeader.value)
} }
// //
const getDefaultAuditRoute = () => { const getDefaultAuditRoute = () => {
initPermissions() initPermissions()
if (isService.value) return 'userPermission'
if (isArea.value) return 'rolePermission'
if (isHeader.value) return 'headerPermission'
if (isService.value) return 'refundService'
if (isFinance.value) return 'refundFinance'
if (isCharge.value) return 'refundCharge'
if (isHeader.value) return 'refundHeader'
return 'userPermission'
return 'refundService'
} }
// //
watch(() => route.name, (newName) => { watch(() => route.name, (newName) => {
initPermissions() initPermissions()
if (newName === 'userPermission' || newName === 'rolePermission') {
if (newName === 'refundService' || newName === 'refundFinance' || newName === 'refundCharge' || newName === 'refundHeader') {
activeTab.value = newName activeTab.value = newName
} else if (newName === 'permissions') {
// 访 /permissions
} else if (newName === 'refundDetail') {
// 访 /refundDetail
const defaultRoute = getDefaultAuditRoute() const defaultRoute = getDefaultAuditRoute()
navigateTo(defaultRoute) navigateTo(defaultRoute)
} }
@ -58,12 +60,12 @@ watch(() => route.name, (newName) => {
// //
onMounted(() => { onMounted(() => {
initPermissions() initPermissions()
if (route.name === 'permissions') {
if (route.name === 'refundDetail') {
const defaultRoute = getDefaultAuditRoute() const defaultRoute = getDefaultAuditRoute()
navigateTo(defaultRoute) navigateTo(defaultRoute)
} else { } else {
// //
if (route.name === 'userPermission' || route.name === 'rolePermission') {
if (route.name === 'refundService' || route.name === 'refundFinance' || route.name === 'refundCharge' || route.name === 'refundHeader') {
activeTab.value = route.name activeTab.value = route.name
} }
} }

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

@ -0,0 +1,710 @@
<!-- 各地财务 -->
<template>
<el-card style="margin-bottom: 0.5vh;">
<div class="condition">
<div class="item1">
<el-text size="large" style="width:4vw;">精网号</el-text>
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">客户姓名</el-text>
<el-input v-model="searchForm.name" placeholder="请输入客户姓名" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">所属地区</el-text>
<el-input v-model="searchForm.markets" placeholder="请输入所属地区" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">产品名称</el-text>
<el-input v-model="searchForm.goodsName" placeholder="请输入产品名称" style="width:9vw;" clearable />
</div>
<div class="item1">
<el-text size="large" style="width:4vw;">订单状态</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</div>
<div class="condition">
<div class="item2">
<el-text size="large" style="width:4vw;">付款币种</el-text>
<el-input v-model="searchForm.payCurrency" placeholder="请输入付款币种" style="width:9vw;" clearable />
</div>
<div class="item2">
<el-text size="large" style="width:4vw;">支付方式</el-text>
<el-input v-model="searchForm.payType" placeholder="请输入支付方式" style="width:9vw;" clearable />
</div>
<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"
:disabled-date="disabledDate" />
</div>
<div>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="success" @click="reset">重置</el-button>
<el-button type="warning">导出excel</el-button>
<el-button type="primary">查看导出列表</el-button>
</div>
</div>
</el-card>
<el-card style="margin-top: 0.5vh;">
<el-table :data="tableData" style="height:64vh;width:82vw">
<el-table-column type="index" label="序号" width="60" 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="120" />
<el-table-column prop="goodNum" label="产品数量" width="120" />
<el-table-column prop="refundType" label="退款方式" width="120">
<template #default="scope">
{{ scope.row.refundType === 1 ? '部分退款' : '全部退款' }}
</template>
</el-table-column>
<el-table-column prop="submitterName" label="提交人" width="120" />
<el-table-column prop="refundReason" label="退款理由" width="120" />
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="status" label="订单状态" width="120">
<template #default="scope">
{{
[10,20, 30, 40].includes(scope.row.status) ? '审核中' :
[12,22, 32].includes(scope.row.status) ? '审核驳回' :
scope.row.status === 41 ? '退款完成' : scope.row.status
}}
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<template #default="scope">
<div class="operation">
<el-button v-if="scope.row.status === 10" type="primary" text @click="showAudit2(scope.row)">
审核
</el-button>
<el-button v-else type="primary" text @click="showStep(scope.row)">
查看进度
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
@size-change="handlePageSizeChange" @current-change="handleCurrentChange"
style="margin-top: 1vh;"></el-pagination>
</el-card>
<el-dialog v-model="showAudit" title="审核" class="audit" width="35vw" overflow draggable>
<div class="top">
<el-button @click="" class="smallTitle" size="small">退款申请信息</el-button>
<div class="top-item">
<el-text style="width:4vw;" size="small">退款类型</el-text>
<el-input v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
<template #default="scope">
{{ scope.row.refundModel === 0 ? '全部退款' : '部分退款' }}
</template>
</el-input>
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">退款金额</el-text>
<el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="top-item">
<el-text style="width:4vw;" size="small">退款备注</el-text>
<el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100"
show-word-limit type="textarea" disabled />
</div>
</div>
<el-button @click="" class="smallTitle" size="small">原订单信息</el-button>
<div class="center">
<div class="center-left">
<div class="center-item">
<el-text style="width:4vw;" size="small">精网号</el-text>
<el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">所属地区</el-text>
<el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">产品名称</el-text>
<el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">付款金额</el-text>
<el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">到账金额</el-text>
<el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">支付方式</el-text>
<el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
</div>
<div class="center-item">
<el-text style="width:4vw;">转账凭证</el-text>
<img v-if="auditRow.voucher" :src="auditRow.voucher" style="width: 100%; height: 100%; object-fit: cover;">
<div v-else>
无转账凭证
</div>
</div>
</div>
<div class="center-right">
<div class="right-item">
<el-text style="width:4vw;" size="small">客户姓名</el-text>
<el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">活动名称</el-text>
<el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">付款币种</el-text>
<el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">到账币种</el-text>
<el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">手续费</el-text>
<el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">付款时间</el-text>
<el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">提交人</el-text>
<el-input v-model="auditRow.submitterName" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">到账时间</el-text>
<el-input v-model="auditRow.receiveTime" size="small" style="width:10vw;" disabled />
</div>
<div class="right-item">
<el-text style="width:4vw;" size="small">备注</el-text>
<el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled />
</div>
</div>
</div>
<div class="bottom">
<el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
<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"
maxlength="100" type="textarea" show-word-limit clearable />
</div>
<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>
</div>
<div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">取消</el-button>
<el-button type="primary" @click="handleReject">确定</el-button>
</div>
</div>
</el-dialog>
<el-dialog v-model="showSteps" title="唉!!!" overflow draggable width="1206px" height="506px" :style="{
backgroundImage: 'url(/src/assets/images/背景图.png)',
backgroundSize: 'cover',
backgroundPosition: 'center'
}">
<div class="steps">
<div class="steps-content">
<el-steps style="min-width: 60vw" :active="1" align-center>
<el-step> <template #title>
<div>提交人<br>你是死的</div>
</template>
<template #icon>
<img src="@/assets/images/已审核.png" alt="已审核图标">
</template>
</el-step>
<el-step title="地区财务">
<template #icon>
<img src="@/assets/images/待审核.png" alt="待审核图标">
</template>
</el-step>
<el-step title="地区负责人">
<template #icon>
<img src="@/assets/images/还没传到.png" alt="还没传到图标">
</template>
</el-step>
<el-step title="总部财务">
<template #icon>
<img src="@/assets/images/还没传到.png" alt="还没传到图标">
</template>
</el-step>
<el-step title="指定执行人">
<template #icon>
<img src="@/assets/images/还没传到.png" alt="还没传到图标">
</template>
</el-step>
</el-steps>
</div>
<div class="steps-status">
<el-steps style="min-width: 50vw" :active="1" finish-status="success" simple>
<el-step title="已通过" />
<el-step title="待审核" />
<el-step title="待审核" />
<el-step title="待审核" />
<el-step title="待审核" />
</el-steps>
</div>
<div class="steps-btn">
<el-button type="primary">确定</el-button>
</div>
</div>
</el-dialog>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia"
import dayjs from 'dayjs'
const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
import { get } from 'lodash'
const searchForm = ref({
jwcode: '',
markets: []
})
const dateRange = ref([])
const addForm = ref({
remark: ''
})
const auditForm = ref({
refundType: ''
})
const showReject = ref(false)
const pagination = ref({
pageNum: 1,
pageSize: 50,
total: 0
})
const tableData = ref([])
const showAudit = ref(false)
const auditRow = ref({})//
const showSteps = ref(false)
const uploadRef = ref(null)
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 statusList = ref([
{
value: 20,
label: '待审核',
},
{
value: '审核通过',
label: '审核通过'
},
{
value: '审核驳回',
label: '审核驳回'
},
{
value: 41,
label: '退款完成'
}
])
//
const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceShow)) {
ElMessage.error('无此权限')
return
}
try {
if(searchForm.value.statuses === '审核通过'){
searchForm.value.statuses = [20,30,40]
}else if(searchForm.value.statuses === '审核驳回'){
searchForm.value.statuses = [12,22,32]
}
const params = {
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,//1012
// 2022
// 3032
// 4041退
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: '/Money/select',
method: 'POST',
data: params
})
tableData.value = result.data.list || []
} catch (error) {
ElMessage.error(error.message || '查询失败')
}
}
//
const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceAudit)) {
ElMessage.error('无此权限')
return
}
try {
const params = {
id: auditRow.value.id,
status: 20,
adminId: adminData.value.id
}
const result = await API({
url: '/Money/finalReview',
data: params
})
if (result.code === 200) {
ElMessage.success('审核通过')
showAudit.value = false
getRefund()
}
} catch (error) {
ElMessage.error(error.message || '审核失败')
}
}
//
const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceAudit)) {
ElMessage.error('无此权限')
return
}
try {
const params = {
id: auditRow.value.id,
status: 12,
rejectReason: addForm.value.remark,
adminId: adminData.value.id
}
const result = await API({
url: '/Money/finalReview',
data: params
})
if (result.code === 200) {
ElMessage.success('审核驳回')
showAudit.value = false
getRefund()
}
} catch (error) {
ElMessage.error(error.message || '审核失败')
}
}
const currencies = ref([
{
value: '新币',
label: '新币'
},
{
value: '港币',
label: '港币'
},
{
value: '马币',
label: '马币'
},
{
value: '加币',
label: '加币'
},
{
value: '泰铢',
label: '泰铢'
},
{
value: '越南盾',
label: '越南盾'
}
])
const channelOptions = 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 showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceProgShow)) {
ElMessage.error('无此权限')
return
}
showSteps.value = true
}
const showAudit2 = function (row) {
auditRow.value = row
showAudit.value = true
}
const reset = function () {
searchForm.value = {
jwcode: ''
}
dateRange.value = []
getRefund()
}
const hideReject = function () {
showReject.value = false
addForm.value.remark = ''
}
onMounted(() => {
console.log('???????????????????', adminData.value)
getRefund()
})
</script>
<style scoped lang="scss">
.condition {
width: 82vw;
display: flex;
align-items: center;
height: 4vh;
.item1 {
width: 18%;
display: flex;
align-items: center;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
}
.audit {
display: flex;
justify-content: center;
height: auto;
.top {
width: 30vw;
height: 17vh;
.top-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.smallTitle {
background-color: white;
color: rgb(64, 158, 255);
border-color: rgb(64, 158, 255);
margin-bottom: 0.5vh;
}
.center {
display: flex;
width: 30vw;
height: 35vh;
.dialog-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.center-left {
width: 60%;
height: 35vh;
.image {
width: 4vw !important;
height: 4vw !important;
}
:deep(.el-upload--picture-card) {
width: 4vw !important;
height: 4vw !important;
padding: 0 !important;
}
.center-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.center-right {
height: 35vh;
.right-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
}
.bottom {
width: 30vw;
height: auto;
.bottom-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
}
.steps {
.steps-content {
width: 45vw;
height: 15vh;
display: flex;
justify-content: center;
padding-top: 15vw;
padding-left: 8vw;
}
.steps-status {
display: flex;
align-items: center;
justify-content: center;
}
.steps-btn {
height: 15vh;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

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

@ -1,5 +1,4 @@
<!-- 总部财务&管理员 -->
<!-- 客服 -->
<!-- 各地负责人 -->
<template> <template>
<el-card style="margin-bottom: 0.5vh;"> <el-card style="margin-bottom: 0.5vh;">
<div class="condition"> <div class="condition">
@ -13,7 +12,7 @@
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">所属地区</el-text> <el-text size="large" style="width:4vw;">所属地区</el-text>
<el-input v-model="searchForm.market" placeholder="请输入所属地区" style="width:9vw;" clearable />
<el-input v-model="searchForm.markets" placeholder="请输入所属地区" 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;">产品名称</el-text>
@ -21,7 +20,7 @@
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">订单状态</el-text> <el-text size="large" style="width:4vw;">订单状态</el-text>
<el-select v-model="searchForm.status" style="width:9vw;">
<el-select v-model="searchForm.statuses" style="width:9vw;">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
@ -42,62 +41,47 @@
:disabled-date="disabledDate" /> :disabled-date="disabledDate" />
</div> </div>
<div> <div>
<el-button type="success">重置</el-button>
<el-button type="primary">查询</el-button>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="success" @click="reset">重置</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>
</div> </div>
</div> </div>
</el-card> </el-card>
<div style="display: flex;">
<el-button type="primary" @click="showAdd = true">地区客服编辑</el-button>
<el-button type="primary" @click="showAudit1 = true">审核1</el-button>
<el-button type="primary" @click="showAudit2 = true">审核2</el-button>
<el-button type="primary" @click="showSteps = true">看看步骤条</el-button>
<el-button type="primary" @click="showBack = true">看看撤回</el-button>
<el-button type="primary" @click="showError = true">退款金额有误</el-button>
</div>
<el-card style="margin-top: 0.5vh;"> <el-card style="margin-top: 0.5vh;">
<el-table :data="tableData" style="height:64vh;width:82vw"> <el-table :data="tableData" style="height:64vh;width:82vw">
<el-table-column type="index" label="序号" width="60" fixed="left" /> <el-table-column type="index" label="序号" width="60" fixed="left" />
<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="jwcode" label="姓名" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="market" label="所属地区" width="120" />
<el-table-column prop="orderCode" label="活动名称" width="120px" v-if="isKF" show-overflow-tooltip />
<el-table-column prop="refundType" label="产品名称" width="120" />
<el-table-column prop="refundType" label="产品数量" width="120" />
<el-table-column prop="refundType" label="退款方式" width="120" v-if="!isKF" />
<el-table-column prop="refundType" label="提交人" width="120" v-if="!isKF" />
<el-table-column prop="refundType" label="退款理由" width="120" v-if="!isKF" />
<el-table-column prop="refundType" label="付款币种" width="120" v-if="isKF" />
<el-table-column prop="refundType" label="付款金额" width="120" v-if="isKF" />
<el-table-column prop="refundType" label="支付方式" width="120" v-if="isKF" />
<el-table-column prop="refundType" label="付款时间" width="120" v-if="isKF" />
<el-table-column prop="refundType" label="转账凭证" width="120" v-if="isKF" />
<el-table-column prop="marketName" label="所属地区" width="120" />
<el-table-column prop="goodsName" label="产品名称" width="120" />
<el-table-column prop="goodNum" label="产品数量" width="120" />
<el-table-column prop="refundType" label="退款方式" width="120">
<template #default="scope">
{{ scope.row.refundType === 1 ? '部分退款' : '全部退款' }}
</template>
</el-table-column>
<el-table-column prop="submitterName" label="提交人" width="120" />
<el-table-column prop="refundReason" label="退款理由" width="120" />
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip /> <el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="adminName" label="订单状态" width="120" />
<el-table-column prop="operation" label="操作" fixed="right" width="150px" v-if="!isKF">
<el-table-column prop="status" label="订单状态" width="120">
<template #default="scope">
{{
[30, 40].includes(scope.row.status) ? '审核中' :
scope.row.status === 32 ? '审核驳回' :
scope.row.status === 41 ? '退款完成' : scope.row.status
}}
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-popconfirm title="确定要通过此条记录吗?" @confirm="handleApprove(scope.row)">
<template #reference>
<el-button v-if="hasrefundWaitThough" :disabled="clicked || cancelClicked"
type="primary" text>
通过
</el-button>
</template>
<template #actions="{ confirm, cancel }">
<el-button size="small" @click="cancel">取消</el-button>
<el-button type="primary" size="small" :disabled="clicked" @click="confirm">
确认
</el-button>
</template>
</el-popconfirm>
<el-button v-if="hasrefundWaitReject" :disabled="clicked || cancelClicked" type="primary" text
@click="showRejectDialog(scope.row)">
驳回
<el-button v-if="scope.row.status === 30" type="primary" text @click="showAudit(scope.row)">
审核
</el-button>
<el-button v-else type="primary" text @click="showStep">
查看进度
</el-button> </el-button>
</div> </div>
</template> </template>
@ -109,72 +93,22 @@
style="margin-top: 1vh;"></el-pagination> style="margin-top: 1vh;"></el-pagination>
</el-card> </el-card>
<el-dialog v-model="showAudit1" title="审核" overflow draggable width="20vw">
<div class="audit1">
<div class="audit-item">
<el-text style="width:4vw;">精网号</el-text>
<el-input v-model="addForm.jwcode" placeholder="请输入精网号" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">姓名</el-text>
<el-input v-model="addForm.name" placeholder="请输入客户姓名" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">所属地区</el-text>
<el-input v-model="addForm.market" placeholder="请输入所属地区" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">活动名称</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入活动名称" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">商品名称</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入活动名称" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">付款币种</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">付款金额</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">支付方式</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">付款时间</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
<div class="audit-item">
<el-text style="width:4vw;">银行流水订单号</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
</div>
</div>
<div style="display:flex;justify-content: center;">
<el-button type="primary" @click="">驳回</el-button>
<el-button type="primary" @click="">通过</el-button>
</div>
</el-dialog>
<el-dialog v-model="showAudit2" title="审核" class="audit2" overflow draggable>
<el-dialog v-model="showAudit2" title="审核" class="audit2" width="35vw" overflow draggable>
<div class="top"> <div class="top">
<el-button @click="" class="smallTitle" size="small">退款申请信息</el-button> <el-button @click="" class="smallTitle" size="small">退款申请信息</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">退款类型</el-text>
<el-input v-model="auditForm.refundType" placeholder="请输入退款类型" size="small" style="width:10vw;"
<el-input v-model="auditRow.refundModel" placeholder="请输入退款类型" size="small" style="width:10vw;"
clearable></el-input> clearable></el-input>
</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">退款金额</el-text>
<el-input v-model="auditForm.refundAmount" placeholder="请输入退款金额" size="small" style="width:10vw;"
<el-input v-model="auditRow.paymentAmount" placeholder="请输入退款金额" size="small" style="width:10vw;"
clearable></el-input> clearable></el-input>
</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">退款备注</el-text>
<el-input v-model="auditForm.refundReason" placeholder="请输入退款备注" size="small" style="width:10vw;"
<el-input v-model="auditRow.refundReason" placeholder="请输入退款备注" size="small" style="width:10vw;"
:rows="3" maxlength="100" show-word-limit type="textarea" /> :rows="3" maxlength="100" show-word-limit type="textarea" />
</div> </div>
</div> </div>
@ -183,121 +117,101 @@
<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">精网号</el-text>
<el-input v-model="addForm.jwcode" placeholder="请输入精网号" size="small" style="width:10vw;"
clearable />
<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">所属地区</el-text>
<el-input v-model="addForm.name" placeholder="请输入所属地区" size="small" style="width:10vw;" clearable />
<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">产品名称</el-text>
<el-input v-model="addForm.productName" placeholder="请输入产品名称" size="small" style="width:10vw;"
clearable />
<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">付款金额</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入付款金额" size="small" style="width:10vw;"
clearable />
<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">到账金额</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入到账金额" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.receivedAmount" 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">支付方式</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入支付方式" size="small" style="width:10vw;"
clearable />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">付款金额</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" size="small" style="width:10vw;"
clearable />
</div>
<div class="center-item">
<el-text style="width:3vw;padding-right: 1vw;" size="small">银行流水订单号</el-text>
<el-input size="small" v-model="addForm.bankOrderNo" placeholder="请输入银行流水订单号" style="width:10vw;"
clearable />
</div>
<div class="center-item">
<el-text style="width:4vw;" size="small">审核人</el-text>
<el-input v-model="addForm.auditUser" placeholder="请输入审核人" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.payType" 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-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
<el-upload ref="uploadRef" :auto-upload="false" :http-request="customUpload"
list-type="picture-card" :on-change="handleImageChange" class="image"
:on-success="handleUploadSuccess" :on-error="handleUploadError"
:before-upload="beforeUpload" :show-file-list="false">
<template #default>
<img v-if="addForm.imageUrl" :src="addForm.imageUrl"
style="width: 100%; height: 100%; object-fit: cover;">
<el-icon v-else>
<Plus />
</el-icon>
</template>
</el-upload>
</el-form-item>
<el-text style="width:4vw;">转账凭证</el-text>
<img v-if="auditRow.voucher" :src="auditRow.voucher" style="width: 100%; height: 100%; object-fit: cover;">
<div v-else>
无转账凭证
</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">客户姓名</el-text>
<el-input v-model="addForm.customerName" placeholder="请输入客户姓名" size="small" style="width:10vw;"
clearable />
<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">活动名称</el-text>
<el-input v-model="addForm.activityName" placeholder="请输入活动名称" size="small" style="width:10vw;"
clearable />
<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">付款币种</el-text>
<el-input v-model="addForm.paymentCurrency" placeholder="请输入付款币种" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.paymentCurrency" 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">到账币种</el-text>
<el-input v-model="addForm.receiveCurrency" placeholder="请输入到账币种" size="small" style="width:10vw;"
clearable />
<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">手续费</el-text>
<el-input v-model="addForm.fee" placeholder="请输入手续费" size="small" style="width:10vw;" clearable />
<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">付款时间</el-text>
<el-input v-model="addForm.paymentTime" placeholder="请输入付款时间" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.payTime" 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">提交人</el-text>
<el-input v-model="addForm.submitUser" placeholder="请输入提交人" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.submitterName" 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">到账时间</el-text>
<el-input v-model="addForm.receiveTime" placeholder="请输入到账时间" size="small" style="width:10vw;"
clearable />
<el-input v-model="auditRow.receiveTime" 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">备注</el-text>
<el-input v-model="addForm.remark" placeholder="请输入备注" size="small" style="width:10vw;" :row="3"
clearable />
<el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
type="textarea" show-word-limit disabled />
</div> </div>
</div> </div>
</div> </div>
<el-button @click="" class="smallTitle" size="small">转交信息</el-button>
<div class="bottom"> <div class="bottom">
<div class="bottom-item">
<el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
<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"
maxlength="100" type="textarea" show-word-limit clearable />
</div>
<div class="bottom-item" v-show="showExecutor">
<el-text style="width:4vw;" size="small">执行人</el-text> <el-text style="width:4vw;" size="small">执行人</el-text>
<el-select v-model="addForm.executor" size="small" placeholder="请选择执行人" style="width:10vw;">
<el-option v-for="item in executor" :key="item.value" :label="item.label" :value="item.value" />
<el-select v-model="addForm.executor" style="width:9vw;">
<el-option v-for="item in executorList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
<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>
</div>
<div style="text-align: center;" v-show="showReject">
<el-button type="default" @click="hideReject">取消</el-button>
<el-button type="primary" @click="handleReject">确定</el-button>
</div>
<div style="text-align: center;" v-show="showExecutor">
<el-button type="default" @click="hideExecutor">取消</el-button>
<el-button type="primary" @click="handlePass">确定</el-button>
</div>
</div> </div>
</el-dialog> </el-dialog>
@ -365,80 +279,27 @@ const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore) const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js" 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({ const searchForm = ref({
jwcode: ''
jwcode: '',
markets: [],
statuses: []
}) })
const addForm = ref({ 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({ const pagination = ref({
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,
total: 0 total: 0
}) })
const tableData = ref([])
const showAdd = ref(false)
const showAudit1 = ref(false)
const showAudit2 = ref(false) const showAudit2 = ref(false)
const tableData = ref([])
const showSteps = ref(false) const showSteps = ref(false)
const uploadRef = ref(null) 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([{ const payments = ref([{
value: '银行转账', value: '银行转账',
label: '银行转账' label: '银行转账'
@ -501,130 +362,162 @@ const payments = ref([{
} }
]) ])
const statusList = 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 () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderShow)) {
ElMessage.error('无此权限')
return
}
try { try {
searchForm.value.statuses = [30, 32, 40, 41] //
const params = { const params = {
cashCollection: {
status: null,
//1012
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,//1012
// 2022 // 2022
// 3032 // 3032
// 4041退 // 4041退
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({ const result = await API({
url: '/hljw/api/refund/query',
url: '/Money/select',
method: 'POST', method: 'POST',
data: params data: params
}) })
tableData.value = result.data || []
tableData.value = result.data.list || []
} catch (error) { } catch (error) {
ElMessage.error(error.message || '查询失败') 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 { 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) { } 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 { 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) { } 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(() => { onMounted(() => {
console.log('???????????????????', adminData.value) console.log('???????????????????', adminData.value)
getRefund()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -661,8 +554,9 @@ onMounted(() => {
} }
.audit2 { .audit2 {
width: 30vw;
height: auto;
display: flex;
justify-content: center;
.top { .top {
width: 30vw; width: 30vw;
@ -685,7 +579,7 @@ onMounted(() => {
.center { .center {
display: flex; display: flex;
width: 30vw; width: 30vw;
height: 41vh;
height: 35vh;
.dialog-item { .dialog-item {
display: flex; display: flex;
@ -695,6 +589,7 @@ onMounted(() => {
.center-left { .center-left {
width: 60%; width: 60%;
height: 35vh;
.image { .image {
width: 4vw !important; width: 4vw !important;
@ -715,6 +610,7 @@ onMounted(() => {
} }
.center-right { .center-right {
height: 35vh;
.right-item { .right-item {
display: flex; display: flex;
@ -726,7 +622,7 @@ onMounted(() => {
.bottom { .bottom {
width: 30vw; width: 30vw;
height: 5vh;
height: 7vh;
.bottom-item { .bottom-item {
display: flex; display: flex;

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

@ -19,8 +19,8 @@
<el-input v-model="searchForm.goodsName" placeholder="请输入产品名称" style="width:9vw;" clearable /> <el-input v-model="searchForm.goodsName" placeholder="请输入产品名称" style="width:9vw;" clearable />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">订单状态</el-text>
<el-select v-model="searchForm.status" style="width:9vw;">
<el-text size="large" style="width:4vw;" multiple>订单状态</el-text>
<el-select v-model="searchForm.statuses" style="width:9vw;">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
@ -28,59 +28,74 @@
<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;">付款币种</el-text>
<el-input v-model="searchForm.payCurrency" placeholder="请输入付款币种" style="width:9vw;" clearable />
<el-select v-model="searchForm.paymentCurrency" style="width:9vw;">
<el-option v-for="item in currencies" :key="item.value" :label="item.label" :value="item.value" />
</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;">支付方式</el-text>
<el-input v-model="searchForm.payType" placeholder="请输入支付方式" style="width:9vw;" clearable />
<el-select v-model="searchForm.payType" style="width:9vw;">
<el-option v-for="item in channelOptions" :key="item.value" :label="item.label" :value="item.value" />
</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-text size="large" style="width:4vw;">付款时间</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间" <el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width:22vw;" @change="handleDatePickerChange"
:disabled-date="disabledDate" />
end-placeholder="结束时间" style="width:22vw;" :disabled-date="disabledDate" />
</div> </div>
<div> <div>
<el-button type="success">重置</el-button>
<el-button type="primary">查询</el-button>
<el-button type="primary" @click="getRefund">查询</el-button>
<el-button type="success" @click="reset">重置</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>
</div> </div>
</div> </div>
</el-card> </el-card>
<div style="display: flex;">
<el-button type="primary" @click="showEdit = true">地区客服编辑</el-button>
<el-button type="primary" @click="showSteps = true">看看步骤条</el-button>
<el-button type="primary" @click="showBack = true">看看撤回</el-button>
<el-button type="primary" @click="showError = true">退款金额有误</el-button>
</div>
<el-card style="margin-top: 0.5vh;"> <el-card style="margin-top: 0.5vh;">
<el-table :data="tableData" style="height:64vh;width:82vw"> <el-table :data="tableData" style="height:64vh;width:82vw">
<el-table-column type="index" label="序号" width="60" fixed="left" /> <el-table-column type="index" label="序号" width="60" 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="market" label="所属地区" width="120" />
<el-table-column prop="orderCode" label="活动名称" width="120px" show-overflow-tooltip />
<el-table-column prop="refundType" label="产品名称" width="120" />
<el-table-column prop="refundType" label="产品数量" width="120" />
<el-table-column prop="refundType" label="付款币种" width="120" />
<el-table-column prop="refundType" label="付款金额" width="120" />
<el-table-column prop="refundType" label="支付方式" width="120" />
<el-table-column prop="refundType" label="付款时间" width="120" />
<el-table-column prop="refundType" label="转账凭证" width="120" />
<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="120" />
<el-table-column prop="goodNum" 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="120" />
<el-table-column prop="payTime" label="付款时间" width="180" />
<el-table-column prop="voucher" label="转账凭证" width="120" show-overflow-tooltip>
<template #default="scope">
<img v-if="scope.row.voucher" :src="scope.row.voucher" style="width: 40px; height: 40px;" />
<span v-else>无转账凭证</span>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip /> <el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="adminName" label="订单状态" width="120" />
<el-table-column prop="operation" label="操作" fixed="right" width="150px">
<el-table-column prop="status" label="订单状态" width="120">
<template #default="scope">
{{
[10, 20, 30, 40].includes(scope.row.status) ? '审核中' :
[12, 22, 32].includes(scope.row.status) ? '审核驳回' :
scope.row.status === 41 ? '退款完成' : scope.row.status
}}
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" fixed="right" width="100px">
<template #default="scope"> <template #default="scope">
<div class="operation"> <div class="operation">
<el-button v-if="row.status === '未审核'" type="primary" text @click="showBack = true">
<el-button v-if="scope.row.status === 10" type="primary" text
@click="showBackDialog(scope.row)">
撤回 撤回
</el-button> </el-button>
<el-button v-if="row.status === '已撤回'" type="primary" text @click="showEdit = true">
<el-button v-if="scope.row.status === 11" type="primary" text
@click="showEditDialog(scope.row)">
编辑 编辑
</el-button> </el-button>
<el-button v-if="scope.row.status !== 11 && scope.row.status !== 10" type="primary" text
@click="showSteps = true">
查看进度
</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -96,98 +111,82 @@
<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;">精网号</el-text>
<el-input v-model="addForm.jwcode" placeholder="请输入精网号" style="width:10vw;" clearable />
<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;">客户姓名</el-text>
<el-input v-model="addForm.name" placeholder="请输入客户姓名" style="width:10vw;" clearable />
<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;">所属地区</el-text>
<el-input v-model="addForm.market" placeholder="请输入所属地区" style="width:10vw;" clearable />
<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;">活动名称</el-text>
<el-input v-model="addForm.orderCode" placeholder="请输入活动名称" style="width:10vw;" clearable />
<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;">产品名称</el-text>
<el-select v-model="addForm.refundType" placeholder="请选择产品名称" style="width:10vw;" clearable>
<el-option v-for="item in products" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<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;">产品数量</el-text>
<el-input v-model="addForm.productQuantity" placeholder="请输入产品数量" style="width:10vw;" clearable />
<el-input v-model="editRow.goodNum" style="width:10vw;" disabled />
&nbsp; &nbsp;
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款币种</el-text> <el-text style="width:4vw;">付款币种</el-text>
<el-select v-model="addForm.refundCurrency" placeholder="请选择付款币种" style="width:10vw;" clearable>
<el-option v-for="item in currencies" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
<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;">付款金额</el-text>
<el-input v-model="addForm.refundAmount" placeholder="请输入付款金额" style="width:10vw;" clearable />
<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;">支付方式</el-text>
<el-select v-model="addForm.paymentMethod" placeholder="请选择支付方式" style="width:10vw;">
<el-option v-for="item in payments" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<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;">付款时间</el-text>
<el-date-picker v-model="addForm.paymentTime" type="datetime" style="width:10vw;"
placeholder="请选择付款时间" />
<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;" size="small">转账凭证</el-text>
<el-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
<el-upload ref="uploadRef" :auto-upload="false" :http-request="customUpload"
list-type="picture-card" :on-change="handleImageChange" :on-success="handleUploadSuccess"
:on-error="handleUploadError" :before-upload="beforeUpload" :show-file-list="false">
<template #default>
<img v-if="addForm.imageUrl" :src="addForm.imageUrl"
style="width: 100%; height: 100%; object-fit: cover;">
<el-icon v-else>
<Plus />
</el-icon>
</template>
</el-upload>
</el-form-item>
<el-text style="width:4vw;">转账凭证</el-text>
<img v-if="editRow.voucher" :src="editRow.voucher"
style="width: 100%; height: 100%; object-fit: cover;">
<div v-else>
无转账凭证
</div>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">备注</el-text> <el-text style="width:4vw;">备注</el-text>
<el-input v-model="addForm.remark" placeholder="请输入备注" style="width:10vw;" :rows="3" type="textarea"
maxLength="100" show-word-limit />
<el-input v-model="editRow.remark" style="width:10vw;" :rows="3" type="textarea" maxLength="100"
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;">退款模式</el-text>
<el-radio-group v-model="addForm.refundMode">
<el-radio value="1">全部退款</el-radio>
<el-radio value="2">部分退款</el-radio>
<el-radio-group v-model="editForm.refundModel">
<el-radio value="0">全部退款</el-radio>
<el-radio value="1">部分退款</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款理由</el-text> <el-text style="width:4vw;">退款理由</el-text>
<el-input v-model="addForm.refundReason" placeholder="请输入退款理由" style="width:10vw;" :rows="5"
maxlength="150" show-word-limit type="textarea" />
<el-input v-model="editForm.refundReason" style="width:10vw;" :rows="5" maxlength="150"
show-word-limit type="textarea" />
</div> </div>
<div>ps:请在备注中表明用户的退款需求</div>
<div>ps:请在退款理由表明用户的退款需求</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="">重置</el-button>
<el-button type="primary" @click="">提交</el-button>
<el-button type="default" @click="resetEdit">重置</el-button>
<el-button type="primary" @click="submitEdit">提交</el-button>
</div> </div>
</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" overflow draggable width="1206px" :style="{
backgroundImage: 'url(/src/assets/images/背景图.png)', backgroundImage: 'url(/src/assets/images/背景图.png)',
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
@ -224,17 +223,8 @@
</el-step> </el-step>
</el-steps> </el-steps>
</div> </div>
<div class="steps-status">
<el-steps style="min-width: 50vw" :active="1" finish-status="success" simple>
<el-step title="已通过" />
<el-step title="待审核" />
<el-step title="待审核" />
<el-step title="待审核" />
<el-step title="待审核" />
</el-steps>
</div>
<div class="steps-btn"> <div class="steps-btn">
<el-button type="primary">确定</el-button>
<el-button type="primary" @click="showSteps = false">确定</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -247,7 +237,7 @@
<div class="back-text"> </div> <div class="back-text"> </div>
<div class="back-btn"> <div class="back-btn">
<el-button type="default" @click="showBack = false">取消</el-button> <el-button type="default" @click="showBack = false">取消</el-button>
<el-button type="primary" @click="" style="margin-left: 2vw;">确定</el-button>
<el-button type="primary" @click="recall" style="margin-left: 2vw;">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -275,11 +265,17 @@ const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore) const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js" import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
const dateRange = ref([])
const searchForm = ref({ const searchForm = ref({
jwcode: ''
jwcode: '',
market: [],
statuses: []
}) })
const addForm = ref({
jwcode: ''
const backRow = ref({})//
const editRow = ref({})//
const editForm = ref({
refundModel: '',
refundReason: ''
}) })
const auditForm = ref({ const auditForm = ref({
refundType: '' refundType: ''
@ -291,57 +287,158 @@ const pagination = ref({
}) })
const tableData = ref([]) const tableData = ref([])
const showEdit = ref(false) const showEdit = ref(false)
const currentRow = ref({})//
const showSteps = ref(false) const showSteps = ref(false)
const uploadRef = ref(null) const uploadRef = ref(null)
const showBack = ref(false) const showBack = ref(false)
const showError = ref(false) const showError = ref(false)
const executor = ref([
const isKF = adminData.value.adminName.includes('客服')
const statusList = ref([
{ {
value: '1',
label: '亲爱的佳丽老师'
value: 'waiting',
label: '待审核',
}, },
{ {
value: '2',
label: '张三'
value: 'pending',
label: '审核中'
}, },
{ {
value: '3',
label: '李四'
},
value: 'completed',
label: '退款完成'
}
])
//
const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceShow)) {
ElMessage.error('无此权限')
return
}
try {
if (searchForm.value.statuses === 'completed') {
searchForm.value.statuses = [41]
} else if (searchForm.value.statuses === 'pending') {
searchForm.value.statuses = [20, 30, 40]
} else if (searchForm.value.statuses === 'waiting') {
searchForm.value.statuses = [10]
}
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDone: {
jwcode: searchForm.value.jwcode,//
name: searchForm.value.name,//
markets: searchForm.value.market,//
goodsName: searchForm.value.goodsName,//
statuses: searchForm.value.statuses,//1012
// 2022
// 3032
// 4041退
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') : "",
submitterId: isKF ? adminData.value.id : null
}
}
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
tableData.value = result.data.list || []
} catch (error) {
ElMessage.error(error.message || '查询失败')
}
}
//
const recall = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceBack)) {
ElMessage.error('无此权限')
return
}
try {
console.log(backRow.value)
const params = {
id: backRow.value.id,
status: backRow.value.status,
orderType: backRow.value.orderType
}
const result = await API({
url: '/Money/update',
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || '退款成功')
showBack.value = false
getRefund()
} else {
ElMessage.error(result.msg || '退款失败')
}
} catch (error) {
ElMessage.error(error.message || '退款失败')
}
}
//
const submitEdit = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceEdit)) {
ElMessage.error('无此权限')
return
}
try {
console.log(editRow.value)
const params = {
id: editRow.value.id,
status: editRow.value.status,
refundModel: editForm.value.refundModel,
refundReason: editForm.value.refundReason,
jwcode: editRow.value.jwcode,
paymentAmount: editRow.value.paymentAmount,
paymentCurrency: editRow.value.paymentCurrency
}
const result = await API({
url: '/Money/update',
data: params
})
if (result.code === 200) {
ElMessage.success(result.msg || '编辑成功')
showEdit.value = false
getRefund()
} else {
ElMessage.error(result.msg || '编辑失败')
}
} catch (error) {
ElMessage.error(error.message || '编辑失败')
}
}
const currencies = ref([
{ {
value: '4',
label: '王五'
value: '新币',
label: '新币'
}, },
{ {
value: '5',
label: '赵六'
value: '港币',
label: '港币'
}, },
{ {
value: '6',
label: '弘历黄总'
}
])
const products = ref([
{
value: '1',
label: '产品1'
value: '马币',
label: '马币'
}, },
{ {
value: '2',
label: '产品2'
}
])
const currencies = ref([
value: '加币',
label: '加币'
},
{ {
value: 'CNY',
label: '人民币'
value: '泰铢',
label: '泰铢'
}, },
{ {
value: 'USD',
label: '美元'
value: '越南盾',
label: '越南盾'
} }
]) ])
const payments = ref([{
const channelOptions = ref([{
value: '银行转账', value: '银行转账',
label: '银行转账' label: '银行转账'
}, },
@ -402,130 +499,42 @@ const payments = ref([{
label: 'Ipay88-Link平台' label: 'Ipay88-Link平台'
} }
]) ])
const statusList = ref([
{
value: '10',
label: '地区财务待审核'
},
{
value: '12',
label: '地区财务驳回'
},
{
value: '20',
label: '地区负责人待审核'
},
{
value: '22',
label: '地区负责人驳回'
},
{
value: '30',
label: '总部财务待审核'
},
{
value: '32',
label: '总部财务驳回'
},
{
value: '40',
label: '执行人待处理'
},
{
value: '41',
label: '退款完成'
const reset = function () {
searchForm.value = {
jwcode: ''
} }
])
//
const getRefund = async function () {
try {
const params = {
cashCollection: {
status: null,
//1012
// 2022
// 3032
// 4041退
orderCode: null,//
name: null,//
jwcode: null,//
market: null,//
goodsName: null,//
refundModel: null,//退,
startTime: "",
endTime: ""
}
}
const result = await API({
url: '/hljw/api/refund/query',
method: 'POST',
data: params
})
tableData.value = result.data || []
} catch (error) {
ElMessage.error(error.message || '查询失败')
dateRange.value = []
getRefund()
}
const resetEdit = function () {
editForm.value = {
refundModel: '',
refundReason: ''
} }
} }
const handleImageChange = (file) => {
uploadRef.value.submit()
const showBackDialog = function (row) {
backRow.value = row
showBack.value = true
} }
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
}
return true
const showEditDialog = function (row) {
editRow.value = row
showEdit.value = true
} }
const handleUploadSuccess = (response, file, fileList) => {
try {
addForm.value.imageUrl = response.data.url
console.log('==========================', response.data.url)
} catch (error) {
console.log('看看报错信息', error)
ElMessage.error(response.data.msg || '图片上传失败')
}
const handlePageSizeChange = function (val) {
pagination.value.pageSize = val
getRefund()
} }
const handleUploadError = (error) => {
console.error('上传失败:', error)
addForm.value.imageUrl = null
ElMessage.error('图片上传失败,请重试')
const handleCurrentChange = function (val) {
pagination.value.pageNum = val
getRefund()
} }
const customUpload = async (options) => {
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'
}
})
if (response.code === 200 && response.data) {
handleUploadSuccess(response, options.file, [options.file])
ElMessage.success(response.msg || '上传成功')
} else {
ElMessage.error(response.msg || '上传失败')
}
} catch (error) {
console.error('上传错误:', error)
ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
}
const disabledDate = (time) => {
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
} }
onMounted(() => { onMounted(() => {
getRefund()
console.log('???????????????????', adminData.value) console.log('???????????????????', adminData.value)
}) })
</script> </script>

Loading…
Cancel
Save