Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
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
wangqinghua
smart
Commits
6b6922df
Commit
6b6922df
authored
Jun 24, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
确认完成
parent
641dd4a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
45 deletions
+69
-45
handle-event.component.ts
...p/work/work-handle/handle-event/handle-event.component.ts
+69
-45
No files found.
src/main/webapp/app/work/work-handle/handle-event/handle-event.component.ts
View file @
6b6922df
...
@@ -12,21 +12,23 @@ import {CommonService} from '../../../shared/common/common.service';
...
@@ -12,21 +12,23 @@ import {CommonService} from '../../../shared/common/common.service';
templateUrl
:
'./handle-event.component.html'
,
templateUrl
:
'./handle-event.component.html'
,
styles
:
[
styles
:
[
`
`
:host ::ng-deep .ant-row
{
:host ::ng-deep .ant-row
{
margin: 20px 0;
margin: 20px 0;
}
}
:host ::ng-deep .ant-col-4{
:host ::ng-deep .ant-col-4 {
text-align: right;
text-align: right;
}
}
h2{
h2 {
font-weight: 400;
font-weight: 400;
}
}
`
`
]
]
})
})
export
class
HandleEventComponent
implements
OnInit
{
export
class
HandleEventComponent
implements
OnInit
{
@
ViewChild
(
'smartLinkInventory'
)
smartLinkInventory
:
LinkInventoryComponent
;
@
ViewChild
(
'smartLinkInventory'
)
smartLinkInventory
:
LinkInventoryComponent
;
@
ViewChild
(
'smartTransfor'
)
smartTransfor
:
TransforComponent
;
@
ViewChild
(
'smartTransfor'
)
smartTransfor
:
TransforComponent
;
eventId
;
eventId
;
event
;
event
;
...
@@ -35,14 +37,14 @@ export class HandleEventComponent implements OnInit {
...
@@ -35,14 +37,14 @@ export class HandleEventComponent implements OnInit {
format
;
format
;
obj
=
{
obj
=
{
operateStatus
:
null
,
operateStatus
:
null
,
operateResult
:
null
,
operateResult
:
null
,
};
};
date
;
date
;
time
;
time
;
constructor
(
private
routrInfo
:
ActivatedRoute
,
private
workSer
:
WorkService
,
private
location
:
Location
,
constructor
(
private
routrInfo
:
ActivatedRoute
,
private
workSer
:
WorkService
,
private
location
:
Location
,
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
,
private
commonSer
:
CommonService
)
{
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
,
private
commonSer
:
CommonService
)
{
this
.
routrInfo
.
queryParams
.
subscribe
(
this
.
routrInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
eventId
=
res
.
eventId
;
this
.
eventId
=
res
.
eventId
;
...
@@ -65,83 +67,105 @@ export class HandleEventComponent implements OnInit {
...
@@ -65,83 +67,105 @@ export class HandleEventComponent implements OnInit {
}
}
//查询事件流转信息
//查询事件流转信息
findTransferAndInventory
(){
findTransferAndInventory
()
{
this
.
workSer
.
findTransferAndInventory
(
this
.
eventId
).
subscribe
(
this
.
workSer
.
findTransferAndInventory
(
this
.
eventId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
transforsList
=
res
.
data
.
transfers
;
this
.
transforsList
=
res
.
data
.
transfers
;
this
.
transforsList
.
forEach
(
e
=>
{
this
.
transforsList
.
forEach
(
e
=>
{
e
.
operatorInfo
=
e
.
operatorInfo
.
replace
(
/
\"
/g
,
""
).
replace
(
"{"
,
""
).
replace
(
"}"
,
""
).
split
(
":"
);
e
.
operatorInfo
=
e
.
operatorInfo
.
replace
(
/
\"
/g
,
''
).
replace
(
'{'
,
''
).
replace
(
'}'
,
''
).
split
(
':'
);
})
});
}
}
)
)
;
}
}
selectPerson
(){
selectPerson
()
{
}
}
//选择关联弹窗
//选择关联弹窗
showInventoryModal
(){
showInventoryModal
()
{
this
.
smartLinkInventory
.
showModal
(
"添加关联资产"
);
this
.
smartLinkInventory
.
showModal
(
'添加关联资产'
);
}
}
//选择管理返回值
//选择管理返回值
setLink
(
e
){
setLink
(
e
)
{
this
.
linkList
=
e
;
this
.
linkList
=
e
;
}
}
//保存处理
//保存处理
save
(){
save
()
{
if
(
!
this
.
obj
.
operateStatus
)
{
if
(
!
this
.
obj
.
operateStatus
)
{
this
.
message
.
error
(
"请选择处理结果"
);
this
.
message
.
error
(
'请选择处理结果'
);
return
false
;
return
false
;
}
}
if
(
!
this
.
date
||
!
this
.
time
)
{
if
(
!
this
.
date
||
!
this
.
time
)
{
this
.
message
.
error
(
"请选择完成时间"
);
this
.
message
.
error
(
'请选择完成时间'
);
return
false
;
return
false
;
}
}
if
(
!
this
.
obj
.
operateResult
)
{
if
(
!
this
.
obj
.
operateResult
)
{
this
.
message
.
error
(
"请填写处理情况"
);
this
.
message
.
error
(
'请填写处理情况'
);
return
false
;
return
false
;
}
}
this
.
commonSer
.
confirmThing
(
'确认'
,
'确定提交处理结果?'
,
()
=>
{
const
data
=
{
const
data
=
{
id
:
this
.
eventId
,
id
:
this
.
eventId
,
operateStatus
:
Number
(
this
.
obj
.
operateStatus
),
operateStatus
:
Number
(
this
.
obj
.
operateStatus
),
inventoryId
:
this
.
linkList
.
map
(
e
=>
{
inventoryId
:
this
.
linkList
.
map
(
e
=>
{
return
e
.
id
;
return
e
.
id
;
}),
}),
operateResult
:
this
.
obj
.
operateResult
,
operateResult
:
this
.
obj
.
operateResult
,
completeTimeStr
:
this
.
datePipe
.
transform
(
this
.
date
,
"yyyy-MM-dd"
)
+
" "
+
this
.
datePipe
.
transform
(
this
.
time
,
"HH:mm:ss"
)
completeTimeStr
:
this
.
datePipe
.
transform
(
this
.
date
,
'yyyy-MM-dd'
)
+
' '
+
this
.
datePipe
.
transform
(
this
.
time
,
'HH:mm:ss'
)
};
};
this
.
workSer
.
deal
(
data
).
subscribe
(
this
.
workSer
.
deal
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
location
.
back
();
this
.
location
.
back
();
this
.
message
.
success
(
"事件处理成功"
);
this
.
message
.
success
(
'事件处理成功'
);
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
}
)
);
});
}
}
//转派
//转派
showTransforModal
(){
showTransforModal
()
{
this
.
smartTransfor
.
showTransforModal
(
"事件转派"
,
this
.
eventId
);
this
.
smartTransfor
.
showTransforModal
(
'事件转派'
,
this
.
eventId
);
}
}
//转派成功
//转派成功
success
(
e
){
success
(
e
)
{
this
.
location
.
back
();
}
//确认完成
done
()
{
this
.
commonSer
.
confirmThing
(
'确认'
,
'确认事件完成?'
,
()
=>
{
const
data
=
{
ids
:
[]
};
data
.
ids
.
push
(
this
.
eventId
);
this
.
workSer
.
confirmEvent
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
location
.
back
();
this
.
location
.
back
();
this
.
message
.
success
(
'事件确认成功'
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
);
});
}
}
downLoad
(){
//下载
this
.
workSer
.
downloadTemplate
(
"event"
,
this
.
eventId
).
subscribe
(
downLoad
()
{
(
data
)
=>
{
this
.
workSer
.
downloadTemplate
(
'event'
,
this
.
eventId
).
subscribe
(
this
.
commonSer
.
downloadFile
(
this
.
event
.
fileName
+
".xlsx"
,
data
)
(
data
)
=>
{
this
.
commonSer
.
downloadFile
(
this
.
event
.
fileName
+
'.xlsx'
,
data
);
}
}
)
)
;
}
}
}
}
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