Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_OA
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
张伯涛
91isoft_OA
Commits
cb8d766a
Commit
cb8d766a
authored
Mar 14, 2024
by
张毅辰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作流(审批提交)
parent
1cadaad8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
166 additions
and
42 deletions
+166
-42
flowWork.js
api/system/flowWork.js
+8
-0
approval.vue
pages/approval/approval.vue
+5
-4
myapply.vue
pages/approval/myapply.vue
+27
-15
myapproval.vue
pages/approval/myapproval.vue
+35
-13
index.vue
pages/document/index.vue
+3
-3
work.vue
pages/flow/work.vue
+88
-7
No files found.
api/system/flowWork.js
View file @
cb8d766a
...
...
@@ -7,3 +7,11 @@ export function getDocumentDetails(businessId) {
method
:
'get'
,
})
}
export
function
submitFlowWork
(
params
,
api
)
{
return
request
({
url
:
`
${
api
}
`
,
method
:
'post'
,
params
})
}
pages/approval/approval.vue
View file @
cb8d766a
...
...
@@ -4,10 +4,10 @@
<uni-segmented-control
:current=
"current"
:values=
"approvalList"
@
clickItem=
"onClickItem"
styleType=
"button"
activeColor=
"#007AFF"
></uni-segmented-control>
<view
class=
"content"
>
<view
v-show=
"current === 0"
class=
"approval_content"
>
<my-apply></my-apply>
<my-apply
:list=
"list"
></my-apply>
</view>
<view
v-show=
"current === 1"
class=
"approval_content"
>
<my-approval></my-approval>
<my-approval
:list=
"list"
></my-approval>
</view>
</view>
</view>
...
...
@@ -26,7 +26,8 @@
data
()
{
return
{
current
:
1
,
// 0: 待办, 1: 已办
approvalList
:[
'待办'
,
'已办'
]
approvalList
:[
'待办'
,
'已办'
],
list
:
[]
}
},
created
()
{
...
...
@@ -35,7 +36,7 @@
methods
:
{
getApprovalList
()
{
getApproveList
(
this
.
current
).
then
(
res
=>
{
this
.
list
=
res
.
rows
})
},
onClickItem
(
e
)
{
...
...
pages/approval/myapply.vue
View file @
cb8d766a
<
template
>
<view
class=
"my_approval"
>
<uni-swipe-action>
<ul>
<li
v-for=
"(item,index) in myApprovalList"
:key=
"index"
class=
"my_approval_li"
>
<uni-swipe-action-item
:right-options=
"options"
@
click=
"bindClick($event,item.eventId)"
@
change=
"swipeChange($event, index)"
>
<view
class=
"my_approval_item"
@
click=
"toNav(item.businessId)"
>
<h3
class=
"my_approval_title"
><text>
[
{{
item
.
type
}}
]--
{{
item
.
name
}}
</text>
<text
class=
"approval_title_right"
>
{{
item
.
stateName
}}
</text></h3>
<view
class=
"my_approval_info"
>
<text>
{{
item
.
department
}}
</text>
<text
class=
"approval_info_right"
>
{{
item
.
time
}}
</text>
</view>
</view>
</uni-swipe-action-item>
</li>
</ul>
<ul>
<li
v-for=
"(item,index) in list"
:key=
"index"
class=
"my_approval_li"
>
<uni-swipe-action-item
:right-options=
"options"
@
click=
"bindClick($event,item.eventId)"
@
change=
"swipeChange($event, index)"
>
<view
class=
"my_approval_item"
@
click=
"toNav(item.instanceId, item.nodeId)"
>
<h3
class=
"my_approval_title"
>
<text>
[
{{
item
.
businessTypeName
}}
]--
{{
item
.
createUserName
}}
</text>
<text
class=
"approval_title_right"
>
{{
item
.
status
===
'10'
?
'待审批'
:
item
.
status
===
'2'
?
'已审批'
:
item
.
status
===
'5'
?
'驳回'
:
''
}}
</text>
</h3>
<view
class=
"my_approval_info"
>
<text
class=
"approval_info_right"
>
{{
item
.
createDate
}}
</text>
</view>
</view>
</uni-swipe-action-item>
</li>
</ul>
</uni-swipe-action>
</view>
...
...
@@ -21,6 +24,14 @@
<
script
>
export
default
{
props
:
{
list
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
}
},
data
()
{
return
{
myApprovalList
:[{
...
...
@@ -50,9 +61,10 @@
}
},
methods
:{
toNav
(
id
)
{
/** 详情页跳转*/
toNav
(
id
,
nodeId
)
{
uni
.
navigateTo
({
url
:
`/pages/
classes/classesInfo?businessId=
${
id
}
`
,
url
:
`/pages/
flow/work?businessId=
${
id
}
&nodeId=
${
nodeId
}
&type=edit
`
,
success
:(
res
)
=>
{
},
fail
:(
err
)
=>
{
...
...
pages/approval/myapproval.vue
View file @
cb8d766a
<
template
>
<view
class=
"my_approval"
>
<uni-swipe-action>
<ul>
<li
v-for=
"(item,index) in myApprovalList"
:key=
"index"
class=
"my_approval_li"
>
<uni-swipe-action-item
:right-options=
"options"
@
click=
"bindClick($event,item.eventId)"
@
change=
"swipeChange($event, index)"
>
<view
class=
"my_approval_item"
>
<h3
class=
"my_approval_title"
><text>
[
{{
item
.
type
}}
]--
{{
item
.
name
}}
</text>
<text
class=
"approval_title_right"
>
{{
item
.
stateName
}}
</text></h3>
<view
class=
"my_approval_info"
>
<text>
{{
item
.
department
}}
</text>
<text
class=
"approval_info_right"
>
{{
item
.
time
}}
</text>
</view>
</view>
</uni-swipe-action-item>
</li>
</ul>
<ul>
<li
v-for=
"(item,index) in list"
:key=
"index"
class=
"my_approval_li"
>
<uni-swipe-action-item
:right-options=
"options"
@
click=
"bindClick($event,item.eventId)"
@
change=
"swipeChange($event, index)"
>
<view
class=
"my_approval_item"
@
click=
"toNav(item.instanceId, item.nodeId)"
>
<h3
class=
"my_approval_title"
>
<text>
[
{{
item
.
businessTypeName
}}
]--
{{
item
.
createUserName
}}
</text>
<text
class=
"approval_title_right"
>
{{
item
.
status
===
'10'
?
'待审批'
:
item
.
status
===
'2'
?
'已审批'
:
item
.
status
===
'5'
?
'驳回'
:
''
}}
</text>
</h3>
<view
class=
"my_approval_info"
>
<text
class=
"approval_info_right"
>
{{
item
.
createDate
}}
</text>
</view>
</view>
</uni-swipe-action-item>
</li>
</ul>
</uni-swipe-action>
</view>
...
...
@@ -21,6 +24,14 @@
<
script
>
export
default
{
props
:
{
list
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
}
},
data
()
{
return
{
myApprovalList
:[{
...
...
@@ -58,6 +69,17 @@
}
},
methods
:{
/** 详情页跳转*/
toNav
(
id
,
nodeId
)
{
uni
.
navigateTo
({
url
:
`/pages/flow/work?businessId=
${
id
}
&nodeId=
${
nodeId
}
&type=see`
,
success
:(
res
)
=>
{
},
fail
:(
err
)
=>
{
console
.
log
(
err
)
}
});
},
bindClick
(
e
,
id
)
{
if
(
e
.
content
.
text
===
'驳回'
){
console
.
log
(
'驳回'
)
...
...
pages/document/index.vue
View file @
cb8d766a
...
...
@@ -28,7 +28,7 @@
<ul>
<li
v-for=
"(item,index) in myApprovalList"
:key=
"index"
class=
"my_approval_li"
>
<uni-swipe-action-item
:right-options=
"options"
@
click=
"bindClick($event,item.eventId)"
@
change=
"swipeChange($event, index)"
>
<view
class=
"my_approval_item"
@
click=
"toNav(item.businessId)"
>
<view
class=
"my_approval_item"
@
click=
"toNav(item.businessId
, item.nodeId
)"
>
<h3
class=
"my_approval_title"
>
<text>
[
{{
item
.
businessTypeName
}}
]--
{{
item
.
createUserName
}}
</text>
<text
class=
"approval_title_right"
>
{{
item
.
status
===
'10'
?
'待审批'
:
item
.
status
===
'2'
?
'已审批'
:
item
.
status
===
'5'
?
'驳回'
:
''
}}
</text>
...
...
@@ -90,9 +90,9 @@ export default{
},
methods
:{
/** 详情页跳转*/
toNav
(
id
)
{
toNav
(
id
,
nodeId
)
{
uni
.
navigateTo
({
url
:
`/pages/flow/work?businessId=
${
id
}
&type=see`
,
url
:
`/pages/flow/work?businessId=
${
id
}
&
nodeId=
${
nodeId
}
&
type=see`
,
success
:(
res
)
=>
{
},
fail
:(
err
)
=>
{
...
...
pages/flow/work.vue
View file @
cb8d766a
<
template
>
<view
class=
"container my-flow-work"
>
<uni-nav-bar
dark
:fixed=
"true"
shadow
background-color=
"#007AFF"
status-bar
left-icon=
"left"
left-text=
"返回"
:title=
"basicDataForm.processType"
@
clickLeft=
"goBack"
/>
<view>
<view
style=
"width:100%;position:fixed;top:60px;"
>
<ul>
<li
class=
"my_approval_li"
>
<uni-swipe-action-item>
...
...
@@ -19,7 +19,7 @@
</li>
</ul>
</view>
<view>
<view
style=
"margin-top: 80px;"
>
<uni-segmented-control
style-type=
"text"
:current=
"current"
:values=
"items"
@
clickItem=
"onClickItem"
activeColor=
"#007aff"
></uni-segmented-control>
<view
class=
"content"
>
<view
v-show=
"current === 0"
>
...
...
@@ -36,12 +36,40 @@
</view>
</view>
</view>
<view
style=
"width:100%;position:fixed;bottom:0;padding: 4px"
v-if=
"type !== 'see'"
>
<button
@
click=
"handleLogin"
class=
"login-btn cu-btn block bg-blue lg round"
>
审 批
</button>
</view>
<!-- 提示窗示例 -->
<uni-popup
ref=
"alertDialog"
type=
"dialog"
>
<uni-popup-dialog
cancelText=
"关闭"
confirmText=
"提交"
title=
"审批提交"
@
close=
"close"
@
confirm=
"confirm"
>
<view
style=
"width: 100%;"
>
<uni-forms
:modelValue=
"typeFormData"
label-width=
"80"
>
<uni-forms-item
label=
"备注"
name=
"remark"
>
<uni-easyinput
type=
"textarea"
v-model=
"typeFormData.remark"
placeholder=
"请输入备注"
/>
</uni-forms-item>
<uni-forms-item
label=
"名称"
name=
"type"
>
<uni-data-select
v-model=
"typeFormData.type"
:localdata=
"range"
></uni-data-select>
</uni-forms-item>
</uni-forms>
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
{
getDocumentDetails
}
from
'@/api/system/flowWork'
import
{
getDocumentDetails
,
submitFlowWork
}
from
'@/api/system/flowWork'
import
{
getDict
}
from
'@/api/system/dict'
import
BasicData
from
'./components/BasicData.vue'
import
BusinessDocument
from
'./components/BusinessDocument.vue'
...
...
@@ -81,24 +109,75 @@ export default {
// 审批流程数据
flowChatNodeList
:
[],
// 当前流程节点是否通过
approveControl
:
'
0
'
,
approveControl
:
'
1
'
,
// 当前流程节点
approveControlActive
:
1
,
// 单据类型字典
tableUserFrom
:
[],
typeFormData
:
{
type
:
'CONSENT'
,
remark
:
''
},
range
:
[
{
value
:
'CONSENT'
,
text
:
"同意"
},
{
value
:
'REJECT'
,
text
:
"驳回"
},
],
flowWorkApi
:
[
{
type
:
'1001'
,
api
:
'/wx/aeclassesinfo/flow'
}
]
}
},
onLoad
(
option
)
{
const
{
businessId
,
type
}
=
option
const
{
businessId
,
type
,
nodeId
}
=
option
this
.
businessId
=
businessId
this
.
nodeId
=
nodeId
this
.
type
=
type
console
.
log
(
type
)
this
.
getFlowData
()
},
created
()
{
this
.
getDict
()
},
methods
:
{
close
()
{
this
.
typeFormData
=
{
type
:
'CONSENT'
,
remark
:
''
}
this
.
$refs
.
alertDialog
.
close
()
},
/**
* 点击确认按钮触发
* @param {Object} done
* @param {Object} value
*/
confirm
()
{
const
params
=
{
instanceId
:
this
.
businessId
,
approveId
:
this
.
nodeId
,
approveControl
:
this
.
typeFormData
.
type
,
remark
:
this
.
typeFormData
.
remark
,
}
const
api
=
this
.
flowWorkApi
.
find
(
item
=>
item
.
type
===
this
.
basicDataForm
.
processType
).
api
uni
.
showLoading
({
title
:
'数据提交中,请稍后'
})
submitFlowWork
(
params
,
api
).
then
(
res
=>
{
uni
.
hideLoading
()
// 关闭窗口后,恢复默认内容
this
.
$refs
.
alertDialog
.
close
()
uni
.
navigateBack
({
//uni.navigateTo跳转的返回,默认1为返回上一级
delta
:
1
})
})
this
.
$refs
.
alertDialog
.
close
()
},
handleLogin
()
{
this
.
$refs
.
alertDialog
.
open
()
},
onClickItem
(
e
)
{
if
(
this
.
current
!=
e
.
currentIndex
)
{
this
.
current
=
e
.
currentIndex
;
...
...
@@ -118,7 +197,7 @@ export default {
createDate
:
res
.
data
.
createDate
,
createUserId
:
res
.
data
.
createUserId
,
createUserName
:
res
.
data
.
createUserName
,
approveUser
:
res
.
data
.
flowChatNodeList
.
find
(
item
=>
item
.
currentNode
===
1
).
approveUser
approveUser
:
[]
}
// 业务单据
this
.
newBusinessDocument
=
JSON
.
parse
(
res
.
data
.
newBusinessData
.
jsonData
)
...
...
@@ -126,8 +205,10 @@ export default {
// 审核历史
this
.
approveHistoryList
=
res
.
data
.
approveHistoryList
// 审批流程
this
.
approveControlActive
=
res
.
data
.
flowChatNodeList
.
length
-
1
this
.
flowChatNodeList
=
res
.
data
.
flowChatNodeList
.
map
((
item
,
index
)
=>
{
if
(
item
.
currentNode
===
1
)
{
this
.
basicDataForm
.
approveUser
=
item
.
approveUser
this
.
approveControl
=
item
.
approveControl
this
.
approveControlActive
=
index
}
...
...
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