Commit f68c6845 authored by wangqinghua's avatar wangqinghua

color

parent f1b872b3
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="1.1.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.starter" version="1.1.7" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>智汇19号</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
......@@ -29,5 +29,5 @@
<ion-textarea [(ngModel)]="order.Orderbz" class="content-textarea"></ion-textarea>
</ion-item>
<button class="submit-btn submit" (click)="submitOrder()">提交订单</button>
<button class="submit-btn submit" (click)="confirmOrder()">提交订单</button>
</ion-content>
......@@ -20,14 +20,17 @@ export class ActivityApplyPage {
//batches: object[]; //所有批次信息
batches: Array<String>[];
activity = {
activityName:'',
id:''
activityName:'',
batchList:[],
id:'',
applyCount:null //批次数量限制
}; //活动信息
item = {
batchName:'',
batchPerNumber:null,
activityId:'',
id:''
id:'',
batchLimitNumber:null
};
role = {
loginName:''
......@@ -85,11 +88,12 @@ export class ActivityApplyPage {
ionViewDidEnter(): void {
this.activity = this.navParams.get("activity");
this.item = this.navParams.get('item');
console.log(this.item);
console.log(this.activity);
this.order.Activityid = this.activity.id;
// //获取角色
this.storage.get("user").then((value) => {
this.role = value;
console.log(this.role);
});
}
......@@ -129,34 +133,25 @@ export class ActivityApplyPage {
//报名
confirmOrder(orderId) {
console.log(this.order.Personnumber + ":" + this.order.Activityid + ":" + this.order.Batchid);
//验证信息:
/**0.对于暂未有批次的。
1.判断携带人数是否超过限额人数。
2当前报名人数是否超过剩余人数。
4.当前时间>报名截止日期
**/
if (this.batches.length == 0) {
this.appService.toast("该活动还未生成批次信息");
return;
}
if (this.onebatch["noRegistrationFalg"]) {
this.appService.toast("已到报名截止日期或批次报名剩余数为0");
return;
}
if (this.order.Personnumber > this.onebatch["batchPerNumber"]) {
this.appService.toast("携带人数不能超过" + this.onebatch["batchPerNumber"] + "人");
return;
}
if (Number(this.order.Personnumber + 1) > this.onebatch["onebatchSurplusQuota"]) {
this.appService.toast("报名人数超过了该批次的剩余人数");
let applyNum = 0;
this.activity.batchList.forEach((res)=>{
if(res.order){
applyNum ++;
}
});
if(applyNum >= this.activity.applyCount){
this.appService.popToastView("提交失败,报名批次达到上限",'middle',1000);
return;
}
if (orderId.length > 0) { //我的活动:重选批次(修改)
// this.changeOrderInfo(orderId);
if (Number(this.order.Personnumber +1) > Number(this.item.batchLimitNumber)) {
this.appService.popToastView("报名人数超过了该批次的剩余人数",'middle',1000);
return;
} else { //报名(新增)
this.commitSignUpOrder();
this.submitOrder();
}
}
......@@ -185,7 +180,6 @@ export class ActivityApplyPage {
doRefresh(refresher) {
console.log('Begin async operation', refresher);
setTimeout(() => {
this.ionViewDidEnter();
console.log('Async operation has ended');
......@@ -194,6 +188,9 @@ export class ActivityApplyPage {
}
submitOrder(){
// return false;
this.order.Batchid = this.item.id;
this.order.Activityid = this.item.activityId;
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/create", this.order)
......
......@@ -16,17 +16,14 @@ export class PersonPage {
public viewCtrl: ViewController, public appService: AppService) {
}
ionViewDidLoad() {
const data = {
pageSize:'1000',
pageNumber:'1'
};
this.appService.ObserverHttpGetData("wisdomgroup/sysmanagement/usergroup/search.ajax",data)
ionViewDidEnter() {
this.appService.ObserverHttpGetData("/wisdomgroup/sysmanagement/usergroup/search.ajax",null)
.subscribe((res: Response) => {
let data = res.json();
this.batchList = data.list;
}, error => {
this.appService.alert('网络异常!');
}, (error) => {
alert('error:' +error);
this.appService.alert(error.json());
}
);
}
......
......@@ -354,7 +354,6 @@ export class HomePage {
.subscribe((res) => {
let data = Number(res.json());
this.noticeTips = data;
console.log('notice'+data);
if (data > 0) {
this.badge.set(data);
} else {
......@@ -461,14 +460,12 @@ export class HomePage {
disableWeeks: [0, 1, 2, 3, 4, 5, 6],
daysConfig: this.newArr
};
console.log(this.optionsMulti);
})
});
}
onChange(e) {
console.log(e);
}
//月份改变
......
......@@ -362,10 +362,11 @@ export class AppService {
// return this.http.get(AppGlobal.domain + url + this.encode(params, "get")) //app
// }
//
// //get请求
// ObserverHttpGetData(url, params): Observable<any> {
// return this.http.get(AppGlobal.domain + url, params) //app
// }
// //get请求
// ObserverHttpGetData(url, params): Observable<any> {
// return this.http.get(AppGlobal.domain +url, params) //本地
// }
//
// //get请求
// ObserverHttpGetAdd(url, params): Observable<any> {
......
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