Commit bf0b0d7f authored by yanzhengyang's avatar yanzhengyang

日常报销步骤条bug修改

parent c6397685
......@@ -213,7 +213,7 @@
<template #footer>
<div class="card-footer">
<div class="footer-step">
<flow-chart style="width: 100%" :dataList="list" :activeIndex="stepActive" :itemWidth="'110px'" />
<flow-chart :dataList="list" :activeIndex="stepActive" :itemWidth="'110px'" />
<!-- <el-steps :active="1" finish-status="success" simple>-->
<!-- <el-step title="Step 1" />-->
<!-- <el-step title="Step 2" />-->
......@@ -281,7 +281,17 @@ const data = reactive({
});
const { queryParams, form} = toRefs(data);
/** 查询角色列表 */
//获取列表第一个顶部信息
const getTopApproveInfo = ()=>{
let item2 = costManageList.value[0]
changProjectNumber.value = item2.projectNumber
let i = allList.value.findIndex((item)=>item.nodeId === item2.currentAuditRoleId)
if(i === -1) stepActive.value = 1
else stepActive.value = i+1
}
/** 查询报销列表 */
function getList() {
loading.value = true;
//获取日常报销列表
......@@ -292,7 +302,6 @@ function getList() {
item.tableItemList = []
}
}
console.log("123",res.rows)
for(let key in res.rows){
// console.log(data)
......@@ -308,14 +317,24 @@ function getList() {
}
total.value = res.total
loading.value = false
getTopApproveInfo()
})
}
//获取所有审批流程
const getAllshenpiList = ()=>{
getAllapproveList(16).then(res => {
list.value = res.data.nodeList.map((item)=>{
return item.roleName
})
allList.value = res.data.nodeList
console.log("所有节点",allList.value)
})
}
//获取所有项目
const getProjectList = () => {
projectList().then(res => {
// Object.assign(projectOption, res.data);
projectOption.value = res.data.map(item => {
return {
......@@ -346,19 +365,8 @@ const getProjectList = () => {
})
}
//获取所有审批流程
const getAllshenpiList = ()=>{
getAllapproveList(16).then(res => {
list.value = res.data.nodeList.map((item)=>{
return item.roleName
})
allList.value = res.data.nodeList
})
}
const getPassNumber = (item)=>{
let allNumber = 0
for(let item2 of item){
if(item2.status === 3){
allNumber += item2.totalMoney
......@@ -366,10 +374,8 @@ const getPassNumber = (item)=>{
}
return allNumber
}
const getNotPassNumber = (item)=>{
let allNumber = 0
for(let item2 of item){
if(item2.status === 1 || item2.status === 2){
allNumber += item2.totalMoney
......@@ -377,24 +383,14 @@ const getNotPassNumber = (item)=>{
}
return allNumber
}
const getAllPassNumber = (item)=>{
let allNumber = 0
for(let item2 of item){
allNumber += item2.totalMoney
}
return allNumber
}
//获取列表第一个顶部信息
const getTopApproveInfo = ()=>{
let item2 = costManageList.value[0]
changProjectNumber.value = item2.projectNumber
let i = allList.value.findIndex((item)=>item.nodeId === item2.currentAuditRoleId)
stepActive.value = i+1
}
// 切换展开/折叠状态
const toggleSearch = () => {
isExpanded.value = !isExpanded.value;
......@@ -433,22 +429,6 @@ function handleDelete(row) {
}).catch(() => {});
}
/** 导出按钮操作 */
// function handleExport() {
// proxy.download("system/role/export", {
// ...queryParams.value,
// }, `role_${new Date().getTime()}.xlsx`);
// }
/** 多选框选中数据 */
// function handleSelectionChange(selection) {
// ids.value = selection.map(item => item.roleId);
// single.value = selection.length != 1;
// multiple.value = !selection.length;
// }
/** 日常报销新增页*/
function handleAdd(row) {
router.push('/costManage/dailyReimburse/add?projectId='+row.projectId)
......@@ -473,15 +453,16 @@ function handlePrint(row) {
const stepActive = ref(1);
const changProjectNumber = ref('')
let timer = null;
const handleHover = (row) => {
const handleHover = (row, column, cell, event) => {
//防抖
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(() => {
changProjectNumber.value = row.projectNumber
changProjectNumber.value = row.id
let i = allList.value.findIndex((item)=>item.nodeId === row.currentAuditRoleId)
stepActive.value = i+1
if(i === -1) stepActive.value = 1
else stepActive.value = i+1
}, 300);
}
const handleLeave = () => {
......@@ -493,39 +474,10 @@ const handleLeave = () => {
}, 300);
}
// /** 自定义表格列 */
// // 是否全选
// const isAllSelected = ref(true);
//
// // 选择全选/全不选
// const selectAll = () => {
// const allSelected = isAllSelected.value;
// columns.value.forEach((column) => {
// column.visible = allSelected;
// });
// };
//
// // 处理列的复选框变更
// const handleCheckboxChange = () => {
// // 检查是否所有列都被选中,如果是全选,设置 isAllSelected 为 true
// isAllSelected.value = columns.value.every((col) => col.visible);
// };
//
// // 处理命令
// const handleCommand = (command) => {
// if (command === 'select-all') {
// selectAll();
// }
// };
//
// // 使用计算属性来过滤显示的列
// const visibleColumns = computed(() => {
// return columns.value.filter(column => column.visible);
// });
onMounted(() => {
getList();
getProjectList();
getAllshenpiList();
getProjectList();
})
</script>
......@@ -561,7 +513,10 @@ onMounted(() => {
}
.footer-step{
display: flex;
width: 100%;
justify-content: space-evenly;
align-items: center;
}
.footer-right{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment