Newer
Older
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
import {SelectChangePersonPage} from "../select-change-person/select-change-person";
import {SelectRelayPersonPage} from "../select-relay-person/select-relay-person";
@IonicPage()
@Component({
selector: 'page-duty-apply-handle',
templateUrl: 'duty-apply-handle.html',
})
export class DutyApplyHandlePage {
reason:''
};
personDetail = {
id:'',
name:'',
phoneNumber:'',
dutyDate:''
};
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
this.personDetail = this.navParams.get('item');
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/apply',{'id': this.personDetail.id})
.subscribe((res)=>{
this.applyDetail = res.json();
})
console.log(this.applyDetail);
switch (type){
case '1':{ //换班
this.navCtrl.push('SelectChangePersonPage',{
nowId:this.applyDetail.scheduleId,
date:this.personDetail.dutyDate
applyId:this.applyDetail.id,
scheduleId:this.applyDetail.scheduleId,
date:this.personDetail.dutyDate
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/ignore',data)
this.appService.popToastView('已忽略','middle',2000);
this.navCtrl.pop();