|
|
@ -49,8 +49,8 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-button type="primary" @click="getRefund">查询</el-button> |
|
|
<el-button type="primary" @click="getRefund">查询</el-button> |
|
|
<!-- <el-button type="warning">导出excel</el-button> |
|
|
|
|
|
<el-button type="primary">查看导出列表</el-button> --> |
|
|
|
|
|
|
|
|
<el-button type="warning" @click="exportExcel()">导出excel</el-button> |
|
|
|
|
|
<el-button type="primary" @click="openExportList">查看导出列表</el-button> |
|
|
<el-button type="success" @click="reset">重置</el-button> |
|
|
<el-button type="success" @click="reset">重置</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -63,7 +63,7 @@ |
|
|
<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="marketName" label="所属地区" width="120" /> |
|
|
<el-table-column prop="marketName" label="所属地区" width="120" /> |
|
|
<el-table-column prop="goodsName" label="产品名称" width="130" show-overflow-tooltip /> |
|
|
<el-table-column prop="goodsName" label="产品名称" width="130" show-overflow-tooltip /> |
|
|
<el-table-column prop="goodNum" label="产品数量" width="120" /> |
|
|
|
|
|
|
|
|
<el-table-column prop="goodsNum" label="产品数量" width="120" /> |
|
|
<el-table-column prop="refundModel" label="退款方式" width="120"> |
|
|
<el-table-column prop="refundModel" label="退款方式" width="120"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
{{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }} |
|
|
{{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }} |
|
|
@ -113,8 +113,8 @@ |
|
|
</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="auditRow.refundReason" size="small" style="width:10vw;" |
|
|
|
|
|
:rows="3" maxlength="100" show-word-limit type="textarea" disabled /> |
|
|
|
|
|
|
|
|
<el-input v-model="auditRow.refundReason" size="small" style="width:10vw;" :rows="3" maxlength="100" |
|
|
|
|
|
show-word-limit type="textarea" disabled /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<el-button @click="" class="smallTitle" size="small">原订单信息</el-button> |
|
|
<el-button @click="" class="smallTitle" size="small">原订单信息</el-button> |
|
|
@ -172,7 +172,7 @@ |
|
|
</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="auditRow.handlingCharge" size="small" style="width:10vw;" disabled /> |
|
|
|
|
|
|
|
|
<el-input v-model="auditRow.handlingCharges" 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> |
|
|
@ -226,7 +226,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #icon> |
|
|
<template #icon> |
|
|
<img src="@/assets/images/已审核.png" alt="已完成"> |
|
|
|
|
|
|
|
|
<img src="@/assets/images/refund-approved.png" alt="已完成"> |
|
|
</template> |
|
|
</template> |
|
|
</el-step> |
|
|
</el-step> |
|
|
|
|
|
|
|
|
@ -237,9 +237,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #icon> |
|
|
<template #icon> |
|
|
<img v-if="currentStep === 2" src="@/assets/images/已驳回.png" alt="已驳回"> |
|
|
|
|
|
<img v-else-if="currentStep === 1" src="@/assets/images/待审核.png" alt="待审核"> |
|
|
|
|
|
<img v-else-if="currentStep > 2" src="@/assets/images/已审核.png" alt="已审核"> |
|
|
|
|
|
|
|
|
<img v-if="currentStep === 2" src="@/assets/images/refund-rejected.png" alt="已驳回"> |
|
|
|
|
|
<img v-else-if="currentStep === 1" src="@/assets/images/refund-approving.png" alt="待审核"> |
|
|
|
|
|
<img v-else-if="currentStep > 2" src="@/assets/images/refund-approved.png" alt="已审核"> |
|
|
</template> |
|
|
</template> |
|
|
</el-step> |
|
|
</el-step> |
|
|
|
|
|
|
|
|
@ -250,10 +250,11 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #icon> |
|
|
<template #icon> |
|
|
<img v-if="currentStep === 4" src="@/assets/images/已驳回.png" alt="已驳回"> |
|
|
|
|
|
<img v-else-if="currentStep === 3" src="@/assets/images/待审核.png" alt="待审核"> |
|
|
|
|
|
<img v-else-if="currentStep > 3 && currentStep != 4" src="@/assets/images/已审核.png" alt="已审核"> |
|
|
|
|
|
<img v-else-if="currentStep < 3" src="@/assets/images/还没传到.png" alt="未开始"> |
|
|
|
|
|
|
|
|
<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" src="@/assets/images/refund-waiting.png" alt="未开始"> |
|
|
</template> |
|
|
</template> |
|
|
</el-step> |
|
|
</el-step> |
|
|
|
|
|
|
|
|
@ -264,10 +265,11 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #icon> |
|
|
<template #icon> |
|
|
<img v-if="currentStep === 6" src="@/assets/images/已驳回.png" alt="已驳回"> |
|
|
|
|
|
<img v-else-if="currentStep === 5" src="@/assets/images/待审核.png" alt="待审核"> |
|
|
|
|
|
<img v-else-if="currentStep > 5 && currentStep != 6" src="@/assets/images/已审核.png" alt="已审核"> |
|
|
|
|
|
<img v-else-if="currentStep < 5" src="@/assets/images/还没传到.png" alt="未开始"> |
|
|
|
|
|
|
|
|
<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" src="@/assets/images/refund-waiting.png" alt="未开始"> |
|
|
</template> |
|
|
</template> |
|
|
</el-step> |
|
|
</el-step> |
|
|
|
|
|
|
|
|
@ -278,9 +280,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #icon> |
|
|
<template #icon> |
|
|
<img v-if="currentStep === 7" src="@/assets/images/待审核.png" alt="待处理"> |
|
|
|
|
|
<img v-else-if="currentStep === 8" src="@/assets/images/已审核.png" alt="已完成"> |
|
|
|
|
|
<img v-else-if="currentStep < 7" src="@/assets/images/还没传到.png" alt="未开始"> |
|
|
|
|
|
|
|
|
<img v-if="currentStep === 7" src="@/assets/images/refund-approving.png" alt="待处理"> |
|
|
|
|
|
<img v-else-if="currentStep === 8" src="@/assets/images/refund-approved.png" alt="已完成"> |
|
|
|
|
|
<img v-else-if="currentStep < 7" src="@/assets/images/refund-waiting.png" alt="未开始"> |
|
|
</template> |
|
|
</template> |
|
|
</el-step> |
|
|
</el-step> |
|
|
</el-steps> |
|
|
</el-steps> |
|
|
@ -290,6 +292,37 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</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> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
|
<el-button text @click="exportListVisible = false">关闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
</template> |
|
|
</template> |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, onMounted } from 'vue' |
|
|
import { ref, onMounted } from 'vue' |
|
|
@ -302,8 +335,9 @@ import dayjs from 'dayjs' |
|
|
const adminStore = useAdminStore() |
|
|
const adminStore = useAdminStore() |
|
|
const { adminData, menuTree } = storeToRefs(adminStore) |
|
|
const { adminData, menuTree } = storeToRefs(adminStore) |
|
|
import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menuTreePermission.js" |
|
|
import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menuTreePermission.js" |
|
|
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
|
import RefundChargeBackground from '@/assets/images/背景图.png' |
|
|
|
|
|
|
|
|
import RefundChargeBackground from '@/assets/images/refund-progress.png' |
|
|
|
|
|
|
|
|
const currentStep = ref(0)// 进度图 |
|
|
const currentStep = ref(0)// 进度图 |
|
|
const searchForm = ref({ |
|
|
const searchForm = ref({ |
|
|
@ -332,6 +366,11 @@ const areaCharge = ref('')// 地区负责人 |
|
|
const headFinance = ref('')// 总部财务 |
|
|
const headFinance = ref('')// 总部财务 |
|
|
const executor = ref('')// 指定执行人 |
|
|
const executor = ref('')// 指定执行人 |
|
|
const uploadRef = ref(null) |
|
|
const uploadRef = ref(null) |
|
|
|
|
|
const exportListVisible = ref(false) |
|
|
|
|
|
const exportList = ref([]) |
|
|
|
|
|
// 导出列表加载状态 |
|
|
|
|
|
const exportListLoading = ref(false) |
|
|
|
|
|
|
|
|
const statusStepMap = { |
|
|
const statusStepMap = { |
|
|
10: [1, false], |
|
|
10: [1, false], |
|
|
12: [2, true], |
|
|
12: [2, true], |
|
|
@ -436,7 +475,7 @@ const getRefund = async function () { |
|
|
const params = { |
|
|
const params = { |
|
|
pageNum: pagination.value.pageNum, |
|
|
pageNum: pagination.value.pageNum, |
|
|
pageSize: pagination.value.pageSize, |
|
|
pageSize: pagination.value.pageSize, |
|
|
cashRecordDone: { |
|
|
|
|
|
|
|
|
cashRecordDTO: { |
|
|
jwcode: searchForm.value.jwcode,//精网号 |
|
|
jwcode: searchForm.value.jwcode,//精网号 |
|
|
name: searchForm.value.name,//姓名 |
|
|
name: searchForm.value.name,//姓名 |
|
|
markets: searchForm.value.markets,//地区 |
|
|
markets: searchForm.value.markets,//地区 |
|
|
@ -704,6 +743,106 @@ const getMarket = async function () { |
|
|
console.log('请求失败', error) |
|
|
console.log('请求失败', error) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
const exportExcel = async function () { |
|
|
|
|
|
const statuses = ref([20, 22, 30, 32, 40, 41]) // 看不到进度没到这里的 |
|
|
|
|
|
if (searchForm.value.statuses === '审核通过') { |
|
|
|
|
|
statuses.value = [30, 40] |
|
|
|
|
|
} else if (searchForm.value.statuses === '已驳回') { |
|
|
|
|
|
statuses.value = [22, 32] |
|
|
|
|
|
} else if (searchForm.value.statuses === '待审核') { |
|
|
|
|
|
statuses.value = [20] |
|
|
|
|
|
} else if (searchForm.value.statuses === '退款成功') { |
|
|
|
|
|
statuses.value = [41] |
|
|
|
|
|
} else { |
|
|
|
|
|
statuses.value = [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: statuses.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('导出成功') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const openExportList = () => { |
|
|
|
|
|
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 || '获取导出列表失败') |
|
|
|
|
|
} |
|
|
|
|
|
} 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('文件还在导出中,请稍后再试') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//根据状态返回对应的标签类型 |
|
|
|
|
|
const getTagType = (state) => { |
|
|
|
|
|
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 '未知状态'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
const hideReject = function () { |
|
|
const hideReject = function () { |
|
|
showReject.value = false |
|
|
showReject.value = false |
|
|
addForm.value.remark = '' |
|
|
addForm.value.remark = '' |
|
|
|