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
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {AppService} from "../../../../service/http.service";
@IonicPage()
@Component({
selector: 'page-duty-apply',
templateUrl: 'duty-apply.html',
})
export class DutyApplyPage {
id;
date;
reason = '';
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.id = this.navParams.get('id');
this.date = this.navParams.get('date');
}
submit(){
const data = {
scheduleId:this.id,
reason:this.reason
};
this.appService.alert('确定提交该申请?',res=>{
this.appService.ObserverHttpPost('/wisdomgroup/changeApply/app/apply',data)
.subscribe((res )=>{
this.appService.popToastView('提交该申请成功!','middle',1000);
this.navCtrl.pop();
})
});
}
}