Commit ebf6c96e authored by qiyaxin's avatar qiyaxin

改bug

parent da9ea58b
...@@ -61,5 +61,5 @@ export function getProjectManagerName(query) { ...@@ -61,5 +61,5 @@ export function getProjectManagerName(query) {
}) })
} }
// 3.项目费用报销审批
...@@ -61,14 +61,32 @@ ...@@ -61,14 +61,32 @@
<!-- 列表 --> <!-- 列表 -->
<el-table :data="ReimbursementRequestList" border> <el-table :data="ReimbursementRequestList" border>
<el-table-column type="selection" align="center"></el-table-column> <el-table-column type="selection" align="center"></el-table-column>
<el-table-column width="180px" prop="shenqingren" label="申请人" align="center"></el-table-column> <el-table-column width="180px" prop="createBy" label="申请人" align="center"></el-table-column>
<el-table-column width="180px" prop="updateTime" label="申请时间" align="center" min-width="100px"></el-table-column> <el-table-column width="180px" prop="updateTime" label="申请时间" align="center" min-width="100px"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="projectType" label="项目类型" align="center"></el-table-column> <el-table-column prop="projectType" label="项目类型" align="center">
<template #default="scope">
<dict-tag :options="project_type" :value="scope.row.costType"/>
</template>
</el-table-column>
<el-table-column prop="timeOfExpense" label="费用发生时间" align="center" min-width="100px"></el-table-column> <el-table-column prop="timeOfExpense" label="费用发生时间" align="center" min-width="100px"></el-table-column>
<el-table-column prop="costType" label="费用类型" align="center"></el-table-column> <el-table-column prop="costType" label="费用类型" align="center">
<template #default="scope">
<dict-tag :options="project_cost_type" :value="scope.row.costType"/>
</template>
</el-table-column>
<el-table-column prop="actualAmount" label="实际金额(元)" align="center"></el-table-column> <el-table-column prop="actualAmount" label="实际金额(元)" align="center"></el-table-column>
<el-table-column prop="approvalStatus" label="审批状态" align="center"></el-table-column> <el-table-column prop="reimbursmentApproveStatus" label="整体审批状态" align="center">
<template #default="scope">
<dict-tag :options="project_cost_request_status" :value="scope.row.reimbursmentApproveStatus"/>
</template>
</el-table-column>
<el-table-column prop="approvalStatus" label="当前审批状态" align="center">
<template #default="scope">
<!-- {{getCurrentApprovalStatus(scope.row)}}-->
<el-tag size="large" :type="scope.row.currentStatus=== 0?'primary':scope.row.currentStatus> 0?'success':scope.row.currentStatus === -999?'info':'info'">{{scope.row.currentStatus=== 0?'待审批':scope.row.currentStatus > 0?'已通过':scope.row.currentStatus === -999?'未通过':'待前审'}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="detail" label="详情" align="center" width="100px"> <el-table-column prop="detail" label="详情" align="center" width="100px">
<el-tooltip content="详情" placement="top"> <el-tooltip content="详情" placement="top">
<el-button link type="text" @click="handleView(scope.row)"> <el-button link type="text" @click="handleView(scope.row)">
...@@ -115,20 +133,24 @@ ...@@ -115,20 +133,24 @@
</template> </template>
<script setup > <script setup >
import {reactive, ref} from "vue"; import {onMounted, reactive, ref} from "vue";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
import FlowChart from '@/components/FlowChart/index.vue' import FlowChart from '@/components/FlowChart/index.vue'
import {getProjectName} from "../../../../api/examineAndApprove/examineAndApprove.js"; import {getApproveNodeList, getProjectName, getRoleId} from "../../../../api/examineAndApprove/examineAndApprove.js";
import {getReimbursementList} from "../../../../api/projectCostReimbursement/projectCostReimbursement.js";
import {getCostRequestList} from "../../../../api/projectCostRequest/projectCostRequest.js";
const { project_status, project_cost_type,project_cost_request_status,project_type} = proxy.useDict('project_status', 'project_cost_type','project_cost_request_status','project_type'); const { project_status, project_cost_type,project_cost_request_status,project_type} = proxy.useDict('project_status', 'project_cost_type','project_cost_request_status','project_type');
const list = ref([]) // 流程图内容,只有值
const list = ref(['个人','项目经理','事业部负责人','财务','总经理']) // 流程图内容,只有值
const allList = ref([]) // 流程图内容,值和角色id const allList = ref([]) // 流程图内容,值和角色id
const total = ref(1); const total = ref(0);
const dialogFormVisible = ref(false) const dialogFormVisible = ref(false)
const projectNameList = ref([]); const projectNameList = ref([]);
//当前登录用户角色组
const currentUserRoleInfoList = ref([])
const changProjectNumber = ref('')
const stepActive = ref(1)
const queryParams = reactive({ const queryParams = reactive({
pageNum:1, pageNum:1,
pageSize:10, pageSize:10,
...@@ -136,25 +158,13 @@ const queryParams = reactive({ ...@@ -136,25 +158,13 @@ const queryParams = reactive({
projectType:null, projectType:null,
reimbursmentApproveStatus:null reimbursmentApproveStatus:null
}) })
const ReimbursementRequestList = ref([
{
shenqingren:'张三',
updateTime:'2025-03-18 10:12:33',
projectName:'机场后台',
projectType:'LZ-流转',
timeOfExpense:'2025-03-02',
costType:'办公用品-文具',
actualAmount:'50',
approvalStatus:'进行中'
}
]);
// 搜索表单——获取所有项目名称 // 搜索表单——获取所有项目名称
const getAllProjectName=()=> { const getAllProjectName=()=> {
getProjectName(queryParams).then(response => { getProjectName(queryParams).then(response => {
// projectNameList.value = response.data.map(item => ({ value: item }));
projectNameList.value = response.data; projectNameList.value = response.data;
console.log("项目名称",projectNameList.value) // console.log("项目名称",projectNameList.value)
}); });
} }
getAllProjectName() getAllProjectName()
...@@ -166,9 +176,60 @@ const reset = () => { ...@@ -166,9 +176,60 @@ const reset = () => {
// getList() // getList()
} }
//获取所有流程列表,根据审批id
const getNodeList = ()=>{
getApproveNodeList(15).then(res=>{
console.log("项目费用报销-所有流程",res.data)
allList.value = res.data.nodeList
list.value = res.data.nodeList.map(item=>{
return item.roleName
})
})
}
//获取当前用户角色信息
const getRoleInfo = ()=>{
getRoleId().then(res=>{
console.log("项目费用报销-角色信息",res.data)
currentUserRoleInfoList.value = res.data
})
}
// 列表
const ReimbursementRequestList = reactive([]);
const getList=()=> {
getReimbursementList(queryParams).then(response => {
total.value = response.total
Object.assign(ReimbursementRequestList, response.rows);
// for(let i in ReimbursementRequestList){
// ReimbursementRequestList[i].currentStatus = approvalStatusChange(ReimbursementRequestList[i].approveStatus,ReimbursementRequestList[i].currentAuditRoleId)
// }
console.log("项目费用报销-列表",ReimbursementRequestList)
getTopApproveInfo()
});
}
//获取列表第一个顶部信息
const getTopApproveInfo = ()=>{
let item2 = ReimbursementRequestList[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
}
onMounted(async ()=>{
//获取所有审批列表
await getNodeList()
//获取当前用户角色信息
await getRoleInfo()
//获取列表
await getList()
})
</script> </script>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
:value="dict.value"/> :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 审批页的审批状态:待审批,已通过,未通过-->
<el-form-item label="审批状态"> <el-form-item label="审批状态">
<el-select style="width: 220px" v-model="queryParams.approveStatus" placeholder="请选择审批状态" clearable> <el-select style="width: 220px" v-model="queryParams.approveStatus" placeholder="请选择审批状态" clearable>
<el-option <el-option
......
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