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
efc8644b
Commit
efc8644b
authored
Jan 19, 2020
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug update
parent
faf9b5bd
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
161 additions
and
156 deletions
+161
-156
my-follow.component.html
...in/webapp/app/overview/my-follow/my-follow.component.html
+14
-15
opr-cost.component.html
...bapp/app/project-manager/opr-cost/opr-cost.component.html
+2
-2
common.service.ts
src/main/webapp/app/shared/common/common.service.ts
+1
-1
pipe.module.ts
src/main/webapp/app/shared/pipe/pipe.module.ts
+8
-8
asset-part.component.html
...main/webapp/app/work/asset-part/asset-part.component.html
+1
-1
asset-part.component.ts
src/main/webapp/app/work/asset-part/asset-part.component.ts
+1
-0
child-assets.component.html
.../work/asset-part/child-assets/child-assets.component.html
+1
-1
child-assets.component.ts
...pp/work/asset-part/child-assets/child-assets.component.ts
+71
-68
assets.component.ts
src/main/webapp/app/work/modal/assets/assets.component.ts
+58
-56
plan-modal.component.html
...ebapp/app/work/modal/plan-modal/plan-modal.component.html
+1
-1
plan-modal.component.ts
.../webapp/app/work/modal/plan-modal/plan-modal.component.ts
+2
-2
white.scss
src/main/webapp/content/scss/white.scss
+1
-1
No files found.
src/main/webapp/app/overview/my-follow/my-follow.component.html
View file @
efc8644b
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<div
nz-row
[
nzGutter
]="
4
"
class=
"search-form"
>
<div
nz-row
[
nzGutter
]="
4
"
class=
"search-form"
>
<div
nz-col
nzSpan=
"2"
>
<div
nz-col
nzSpan=
"2"
>
<button
(
click
)="
showModal
()"
<button
(
click
)="
showModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-
search
"
></i>
配置
nz-button
nzType=
"default"
><i
class=
"anticon anticon-
appstore
"
></i>
配置
</button>
</button>
</div>
</div>
</div>
</div>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<tr>
<tr>
<th>
事件编号
</th>
<th>
事件编号
</th>
<th
nzWidth=
"30%"
>
标题
</th>
<th
nzWidth=
"30%"
>
标题
</th>
<th
nzWidth=
"
15
%"
>
处理人
</th>
<th
nzWidth=
"
20
%"
>
处理人
</th>
<th>
状态
</th>
<th>
状态
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
{{data.id}}
{{data.id}}
</td>
</td>
<td>
<td>
{{data.title}}
{{data.title
| stringSlice:8:8
}}
</td>
</td>
<td>
<td>
<span
style=
"margin-right: 5px;"
*
ngFor=
"let item of data?.operators"
>
<span
style=
"margin-right: 5px;"
*
ngFor=
"let item of data?.operators"
>
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable2.data"
>
<tr
*
ngFor=
"let data of nzTable2.data"
>
<td
class=
"round-tag tag-form"
>
<td
class=
"round-tag tag-form"
>
{{data.title}}
{{data.title
| stringSlice:8:8
}}
</td>
</td>
<td>
<td>
{{data.typeName}}
{{data.typeName}}
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable3.data"
>
<tr
*
ngFor=
"let data of nzTable3.data"
>
<td>
<td>
{{data.name}}
{{data.name
| stringSlice:8:8
}}
</td>
</td>
<td>
<td>
{{data.inventorycount}}
{{data.inventorycount}}
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
<td>
<td>
{{data.usedcount}}
{{data.usedcount}}
</td>
</td>
<td>
{{data.eventSum}}
</td>
<td>
{{data.eventSum
| stringSlice:8:8
}}
</td>
</tr>
</tr>
</tbody>
</tbody>
</nz-table>
</nz-table>
...
@@ -149,9 +149,9 @@
...
@@ -149,9 +149,9 @@
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable4.data"
>
<tr
*
ngFor=
"let data of nzTable4.data"
>
<td>
{{data.inventoryNo}}
</td>
<td>
{{data.inventoryNo}}
</td>
<td>
{{data.inventoryName}}
</td>
<td>
{{data.inventoryName
| stringSlice:8:8
}}
</td>
<td>
{{data.inventoryType}}
</td>
<td>
{{data.inventoryType}}
</td>
<td>
{{data.belongObject}}
</td>
<td>
{{data.belongObject
| stringSlice:8:8
}}
</td>
</tr>
</tr>
</tbody>
</tbody>
</nz-table>
</nz-table>
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
<span
*
ngIf=
"data.type == 2"
>
重大变更
</span>
<span
*
ngIf=
"data.type == 2"
>
重大变更
</span>
<span
*
ngIf=
"data.type == 3"
>
紧急变更
</span>
<span
*
ngIf=
"data.type == 3"
>
紧急变更
</span>
</td>
</td>
<td>
{{data.description}}
</td>
<td>
{{data.description
| stringSlice:8:8
}}
</td>
<td>
{{data.verifyUserName}}
</td>
<td>
{{data.verifyUserName}}
</td>
<td>
<td>
<span
*
ngIf=
"data.status == 1"
>
待提交
</span>
<span
*
ngIf=
"data.status == 1"
>
待提交
</span>
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable6.data"
>
<tr
*
ngFor=
"let data of nzTable6.data"
>
<td
class=
"round-tag tag-form"
>
<td
class=
"round-tag tag-form"
>
{{data.officeName}}
{{data.officeName
| stringSlice:8:8
}}
</td>
</td>
<td>
{{data.officePrincipal}}
</td>
<td>
{{data.officePrincipal}}
</td>
<td>
<td>
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable7.data"
>
<tr
*
ngFor=
"let data of nzTable7.data"
>
<td>
{{data.name}}
</td>
<td>
{{data.name
| stringSlice:8:8
}}
</td>
<td>
{{data.principal}}
</td>
<td>
{{data.principal}}
</td>
<td>
<td>
<span
*
ngIf=
"data.type == 0"
>
中心驻场
</span>
<span
*
ngIf=
"data.type == 0"
>
中心驻场
</span>
...
@@ -271,13 +271,12 @@
...
@@ -271,13 +271,12 @@
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable8.data"
>
<tr
*
ngFor=
"let data of nzTable8.data"
>
<td>
{{data.name}}
</td>
<td>
{{data.name
| stringSlice:8:8
}}
</td>
<td>
<td>
<span
*
ngIf=
"data.type == 0"
>
驻场团队
</span>
<span
*
ngIf=
"data.type == 0"
>
驻场团队
</span>
<span
*
ngIf=
"data.type == 1"
>
非驻场团队
</span>
<span
*
ngIf=
"data.type == 1"
>
非驻场团队
</span>
</td>
</td>
<td>
{{data.companyName}}
</td>
<td>
{{data.companyName | stringSlice:8:8}}
</td>
<td>
{{data.projectName}}
</td>
<td>
{{data.principal}}
</td>
<td>
{{data.principal}}
</td>
</tr>
</tr>
</tbody>
</tbody>
...
@@ -299,7 +298,7 @@
...
@@ -299,7 +298,7 @@
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let data of nzTable9.data"
>
<tr
*
ngFor=
"let data of nzTable9.data"
>
<td>
{{data.projectName}}
</td>
<td>
{{data.projectName
| stringSlice:8:8
}}
</td>
<td>
{{data.timeStr | date:'yyyy-MM-dd HH:mm:ss'}}
</td>
<td>
{{data.timeStr | date:'yyyy-MM-dd HH:mm:ss'}}
</td>
<td>
{{data.people}}
</td>
<td>
{{data.people}}
</td>
<td>
{{data.costdescribe}}
</td>
<td>
{{data.costdescribe}}
</td>
...
...
src/main/webapp/app/project-manager/opr-cost/opr-cost.component.html
View file @
efc8644b
...
@@ -65,10 +65,10 @@
...
@@ -65,10 +65,10 @@
[
nzPageIndex
]="
page
.
pageNum
"
[
nzPageSize
]="
page
.
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
[
nzPageIndex
]="
page
.
pageNum
"
[
nzPageSize
]="
page
.
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
<thead>
<thead>
<tr>
<tr>
<th
nzWidth=
"
1
0%"
>
维护项目
</th>
<th
nzWidth=
"
2
0%"
>
维护项目
</th>
<th>
填报时间
</th>
<th>
填报时间
</th>
<th>
填报人
</th>
<th>
填报人
</th>
<th>
费用说明
</th>
<th
nzWidth=
"20%"
>
费用说明
</th>
<th>
总费用
</th>
<th>
总费用
</th>
<th>
备件采购
</th>
<th>
备件采购
</th>
<th>
委外费用
</th>
<th>
委外费用
</th>
...
...
src/main/webapp/app/shared/common/common.service.ts
View file @
efc8644b
...
@@ -196,7 +196,7 @@ export class CommonService implements OnInit {
...
@@ -196,7 +196,7 @@ export class CommonService implements OnInit {
getTimeByType
(
timeType
)
{
getTimeByType
(
timeType
)
{
const
nowDate
=
new
Date
().
getTime
();
const
nowDate
=
new
Date
().
getTime
();
const
now
=
new
Date
();
//当前日期
const
now
=
new
Date
();
//当前日期
const
nowDayOfWeek
=
now
.
getDay
();
//今天本周的第几天
const
nowDayOfWeek
=
now
.
getDay
()
==
0
?
7
:
now
.
getDay
()
;
//今天本周的第几天
const
nowDay
=
now
.
getDate
();
//当前日
const
nowDay
=
now
.
getDate
();
//当前日
const
nowMonth
=
now
.
getMonth
();
//当前月
const
nowMonth
=
now
.
getMonth
();
//当前月
const
nowYear
=
now
.
getFullYear
();
//当前年
const
nowYear
=
now
.
getFullYear
();
//当前年
...
...
src/main/webapp/app/shared/pipe/pipe.module.ts
View file @
efc8644b
import
{
NgModule
,
CUSTOM_ELEMENTS_SCHEMA
}
from
'@angular/core'
;
import
{
NgModule
,
CUSTOM_ELEMENTS_SCHEMA
}
from
'@angular/core'
;
import
{
UnitConversionPipe
}
from
'./unit-conversion/unit-conversion.pipe'
;
import
{
UnitConversionPipe
}
from
'./unit-conversion/unit-conversion.pipe'
;
import
{
StringSlicePipe
}
from
'./string-slice/string-slice.pipe'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[],
],
declarations
:
[
declarations
:
[
StringSlicePipe
,
UnitConversionPipe
UnitConversionPipe
],
],
providers
:
[
providers
:
[],
],
entryComponents
:
[],
entryComponents
:
[],
exports
:
[
exports
:
[
StringSlicePipe
,
UnitConversionPipe
UnitConversionPipe
],
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
})
})
export
class
PipeModule
{}
export
class
PipeModule
{
}
src/main/webapp/app/work/asset-part/asset-part.component.html
View file @
efc8644b
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
{{data.scrapcount}}
{{data.scrapcount}}
</td>
</td>
<td>
{{data.eventSum}}
</td>
<td>
{{data.eventSum}}
</td>
<td
class=
"handle
text-center
main-color"
>
<td
class=
"handle main-color"
>
<span
(
click
)="
goToChild
(
data
)"
>
明细
</span>
<span
(
click
)="
goToChild
(
data
)"
>
明细
</span>
<span
class=
"handle-delete"
(
click
)="
deleteChildType
(
data
)"
>
删除
</span>
<span
class=
"handle-delete"
(
click
)="
deleteChildType
(
data
)"
>
删除
</span>
</td>
</td>
...
...
src/main/webapp/app/work/asset-part/asset-part.component.ts
View file @
efc8644b
...
@@ -87,6 +87,7 @@ export class AssetPartComponent implements OnInit {
...
@@ -87,6 +87,7 @@ export class AssetPartComponent implements OnInit {
this
.
router
.
navigate
([
'app/main/assetChild'
],
this
.
router
.
navigate
([
'app/main/assetChild'
],
{
{
queryParams
:
{
queryParams
:
{
parentId
:
data
.
parentid
,
id
:
data
.
id
,
id
:
data
.
id
,
name
:
data
.
name
name
:
data
.
name
}
}
...
...
src/main/webapp/app/work/asset-part/child-assets/child-assets.component.html
View file @
efc8644b
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<input
type=
"text"
nz-input
[(
ngModel
)]="
obj
.
person
"
placeholder=
"负责人"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
obj
.
person
"
placeholder=
"负责人"
>
</div>
</div>
<div
nz-col
nzSpan=
"6"
class=
"text-right"
>
<div
nz-col
nzSpan=
"6"
class=
"text-right"
>
<button
(
click
)="
search
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-
plus-circle-o
"
></i>
搜索
<button
(
click
)="
search
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-
search
"
></i>
搜索
</button>
</button>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/app/work/asset-part/child-assets/child-assets.component.ts
View file @
efc8644b
...
@@ -15,8 +15,8 @@ import {Location} from '@angular/common';
...
@@ -15,8 +15,8 @@ import {Location} from '@angular/common';
styles
:
[]
styles
:
[]
})
})
export
class
ChildAssetsComponent
implements
OnInit
{
export
class
ChildAssetsComponent
implements
OnInit
{
@
ViewChild
(
'smartAssets'
)
smartAssets
:
AssetsComponent
;
@
ViewChild
(
'smartAssets'
)
smartAssets
:
AssetsComponent
;
@
ViewChild
(
'smartUpload'
)
smartUpload
:
UploadComponent
;
@
ViewChild
(
'smartUpload'
)
smartUpload
:
UploadComponent
;
childrenList
;
childrenList
;
childName
;
childName
;
...
@@ -29,26 +29,28 @@ export class ChildAssetsComponent implements OnInit {
...
@@ -29,26 +29,28 @@ export class ChildAssetsComponent implements OnInit {
indeterminate
=
false
;
indeterminate
=
false
;
obj
=
{
obj
=
{
inventoryTypeid
:
null
,
inventoryTypeid
:
null
,
name
:
null
,
name
:
null
,
inventorycount
:
null
,
inventorycount
:
null
,
mac
:
null
,
mac
:
null
,
person
:
null
,
person
:
null
,
};
};
parentId
;
page
=
{
page
=
{
pageNum
:
1
,
pageNum
:
1
,
totalNum
:
null
,
totalNum
:
null
,
pageCount
:
10
,
pageCount
:
10
,
}
}
;
constructor
(
private
workSer
:
WorkService
,
private
routerInfo
:
ActivatedRoute
,
private
router
:
Router
,
constructor
(
private
workSer
:
WorkService
,
private
routerInfo
:
ActivatedRoute
,
private
router
:
Router
,
private
message
:
NzMessageService
,
private
systemSer
:
SystemService
,
private
message
:
NzMessageService
,
private
systemSer
:
SystemService
,
private
commonSer
:
CommonService
,
public
location
:
Location
)
{
private
commonSer
:
CommonService
,
public
location
:
Location
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
obj
.
inventoryTypeid
=
res
.
id
;
this
.
obj
.
inventoryTypeid
=
res
.
id
;
this
.
childName
=
res
.
name
this
.
parentId
=
res
.
parentId
;
this
.
childName
=
res
.
name
;
}
}
);
);
}
}
...
@@ -57,7 +59,7 @@ export class ChildAssetsComponent implements OnInit {
...
@@ -57,7 +59,7 @@ export class ChildAssetsComponent implements OnInit {
this
.
childrenList
.
forEach
(
data
=>
{
this
.
childrenList
.
forEach
(
data
=>
{
data
.
checked
=
value
;
data
.
checked
=
value
;
this
.
selectList
.
push
(
data
);
this
.
selectList
.
push
(
data
);
})
})
;
this
.
refreshStatus
();
this
.
refreshStatus
();
}
}
...
@@ -92,10 +94,10 @@ export class ChildAssetsComponent implements OnInit {
...
@@ -92,10 +94,10 @@ export class ChildAssetsComponent implements OnInit {
getList
()
{
getList
()
{
this
.
isLoading
=
true
;
this
.
isLoading
=
true
;
const
data
=
{
const
data
=
{
pageCount
:
"10"
,
pageCount
:
'10'
,
pageNum
:
this
.
page
.
pageNum
,
pageNum
:
this
.
page
.
pageNum
,
obj
:
this
.
obj
obj
:
this
.
obj
}
}
;
this
.
workSer
.
findInventoryPage
(
data
).
subscribe
(
this
.
workSer
.
findInventoryPage
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
childrenList
=
res
.
data
.
data
;
this
.
childrenList
=
res
.
data
.
data
;
...
@@ -105,123 +107,124 @@ export class ChildAssetsComponent implements OnInit {
...
@@ -105,123 +107,124 @@ export class ChildAssetsComponent implements OnInit {
);
);
}
}
search
(){
search
()
{
this
.
page
.
pageNum
=
1
;
this
.
page
.
pageNum
=
1
;
this
.
getList
();
this
.
getList
();
}
}
change
(
e
){
change
(
e
)
{
if
(
e
>
0
)
{
if
(
e
>
0
)
{
this
.
page
.
pageNum
=
e
;
this
.
page
.
pageNum
=
e
;
this
.
getList
();
this
.
getList
();
}
}
}
}
//删除资产--单个
//删除资产--单个
deleteInVentory
(
item
){
deleteInVentory
(
item
)
{
const
data
=
{
const
data
=
{
inventoryIds
:[]
inventoryIds
:
[]
};
};
data
.
inventoryIds
.
push
(
item
.
id
);
data
.
inventoryIds
.
push
(
item
.
id
);
this
.
commonSer
.
confirmThing
(
"删除"
,
"确定删除该资产?"
,()
=>
{
this
.
commonSer
.
confirmThing
(
'删除'
,
'确定删除该资产?'
,
()
=>
{
this
.
isLoading
=
true
;
this
.
isLoading
=
true
;
this
.
workSer
.
deleteInventory
(
data
).
subscribe
(
this
.
workSer
.
deleteInventory
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
getList
();
this
.
getList
();
this
.
message
.
success
(
"删除资产成功"
);
this
.
message
.
success
(
'删除资产成功'
);
}
}
this
.
isLoading
=
false
;
this
.
isLoading
=
false
;
}
}
)
)
;
})
})
;
}
}
//批量删除
//批量删除
batchDeleteInventory
(){
batchDeleteInventory
()
{
if
(
this
.
selectList
.
length
==
0
)
{
if
(
this
.
selectList
.
length
==
0
)
{
this
.
message
.
warning
(
"请选择需要删除的资产"
);
this
.
message
.
warning
(
'请选择需要删除的资产'
);
return
false
;
return
false
;
}
}
this
.
isLoading
=
true
;
this
.
isLoading
=
true
;
const
data
=
{
const
data
=
{
inventoryIds
:
this
.
selectList
.
map
(
e
=>
{
inventoryIds
:
this
.
selectList
.
map
(
e
=>
{
return
e
.
id
;
return
e
.
id
;
})
})
};
};
this
.
commonSer
.
confirmThing
(
"批量删除"
,
"确定删除选择的资产?"
,()
=>
{
this
.
commonSer
.
confirmThing
(
'批量删除'
,
'确定删除选择的资产?'
,
()
=>
{
this
.
workSer
.
deleteInventory
(
data
).
subscribe
(
this
.
workSer
.
deleteInventory
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
getList
();
this
.
getList
();
this
.
message
.
success
(
"删除资产成功"
);
this
.
message
.
success
(
'删除资产成功'
);
}
}
this
.
isLoading
=
false
;
this
.
isLoading
=
false
;
}
}
)
)
;
})
})
;
}
}
//添加资产
//添加资产
showAddModal
()
{
showAddModal
()
{
this
.
smartAssets
.
showAddModal
(
"添加资产"
);
this
.
smartAssets
.
showAddModal
(
'添加资产'
,
{
parentId
:
this
.
parentId
,
inventoryTypeid
:
this
.
obj
.
inventoryTypeid
}
);
}
}
//编辑资产
//编辑资产
showEditModal
(
id
){
showEditModal
(
id
)
{
this
.
smartAssets
.
showEditModal
(
"编辑资产"
,
id
);
this
.
smartAssets
.
showEditModal
(
'编辑资产'
,
id
);
}
}
//查看详情
//查看详情
goToDetail
(
data
){
goToDetail
(
data
)
{
this
.
router
.
navigate
([
'app/main/assetsDetail'
],{
this
.
router
.
navigate
([
'app/main/assetsDetail'
],
{
queryParams
:{
queryParams
:
{
invertoryId
:
data
.
id
invertoryId
:
data
.
id
}
}
})
})
;
}
}
//导入资产
//导入资产
showUploadModal
(){
showUploadModal
()
{
this
.
smartUpload
.
showModal
(
"上传资产文件"
);
this
.
smartUpload
.
showModal
(
'上传资产文件'
);
}
}
//下载模版
//下载模版
downLoad
(){
downLoad
()
{
this
.
systemSer
.
downloadTemplate
(
"inventory"
,
SERVER_API_URL
+
"/api/template/download/"
).
subscribe
(
this
.
systemSer
.
downloadTemplate
(
'inventory'
,
SERVER_API_URL
+
'/api/template/download/'
).
subscribe
(
(
data
)
=>
{
(
data
)
=>
{
this
.
commonSer
.
downloadFile
(
"资产模版.xlsx"
,
data
);
this
.
commonSer
.
downloadFile
(
'资产模版.xlsx'
,
data
);
}
}
)
)
;
}
}
//导出资产
//导出资产
downloadInventory
(){
downloadInventory
()
{
let
title
;
let
title
;
title
=
this
.
selectList
.
length
==
0
?
"确定导出所有的资产?"
:
"确定导出所选择的资产"
;
title
=
this
.
selectList
.
length
==
0
?
'确定导出所有的资产?'
:
'确定导出所选择的资产'
;
this
.
commonSer
.
confirmThing
(
"导出"
,
title
,()
=>
{
this
.
commonSer
.
confirmThing
(
'导出'
,
title
,
()
=>
{
this
.
isDownload
=
true
;
this
.
isDownload
=
true
;
const
data
=
{
const
data
=
{
type
:
this
.
obj
.
inventoryTypeid
,
type
:
this
.
obj
.
inventoryTypeid
,
ids
:
this
.
selectList
.
map
(
e
=>
{
ids
:
this
.
selectList
.
map
(
e
=>
{
return
e
.
id
;
return
e
.
id
;
}),
}),
query_name
:
null
query_name
:
null
};
};
this
.
workSer
.
getExportUrl
(
data
).
subscribe
(
this
.
workSer
.
getExportUrl
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
isDownload
=
false
;
this
.
isDownload
=
false
;
this
.
workSer
.
downloadTemplate
(
"inventory"
,
res
.
data
).
subscribe
(
this
.
workSer
.
downloadTemplate
(
'inventory'
,
res
.
data
).
subscribe
(
(
data
)
=>
{
(
data
)
=>
{
this
.
commonSer
.
downloadFile
(
"文件.xlsx"
,
data
)
this
.
commonSer
.
downloadFile
(
'文件.xlsx'
,
data
);
}
}
)
)
;
}
}
)
)
;
});
});
}
}
//返回上一页
//返回上一页
returnBack
(){
returnBack
()
{
this
.
location
.
back
();
this
.
location
.
back
();
}
}
}
}
src/main/webapp/app/work/modal/assets/assets.component.ts
View file @
efc8644b
...
@@ -15,15 +15,15 @@ export class AssetsComponent implements OnInit {
...
@@ -15,15 +15,15 @@ export class AssetsComponent implements OnInit {
isVisible
=
false
;
isVisible
=
false
;
title
;
title
;
parentId
;
parentId
;
validateForm
:
FormGroup
;
validateForm
:
FormGroup
;
parentTypeList
;
parentTypeList
;
typeList
;
typeList
;
invertoryId
;
//资产Id
invertoryId
;
//资产Id
constructor
(
private
workSer
:
WorkService
,
private
fb
:
FormBuilder
,
private
datePipe
:
DatePipe
,
constructor
(
private
workSer
:
WorkService
,
private
fb
:
FormBuilder
,
private
datePipe
:
DatePipe
,
private
message
:
NzMessageService
)
{
private
message
:
NzMessageService
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -31,114 +31,116 @@ export class AssetsComponent implements OnInit {
...
@@ -31,114 +31,116 @@ export class AssetsComponent implements OnInit {
this
.
initForm
();
this
.
initForm
();
}
}
initForm
(){
initForm
()
{
this
.
invertoryId
=
null
;
this
.
invertoryId
=
null
;
this
.
validateForm
=
this
.
fb
.
group
({
this
.
validateForm
=
this
.
fb
.
group
({
serialnoA
:[
null
],
serialnoA
:
[
null
],
invertoryname
:[
null
],
invertoryname
:
[
null
],
name
:
[
null
,[
Validators
.
required
,
Validators
.
maxLength
(
20
)]],
name
:
[
null
,
[
Validators
.
required
,
Validators
.
maxLength
(
20
)]],
hostid
:[
null
],
hostid
:
[
null
],
person
:[
null
],
person
:
[
null
],
ip
:[
null
],
ip
:
[
null
],
equipmentTypeid
:[
null
],
equipmentTypeid
:
[
null
],
inventorycount
:[
null
],
inventorycount
:
[
null
],
secondlevelTypeid
:[
null
],
secondlevelTypeid
:
[
null
],
stock
:[
null
],
stock
:
[
null
],
usedcount
:[
null
],
usedcount
:
[
null
],
lendcount
:[
null
],
lendcount
:
[
null
],
mac
:[
null
],
mac
:
[
null
],
repaircount
:[
null
],
repaircount
:
[
null
],
maintenanceExpiration
:[
null
],
maintenanceExpiration
:
[
null
],
scrapcount
:[
null
],
scrapcount
:
[
null
],
storageLocation
:[
null
],
storageLocation
:
[
null
],
groupid
:[
null
],
groupid
:
[
null
],
inventoryTypeid
:
[
null
,
[
Validators
.
required
]],
inventoryTypeid
:
[
null
,
[
Validators
.
required
]],
});
});
}
}
//父级分类
//父级分类
getParentType
(){
getParentType
()
{
this
.
workSer
.
findByParentType
().
subscribe
(
this
.
workSer
.
findByParentType
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
const
data
=
res
.
data
;
this
.
parentTypeList
=
res
.
data
;
this
.
parentTypeList
=
data
;
}
}
)
)
;
}
}
//通过父级分类查询子级分类
//通过父级分类查询子级分类
getTypeByParent
(
parentid
){
getTypeByParent
(
parentid
)
{
this
.
workSer
.
findByParentidCount
(
parentid
).
subscribe
(
this
.
workSer
.
findByParentidCount
(
parentid
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
const
data
=
res
.
data
;
this
.
typeList
=
res
.
data
;
this
.
typeList
=
data
;
}
}
)
)
;
}
}
showAddModal
(
title
)
{
showAddModal
(
title
,
data
)
{
this
.
parentId
=
data
.
parentId
;
this
.
getTypeByParent
(
this
.
parentId
);
this
.
validateForm
.
patchValue
({
inventoryTypeid
:
data
.
inventoryTypeid
});
this
.
title
=
title
;
this
.
title
=
title
;
this
.
isVisible
=
true
;
this
.
isVisible
=
true
;
}
}
showEditModal
(
title
,
id
)
{
showEditModal
(
title
,
id
)
{
this
.
title
=
title
;
this
.
title
=
title
;
this
.
invertoryId
=
id
;
this
.
invertoryId
=
id
;
this
.
isVisible
=
true
;
this
.
isVisible
=
true
;
this
.
workSer
.
selectByPrimaryKey
(
this
.
invertoryId
).
subscribe
(
this
.
workSer
.
selectByPrimaryKey
(
this
.
invertoryId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
parentId
=
res
.
data
.
typeparentid
;
this
.
parentId
=
res
.
data
.
typeparentid
;
this
.
validateForm
.
patchValue
(
res
.
data
);
this
.
validateForm
.
patchValue
(
res
.
data
);
if
(
res
.
data
.
typeparentid
)
{
if
(
res
.
data
.
typeparentid
)
{
this
.
getTypeByParent
(
res
.
data
.
typeparentid
);
this
.
getTypeByParent
(
res
.
data
.
typeparentid
);
}
}
}
}
)
)
;
}
}
handEditleOk
()
{
handEditleOk
()
{
for
(
let
i
in
this
.
validateForm
.
controls
)
{
for
(
let
i
in
this
.
validateForm
.
controls
)
{
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
}
if
(
this
.
validateForm
.
invalid
)
{
if
(
this
.
validateForm
.
invalid
)
{
return
false
;
return
false
;
}
}
if
(
this
.
title
==
"添加资产"
)
{
if
(
this
.
title
==
'添加资产'
)
{
this
.
create
();
this
.
create
();
}
}
if
(
this
.
title
==
"编辑资产"
)
{
if
(
this
.
title
==
'编辑资产'
)
{
this
.
update
();
this
.
update
();
}
}
}
}
create
(){
create
()
{
this
.
workSer
.
createInventory
(
this
.
validateForm
.
value
).
subscribe
(
this
.
workSer
.
createInventory
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
success
(
"添加资产成功"
);
this
.
message
.
success
(
'添加资产成功'
);
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
this
.
done
.
emit
();
this
.
done
.
emit
();
this
.
initForm
();
this
.
initForm
();
}
}
}
}
)
)
;
}
}
update
(){
update
()
{
this
.
validateForm
.
addControl
(
'id'
,
new
FormControl
(
this
.
invertoryId
));
this
.
validateForm
.
addControl
(
'id'
,
new
FormControl
(
this
.
invertoryId
));
this
.
validateForm
.
patchValue
({
this
.
validateForm
.
patchValue
({
maintenanceExpiration
:
this
.
datePipe
.
transform
(
this
.
validateForm
.
value
.
maintenanceExpiration
,
"yyyy-MM-dd HH:mm:ss"
)
maintenanceExpiration
:
this
.
datePipe
.
transform
(
this
.
validateForm
.
value
.
maintenanceExpiration
,
'yyyy-MM-dd HH:mm:ss'
)
})
})
;
this
.
workSer
.
updateInventory
(
this
.
validateForm
.
value
).
subscribe
(
this
.
workSer
.
updateInventory
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
success
(
"编辑资产成功"
);
this
.
message
.
success
(
'编辑资产成功'
);
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
this
.
initForm
();
this
.
initForm
();
this
.
done
.
emit
();
this
.
done
.
emit
();
}
}
}
}
)
)
;
}
}
handleEditCancel
()
{
handleEditCancel
()
{
...
...
src/main/webapp/app/work/modal/plan-modal/plan-modal.component.html
View file @
efc8644b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"title"
>
计划标题
</nz-form-label>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"title"
>
计划标题
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"title"
name=
"title"
nz-input
placeholder=
"计划标题"
formControlName=
"title"
>
<input
id=
"title"
name=
"title"
nz-input
placeholder=
"计划标题"
formControlName=
"title"
>
<nz-form-explain
*
ngIf=
"validateForm.get('title').dirty && validateForm.get('title').errors"
>
请输入计划标题
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('title').dirty && validateForm.get('title').errors"
>
请输入计划标题
且不超过20字
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</div>
</div>
...
...
src/main/webapp/app/work/modal/plan-modal/plan-modal.component.ts
View file @
efc8644b
...
@@ -42,7 +42,7 @@ export class PlanModalComponent implements OnInit {
...
@@ -42,7 +42,7 @@ export class PlanModalComponent implements OnInit {
this
.
participantsList
=
[];
this
.
participantsList
=
[];
this
.
principalsList
=
[];
this
.
principalsList
=
[];
this
.
validateForm
=
this
.
fb
.
group
({
this
.
validateForm
=
this
.
fb
.
group
({
title
:
[
null
,
[
Validators
.
required
]],
title
:
[
null
,
[
Validators
.
required
]
,
Validators
.
maxLength
(
20
)
],
typeId
:
[
null
,
[
Validators
.
required
]],
typeId
:
[
null
,
[
Validators
.
required
]],
startTime
:
[
null
,
[
Validators
.
required
]],
startTime
:
[
null
,
[
Validators
.
required
]],
endTime
:
[
null
,
[
Validators
.
required
]],
endTime
:
[
null
,
[
Validators
.
required
]],
...
@@ -50,7 +50,7 @@ export class PlanModalComponent implements OnInit {
...
@@ -50,7 +50,7 @@ export class PlanModalComponent implements OnInit {
cycleNum
:
[
'1'
],
cycleNum
:
[
'1'
],
number
:
[
null
,
[
Validators
.
required
]],
number
:
[
null
,
[
Validators
.
required
]],
workload
:
[
null
],
workload
:
[
null
],
description
:
[
null
],
description
:
[
null
,
Validators
.
maxLength
(
100
)
],
principals
:
[
null
,
[
Validators
.
required
]],
//负责人
principals
:
[
null
,
[
Validators
.
required
]],
//负责人
participants
:
[
null
,
[
Validators
.
required
]],
//参与人
participants
:
[
null
,
[
Validators
.
required
]],
//参与人
});
});
...
...
src/main/webapp/content/scss/white.scss
View file @
efc8644b
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
}
}
.container
{
.container
{
background-color
:
#
ebedf0
;
background-color
:
#
ffffff
;
}
}
.search-form
{
.search-form
{
...
...
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