Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {SelectChangePersonPage} from "../select-change-person/select-change-person";
import {SelectRelayPersonPage} from "../select-relay-person/select-relay-person";
import {AppService} from "../../../../service/http.service";
@IonicPage()
@Component({
selector: 'page-duty-apply-handle',
templateUrl: 'duty-apply-handle.html',
})
export class DutyApplyHandlePage {
applyDetail = {
id:'',
scheduleId:'',
reason:''
};
personDetail = {
id:'',
name:'',
phoneNumber:'',
dutyDate:''
};
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.personDetail = this.navParams.get('item');
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/apply',{'id': this.personDetail.id})
.subscribe((res)=>{
this.applyDetail = res.json();
})
}
submit(type){
switch (type){
case '1':{ //换班
this.navCtrl.push('SelectChangePersonPage',{
scheduleId:this.applyDetail.scheduleId,
applyId:this.applyDetail.id,
date:this.personDetail.dutyDate
});
break;
}
case '2':{ //替班
this.navCtrl.push('SelectRelayPersonPage',{
applyId:this.applyDetail.id,
scheduleId:this.applyDetail.scheduleId,
date:this.personDetail.dutyDate
});
break;
}
case '3':{
const data= {
applyId: this.applyDetail.id
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/ignore',data)
.subscribe((res)=>{
this.appService.popToastView('已忽略','middle',2000);
this.navCtrl.pop();
});
break;
}
}
}
}