Commit 1db7e426 authored by wangqinghua's avatar wangqinghua

duty

parent fc19e455
......@@ -14,9 +14,9 @@
<span>值班日期</span>
<span>{{date | date:'yyyy-MM-dd'}}</span>
</ion-item>
<ion-item>
<ion-label stacked>换班原因</ion-label>
<ion-textarea [(ngModel)]="reason"></ion-textarea>
<ion-item class="margin-top-15">
<ion-label>换班原因</ion-label>
<ion-textarea class="duty-textarea" [(ngModel)]="reason"></ion-textarea>
</ion-item>
</ion-list>
<button class="submit-btn submit" (click)="submit()">申请</button>
......
page-duty-apply {
font-size: 1.8rem;
.duty-textarea{
border: 1px solid rgb(221, 221, 221);
}
.submit{
border: 1px solid #34b4fc;
background-color: #34b4fc;
margin-top: 20px;
}
.label-ios + ion-textarea .text-input{
min-height: 100px;
}
}
......@@ -9,19 +9,19 @@ import { AppService } from "../../../service/appHttpService";
})
export class DutyApplyPage {
date;
id;
reason;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.date = this.navParams.get('date');
this.id = this.navParams.get('id');
}
submit(){
const data = {
date:new Date(this.date).toLocaleDateString(),
scheduleId:this.id,
reason:this.reason
};
this.appService.ObserverHttpPost('/wisdomgroup/changeApply/app/apply',data)
......
......@@ -46,13 +46,20 @@
<div class="duty-content">
<ion-list *ngIf="nowDuty.length > 0">
<ion-item class="dutyItem" class="margin-top-10" *ngFor="let item of nowDuty">
<div >
<div class="margin-bottom-15">
<span>{{item.dutyDate | date:'yyyy-MM-dd'}}</span>
<span *ngIf="item.type == 0">白班</span>
<span *ngIf="item.type == 1">夜班</span>
<span float-right>待值班</span>
<span float-right class="duty-state">待值班</span>
</div>
<div>
<span class="color-666" style="font-size: 1.5rem">
<span *ngIf="item.type == 1">工作日</span>
<span *ngIf="item.type == 2">节假日</span>
<span *ngIf="item.type == 3">调休</span>
<span *ngIf="item.type == 4">调班</span>
</span>
<span class="span-btn" float-right (click)="dutyDetail(item)" *ngIf="item.applyId">查看详情</span>
<span class="span-btn" float-right (click)="dutyApply(item)" *ngIf="!item.applyId">申请换班</span>
</div>
......
......@@ -10,6 +10,13 @@ page-duty {
height: 3rem;
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;
......
......@@ -42,7 +42,7 @@ export class DutyPage {
public appService: AppService) {
}
ionViewDidLoad() {
ionViewDidEnter() {
const date = new Date().toLocaleDateString();
this.getDuty(date);
......@@ -103,8 +103,6 @@ export class DutyPage {
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/app/getMySchedule',data)
.subscribe((res)=>{
this.nowDuty = res.json();
console.log(this.nowDuty);
});
const data1 = {
type:1
......@@ -118,7 +116,7 @@ export class DutyPage {
//提交申请
dutyApply(item){
this.navCtrl.push('DutyApplyPage',{
date:item.dutyDate
id:item.id
})
}
......
......@@ -2,10 +2,10 @@
<ion-navbar>
<ion-title>我的活动</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="bgc-e7e8ed">
<div class="pageMenuSlides">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" *ngFor="let item of menus;let i=index;" tappable (click)="selectPageMenu(i)">
<div *ngFor="let item of menus;let i=index;" tappable (click)="selectPageMenu(i)">
<span class=" {{swiperIndex == i? 'swiper-title':''}} ">{{item}}</span>
<span *ngIf="i == 1" class="menu-index" >
{{waitgoOrderCount}}
......@@ -15,13 +15,7 @@
</span>
</div>
</div>
</div>
</div>
</ion-header>
<ion-content class="bgc-e7e8ed">
<ng-container *ngIf="swiperIndex == 0">
<ion-content direction="y" scrollbar-y="true" class="bgc-e7e8ed">
<ion-list>
<ion-item *ngFor="let item of allOrder" class="margin-top-10">
<div class="item" (click)="goConfirmActivity(item)">
......@@ -78,10 +72,8 @@
</div>
</ion-item>
</ion-list>
</ion-content>
</ng-container>
<ng-container *ngIf="swiperIndex == 1">
<ion-content direction="y" scrollbar-y="true" class="bgc-e7e8ed">
<ion-list>
<ion-item class="margin-top-10" *ngFor="let item of waitGoOrder">
<div class="item" (click)="goConfirmActivity(item)">
......@@ -131,10 +123,8 @@
</div>
</ion-item>
</ion-list>
</ion-content>
</ng-container>
<ng-container *ngIf="swiperIndex == 2">
<ion-content direction="y" scrollbar-y="true" class="bgc-e7e8ed">
<ion-list>
<ion-item class="margin-top-10" *ngFor="let item of waitSureOrder">
<div class="item" (click)="goConfirmActivity(item)">
......@@ -181,12 +171,7 @@
</div>
</ion-item>
</ion-list>
</ion-content>
</ng-container>
</ion-content>
<div class="cover" *ngIf="isCover">
......
......@@ -13,6 +13,15 @@ page-myActivityList {
}
.pageMenuSlides{
display: flex;
flex-direction: row;
background-color: #fff;
padding: 10px 0;
div{
flex: 1;
text-align: center;
position: relative;
}
//设置菜单栏底部的颜色
border-bottom:1px solid rgb(255, 255, 255);
.swiper-container{
......@@ -35,14 +44,14 @@ page-myActivityList {
.menu-index{
position: absolute;
top: 6px;
top: -2px;
padding: 0px 4px;
border-radius: 10px;
background-color: #f36c35;
font-size: .5rem;
color: white;
margin-left: 5px;
right: 20%;
right: 21%;
text-align: center;
line-height: 1.4rem;
}
......
......@@ -64,7 +64,7 @@ export class MyActivityListPage {
}
//当页面加载的时候触发,只触发一次,当有缓存的的时候,打开页面时不在加载
ionViewDidLoad() {
this.initSwiper();
// this.initSwiper();
}
//初始化swiper
initSwiper() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment