Commit 81feb181 authored by yanzhengyang's avatar yanzhengyang

费用审批-日常报销完善

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