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
5950fc3d
Commit
5950fc3d
authored
Jul 03, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置菜单栏
parent
8ff3197c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
33 deletions
+64
-33
cost-record.component.html
...in/webapp/app/work/cost-record/cost-record.component.html
+11
-18
cost-record.component.ts
...main/webapp/app/work/cost-record/cost-record.component.ts
+28
-15
work.service.ts
src/main/webapp/app/work/work.service.ts
+25
-0
No files found.
src/main/webapp/app/work/cost-record/cost-record.component.html
View file @
5950fc3d
...
@@ -51,7 +51,9 @@
...
@@ -51,7 +51,9 @@
</div>
</div>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
recordList
"
[
nzLoading
]="
isLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
<nz-table
#
nzTable
[
nzData
]="
recordList
"
[
nzLoading
]="
isLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
<thead>
<thead>
<tr>
<tr>
<th>
费用名称
</th>
<th>
费用名称
</th>
...
@@ -60,7 +62,7 @@
...
@@ -60,7 +62,7 @@
<th>
总金额
</th>
<th>
总金额
</th>
<th>
备件采购
</th>
<th>
备件采购
</th>
<th
nzWidth=
"15%"
>
委外费用
</th>
<th
nzWidth=
"15%"
>
委外费用
</th>
<th>
其他费用th>
<th>
其他费用
</
th>
<th>
关联事件
</th>
<th>
关联事件
</th>
<th
style=
"text-align: center"
>
操作
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</tr>
...
@@ -68,26 +70,17 @@
...
@@ -68,26 +70,17 @@
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable.data"
>
<tr
*
ngFor=
"let data of nzTable.data"
>
<td
class=
"round-tag tag-form"
>
<td
class=
"round-tag tag-form"
>
{{data.
id
}}
{{data.
name
}}
</td>
</td>
<td>
<td>
{{data.title}}
{{data.time | date:'yyyy-MM-dd HH:mm:ss'}}
</td>
<td>
{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}
</td>
<td>
<span
*
ngIf=
"data.source == 0"
>
系统告警
</span>
<span
*
ngIf=
"data.source == 1"
>
手动新增
</span>
</td>
</td>
<td>
{{data.people}}
</td>
<td>
{{data.total}}
</td>
<td>
{{data.typeName}}
</td>
<td>
{{data.typeName}}
</td>
<td>
<td>
{{data.outsourcingmoney}}
</td>
<span
style=
"margin-right: 5px;"
*
ngFor=
"let item of data?.operators"
>
<td>
{{data.othermoney}}
</td>
{{item.username}}
<td>
{{data.othermoney}}
</td>
</span>
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
待处理
</span>
<span
*
ngIf=
"data.status == 1"
>
已结束
</span>
</td>
<td
class=
"handle text-center main-color"
>
<td
class=
"handle text-center main-color"
>
<span
*
ngIf=
"data.status == 1"
(
click
)="
lookRecord
(
data
)"
>
查看
</span>
<span
*
ngIf=
"data.status == 1"
(
click
)="
lookRecord
(
data
)"
>
查看
</span>
</td>
</td>
...
...
src/main/webapp/app/work/cost-record/cost-record.component.ts
View file @
5950fc3d
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
WorkService
}
from
'../work.service'
;
@
Component
({
@
Component
({
selector
:
'smart-cost-record'
,
selector
:
'smart-cost-record'
,
...
@@ -11,48 +12,60 @@ export class CostRecordComponent implements OnInit {
...
@@ -11,48 +12,60 @@ export class CostRecordComponent implements OnInit {
recordList
=
[];
recordList
=
[];
isLoading
=
false
;
isLoading
=
false
;
totalNum
:
Number
;
totalNum
:
Number
;
pageNum
:
Number
;
pageNum
:
Number
=
1
;
pageCount
:
Number
=
pageSize
;
pageCount
:
Number
=
pageSize
;
startTime
;
startTime
;
endTime
;
endTime
;
timeFormat
=
'yyyy-MM-dd'
;
timeFormat
=
'yyyy-MM-dd'
;
obj
=
{
obj
=
{
startTime
:
''
,
startTime
:
''
,
endTime
:
''
,
endTime
:
''
,
searchStr
:
''
,
searchStr
:
''
,
source
:
''
source
:
''
};
};
constructor
()
{
}
constructor
(
private
workSer
:
WorkService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getList
();
}
}
//获取列表
//获取列表
getList
(){
getList
()
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
obj
:
this
.
obj
};
this
.
workSer
.
findPage
(
data
).
subscribe
(
(
res
)
=>
{
this
.
recordList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
);
}
}
//搜索
//搜索
search
()
{
search
()
{
this
.
pageNum
=
1
;
this
.
pageNum
=
1
;
this
.
getList
();
this
.
getList
();
}
}
//翻页
//翻页
change
(
e
)
{
change
(
e
)
{
this
.
pageNum
=
e
;
this
.
pageNum
=
e
;
this
.
getList
();
this
.
getList
();
}
}
//查看
//查看
lookRecord
(
data
)
{
lookRecord
(
data
)
{
}
}
showAddModal
()
{
showAddModal
()
{
}
}
...
...
src/main/webapp/app/work/work.service.ts
View file @
5950fc3d
...
@@ -204,6 +204,31 @@ export class WorkService {
...
@@ -204,6 +204,31 @@ export class WorkService {
return
this
.
http
.
put
(
SERVER_API_URL
+
'/sysevent/updateEventNoPre'
,
data
);
return
this
.
http
.
put
(
SERVER_API_URL
+
'/sysevent/updateEventNoPre'
,
data
);
}
}
//修改费用记录
updateCost
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/cost/updateCost'
,
data
);
}
//分页筛选费用记录
findPage
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/cost/findPage'
,
data
);
}
//批量删除费用记录
deleteCost
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/cost/deleteCost'
,
data
);
}
//新增费用记录
addCost
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/cost/addCost'
,
data
);
}
//根据费用id查询
findById
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/cost/findById'
,
data
);
}
/**
/**
* 附件文件
* 附件文件
* @param pararms 参数
* @param pararms 参数
...
...
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