Commit f68c6845 authored by wangqinghua's avatar wangqinghua

color

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