Commit bf20e3da authored by qiyaxin's avatar qiyaxin

出差申请审批查询

parent 0d27cccb
...@@ -182,10 +182,19 @@ const queryParams = reactive({ ...@@ -182,10 +182,19 @@ const queryParams = reactive({
}) })
//一键通过 //一键通过
const oneClickPass = ()=>{ const oneClickPass = ()=>{
if(!passObjList.length) return ElMessage({ if(!passObjList.length) return ElMessage({
message: '请先选择数据项', message: '请先选择数据项',
type: 'error' type: 'error'
}) })
// 为每条数据添加通过时间
const now = new Date();
const passTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`;
passObjList.forEach(item => {
item.passTime = passTime;
});
projectCostPass(passObjList).then(res=>{ projectCostPass(passObjList).then(res=>{
if(res.code === 200){ if(res.code === 200){
getList() getList()
...@@ -333,14 +342,22 @@ const passProjectCost = (row)=>{ ...@@ -333,14 +342,22 @@ const passProjectCost = (row)=>{
//获取currentAuditRoleId的下标 //获取currentAuditRoleId的下标
let index = allList.value.findIndex(item=>item.nodeId === currentAuditRoleId) let index = allList.value.findIndex(item=>item.nodeId === currentAuditRoleId)
// 获取通过时间
const now = new Date();
const passTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`;
let obj = { let obj = {
//项目费用id //项目费用id
projectCostId:row.id, projectCostId: row.id,
//下一个节点nodeId //下一个节点nodeId
nextNodeId:null, nextNodeId: null,
//是否终审 //是否终审
isEndApproval:false isEndApproval: false,
// pm通过时间
pmPassTime: passTime
} }
console.log(55555,obj)
//判断是不是最后一个下标 //判断是不是最后一个下标
if((allList.value.length -1) === index){ if((allList.value.length -1) === index){
//最后一个下标的话 //最后一个下标的话
...@@ -352,7 +369,6 @@ const passProjectCost = (row)=>{ ...@@ -352,7 +369,6 @@ const passProjectCost = (row)=>{
obj.isEndApproval = false obj.isEndApproval = false
} }
projectCostPass([obj]).then(res=>{ projectCostPass([obj]).then(res=>{
console.log("响应",res) console.log("响应",res)
if(res.code === 200){ if(res.code === 200){
......
...@@ -7,39 +7,44 @@ ...@@ -7,39 +7,44 @@
<el-select <el-select
v-model="queryParams.projectName" v-model="queryParams.projectName"
placeholder="请选择项目名称" placeholder="请选择项目名称"
style="width: 220px"
clearable clearable
filterable
style="width: 220px"
> >
<el-option <el-option
v-for="item in projectNameList" v-for="item in projectNameList"
:key="item" :key="item"
:label="item" :label="item"
:value="item"/> :value="item"
style="width: 220px"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="项目经理" prop="projectManagerId"> <el-form-item label="项目经理" prop="projectUserName">
<el-select <el-select
v-model="queryParams.projectUserName" v-model="queryParams.projectUserName"
filterable
placeholder="请选择项目经理" placeholder="请选择项目经理"
style="width: 220px" style="width: 220px"
clearable clearable
> >
<el-option <el-option
v-for="item in projectManagerNameList" v-for="item in projectUserNameList"
:key="item.projectManagerName" :key="item.projectManagerName"
:label="item.projectManagerName" :label="item.projectManagerName"
:value="item.projectManagerName"/> :value="item.projectManagerName"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="审批状态" prop="projectStatus"> <el-form-item label="审批状态" prop="status">
<el-select <el-select
v-model="queryParams.projectStatus" v-model="queryParams.status"
placeholder="请选择项目状态" placeholder="请选择项目状态"
style="width: 220px" style="width: 220px"
clearable clearable
> >
<el-option <el-option
v-for="dict in project_status" v-for="dict in cost_daily_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
...@@ -48,14 +53,14 @@ ...@@ -48,14 +53,14 @@
</el-form-item> </el-form-item>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<el-form-item style="padding-left: 5.4%"> <el-form-item style="padding-left: 5.4%">
<el-button type="default" class="el-button-defalut" icon="Refresh" @click="reset">重置</el-button> <el-button icon="Refresh" @click="resetQuery" class="el-button-defalut">重置</el-button>
<el-button type="primary" class="el-button-primary" icon="Search" @click="getList">查询</el-button> <el-button type="primary" icon="Search" @click="handleQuery" class="el-button-primary">查询</el-button>
<!-- <el-button size="large" type="text" @click="toggleSearch">--> <el-button size="large" type="text" @click="toggleSearch">
<!-- {{ isExpanded ? ' 收起' : ' 展开' }}--> {{ isExpanded ? ' 收起' : ' 展开' }}
<!-- <el-icon class="el-icon&#45;&#45;right">--> <el-icon class="el-icon--right">
<!-- <arrow-down />--> <arrow-down />
<!-- </el-icon>--> </el-icon>
<!-- </el-button>--> </el-button>
</el-form-item> </el-form-item>
<!-- 可折叠的查询条件 --> <!-- 可折叠的查询条件 -->
<transition> <transition>
...@@ -64,7 +69,7 @@ ...@@ -64,7 +69,7 @@
<el-select <el-select
v-model="queryParams.projectType" v-model="queryParams.projectType"
placeholder="请选择项目类型" placeholder="请选择项目类型"
style="width: 193px" style="width: 220px"
clearable clearable
> >
<el-option <el-option
...@@ -194,13 +199,14 @@ import FlowChart from '@/components/FlowChart/index.vue' ...@@ -194,13 +199,14 @@ import FlowChart from '@/components/FlowChart/index.vue'
import {listTripApplication, projectList} from "../../../../api/costManage/cost.js"; import {listTripApplication, projectList} from "../../../../api/costManage/cost.js";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import { import {
getApproveNodeList, getApproveNodeList, getProjectManagerName,
getProjectName, getProjectName,
getRoleId, getRoleId,
tripApplicationApproval, tripApplicationApproval,
tripApplicationPassNotPass tripApplicationPassNotPass
} from "../../../../api/examineAndApprove/examineAndApprove.js"; } from "../../../../api/examineAndApprove/examineAndApprove.js";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import {ArrowDown} from "@element-plus/icons-vue";
const router = useRouter(); const router = useRouter();
const { project_status,cost_daily_status,project_type} = proxy.useDict('project_status', 'cost_daily_status','project_type'); const { project_status,cost_daily_status,project_type} = proxy.useDict('project_status', 'cost_daily_status','project_type');
...@@ -208,6 +214,13 @@ const list = ref([]) // 流程图内容,只有值 ...@@ -208,6 +214,13 @@ const list = ref([]) // 流程图内容,只有值
const allList = ref([]) // 流程图内容,值和角色id const allList = ref([]) // 流程图内容,值和角色id
const total = ref(0); const total = ref(0);
const projectNameList = ref([]); const projectNameList = ref([]);
const projectUserNameList = ref([]);
// 更多搜索框
const isExpanded = ref(false);
// 切换展开/折叠状态
const toggleSearch = () => {
isExpanded.value = !isExpanded.value;
}
//当前登录用户角色组 //当前登录用户角色组
const currentUserRoleInfoList = ref([]) const currentUserRoleInfoList = ref([])
...@@ -230,11 +243,14 @@ const dialogFormVisible = ref(false) ...@@ -230,11 +243,14 @@ const dialogFormVisible = ref(false)
const changProjectNumber = ref('') const changProjectNumber = ref('')
const stepActive = ref(1) const stepActive = ref(1)
const queryParams = reactive({ const queryParams = reactive({
pageNum:1, pageNum: 1,
pageSize:10, pageSize: 10,
projectName:null, projectNumber: null,
projectType:null, projectName: null,
status:null projectType: null,
projectUserName: null,
tripStartDate: null,
status: null,
}) })
...@@ -242,14 +258,32 @@ const queryParams = reactive({ ...@@ -242,14 +258,32 @@ const queryParams = reactive({
const getAllProjectName=()=> { const getAllProjectName=()=> {
getProjectName(queryParams).then(response => { getProjectName(queryParams).then(response => {
projectNameList.value = response.data; projectNameList.value = response.data;
// console.log("项目名称",projectNameList.value) console.log("项目名称",projectNameList.value)
}); });
} }
getAllProjectName() getAllProjectName()
// 搜索表单——获取所有项目经理
const getAllProjectUserName=()=> {
getProjectManagerName(queryParams).then(response => {
projectUserNameList.value = response.data;
console.log("项目经理",projectUserNameList.value)
});
}
getAllProjectUserName()
// 搜索按钮
function handleQuery() {
queryParams.pageNum = 1;
getList();
}
// 重置表单 // 重置表单
const reset = () => { const resetQuery = () => {
queryParams.projectNumber = null
queryParams.projectName = null queryParams.projectName = null
queryParams.projectType = null queryParams.projectType = null
queryParams.projectUserName = null
queryParams.tripStartDate = null
queryParams.status = null queryParams.status = null
getList() getList()
} }
......
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