|
|
|
@ -2,7 +2,7 @@ |
|
|
|
<div class="content"> |
|
|
|
<div class="div-card1"> |
|
|
|
<el-card class="card1" style="margin-bottom: 0.5vh; min-height: 110px;"> |
|
|
|
<div class="row"> |
|
|
|
<div class="row1"> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">精网号</el-text> |
|
|
|
<el-input v-model="searchData.jwcode" placeholder="请输入精网号" style="width:10vw;" |
|
|
|
@ -34,10 +34,12 @@ |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="row" style="margin-top: 10px;"> |
|
|
|
<div class="row2" style="margin-top: 10px;"> |
|
|
|
<div class="left"> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">活动名称</el-text> |
|
|
|
<el-select v-model="searchData.activity" placeholder="请选择活动方式" style="width: 10vw;" clearable> |
|
|
|
<el-select v-model="searchData.activity" placeholder="请选择活动方式" style="width: 10vw;" |
|
|
|
clearable> |
|
|
|
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName" |
|
|
|
:value="item.id" /> |
|
|
|
</el-select> |
|
|
|
@ -47,18 +49,20 @@ |
|
|
|
<el-cascader v-model="searchData.goodsName" :options="productList" style="width: 10vw;" |
|
|
|
clearable /> |
|
|
|
</div> |
|
|
|
<div class="rowItem" style="width: 30vw"> |
|
|
|
<div class="rowItem" style="width: 25vw"> |
|
|
|
<el-text style="width: 4vw; margin-left: 0.5vw;">付款时间</el-text> |
|
|
|
<el-date-picker v-model="getTime" type="datetimerange" range-separator="至" |
|
|
|
start-placeholder="起始时间" end-placeholder="结束时间" style="width: 22vw; " |
|
|
|
@change="handleDatePickerChange" :default-time="defaultTime" |
|
|
|
:disabled-date="disabledDate" /> |
|
|
|
</div> |
|
|
|
<!-- 地区财务查询/重置按钮,删除客服相关按钮 --> |
|
|
|
<div class="buttons"> |
|
|
|
<el-button type="primary" @click="search">查询</el-button> |
|
|
|
<el-button type="success" @click="reset">重置</el-button> |
|
|
|
</div> |
|
|
|
<el-button style="width: 3vw;" type="primary" @click="search">查询</el-button> |
|
|
|
<el-button style="width: 3vw;" type="success" @click="reset">重置</el-button> |
|
|
|
<el-button v-if="activeTab == 'done'" style="width: 5vw;" type="warning" |
|
|
|
@click="exportExcel()">导出excel</el-button> |
|
|
|
<el-button v-if="activeTab == 'done'" style="width: 6vw;" type="primary" |
|
|
|
@click="openExportList">查看导出列表</el-button> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
@ -97,7 +101,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="table"> |
|
|
|
<el-table :data="tableData" style="width: 80vw;height:54vh;" @sort-change="handleSortChange" |
|
|
|
<el-table :data="tableData" style="width: 80vw;height:64vh;" @sort-change="handleSortChange" |
|
|
|
:row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }" |
|
|
|
:cell-style="{ textAlign: 'center' }"> |
|
|
|
<el-table-column type="index" label="序号" width="100px" fixed="left"> |
|
|
|
@ -231,6 +235,38 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 导出列表 --> |
|
|
|
<el-dialog v-model="exportListVisible" title="导出列表" width="60vw"> |
|
|
|
<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> |
|
|
|
|
|
|
|
<!-- 仅保留地区财务相关弹窗:审核弹窗、编辑手续费弹窗 --> |
|
|
|
<!-- 审核弹窗 --> |
|
|
|
<el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm"> |
|
|
|
@ -688,6 +724,123 @@ const closeConfirmRefund = () => { |
|
|
|
textContent.value = '' |
|
|
|
} |
|
|
|
|
|
|
|
//导出相关 |
|
|
|
const exportListVisible = ref(false) |
|
|
|
const exportList = ref([]) |
|
|
|
const exportListLoading = ref(false) |
|
|
|
const exportExcel = async function () { |
|
|
|
|
|
|
|
let payCurrencySelect = ''; |
|
|
|
let goodsName = ''; |
|
|
|
|
|
|
|
// 处理时间范围 |
|
|
|
if (getTime.value && getTime.value.length === 2) { |
|
|
|
searchData.value.startTime = moment(getTime.value[0]).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
searchData.value.endTime = moment(getTime.value[1]).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
} else { |
|
|
|
searchData.value.startTime = ''; |
|
|
|
searchData.value.endTime = ''; |
|
|
|
} |
|
|
|
|
|
|
|
// 处理产品名称(级联选择取最后一级) |
|
|
|
if (searchData.value.goodsName) { |
|
|
|
goodsName = searchData.value.goodsName[searchData.value.goodsName.length - 1]; |
|
|
|
} |
|
|
|
|
|
|
|
// 处理付款币种(转ID) |
|
|
|
if (searchData.value.paymentCurrency) { |
|
|
|
payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency); |
|
|
|
} |
|
|
|
|
|
|
|
const cashRoleId = '1'; |
|
|
|
const submitterMarket = adminData.value.markets; |
|
|
|
searchData.value.status = 46; |
|
|
|
const params = { |
|
|
|
...pageInfo.value, |
|
|
|
cashCollection: { |
|
|
|
...searchData.value, |
|
|
|
submitterId: adminData.value.id, |
|
|
|
receivedMarket: MarketNameForId(submitterMarket), |
|
|
|
cashRoleId: cashRoleId, |
|
|
|
paymentCurrency: payCurrencySelect, |
|
|
|
submitterMarket: submitterMarket, |
|
|
|
goodsName: goodsName, |
|
|
|
market: MarketNameForId(searchData.value.market) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const res = await API({ url: '/export/exportCash', data: params }) |
|
|
|
if (res.code === 200) { |
|
|
|
ElMessage.success('导出成功') |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg || '导出失败') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
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 === 13 |
|
|
|
}) |
|
|
|
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 '未知状态'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 2.1 数据加载:获取地区财务订单列表 |
|
|
|
const getlist = async () => { |
|
|
|
@ -1093,7 +1246,7 @@ onMounted(async () => { |
|
|
|
await getlist(); |
|
|
|
|
|
|
|
// 菜单权限校验(确保地区财务权限) |
|
|
|
if (!hasMenuPermission(menuTree.value, 79)) { |
|
|
|
if (!hasMenuPermission(menuTree.value, 67)) { |
|
|
|
ElMessageBox.alert( |
|
|
|
'您暂无该页面操作权限,请联系管理员', |
|
|
|
'权限提示', |
|
|
|
@ -1132,12 +1285,6 @@ const handlePagination = (type, val) => { |
|
|
|
width: 100%; |
|
|
|
background: #F3FAFE; |
|
|
|
|
|
|
|
.row { |
|
|
|
height: 4vh; |
|
|
|
width: 80vw; |
|
|
|
display: flex; |
|
|
|
min-height: 40px; |
|
|
|
|
|
|
|
.rowItem { |
|
|
|
display: flex; |
|
|
|
width: 15vw; |
|
|
|
@ -1146,11 +1293,30 @@ const handlePagination = (type, val) => { |
|
|
|
margin-right: 0.5vw; |
|
|
|
} |
|
|
|
|
|
|
|
.buttons { |
|
|
|
el-button { |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
.row1 { |
|
|
|
height: 4vh; |
|
|
|
width: 80vw; |
|
|
|
display: flex; |
|
|
|
min-height: 40px; |
|
|
|
} |
|
|
|
|
|
|
|
.row2 { |
|
|
|
height: 4vh; |
|
|
|
width: 80vw; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
margin-left: 10px; |
|
|
|
|
|
|
|
min-height: 40px; |
|
|
|
|
|
|
|
.left { |
|
|
|
height: 4vh; |
|
|
|
width: 58vw; |
|
|
|
display: flex; |
|
|
|
min-height: 40px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|