Commit 81feb181 authored by yanzhengyang's avatar yanzhengyang

费用审批-日常报销完善

parent 7c3a787d
......@@ -80,6 +80,24 @@ export function projectCostReimbursementNotPass(query) {
})
}
// 5.项目费用申请审批
//项目费用申请审批-通过
export function dailyCostPass(query) {
return request({
url: '/expenseApproval/dailyReimburseApproval',
method: 'post',
data:query
})
}
//项目费用申请审批-驳回
export function dailyCostNotPass(query) {
return request({
url: '/expenseApproval/dailyReimburseApprovalReject',
method: 'post',
data:query
})
}
// 3.出差申请审批
//出差申请-通过
......
......@@ -62,36 +62,36 @@
<!-- 可折叠的查询条件 -->
<transition>
<div v-if="isExpanded">
<el-form-item label="项目经理" prop="projectManagerId">
<el-select
v-model="queryParams.projectStatus"
placeholder="请选择项目经理"
style="width: 220px"
clearable
>
<el-option
v-for="dict in project_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="事业部负责人" prop="projectType">
<el-select
v-model="queryParams.projectType"
placeholder="请选择事业部负责人"
style="width: 220px"
clearable
>
<el-option
v-for="dict in project_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="项目经理" prop="projectManagerId">-->
<!-- <el-select-->
<!-- v-model="queryParams.projectStatus"-->
<!-- placeholder="请选择项目经理"-->
<!-- style="width: 220px"-->
<!-- clearable-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in project_status"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="事业部负责人" prop="projectType">-->
<!-- <el-select-->
<!-- v-model="queryParams.projectType"-->
<!-- placeholder="请选择事业部负责人"-->
<!-- style="width: 220px"-->
<!-- clearable-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in project_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="报销月份">
<el-date-picker
v-model="queryParams.reimbursementMonth"
......@@ -166,7 +166,7 @@
<!-- 操作按钮-->
<el-table-column label="操作" align="center" fixed="right" width="120px">
<template #default="scope" >
<el-button :disabled="scope.row.currentStatus !== 0" link @click="passProjectCost(scope.row)" type="primary" size="small" style="font-size: 15px">通过</el-button>
<el-button :disabled="scope.row.currentStatus !== 0" link @click="passDailyCost(scope.row)" type="primary" size="small" style="font-size: 15px">通过</el-button>
<el-button :disabled="scope.row.currentStatus !== 0" link @click="reject(scope.row)" type="danger" size="small" style="font-size: 15px">驳回</el-button>
</template>
</el-table-column>
......@@ -205,8 +205,11 @@
<script setup>
import {ArrowDown} from "@element-plus/icons-vue";
import FlowChart from '@/components/FlowChart/index.vue'
import {ElMessageBox} from "element-plus";
import {getProjectName, getApproveNodeList, getRoleId} from '@/api/examineAndApprove/examineAndApprove.js'
import {ElMessage} from "element-plus";
import {
getProjectName,
getApproveNodeList, getRoleId,
dailyCostPass, dailyCostNotPass} from '@/api/examineAndApprove/examineAndApprove.js'
import {listDailyApprove} from '@/api/costManage/cost.js'
import {useRouter} from "vue-router";
import { ref } from "vue";
......@@ -226,7 +229,7 @@ const passObjList = []
//驳回对象
let rejectObj = reactive({
projectCostId :null,
dailyReimburseId :null,
groundsForRejection:null
})
......@@ -243,11 +246,9 @@ const isExpanded = ref(false);
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
projectNumber: null,
projectName: null,
projectType: null,
departmentLeaderId: null,
projectManagerId: null,
// departmentLeaderId: null,
// projectManagerId: null,
approvalStatus: null,
reimbursementMonth: null,
});
......@@ -258,7 +259,7 @@ const oneClickPass = ()=>{
message: '请先选择数据项',
type: 'error'
})
projectCostPass(passObjList).then(res=>{
dailyCostPass(passObjList).then(res=>{
if(res.code === 200){
getList()
}
......@@ -276,7 +277,6 @@ getAllProjectName()
// 重置表单
const reset = () => {
queryParams.projectName = null
queryParams.projectType = null
queryParams.approvalStatus = null
getList()
}
......@@ -293,7 +293,7 @@ const reject = (row)=>{
oneClickFlag = false
console.log(row)
dialogFormVisible.value = true
rejectObj.projectCostId = row.id
rejectObj.dailyReimburseId = row.id
}
//确定驳回
const sureReject = ()=>{
......@@ -301,18 +301,18 @@ const sureReject = ()=>{
//如果是一键驳回
let list = passObjList.map((item)=>{
return {
projectCostId:item.projectCostId,
dailyReimburseId:item.dailyReimburseId,
groundsForRejection:rejectObj.groundsForRejection
}
})
projectCostNotPass(list).then(res=>{
dailyCostNotPass(list).then(res=>{
dialogFormVisible.value = false
cancelReject()
getList()
})
}else {
//不是一键驳回
projectCostNotPass([rejectObj]).then(res=>{
dailyCostNotPass([rejectObj]).then(res=>{
dialogFormVisible.value = false
cancelReject()
getList()
......@@ -337,7 +337,7 @@ const oneClickNotPass = ()=>{
const cancelReject = ()=>{
dialogFormVisible.value = false
rejectObj = reactive({
projectCostId :null,
dailyReimburseId :null,
groundsForRejection:null
})
}
......@@ -352,7 +352,7 @@ const handleSelectionChange = (val) => {
let obj = {
//项目费用id
projectCostId:item.id,
dailyReimburseId:item.id,
//下一个节点nodeId
nextNodeId:null,
//是否终审
......@@ -393,7 +393,7 @@ const approvalStatusChange = (status,currentNodeId)=>{
}
//通过
const passProjectCost = (row)=>{
const passDailyCost = (row)=>{
console.log(row)
let currentAudiRoleId = row.currentAudiRoleId
//获取currentAudiRoleId的下标
......@@ -401,7 +401,7 @@ const passProjectCost = (row)=>{
let obj = {
//项目费用id
projectCostId:row.id,
dailyReimburseId:row.id,
//下一个节点nodeId
nextNodeId:null,
//是否终审
......@@ -418,8 +418,8 @@ const passProjectCost = (row)=>{
obj.isEndApproval = false
}
projectCostPass([obj]).then(res=>{
console.log("响应",res)
dailyCostPass([obj]).then(res=>{
// console.log("响应",res)
if(res.code === 200){
getList()
}
......@@ -445,7 +445,7 @@ const handleHover = (row, column, cell, event) => {
timer = setTimeout(() => {
changProjectNumber.value = row.projectNumber
let i = allList.value.findIndex((item)=>item.nodeId === row.currentAudiRoleId)
console.log("i",i)
// console.log("i",i)
if(i === -1) stepActive.value = 1
else stepActive.value = i+1
......@@ -463,7 +463,7 @@ const handleLeave = () => {
//获取所有流程列表,根据审批id
const getNodeList = ()=>{
getApproveNodeList(16).then(res=>{
console.log("lkoi",res)
// console.log("lkoi",res)
allList.value = res.data.nodeList
list.value = res.data.nodeList.map(item=>{
return item.roleName
......@@ -479,7 +479,7 @@ const getList = () => {
loading.value = false;
total.value = res.total;
Object.assign(costManageList,res.rows);
console.log("审批页数据",costManageList);
// console.log("审批页数据",costManageList);
for(let i in costManageList){
costManageList[i].currentStatus = approvalStatusChange(costManageList[i].approvalStatus,costManageList[i].currentAudiRoleId)
}
......@@ -555,20 +555,4 @@ onMounted(async () => {
line-height: 15px;
}
}
.text_weight{
font-family: "PingFangSC-Medium", sans-serif;
font-weight: 600;
font-size: 16px;
}
.bohui{
font-family: "PingFangSC-Medium", sans-serif;
font-weight: 500;
font-size: 16px;
color: #0D162A;
}
.pagination-box {
padding-right: 40%;
margin-top: 20px;
}
</style>
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