|
|
|
@ -11,18 +11,18 @@ |
|
|
|
<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-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item1"> |
|
|
|
<el-text size="large" style="width:4vw;">所属地区</el-text> |
|
|
|
<el-cascader style="width: 9vw;" v-model="searchForm.markets" :options="market" placeholder="请选择所属地区" |
|
|
|
clearable @change="handleMarketChange" /> |
|
|
|
</div> |
|
|
|
<div class="item1"> |
|
|
|
<el-text size="large" style="width:4vw;">产品名称</el-text> |
|
|
|
<el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item1"> |
|
|
|
<el-text size="large" style="width:4vw;">订单状态</el-text> |
|
|
|
<el-select v-model="searchForm.statuses" style="width:9vw;" clearable> |
|
|
|
<el-option v-for="item in statusList" :label="item" :value="item" :key="item" /> |
|
|
|
<el-option v-for="item in statusList" :label="item" :value="item" :key="item" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -57,7 +57,11 @@ |
|
|
|
|
|
|
|
<el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);"> |
|
|
|
<el-table :data="tableData" style="height:73vh;width:82vw"> |
|
|
|
<el-table-column type="index" label="序号" width="60" fixed="left" /> |
|
|
|
<el-table-column type="index" label="序号" width="60" fixed="left"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" /> |
|
|
|
<el-table-column prop="name" label="姓名" width="120" fixed="left" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="marketName" label="所属地区" width="120" /> |
|
|
|
@ -251,7 +255,8 @@ |
|
|
|
<template #icon> |
|
|
|
<img v-if="currentStep === 4" src="@/assets/images/refund-rejected.png" alt="已驳回"> |
|
|
|
<img v-else-if="currentStep === 3" src="@/assets/images/refund-approving.png" alt="待审核"> |
|
|
|
<img v-else-if="currentStep > 3 && currentStep != 4" src="@/assets/images/refund-approved.png" alt="已审核"> |
|
|
|
<img v-else-if="currentStep > 3 && currentStep != 4" |
|
|
|
src="@/assets/images/refund-approved.png" alt="已审核"> |
|
|
|
<img v-else-if="currentStep < 3" src="@/assets/images/refund-waiting.png" alt="未开始"> |
|
|
|
</template> |
|
|
|
</el-step> |
|
|
|
@ -265,7 +270,8 @@ |
|
|
|
<template #icon> |
|
|
|
<img v-if="currentStep === 6" src="@/assets/images/refund-rejected.png" alt="已驳回"> |
|
|
|
<img v-else-if="currentStep === 5" src="@/assets/images/refund-approving.png" alt="待审核"> |
|
|
|
<img v-else-if="currentStep > 5 && currentStep != 6" src="@/assets/images/refund-approved.png" alt="已审核"> |
|
|
|
<img v-else-if="currentStep > 5 && currentStep != 6" |
|
|
|
src="@/assets/images/refund-approved.png" alt="已审核"> |
|
|
|
<img v-else-if="currentStep < 5" src="@/assets/images/refund-waiting.png" alt="未开始"> |
|
|
|
</template> |
|
|
|
</el-step> |
|
|
|
@ -291,35 +297,35 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog v-model="exportListVisible" title="导出列表" width="80%"> |
|
|
|
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading"> |
|
|
|
<el-table-column prop="fileName" label="文件名" /> |
|
|
|
<el-table-column prop="state" label="状态"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> |
|
|
|
{{ getTagText(scope.row.state) }} |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="createTime" label="创建时间"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" |
|
|
|
:disabled="scope.row.state !== 2"> |
|
|
|
下载 |
|
|
|
</el-button> |
|
|
|
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading"> |
|
|
|
<el-table-column prop="fileName" label="文件名" /> |
|
|
|
<el-table-column prop="state" label="状态"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> |
|
|
|
{{ getTagText(scope.row.state) }} |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="createTime" label="创建时间"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" |
|
|
|
:disabled="scope.row.state !== 2"> |
|
|
|
下载 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<el-button text @click="exportListVisible = false">关闭</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<el-button text @click="exportListVisible = false">关闭</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
|
<script setup> |
|
|
|
import { ref, onMounted } from 'vue' |
|
|
|
@ -333,7 +339,7 @@ const adminStore = useAdminStore() |
|
|
|
const { adminData, menuTree } = storeToRefs(adminStore) |
|
|
|
import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menuTreePermission.js" |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
import { productList } from '@/views/moneyManage/receiveDetail/utils/staticData.js' |
|
|
|
import RefundFinanceBackground from '@/assets/images/refund-progress.png' |
|
|
|
|
|
|
|
const currentStep = ref(0)// 进度图 |
|
|
|
@ -441,7 +447,7 @@ const statusStepMap = { |
|
|
|
40: [7, false], |
|
|
|
41: [8, false] |
|
|
|
} |
|
|
|
const statusList = ref(['待审核','审核通过','已驳回','退款成功']) |
|
|
|
const statusList = ref(['待审核', '审核通过', '已驳回', '退款成功']) |
|
|
|
// 查全部 |
|
|
|
const getRefund = async function () { |
|
|
|
if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_finance_refund)) { |
|
|
|
@ -449,7 +455,7 @@ const getRefund = async function () { |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|
const statusParam = ref([10,20,22,30,32,40,41]) |
|
|
|
const statusParam = ref([10, 20, 22, 30, 32, 40, 41]) |
|
|
|
if (searchForm.value.statuses === '审核通过') { |
|
|
|
statusParam.value = [20, 30, 40] |
|
|
|
} else if (searchForm.value.statuses === '已驳回') { |
|
|
|
@ -459,7 +465,7 @@ const getRefund = async function () { |
|
|
|
} else if (searchForm.value.statuses === '退款成功') { |
|
|
|
statusParam.value = [41] |
|
|
|
} else { |
|
|
|
statusParam.value = [10,20,22,30,32,40,41] |
|
|
|
statusParam.value = [10, 20, 22, 30, 32, 40, 41] |
|
|
|
} |
|
|
|
const params = { |
|
|
|
pageNum: pagination.value.pageNum, |
|
|
|
@ -620,135 +626,6 @@ const channelOptions = ref([{ |
|
|
|
label: 'Ipay88-链接收款' |
|
|
|
} |
|
|
|
]) |
|
|
|
const productList = [ |
|
|
|
{ |
|
|
|
"value": "金币产品", |
|
|
|
"label": "金币产品", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "金币充值", |
|
|
|
"label": "金币充值", |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "软件产品", |
|
|
|
"label": "软件产品", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "美股", |
|
|
|
"label": "美股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "美股软件", |
|
|
|
"label": "美股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "港股", |
|
|
|
"label": "港股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "港股软件", |
|
|
|
"label": "港股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "A股", |
|
|
|
"label": "A股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "A股软件", |
|
|
|
"label": "A股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "新加坡股", |
|
|
|
"label": "新加坡股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "新加坡股软件", |
|
|
|
"label": "新加坡股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "马股", |
|
|
|
"label": "马股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "马股软件", |
|
|
|
"label": "马股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "日本股", |
|
|
|
"label": "日本股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "日本股软件", |
|
|
|
"label": "日本股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "泰股", |
|
|
|
"label": "泰股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "泰股软件", |
|
|
|
"label": "泰股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "越南股", |
|
|
|
"label": "越南股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "越南股软件", |
|
|
|
"label": "越南股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "印尼股", |
|
|
|
"label": "印尼股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "印尼股软件", |
|
|
|
"label": "印尼股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "韩国股", |
|
|
|
"label": "韩国股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "韩国股软件", |
|
|
|
"label": "韩国股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"value": "台湾股", |
|
|
|
"label": "台湾股", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"value": "台湾股软件", |
|
|
|
"label": "台湾股软件" |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
const getMarket = async function () { |
|
|
|
try { |
|
|
|
const result = await API({ |
|
|
|
@ -803,107 +680,107 @@ const showStep = function (row) { |
|
|
|
showSteps.value = true |
|
|
|
} |
|
|
|
const exportExcel = async function () { |
|
|
|
const statusParam = ref([10,20,22,30,32,40,41]) |
|
|
|
if (searchForm.value.statuses === '审核通过') { |
|
|
|
statusParam.value = [20, 30, 40] |
|
|
|
} else if (searchForm.value.statuses === '已驳回') { |
|
|
|
statusParam.value = [12, 22, 32] |
|
|
|
} else if (searchForm.value.statuses === '待审核') { |
|
|
|
statusParam.value = [10] |
|
|
|
} else if (searchForm.value.statuses === '退款成功') { |
|
|
|
statusParam.value = [41] |
|
|
|
} else { |
|
|
|
statusParam.value = [10,20,22,30,32,40,41] |
|
|
|
} |
|
|
|
const params = { |
|
|
|
pageNum: pagination.value.pageNum, |
|
|
|
pageSize: pagination.value.pageSize, |
|
|
|
cashRecordDTO: { |
|
|
|
jwcode: searchForm.value.jwcode,//精网号 |
|
|
|
name: searchForm.value.name,//姓名 |
|
|
|
markets: searchForm.value.markets,//地区 |
|
|
|
goodsNames: searchForm.value.goodsName,//商品名 |
|
|
|
statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; |
|
|
|
// 20:地区负责人待审核;22:地区负责人驳回; |
|
|
|
// 30:总部财务待审核;32:总部财务驳回; |
|
|
|
// 40:执行人待处理;41:执行人已处理,退款完成; |
|
|
|
paymentCurrency: searchForm.value.paymentCurrency,//付款币种 |
|
|
|
payType: searchForm.value.payType,//支付方式 |
|
|
|
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "", |
|
|
|
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "", |
|
|
|
adminId: adminData.value.id |
|
|
|
} |
|
|
|
const statusParam = ref([10, 20, 22, 30, 32, 40, 41]) |
|
|
|
if (searchForm.value.statuses === '审核通过') { |
|
|
|
statusParam.value = [20, 30, 40] |
|
|
|
} else if (searchForm.value.statuses === '已驳回') { |
|
|
|
statusParam.value = [12, 22, 32] |
|
|
|
} else if (searchForm.value.statuses === '待审核') { |
|
|
|
statusParam.value = [10] |
|
|
|
} else if (searchForm.value.statuses === '退款成功') { |
|
|
|
statusParam.value = [41] |
|
|
|
} else { |
|
|
|
statusParam.value = [10, 20, 22, 30, 32, 40, 41] |
|
|
|
} |
|
|
|
const params = { |
|
|
|
pageNum: pagination.value.pageNum, |
|
|
|
pageSize: pagination.value.pageSize, |
|
|
|
cashRecordDTO: { |
|
|
|
jwcode: searchForm.value.jwcode,//精网号 |
|
|
|
name: searchForm.value.name,//姓名 |
|
|
|
markets: searchForm.value.markets,//地区 |
|
|
|
goodsNames: searchForm.value.goodsName,//商品名 |
|
|
|
statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; |
|
|
|
// 20:地区负责人待审核;22:地区负责人驳回; |
|
|
|
// 30:总部财务待审核;32:总部财务驳回; |
|
|
|
// 40:执行人待处理;41:执行人已处理,退款完成; |
|
|
|
paymentCurrency: searchForm.value.paymentCurrency,//付款币种 |
|
|
|
payType: searchForm.value.payType,//支付方式 |
|
|
|
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "", |
|
|
|
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "", |
|
|
|
adminId: adminData.value.id |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const res = await API({ url: '/export/exportFinance', data: params }) |
|
|
|
if (res.code === 200) { |
|
|
|
ElMessage.success('导出成功') |
|
|
|
}else{ |
|
|
|
ElMessage.error(res.msg || '导出失败') |
|
|
|
} |
|
|
|
const res = await API({ url: '/export/exportFinance', data: params }) |
|
|
|
if (res.code === 200) { |
|
|
|
ElMessage.success('导出成功') |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg || '导出失败') |
|
|
|
} |
|
|
|
} |
|
|
|
const openExportList = () => { |
|
|
|
getExportList() |
|
|
|
exportListVisible.value = true |
|
|
|
getExportList() |
|
|
|
exportListVisible.value = true |
|
|
|
} |
|
|
|
const getExportList = async () => { |
|
|
|
exportListLoading.value = true |
|
|
|
try { |
|
|
|
const result = await API({ url: '/export/export' }) |
|
|
|
if (result.code === 200) { |
|
|
|
const filteredData = result.data.filter(item => { |
|
|
|
return item.type === 12 |
|
|
|
}) |
|
|
|
exportList.value = filteredData |
|
|
|
} else { |
|
|
|
ElMessage.error(result.msg || '获取导出列表失败') |
|
|
|
exportListLoading.value = true |
|
|
|
try { |
|
|
|
const result = await API({ url: '/export/export' }) |
|
|
|
if (result.code === 200) { |
|
|
|
const filteredData = result.data.filter(item => { |
|
|
|
return item.type === 12 |
|
|
|
}) |
|
|
|
exportList.value = filteredData |
|
|
|
} else { |
|
|
|
ElMessage.error(result.msg || '获取导出列表失败') |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error('获取导出列表出错:', error) |
|
|
|
ElMessage.error('获取导出列表失败,请稍后重试') |
|
|
|
} finally { |
|
|
|
exportListLoading.value = false |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error('获取导出列表出错:', error) |
|
|
|
ElMessage.error('获取导出列表失败,请稍后重试') |
|
|
|
} finally { |
|
|
|
exportListLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
const downloadExportFile = (item) => { |
|
|
|
if (item.state === 2) { |
|
|
|
const link = document.createElement('a') |
|
|
|
link.href = item.url |
|
|
|
link.download = item.fileName |
|
|
|
link.click() |
|
|
|
} else { |
|
|
|
ElMessage.warning('文件还在导出中,请稍后再试') |
|
|
|
} |
|
|
|
if (item.state === 2) { |
|
|
|
const link = document.createElement('a') |
|
|
|
link.href = item.url |
|
|
|
link.download = item.fileName |
|
|
|
link.click() |
|
|
|
} else { |
|
|
|
ElMessage.warning('文件还在导出中,请稍后再试') |
|
|
|
} |
|
|
|
} |
|
|
|
//根据状态返回对应的标签类型 |
|
|
|
const getTagType = (state) => { |
|
|
|
switch (state) { |
|
|
|
case 0: |
|
|
|
return 'info'; |
|
|
|
case 1: |
|
|
|
return 'primary'; |
|
|
|
case 2: |
|
|
|
return 'success'; |
|
|
|
case 3: |
|
|
|
return 'danger'; |
|
|
|
default: |
|
|
|
return 'info'; |
|
|
|
} |
|
|
|
switch (state) { |
|
|
|
case 0: |
|
|
|
return 'info'; |
|
|
|
case 1: |
|
|
|
return 'primary'; |
|
|
|
case 2: |
|
|
|
return 'success'; |
|
|
|
case 3: |
|
|
|
return 'danger'; |
|
|
|
default: |
|
|
|
return 'info'; |
|
|
|
} |
|
|
|
} |
|
|
|
//根据状态返回对应的标签文案 |
|
|
|
const getTagText = (state) => { |
|
|
|
switch (state) { |
|
|
|
case 0: |
|
|
|
return '待执行'; |
|
|
|
case 1: |
|
|
|
return '执行中'; |
|
|
|
case 2: |
|
|
|
return '执行完成'; |
|
|
|
case 3: |
|
|
|
return '执行出错'; |
|
|
|
default: |
|
|
|
return '未知状态'; |
|
|
|
} |
|
|
|
switch (state) { |
|
|
|
case 0: |
|
|
|
return '待执行'; |
|
|
|
case 1: |
|
|
|
return '执行中'; |
|
|
|
case 2: |
|
|
|
return '执行完成'; |
|
|
|
case 3: |
|
|
|
return '执行出错'; |
|
|
|
default: |
|
|
|
return '未知状态'; |
|
|
|
} |
|
|
|
} |
|
|
|
const showAudit2 = function (row) { |
|
|
|
auditRow.value = row |
|
|
|
|