Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
luqiao-app
Overview
Overview
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
杨子
luqiao-app
Commits
ab49b776
Commit
ab49b776
authored
May 22, 2019
by
杨子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建资产列表组件
parent
87317037
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
493 additions
and
126 deletions
+493
-126
assets-used-routing.module.ts
...p/routes/assets/assets-used/assets-used-routing.module.ts
+10
-2
assets-used.module.ts
src/app/routes/assets/assets-used/assets-used.module.ts
+3
-1
assets-list.component.html
...ets-used/checkPlan/assets-list/assets-list.component.html
+193
-0
assets-list.component.less
...ets-used/checkPlan/assets-list/assets-list.component.less
+0
-0
assets-list.component.spec.ts
...-used/checkPlan/assets-list/assets-list.component.spec.ts
+25
-0
assets-list.component.ts
...ssets-used/checkPlan/assets-list/assets-list.component.ts
+152
-0
check-plan.component.html
...es/assets/assets-used/checkPlan/check-plan.component.html
+59
-113
check-plan.component.ts
...utes/assets/assets-used/checkPlan/check-plan.component.ts
+2
-2
check-result.component.html
...s-used/checkPlan/check-result/check-result.component.html
+3
-0
check-result.component.scss
...s-used/checkPlan/check-result/check-result.component.scss
+0
-0
check-result.component.spec.ts
...sed/checkPlan/check-result/check-result.component.spec.ts
+27
-0
check-result.component.ts
...ets-used/checkPlan/check-result/check-result.component.ts
+14
-0
qr-scan.component.ts
src/app/routes/check/qrScan/qrScan/qr-scan.component.ts
+5
-8
No files found.
src/app/routes/assets/assets-used/assets-used-routing.module.ts
View file @
ab49b776
...
...
@@ -30,6 +30,7 @@ import { DiscardedDisposalDetailComponent } from "./discardedDisposal/detail/dis
import
{
AssetsUseRecordDetailComponent
}
from
"./assetsUseRecord/detail/assets-use-record.component"
;
import
{
Modal
}
from
"ng-zorro-antd-mobile"
;
import
{
CheckAddComponent
}
from
"./checkPlan/check-add/check-add.component"
;
import
{
AssetsListComponent
}
from
"./checkPlan/assets-list/assets-list.component"
;
const
routes
:
Routes
=
[
{
...
...
@@ -99,7 +100,7 @@ const routes: Routes = [
path
:
"checkPlan"
,
component
:
CheckPlanComponent
,
data
:
{
title
:
"
资产盘点
"
title
:
"
盘点计划
"
}
},
{
...
...
@@ -204,7 +205,7 @@ const routes: Routes = [
path
:
"checkPlanAdd/:id"
,
component
:
CheckAddComponent
,
data
:
{
title
:
"
资产盘点添加
"
title
:
"
执行盘点
"
}
},
{
...
...
@@ -234,6 +235,13 @@ const routes: Routes = [
data
:
{
title
:
"资产使用记录详情"
}
},
{
path
:
"assetsList"
,
component
:
AssetsListComponent
,
data
:
{
title
:
"资产"
}
}
];
...
...
src/app/routes/assets/assets-used/assets-used.module.ts
View file @
ab49b776
...
...
@@ -30,6 +30,7 @@ import { AssetsUseRecordDetailComponent } from "./assetsUseRecord/detail/assets-
import
{
AssetsUsedRoutingModule
}
from
"./assets-used-routing.module"
;
import
{
CheckAddComponent
}
from
"./checkPlan/check-add/check-add.component"
;
import
{
SharedModule
}
from
"src/app/shared"
;
import
{
AssetsListComponent
}
from
"./checkPlan/assets-list/assets-list.component"
;
@
NgModule
({
declarations
:
[
...
...
@@ -74,7 +75,8 @@ import { SharedModule } from "src/app/shared";
AssetsUseRecordComponent
,
AssetsUseRecordDetailComponent
,
CheckAddComponent
CheckAddComponent
,
AssetsListComponent
],
imports
:
[
SharedModule
,
AssetsUsedRoutingModule
]
})
...
...
src/app/routes/assets/assets-used/checkPlan/assets-list/assets-list.component.html
0 → 100644
View file @
ab49b776
<div>
<List
[
renderHeader
]=(
renderHeader
)
[
renderFooter
]=(
renderFooter
)
>
<InputItem
[
placeholder
]="
'规格型号'"
[(
ngModel
)]="
search
.
modelNum
"
[
clear
]="
true
"
>
</InputItem>
<InputItem
[
placeholder
]="
'生产厂家'"
[(
ngModel
)]="
search
.
madeFirms
"
[
clear
]="
true
"
>
</InputItem>
<InputItem
[
placeholder
]="
'资产名称'"
[(
ngModel
)]="
search
.
name
"
[
clear
]="
true
"
>
</InputItem>
<InputItem
[
placeholder
]="
'折旧年限'"
[(
ngModel
)]="
search
.
depreciableLife
"
[
clear
]="
true
"
>
</InputItem>
<InputItem
[
placeholder
]="
'存放地'"
[(
ngModel
)]="
search
.
storage
"
[
clear
]="
true
"
>
</InputItem>
<InputItem
[
placeholder
]="
'资产编号'"
[(
ngModel
)]="
search
.
num
"
[
clear
]="
true
"
>
</InputItem>
<ListItem
[
extra
]="
search
.
buyDate
"
[
arrow
]="'
horizontal
'"
(
onClick
)="
showDate
('
buyDate
')"
>
{{'购入日期'}}
</ListItem>
<ListItem>
<a
Button
[
type
]="'
primary
'"
[
size
]="'
small
'"
[
inline
]="
true
"
(
onClick
)="
doSearch
(
search
)"
>
提交
</a>
<a
Button
style=
"margin-left: 2.5px;"
[
size
]="'
small
'"
[
inline
]="
true
"
(
onClick
)="
onReset
()"
>
重置
</a>
</ListItem>
</List>
</div>
<ListItem
*
ngFor=
"let row of table.rows"
multipleLine
>
<div
[
ngClass
]="{'
list-content
'
:
!
row
.
showAll
}"
>
<p>
附件名称:{{row.accessoryName}}
</p><p>
帐面数量:{{row.count}}
</p><p>
净值:{{row.assetNetValue}}
</p><p>
计量单位:{{row.unit}}
</p><p>
管理单位:{{row.company? row.company.id:""}}
</p><p>
规格型号:{{row.modelNum}}
</p><p>
生产厂家:{{row.madeFirms}}
</p><p>
资产状态:{{row.assetState}}
</p><p>
产权单位:{{row.belongUnit? row.belongUnit.id:""}}
</p><p>
生产能力单位:{{row.productivityUnit}}
</p><p>
使用单位:{{row.useUnit? row.useUnit.id:""}}
</p><p>
资产名称:{{row.name}}
</p><p>
生产能力:{{row.productivity}}
</p><p>
保管人:{{row.preserver? row.preserver.id:""}}
</p><p>
折旧年限:{{row.depreciableLife}}
</p><p>
存放地:{{row.storage}}
</p><p>
资产编号:{{row.num}}
</p><p>
车架号:{{row.vin}}
</p><p>
不含税_单价:{{row.noTaxPrice}}
</p><p>
设备技术状况:{{row.technologySta}}
</p><p>
购入日期:{{row.buyDate}}
</p><p>
实盘数量:{{row.actualCount}}
</p>
</div>
<div
Button
[
type
]="'
primary
'"
(
click
)="
goDetail
(
row
.
id
)"
[
inline
]="
true
"
class=
"list-detail"
[
size
]="'
small
'"
>
详情
</div>
<div
(
click
)="
row
.
showAll=
!row.showAll"
class=
"list-more am-list-arrow"
[
ngClass
]="
row
.
showAll
?'
am-list-arrow-vertical-up
'
:
'
am-list-arrow-vertical
'"
></div>
</ListItem>
<Calendar
[(
ngModel
)]="
this
.
state
.
date
"
[
locale
]="
this
.
state
.
en
?
'
enUS
'
:
'
zhCN
'"
[
enterDirection
]="
this
.
state
.
enterDirection
"
[
visible
]="
this
.
state
.
show
"
[
getDateExtra
]="
this
.
state
.
getDateExtra
"
[
defaultDate
]="
this
.
state
.
now
"
[
minDate
]="
this
.
state
.
minDate
"
[
maxDate
]="
this
.
state
.
maxDate
"
[
pickTime
]="
this
.
state
.
pickTime
"
[
type
]="
this
.
state
.
type
"
[
rowSize
]="
this
.
state
.
rowSize
"
[
showShortcut
]="
this
.
state
.
showShortcut
"
[
infinite
]="
this
.
state
.
infinite
"
[
defaultValue
]="
this
.
state
.
defaultValue
"
[
onSelect
]="
this
.
state
.
onSelect
"
(
onCancel
)="
triggerCancel
()"
(
onConfirm
)="
triggerConfirm
($
event
)"
(
onSelectHasDisableDate
)="
triggerSelectHasDisableDate
($
event
)"
></Calendar>
src/app/routes/assets/assets-used/checkPlan/assets-list/assets-list.component.less
0 → 100644
View file @
ab49b776
src/app/routes/assets/assets-used/checkPlan/assets-list/assets-list.component.spec.ts
0 → 100644
View file @
ab49b776
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
FixedAssetsComponent
}
from
'./ FixedAssets.component'
;
describe
(
' FixedAssetsComponent'
,
()
=>
{
let
component
:
FixedAssetsComponent
;
let
fixture
:
ComponentFixture
<
FixedAssetsComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
FixedAssetsComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
FixedAssetsComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/routes/assets/assets-used/checkPlan/assets-list/assets-list.component.ts
0 → 100644
View file @
ab49b776
import
{
Component
,
OnInit
}
from
"@angular/core"
;
import
{
FormGroup
,
FormControl
}
from
"@angular/forms"
;
import
{
Router
,
ActivatedRoute
}
from
"@angular/router"
;
import
{
APIService
}
from
"src/app/service/layout/service/api.service"
;
import
{
capitalize
}
from
"src/app/layout/service/util.service"
;
const
extra
=
{
"2017/07/15"
:
{
info
:
"Disable"
,
disable
:
true
}
};
const
now
=
new
Date
();
extra
[
+
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
now
.
getDate
()
+
5
)]
=
{
info
:
"Disable"
,
disable
:
true
};
extra
[
+
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
now
.
getDate
()
+
6
)]
=
{
info
:
"Disable"
,
disable
:
true
};
extra
[
+
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
now
.
getDate
()
+
7
)]
=
{
info
:
"Disable"
,
disable
:
true
};
extra
[
+
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
now
.
getDate
()
+
8
)]
=
{
info
:
"Disable"
,
disable
:
true
};
for
(
let
key
in
extra
)
{
if
(
extra
.
hasOwnProperty
(
key
))
{
let
info
=
extra
[
key
];
const
date
=
new
Date
(
key
);
if
(
!
Number
.
isNaN
(
+
date
)
&&
!
extra
[
+
date
])
{
extra
[
+
date
]
=
info
;
}
}
}
@
Component
({
selector
:
"app-assets-list"
,
templateUrl
:
"./assets-list.component.html"
,
styleUrls
:
[
"./assets-list.component.less"
]
})
export
class
AssetsListComponent
implements
OnInit
{
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
api
:
APIService
)
{}
renderFooter
:
Function
;
renderHeader
:
Function
;
search
:
any
=
{};
table
:
any
=
{
rows
:
[]
};
currentDateKey
:
string
=
""
;
state
:
any
=
{
en
:
false
,
date
:
null
,
show
:
false
,
pickTime
:
false
,
now
:
new
Date
(),
type
:
"range"
,
enterDirection
:
""
,
rowSize
:
"normal"
,
showShortcut
:
false
,
infinite
:
true
,
defaultValue
:
undefined
,
minDate
:
new
Date
(
+
now
-
5184000000
),
maxDate
:
new
Date
(
+
now
+
31536000000
),
onSelect
:
undefined
,
getDateExtra
:
date
=>
{
return
extra
[
+
date
];
}
};
ngOnInit
()
{
this
.
renderFooter
=
this
.
bindRenderFooter
.
bind
(
this
);
this
.
renderHeader
=
this
.
bindRenderHeader
.
bind
(
this
);
this
.
loadData
(
this
.
search
);
}
bindRenderFooter
()
{
return
" "
;
}
bindRenderHeader
()
{
return
"搜索"
;
}
doSearch
(
search
)
{
this
.
loadData
(
search
);
}
inputChange
(
$event
,
key
,
orgKey
)
{
console
.
log
(
$event
);
var
index
=
this
[
key
+
"Dic"
].
indexOf
(
$event
[
0
]);
this
.
search
[
orgKey
]
=
index
;
}
onReset
()
{
this
.
search
=
{};
}
goDetail
(
id
)
{
this
.
router
.
navigate
([
"../fixedAssetsDetail"
,
{
id
:
id
}],
{
relativeTo
:
this
.
activatedRoute
});
}
showDate
(
key
:
string
)
{
this
.
currentDateKey
=
key
;
this
.
initPara
();
this
.
state
.
show
=
true
;
}
triggerConfirm
(
value
)
{
this
.
search
[
`begin
${
capitalize
(
this
.
currentDateKey
)}
`
]
=
value
.
startDate
.
toLocaleDateString
().
replace
(
/
\/
/g
,
"-"
);
this
.
search
[
`end
${
capitalize
(
this
.
currentDateKey
)}
`
]
=
value
.
endDate
.
toLocaleDateString
().
replace
(
/
\/
/g
,
"-"
);
this
.
search
[
this
.
currentDateKey
]
=
value
.
startDate
.
toLocaleDateString
()
+
" ~ "
+
value
.
endDate
.
toLocaleDateString
();
this
.
triggerCancel
();
}
triggerCancel
()
{
this
.
state
.
show
=
false
;
}
loadData
(
search
)
{
this
.
api
.
getFixedAssetsList
(
search
).
subscribe
(
data
=>
{
this
.
table
=
data
;
});
}
initPara
()
{
this
.
state
=
{
...
this
.
state
,
...{
show
:
false
,
date
:
null
,
pickTime
:
false
,
now
:
new
Date
(),
type
:
"range"
,
rowSize
:
"normal"
,
infinite
:
true
,
enterDirection
:
""
,
onSelect
:
undefined
,
showShortcut
:
false
,
defaultValue
:
undefined
,
minDate
:
new
Date
(
+
now
-
5184000000
),
maxDate
:
new
Date
(
+
now
+
31536000000
),
getDateExtra
:
date
=>
{
return
extra
[
+
date
];
}
}
};
}
}
src/app/routes/assets/assets-used/checkPlan/check-plan.component.html
View file @
ab49b776
<div>
<List
[
renderHeader
]=(
renderHeader
)
[
renderFooter
]=(
renderFooter
)
>
<ListItem
Picker
[
extra
]="
checkStaOrg
"
[
arrow
]="'
horizontal
'"
[
data
]="
checkStaDic
"
[(
ngModel
)]
=
"
checkStaOrg
"
(
ngModelChange
)="
inputChange
($
event
,'
checkSta
','
checkSta
')"
>
盘点状态
</ListItem>
<ListItem
[
extra
]="
search
.
endDate
"
[
arrow
]="'
horizontal
'"
(
onClick
)="
showDate
('
endDate
')"
>
{{'结束时间'}}
</ListItem>
<ListItem
Picker
[
extra
]="
inventoryTypeOrg
"
[
arrow
]="'
horizontal
'"
[
data
]="
inventoryTypeDic
"
[(
ngModel
)]
=
"
inventoryTypeOrg
"
(
ngModelChange
)="
inputChange
($
event
,'
inventoryType
','
inventoryType
')"
>
盘点类型
</ListItem>
<ListItem
[
extra
]="
search
.
beginDate
"
[
arrow
]="'
horizontal
'"
(
onClick
)="
showDate
('
beginDate
')"
>
{{'开始时间'}}
</ListItem>
<ListItem>
<a
Button
[
routerLink
]="['../
checkPlanAdd
',
222
]"
[
type
]="'
primary
'"
style=
"margin-right: 2.5px;"
[
size
]="'
small
'"
[
inline
]="
true
"
>
添加
</a>
<a
Button
[
type
]="'
primary
'"
[
size
]="'
small
'"
[
inline
]="
true
"
(
onClick
)="
doSearch
(
search
)"
>
提交
</a>
<a
Button
style=
"margin-left: 2.5px;"
[
size
]="'
small
'"
[
inline
]="
true
"
(
onClick
)="
onReset
()"
>
重置
</a>
</ListItem>
</List>
<List
[
renderHeader
]=(
renderHeader
)
[
renderFooter
]=(
renderFooter
)
>
<ListItem
Picker
[
extra
]="
checkStaOrg
"
[
arrow
]="'
horizontal
'"
[
data
]="
checkStaDic
"
[(
ngModel
)]="
checkStaOrg
"
(
ngModelChange
)="
inputChange
($
event
,'
checkSta
','
checkSta
')"
>
盘点状态
</ListItem>
<ListItem
[
extra
]="
search
.
endDate
"
[
arrow
]="'
horizontal
'"
(
onClick
)="
showDate
('
endDate
')"
>
{{'结束时间'}}
</ListItem>
<ListItem
Picker
[
extra
]="
inventoryTypeOrg
"
[
arrow
]="'
horizontal
'"
[
data
]="
inventoryTypeDic
"
[(
ngModel
)]="
inventoryTypeOrg
"
(
ngModelChange
)="
inputChange
($
event
,'
inventoryType
','
inventoryType
')"
>
盘点类型
</ListItem>
<ListItem
[
extra
]="
search
.
beginDate
"
[
arrow
]="'
horizontal
'"
(
onClick
)="
showDate
('
beginDate
')"
>
{{'开始时间'}}
</ListItem>
<ListItem>
<!-- <a Button [routerLink]="['../checkPlanAdd',222]" [type]="'primary'" style="margin-right: 2.5px;" [size]="'small'"
[inline]="true">
添加
</a> -->
<a
Button
[
type
]="'
primary
'"
[
size
]="'
small
'"
[
inline
]="
true
"
(
onClick
)="
doSearch
(
search
)"
>
提交
</a>
<a
Button
style=
"margin-left: 2.5px;"
[
size
]="'
small
'"
[
inline
]="
true
"
(
onClick
)="
onReset
()"
>
重置
</a>
</ListItem>
</List>
</div>
<ListItem
*
ngFor=
"let row of table.rows"
multipleLine
>
<div
[
ngClass
]="{'
list-content
'
:
!
row
.
showAll
}"
>
<p>
盘点状态:{{row.checkSta}}
</p><p>
结束时间:{{row.endDate}}
</p><p>
附件:{{row.accessory}}
</p><p>
备注信息:{{row.remarks}}
</p><p>
盘点单号:{{row.invoicesNum}}
</p><p>
盘点类型:{{row.inventoryType}}
</p><p>
盘点人:{{row.checkUser? row.checkUser.name:""}}
</p><p>
开始时间:{{row.beginDate}}
</p><p>
事项名称:{{row.name}}
</p>
</div>
<div
Button
[
type
]="'
primary
'"
(
click
)="
goDetail
(
row
.
id
)"
[
inline
]="
true
"
class=
"list-detail"
[
size
]="'
small
'"
>
详情
</div>
<div
(
click
)="
row
.
showAll=
!row.showAll"
class=
"list-more am-list-arrow"
[
ngClass
]="
row
.
showAll
?'
am-list-arrow-vertical-up
'
:
'
am-list-arrow-vertical
'"
></div>
</ListItem>
<Calendar
[(
ngModel
)]="
this
.
state
.
date
"
[
locale
]="
this
.
state
.
en
?
'
enUS
'
:
'
zhCN
'"
[
enterDirection
]="
this
.
state
.
enterDirection
"
[
visible
]="
this
.
state
.
show
"
[
getDateExtra
]="
this
.
state
.
getDateExtra
"
[
defaultDate
]="
this
.
state
.
now
"
[
minDate
]="
this
.
state
.
minDate
"
[
maxDate
]="
this
.
state
.
maxDate
"
[
pickTime
]="
this
.
state
.
pickTime
"
[
type
]="
this
.
state
.
type
"
[
rowSize
]="
this
.
state
.
rowSize
"
[
showShortcut
]="
this
.
state
.
showShortcut
"
[
infinite
]="
this
.
state
.
infinite
"
[
defaultValue
]="
this
.
state
.
defaultValue
"
[
onSelect
]="
this
.
state
.
onSelect
"
(
onCancel
)="
triggerCancel
()"
(
onConfirm
)="
triggerConfirm
($
event
)"
(
onSelectHasDisableDate
)="
triggerSelectHasDisableDate
($
event
)"
></Calendar>
<ListItem
*
ngFor=
"let row of table.rows"
multipleLine
>
<div
[
ngClass
]="{'
list-content
'
:
!
row
.
showAll
}"
>
<p>
盘点状态:{{row.checkSta}}
</p>
<p>
结束时间:{{row.endDate}}
</p>
<p>
附件:{{row.accessory}}
</p>
<p>
备注信息:{{row.remarks}}
</p>
<p>
盘点单号:{{row.invoicesNum}}
</p>
<p>
盘点类型:{{row.inventoryType}}
</p>
<p>
盘点人:{{row.checkUser? row.checkUser.name:""}}
</p>
<p>
开始时间:{{row.beginDate}}
</p>
<p>
事项名称:{{row.name}}
</p>
</div>
<div
Button
[
type
]="'
primary
'"
(
click
)="
goAssetsList
()"
[
inline
]="
true
"
class=
"list-detail"
[
size
]="'
small
'"
>
下一步
</div>
<div
(
click
)="
row
.
showAll=
!row.showAll"
class=
"list-more am-list-arrow"
[
ngClass
]="
row
.
showAll
?'
am-list-arrow-vertical-up
'
:
'
am-list-arrow-vertical
'"
></div>
</ListItem>
<Calendar
[(
ngModel
)]="
this
.
state
.
date
"
[
locale
]="
this
.
state
.
en
?
'
enUS
'
:
'
zhCN
'"
[
enterDirection
]="
this
.
state
.
enterDirection
"
[
visible
]="
this
.
state
.
show
"
[
getDateExtra
]="
this
.
state
.
getDateExtra
"
[
defaultDate
]="
this
.
state
.
now
"
[
minDate
]="
this
.
state
.
minDate
"
[
maxDate
]="
this
.
state
.
maxDate
"
[
pickTime
]="
this
.
state
.
pickTime
"
[
type
]="
this
.
state
.
type
"
[
rowSize
]="
this
.
state
.
rowSize
"
[
showShortcut
]="
this
.
state
.
showShortcut
"
[
infinite
]="
this
.
state
.
infinite
"
[
defaultValue
]="
this
.
state
.
defaultValue
"
[
onSelect
]="
this
.
state
.
onSelect
"
(
onCancel
)="
triggerCancel
()"
(
onConfirm
)="
triggerConfirm
($
event
)"
(
onSelectHasDisableDate
)="
triggerSelectHasDisableDate
($
event
)"
></Calendar>
\ No newline at end of file
src/app/routes/assets/assets-used/checkPlan/check-plan.component.ts
View file @
ab49b776
...
...
@@ -99,8 +99,8 @@ export class CheckPlanComponent implements OnInit {
onReset
()
{
this
.
search
=
{};
}
go
Detail
(
id
)
{
this
.
router
.
navigate
([
"../
checkPlanDetail"
,
{
id
:
id
}
],
{
go
AssetsList
(
)
{
this
.
router
.
navigate
([
"../
assetsList"
],
{
relativeTo
:
this
.
activatedRoute
});
}
...
...
src/app/routes/assets/assets-used/checkPlan/check-result/check-result.component.html
0 → 100644
View file @
ab49b776
<p>
check-result works!
</p>
src/app/routes/assets/assets-used/checkPlan/check-result/check-result.component.scss
0 → 100644
View file @
ab49b776
src/app/routes/assets/assets-used/checkPlan/check-result/check-result.component.spec.ts
0 → 100644
View file @
ab49b776
import
{
CUSTOM_ELEMENTS_SCHEMA
}
from
'@angular/core'
;
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
CheckResultComponent
}
from
'./check-result.component'
;
describe
(
'CheckResultComponent'
,
()
=>
{
let
component
:
CheckResultComponent
;
let
fixture
:
ComponentFixture
<
CheckResultComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
CheckResultComponent
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
],
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
CheckResultComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/routes/assets/assets-used/checkPlan/check-result/check-result.component.ts
0 → 100644
View file @
ab49b776
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-check-result'
,
templateUrl
:
'./check-result.component.html'
,
styleUrls
:
[
'./check-result.component.scss'
],
})
export
class
CheckResultComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{}
}
src/app/routes/check/qrScan/qrScan/qr-scan.component.ts
View file @
ab49b776
...
...
@@ -7,7 +7,7 @@ import { BarcodeScanner } from "@ionic-native/barcode-scanner/ngx";
templateUrl
:
"./qr-scan.component.html"
,
styleUrls
:
[
"./qr-scan.component.scss"
]
})
export
class
QrScanComponent
implements
OnInit
,
OnDestroy
,
AfterViewInit
{
export
class
QrScanComponent
implements
OnInit
,
OnDestroy
{
constructor
(
private
router
:
Router
,
private
toast
:
Toast
,
...
...
@@ -27,18 +27,15 @@ export class QrScanComponent implements OnInit, OnDestroy, AfterViewInit {
this
.
showToast
();
});
}
ngAfterViewInit
():
void
{}
showToast
()
{
const
toast
=
Toast
.
show
(
"扫描出错"
,
0
);
setTimeout
(()
=>
{
Toast
.
hide
();
},
3000
);
const
toast
=
Toast
.
show
(
"扫描出错"
,
1000
);
}
loadingToast
(
id
)
{
const
toast
=
Toast
.
loading
(
"Loading..."
,
1000
,
()
=>
{
console
.
log
(
"Load complete !!!"
);
this
.
router
.
navigate
([
"/admin/assets-used/checkPlanAdd"
,
id
]);
});
}
ngOnDestroy
()
{}
ngOnDestroy
()
{
Toast
.
hide
();
}
}
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