Commit aa2a262b authored by wangqinghua's avatar wangqinghua

签到

parent e8f4e54d
...@@ -42,7 +42,7 @@ export class OutGoingReportPage { ...@@ -42,7 +42,7 @@ export class OutGoingReportPage {
//报备 //报备
goReport(item) { goReport(item) {
console.log(item);
this.storage.remove("temp_userpre"); this.storage.remove("temp_userpre");
this.storage.remove("managerId"); this.storage.remove("managerId");
this.storage.remove("city"); this.storage.remove("city");
......
...@@ -37,14 +37,16 @@ export class OutGoingReportEditPage { ...@@ -37,14 +37,16 @@ export class OutGoingReportEditPage {
leaveTime: "", //离沪时间 leaveTime: "", //离沪时间
backTime: "", //回沪时间 backTime: "", //回沪时间
userpreDesc: "", //离沪说明 userpreDesc: "", //离沪说明
outaddressids: "" //个人报备选择的地点地址:保存id值 outaddressids: "", //个人报备选择的地点地址:保存id值
userId:'', //协助报备
} userName:''
};
//报备截至日期 //报备截至日期
temp_endTime; temp_endTime;
//临时离沪信息 //临时离沪信息
temp_userpre = {} temp_userpre = {}
person; //协助报备人
//离沪时间差 //离沪时间差
dategap: any; dategap: any;
//离沪地点显示 //离沪地点显示
...@@ -114,6 +116,12 @@ export class OutGoingReportEditPage { ...@@ -114,6 +116,12 @@ export class OutGoingReportEditPage {
} }
} }
}); });
this.storage.get("person").then((value)=>{
if (value != null && value != ''){
this.person = value;
console.log(this.person);
}
})
//此操作只从报备列表页面到此页面,仅执行一次(不然每次都初始化了) //此操作只从报备列表页面到此页面,仅执行一次(不然每次都初始化了)
this.storage.remove("premanager"); this.storage.remove("premanager");
this.gettemp_userprePre(); this.gettemp_userprePre();
...@@ -200,7 +208,6 @@ export class OutGoingReportEditPage { ...@@ -200,7 +208,6 @@ export class OutGoingReportEditPage {
//提交报备 //提交报备
savePremanager() { savePremanager() {
if (this.userpre.isorFromsh == 1) { if (this.userpre.isorFromsh == 1) {
//判断离沪地点是否选择 //判断离沪地点是否选择
if (this.userpre.outaddressids == null || this.userpre.outaddressids == '') { if (this.userpre.outaddressids == null || this.userpre.outaddressids == '') {
...@@ -215,6 +222,9 @@ export class OutGoingReportEditPage { ...@@ -215,6 +222,9 @@ export class OutGoingReportEditPage {
} }
} }
this.userpre.userId = this.person.id;
this.userpre.userName = this.person.name;
//判断报备截止日期 //判断报备截止日期
let signflag = Date.parse(this.temp_endTime.toString()) > Date.parse(new Date().toString()); let signflag = Date.parse(this.temp_endTime.toString()) > Date.parse(new Date().toString());
...@@ -228,13 +238,19 @@ export class OutGoingReportEditPage { ...@@ -228,13 +238,19 @@ export class OutGoingReportEditPage {
let resultback = res.json(); let resultback = res.json();
if (resultback.code == '200') { if (resultback.code == '200') {
if( this.person ){
const index = this.navCtrl.getActive().index;
this.navCtrl.remove(3, index);
this.navCtrl.pop();
}else{
const index = this.navCtrl.getActive().index; const index = this.navCtrl.getActive().index;
this.navCtrl.remove(0, index); this.navCtrl.remove(0, index);
this.navCtrl.setRoot(MinePage); this.navCtrl.setRoot(MinePage);
this.navCtrl.parent.select(3); this.navCtrl.parent.select(3);
this.navCtrl.push("MyReportPage"); this.navCtrl.push("MyReportPage");
}
this.storage.remove("premanager"); this.storage.remove("premanager");
this.storage.remove("person");
this.storage.remove("temp_userpre"); this.storage.remove("temp_userpre");
this.storage.remove("managerId"); this.storage.remove("managerId");
this.storage.remove("city"); this.storage.remove("city");
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<button ion-button round class="btn color2" *ngIf="type == 2">离沪</button> <button ion-button round class="btn color2" *ngIf="type == 2">离沪</button>
<button ion-button round class="btn color3" *ngIf="type == 3">不离沪</button> <button ion-button round class="btn color3" *ngIf="type == 3">不离沪</button>
</p> </p>
<p style="color:#24bafc;margin-top: 6px">协助报备</p> <p *ngIf="type == 1" (click)="goReport(item)" style="color:#24bafc;margin-top: 6px">协助报备</p>
</div> </div>
</div> </div>
......
...@@ -2,7 +2,7 @@ import { Component } from '@angular/core'; ...@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController, ToastController } from 'ionic-angular'; import { IonicPage, NavController, NavParams, AlertController, ToastController } from 'ionic-angular';
import { Http, Response} from '@angular/http'; import { Http, Response} from '@angular/http';
import { Storage } from '@ionic/storage';
import { AppService } from '../../../service/appHttpService'; import { AppService } from '../../../service/appHttpService';
@IonicPage() @IonicPage()
...@@ -18,18 +18,29 @@ export class ReportDetailPage { ...@@ -18,18 +18,29 @@ export class ReportDetailPage {
itemsOfNotLeave: object[] = []; itemsOfNotLeave: object[] = [];
title: string; title: string;
type: number; type: number;
id;
premanager; //报备信息
constructor(public navCtrl: NavController, constructor(public navCtrl: NavController,
public navParams: NavParams, public navParams: NavParams,
public alertCtrl: AlertController, public alertCtrl: AlertController,
public http: Http, public http: Http,public storage: Storage,
public appService: AppService, public toast: ToastController) { public appService: AppService, public toast: ToastController) {
}
ionViewDidLoad(){
this.premanager = this.navParams.get('item');
this.title = this.navParams.get("title"); this.title = this.navParams.get("title");
let id = this.navParams.get("id"); this.id = this.navParams.get("id");
this.getUserAboutLeave(id);
this.getUserAboutNotLeave(id); }
this.getUserAboutNotReport(id);
ionViewDidEnter(){
this.getUserAboutLeave(this.id);
this.getUserAboutNotLeave(this.id);
this.getUserAboutNotReport(this.id);
} }
//获取处室下所有未报备人员 //获取处室下所有未报备人员
...@@ -87,4 +98,18 @@ export class ReportDetailPage { ...@@ -87,4 +98,18 @@ export class ReportDetailPage {
} }
} }
//协助报备
goReport(item) {
this.storage.remove("temp_userpre");
this.storage.remove("managerId");
this.storage.remove("city");
this.storage.remove("cityList");
this.storage.remove("person");
this.storage.set('premanager', this.premanager);
this.storage.set('person', item);
this.navCtrl.push('OutGoingReportEditPage', { premanager: this.premanager });
}
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</ion-header> </ion-header>
<ion-content class="bgc-e7e8ed"> <ion-content class="bgc-e7e8ed">
<ion-list> <ion-list>
<ion-item *ngFor="let item of all" (click)="goDetail(item.id,item.title)"> <ion-item *ngFor="let item of all" (click)="goDetail(item)">
<div class="item"> <div class="item">
<div class="item-header"> <div class="item-header">
<div class="item-header-box"> <div class="item-header-box">
......
...@@ -35,10 +35,11 @@ export class ReportTrackPage { ...@@ -35,10 +35,11 @@ export class ReportTrackPage {
} }
goDetail(id,title) { goDetail(item) {
this.navCtrl.push("ReportDetailPage",{ this.navCtrl.push("ReportDetailPage",{
id:id, id:item.id,
title:title title:item.title,
item:item
}); });
} }
......
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