Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
psa-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高滢
psa-web
Commits
2f7f0b0a
Commit
2f7f0b0a
authored
Mar 19, 2025
by
祁正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目费用申请-审核
parent
8595f83d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
18 deletions
+64
-18
projectCostRequest.js
src/api/projectCostRequest/projectCostRequest.js
+8
-0
index.vue
src/views/costManage/projectCostRequest/index.vue
+56
-18
No files found.
src/api/projectCostRequest/projectCostRequest.js
View file @
2f7f0b0a
...
...
@@ -64,3 +64,11 @@ export function delCostRequest(id) {
method
:
'put'
})
}
// 获取全部审批流程
export
function
getAllapproveList
(
id
)
{
return
request
({
url
:
'/approvalConfiguration/getNodeList/'
+
id
,
method
:
'get'
})
}
src/views/costManage/projectCostRequest/index.vue
View file @
2f7f0b0a
...
...
@@ -74,7 +74,9 @@
<text>
项目编号
</text>
<text>
{{
changProjectNumber
}}
</text>
</div>
<FlowChart
:dataList=
"list"
:widthDontai=
"'70%'"
:activeIndex=
"stepActive"
/>
<div
>
<FlowChart
:dataList=
"list"
:itemWidth=
"'130px'"
:activeIndex=
"stepActive"
/>
</div>
</div>
<!-- 列表-->
...
...
@@ -172,10 +174,12 @@ import {
delCostRequest
,
getCostRequestDetail
,
getCostRequestList
,
getProjectName
getProjectName
,
getAllapproveList
}
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
list
=
[
'个人'
,
'PM'
,
'事业部负责人'
,
'财务'
,
'领导'
]
// 流程图内容
const
list
=
ref
([])
// 流程图内容,只有值
const
allList
=
ref
([])
// 流程图内容,值和角色id
const
total
=
ref
(
0
);
const
queryParams
=
reactive
({
pageNum
:
1
,
...
...
@@ -186,12 +190,21 @@ const queryParams = reactive({
approveStatus
:
null
})
//获取列表第一个顶部信息
const
getTopApproveInfo
=
()
=>
{
let
item2
=
projectCostRequestList
.
value
[
0
]
console
.
log
(
"first"
,
item2
)
changProjectNumber
.
value
=
item2
.
projectNumber
let
i
=
allList
.
value
.
findIndex
((
item
)
=>
item
.
nodeId
===
item2
.
currentAuditRoleId
)
stepActive
.
value
=
i
+
1
}
// 列表
const
projectCostRequestList
=
ref
([]);
const
getList
=
()
=>
{
getCostRequestList
(
queryParams
).
then
(
response
=>
{
console
.
log
(
"列表"
,
response
.
rows
)
total
.
value
=
response
.
total
console
.
log
(
"列表"
,
response
)
projectCostRequestList
.
value
=
response
.
rows
;
// 对列表进行排序
projectCostRequestList
.
value
.
sort
((
a
,
b
)
=>
{
...
...
@@ -206,7 +219,9 @@ const getList=()=> {
const
dateB
=
new
Date
(
b
.
updateTime
);
return
dateB
-
dateA
;
});
getTopApproveInfo
()
});
}
getList
()
...
...
@@ -214,13 +229,22 @@ getList()
// const firstProjectNumber = computed(() => {
// return projectCostRequestList.value.length > 0 ? projectCostRequestList.value[0].projectNumber : null;
// });
//获取所有审批流程
const
getAllshenpiList
=
()
=>
{
getAllapproveList
(
14
).
then
(
response
=>
{
list
.
value
=
response
.
data
.
nodeList
.
map
((
item
)
=>
{
return
item
.
roleName
})
allList
.
value
=
response
.
data
.
nodeList
console
.
log
(
"所有节点"
,
allList
.
value
)
})
}
getAllshenpiList
()
// 表单 获取所有项目名称
const
projectNameList
=
ref
([]);
const
getAllProjectName
=
()
=>
{
getProjectName
(
queryParams
).
then
(
response
=>
{
projectNameList
.
value
=
response
.
data
;
console
.
log
(
"下拉框:项目名称"
,
projectNameList
.
value
)
});
}
getAllProjectName
()
...
...
@@ -235,26 +259,42 @@ const reset = () => {
}
// 提交搜索表单
const
onSearch
=
()
=>
{
console
.
log
(
"queryParams"
,
queryParams
)
getList
()
}
// 鼠标悬停更改步骤条
const
hoverColumnData
=
ref
(
''
);
const
stepActive
=
ref
(
1
);
const
changProjectNumber
=
ref
(
''
)
let
timer
=
null
;
const
handleHover
=
(
row
)
=>
{
changProjectNumber
.
value
=
row
.
projectNumber
const
approveStatus
=
row
.
approveStatus
;
console
.
log
(
"当前行的审批状态"
,
row
.
approveStatus
)
if
(
approveStatus
===
1
||
approveStatus
===
2
)
{
stepActive
.
value
=
1
;
}
else
if
(
approveStatus
===
3
)
{
stepActive
.
value
=
5
;
//防抖
if
(
timer
)
{
clearTimeout
(
timer
);
}
timer
=
setTimeout
(()
=>
{
changProjectNumber
.
value
=
row
.
projectNumber
console
.
log
(
row
)
let
i
=
allList
.
value
.
findIndex
((
item
)
=>
item
.
nodeId
===
row
.
currentAuditRoleId
)
stepActive
.
value
=
i
+
1
},
100
);
}
const
handleLeave
=
()
=>
{
stepActive
.
value
=
1
;
hoverColumnData
.
value
=
''
;
if
(
timer
)
{
clearTimeout
(
timer
);
}
timer
=
setTimeout
(()
=>
{
getTopApproveInfo
()
},
300
);
}
// 新增按钮
...
...
@@ -264,13 +304,11 @@ const goToAddPage = () => {
// 查看详情
const
handleView
=
({
id
})
=>
{
console
.
log
(
"详情"
+
id
)
proxy
.
$router
.
push
({
path
:
'/costManage/projectCostRequest/detail'
,
query
:
{
id
:
id
,
type
:
"详情"
}
});
}
// 编辑
const
handleUpdate
=
({
id
})
=>
{
console
.
log
(
"编辑"
+
id
)
proxy
.
$router
.
push
({
path
:
'/costManage/projectCostRequest/add'
,
query
:
{
id
:
id
,
type
:
"编辑"
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment