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
7961c4b1
Commit
7961c4b1
authored
Dec 28, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1b6d7aa9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
11 deletions
+68
-11
group.component.html
src/main/webapp/app/system/group/group.component.html
+1
-2
child-assets.component.html
.../work/asset-part/child-assets/child-assets.component.html
+9
-6
child-assets.component.ts
...pp/work/asset-part/child-assets/child-assets.component.ts
+58
-3
No files found.
src/main/webapp/app/system/group/group.component.html
View file @
7961c4b1
...
...
@@ -53,8 +53,7 @@
<button
(
click
)="
showUploadModalOrg
()"
nz-button
nzType=
"default"
>
导入组织
</button>
<button
(
click
)="
showUploadModalUser
()"
nz-button
nzType=
"default"
>
导入用户
</button>
</div>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
>
<thead>
<tr>
<th
nzShowCheckbox
[(
nzChecked
)]="
allChecked
"
[
nzIndeterminate
]="
indeterminate
"
(
nzCheckedChange
)="
checkAll
($
event
)"
></th>
...
...
src/main/webapp/app/work/asset-part/child-assets/child-assets.component.html
View file @
7961c4b1
...
...
@@ -25,13 +25,13 @@
<div
nz-col
nzSpan=
"3"
>
<button
(
click
)="
showAddModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus-circle-o"
></i>
添加资产
</button>
</div>
<div
nz-col
nzSpan=
"3"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-upload"
></i>
导入资产
</button>
<div
nz-col
nzSpan=
"18"
>
<button
(
click
)="
showUploadModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-upload"
></i>
导入资产
</button>
<button
(
click
)="
downLoad
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-download"
></i>
下载模版
</button>
<button
(
click
)="
downloadInventory
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-folder"
></i>
导出资产
</button>
<button
(
click
)="
batchDeleteInventory
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-close-circle-o"
></i>
删除资产
</button>
</div>
<div
nz-col
nzSpan=
"3"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-download"
></i>
下载模版
</button>
</div>
<div
nz-col
nzSpan=
"6"
>
</div>
</div>
...
...
@@ -39,6 +39,7 @@
<nz-table
#
nzTable
[
nzData
]="
childrenList
"
>
<thead>
<tr>
<th
nzShowCheckbox
[
nzIndeterminate
]="
indeterminate
"
[
nzChecked
]="
allChecked
"
(
nzCheckedChange
)="
checkAll
($
event
)"
></th>
<th>
资产编号
</th>
<th>
资产名称
</th>
<th>
资产总数
</th>
...
...
@@ -53,6 +54,7 @@
</thead>
<tbody>
<tr
*
ngFor=
"let data of childrenList"
>
<td
nzShowCheckbox
[(
nzChecked
)]="
data
.
checked
"
(
nzCheckedChange
)="
selectItem
(
data
,$
event
)"
></td>
<td
class=
"round-tag tag-form"
>
{{data.inventoryNo}}
</td>
...
...
@@ -82,5 +84,5 @@
<!--新增资产-->
<smart-assets
#
smartAssets
(
done
)="
getList
()"
></smart-assets>
<!--
倒
入资产-->
<!--
导
入资产-->
<smart-upload
#
smartUpload
></smart-upload>
\ No newline at end of file
src/main/webapp/app/work/asset-part/child-assets/child-assets.component.ts
View file @
7961c4b1
...
...
@@ -5,6 +5,8 @@ import {CommonService} from '../../../shared/common/common.service';
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
AssetsComponent
}
from
'../../modal/assets/assets.component'
;
import
{
UploadComponent
}
from
'../../modal/upload/upload.component'
;
import
{
SERVER_API_URL
}
from
'../../../app.constants'
;
import
{
SystemService
}
from
'../../../system/system.service'
;
@
Component
({
selector
:
'smart-child-assets'
,
...
...
@@ -19,8 +21,14 @@ export class ChildAssetsComponent implements OnInit {
childrenList
;
childName
;
allChecked
=
false
;
selectList
=
[];
disabledButton
=
true
;
indeterminate
=
false
;
constructor
(
private
workSer
:
WorkService
,
private
routerInfo
:
ActivatedRoute
,
private
router
:
Router
,
private
conmonSer
:
CommonService
,
private
message
:
NzMessageService
)
{
private
message
:
NzMessageService
,
private
systemSer
:
SystemService
,
private
commonSer
:
CommonService
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
this
.
childId
=
res
.
id
;
...
...
@@ -29,6 +37,35 @@ export class ChildAssetsComponent implements OnInit {
);
}
checkAll
(
value
:
boolean
):
void
{
this
.
childrenList
.
forEach
(
data
=>
data
.
checked
=
value
);
this
.
refreshStatus
();
}
currentPageDataChange
(
$event
:
Array
<
{
checked
:
boolean
}
>
):
void
{
this
.
childrenList
=
$event
;
}
selectItem
(
item
,
e
)
{
if
(
e
)
{
this
.
selectList
.
push
(
item
);
}
else
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
if
(
value
.
id
==
item
.
id
)
{
this
.
selectList
.
splice
(
index
,
1
);
}
});
}
this
.
refreshStatus
();
}
refreshStatus
():
void
{
const
allChecked
=
this
.
childrenList
.
every
(
value
=>
value
.
checked
===
true
);
const
allUnChecked
=
this
.
childrenList
.
every
(
value
=>
!
value
.
checked
);
this
.
allChecked
=
allChecked
;
this
.
indeterminate
=
(
!
allChecked
)
&&
(
!
allUnChecked
);
}
ngOnInit
()
{
this
.
getList
();
}
...
...
@@ -41,13 +78,13 @@ export class ChildAssetsComponent implements OnInit {
);
}
//删除资产
//删除资产
--单个
deleteInVentory
(
item
){
const
data
=
{
inventoryIds
:[]
};
data
.
inventoryIds
.
push
(
item
.
id
);
this
.
co
n
monSer
.
confirmThing
(
"删除"
,
"确定删除该资产?"
,()
=>
{
this
.
co
m
monSer
.
confirmThing
(
"删除"
,
"确定删除该资产?"
,()
=>
{
this
.
workSer
.
deleteInventory
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
...
...
@@ -61,6 +98,11 @@ export class ChildAssetsComponent implements OnInit {
})
}
//批量删除
batchDeleteInventory
(){
}
//添加资产
showAddModal
()
{
this
.
smartAssets
.
showAddModal
(
"添加资产"
);
...
...
@@ -85,4 +127,17 @@ export class ChildAssetsComponent implements OnInit {
this
.
smartUpload
.
showModal
(
"上传资产文件"
);
}
//下载模版
downLoad
(){
this
.
systemSer
.
downloadTemplate
(
"inventory"
,
SERVER_API_URL
+
"/api/template/download/"
).
subscribe
(
(
data
)
=>
{
this
.
commonSer
.
downloadFile
(
"资产模版1"
,
data
);
}
)
}
//导出资产
downloadInventory
(){
}
}
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