Commit 2041eb8c authored by wangqinghua's avatar wangqinghua

删除 网络错误

parent ad9e8103
......@@ -166,6 +166,7 @@ ionic cordova plugin add cordova-plugin-badge
"proxyUrl": "http://180.168.156.212:2931/wisdomgroup"
"proxyUrl": "http://10.10.200.11:8080/wisdomgroup"
http://10.10.200.105:8080
如果build android 报错了请在platforms/build.gradle里面的最后添加如下代码:
configurations.all {
......
......@@ -50,7 +50,6 @@ export class ActivitySearchPage {
this.appService.popToastView('已保存该用户不参加','middle',1500);
this.searchUser();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -27,7 +27,6 @@ export class ActivityTrackPage {
let resultback = res.json();
this.activityList = resultback
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -4,7 +4,7 @@
<ion-navbar>
<ion-title>选择批次</ion-title>
<ion-buttons start>
<button ion-button (click)="dismiss()">
<button ion-button (click)="cancel()">
<span ion-text class="color-fff" >取消</span>
</button>
</ion-buttons>
......@@ -18,10 +18,18 @@
<ion-content padding>
<ion-list radio-group [(ngModel)]="block" >
<p>
<ng-container *ngIf="blockList.length > 0">
(最多可报
<span *ngIf="applyCount == 0 || !applyCount">{{ blockList.length}}</span>
<span *ngIf="applyCount != 0">{{applyCount}}</span>
个批次)
</ng-container>
</p>
<ion-list >
<ion-item *ngFor="let item of blockList;let i = index;" >
<ion-label>{{item.batchName}}</ion-label>
<ion-radio checked="false" value="{{i}}"></ion-radio>
<ion-checkbox [(ngModel)]="item.check" ></ion-checkbox>
</ion-item>
</ion-list>
</ion-content>
page-block-modal {
.item-ios,
.list-ios > .item-block:last-child, .list-ios > .item-wrapper:last-child .item-block{
border-top: 1px solid #dadada;
}
.list-ios .item-block .item-inner{
border: none;
}
}
import { Component } from '@angular/core';
import { NavController, NavParams, ViewController} from 'ionic-angular';
import {Component} from '@angular/core';
import {NavController, NavParams, ViewController} from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
@Component({
selector: 'page-block-modal',
......@@ -7,19 +8,42 @@ import { NavController, NavParams, ViewController} from 'ionic-angular';
})
export class BlockModalPage {
blockList;
blockList = [];
block;
applyCount;
constructor(public navCtrl: NavController, public navParams: NavParams,
public viewCtrl: ViewController) {
public viewCtrl: ViewController,public appService:AppService) {
}
ionViewDidLoad() {
this.blockList = this.navParams.get('blockList');
console.log(this.blockList);
this.applyCount = this.navParams.get('applyCount');
this.blockList.forEach(res=>{
res.check = false;
})
}
dismiss() {
this.viewCtrl.dismiss(this.blockList[this.block]);
let selectBatch = [];
console.log(selectBatch.length);
this.blockList.forEach(res=>{
if(res.check == true){
selectBatch.push(res);
}
});
if(this.applyCount > 0){
if(selectBatch.length > this.applyCount){
this.appService.popToastView('超过报名批次','middle',1500);
return false;
}
}
this.viewCtrl.dismiss(selectBatch);
}
cancel(){
this.viewCtrl.dismiss();
}
}
......@@ -84,7 +84,6 @@ export class JoinDetailPage {
this.getList();
this.allPerson = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -102,22 +101,6 @@ export class JoinDetailPage {
});
}
//未报名
noSign() {
// this.type = '2';
this.items = [];
this.isNoSignFlag = false;
this.appService.ObserverHttpPost("/wisdomgroup/modules/activity/notSignActivityList", {activityid: this.acitivityid})
.subscribe((res: Response) => {
let resultback = res.json();
// this.items = resultback;
this.notSign = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//已报名
sign() {
// this.type = '3';
......@@ -128,25 +111,6 @@ export class JoinDetailPage {
let resultback = res.json();
this.signList = resultback;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//不参加
notJoin() {
this.isNoSignFlag = true;
// this.type = '4';
this.notJoinService();
}
notJoinService() {
this.appService.ObserverHttpGetAdd("/wisdomgroup/modules/activityNon/", this.acitivityid)
.subscribe((res: Response) => {
// this.items = res.json().data;
this.noJoin = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -176,14 +140,24 @@ export class JoinDetailPage {
msg.present();
this.signAllService();
}, error => {
this.appService.alert('网络异常!');
}
);
}
//取消报名
cancelSignUp(item){
this.appService.alert('确定取消该活动报名',(res)=>{
const data = {
'userid':item.id,
'id':''
}
this.appService.ObserverHttpGet("/wisdomgroup/modules/order/deleteOrder", data).
subscribe((res)=>{
this.appService.popToastView('取消报名成功!','middle',1500);
this.sign();
this.signAllService();
})
})
}
search() {
......
......@@ -16,6 +16,11 @@
<ion-label>报名用户</ion-label>
<span class="lettr-space-1" item-right>{{personInfo?.name}}</span>
</ion-item>
<div>
<span>
</span>
</div>
<ion-item class="margin-top-10">
<span>携带人数</span>
<span class="com" float-right>
......
......@@ -19,6 +19,7 @@ export class ReplaceApplyPage {
activity; //活动信息
batchList; //批次列表
item; //批次信息
selectBatchList; //选择的批次列表
itemName = '请选择批次';
//报名信息
......@@ -54,7 +55,6 @@ export class ReplaceApplyPage {
this.activity = res.json();
this.batchList = this.activity.batchList;
}, (error) => {
this.appService.alert('网络异常!');
}
);
}
......@@ -80,11 +80,18 @@ export class ReplaceApplyPage {
//选择批次
selectblock() {
let modal = this.modalCtrl.create(BlockModalPage, {blockList: this.batchList});
let modal = this.modalCtrl.create(BlockModalPage, {blockList: this.batchList,applyCount:this.activity.applyCount});
modal.onDidDismiss(res => {
let minPerNumber = 5;
if (res) {
this.item = res;
this.itemName = res.batchName;
this.selectBatchList = res;
this.selectBatchList.forEach((data)=>{
if(minPerNumber > data.batchPerNumber){
minPerNumber = data.batchPerNumber;
this.item = data;
}
});
this.itemName = '已选择';
}
});
modal.present();
......@@ -135,7 +142,6 @@ export class ReplaceApplyPage {
.subscribe((res: Response) => {
this.navCtrl.pop();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController, ToastController, Events } from 'ionic-angular';
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams, AlertController, ToastController, Events} from 'ionic-angular';
import { MyActivityListPage } from '../../mine/myActivityList/myActivityList';
import { Http, Response } from '@angular/http';
import { Storage } from '@ionic/storage';
import { AppService, AppGlobal } from '../../../service/appHttpService';
import {MyActivityListPage} from '../../mine/myActivityList/myActivityList';
import {Http, Response} from '@angular/http';
import {Storage} from '@ionic/storage';
import {AppService, AppGlobal} from '../../../service/appHttpService';
import {ActivityConfirmPage} from "../activityConfirm/activityConfirm";
import {MinePage} from "../../tabs/mine/mine";
import {ActivityDetailPage} from "../activityDetail/activityDetail";
......@@ -17,27 +17,27 @@ import {ActivityDetailPage} from "../activityDetail/activityDetail";
export class ActivityApplyPage {
picture: string;
isLoad:boolean = false;
isLoad: boolean = false;
//batches: object[]; //所有批次信息
batches: Array<String>[];
activity = {
activityName:'',
batchList:[],
id:'',
applyCount:null //批次数量限制
activityName: '',
batchList: [],
id: '',
applyCount: null //批次数量限制
}; //活动信息
item = {
batchName:'',
batchPerNumber:null,
activityId:'',
id:'',
batchLimitNumber:null,
hasSignUpCount:null
batchName: '',
batchPerNumber: null,
activityId: '',
id: '',
batchLimitNumber: null,
hasSignUpCount: null
};
role = {
loginName:''
loginName: ''
}; //角色信息
onebatch:Array<String>;
onebatch: Array<String>;
onebatchSurplusQuota: number; //某批次剩余报名名额
//报名订单
......@@ -47,7 +47,7 @@ export class ActivityApplyPage {
Orderbz: '', //报名备注
Activityid: '', //关联活动id
Batchid: '', //关联批次id
orderbz_end:''
batchlist:''
};
//页面报名保存展示
isCover: boolean = false;
......@@ -67,13 +67,13 @@ export class ActivityApplyPage {
pageflag: boolean = false;
constructor(public navCtrl: NavController,
public navParams: NavParams,public storage: Storage,
public navParams: NavParams, public storage: Storage,
public alertCtrl: AlertController,
public http: Http,
public appService: AppService,
public toast: ToastController,
// public keyboard: Keyboard,
public event: Events, ) {
public event: Events,) {
}
......@@ -98,7 +98,6 @@ export class ActivityApplyPage {
}
//切换批次其对应活动说明也发生改变
showBatchDetails(onebatchDetail) {
console.log(onebatchDetail.batchSetAddress);
......@@ -112,8 +111,8 @@ export class ActivityApplyPage {
//携带人数 数字加减
add() {
console.log("1:"+this.order.Personnumber);
if(this.order.Personnumber < this.item.batchPerNumber){
console.log("1:" + this.order.Personnumber);
if (this.order.Personnumber < this.item.batchPerNumber) {
this.order.Personnumber++;
}
}
......@@ -123,16 +122,18 @@ export class ActivityApplyPage {
this.order.Personnumber--;
}
}
//具体介绍
hidden() {
this.isCover = false;
}
show() {
this.isCover = true;
}
condirmAlert(){
this.appService.alert('确定提交该活动订单?',(res)=>{
condirmAlert() {
this.appService.alert('确定提交该活动订单?', (res) => {
this.confirmOrder();
})
}
......@@ -147,27 +148,27 @@ export class ActivityApplyPage {
**/
let leaveNum = this.item.batchLimitNumber - this.item.hasSignUpCount;
let applyNum = 0;
this.activity.batchList.forEach((res)=>{
if(res.order){
this.activity.batchList.forEach((res) => {
if (res.order) {
console.log(res.order);
applyNum ++;
applyNum++;
}
});
//报名次数 applyCount 1,2,3,4,5,0-> 不限
if(this.activity.applyCount > 0){
if(applyNum >= this.activity.applyCount){
this.appService.popToastView("提交失败,报名批次达到上限",'middle',1000);
if (this.activity.applyCount > 0) {
if (applyNum >= this.activity.applyCount) {
this.appService.popToastView("提交失败,报名批次达到上限", 'middle', 1000);
return;
}else if (Number(this.order.Personnumber +1) > Number(leaveNum)) {
this.appService.popToastView("报名人数超过了该批次的剩余人数",'middle',1000);
} else if (Number(this.order.Personnumber + 1) > Number(leaveNum)) {
this.appService.popToastView("报名人数超过了该批次的剩余人数", 'middle', 1000);
return;
}else{
} else {
this.submitOrder();
}
} else { //报名(新增)
this.submitOrder();
}
}
}
//报名操作
commitSignUpOrder() {
......@@ -186,38 +187,26 @@ export class ActivityApplyPage {
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
doRefresh(refresher) {
setTimeout(() => {
this.ionViewDidEnter();
console.log('Async operation has ended');
refresher.complete();
}, 2000);
}
submitOrder(){
// return false;
submitOrder() {
this.order.Batchid = this.item.id;
this.order.Activityid = this.item.activityId;
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/create", this.order)
this.order.batchlist = this.item.id + ',';
console.log(this.order);
this.appService.ObserverHttpPostOption("/wisdomgroup/modules/order/create", this.order)
.subscribe((res: Response) => {
if (true) {
this.isSuccess = true;
//清空 插入
this.navCtrl.push("ActivityDetailPage",{id:this.item.activityId});
this.navCtrl.push("ActivityDetailPage", {id: this.item.activityId});
} else {
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -162,7 +162,6 @@ export class ActivityConfirmPage {
//失败
}
}, error => {
this.appService.alert('网络异常!');
}
);
......@@ -220,7 +219,6 @@ export class ActivityConfirmPage {
//失败
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -26,6 +26,7 @@ export class ActivityDetailPage {
isCover: boolean = false;
//活动详情显示
introduce: string;
hasOrder = false;
constructor(public navCtrl: NavController,
......@@ -60,10 +61,11 @@ export class ActivityDetailPage {
} else { //
this.batchList[i].signUp = true;
}
console.log(this.batchList);
if( this.batchList[i].order ){
this.hasOrder = true;
}
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -97,6 +99,12 @@ export class ActivityDetailPage {
//不参加
sayNo() {
if(this.hasOrder){
this.appService.popToastView('您已报名,请先取消报名再点击','middle',1500);
return false;
}
const confirm = this.alertCtrl.create({
title: '确定不参加该活动?',
buttons: [
......@@ -113,7 +121,6 @@ export class ActivityDetailPage {
.subscribe((res: Response) => {
this.navCtrl.pop();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -141,7 +148,6 @@ export class ActivityDetailPage {
.subscribe((res: Response) => {
this.navCtrl.pop();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -43,7 +43,6 @@ export class ActivityListPage {
console.log("activityListData------->",data);
this.items =data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -84,7 +83,6 @@ export class ActivityListPage {
.subscribe((res: Response) => {
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -80,7 +80,7 @@ page-batch-detail {
.content-button{
position: fixed;
bottom: 0;
bottom: 6px;
left: 0;
display: flex;
align-items: center;
......
......@@ -89,6 +89,7 @@ export class BatchDetailPage {
}
//立即报名
goApply(){
console.log(this.activity);
this.navCtrl.push('ActivityApplyPage',{
......@@ -111,19 +112,20 @@ export class BatchDetailPage {
let data = res.json();
this.navCtrl.push('ActivityConfirmPage',{activity:data.activity,order:data});
}, error => {
this.appService.alert('网络异常!');
}
);
}
cancelOrder(): void {
this.appService.ObserverHttpGet("/wisdomgroup/modules/order/deleteOrder", { "id": this.batch.order.orderid })
const data = {
'id':this.batch.order.orderid +','
}
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/order/deleteOrder", data)
.subscribe((res: Response) => {
//let data = res.json();
this.appService.alert('报名已取消!');
this.navCtrl.pop();
}, error => {
this.appService.alert('网络异常!');
}
);
......
......@@ -53,7 +53,6 @@ export class OrderDetailPage {
this.appService.alert('报名已取消!');
this.navCtrl.pop();
}, error => {
this.appService.alert('网络异常!');
}
);
......
......@@ -42,7 +42,6 @@ export class OrderEditPage {
.subscribe((res :Response) => {
this.batchList = res.json().batchList;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -81,7 +80,6 @@ export class OrderEditPage {
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -51,7 +51,6 @@ export class AnnouncementPage {
this.allNotice = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -62,7 +61,6 @@ export class AnnouncementPage {
.subscribe((res: Response) => {
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -77,7 +75,6 @@ export class AnnouncementPage {
.subscribe((res: Response) => {
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -33,7 +33,6 @@ export class AnnouncementViewPage {
let src = this.notice.noticeContent.split('src="');
this.noticeContent = src.join('src="'+AppGlobal.pictureNotice);
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -145,7 +145,6 @@ export class ChooseAddressPage {
//this.appService.alert(JSON.stringify(this.areaAll));
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -161,7 +160,6 @@ export class ChooseAddressPage {
this.outerAreaAll = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -190,7 +188,6 @@ export class ChooseAddressPage {
this.isSearch = true;
this.searchAreaAll = data;
}, error => {
this.appService.alert('网络异常!');
}
);
......
......@@ -40,7 +40,6 @@ export class AddBlockPage {
this.appService.popToastView('创建成功!', 'middle', 1500);
this.navCtrl.pop();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -71,7 +71,6 @@ export class ContactListPage {
element["hasgeneralpersonsflag"] = true;
});
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -85,7 +84,6 @@ export class ContactListPage {
callback(data == null ? "[]" : data);
})
.catch(error => {
this.appService.alert('网络异常!');
});
}
......@@ -116,7 +114,6 @@ export class ContactListPage {
});
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -147,7 +144,6 @@ export class ContactListPage {
this.generalContactPersons.push(element["id"]);
});
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -87,7 +87,6 @@ export class ContractPersoninfoPage {
this.abbreviation = this.contactPersonInfo.abbreviation;
this.telephone = this.contactPersonInfo.telephone;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -112,7 +111,6 @@ export class ContractPersoninfoPage {
}
//this.navCtrl.pop();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -130,7 +128,6 @@ export class ContractPersoninfoPage {
this.getPersonInfo();
this.appService.popToastView('移除常用联系人成功!', 'middle', 2000);
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -169,7 +166,6 @@ export class ContractPersoninfoPage {
this.getPersonInfo();
this.edit = false;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -32,7 +32,6 @@ export class MyBlockPage {
let data = res.json();
this.ownerList = data.data.list;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -24,7 +24,6 @@ export class SelectBlockPage {
.subscribe((res: Response) => {
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -41,7 +41,6 @@ export class JoinPersonsPage {
console.log("canyurenyuan :"+data);
this.items = data;
}, error => {
this.appService.alert('网络异常!');
}
);
......
......@@ -97,7 +97,6 @@ export class LoginPage {
}, error => {
if (loading) loading.dismiss();
//this.appService.alert('系统错误!');
this.appService.alert('网络异常!');
}
);
}
......
......@@ -110,7 +110,6 @@ export class MyActivityListPage {
}
});
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -144,7 +143,6 @@ export class MyActivityListPage {
//this.waitgoOrderCount = this.waitGoOrder.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -225,7 +223,6 @@ export class MyActivityListPage {
//失败
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -286,7 +283,6 @@ export class MyActivityListPage {
//失败
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -74,7 +74,6 @@ export class MyReportPage {
}
});
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -81,7 +81,6 @@ export class ModifyPasswordPage {
//退出到登录页
this.navCtrl.setRoot("LoginPage");
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -92,7 +91,6 @@ export class ModifyPasswordPage {
.subscribe((res: Response) => {
let data = res.json();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -58,7 +58,6 @@ export class OperationListPage {
this.hasmore = false;
}
}, error => {
this.appService.alert('网络异常!');
}
);
return this.operations;
......@@ -130,7 +129,6 @@ export class OperationListPage {
callback(data == null ? "[]" : data);
}, error => {
this.appService.alert('网络异常!');
}
);
return this.tempOperations;
......
......@@ -90,7 +90,6 @@ export class EditPersonInfoPage {
callback(data == null ? "[]" : data);
})
.catch(error => {
this.appService.alert('网络异常!');
});
}
......@@ -134,7 +133,6 @@ export class EditPersonInfoPage {
this.navCtrl.pop();
})
.catch(error => {
this.appService.alert('网络异常!');
});
}
......
......@@ -71,7 +71,6 @@ export class OutGoingReportPage {
console.log(data);
this.PremanagerList = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -83,7 +82,6 @@ export class OutGoingReportPage {
let data = res.json();
this.PremanagerList = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -103,7 +101,6 @@ export class OutGoingReportPage {
.subscribe((res: Response) => {
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -69,9 +69,16 @@ export class OutGoingReportDetailPage {
this.temp_userpre.premanagerImg = this.premanager.uploadPic;
this.temp_userpre.premanagerIntroduce = this.premanager.managerDesc;
//编辑初始化:查询
if(this.premanager["reported"]){//已报备
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre",{premanagerId:this.premanager.id.toString()})
const data= {
premanagerId:this.premanager.id,
userId:null
};
if(this.navParams.get('userId')){
data.userId = this.navParams.get('userId');
}
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre",data)
.subscribe((res: Response) => {
if( res ){
let result = res.json();
this.temp_userpre.id = result.id; //临时-id
if(result.isorFromsh == 1){ //离沪
......@@ -82,14 +89,12 @@ export class OutGoingReportDetailPage {
//将原保存的地点放入storage中
this.storage.set("cityList",this.allselectedCity);
}
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
}else{
//报备
}
//这个操作是拿出放在storage中城市地点的集合放在 当前页面的临时temp_city中
this.storage.get("cityList").then((value)=>{
......@@ -194,6 +199,5 @@ export class OutGoingReportDetailPage {
this.storage.set('temp_userpre',this.temp_userpre);
this.navCtrl.push("OutGoingReportEditPage");
}
}
......@@ -60,7 +60,7 @@ export class OutGoingReportEditPage {
public storage: Storage) {
//当前页面----个人报备1页面
//this.gettemp_userprePre();
this.gettemp_userprePre();
}
ngOnInit(): void {
......@@ -69,6 +69,7 @@ export class OutGoingReportEditPage {
this.storage.get("premanager").then((value) => {
if (value != null && value != '') {
this.premanager = value;
console.log(this.premanager);
//加载报备的图片
this.picture = AppGlobal.picture + this.premanager["uploadPic"];
//加载报备详细说明
......@@ -77,10 +78,17 @@ export class OutGoingReportEditPage {
this.temp_endTime = this.premanager["endTime"]; //报备截止时间
// if (this.premanager["reported"]) { //已报备--修改操作,
const data = {
premanagerId: value.id,
userId:null
};
if(this.navParams.get('userid')){
data.userId = this.navParams.get('userid');
}
//编辑初始化:查询
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre", {premanagerId: value.id})
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre", data)
.subscribe((res: Response) => {
if(res.json()){
if(res){
let result = res.json();
this.userpre.id = result["id"]; //保存-id
//离沪勾选
......@@ -111,7 +119,6 @@ export class OutGoingReportEditPage {
}
}
}, error => {
this.appService.alert('网络异常!');
}
);
// }
......@@ -203,7 +210,10 @@ export class OutGoingReportEditPage {
editReport() {
this.storage.remove("city");
this.navCtrl.push("OutGoingReportDetailPage", {premanager: this.premanager});
this.navCtrl.push("OutGoingReportDetailPage", {
premanager: this.premanager,
userId:this.navParams.get('userid')
});
}
//提交报备
......@@ -262,7 +272,6 @@ export class OutGoingReportEditPage {
this.appService.popToastView(resultback.msg, 'middle', 1000);
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -78,7 +78,6 @@ export class OutGoingReportViewPage {
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -31,7 +31,7 @@
<ion-list>
<ion-item *ngFor="let item of items">
<div class="group">
<div class="group" style="position: relative">
<div class="inner-group">
<ng-container *ngIf="item?.picUrl && item?.picUrl != ''">
<img src="{{picture+item.picUrl}}" class="contact-img">
......@@ -50,14 +50,21 @@
</div>
</div>
<div>
<p>
<p text-right>
<button disabled ion-button round class="btn color1" *ngIf="type == 1">未报备</button>
<ng-container *ngIf="type == 2">
<button (click)="editReport(item)" ion-button round class=" cancelBtn">修改报备</button><br><br>
</ng-container>
<button disabled ion-button round class="btn color2" *ngIf="type == 2">离沪</button>
<ng-container *ngIf="type == 3">
<button (click)="editReport(item)" ion-button round class=" cancelBtn" >修改报备</button><br><br>
</ng-container>
<button disabled ion-button round class="btn color3" *ngIf="type == 3">不离沪</button>
</p>
<p *ngIf="type == 1" (click)="goReport(item)" style="color:#24bafc;margin-top: 6px">协助报备</p>
</div>
</div>
</ion-item>
</ion-list>
......
......@@ -155,5 +155,9 @@ page-reportDetail {
a[disabled], button[disabled], [ion-button][disabled]{
opacity: 1;
}
.cancelBtn{
background-color: #34b4fc;
border-radius: 3px;
}
}
......@@ -53,7 +53,6 @@ export class ReportDetailPage {
this.items = data;
this.type = 1;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -66,7 +65,6 @@ export class ReportDetailPage {
console.log(data);
this.itemsOfLeave = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -79,7 +77,6 @@ export class ReportDetailPage {
console.log(data);
this.itemsOfNotLeave = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -100,18 +97,27 @@ 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});
}
editReport(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,userid:item.id});
}
search(){
this.navCtrl.push('ReportSearchPage',{id:this.id,'premanager':this.premanager});
......
......@@ -28,7 +28,6 @@ export class ReportTrackPage {
let data = res.json();
this.all = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -52,7 +52,6 @@ export class ContactPage {
}
this.organizations.splice(flag, 1);
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -68,7 +67,6 @@ export class ContactPage {
let data = res.json();
this.ownerList = data.data.list;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -124,7 +124,6 @@ export class HomePage {
this.appService.ObserverHttpGet("/wisdomgroup/modules/common/file/getBanner", {}).subscribe((res: Response) => {
this.slidersItems = res.json();
}, error => {
this.appService.alert('网络异常!');
})
//初始化统计未读通知
......@@ -228,7 +227,6 @@ export class HomePage {
let data = res.json();
callback(data == null ? "[]" : data);
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -290,7 +288,6 @@ export class HomePage {
let data = res.json();
this.hasNewActivity = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -302,7 +299,6 @@ export class HomePage {
let data = res.json();
this.hasNewNotice = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -314,7 +310,6 @@ export class HomePage {
let data = res.json();
this.hasNewMessage = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -326,7 +321,6 @@ export class HomePage {
let data = res.json();
this.hasNewPremanager = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -376,11 +370,9 @@ export class HomePage {
})
});
}, error => {
this.appService.alert('网络异常!');
});
this.loadEvent(year, month);
}, error => {
this.appService.alert('网络异常!');
});
......@@ -418,7 +410,6 @@ export class HomePage {
this.setCalendar(year,month);
});
}, error => {
this.appService.alert('网络异常!');
}
);
......
......@@ -130,7 +130,6 @@ export class MinePage {
.subscribe((res: Response) => {
let data = res.json();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -24,7 +24,6 @@ export class NoticePage {
this.noticeList = data;
this.addRecodings();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -35,7 +34,6 @@ export class NoticePage {
.subscribe((res: Response) => {
this.badge.clear();
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
......@@ -96,7 +96,6 @@ export class TabsPage {
// .subscribe((res: Response) => {
// this.role = res.json();
// }, error => {
// this.appService.alert('网络异常!');
// }
// );
// });
......
......@@ -46,7 +46,6 @@ export class WorkbenchPage {
let data = res.json();
this.reportCount = data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
......@@ -69,7 +68,6 @@ export class WorkbenchPage {
//this.storage.set("role",this.role);
}, error => {
this.appService.alert('网络异常!');
}
);
});
......
......@@ -120,7 +120,6 @@ export class VersionPage {
let data = res.json();
this.navCtrl.push('LoginPage');
}, error => {
this.appService.alert('网络异常!');
}
);
}
......
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