@@ -1002,6 +1002,32 @@ export const settlement = [ | |||
), | |||
}, | |||
}, | |||
{ | |||
path: "/views/settlement/reportManagement/alipayEtcTollConfirmation", | |||
name: "alipayEtcTollConfirmation", | |||
meta: { title: "ETC通行费确认单(支付宝)", isAuth: true }, | |||
components: { | |||
key: () => | |||
import( | |||
"@/views/settlement/reportManagement/alipayEtcTollConfirmation/index.vue" | |||
), | |||
}, | |||
}, | |||
{ | |||
path: "/views/settlement/reportManagement/channelEtcTollConfirmation", | |||
name: "channelEtcTollConfirmation", | |||
meta: { title: "ETC通行费确认单(渠道)", isAuth: true }, | |||
components: { | |||
key: () => | |||
import( | |||
"@/views/settlement/reportManagement/channelEtcTollConfirmation/index.vue" | |||
), | |||
}, | |||
}, | |||
/* -------------财务收支管理------------ */ | |||
{ | |||
path: "/views/settlement/financeManagement/revenueExpendStatistics", |
@@ -30,16 +30,6 @@ export default function crudConfig(route) { | |||
jhlkAmountSum: 0, | |||
totalAmountSum: 0, | |||
centerAmountSum: 0, | |||
// qtzlCardSum: 0, | |||
// icbcPeonyCardSum: 0, | |||
// ccbQtzlDragonCardSum: 0, | |||
// totalAmountSum: 0, | |||
// cardCenterAmountSum: 0, | |||
// cardDifferenceSum: 0, | |||
// supplementaryDepositSum: 0, | |||
// supCenterAmountSum: 0, | |||
// supDifferenceSum: 0, | |||
// supTotalAmountSum: 0, | |||
}, | |||
crudShow: true, //是否显示CURD操作栏 (默认true) | |||
crud: { | |||
@@ -187,15 +177,21 @@ export default function crudConfig(route) { | |||
prop: 'centerAmount', | |||
isAmount: true, | |||
unit: '元', | |||
funRuleStarts: true, | |||
funRule: (money: any) => { | |||
return (money === 0 ? 0 : money / 100) + '元' | |||
}, | |||
form: { | |||
formLabelWidth, | |||
width: '90%', | |||
checkContent: 'money', | |||
formLabelWidth: formLabelWidth, | |||
type: 'input', | |||
checkContent: 'integer', | |||
integerlength: 9, | |||
position:"right", | |||
// itemType: 'number', | |||
required: true, | |||
min:0 | |||
// integerlength: 9, | |||
// position:"right", | |||
// itemType: 'number', | |||
// min:0 | |||
}, | |||
}, | |||
{ |
@@ -131,7 +131,6 @@ | |||
//编辑与添加提交 | |||
function submit(data: any) { | |||
debugger | |||
let api = '' | |||
if (typeOption.value === 'edit') { | |||
api = '/settlew/notice/outTransNotice/edit' |
@@ -0,0 +1,243 @@ | |||
import { ref } from "vue"; | |||
import { IsPermission } from "@/router/routerUtil"; | |||
// crud表格配置 | |||
export default function crudConfig(route) { | |||
const formLabelWidth = "230px"; | |||
const form = { | |||
formLabelWidth, | |||
width: "50%", | |||
type: "input", | |||
hideEdit: true, | |||
}; | |||
const field = ref({ | |||
tabSize: "small", //Table 的尺寸 large / default /small (默认default) | |||
searchShow: true, //是否显示搜索模块(默认false) | |||
border: true, //是否添加边框(默认false) | |||
dialogCustom: false, //自定义Dialog (默认false) | |||
dialogFooter: false, //隐藏弹窗页脚显示 (默认false) | |||
dialogWidth: "50%", //dialog宽度 (默认40%) | |||
crudChildShow: true, //是否显示CURD子操作栏 (默认true) | |||
paginStart: true, //是否显示分页查询 (默认false) | |||
isPageSizes: true, | |||
pageLayout: "total, sizes, prev, pager, next", | |||
titleDialog: "", //table 标题 | |||
paging: { | |||
pageSize: 10, | |||
currentPage: 1, | |||
total: 0, | |||
}, | |||
crudShow: true, //是否显示CURD操作栏 (默认true) | |||
crud: { | |||
//配合crudShow,为true是可配置此 | |||
add: false, | |||
edit: false, | |||
delete: false, | |||
derive: false, //导出 | |||
search: false, | |||
refresh: false, | |||
}, | |||
searchOperation: { | |||
isInitiateApproval: false, //发起审批 | |||
initiateApprovalData: { | |||
key: "statistical_management", | |||
processName: "集团数据统计表", | |||
reqFileName: "SETTLE_GROUPCARD_IMPORT", | |||
}, | |||
isDownload: IsPermission(route, "DERIVE_BASE"), //开启下载 | |||
isAdd: false, | |||
isTransferMachine: false, | |||
isTemplate: false, | |||
templateUrl: | |||
import.meta.env.VITE_APP_UPLOAD_URL + | |||
"sett-minio/template/统计管理/集团卡通行消费记录导入模板.xlsx", | |||
templateFileName: "集团数据统计表导入模板", | |||
isToLead: false, //导入 | |||
minioBucket: { bucket: "sett-minio" }, //指定桶为sett-minio | |||
}, | |||
tableSize: -1, | |||
operateShow: true, //是否为表格添加操作栏(默认true) | |||
operateTitle: "操作", //操作栏标题(默认为"") | |||
operateFixed: false, //操作栏是否固定(默认false) | |||
operateWidth: "150", //操作栏宽度 | |||
operate: { | |||
edit: IsPermission(route, "EDIT_LIST"), //是否编辑(默认true) | |||
delete: false, //是否删除(默认true) | |||
announcement: false, // 公告 | |||
remark: false, // 查看 | |||
info: IsPermission(route, "INFO_LIST"), //详情 | |||
forbidden: false, // 禁用 | |||
enable: false, // 启用 | |||
authorization: false, // 授权 | |||
cancel: false, // 取消订单 | |||
writeOff: false, // 注销 | |||
make: false, // 补缴 | |||
}, | |||
extend: [ | |||
{ | |||
type: "index", | |||
label: "序号", | |||
}, | |||
], | |||
field: [ | |||
{ | |||
label: '年份', | |||
prop: 'statisticalDate', | |||
form, | |||
}, | |||
{ | |||
label: '交易金额', | |||
prop: 'jiaoyijiner', | |||
children: [ | |||
{ | |||
label: '在线支付(元)', | |||
prop: 'transOnline', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '转账(元)', | |||
prop: 'transZz', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '退款(元)', | |||
prop: 'transRefund', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '退转账(元)', | |||
prop: 'transZzRefund', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '现金退回(元)', | |||
prop: 'transCashRefund', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '合计(元)', | |||
prop: 'transToll', | |||
isAmount: true, | |||
form, | |||
}, | |||
], | |||
}, | |||
{ | |||
label: '银行收款', | |||
prop: 'yinhangshoukuan', | |||
children: [ | |||
{ | |||
label: '银行收款(元)', | |||
prop: 'bankCollection', | |||
isAmount: true, | |||
unit: '元', | |||
form: { | |||
formLabelWidth, | |||
width: '90%', | |||
type: 'input', | |||
checkContent: 'money', | |||
required: true, | |||
}, | |||
}, | |||
{ | |||
label: '合计(元)', | |||
prop: 'bankToll', | |||
isAmount: true, | |||
form, | |||
}, | |||
], | |||
}, | |||
{ | |||
label: '手续费', | |||
prop: 'shouxufei', | |||
children: [ | |||
{ | |||
label: '收费(元)', | |||
prop: 'handlingFee', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '退收费(元)', | |||
prop: 'handlingRefund', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '合计(元)', | |||
prop: 'handlingToll', | |||
isAmount: true, | |||
form, | |||
}, | |||
], | |||
}, | |||
{ | |||
label: '余额', | |||
prop: 'yuer', | |||
children: [ | |||
{ | |||
label: '黔通智联期末余额(元)', | |||
prop: 'balanceQtzl', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '商户号已提现银行未达收款额(元)', | |||
prop: 'balanceWd', | |||
isAmount: true, | |||
unit: '元', | |||
form: { | |||
formLabelWidth, | |||
width: '90%', | |||
type: 'input', | |||
checkContent: 'money', | |||
required: true, | |||
}, | |||
}, | |||
{ | |||
label: '支付宝余额(元)', | |||
prop: 'balanceZfb', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '未到账合计(元)', | |||
prop: 'wdzToll', | |||
isAmount: true, | |||
form, | |||
}, | |||
], | |||
}, | |||
{ | |||
label: '期初数(元)', | |||
prop: 'initialNum', | |||
isAmount: true, | |||
unit: '元', | |||
form: { | |||
formLabelWidth, | |||
width: '90%', | |||
type: 'input', | |||
checkContent: 'money', | |||
required: true, | |||
}, | |||
}, | |||
{ | |||
label: '校验', | |||
prop: 'validateNum', | |||
form, | |||
}, | |||
], | |||
}); | |||
return { | |||
field, | |||
}; | |||
} |
@@ -0,0 +1,197 @@ | |||
<template> | |||
<div> | |||
<crud-template class="as-weight" :ref="(el) => (crudRef = el)" :home-data="field" @generateAeport="generateAeport" | |||
@handleEdit="handleEdit" @submit="submit" | |||
@btnSearch="btnSearch" @refreshLeft="refreshLeft" :tableData="tableData" @CurrentChange="handleCurrentChange" | |||
@importData="handleSuccess" @download="downloadHandle" @pageSizeChange="(val) => { | |||
field.paging.currentPage = 1 | |||
field.paging.pageSize = val | |||
getList() | |||
} | |||
"> | |||
<template #search> | |||
<div class="date-label">统计时间:</div> | |||
<el-date-picker unlink-panels v-model="timeValue" type="monthrange" range-separator="到" | |||
start-placeholder="统计开始日期" end-placeholder="统计结束日期" value-format="YYYY-MM" format="YYYY-MM" | |||
@change="dateChangeHandle"/> | |||
</template> | |||
<!-- <template #operation="{ scope }">--> | |||
<!-- <el-button v-if="IsPermission(route, 'INFO_LIST_LEVEL2')" size="small" type="success" @click="showInfo(scope.row)">详情</el-button>--> | |||
<!-- </template>--> | |||
</crud-template> | |||
</div> | |||
</template> | |||
<!-- 集团数据统计样表 --> | |||
<script lang="ts" setup> | |||
// @ts-ignore crudFrom模板 | |||
import CrudTemplate from '@/crud/index.vue' | |||
import { ref, onMounted } from 'vue' | |||
import { ElMessage } from 'element-plus' | |||
// 请求函数 | |||
// @ts-ignore | |||
import BaseService from '@/utils/baseService' | |||
//crud配置 | |||
import crudConfig from './crudConfig' | |||
import { useRoute } from 'vue-router'; | |||
import { IsPermission } from "@/router/routerUtil"; | |||
const route = useRoute() | |||
// 拿到配置 | |||
const { field } = crudConfig(route) | |||
const defaultTime: any = getDefaultTime('month', 0, 'YYYY-MM') | |||
const timeValue = ref(defaultTime) | |||
function dateChangeHandle(val) { | |||
if (val) { | |||
searchForm.value.statisticalDateStart = val[0] | |||
searchForm.value.statisticalDateEnd = val[1] | |||
} else { | |||
searchForm.value.statisticalDateStart = '' | |||
searchForm.value.statisticalDateEnd = '' | |||
} | |||
} | |||
//整个crud虚拟dom | |||
const crudRef = ref() | |||
// 获取数据,查询条件 | |||
const searchForm = ref({ | |||
statisticalDateStart: defaultTime[0], //开始时间 | |||
statisticalDateEnd: defaultTime[1], //结束时间 | |||
}) | |||
const tableData = ref([]) | |||
// 搜索按钮 | |||
function btnSearch() { | |||
field.value.paging.currentPage = 1 | |||
getList() | |||
} | |||
// 搜索重置 | |||
function refreshLeft() { | |||
field.value.paging.currentPage = 1 | |||
searchForm.value = { | |||
statisticalDateStart: defaultTime[0], //开始时间 | |||
statisticalDateEnd: defaultTime[1], //结束时间 | |||
} | |||
tableData.value = [] | |||
timeValue.value = defaultTime | |||
getList() | |||
} | |||
onMounted(() => { | |||
getList() | |||
}) | |||
// 处理请求参数 | |||
// 处理请求参数 | |||
const handleParams = () => { | |||
let params: any = { | |||
pageNo: field.value.paging.currentPage, | |||
pageSize: field.value.paging.pageSize, | |||
...searchForm.value, | |||
} | |||
return params | |||
} | |||
// 获取数据 | |||
function getList() { | |||
const params = handleParams() | |||
crudRef.value.tableLoding = true //表格loading效果 | |||
BaseService.postN('/settlew/report/etcConfirmZfb/pageQuery', params).then( | |||
(res: any) => { | |||
crudRef.value.tableLoding = false | |||
if (res && res.code === 0) { | |||
let bizContent = res.data | |||
let data = bizContent.result || [] | |||
tableData.value = data | |||
field.value.paging.total = bizContent.totalCount | |||
// field.value.paging.amountAll = bizContent.amountAll | |||
} else { | |||
ElMessage.error(res.message) | |||
} | |||
} | |||
) | |||
} | |||
// 处理当前页数 | |||
function handleCurrentChange(val: number) { | |||
field.value.paging.currentPage = val | |||
getList() | |||
} | |||
// 编辑按钮 | |||
const typeOption = ref(""); | |||
function handleEdit(idx: any, row: any) { | |||
typeOption.value = "edit" | |||
} | |||
// 取消 | |||
function cancel() { | |||
crudRef.value.reset(); | |||
crudRef.value.dialogFormVisible = false; | |||
} | |||
//编辑与添加提交 | |||
function submit(data: any) { | |||
debugger | |||
let api = '' | |||
if (typeOption.value === 'edit') { | |||
api = '/settlew/report/etcConfirmZfb/edit' | |||
} | |||
let params: any = { | |||
id: data.id, | |||
...data, | |||
} | |||
BaseService.post(api, params).then((res: any) => { | |||
if (res && res.code === 0) { | |||
let bizContent = res.data | |||
ElMessage.success("操作成功"); | |||
getList(); | |||
cancel(); | |||
} else { | |||
ElMessage.error(res.message) | |||
} | |||
}) | |||
} | |||
/***********上传下载**************/ | |||
// @ts-ignore | |||
import {exportFn, getDefaultTime, importFn, reportExportFn} from '@/views/settlement/exportFn' | |||
// 文件上传到minio后触发 | |||
const handleSuccess = (url: any, reportFileName: any) => { | |||
importFn( | |||
'933c1d25cb4645abb218b854c5ab9936', | |||
() => { | |||
getList() | |||
}, | |||
{ | |||
excelUrl: url, | |||
reportFileName, | |||
} | |||
) | |||
} | |||
// 生成报表 | |||
function generateAeport() { | |||
const params = handleParams() | |||
console.log(params) | |||
reportExportFn('/settlew/groupcard/find', params, '集团数据统计样表') | |||
.then((res) => { | |||
const initiateApprovalData = | |||
field.value.searchOperation.initiateApprovalData | |||
field.value.searchOperation.initiateApprovalData = { | |||
...initiateApprovalData, | |||
...res, | |||
} | |||
}) | |||
.finally(() => { | |||
console.log('error') | |||
}) | |||
} | |||
// 下载 | |||
const downloadHandle = () => { | |||
const params = handleParams() | |||
exportFn('/settlew/groupcard/find', params, '集团数据统计样表') | |||
} | |||
</script> | |||
<style scoped lang="less"></style> |
@@ -0,0 +1,188 @@ | |||
import { ref } from "vue"; | |||
import { IsPermission } from "@/router/routerUtil"; | |||
// crud表格配置 | |||
export default function crudConfig(route) { | |||
const formLabelWidth = "230px"; | |||
const form = { | |||
formLabelWidth, | |||
width: "50%", | |||
type: "input", | |||
hideEdit: true, | |||
}; | |||
const field = ref({ | |||
tabSize: "small", //Table 的尺寸 large / default /small (默认default) | |||
searchShow: true, //是否显示搜索模块(默认false) | |||
border: true, //是否添加边框(默认false) | |||
dialogCustom: false, //自定义Dialog (默认false) | |||
dialogFooter: false, //隐藏弹窗页脚显示 (默认false) | |||
dialogWidth: "50%", //dialog宽度 (默认40%) | |||
crudChildShow: true, //是否显示CURD子操作栏 (默认true) | |||
paginStart: true, //是否显示分页查询 (默认false) | |||
isPageSizes: true, | |||
pageLayout: "total, sizes, prev, pager, next", | |||
titleDialog: "", //table 标题 | |||
paging: { | |||
pageSize: 10, | |||
currentPage: 1, | |||
total: 0, | |||
}, | |||
crudShow: true, //是否显示CURD操作栏 (默认true) | |||
crud: { | |||
//配合crudShow,为true是可配置此 | |||
add: false, | |||
edit: false, | |||
delete: false, | |||
derive: false, //导出 | |||
search: false, | |||
refresh: false, | |||
}, | |||
searchOperation: { | |||
isInitiateApproval: false, //发起审批 | |||
initiateApprovalData: { | |||
key: "statistical_management", | |||
processName: "集团数据统计表", | |||
reqFileName: "SETTLE_GROUPCARD_IMPORT", | |||
}, | |||
isDownload: IsPermission(route, "DERIVE_BASE"), //开启下载 | |||
isAdd: false, | |||
isTransferMachine: false, | |||
isTemplate: false, | |||
templateUrl: | |||
import.meta.env.VITE_APP_UPLOAD_URL + | |||
"sett-minio/template/统计管理/集团卡通行消费记录导入模板.xlsx", | |||
templateFileName: "集团数据统计表导入模板", | |||
isToLead: false, //导入 | |||
minioBucket: { bucket: "sett-minio" }, //指定桶为sett-minio | |||
}, | |||
tableSize: -1, | |||
operateShow: true, //是否为表格添加操作栏(默认true) | |||
operateTitle: "操作", //操作栏标题(默认为"") | |||
operateFixed: false, //操作栏是否固定(默认false) | |||
operateWidth: "150", //操作栏宽度 | |||
operate: { | |||
edit: IsPermission(route, "EDIT_LIST"), //是否编辑(默认true) | |||
delete: false, //是否删除(默认true) | |||
announcement: false, // 公告 | |||
remark: false, // 查看 | |||
info: IsPermission(route, "INFO_LIST"), //详情 | |||
forbidden: false, // 禁用 | |||
enable: false, // 启用 | |||
authorization: false, // 授权 | |||
cancel: false, // 取消订单 | |||
writeOff: false, // 注销 | |||
make: false, // 补缴 | |||
}, | |||
extend: [ | |||
{ | |||
type: "index", | |||
label: "序号", | |||
}, | |||
], | |||
field: [ | |||
{ | |||
label: '交易时间', | |||
prop: 'transDate', | |||
form, | |||
}, | |||
{ | |||
label: 'ETC资金渠道名称', | |||
prop: 'agencyName', | |||
form, | |||
}, | |||
{ | |||
label: '卡类型', | |||
prop: 'cardType', | |||
form, | |||
}, | |||
{ | |||
label: '产品名称', | |||
prop: 'productName', | |||
form, | |||
}, | |||
{ | |||
label: '结算组负责人', | |||
prop: 'settlementManager', | |||
form, | |||
}, | |||
{ | |||
label: '截止上月最后一天未支付金额', | |||
prop: 'lastMonthFee', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '其他货币资金商户号未到账余额(上月)', | |||
prop: 'lastMonthOther', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '商务卡未到账余额(上月)', | |||
prop: 'lastMonthSwk', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '当月交易金额', | |||
prop: 'currentMonthFee', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '银行实际收款金额', | |||
prop: 'bankCollection', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '渠道费金额', | |||
prop: 'agencyFee', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '其他货币资金商户号未到账余额', | |||
prop: 'otherWdzFee', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '商务卡未到账余额', | |||
prop: 'swkFee', | |||
isAmount: true, | |||
form: { | |||
formLabelWidth, | |||
width: '90%', | |||
type: 'input', | |||
checkContent: 'money', | |||
required: true, | |||
}, | |||
}, | |||
{ | |||
label: '当月收款合计', | |||
prop: 'currentTollFee', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '截止当月最后一天未支付金额', | |||
prop: 'currentWzfFee', | |||
isAmount: true, | |||
form, | |||
}, | |||
{ | |||
label: '备注', | |||
prop: 'remark', | |||
form:{ | |||
formLabelWidth, | |||
width: '90%', | |||
type: 'input', | |||
}, | |||
}, | |||
], | |||
}); | |||
return { | |||
field, | |||
}; | |||
} |
@@ -0,0 +1,197 @@ | |||
<template> | |||
<div> | |||
<crud-template class="as-weight" :ref="(el) => (crudRef = el)" :home-data="field" @generateAeport="generateAeport" | |||
@handleEdit="handleEdit" @submit="submit" | |||
@btnSearch="btnSearch" @refreshLeft="refreshLeft" :tableData="tableData" @CurrentChange="handleCurrentChange" | |||
@importData="handleSuccess" @download="downloadHandle" @pageSizeChange="(val) => { | |||
field.paging.currentPage = 1 | |||
field.paging.pageSize = val | |||
getList() | |||
} | |||
"> | |||
<template #search> | |||
<div class="date-label">统计时间:</div> | |||
<el-date-picker unlink-panels v-model="timeValue" type="monthrange" range-separator="到" | |||
start-placeholder="统计开始日期" end-placeholder="统计结束日期" value-format="YYYY-MM" format="YYYY-MM" | |||
@change="dateChangeHandle"/> | |||
</template> | |||
<!-- <template #operation="{ scope }">--> | |||
<!-- <el-button v-if="IsPermission(route, 'INFO_LIST_LEVEL2')" size="small" type="success" @click="showInfo(scope.row)">详情</el-button>--> | |||
<!-- </template>--> | |||
</crud-template> | |||
</div> | |||
</template> | |||
<!-- 集团数据统计样表 --> | |||
<script lang="ts" setup> | |||
// @ts-ignore crudFrom模板 | |||
import CrudTemplate from '@/crud/index.vue' | |||
import { ref, onMounted } from 'vue' | |||
import { ElMessage } from 'element-plus' | |||
// 请求函数 | |||
// @ts-ignore | |||
import BaseService from '@/utils/baseService' | |||
//crud配置 | |||
import crudConfig from './crudConfig' | |||
import { useRoute } from 'vue-router'; | |||
import { IsPermission } from "@/router/routerUtil"; | |||
const route = useRoute() | |||
// 拿到配置 | |||
const { field } = crudConfig(route) | |||
const defaultTime: any = getDefaultTime('month', 0, 'YYYY-MM') | |||
const timeValue = ref(defaultTime) | |||
function dateChangeHandle(val) { | |||
if (val) { | |||
searchForm.value.transDateStart = val[0] | |||
searchForm.value.transDateEnd = val[1] | |||
} else { | |||
searchForm.value.transDateStart = '' | |||
searchForm.value.transDateEnd = '' | |||
} | |||
} | |||
//整个crud虚拟dom | |||
const crudRef = ref() | |||
// 获取数据,查询条件 | |||
const searchForm = ref({ | |||
transDateStart: defaultTime[0], //开始时间 | |||
transDateEnd: defaultTime[1], //结束时间 | |||
}) | |||
const tableData = ref([]) | |||
// 搜索按钮 | |||
function btnSearch() { | |||
field.value.paging.currentPage = 1 | |||
getList() | |||
} | |||
// 搜索重置 | |||
function refreshLeft() { | |||
field.value.paging.currentPage = 1 | |||
searchForm.value = { | |||
transDateStart: defaultTime[0], //开始时间 | |||
transDateEnd: defaultTime[1], //结束时间 | |||
} | |||
tableData.value = [] | |||
timeValue.value = defaultTime | |||
getList() | |||
} | |||
onMounted(() => { | |||
getList() | |||
}) | |||
// 处理请求参数 | |||
// 处理请求参数 | |||
const handleParams = () => { | |||
let params: any = { | |||
pageNo: field.value.paging.currentPage, | |||
pageSize: field.value.paging.pageSize, | |||
...searchForm.value, | |||
} | |||
return params | |||
} | |||
// 获取数据 | |||
function getList() { | |||
const params = handleParams() | |||
crudRef.value.tableLoding = true //表格loading效果 | |||
BaseService.postN('/settlew/report/etcConfirmAgency/pageQuery', params).then( | |||
(res: any) => { | |||
crudRef.value.tableLoding = false | |||
if (res && res.code === 0) { | |||
let bizContent = res.data | |||
let data = bizContent.result || [] | |||
tableData.value = data | |||
field.value.paging.total = bizContent.totalCount | |||
// field.value.paging.amountAll = bizContent.amountAll | |||
} else { | |||
ElMessage.error(res.message) | |||
} | |||
} | |||
) | |||
} | |||
// 处理当前页数 | |||
function handleCurrentChange(val: number) { | |||
field.value.paging.currentPage = val | |||
getList() | |||
} | |||
// 编辑按钮 | |||
const typeOption = ref(""); | |||
function handleEdit(idx: any, row: any) { | |||
typeOption.value = "edit" | |||
} | |||
// 取消 | |||
function cancel() { | |||
crudRef.value.reset(); | |||
crudRef.value.dialogFormVisible = false; | |||
} | |||
//编辑与添加提交 | |||
function submit(data: any) { | |||
debugger | |||
let api = '' | |||
if (typeOption.value === 'edit') { | |||
api = '/settlew/report/etcConfirmAgency/edit' | |||
} | |||
let params: any = { | |||
id: data.id, | |||
...data, | |||
} | |||
BaseService.post(api, params).then((res: any) => { | |||
if (res && res.code === 0) { | |||
let bizContent = res.data | |||
ElMessage.success("操作成功"); | |||
getList(); | |||
cancel(); | |||
} else { | |||
ElMessage.error(res.message) | |||
} | |||
}) | |||
} | |||
/***********上传下载**************/ | |||
// @ts-ignore | |||
import {exportFn, getDefaultTime, importFn, reportExportFn} from '@/views/settlement/exportFn' | |||
// 文件上传到minio后触发 | |||
const handleSuccess = (url: any, reportFileName: any) => { | |||
importFn( | |||
'933c1d25cb4645abb218b854c5ab9936', | |||
() => { | |||
getList() | |||
}, | |||
{ | |||
excelUrl: url, | |||
reportFileName, | |||
} | |||
) | |||
} | |||
// 生成报表 | |||
function generateAeport() { | |||
const params = handleParams() | |||
console.log(params) | |||
reportExportFn('/settlew/groupcard/find', params, '集团数据统计样表') | |||
.then((res) => { | |||
const initiateApprovalData = | |||
field.value.searchOperation.initiateApprovalData | |||
field.value.searchOperation.initiateApprovalData = { | |||
...initiateApprovalData, | |||
...res, | |||
} | |||
}) | |||
.finally(() => { | |||
console.log('error') | |||
}) | |||
} | |||
// 下载 | |||
const downloadHandle = () => { | |||
const params = handleParams() | |||
exportFn('/settlew/groupcard/find', params, '集团数据统计样表') | |||
} | |||
</script> | |||
<style scoped lang="less"></style> |