Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
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
party-build-cloud
Commits
38ee4369
Commit
38ee4369
authored
Aug 09, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f806662a
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
948 additions
and
0 deletions
+948
-0
evaluation.html
...ages/serve-pages/goods-collect/evaluation/evaluation.html
+0
-0
evaluation.scss
...ages/serve-pages/goods-collect/evaluation/evaluation.scss
+91
-0
evaluation.ts
src/pages/serve-pages/goods-collect/evaluation/evaluation.ts
+65
-0
vistor-apply.html
...erve-pages/vistor-register/vistor-apply/vistor-apply.html
+49
-0
vistor-apply.scss
...erve-pages/vistor-register/vistor-apply/vistor-apply.scss
+126
-0
vistor-apply.ts
.../serve-pages/vistor-register/vistor-apply/vistor-apply.ts
+97
-0
vistor-register.html
src/pages/serve-pages/vistor-register/vistor-register.html
+127
-0
vistor-register.module.ts
...ges/serve-pages/vistor-register/vistor-register.module.ts
+21
-0
vistor-register.scss
src/pages/serve-pages/vistor-register/vistor-register.scss
+219
-0
vistor-register.ts
src/pages/serve-pages/vistor-register/vistor-register.ts
+153
-0
No files found.
src/pages/serve-pages/goods-collect/evaluation/evaluation.html
0 → 100644
View file @
38ee4369
src/pages/serve-pages/goods-collect/evaluation/evaluation.scss
0 → 100644
View file @
38ee4369
page-evaluation
{
.main
{
background-color
:
rgba
(
0
,
0
,
0
,
.4
);
height
:
100%
;
}
.content
{
position
:
relative
;
height
:
100%
;
width
:
100%
;
}
.comment
{
position
:
absolute
;
width
:
100%
;
bottom
:
0
;
height
:
60%
;
background
:
#fff
;
border-top-right-radius
:
8px
;
border-top-left-radius
:
8px
;
padding
:
5px
15px
;
.name
{
padding
:
20px
5px
;
font-size
:
2rem
;
font-weight
:
bold
;
}
ion-icon
{
font-size
:
3rem
;
font-weight
:
bold
;
}
.p-name
{
padding
:
10px
5px
;
font-weight
:
bold
;
}
.detail-item
{
margin-bottom
:
10px
;
margin-top
:
10px
;
span
{
display
:
inline-block
;
padding
:
5px
20px
;
background-color
:
#f2f2f2
;
border-radius
:
10px
;
margin-right
:
20px
;
margin-bottom
:
10px
;
border
:
1px
solid
#f2f2f2
;
}
span
.select
{
background-color
:
#fdf8f2
;
border
:
1px
solid
#e42417
;
color
:
#e42417
;
}
}
.choose-spces
{
display
:
flex
;
div
:last-child
{
margin-left
:
auto
;
}
}
.choose-num
{
display
:
flex
;
height
:
40px
;
line-height
:
40px
;
div
:last-child
{
margin-left
:
auto
;
}
}
.img-star
{
span
{
color
:
#999999
;
font-size
:
2rem
;
}
}
.submit-btn
{
position
:
absolute
;
bottom
:
20px
;
margin-left
:
8%
;
}
}
}
src/pages/serve-pages/goods-collect/evaluation/evaluation.ts
0 → 100644
View file @
38ee4369
import
{
Component
,
ElementRef
,
Renderer2
,
ViewChild
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
,
ViewController
}
from
'ionic-angular'
;
import
{
ServeService
}
from
"../../serve.service"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
@
Component
({
selector
:
'page-evaluation'
,
templateUrl
:
'evaluation.html'
,
})
export
class
EvaluationPage
{
@
ViewChild
(
'starEle'
)
starEle
:
ElementRef
;
goods
;
goodsId
;
choose
=
{
amount
:
<
any
>
'1'
,
brand
:
''
,
officeId
:
''
,
id
:
''
,
model
:
''
,
};
select
=
0
;
starList
=
new
Array
(
5
);
goodsDetail
;
constructor
(
private
viewCtrl
:
ViewController
,
private
params
:
NavParams
,
private
renderer
:
Renderer2
,
private
serveSer
:
ServeService
,
private
commonSer
:
CommonService
)
{
this
.
goodsId
=
this
.
params
.
get
(
'goodsId'
);
this
.
goodsDetail
=
this
.
params
.
get
(
'data'
);
if
(
this
.
goodsDetail
)
{
this
.
choose
.
amount
=
this
.
goodsDetail
.
amount
;
}
this
.
serveSer
.
supplyDetail
(
this
.
goodsId
).
subscribe
(
(
res
)
=>
{
this
.
goods
=
res
;
}
)
}
checkStar
(
index
)
{
console
.
log
(
this
.
starEle
);
this
.
select
=
index
;
}
close
()
{
this
.
viewCtrl
.
dismiss
();
}
stop
(
e
)
{
e
.
stopPropagation
();
}
//提交
submit
()
{
this
.
choose
.
brand
=
this
.
goods
.
brand
;
this
.
choose
.
officeId
=
this
.
goods
.
id
;
if
(
this
.
goodsDetail
)
this
.
choose
.
id
=
this
.
goods
.
id
;
//购物车编辑
this
.
choose
.
model
=
this
.
goods
.
model
;
console
.
log
(
this
.
choose
);
this
.
viewCtrl
.
dismiss
(
this
.
choose
);
}
}
src/pages/serve-pages/vistor-register/vistor-apply/vistor-apply.html
0 → 100644
View file @
38ee4369
<ion-header>
<ion-navbar>
<ion-title>
会议室申请
</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div
class=
"padding-6"
>
<ion-item>
<ion-label
class=
"item-left"
><span
class=
"color-red"
>
*
</span>
访客名称
</ion-label>
<ion-input
[(
ngModel
)]="
obj
.
visitorName
"
type=
"text"
maxlength=
"20"
></ion-input>
<ion-label
style=
"max-width: 100%"
*
ngIf=
"check.visitorName"
class=
"check-tips"
>
参会人数不可大于会议室可容纳数({{roomMax}})
</ion-label>
</ion-item>
<ion-item>
<ion-label
class=
"item-left"
>
访客单位
</ion-label>
<ion-input
[(
ngModel
)]="
obj
.
visitorOrg
"
type=
"text"
maxlength=
"20"
></ion-input>
</ion-item>
<ion-item>
<ion-label
class=
"item-left"
>
车牌号
</ion-label>
<ion-input
[(
ngModel
)]="
obj
.
carNumber
"
type=
"text"
maxlength=
"20"
></ion-input>
</ion-item>
<ion-item>
<ion-label
class=
"item-left"
><span
class=
"color-red"
>
*
</span>
到访时间:
</ion-label>
<ion-datetime
cancelText=
"取消"
doneText=
"确认"
displayFormat=
"YYYY-MM-DD HH:mm"
pickerFormat=
"YYYY MM DD HH mm"
placeholder=
"请选择"
[(
ngModel
)]="
obj
.
visitTime
"
></ion-datetime>
<ion-label
class=
"right-arrow"
>
<ion-icon
name=
"arrow-forward"
></ion-icon>
</ion-label>
<ion-label
*
ngIf=
"check.visitTime"
class=
"check-tips"
>
请选择开始时间
</ion-label>
</ion-item>
<div
class=
"item-box"
>
<div
class=
"left"
>
备注:
</div>
<div
class=
"right"
>
<ion-textarea
[(
ngModel
)]="
obj
.
remark
"
></ion-textarea>
</div>
</div>
</div>
<button
class=
"submit-btn submit"
(
click
)="
submit
()"
>
提交
</button>
</ion-content>
src/pages/serve-pages/vistor-register/vistor-apply/vistor-apply.scss
0 → 100644
View file @
38ee4369
page-vistor-apply
{
.item-left
{
text-align
:
right
;
width
:
20%
;
font-weight
:
bold
;
font-size
:
1
.4rem
;
flex
:
none
;
}
.item-ios.item-block
.item-inner
{
border-bottom
:
0
.55px
solid
#eeeeee
;
}
ion-datetime
,
ion-select
{
width
:
80%
;
max-width
:
80%
;
text-align
:
right
;
font-size
:
1
.4rem
;
}
ion-datetime
{
padding-right
:
18px
!
important
;
}
ion-input
input
{
text-align
:
right
;
font-size
:
1
.4rem
;
}
ion-item
,
.item-box
{
position
:
relative
;
}
.choose
{
text-align
:
right
;
margin-right
:
20px
;
font-size
:
1
.5rem
;
color
:
#999
;
}
.right-arrow
{
position
:
absolute
;
right
:
2px
;
top
:
5px
;
color
:
#999
;
font-size
:
1
.6rem
;
}
.item-box
{
display
:
flex
;
border-bottom
:
0
.55px
solid
#eeeeee
;
.left
{
text-align
:
right
;
width
:
20%
;
font-weight
:
bold
;
font-size
:
1
.4rem
;
margin
:
11px
8px
11px
0
;
}
.right
{
width
:
80%
;
padding
:
11px
8px
11px
16px
;
.div-tag
{
padding
:
10px
0
;
span
{
display
:
inline-block
;
margin-right
:
10px
;
white-space
:
initial
;
border
:
1px
solid
#eee
;
padding
:
2px
5px
;
font-size
:
1rem
;
margin-bottom
:
5px
;
border-radius
:
4px
;
ion-icon
{
margin-left
:
3px
;
color
:
#666666
;
font-size
:
1rem
;
}
}
}
button
{
margin
:
0
;
}
ion-textarea
{
padding
:
6px
;
height
:
100px
;
border
:
1px
solid
#ddd
;
}
.tag
{
border
:
1px
solid
#ccc
;
margin
:
0
5px
10px
0
;
display
:
inline-block
;
border-radius
:
4px
;
font-size
:
1
.2rem
;
width
:
60px
;
height
:
25px
;
text-align
:
center
;
line-height
:
25px
;
}
span
.selectLead
{
background-color
:
#fdf8f2
;
border
:
1px
solid
#e42417
;
color
:
#e42417
;
}
}
}
ion-item
,
.item-box
{
position
:
relative
;
}
.check-tips
{
position
:
absolute
;
font-size
:
1
.2rem
;
top
:
24px
;
color
:
red
;
left
:
10px
;
}
}
src/pages/serve-pages/vistor-register/vistor-apply/vistor-apply.ts
0 → 100644
View file @
38ee4369
import
{
Component
}
from
'@angular/core'
;
import
{
ActionSheetController
,
ModalController
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
ServeService
}
from
"../../serve.service"
;
import
{
AppMainService
}
from
"../../../../app/app.service"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
import
{
DatePipe
}
from
"@angular/common"
;
import
{
PersonMulComponent
}
from
"../../../../components/person-mul/person-mul"
;
@
Component
({
selector
:
'page-vistor-apply'
,
templateUrl
:
'vistor-apply.html'
,
})
export
class
VistorApplyPage
{
obj
=<
any
>
{
visitorName
:
''
,
visitorOrg
:
''
,
carNumber
:
''
,
visitTime
:
''
,
remark
:
''
,
};
check
=
{
visitorName
:
false
,
visitTime
:
false
,
};
applyId
;
//是否编辑
mineInfo
;
//申请人信息
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
actionSheetCtrl
:
ActionSheetController
,
private
serveSer
:
ServeService
,
public
_modalCtrl
:
ModalController
,
private
appMainSer
:
AppMainService
,
private
commonSer
:
CommonService
,
private
datePipe
:
DatePipe
)
{
this
.
appMainSer
.
mineInfo
.
subscribe
(
value
=>
{
this
.
mineInfo
=
value
;
})
}
ionViewDidLoad
()
{
this
.
initParams
();
this
.
applyId
=
this
.
navParams
.
get
(
'id'
);
if
(
this
.
applyId
)
{
this
.
meetDetail
();
}
}
//时间和会议室初始化
initParams
()
{
const
data
=
this
.
navParams
.
get
(
'data'
);
}
//会议详情
meetDetail
()
{
this
.
serveSer
.
editVisitorApply
(
this
.
applyId
).
subscribe
(
(
res
)
=>
{
if
(
res
)
{
}
}
)
}
submit
()
{
//校验
let
checkBool
=
false
;
for
(
let
i
in
this
.
check
)
{
if
(
!
this
.
obj
[
i
])
{
checkBool
=
true
;
this
.
check
[
i
]
=
true
;
}
else
{
this
.
check
[
i
]
=
false
;
}
}
if
(
checkBool
)
return
false
;
this
.
obj
.
visitTime
=
this
.
datePipe
.
transform
(
this
.
obj
.
visitTime
,
'yyyy-MM-dd HH:mm'
);
if
(
this
.
applyId
)
this
.
obj
.
id
=
this
.
applyId
;
this
.
commonSer
.
alert
(
'确定提交登记?'
,
()
=>
{
this
.
serveSer
.
saveVisitorApply
(
this
.
obj
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errcode
==
1000
)
{
this
.
navCtrl
.
pop
()
this
.
commonSer
.
toast
(
'访客登记成功'
);
}
else
{
this
.
commonSer
.
toast
(
res
.
errmsg
);
}
}
)
});
}
}
src/pages/serve-pages/vistor-register/vistor-register.html
0 → 100644
View file @
38ee4369
<ion-header>
<ion-navbar>
<ion-title>
访客登记
</ion-title>
<ion-buttons
end
>
<button
ion-button
(
click
)="
goApply
(
null
)"
>
<ion-icon
class=
"top-right-icon icon-fabu iconfont"
></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
<div
class=
"duty"
>
<div
class=
"dutyItem"
(
click
)="
change
(
1
)"
>
<span
class=
"{{changeType == 1?'duty-title':''}}"
>
访客登记
</span>
</div>
<div
class=
"dutyItem"
(
click
)="
change
(
2
)"
>
<span
class=
"{{changeType == 2?'duty-title':''}}"
>
我的登记
</span>
</div>
</div>
</ion-header>
<ion-content>
<ion-content
direction=
"y"
scrollbar-y=
"true"
class=
"bgc-e7e8ed"
>
<ion-refresher
(
ionRefresh
)="
doRefresh
($
event
)"
>
<ion-refresher-content
pullingText=
"下拉刷新"
refreshingSpinner=
"bubbles"
>
</ion-refresher-content>
</ion-refresher>
<ng-container
*
ngIf=
"changeType == 1"
>
<ion-calendar
[(
ngModel
)]="
date
"
(
onChange
)="
getDate
($
event
)"
[
options
]="
options
"
type=
"string"
format=
"YYYY-MM-DD"
>
</ion-calendar>
<div
class=
"room"
>
<div
class=
"already"
>
<p>
已预定会议室
</p>
<div
class=
"morning"
>
<div
class=
"morning-text"
>
上午
</div>
<div
class=
"morning-room"
>
<span
(
click
)="
goApplyEdit
(
item1
)"
*
ngFor=
"let item1 of room?.morningUse"
>
{{item1.name}}
<ng-container
*
ngIf=
"item1.applicantName != mineInfo.orgName"
>
(已预定)
</ng-container>
<ng-container
*
ngIf=
"item1.applicantName == mineInfo.orgName"
>
(可编辑)
</ng-container>
</span>
</div>
</div>
<div
class=
"afternoon"
>
<div
class=
"afternoon-text"
>
下午
</div>
<div
class=
"morning-room"
>
<span
(
click
)="
goApplyEdit
(
item2
)"
*
ngFor=
"let item2 of room?.afternoonUse"
>
{{item2.name}}
<ng-container
*
ngIf=
"item2.applicantName != mineInfo.orgName"
>
(已预定)
</ng-container>
<ng-container
*
ngIf=
"item2.applicantName == mineInfo.orgName"
>
(可编辑)
</ng-container>
</span>
</div>
</div>
</div>
<div
class=
"notYet"
>
<p>
可预定会议室
</p>
<div
class=
"morning"
>
<div
class=
"morning-text"
>
上午
</div>
<div
class=
"morning-room"
>
<span
(
click
)="
goApply
(
item3
)"
*
ngFor=
"let item3 of room?.morningNotUse"
>
{{item3.name}}(可预定)
</span>
</div>
</div>
<div
class=
"afternoon"
>
<div
class=
"afternoon-text"
>
下午
</div>
<div
class=
"morning-room"
>
<span
(
click
)="
goApply
(
item4
)"
*
ngFor=
"let item4 of room?.afternoonNotUse"
>
{{item4.name}}(可预定)
</span>
</div>
</div>
</div>
</div>
</ng-container>
<ng-container
*
ngIf=
"changeType == 2"
>
<div
class=
"duty-content"
>
<ion-list
class=
"myItem"
>
<ion-item-sliding
class=
"apply"
*
ngFor=
"let item of applyList"
>
<ion-item>
<p>
访客名称:{{item.visitorName}}
<span
float-end
>
访问时间:
<span>
{{item.visitTime | date:'yyyy-MM-dd HH:mm'}}
</span>
</span>
</p>
<p>
<span
class=
"apply-room"
>
访客单位:
<span>
{{item.visitorOrg}}
</span>
</span>
</p>
<p>
<span
class=
"order-time"
>
车牌号:
<span>
{{item.carNumber}}
</span>
</span>
</p>
</ion-item>
<ion-item-options>
<button
ion-button
color=
"danger"
(
click
)="
removeItem
(
item
)"
>
取消
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
<ion-list
text-center
style=
"margin-top: 10rem;color: #666666"
*
ngIf=
"!isLoad && applyList.length == 0"
>
<img
style=
"width: 20%;"
src=
"./assets/imgs/no-info.png"
alt=
""
>
<p
text-center
>
暂无预订
</p>
</ion-list>
</div>
</ng-container>
</ion-content>
</ion-content>
src/pages/serve-pages/vistor-register/vistor-register.module.ts
0 → 100644
View file @
38ee4369
import
{
NgModule
}
from
'@angular/core'
;
import
{
IonicPageModule
}
from
'ionic-angular'
;
import
{
VistorRegisterPage
}
from
'./vistor-register'
;
import
{
VistorApplyPage
}
from
"./vistor-apply/vistor-apply"
;
import
{
CalendarModule
}
from
"ion2-calendar"
;
@
NgModule
({
declarations
:
[
VistorRegisterPage
,
VistorApplyPage
],
imports
:
[
CalendarModule
,
IonicPageModule
.
forChild
(
VistorRegisterPage
),
],
entryComponents
:
[
VistorApplyPage
]
})
export
class
VistorRegisterPageModule
{
}
src/pages/serve-pages/vistor-register/vistor-register.scss
0 → 100644
View file @
38ee4369
page-vistor-register
{
.list-ios
.item-block
.item-inner
{
border
:
none
;
}
.bar-buttons-ios
[
end
]
{
width
:
35px
;
height
:
35px
;
text-align
:
center
;
margin-right
:
10px
;
}
.duty
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
height
:
36px
;
background-color
:
#fff
;
}
.duty-state
{
border
:
1px
solid
#f8ac56
;
font-size
:
1
.3rem
;
border-radius
:
4px
;
padding
:
1px
4px
;
color
:
#f8ac56
;
}
.duty
div
{
width
:
50%
;
text-align
:
center
;
position
:
relative
;
height
:
36px
;
line-height
:
36px
;
}
.duty-title
{
position
:
relative
;
color
:
#e42417
;
}
.
duty-title
:
:
after
{
content
:
''
;
position
:
absolute
;
width
:
100%
;
height
:
2px
;
background-color
:
#e42417
;
bottom
:
-10px
;
left
:
0px
;
}
.span-btn
{
background-color
:
#e42417
;
font-size
:
1
.4rem
;
padding
:
4px
6px
;
color
:
#fff
;
border-radius
:
3px
;
}
.dutyItem
>
div
{
margin-bottom
:
10px
;
}
.daySpan
{
padding
:
2px
20px
;
background-color
:
#e42417
;
color
:
#fff
;
border-bottom-right-radius
:
5px
;
}
.nightSpan
{
padding
:
4px
20px
;
background-color
:
#4e5e6f
;
color
:
#fff
;
border-bottom-right-radius
:
5px
;
}
.duty-Obj
.item-ios
p
{
margin-bottom
:
15px
;
}
.duty-Obj
.label-ios
{
margin
:
0
;
}
.duty-Obj
{
.item-ios.item-block
.item-inner
{
background-color
:
#f5f6f7
;
}
}
.room
{
padding
:
15px
;
background-color
:
#fff
;
}
.morning
,
.afternoon
{
display
:
flex
;
.morning-text
,
.afternoon-text
{
width
:
20%
;
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
padding-left
:
15px
;
}
.morning-room
,
.morning-room
{
width
:
80%
;
padding
:
10px
5px
;
min-height
:
53px
;
span
{
display
:
inline-block
;
font-size
:
1
.5rem
;
background-color
:
#e42417
;
border
:
1px
solid
#e42417
;
border-radius
:
4px
;
color
:
#ffffff
;
padding
:
8px
12px
;
margin-bottom
:
8px
;
margin-right
:
5px
;
}
}
}
.morning
+
.afternoon
{
border-top
:
1px
solid
#cccccc
;
}
.already
,
.notYet
{
border
:
1px
solid
#dddddd
;
border-radius
:
3px
;
p
{
background-color
:
#fff1f0
;
color
:
#e42417
;
padding
:
6px
15px
;
}
}
.already
{
.morning
{
border-top-right-radius
:
8px
;
border-top-left-radius
:
8px
;
}
.afternoon
{
border-bottom-right-radius
:
8px
;
border-bottom-left-radius
:
8px
;
}
}
.notYet
{
margin-top
:
15px
;
.morning
,
.afternoon
{
.morning-room
{
span
{
background-color
:
#f2f2f2
;
border
:
1px
solid
#f2f2f2
;
color
:
#666666
;
}
}
}
}
.duty-content
{
padding
:
15px
;
ion-item
{
p
{
padding
:
0
10px
10px
10px
;
span
{
color
:
#333333
;
font-weight
:
500
;
span
{
color
:
#666666
;
font-weight
:
400
;
}
}
}
p
:first-child
{
border-bottom
:
1px
solid
#cccccc
;
margin-bottom
:
10px
;
}
}
}
.apply
{
font-size
:
1
.4rem
;
border-radius
:
5px
;
.apply-room
{
font-size
:
1
.4rem
;
}
.meet-type
{
font-size
:
1
.4rem
;
margin-left
:
20px
;
span
{
font-size
:
1
.4rem
;
}
}
.order-time
{
font-size
:
1
.4rem
;
}
}
.apply
+
.apply
{
margin-top
:
8px
;
}
.list-ios
.item-block
.item-inner
{
padding
:
0
;
}
}
src/pages/serve-pages/vistor-register/vistor-register.ts
0 → 100644
View file @
38ee4369
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
CalendarComponentOptions
}
from
"ion2-calendar"
;
import
{
monthCh
,
weekDay
}
from
"../../../app/main"
;
import
{
AppGlobal
}
from
"../../../service/http.service"
;
import
{
ServeService
}
from
"../serve.service"
;
import
{
DatePipe
}
from
"@angular/common"
;
import
{
CommonService
}
from
"../../../provide/common.service"
;
import
{
AppMainService
}
from
"../../../app/app.service"
;
import
{
RoomDealPage
}
from
"../meet-room/room-deal/room-deal"
;
import
{
RoomApplyPage
}
from
"../meet-room/room-apply/room-apply"
;
import
{
VistorApplyPage
}
from
"./vistor-apply/vistor-apply"
;
@
IonicPage
()
@
Component
({
selector
:
'page-vistor-register'
,
templateUrl
:
'vistor-register.html'
,
})
export
class
VistorRegisterPage
{
changeType
=
1
;
date
=
new
Date
();
options
:
CalendarComponentOptions
=
{
from
:
new
Date
(
2000
,
0
,
1
),
monthFormat
:
'YYYY 年 MM 月 '
,
weekdays
:
weekDay
,
monthPickerFormat
:
monthCh
,
pickMode
:
'single'
,
color
:
'danger'
};
role
=
[];
mineInfo
;
room
;
applyList
=
[];
selectDate
;
pageNumber
=
1
;
pageSize
=
AppGlobal
.
pageCount
;
total
;
isLoad
=
true
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
serveSer
:
ServeService
,
public
datePipe
:
DatePipe
,
private
commonSer
:
CommonService
,
private
appMainSer
:
AppMainService
)
{
}
ionViewDidEnter
()
{
this
.
myApply
();
}
ionViewDidLoad
()
{
this
.
selectDate
=
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-dd'
);
this
.
getApply
();
//获取权限
this
.
appMainSer
.
role
.
subscribe
(
value
=>
{
this
.
role
=
value
;
}
);
//获取个人信息
this
.
appMainSer
.
mineInfo
.
subscribe
(
value
=>
{
this
.
mineInfo
=
value
;
})
}
doRefresh
(
e
){
this
.
pageNumber
=
1
;
this
.
myApply
();
e
.
complete
();
}
//获取预定日程
getApply
()
{
const
data
=
{
'dateStr'
:
this
.
selectDate
};
this
.
serveSer
.
queryMeetingRoomByDate
(
data
).
subscribe
(
(
res
)
=>
{
this
.
room
=
res
.
data
;
}
)
}
getDate
(
e
)
{
this
.
selectDate
=
e
;
this
.
getApply
();
}
//我的预定
myApply
()
{
const
data
=
{
P_pageNumber
:
this
.
pageNumber
,
P_pageSize
:
this
.
pageSize
,
};
this
.
serveSer
.
searchVisitor
(
data
).
subscribe
(
(
res
)
=>
{
this
.
isLoad
=
false
;
this
.
applyList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
}
)
}
//取消预定
removeItem
(
item
)
{
this
.
serveSer
.
cancelApply
(
item
.
id
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errcode
==
1000
)
{
this
.
commonSer
.
toast
(
'取消预定成功'
);
this
.
myApply
();
}
else
{
this
.
commonSer
.
toast
(
res
.
errmsg
);
}
}
)
}
//审核
goDeal
()
{
this
.
navCtrl
.
push
(
VistorApplyPage
);
}
//改变
change
(
type
)
{
this
.
changeType
=
type
;
if
(
this
.
changeType
==
1
)
this
.
getApply
();
if
(
this
.
changeType
==
2
)
this
.
myApply
();
}
//编辑申请
goApplyEdit
(
item
)
{
if
(
this
.
role
.
includes
(
0
))
return
false
;
//普通人不可编辑
if
(
this
.
role
.
includes
(
1
)
&&
item
.
orgName
!=
this
.
mineInfo
.
orgName
)
return
false
;
//内勤只能编辑本处室的
this
.
navCtrl
.
push
(
RoomApplyPage
,
{
id
:
item
.
applyId
});
}
//新增申请
goApply
(
item
)
{
if
(
this
.
role
.
includes
(
0
))
return
false
;
let
data
;
if
(
item
)
{
data
=
{
roomId
:
item
.
id
,
roomName
:
item
.
name
,
startTime
:
this
.
selectDate
+
' 9:00:00'
,
};
}
this
.
navCtrl
.
push
(
RoomApplyPage
,
{
data
:
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