Commit cad007b2 authored by wangqinghua's avatar wangqinghua

color

parent fb4f5d82
...@@ -25,6 +25,7 @@ import {PersonPage} from "../pages/surveyManage/modal/person/person"; ...@@ -25,6 +25,7 @@ import {PersonPage} from "../pages/surveyManage/modal/person/person";
import {PersonListPage} from "../pages/contact/person-list/person-list"; import {PersonListPage} from "../pages/contact/person-list/person-list";
import {BlockModalPage} from "../pages/activity-track/block-modal/block-modal"; import {BlockModalPage} from "../pages/activity-track/block-modal/block-modal";
import { QuestionDetailPage } from "../pages/mine/mySurvey/question-detail/question-detail"; import { QuestionDetailPage } from "../pages/mine/mySurvey/question-detail/question-detail";
import {DatePipe} from "@angular/common";
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -76,6 +77,7 @@ import { QuestionDetailPage } from "../pages/mine/mySurvey/question-detail/quest ...@@ -76,6 +77,7 @@ import { QuestionDetailPage } from "../pages/mine/mySurvey/question-detail/quest
Badge, Badge,
Geolocation, Geolocation,
ActivityStatisticService, ActivityStatisticService,
DatePipe,
{provide: ErrorHandler, useClass: IonicErrorHandler} {provide: ErrorHandler, useClass: IonicErrorHandler}
] ]
}) })
......
...@@ -28,7 +28,7 @@ p{ ...@@ -28,7 +28,7 @@ p{
color:#fff; color:#fff;
} }
.bgc-e7e8ed{ .bgc-e7e8ed{
background-color: #e7e8ed; background-color: #ebedf2;
} }
.bgc-fff{ .bgc-fff{
background-color: #fff; background-color: #fff;
......
...@@ -8,7 +8,18 @@ ...@@ -8,7 +8,18 @@
</ion-header> </ion-header>
<ion-content padding> <ion-content class="bgc-e7e8ed">
<div class="detail-item">
<p class="detail-title1">申请信息</p>
<p>申请人: {{this.applyDetail?.personName}}</p>
<p>值班日期:{{this.applyDetail?.createTime | date:'yyyy-MM-dd'}}</p>
<p>换班原因:{{this.applyDetail?.reason}}</p>
</div>
<div class="detail-item">
<p class="detail-title2">换班信息</p>
<p>换班对象:{{this.item?.name}}</p>
<p>值班日期:{{this.applyDetail?.createTime | date:'yyyy-MM-dd'}}</p>
</div>
<button *ngIf="applyType == 'replace'" class="submit-btn submit" (click)="replace()">确认替班</button> <button *ngIf="applyType == 'replace'" class="submit-btn submit" (click)="replace()">确认替班</button>
<button *ngIf="applyType == 'change'" class="submit-btn submit" (click)="change()">确认换班</button> <button *ngIf="applyType == 'change'" class="submit-btn submit" (click)="change()">确认换班</button>
</ion-content> </ion-content>
page-change-apply-sure { page-change-apply-sure {
.submit{
margin-top: 20px;
border: 1px solid #34b4fc;
background-color: #34b4fc;
}
.detail-item{
background-color: #fff;
margin: 10px;
border-radius: 4px;
padding-bottom: 10px;
p:not(:first-child){
margin:20px 10px;
}
.detail-title1{
background-color: #4990b5;
color: #fff;
padding: 10px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.detail-title2{
background-color: #408de7;
color: #fff;
padding: 10px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
}
} }
...@@ -10,19 +10,24 @@ import {AppService} from "../../../service/appHttpService"; ...@@ -10,19 +10,24 @@ import {AppService} from "../../../service/appHttpService";
}) })
export class ChangeApplySurePage { export class ChangeApplySurePage {
item; //替班人信息
applyDetail; //申请信息
applyType; //申请类型 applyType; //申请类型
changeId; // 换班Id changeId; // 换班Id
personId; //替班人id personId; //替班人id
nowId; //申请id nowId; //申请id
applyId;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) { public appService: AppService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.item = this.navParams.get('item');
this.applyId = this.navParams.get('applyId');
this.personId = this.navParams.get('personId'); this.personId = this.navParams.get('personId');
this.nowId = this.navParams.get('nowId'); this.nowId = this.navParams.get('nowId');
this.changeId = this.navParams.get('changeId'); this.changeId = this.navParams.get('changeId');
console.log('applyId:' + this.applyId);
console.log('personId:' + this.personId); console.log('personId:' + this.personId);
console.log('nowId:' + this.nowId); console.log('nowId:' + this.nowId);
console.log('changeId:' + this.changeId); console.log('changeId:' + this.changeId);
...@@ -32,6 +37,11 @@ export class ChangeApplySurePage { ...@@ -32,6 +37,11 @@ export class ChangeApplySurePage {
this.applyType = 'change'; //替班 this.applyType = 'change'; //替班
} }
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/apply',{'id': this.applyId})
.subscribe((res)=>{
this.applyDetail = res.json();
})
} }
//替班 //替班
......
...@@ -47,17 +47,20 @@ export class DutyApplyHandlePage { ...@@ -47,17 +47,20 @@ export class DutyApplyHandlePage {
} }
case '2':{ //替班 case '2':{ //替班
this.navCtrl.push('SelectRelayPersonPage',{ this.navCtrl.push('SelectRelayPersonPage',{
id:this.applyDetail.scheduleId applyId:this.applyDetail.id,
scheduleId:this.applyDetail.scheduleId,
date:this.personDetail.dutyDate
}); });
break; break;
} }
case '3':{ case '3':{
const data= { const data= {
applyId: this.applyDetail.id applyId: this.applyDetail.id
} };
this.appService.ObserverHttpGet('/changeApply/app/ignore',data) this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/ignore',data)
.subscribe((res)=>{ .subscribe((res)=>{
this.appService.popToastView('已忽略','middle',2000);
this.navCtrl.pop();
}) })
break; break;
} }
......
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
</ion-header> </ion-header>
<ion-content class="bgc-e7e8ed"> <ion-content class="bgc-e7e8ed">
<!--<p class="padding-10-20 bgc-fff">已忽略</p>-->
<!--<p>已安排替班</p>-->
<!--<p>已安排换班</p>-->
<ng-container *ngFor="let item of httpDetail;"> <ng-container *ngFor="let item of httpDetail;">
<div class="detail-item"> <div class="detail-item">
<p class="detail-title1">申请信息</p> <p class="detail-title1">申请信息</p>
......
...@@ -3,25 +3,29 @@ ...@@ -3,25 +3,29 @@
<ion-navbar> <ion-navbar>
<ion-title>选择替班人员</ion-title> <ion-title>选择替班人员</ion-title>
</ion-navbar> </ion-navbar>
<div class="duty">
<div class="dutyItem" (click)="change(0)">
<span class="{{changeType == 0?'duty-title':''}}"></span>
</div>
<div class="dutyItem" (click)="change(1)">
<span class="{{changeType == 1?'duty-title':''}}"></span>
</div>
</div>
</ion-header> </ion-header>
<ion-content padding> <ion-content>
<!--<ion-searchbar (ionInput)="getList($event)" [(ngModel)]="name" placeholder="搜索替班人员"></ion-searchbar>-->
<ion-list> <ion-list>
<ion-item-sliding>
<ion-item *ngFor="let item of list"> <ion-item *ngFor="let item of list">
<div (click)="selectPerson(item)"> <div class="contact-box" (click)="selectPerson(item)">
<span>{{item.name}}</span> <img src="./assets/imgs/head.png" class="contact-img" >
<span>{{item.orgName}}</span> <div class="contact-box-right">
<span>{{item.phoneNumber}}</span> <div>
<span class="contact-name">{{item.name}}</span>
<span class="contact-handphone">{{item.phoneNumber}}</span>
</div>
<div class="contact-organization">{{item?.orgName}}</div>
</div> </div>
</div>
</ion-item> </ion-item>
</ion-item-sliding>
</ion-list> </ion-list>
</ion-content> </ion-content>
page-select-relay-person { page-select-relay-person {
.duty{ .searchToolBar{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: left;
} box-sizing: border-box;
.duty div{ }
width: 50%; .list-ios .item-block .item-inner {
text-align: center; border-bottom: 1px solid #c8c7cc;
position: relative; }
} .search{
.duty-title{ float: right;
position: relative; color: #72a4fe;
color: #24bafc; font-size: 24px;
} margin-right: 10px;
.duty-title::after{ }
content: '';
position: absolute; .contact-box{
width: 100%; // height: 100%;
height: 2px; display: flex;
background-color: #24bafc; flex-direction: row;
bottom: -8px; align-items: center;
left: 0px; justify-content: left;
box-sizing: border-box;
}
.contact-box-right{
margin-left: 10px;
}
.contact-img{
width: 3rem;
height: 3rem;
}
.contact-name{
font-size: 16px;
font-weight: bold;
}
.contact-sex{
font-size: 16px;
font-weight: bold;
}
.male{
color: #72a4fe;
}
.female{
color: #f09ae5;
}
.contact-organization{
color: #d0d0d0;
font-size: 12px;
}
.contact-telphone{
color: #999;
font-size: 1.4rem;
}
.contact-handphone{
color: #666666;
font-size: 1.5rem;
margin-left: 7px;
}
.back-btn{
width: 30px;
height: 30px;
} }
} }
...@@ -2,13 +2,8 @@ import { Component } from '@angular/core'; ...@@ -2,13 +2,8 @@ import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {AppService} from "../../../service/appHttpService"; import {AppService} from "../../../service/appHttpService";
import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure"; import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure";
import { Storage } from "@ionic/storage";
/** import { DatePipe } from "@angular/common";
* Generated class for the SelectRelayPersonPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -17,23 +12,27 @@ import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure"; ...@@ -17,23 +12,27 @@ import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure";
}) })
export class SelectRelayPersonPage { export class SelectRelayPersonPage {
id; gender; //性别 1 男 0女
scheduleId;
date;
list; list;
changeType = 0;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) { public appService: AppService,public storage: Storage,private datepipe: DatePipe) {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.id = this.navParams.get('id'); this.scheduleId = this.navParams.get('scheduleId');
console.log('nowId:'+this.id); this.date = this.datepipe.transform( this.navParams.get('date'),'yyyy/MM/dd');
this.storage.get("user").then((res)=>{
this.gender = res.userDetail.user.gender;
this.getPerson(); this.getPerson();
});
} }
getPerson(){ getPerson(){
const data = { const data = {
date:'2018/10/01', date:this.date,
gender:this.changeType, gender:this.gender,
id:'' id:''
}; };
this.appService.ObserverHttpGetOption('/wisdomgroup/dutyPerson/getPersonListOutOfMine',data) this.appService.ObserverHttpGetOption('/wisdomgroup/dutyPerson/getPersonListOutOfMine',data)
...@@ -45,13 +44,15 @@ export class SelectRelayPersonPage { ...@@ -45,13 +44,15 @@ export class SelectRelayPersonPage {
//替班 //替班
selectPerson(item){ selectPerson(item){
this.navCtrl.push('ChangeApplySurePage',{ this.navCtrl.push('ChangeApplySurePage',{
'item':item,
'applyId':this.navParams.get('applyId'),
'personId':item.id, 'personId':item.id,
'nowId':this.id 'nowId':this.scheduleId
}) })
} }
change(type){ change(type){
this.changeType = type; // this.changeType = type;
this.getPerson(); this.getPerson();
} }
......
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