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
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../../service/http.service";
@IonicPage()
@Component({
selector: 'page-duty-detail',
templateUrl: 'duty-detail.html',
})
export class DutyDetailPage {
time;
dutyDetail = {
reason: '',
id: ''
};
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
const id = this.navParams.get('id');
this.time = this.navParams.get('time');
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/apply', {'id': id})
.subscribe((res) => {
this.dutyDetail = res.json();
})
}
submitOrder() {
const id = this.dutyDetail.id;
this.appService.alert('确定撤销该申请?', (res) => {
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/deleteApply', {'id': id})
.subscribe((res) => {
this.appService.popToastView('撤销申请成功!','middle',1500);
this.navCtrl.pop();
})
});
}
}