Commit bf20e3da authored by qiyaxin's avatar qiyaxin

出差申请审批查询

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