Commit 04791b7b authored by yanzhengyang's avatar yanzhengyang

日常报销,出差申请bug修改

parent 5ae57681
......@@ -82,3 +82,11 @@ export const listTripReimburse = (query) => {
params: query
})
}
// 获取全部审批流程
export function getAllapproveList(id) {
return request({
url: '/approvalConfiguration/getNodeList/' + id,
method: 'get'
})
}
......@@ -258,7 +258,6 @@ const getProjectList = () => {
}
//根据项目id自动填充项目详情
const projectDetail = reactive({});
const getProjectDetail=()=> {
projectDetailById(ruleForm.value.projectId).then(res => {
console.log("项目详情",res.data)
......
......@@ -150,7 +150,7 @@
</template>
<span>费用明细</span>
<div class="card-context">
<el-table v-loading="loading" :data="item.tableItemList" @selection-change="handleSelectionChange" border>
<el-table v-loading="loading" :data="item.tableItemList" @cell-mouse-enter="handleHover" @cell-mouse-leave="handleLeave" border>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="提交时间" align="center" prop="registrationTime">
<template #default="scope">
......@@ -212,7 +212,7 @@
<template #footer>
<div class="card-footer">
<div class="footer-step">
<flow-chart style="width: 100%" :dataList="list" :activeIndex="1" :itemWidth="'110px'" />
<flow-chart style="width: 100%" :dataList="list" :activeIndex="stepActive" :itemWidth="'110px'" />
<!-- <el-steps :active="1" finish-status="success" simple>-->
<!-- <el-step title="Step 1" />-->
<!-- <el-step title="Step 2" />-->
......@@ -233,8 +233,7 @@
<script setup name="DailyReimbursement">
import FlowChart from '@/components/FlowChart/index.vue'
import { addRole, changeRoleStatus, dataScope, delRole, getRole, listRole, updateRole, deptTreeSelect } from "@/api/system/role";
import { listCostManage,projectList,deleteDailyReimburse } from "../../../api/costManage/cost.js";
import { listCostManage,projectList,deleteDailyReimburse,getAllapproveList } from "../../../api/costManage/cost.js";
import { listUser } from "../../../api/system/user.js";
import {useRouter} from "vue-router";
import {ArrowDown} from "@element-plus/icons-vue";
......@@ -243,22 +242,18 @@ const router = useRouter();
const { proxy } = getCurrentInstance();
const { cost_daily_status,cost_daily_type} = proxy.useDict('cost_daily_status','cost_daily_type');
const list = reactive(['个人','项目经理','事业部负责人','财务','老板'])
// 审批流程图角色
const list = ref([])
const allList = ref([])
const loading = ref(true);
const ids = ref([]);
const total = ref(0);
const title = ref("");
const costManageList = ref([]);
const projectOption = ref([]);
const headOptions = ref([]);
const managerOptions = ref([]);
const dateRange = ref([]);
// 更多搜索框
const isExpanded = ref(false);
// 报销类型
......@@ -339,6 +334,26 @@ const getProjectList = () => {
})
}
//获取所有审批流程
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 getTopApproveInfo = ()=>{
let item2 = costManageList.value[0]
console.log("first",item2)
changProjectNumber.value = item2.projectNumber
let i = allList.value.findIndex((item)=>item.nodeId === item2.currentAuditRoleId)
stepActive.value = i+1
}
// 切换展开/折叠状态
const toggleSearch = () => {
isExpanded.value = !isExpanded.value;
......@@ -417,23 +432,28 @@ function handlePrint(row) {
}
//鼠标悬停更改步骤条
const hoverColumnData = ref('');
const stepActive = ref(1);
const changProjectNumber = ref('')
let timer = null;
const handleHover = (row) => {
changProjectNumber.value = row.projectNumber
const approveStatus = row.approveStatus;
console.log("当前行的审批状态",row.approveStatus)
if (approveStatus === 1 || approveStatus === 2) {
stepActive.value = 1;
} else if (approveStatus === 3) {
stepActive.value = 5;
//防抖
if (timer) {
clearTimeout(timer);
}
// hoverColumnData.value = row.projectNumber; // 根据需要修改为其他列数据
timer = setTimeout(() => {
changProjectNumber.value = row.projectNumber
console.log("摇起来",row)
let i = allList.value.findIndex((item)=>item.nodeId === row.currentAuditRoleId)
stepActive.value = i+1
}, 300);
}
const handleLeave = () => {
stepActive.value = 1;
hoverColumnData.value = '';
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(() => {
getTopApproveInfo()
}, 300);
}
// /** 自定义表格列 */
......@@ -468,6 +488,7 @@ const handleLeave = () => {
onMounted(() => {
getList();
getProjectList();
getAllshenpiList();
})
</script>
......
......@@ -36,9 +36,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="审批状态" prop="projectStatus">
<el-form-item label="审批状态" prop="status">
<el-select
v-model="queryParams.projectStatus"
v-model="queryParams.status"
placeholder="请选择项目状态"
style="width: 220px"
clearable
......
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