Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db_qms_wx
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
刘怀志
db_qms_wx
Commits
c5452dce
Commit
c5452dce
authored
Mar 26, 2025
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(审批详情):生产审批移动端开发1
parent
5842a2df
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1773 additions
and
45 deletions
+1773
-45
approve.js
api/system/approve.js
+40
-1
base-data-approval.vue
components/home-approval/base-data-approval.vue
+2
-1
base-data-start.vue
components/home-approval/base-data-start.vue
+2
-1
production-approval.vue
components/home-approval/production-approval.vue
+81
-42
pages.json
pages.json
+21
-0
baseDetail.vue
pages/approval_detail/baseDetail.vue
+1
-0
drawerShow.vue
pages/approval_detail/drawerShow.vue
+670
-0
drawerShowEngineTrace.vue
pages/approval_detail/drawerShowEngineTrace.vue
+478
-0
drawerShowTraceError.vue
pages/approval_detail/drawerShowTraceError.vue
+478
-0
No files found.
api/system/approve.js
View file @
c5452dce
...
...
@@ -84,3 +84,42 @@ export function getProcessInstanceStatus(instanceId) {
method
:
'get'
})
}
// 1. 工具点检_根据流程实例id查找流程实例审批详情
export
function
getToolProcessDetail
(
businessId
)
{
return
request
({
url
:
'/toolInspectMonitor/getDetail/'
+
businessId
,
method
:
'get'
,
})
}
// 2. 工具点检_工具点检流程审批
export
function
toolProcessGxApproval
(
approve
)
{
return
request
({
url
:
'/toolInspectMonitor/processToolApproval'
,
method
:
'post'
,
data
:
approve
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
// 接口修改传参类型
}
})
}
// 1. 生产辅材_根据流程实例id查找流程实例审批详情
export
function
getMateriaProcessDetail
(
businessId
)
{
return
request
({
url
:
'/aeauxiliarymaterial/getDetail/'
+
businessId
,
method
:
'get'
,
})
}
// 1. 设备标定_根据流程实例id查找流程实例审批详情
export
function
getSignProcessDetail
(
businessId
)
{
return
request
({
url
:
'/qc/equipment/sign/getDetail/'
+
businessId
,
method
:
'get'
,
})
}
// 1. 设备TPM_根据流程实例id查找流程实例审批详情
export
function
getTpmProcessDetail
(
businessId
)
{
return
request
({
url
:
'/qc/equipment/tpm/getDetail/'
+
businessId
,
method
:
'get'
,
})
}
\ No newline at end of file
components/home-approval/base-data-approval.vue
View file @
c5452dce
...
...
@@ -315,13 +315,14 @@ export default {
text
-
align
:
left
;
font
-
style
:
normal
;
text
-
transform
:
none
;
min
-
width
:
130
rpx
;
}
.
subContent
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
400
;
font
-
size
:
28
rpx
;
color
:
#
222222
;
text
-
align
:
center
;
text
-
align
:
right
;
font
-
style
:
normal
;
text
-
transform
:
none
;
}
...
...
components/home-approval/base-data-start.vue
View file @
c5452dce
...
...
@@ -314,13 +314,14 @@ export default {
text
-
align
:
left
;
font
-
style
:
normal
;
text
-
transform
:
none
;
min
-
width
:
130
rpx
;
}
.
subContent
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
400
;
font
-
size
:
28
rpx
;
color
:
#
222222
;
text
-
align
:
center
;
text
-
align
:
right
;
font
-
style
:
normal
;
text
-
transform
:
none
;
}
...
...
components/home-approval/production-approval.vue
View file @
c5452dce
<!--生产信息审批-->
<
template
>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
@
scrolltolower=
"scrolltolower"
:scroll-with-animation=
"true"
>
<view
v-for=
"(item,key) in noticeList"
:key=
"key"
style=
"display: flex;background-color: #ffffff"
>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
@
scrolltolower=
"scrolltolower"
:scroll-with-animation=
"true"
>
<view
v-for=
"(item, key) in noticeList"
:key=
"key"
style=
"display: flex;background-color: #ffffff"
>
<!-- 原消息卡片模板 -->
<view
class=
"noticeCard"
@
click=
"goDetail"
>
<view
class=
"noticeCard"
@
click=
"goDetail(item.businessId, item.processCode, item.processStatus, item.allowApprove, item.processName)"
>
<view
class=
"noticeTop"
>
<view
class=
"titleClass"
>
<!--
<img
:src=
"leftIconOne"
/>
-->
{{
item
.
processName
}}
<!--
<img
:src=
"leftIconOne"
/>
-->
{{
item
.
processName
}}
</view>
<view
class=
"statusText"
:style=
"
{
color: statusMap[item.processStatus].color
}">
{{
statusMap
[
item
.
processStatus
].
text
}}
<view
class=
"statusText"
:style=
"
{
color: statusMap[item.processStatus].color
}">
{{
statusMap
[
item
.
processStatus
].
text
}}
</view>
</view>
<view
class=
"subTitleClass"
>
...
...
@@ -23,7 +20,7 @@
发起时间
</view>
<view
class=
"subContent"
>
{{
parseTimeA
(
item
.
initiateDate
,
'YYYY/MM/DD {h
}
:{i
}
:{s
}
'
)
}}
{{
parseTimeA
(
item
.
initiateDate
,
'YYYY/MM/DD {h
}
:{i
}
:{s
}
'
)
}}
<
/view
>
<
/view
>
<
view
class
=
"subRow"
>
...
...
@@ -31,7 +28,8 @@
当前审批人
<
/view
>
<
view
class
=
"subContent"
>
{{
item
.
currentApproveUserName
||
'-'
}}
{{
item
.
currentApproveUserOrgName
?
'·'
+
item
.
currentApproveUserOrgName
:
''
}}
{{
item
.
currentApproveUserName
||
'-'
}}
{{
item
.
currentApproveUserOrgName
?
'·'
+
item
.
currentApproveUserOrgName
:
''
}}
<
/view
>
<
/view
>
<
view
class
=
"subRow"
>
...
...
@@ -47,7 +45,7 @@
结束时间
<
/view
>
<
view
class
=
"subContent"
>
{{
parseTimeA
(
item
.
completeDate
,
'YYYY/MM/DD {h
}
:{i
}
:{s
}
'
)
}}
{{
parseTimeA
(
item
.
completeDate
,
'YYYY/MM/DD {h
}
:{i
}
:{s
}
'
)
}}
<
/view
>
<
/view
>
<
/view
>
...
...
@@ -55,12 +53,8 @@
<
/view
>
<!--
底部加载
-->
<
view
v
-
show
=
"total > 0 && loadStatus !== 'loading'"
style
=
"text-align: center;padding-bottom: 5rpx;"
>
<
u
-
loadmore
:
status
=
"loadStatus"
:
loadmore
-
text
=
"loadText.loadmore"
:
loading
-
text
=
"loadText.loading"
:
nomore
-
text
=
"loadText.nomore"
/>
<
u
-
loadmore
:
status
=
"loadStatus"
:
loadmore
-
text
=
"loadText.loadmore"
:
loading
-
text
=
"loadText.loading"
:
nomore
-
text
=
"loadText.nomore"
/>
<
/view
>
<
view
v
-
show
=
"loadStatus === 'loading'"
style
=
"text-align: center"
>
<!--
<
image
src
=
"../../static/images/home/loading.gif"
style
=
"width: 50rpx;height: 60rpx;"
/>
-->
...
...
@@ -71,7 +65,7 @@
<
script
>
import
{
queryInstanceByPage
}
from
'../../api/system/approve'
import
{
parseTime
}
from
'../../api/utils/ruoyi'
import
{
getDicts
}
from
"../../api/system/baseConfig"
;
import
{
getDicts
}
from
"../../api/system/baseConfig"
;
import
leftIconOne
from
"../../static/images/leftIconOne.png"
;
import
leftIconTwo
from
"../../static/images/leftIconTwo.png"
;
...
...
@@ -133,15 +127,27 @@ export default {
}
,
}
,
methods
:
{
goDetail
()
{
goDetail
(
processId
,
processCode
,
processStatus
,
allowApprove
,
processName
)
{
let
path
=
''
if
(
this
.
processCode
===
'00016'
||
this
.
processCode
===
'00017'
)
{
// 00016(铸造科对发动机装配科发起追溯) 00017(机加工科对发动机装配科发起追溯) => drawerShowEngineTrace
path
=
'drawerShowEngineTrace'
}
else
if
(
this
.
processCode
!==
'00019'
)
{
// processCode.value !== '00019' =>drawerShow
path
=
'drawerShow'
}
else
{
console
.
log
(
'3'
,
this
.
processCode
)
// 00019(追溯完成度异常提醒) => drawerShowTraceError
path
=
'drawerShowTraceError'
}
uni
.
navigateTo
({
url
:
'/pages/approval_detail/baseDetail?id=1'
url
:
`/pages/approval_detail/${path
}
?processId=${processId
}
&processStatus=${processStatus
}
&processCode=${processCode
}
&allowApprove=${allowApprove
}
&processName=${processName
}
`
}
)
}
,
/**
* 指定列表,根据值,取label
*/
getLabelByValue
(
list
,
value
,
key
=
'value'
,
label
=
'label'
)
{
getLabelByValue
(
list
,
value
,
key
=
'value'
,
label
=
'label'
)
{
const
item
=
list
.
find
(
item
=>
item
[
key
]
===
value
)
return
item
?
item
[
label
]
:
'-'
}
,
...
...
@@ -188,16 +194,18 @@ export default {
<
/script
>
<
style
scoped
lang
=
"scss"
>
.
scroll
-
view
{
.
scroll
-
view
{
height
:
960
rpx
;
}
.
no
-
message
{
.
no
-
message
{
text
-
align
:
center
;
height
:
calc
(
100
vh
-
350
rpx
);
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
.
topTips
{
width
:
100
%
;
height
:
80
rpx
;
...
...
@@ -209,22 +217,26 @@ export default {
text
-
align
:
center
;
padding
-
top
:
20
rpx
;
}
.
notice
-
container
{
width
:
100
%
;
margin
-
top
:
542
rpx
;
background
-
color
:
#
fff
;
overflow
-
y
:
hidden
;
}
.
topContent
{
display
:
flex
;
padding
-
top
:
32
rpx
;
padding
-
bottom
:
32
rpx
;
padding
-
left
:
32
rpx
;
background
-
color
:
#
f0f0f0
;
.
topSelect
{
width
:
588
rpx
;
height
:
88
rpx
;
}
.
topButton
{
margin
-
left
:
32
rpx
;
margin
-
top
:
22
rpx
;
...
...
@@ -234,6 +246,7 @@ export default {
color
:
#
343744
;
}
}
.
topContent_read
{
display
:
flex
;
padding
:
34
rpx
32
rpx
;
...
...
@@ -242,24 +255,28 @@ export default {
font
-
family
:
Source
Han
Sans
CN
-
Bold
,
Source
Han
Sans
CN
;
font
-
weight
:
bold
;
line
-
height
:
40
rpx
;
.
fontColor
{
background
-
image
:
-
webkit
-
linear
-
gradient
(
top
,
#
02
A7BA
,
#
62
AE79
);
-
webkit
-
background
-
clip
:
text
;
-
webkit
-
text
-
fill
-
color
:
transparent
;
background
-
image
:
-
webkit
-
linear
-
gradient
(
top
,
#
02
A7BA
,
#
62
AE79
);
-
webkit
-
background
-
clip
:
text
;
-
webkit
-
text
-
fill
-
color
:
transparent
;
}
}
.
noticeCard
{
width
:
100
%
;
background
-
color
:
#
F9F9F9
;
margin
:
20
rpx
22
rpx
0
20
rpx
;
padding
-
bottom
:
32
rpx
;
border
-
radius
:
15
rpx
;
.
noticeTop
{
.
noticeTop
{
display
:
flex
;
justify
-
content
:
space
-
between
;
border
-
bottom
:
2
rpx
solid
#
F2F2F2
;
padding
:
22
rpx
34
rpx
24
rpx
0
;
}
.
titleClass
{
display
:
flex
;
align
-
items
:
center
;
...
...
@@ -271,11 +288,13 @@ export default {
font
-
style
:
normal
;
text
-
transform
:
none
;
padding
-
left
:
22
rpx
;
img
{
img
{
margin
-
right
:
22
rpx
;
}
}
.
statusText
{
.
statusText
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
500
;
font
-
size
:
28
rpx
;
...
...
@@ -283,6 +302,7 @@ export default {
font
-
style
:
normal
;
text
-
transform
:
none
;
}
.
subTitleClass
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
400
;
...
...
@@ -293,10 +313,12 @@ export default {
text
-
transform
:
none
;
padding
:
28
rpx
32
rpx
0
32
rpx
;
}
.
subRow
{
.
subRow
{
display
:
flex
;
justify
-
content
:
space
-
between
;
margin
-
bottom
:
12
rpx
;
.
subTitle
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
400
;
...
...
@@ -305,17 +327,20 @@ export default {
text
-
align
:
left
;
font
-
style
:
normal
;
text
-
transform
:
none
;
min
-
width
:
130
rpx
;
}
.
subContent
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
400
;
font
-
size
:
28
rpx
;
color
:
#
222222
;
text
-
align
:
center
;
text
-
align
:
right
;
font
-
style
:
normal
;
text
-
transform
:
none
;
}
}
.
timeClass
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
400
;
...
...
@@ -326,16 +351,20 @@ export default {
text
-
transform
:
none
;
}
}
// 有导航栏后 防止滑到最上面
.
scroll
-
y
{
height
:
calc
(
100
vh
-
88
px
)
}
::
v
-
deep
.
u
-
line
{
border
-
bottom
-
width
:
3
px
!
important
;
}
::
v
-
deep
.
u
-
subsection
{
background
-
color
:
#
fff
}
.
checkView
{
width
:
76
rpx
;
align
-
content
:
center
;
...
...
@@ -344,19 +373,23 @@ export default {
//margin-top: 20rpx;
//position: absolute;
}
::
v
-
deep
.
u
-
checkbox
-
group
{
//background-color: red;
//padding-left: 16rpx;
height
:
80
rpx
;
position
:
relative
;
top
:
50
%
;
/*偏移*/
top
:
50
%
;
/*偏移*/
transform
:
translateY
(
-
50
%
);
}
::
v
-
deep
.
u
-
checkbox
{
margin
:
auto
;
width
:
64
rpx
;
height
:
64
rpx
;
}
::
v
-
deep
.
u
-
checkbox__icon
-
wrap
{
margin
-
left
:
25
rpx
;
margin
-
right
:
0
!
important
;
...
...
@@ -366,14 +399,17 @@ export default {
::
v
-
deep
.
u
-
subsection__bar
{
background
:
linear
-
gradient
(
180
deg
,
#
02
A7BA
0
%
,
#
62
AE79
100
%
);
}
::
v
-
deep
.
u
-
subsection__item
{
border
:
none
!
important
;
//border-color: none;
}
::
v
-
deep
.
u
-
subsection
{
height
:
88
rpx
!
important
;
border
-
radius
:
16
rpx
16
rpx
16
rpx
16
rpx
;
}
::
v
-
deep
.
u
-
subsection__item__text
{
font
-
size
:
34
rpx
!
important
;
font
-
family
:
Source
Han
Sans
CN
-
Bold
,
Source
Han
Sans
CN
;
...
...
@@ -387,26 +423,29 @@ export default {
::
v
-
deep
.
u
-
loading
-
page__warpper__loading
-
icon__img
{
::
v
-
deep
.
u
-
loading
-
page__warpper__loading
-
icon__img
{
width
:
90
rpx
!
important
;
height
:
90
rpx
!
important
;
}
::
v
-
deep
.
u
-
tabs__wrapper__nav__item__text
{
::
v
-
deep
.
u
-
tabs__wrapper__nav__item__text
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
500
;
font
-
size
:
28
rpx
;
}
.
top
-
tabs
{
.
top
-
tabs
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
margin
-
top
:
20
rpx
;
border
-
bottom
:
2
rpx
solid
#
F2F2F2
;
::
v
-
deep
.
u
-
tabs
{
::
v
-
deep
.
u
-
tabs
{
width
:
60
%
;
}
}
//::v-deep .u-subsection
{
// background: black;
//
}
<
/style>
\ No newline at end of file
//
}
<
/style>
\ No newline at end of file
pages.json
View file @
c5452dce
...
...
@@ -21,6 +21,27 @@
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/approval_detail/drawerShowEngineTrace"
,
"style"
:
{
"navigationBarTitleText"
:
"DHEC QMS"
,
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/approval_detail/drawerShow"
,
"style"
:
{
"navigationBarTitleText"
:
"DHEC QMS"
,
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/approval_detail/drawerShowTraceError"
,
"style"
:
{
"navigationBarTitleText"
:
"DHEC QMS"
,
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/mine/setting/aboutUs"
,
"style"
:
{
...
...
pages/approval_detail/baseDetail.vue
View file @
c5452dce
...
...
@@ -335,6 +335,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.base-detail
{
background
:
#FFFFFF
;
min-height
:
100vh
;
// height: 100vh;
.container
{
...
...
pages/approval_detail/drawerShow.vue
0 → 100644
View file @
c5452dce
<!-- processCode.value !== '00019' 审批详情 -->
<
template
>
<view
class=
"base-detail"
>
<ya-navbar
title=
"审批详情233"
:left-icon-color=
"'#fff'"
:bg-style=
"'#333399'"
:title-style=
"'color: #fff;font-weight: 500;font-size: 35rpx;'"
/>
<view
class=
"container"
>
<view
class=
"title"
>
{{
processName
}}
</view>
<!-- 步骤图区 -->
<view
class=
"step-container"
>
<vertical-steps
:steps=
"steps"
:current-step=
"1"
>
<!-- 自定义内容 -->
<template
v-for=
"(step, index) in steps"
#[`
content-
$
{index}`]>
<!-- 发起人 -->
<template
v-if=
"index === 0"
>
<template
v-if=
"getProcessType() === '工具'"
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
所属产线
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
toolCheckDto
.
lineName
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
岗位op
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
toolCheckDto
.
op
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
工具编号
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
toolCheckDto
.
toolCode
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
工具名称
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
toolCheckDto
.
toolCode
||
'-'
}}
</view>
</view>
</view>
</view>
</
template
>
<
template
v-if=
"getProcessType() === '辅材'"
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
所属产线
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
toolCheckDto
.
lineName
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
设备ID
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
materialDto
.
equipmentInfoId
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
生产辅材编号
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
materialDto
.
materialCode
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
生产辅材名称
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
materialDto
.
materialName
||
'-'
}}
</view>
</view>
</view>
</view>
</
template
>
<
template
v-if=
"getProcessType() === '标定'"
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
设备编号
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
tmpInfoDTO
.
equipmentCode
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
设备名称
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
tmpInfoDTO
.
equipmentName
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
所属产线
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
tmpInfoDTO
.
proLineName
||
'-'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
工序编号
</view>
<view
class=
"subContent"
>
{{
instanceDetail
.
tmpInfoDTO
.
gxCode
||
'-'
}}
</view>
</view>
</view>
</view>
</
template
>
</template>
<!-- 审批人 -->
<
template
v-else
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
部门
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveDeptName
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
生产角色
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveRoleName
||
'无'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
员工姓名
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveUser
||
'无'
}}
</view>
</view>
</view>
</view>
</
template
>
</template>
</vertical-steps>
</view>
<!-- 步骤图完成 -->
<!-- 备注区 -->
<view
class=
"title"
>
备注信息
</view>
<view
class=
"remark-container"
>
<u-form
:model=
"instanceDetail"
>
<u-form-item
label=
"访问区域"
prop=
"remark"
labelPosition=
"top"
labelWidth=
"80"
>
<u-textarea
disabled
v-model=
"instanceDetail.remarks"
placeholder=
"-"
></u-textarea>
</u-form-item>
</u-form>
</view>
<!-- 备注区完成 -->
<!-- 变更内容区 -->
<view
class=
"title"
>
变更内容
</view>
<view
class=
"change-container"
>
<view
class=
"change-item"
>
请登录PC端查看变更详情
</view>
</view>
<!-- 按钮区域 -->
<view
v-if=
"isView === '0' && status === 'true'"
class=
"btns-container"
>
<view
class=
"btn reject-btn"
@
click=
"approveByAdmin('REJECT')"
>
驳回
</view>
<view
class=
"btn approve-btn"
@
click=
"approveByAdmin('CONSENT')"
>
通过
</view>
</view>
</view>
</view>
</template>
<
script
>
import
VerticalSteps
from
'@/components/vertical-steps/vertical-steps'
import
{
getProcessNodeByInstanceId
,
approveByAdmin
,
getProcessInstanceStatus
,
getToolProcessDetail
,
getMateriaProcessDetail
,
getSignProcessDetail
,
getTpmProcessDetail
}
from
'../../api/system/approve'
import
{
parseTime
}
from
'../../api/utils/ruoyi'
import
{
getDicts
}
from
"../../api/system/baseConfig"
;
import
{
toast
}
from
'../../utils/common'
export
default
{
name
:
"baseDetail"
,
onLoad
:
function
(
option
)
{
//option为object类型,会序列化上个页面传递的参数
// processId, processCode, processStatus, allowApprove, processName
this
.
processId
=
option
.
processId
;
this
.
processCode
=
option
.
processCode
;
this
.
processStatus
=
option
.
processStatus
;
this
.
isUpdate
=
option
.
allowApprove
;
this
.
processName
=
option
.
processName
;
this
.
getList
();
this
.
getInstanceDetail
();
},
components
:
{
VerticalSteps
},
data
()
{
return
{
isLoading
:
false
,
processId
:
''
,
processCode
:
''
,
processStatus
:
''
,
allowApprove
:
''
,
processName
:
''
,
processType
:
''
,
label
:
''
,
instanceDetail
:
{
approves
:
[],
toolCheckDto
:
{},
materialDto
:
{},
tmpInfoDTO
:
{}
},
// 发起时间
initiateDate
:
''
,
approve
:
{
processInstanceId
:
null
,
instanceApproveId
:
null
,
hasConfirm
:
true
,
formResult
:
null
,
formResultOne
:
null
,
formResultTwo
:
null
,
approveOpinion
:
1
,
selectOption
:
null
},
// 流程实例详情列表
instanceDetailList
:
[],
formData
:
{
remark
:
''
},
steps
:
[],
jobLevelList
:
[],
isView
:
''
,
status
:
''
,
// url
urlList
:
[
{
value
:
'0001'
,
url
:
'/staff/processApproval'
},
{
value
:
'1001'
,
url
:
'/aeclassesinfo/processApproval'
},
{
value
:
'1002'
,
url
:
'/accreditpostvalidity/processPostApproval'
},
{
value
:
'0002'
,
url
:
'/sysRoleMamager/processApproval'
},
{
value
:
'0004'
,
url
:
'/sysRoleMamager/non_processApproval'
},
{
value
:
'0003'
,
url
:
'/organization/processApproval'
},
{
value
:
'1020'
,
url
:
'/aeequipmenttype/processApproval'
},
{
value
:
'1030'
,
url
:
'/aeenginemodel/processApproval'
},
{
value
:
'1031'
,
url
:
'/aeenginemodelextend/processApproval'
},
{
value
:
'1032'
,
url
:
'/aemodelgx/processApproval'
},
{
value
:
'1043'
,
url
:
'/aeunit/processApproval'
},
{
value
:
'1042'
,
url
:
'/aepartinformation/processApproval'
},
{
value
:
'1040'
,
url
:
'/aetool/processApproval'
},
{
value
:
'1004'
,
url
:
'/aeprolineinfo/processApproval'
},
{
value
:
'1005'
,
url
:
'/aeprolinesegment/processApproval'
},
{
value
:
'1006'
,
url
:
'/aeprolinegx/processGxApproval'
},
{
value
:
'1041'
,
url
:
'/aeauxiliarymaterial/processApproval'
},
{
value
:
'1009'
,
url
:
'/aeprolinetray/processApproval'
},
{
value
:
'1007'
,
url
:
'/aetechequipment/processApproval'
},
{
value
:
'1008'
,
url
:
'/aetechassembly/processApproval'
},
{
value
:
'1010'
,
url
:
'/aetechequipment/all/processApproval'
},
{
value
:
'1011'
,
url
:
'/aetechassembly/all/processApproval'
},
{
value
:
'1021'
,
url
:
'/aeequipmentinfo/processApproval'
},
{
value
:
'1044'
,
url
:
'/aegroupproject/processApproval'
}
]
}
},
computed
:
{
// 计算属性
parseTimeA
()
{
return
(
time
,
format
)
=>
{
return
parseTime
(
time
,
format
||
'{m}-{d} {h}:{i}:{s}'
)
}
},
},
methods
:
{
getProcessType
()
{
if
(
this
.
processCode
===
'00002'
||
this
.
processCode
===
'00003'
||
this
.
processCode
===
'00004'
)
{
return
'标定'
}
if
(
this
.
processCode
===
'00005'
||
this
.
processCode
===
'00006'
||
this
.
processCode
===
'00007'
)
{
return
'TPM'
}
if
(
this
.
processCode
===
'00009'
||
this
.
processCode
===
'00010'
)
{
return
'工具'
}
if
(
this
.
processCode
===
'00012'
||
this
.
processCode
===
'00013'
)
{
return
'辅材'
}
},
/**
* 获取流程实例详情
*/
async
getInstanceDetail
()
{
this
.
isLoading
=
true
let
res
if
(
this
.
getProcessType
()
===
'工具'
)
{
res
=
await
getToolProcessDetail
(
this
.
processId
)
if
(
res
.
data
)
{
this
.
instanceDetail
=
res
.
data
this
.
instanceDetailList
.
push
(
res
.
data
.
toolCheckDto
)
this
.
processName
=
res
.
data
.
toolCheckDto
.
processName
this
.
initiateDate
=
res
.
data
.
toolCheckDto
.
initiateDate
}
}
else
if
(
this
.
getProcessType
()
===
'辅材'
)
{
res
=
await
getMateriaProcessDetail
(
this
.
processId
)
if
(
res
.
data
)
{
this
.
instanceDetail
=
res
.
data
this
.
instanceDetailList
=
res
.
data
.
mesJsonList
this
.
processName
=
res
.
data
.
materialDto
.
processName
this
.
initiateDate
=
res
.
data
.
materialDto
.
initiateDate
}
}
else
if
(
this
.
getProcessType
()
===
'标定'
)
{
res
=
await
getSignProcessDetail
(
this
.
processId
)
if
(
res
.
data
)
{
this
.
instanceDetail
=
res
.
data
if
(
this
.
processCode
===
'00002'
||
this
.
processCode
===
'00004'
)
{
this
.
approve
.
selectOption
=
this
.
instanceDetail
.
approves
[
0
].
approveSelectOption
}
else
if
(
this
.
processCode
===
'00003'
)
{
this
.
approve
.
selectOption
=
this
.
instanceDetail
.
approves
[
1
].
approveSelectOption
}
this
.
approve
.
formResultOne
=
this
.
instanceDetail
.
approves
[
0
].
approveFormInfo
this
.
instanceDetailList
=
res
.
data
.
equipmentComDTOS
this
.
processName
=
res
.
data
.
tmpInfoDTO
.
processName
this
.
initiateDate
=
res
.
data
.
tmpInfoDTO
.
initiateDate
}
}
else
if
(
this
.
getProcessType
()
===
'TPM'
)
{
res
=
await
getTpmProcessDetail
(
this
.
processId
)
if
(
res
.
data
)
{
this
.
instanceDetail
=
res
.
data
this
.
instanceDetailList
.
push
(
res
.
data
.
tmpInfoDTO
)
console
.
log
(
'数据'
,
this
.
instanceDetailList
)
this
.
processName
=
res
.
data
.
tmpInfoDTO
.
processName
this
.
initiateDate
=
res
.
data
.
tmpInfoDTO
.
initiateDate
}
}
// 统一处理步骤生成
if
(
res
.
data
)
{
this
.
steps
=
[
{
title
:
'发起'
,
content
:
{}
},
...
this
.
instanceDetail
.
approves
.
map
((
item
,
index
)
=>
({
title
:
`审批人
${
index
+
1
}
`
,
content
:
item
}))
]
}
this
.
isLoading
=
false
},
/**
* 获取审批url
* @returns {string}
*/
getUrl
()
{
const
type
=
this
.
instanceDetail
.
processType
let
url
=
''
this
.
urlList
.
forEach
(
item
=>
{
if
(
item
.
value
===
type
)
{
url
=
item
.
url
}
})
return
url
},
async
approveByAdmin
(
type
)
{
this
.
btnLoading
=
true
// 审批
await
approveByAdmin
({
instanceId
:
this
.
processId
,
approveId
:
this
.
instanceDetail
.
currentApprove
.
businessId
,
approveControl
:
type
,
url
:
this
.
getUrl
(),
processGroup
:
'1'
}).
catch
(()
=>
{
this
.
isView
=
''
})
// 回调获取流程实例的状态
const
{
data
}
=
await
getProcessInstanceStatus
(
this
.
processId
)
// 异常结束
if
(
data
===
'6'
)
{
toast
(
'流程异常结束,请检查对应流程'
)
}
else
{
toast
(
'审批成功'
)
this
.
$tab
.
reLaunch
(
'/pages/index'
)
}
},
/** 查询字典数据列表 */
getList
()
{
getDicts
(
'sys_job_level'
).
then
(
response
=>
{
// console.log("查询数据字段狗",response)
const
jobLevelForm
=
response
.
data
for
(
const
item
of
jobLevelForm
)
{
const
result
=
{
value
:
item
.
dictValue
,
label
:
item
.
dictLabel
}
this
.
jobLevelList
.
push
(
result
)
}
})
},
/**
* 指定列表,根据值,取label
*/
getLabelByValue
(
list
,
value
,
key
=
'value'
,
label
=
'label'
)
{
const
item
=
list
.
find
(
item
=>
item
[
key
]
===
value
)
return
item
?
item
[
label
]
:
'-'
},
/**
* 获取审批节点详情
*/
toProcessInstanceInfo
()
{
// 非追溯完成度异常
if
(
this
.
processCode
===
'00016'
||
this
.
processCode
===
'00017'
)
{
console
.
log
(
'1'
,
this
.
processCode
)
drawerShowEngineTrace
.
value
=
true
}
else
if
(
this
.
processCode
!==
'00019'
)
{
console
.
log
(
'2'
,
this
.
processCode
)
drawerShow
.
value
=
true
// drawerShowTraceError.value = true
}
else
{
console
.
log
(
'3'
,
this
.
processCode
)
// 追溯完成度异常
drawerShowTraceError
.
value
=
true
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.base-detail
{
background
:
#FFFFFF
;
min-height
:
100vh
;
// height: 100vh;
.container
{
.title
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
40rpx
;
color
:
#0B0B0B
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
padding
:
52rpx
32rpx
20rpx
32rpx
;
border-bottom
:
2rpx
solid
#F2F2F2
;
}
}
.step-container
{
padding-left
:
44rpx
;
padding-right
:
26rpx
;
}
.custom-table
{
background
:
#F9F9F9
;
border-radius
:
10rpx
;
padding
:
32rpx
;
}
.subTitleClass
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#9A9A9A
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
}
.subRow
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
12rpx
;
.subTitle
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#9A9A9A
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
min-width
:
120rpx
;
}
.subContent
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#222222
;
text-align
:
right
;
font-style
:
normal
;
text-transform
:
none
;
}
}
.remark-container
{
padding
:
28rpx
46rpx
0
48rpx
;
::v-deep
.u-form-item__body__left__content__label
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#111111
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
margin-bottom
:
14rpx
;
}
}
.change-container
{
padding
:
28rpx
46rpx
0
48rpx
;
.change-item
{
width
:
684rpx
;
height
:
140rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
#FFFBF0
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#F4850E
;
line-height
:
36rpx
;
font-style
:
normal
;
}
}
}
.btns-container
{
display
:
flex
;
justify-content
:
center
;
gap
:
16rpx
;
padding
:
40rpx
0
;
.btn
{
width
:
312rpx
;
height
:
96rpx
;
border-radius
:
56rpx
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
34rpx
;
line-height
:
48rpx
;
text-align
:
center
;
font-style
:
normal
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.reject-btn
{
border
:
2rpx
solid
#333399
;
color
:
#333399
;
}
.approve-btn
{
background
:
#333399
;
color
:
#FFFFFF
;
}
}
</
style
>
\ No newline at end of file
pages/approval_detail/drawerShowEngineTrace.vue
0 → 100644
View file @
c5452dce
<!-- 00016(铸造科对发动机装配科发起追溯) 00017(机加工科对发动机装配科发起追溯) 审批详情 -->
<
template
>
<view
class=
"base-detail"
>
<ya-navbar
title=
"审批详情drawerShowEngineTrace"
:left-icon-color=
"'#fff'"
:bg-style=
"'#333399'"
:title-style=
"'color: #fff;font-weight: 500;font-size: 35rpx;'"
/>
<view
class=
"container"
>
<view
class=
"title"
>
基础数据变更(
{{
label
}}
)
</view>
<!-- 步骤图区 -->
<view
class=
"step-container"
>
<vertical-steps
:steps=
"steps"
:current-step=
"1"
>
<!-- 自定义内容 -->
<template
v-for=
"(step, index) in steps"
#[`
content-
$
{index}`]>
<!-- 发起人 -->
<template
v-if=
"index === 0"
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
员工姓名
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
userName
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
员工职级
</view>
<view
class=
"subContent"
>
{{
getLabelByValue
(
jobLevelList
,
step
.
content
.
rank
)
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
创建日期
</view>
<view
class=
"subContent"
>
{{
parseTimeA
(
step
.
content
.
createTime
,
'YYYY/MM/DD HH:mm'
)
}}
</view>
</view>
</view>
</view>
</
template
>
<!-- 审批人 -->
<
template
v-else
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
部门
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveDeptName
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
生产角色
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveRoleName
||
'无'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
员工姓名
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveUser
||
'无'
}}
</view>
</view>
</view>
</view>
</
template
>
</template>
</vertical-steps>
</view>
<!-- 步骤图完成 -->
<!-- 备注区 -->
<view
class=
"title"
>
备注信息
</view>
<view
class=
"remark-container"
>
<u-form
:model=
"instanceDetail"
>
<u-form-item
label=
"访问区域"
prop=
"remark"
labelPosition=
"top"
labelWidth=
"80"
>
<u-textarea
disabled
v-model=
"instanceDetail.remarks"
placeholder=
"-"
></u-textarea>
</u-form-item>
</u-form>
</view>
<!-- 备注区完成 -->
<!-- 变更内容区 -->
<view
class=
"title"
>
变更内容
</view>
<view
class=
"change-container"
>
<view
class=
"change-item"
>
请登录PC端查看变更详情
</view>
</view>
<!-- 按钮区域 -->
<view
v-if=
"isView === '0' && status === 'true'"
class=
"btns-container"
>
<view
class=
"btn reject-btn"
@
click=
"approveByAdmin('REJECT')"
>
驳回
</view>
<view
class=
"btn approve-btn"
@
click=
"approveByAdmin('CONSENT')"
>
通过
</view>
</view>
</view>
</view>
</template>
<
script
>
import
VerticalSteps
from
'@/components/vertical-steps/vertical-steps'
import
{
getProcessNodeByInstanceId
,
approveByAdmin
,
getProcessInstanceStatus
}
from
'../../api/system/approve'
import
{
parseTime
}
from
'../../api/utils/ruoyi'
import
{
getDicts
}
from
"../../api/system/baseConfig"
;
import
{
toast
}
from
'../../utils/common'
export
default
{
name
:
"baseDetail"
,
onLoad
:
function
(
option
)
{
//option为object类型,会序列化上个页面传递的参数
// processId, processCode, processStatus, allowApprove, processName
this
.
processId
=
option
.
processId
;
this
.
processCode
=
option
.
processCode
;
this
.
processStatus
=
option
.
processStatus
;
this
.
isUpdate
=
option
.
allowApprove
;
this
.
processName
=
option
.
processName
;
this
.
getList
();
this
.
toProcessInstanceInfo
();
},
components
:
{
VerticalSteps
},
data
()
{
return
{
processId
:
''
,
processCode
:
''
,
processStatus
:
''
,
allowApprove
:
''
,
processName
:
''
,
processType
:
''
,
label
:
''
,
instanceDetail
:
{},
formData
:
{
remark
:
''
},
steps
:
[],
jobLevelList
:
[],
isView
:
''
,
status
:
''
,
// url
urlList
:
[
{
value
:
'0001'
,
url
:
'/staff/processApproval'
},
{
value
:
'1001'
,
url
:
'/aeclassesinfo/processApproval'
},
{
value
:
'1002'
,
url
:
'/accreditpostvalidity/processPostApproval'
},
{
value
:
'0002'
,
url
:
'/sysRoleMamager/processApproval'
},
{
value
:
'0004'
,
url
:
'/sysRoleMamager/non_processApproval'
},
{
value
:
'0003'
,
url
:
'/organization/processApproval'
},
{
value
:
'1020'
,
url
:
'/aeequipmenttype/processApproval'
},
{
value
:
'1030'
,
url
:
'/aeenginemodel/processApproval'
},
{
value
:
'1031'
,
url
:
'/aeenginemodelextend/processApproval'
},
{
value
:
'1032'
,
url
:
'/aemodelgx/processApproval'
},
{
value
:
'1043'
,
url
:
'/aeunit/processApproval'
},
{
value
:
'1042'
,
url
:
'/aepartinformation/processApproval'
},
{
value
:
'1040'
,
url
:
'/aetool/processApproval'
},
{
value
:
'1004'
,
url
:
'/aeprolineinfo/processApproval'
},
{
value
:
'1005'
,
url
:
'/aeprolinesegment/processApproval'
},
{
value
:
'1006'
,
url
:
'/aeprolinegx/processGxApproval'
},
{
value
:
'1041'
,
url
:
'/aeauxiliarymaterial/processApproval'
},
{
value
:
'1009'
,
url
:
'/aeprolinetray/processApproval'
},
{
value
:
'1007'
,
url
:
'/aetechequipment/processApproval'
},
{
value
:
'1008'
,
url
:
'/aetechassembly/processApproval'
},
{
value
:
'1010'
,
url
:
'/aetechequipment/all/processApproval'
},
{
value
:
'1011'
,
url
:
'/aetechassembly/all/processApproval'
},
{
value
:
'1021'
,
url
:
'/aeequipmentinfo/processApproval'
},
{
value
:
'1044'
,
url
:
'/aegroupproject/processApproval'
}
]
}
},
computed
:
{
// 计算属性
parseTimeA
()
{
return
(
time
,
format
)
=>
{
return
parseTime
(
time
,
format
||
'{m}-{d} {h}:{i}:{s}'
)
}
},
},
methods
:
{
/**
* 获取审批url
* @returns {string}
*/
getUrl
()
{
const
type
=
this
.
instanceDetail
.
processType
let
url
=
''
this
.
urlList
.
forEach
(
item
=>
{
if
(
item
.
value
===
type
)
{
url
=
item
.
url
}
})
return
url
},
async
approveByAdmin
(
type
)
{
this
.
btnLoading
=
true
// 审批
await
approveByAdmin
({
instanceId
:
this
.
processId
,
approveId
:
this
.
instanceDetail
.
currentApprove
.
businessId
,
approveControl
:
type
,
url
:
this
.
getUrl
(),
processGroup
:
'1'
}).
catch
(()
=>
{
this
.
isView
=
''
})
// 回调获取流程实例的状态
const
{
data
}
=
await
getProcessInstanceStatus
(
this
.
processId
)
// 异常结束
if
(
data
===
'6'
)
{
toast
(
'流程异常结束,请检查对应流程'
)
}
else
{
toast
(
'审批成功'
)
this
.
$tab
.
reLaunch
(
'/pages/index'
)
}
},
/** 查询字典数据列表 */
getList
()
{
getDicts
(
'sys_job_level'
).
then
(
response
=>
{
// console.log("查询数据字段狗",response)
const
jobLevelForm
=
response
.
data
for
(
const
item
of
jobLevelForm
)
{
const
result
=
{
value
:
item
.
dictValue
,
label
:
item
.
dictLabel
}
this
.
jobLevelList
.
push
(
result
)
}
})
},
/**
* 指定列表,根据值,取label
*/
getLabelByValue
(
list
,
value
,
key
=
'value'
,
label
=
'label'
)
{
const
item
=
list
.
find
(
item
=>
item
[
key
]
===
value
)
return
item
?
item
[
label
]
:
'-'
},
/**
* 获取审批节点详情
*/
toProcessInstanceInfo
()
{
// 非追溯完成度异常
if
(
this
.
processCode
===
'00016'
||
this
.
processCode
===
'00017'
)
{
console
.
log
(
'1'
,
this
.
processCode
)
drawerShowEngineTrace
.
value
=
true
}
else
if
(
this
.
processCode
!==
'00019'
)
{
console
.
log
(
'2'
,
this
.
processCode
)
drawerShow
.
value
=
true
// drawerShowTraceError.value = true
}
else
{
console
.
log
(
'3'
,
this
.
processCode
)
// 追溯完成度异常
drawerShowTraceError
.
value
=
true
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.base-detail
{
background
:
#FFFFFF
;
min-height
:
100vh
;
// height: 100vh;
.container
{
.title
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
40rpx
;
color
:
#0B0B0B
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
padding
:
52rpx
32rpx
20rpx
32rpx
;
border-bottom
:
2rpx
solid
#F2F2F2
;
}
}
.step-container
{
padding-left
:
44rpx
;
padding-right
:
26rpx
;
}
.custom-table
{
background
:
#F9F9F9
;
border-radius
:
10rpx
;
padding
:
32rpx
;
}
.subTitleClass
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#9A9A9A
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
}
.subRow
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
12rpx
;
.subTitle
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#9A9A9A
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
min-width
:
120rpx
;
}
.subContent
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#222222
;
text-align
:
right
;
font-style
:
normal
;
text-transform
:
none
;
}
}
.remark-container
{
padding
:
28rpx
46rpx
0
48rpx
;
::v-deep
.u-form-item__body__left__content__label
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#111111
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
margin-bottom
:
14rpx
;
}
}
.change-container
{
padding
:
28rpx
46rpx
0
48rpx
;
.change-item
{
width
:
684rpx
;
height
:
140rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
#FFFBF0
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#F4850E
;
line-height
:
36rpx
;
font-style
:
normal
;
}
}
}
.btns-container
{
display
:
flex
;
justify-content
:
center
;
gap
:
16rpx
;
padding
:
40rpx
0
;
.btn
{
width
:
312rpx
;
height
:
96rpx
;
border-radius
:
56rpx
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
34rpx
;
line-height
:
48rpx
;
text-align
:
center
;
font-style
:
normal
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.reject-btn
{
border
:
2rpx
solid
#333399
;
color
:
#333399
;
}
.approve-btn
{
background
:
#333399
;
color
:
#FFFFFF
;
}
}
</
style
>
\ No newline at end of file
pages/approval_detail/drawerShowTraceError.vue
0 → 100644
View file @
c5452dce
<!-- 00019(追溯完成度异常提醒) 审批详情 -->
<
template
>
<view
class=
"base-detail"
>
<ya-navbar
title=
"审批详情drawerShowTraceError"
:left-icon-color=
"'#fff'"
:bg-style=
"'#333399'"
:title-style=
"'color: #fff;font-weight: 500;font-size: 35rpx;'"
/>
<view
class=
"container"
>
<view
class=
"title"
>
基础数据变更(
{{
label
}}
)
</view>
<!-- 步骤图区 -->
<view
class=
"step-container"
>
<vertical-steps
:steps=
"steps"
:current-step=
"1"
>
<!-- 自定义内容 -->
<template
v-for=
"(step, index) in steps"
#[`
content-
$
{index}`]>
<!-- 发起人 -->
<template
v-if=
"index === 0"
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
员工姓名
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
userName
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
员工职级
</view>
<view
class=
"subContent"
>
{{
getLabelByValue
(
jobLevelList
,
step
.
content
.
rank
)
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
创建日期
</view>
<view
class=
"subContent"
>
{{
parseTimeA
(
step
.
content
.
createTime
,
'YYYY/MM/DD HH:mm'
)
}}
</view>
</view>
</view>
</view>
</
template
>
<!-- 审批人 -->
<
template
v-else
>
<view
class=
"custom-table"
>
<view
class=
"subTitleClass"
>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
部门
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveDeptName
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
生产角色
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveRoleName
||
'无'
}}
</view>
</view>
<view
class=
"subRow"
>
<view
class=
"subTitle"
>
员工姓名
</view>
<view
class=
"subContent"
>
{{
step
.
content
.
approveUser
||
'无'
}}
</view>
</view>
</view>
</view>
</
template
>
</template>
</vertical-steps>
</view>
<!-- 步骤图完成 -->
<!-- 备注区 -->
<view
class=
"title"
>
备注信息
</view>
<view
class=
"remark-container"
>
<u-form
:model=
"instanceDetail"
>
<u-form-item
label=
"访问区域"
prop=
"remark"
labelPosition=
"top"
labelWidth=
"80"
>
<u-textarea
disabled
v-model=
"instanceDetail.remarks"
placeholder=
"-"
></u-textarea>
</u-form-item>
</u-form>
</view>
<!-- 备注区完成 -->
<!-- 变更内容区 -->
<view
class=
"title"
>
变更内容
</view>
<view
class=
"change-container"
>
<view
class=
"change-item"
>
请登录PC端查看变更详情
</view>
</view>
<!-- 按钮区域 -->
<view
v-if=
"isView === '0' && status === 'true'"
class=
"btns-container"
>
<view
class=
"btn reject-btn"
@
click=
"approveByAdmin('REJECT')"
>
驳回
</view>
<view
class=
"btn approve-btn"
@
click=
"approveByAdmin('CONSENT')"
>
通过
</view>
</view>
</view>
</view>
</template>
<
script
>
import
VerticalSteps
from
'@/components/vertical-steps/vertical-steps'
import
{
getProcessNodeByInstanceId
,
approveByAdmin
,
getProcessInstanceStatus
}
from
'../../api/system/approve'
import
{
parseTime
}
from
'../../api/utils/ruoyi'
import
{
getDicts
}
from
"../../api/system/baseConfig"
;
import
{
toast
}
from
'../../utils/common'
export
default
{
name
:
"baseDetail"
,
onLoad
:
function
(
option
)
{
//option为object类型,会序列化上个页面传递的参数
// processId, processCode, processStatus, allowApprove, processName
this
.
processId
=
option
.
processId
;
this
.
processCode
=
option
.
processCode
;
this
.
processStatus
=
option
.
processStatus
;
this
.
isUpdate
=
option
.
allowApprove
;
this
.
processName
=
option
.
processName
;
this
.
getList
();
this
.
toProcessInstanceInfo
();
},
components
:
{
VerticalSteps
},
data
()
{
return
{
processId
:
''
,
processCode
:
''
,
processStatus
:
''
,
allowApprove
:
''
,
processName
:
''
,
processType
:
''
,
label
:
''
,
instanceDetail
:
{},
formData
:
{
remark
:
''
},
steps
:
[],
jobLevelList
:
[],
isView
:
''
,
status
:
''
,
// url
urlList
:
[
{
value
:
'0001'
,
url
:
'/staff/processApproval'
},
{
value
:
'1001'
,
url
:
'/aeclassesinfo/processApproval'
},
{
value
:
'1002'
,
url
:
'/accreditpostvalidity/processPostApproval'
},
{
value
:
'0002'
,
url
:
'/sysRoleMamager/processApproval'
},
{
value
:
'0004'
,
url
:
'/sysRoleMamager/non_processApproval'
},
{
value
:
'0003'
,
url
:
'/organization/processApproval'
},
{
value
:
'1020'
,
url
:
'/aeequipmenttype/processApproval'
},
{
value
:
'1030'
,
url
:
'/aeenginemodel/processApproval'
},
{
value
:
'1031'
,
url
:
'/aeenginemodelextend/processApproval'
},
{
value
:
'1032'
,
url
:
'/aemodelgx/processApproval'
},
{
value
:
'1043'
,
url
:
'/aeunit/processApproval'
},
{
value
:
'1042'
,
url
:
'/aepartinformation/processApproval'
},
{
value
:
'1040'
,
url
:
'/aetool/processApproval'
},
{
value
:
'1004'
,
url
:
'/aeprolineinfo/processApproval'
},
{
value
:
'1005'
,
url
:
'/aeprolinesegment/processApproval'
},
{
value
:
'1006'
,
url
:
'/aeprolinegx/processGxApproval'
},
{
value
:
'1041'
,
url
:
'/aeauxiliarymaterial/processApproval'
},
{
value
:
'1009'
,
url
:
'/aeprolinetray/processApproval'
},
{
value
:
'1007'
,
url
:
'/aetechequipment/processApproval'
},
{
value
:
'1008'
,
url
:
'/aetechassembly/processApproval'
},
{
value
:
'1010'
,
url
:
'/aetechequipment/all/processApproval'
},
{
value
:
'1011'
,
url
:
'/aetechassembly/all/processApproval'
},
{
value
:
'1021'
,
url
:
'/aeequipmentinfo/processApproval'
},
{
value
:
'1044'
,
url
:
'/aegroupproject/processApproval'
}
]
}
},
computed
:
{
// 计算属性
parseTimeA
()
{
return
(
time
,
format
)
=>
{
return
parseTime
(
time
,
format
||
'{m}-{d} {h}:{i}:{s}'
)
}
},
},
methods
:
{
/**
* 获取审批url
* @returns {string}
*/
getUrl
()
{
const
type
=
this
.
instanceDetail
.
processType
let
url
=
''
this
.
urlList
.
forEach
(
item
=>
{
if
(
item
.
value
===
type
)
{
url
=
item
.
url
}
})
return
url
},
async
approveByAdmin
(
type
)
{
this
.
btnLoading
=
true
// 审批
await
approveByAdmin
({
instanceId
:
this
.
processId
,
approveId
:
this
.
instanceDetail
.
currentApprove
.
businessId
,
approveControl
:
type
,
url
:
this
.
getUrl
(),
processGroup
:
'1'
}).
catch
(()
=>
{
this
.
isView
=
''
})
// 回调获取流程实例的状态
const
{
data
}
=
await
getProcessInstanceStatus
(
this
.
processId
)
// 异常结束
if
(
data
===
'6'
)
{
toast
(
'流程异常结束,请检查对应流程'
)
}
else
{
toast
(
'审批成功'
)
this
.
$tab
.
reLaunch
(
'/pages/index'
)
}
},
/** 查询字典数据列表 */
getList
()
{
getDicts
(
'sys_job_level'
).
then
(
response
=>
{
// console.log("查询数据字段狗",response)
const
jobLevelForm
=
response
.
data
for
(
const
item
of
jobLevelForm
)
{
const
result
=
{
value
:
item
.
dictValue
,
label
:
item
.
dictLabel
}
this
.
jobLevelList
.
push
(
result
)
}
})
},
/**
* 指定列表,根据值,取label
*/
getLabelByValue
(
list
,
value
,
key
=
'value'
,
label
=
'label'
)
{
const
item
=
list
.
find
(
item
=>
item
[
key
]
===
value
)
return
item
?
item
[
label
]
:
'-'
},
/**
* 获取审批节点详情
*/
toProcessInstanceInfo
()
{
// 非追溯完成度异常
if
(
this
.
processCode
===
'00016'
||
this
.
processCode
===
'00017'
)
{
console
.
log
(
'1'
,
this
.
processCode
)
drawerShowEngineTrace
.
value
=
true
}
else
if
(
this
.
processCode
!==
'00019'
)
{
console
.
log
(
'2'
,
this
.
processCode
)
drawerShow
.
value
=
true
// drawerShowTraceError.value = true
}
else
{
console
.
log
(
'3'
,
this
.
processCode
)
// 追溯完成度异常
drawerShowTraceError
.
value
=
true
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.base-detail
{
background
:
#FFFFFF
;
min-height
:
100vh
;
// height: 100vh;
.container
{
.title
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
40rpx
;
color
:
#0B0B0B
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
padding
:
52rpx
32rpx
20rpx
32rpx
;
border-bottom
:
2rpx
solid
#F2F2F2
;
}
}
.step-container
{
padding-left
:
44rpx
;
padding-right
:
26rpx
;
}
.custom-table
{
background
:
#F9F9F9
;
border-radius
:
10rpx
;
padding
:
32rpx
;
}
.subTitleClass
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#9A9A9A
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
}
.subRow
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
12rpx
;
.subTitle
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#9A9A9A
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
min-width
:
120rpx
;
}
.subContent
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#222222
;
text-align
:
right
;
font-style
:
normal
;
text-transform
:
none
;
}
}
.remark-container
{
padding
:
28rpx
46rpx
0
48rpx
;
::v-deep
.u-form-item__body__left__content__label
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#111111
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
margin-bottom
:
14rpx
;
}
}
.change-container
{
padding
:
28rpx
46rpx
0
48rpx
;
.change-item
{
width
:
684rpx
;
height
:
140rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
#FFFBF0
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#F4850E
;
line-height
:
36rpx
;
font-style
:
normal
;
}
}
}
.btns-container
{
display
:
flex
;
justify-content
:
center
;
gap
:
16rpx
;
padding
:
40rpx
0
;
.btn
{
width
:
312rpx
;
height
:
96rpx
;
border-radius
:
56rpx
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
34rpx
;
line-height
:
48rpx
;
text-align
:
center
;
font-style
:
normal
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.reject-btn
{
border
:
2rpx
solid
#333399
;
color
:
#333399
;
}
.approve-btn
{
background
:
#333399
;
color
:
#FFFFFF
;
}
}
</
style
>
\ No newline at end of file
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