Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Chatopera OpenSource
/
ferry_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b9ac1211
authored
Jul 17, 2020
by
YuleiLan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加处理工单。
parent
0ab0fc2e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
773 additions
and
28 deletions
src/views/process/list/all.vue
src/views/process/list/handle.vue
src/views/process/list/my-create.vue
src/views/process/list/related.vue
src/views/process/list/upcoming.vue
src/views/process/list/all.vue
View file @
b9ac1211
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-form>
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<
el-table-column
type=
"selection"
width=
"55"
align=
"center"
/
>
<
!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
--
>
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nick
name"
:value=
"item.i
d"
/>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nick
Name"
:value=
"item.userI
d"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-form-item
label=
"备注"
>
...
@@ -145,7 +145,6 @@ export default {
...
@@ -145,7 +145,6 @@ export default {
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
4
this
.
listQuery
.
classify
=
4
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
console
.
log
(
response
)
this
.
ticketList
=
response
.
data
.
data
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
...
@@ -157,7 +156,6 @@ export default {
...
@@ -157,7 +156,6 @@ export default {
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
},
handleUnity
(
row
)
{
handleUnity
(
row
)
{
console
.
log
(
row
)
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
...
@@ -166,7 +164,7 @@ export default {
...
@@ -166,7 +164,7 @@ export default {
unityWorkOrder
({
unityWorkOrder
({
work_oroder_id
:
row
.
id
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
}).
then
(
response
=>
{
if
(
response
.
code
===
1000
00
)
{
if
(
response
.
code
===
2
00
)
{
this
.
getList
()
this
.
getList
()
}
}
})
})
...
@@ -195,7 +193,7 @@ export default {
...
@@ -195,7 +193,7 @@ export default {
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
1000
00
)
{
if
(
response
.
code
===
2
00
)
{
this
.
getList
()
this
.
getList
()
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
}
}
...
...
src/views/process/list/handle.vue
View file @
b9ac1211
<
template
>
<
template
>
<div>
<div
class=
"app-container"
>
this is handle ticket.
<el-card
class=
"box-card"
>
<div
class=
"text item"
>
<el-steps
:active=
"activeIndex"
finish-status=
"success"
>
<template
v-for=
"(item, index) in nodeStepList"
>
<el-step
v-if=
"item.isHideNode === false ||
item.isHideNode === undefined ||
item.isHideNode == null ||
item.id === processStructureValue.workOrder.current_state"
:key=
"index"
:title=
"item.label"
/>
</
template
>
</el-steps>
</div>
</el-card>
<el-alert
v-if=
"activeIndex !== nodeStepList.length && processStructureValue.workOrder.is_end===1"
style=
"margin-top: 15px"
:title=
"alertMessage"
type=
"error"
:closable=
"false"
/>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
公共信息
</span>
</div>
<div
class=
"text item"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"标题: "
style=
"margin-bottom: 0"
>
<span>
{{ workOrderTitle }}
</span>
</el-form-item>
</el-form>
</div>
</el-card>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
表单信息
</span>
</div>
<div
class=
"text item"
>
<fm-generate-form
v-for=
"(tplItem, tplIndex) in processStructureValue.tpls"
:key=
"tplIndex"
:ref=
"'generateForm-'+tplItem.id"
:remote=
"remoteFunc"
:value=
"tplItem.form_data"
:data=
"tplItem.form_structure"
/>
</div>
<div
v-if=
"processStructureValue.userAuthority"
>
<hr
style=
"background-color: #d9d9d9; border:0; height:1px;"
>
<div
class=
"text item"
style=
"text-align: center;margin-top:18px"
>
<
template
v-for=
"(item, index) in processStructureValue.edges"
>
<el-button
v-if=
"item.source===nodeStepList[activeIndex].id && processStructureValue.workOrder.is_end===0"
:key=
"index"
type=
"primary"
@
click=
"submitAction(item)"
>
{{
item
.
label
}}
</el-button>
</
template
>
</div>
</div>
</el-card>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
工单流转历史
</span>
</div>
<div
class=
"text item"
>
<el-table
:data=
"circulationHistoryList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"state"
label=
"节点"
/>
<el-table-column
prop=
"circulation"
label=
"流转"
/>
<el-table-column
prop=
"processor"
label=
"处理人"
/>
<el-table-column
prop=
"create_time"
label=
"处理时间"
/>
<el-table-column
prop=
"remarks"
label=
"备注"
/>
</el-table>
</div>
</el-card>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
export
default
{
import
Vue
from
'vue'
components
:
{
import
{
GenerateForm
}
from
'@/components/VueFormMaking'
import
'form-making/dist/FormMaking.css'
Vue
.
component
(
GenerateForm
.
name
,
GenerateForm
)
},
import
{
processStructure
,
handleWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
data
()
{
data
()
{
return
{
return
{
alertMessage
:
''
,
nodeStepList
:
[],
circulationHistoryList
:
[],
workOrderTitle
:
''
,
activeIndex
:
0
,
processStructureValue
:
{},
ruleForm
:
{
title
:
''
,
process
:
''
,
classify
:
''
,
state_id
:
''
,
state
:
''
,
source_state
:
''
,
processor
:
''
,
process_method
:
''
,
tpls
:
[],
tasks
:
[]
},
remoteFunc
:
{
// 获取用户列表
getUserListFunc
(
resolve
)
{
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
const
options
=
response
.
data
.
list
resolve
(
options
)
})
}
}
}
}
},
created
()
{
this
.
getProcessNodeList
()
},
},
methods
:
{
methods
:
{
getProcessNodeList
()
{
processStructure
({
processId
:
this
.
$route
.
query
.
processId
,
workOrderId
:
this
.
$route
.
query
.
workOrderId
}).
then
(
response
=>
{
this
.
processStructureValue
=
response
.
data
this
.
workOrderTitle
=
this
.
processStructureValue
.
workOrder
.
title
this
.
circulationHistoryList
=
this
.
processStructureValue
.
circulationHistory
// 获取当前展示节点列表
for
(
var
i
=
0
;
i
<
this
.
processStructureValue
.
nodes
.
length
;
i
++
)
{
if
(
this
.
processStructureValue
.
nodes
[
i
].
id
===
this
.
processStructureValue
.
workOrder
.
current_state
)
{
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
this
.
activeIndex
=
this
.
nodeStepList
.
length
-
1
if
(
i
===
this
.
processStructureValue
.
nodes
.
length
-
2
)
{
this
.
activeIndex
=
i
+
1
}
}
else
if
(
!
this
.
processStructureValue
.
nodes
[
i
].
isHideNode
)
{
// 非隐藏节点
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
}
}
this
.
getAlertMessage
()
})
},
submitAction
(
item
)
{
handleWorkOrder
({
tasks
:
this
.
processStructureValue
.
process
.
task
,
source_state
:
this
.
processStructureValue
.
workOrder
.
current_state
,
target_state
:
item
.
target
,
circulation
:
item
.
label
,
flow_properties
:
item
.
flowProperties
===
undefined
?
2
:
parseInt
(
item
.
flowProperties
),
work_order_id
:
parseInt
(
this
.
$route
.
query
.
workOrderId
)
}).
then
(
response
=>
{
if
(
response
.
code
===
100000
)
{
// this.$router.push({ name: 'upcoming' })
window
.
location
.
reload
()
}
})
},
// 获取提示消息
getAlertMessage
()
{
if
(
this
.
processStructureValue
.
workOrder
.
is_end
===
1
)
{
this
.
alertMessage
=
'当前工单已结束。'
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
</
style
>
src/views/process/list/my-create.vue
View file @
b9ac1211
<
template
>
<
template
>
<div>
<div
class=
"app-container"
>
this is my create.
<el-card
class=
"box-card"
>
<el-form
ref=
"listQuery"
:model=
"listQuery"
:inline=
"true"
>
<el-form-item
label=
"工单标题"
>
<el-input
v-model=
"listQuery.title"
placeholder=
"请输入工单标题"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"getList"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
state
[
0
].
label
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"当前处理人"
prop=
"principals"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"是否结束"
:show-overflow-tooltip=
"true"
width=
"80"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.is_end===0"
size=
"mini"
type=
"success"
>
否
</el-tag>
<el-tag
v-else
size=
"mini"
type=
"danger"
>
是
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"create_time"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
create_time
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleView(scope.row)"
>
查看
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-position"
@
click=
"handleInversion(scope.row)"
>
转交
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-switch-button"
@
click=
"handleUnity(scope.row)"
>
结单
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
"转交工单"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"60px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"节点"
prop=
"node_id"
>
<el-select
v-model=
"ruleForm.node_id"
placeholder=
"选择节点"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in nodeList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nickName"
:value=
"item.userId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"ruleForm.remarks"
type=
"textarea"
size=
"small"
/>
</el-form-item>
<el-form-item
style=
"text-align: right"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
提交
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
关闭
</el-button>
</el-form-item>
</el-form>
</el-dialog>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageIndex"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-card>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
users
:
[],
nodeList
:
[],
dialogVisible
:
false
,
queryParams
:
{},
total
:
0
,
loading
:
false
,
ticketList
:
[],
listQuery
:
{
page
:
1
,
per_page
:
10
},
ruleForm
:
{
work_order_id
:
''
,
node_id
:
''
,
user_id
:
''
,
remarks
:
''
},
rules
:
{
node_id
:
[
{
required
:
true
,
message
:
'请选择节点'
,
trigger
:
'change'
}
],
user_id
:
[
{
required
:
true
,
message
:
'请选择用户'
,
trigger
:
'change'
}
]
}
}
}
},
},
created
()
{
this
.
getList
()
},
methods
:
{
methods
:
{
getList
()
{
this
.
loading
=
true
this
.
listQuery
.
page
=
this
.
queryParams
.
pageIndex
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
2
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
this
.
total
=
response
.
data
.
total_count
this
.
loading
=
false
})
},
handleView
(
row
)
{
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleUnity
(
row
)
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unityWorkOrder
({
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
handleInversion
(
row
)
{
this
.
dialogVisible
=
true
this
.
ruleForm
.
work_order_id
=
row
.
id
this
.
nodeList
=
row
.
state
if
(
this
.
nodeList
.
length
===
1
)
{
this
.
ruleForm
.
node_id
=
this
.
nodeList
[
0
].
id
}
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
this
.
users
=
response
.
data
.
list
})
},
handleSelectionChange
()
{},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
this
.
dialogVisible
=
false
}
})
}
})
}
}
}
}
}
</
script
>
</
script
>
...
...
src/views/process/list/related.vue
View file @
b9ac1211
<
template
>
<
template
>
<div>
<div
class=
"app-container"
>
this is related.
<el-card
class=
"box-card"
>
<el-form
ref=
"listQuery"
:model=
"listQuery"
:inline=
"true"
>
<el-form-item
label=
"工单标题"
>
<el-input
v-model=
"listQuery.title"
placeholder=
"请输入工单标题"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"getList"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
state
[
0
].
label
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"当前处理人"
prop=
"principals"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"是否结束"
:show-overflow-tooltip=
"true"
width=
"80"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.is_end===0"
size=
"mini"
type=
"success"
>
否
</el-tag>
<el-tag
v-else
size=
"mini"
type=
"danger"
>
是
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"create_time"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
create_time
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleView(scope.row)"
>
查看
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-position"
@
click=
"handleInversion(scope.row)"
>
转交
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-switch-button"
@
click=
"handleUnity(scope.row)"
>
结单
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
"转交工单"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"60px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"节点"
prop=
"node_id"
>
<el-select
v-model=
"ruleForm.node_id"
placeholder=
"选择节点"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in nodeList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nickName"
:value=
"item.userId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"ruleForm.remarks"
type=
"textarea"
size=
"small"
/>
</el-form-item>
<el-form-item
style=
"text-align: right"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
提交
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
关闭
</el-button>
</el-form-item>
</el-form>
</el-dialog>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageIndex"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-card>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
users
:
[],
nodeList
:
[],
dialogVisible
:
false
,
queryParams
:
{},
total
:
0
,
loading
:
false
,
ticketList
:
[],
listQuery
:
{
page
:
1
,
per_page
:
10
},
ruleForm
:
{
work_order_id
:
''
,
node_id
:
''
,
user_id
:
''
,
remarks
:
''
},
rules
:
{
node_id
:
[
{
required
:
true
,
message
:
'请选择节点'
,
trigger
:
'change'
}
],
user_id
:
[
{
required
:
true
,
message
:
'请选择用户'
,
trigger
:
'change'
}
]
}
}
}
},
},
created
()
{
this
.
getList
()
},
methods
:
{
methods
:
{
getList
()
{
this
.
loading
=
true
this
.
listQuery
.
page
=
this
.
queryParams
.
pageIndex
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
3
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
this
.
total
=
response
.
data
.
total_count
this
.
loading
=
false
})
},
handleView
(
row
)
{
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleUnity
(
row
)
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unityWorkOrder
({
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
handleInversion
(
row
)
{
this
.
dialogVisible
=
true
this
.
ruleForm
.
work_order_id
=
row
.
id
this
.
nodeList
=
row
.
state
if
(
this
.
nodeList
.
length
===
1
)
{
this
.
ruleForm
.
node_id
=
this
.
nodeList
[
0
].
id
}
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
this
.
users
=
response
.
data
.
list
})
},
handleSelectionChange
()
{},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
this
.
dialogVisible
=
false
}
})
}
})
}
}
}
}
}
</
script
>
</
script
>
...
...
src/views/process/list/upcoming.vue
View file @
b9ac1211
<
template
>
<
template
>
<div>
<div
class=
"app-container"
>
this is upcoming.
<el-card
class=
"box-card"
>
<el-form
ref=
"listQuery"
:model=
"listQuery"
:inline=
"true"
>
<el-form-item
label=
"工单标题"
>
<el-input
v-model=
"listQuery.title"
placeholder=
"请输入工单标题"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"getList"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
border
:data=
"ticketList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"ID"
prop=
"id"
width=
"120"
/>
<el-table-column
label=
"标题"
prop=
"title"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"当前状态"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
state
[
0
].
label
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"当前处理人"
prop=
"principals"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"是否结束"
:show-overflow-tooltip=
"true"
width=
"80"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.is_end===0"
size=
"mini"
type=
"success"
>
否
</el-tag>
<el-tag
v-else
size=
"mini"
type=
"danger"
>
是
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"create_time"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
create_time
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleView(scope.row)"
>
查看
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-position"
@
click=
"handleInversion(scope.row)"
>
转交
</el-button>
<el-button
v-permisaction=
"['process:admin:classify:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-switch-button"
@
click=
"handleUnity(scope.row)"
>
结单
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
"转交工单"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"60px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"节点"
prop=
"node_id"
>
<el-select
v-model=
"ruleForm.node_id"
placeholder=
"选择节点"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in nodeList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user_id"
>
<el-select
v-model=
"ruleForm.user_id"
placeholder=
"选择用户"
size=
"small"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in users"
:key=
"index"
:label=
"item.nickName"
:value=
"item.userId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"ruleForm.remarks"
type=
"textarea"
size=
"small"
/>
</el-form-item>
<el-form-item
style=
"text-align: right"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
提交
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
关闭
</el-button>
</el-form-item>
</el-form>
</el-dialog>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageIndex"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-card>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
users
:
[],
nodeList
:
[],
dialogVisible
:
false
,
queryParams
:
{},
total
:
0
,
loading
:
false
,
ticketList
:
[],
listQuery
:
{
page
:
1
,
per_page
:
10
},
ruleForm
:
{
work_order_id
:
''
,
node_id
:
''
,
user_id
:
''
,
remarks
:
''
},
rules
:
{
node_id
:
[
{
required
:
true
,
message
:
'请选择节点'
,
trigger
:
'change'
}
],
user_id
:
[
{
required
:
true
,
message
:
'请选择用户'
,
trigger
:
'change'
}
]
}
}
}
},
},
created
()
{
this
.
getList
()
},
methods
:
{
methods
:
{
getList
()
{
this
.
loading
=
true
this
.
listQuery
.
page
=
this
.
queryParams
.
pageIndex
this
.
listQuery
.
per_page
=
this
.
queryParams
.
pageSize
this
.
listQuery
.
classify
=
1
workOrderList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
ticketList
=
response
.
data
.
data
this
.
queryParams
.
pageIndex
=
response
.
data
.
page
this
.
queryParams
.
pageSize
=
response
.
data
.
per_page
this
.
total
=
response
.
data
.
total_count
this
.
loading
=
false
})
},
handleView
(
row
)
{
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleUnity
(
row
)
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unityWorkOrder
({
work_oroder_id
:
row
.
id
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
handleInversion
(
row
)
{
this
.
dialogVisible
=
true
this
.
ruleForm
.
work_order_id
=
row
.
id
this
.
nodeList
=
row
.
state
if
(
this
.
nodeList
.
length
===
1
)
{
this
.
ruleForm
.
node_id
=
this
.
nodeList
[
0
].
id
}
listUser
({
pageSize
:
999999
}).
then
(
response
=>
{
this
.
users
=
response
.
data
.
list
})
},
handleSelectionChange
()
{},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
inversionWorkOrder
(
this
.
ruleForm
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
getList
()
this
.
dialogVisible
=
false
}
})
}
})
}
}
}
}
}
</
script
>
</
script
>
...
...
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