Commit c966a935 authored by wangqinghua's avatar wangqinghua

活动

parent 3a644c61
......@@ -164,7 +164,6 @@ export class ActivityApplyPage {
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/create", this.order)
.subscribe((res: Response) => {
if (true) {
this.isSuccess = true;
setTimeout(() => {
......
<ion-header>
<ion-navbar>
<ion-title text-center>报名订单</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="content">
<ion-item class="content-title">
<span>活动名称</span>
<span float-right>{{activity?.activityName}}</span>
</ion-item>
<ion-item>
<ion-label>选择批次</ion-label>
<ion-select [(ngModel)]="submitOrder.Batchid" cancelText="取消" okText="确认">
<ion-option *ngFor="let item of batchList" value="{{item.id}}">{{item.batchName}}</ion-option>
</ion-select>
</ion-item>
<ion-item class="margin-top-10">
<ion-label>报名用户</ion-label>
<span class="lettr-space-1" item-right>{{order?.username}}</span>
</ion-item>
<ion-item class="margin-top-10">
<span>携带人数</span>
<span class="com" float-right>
<button type="button" class="input_left" (tap)="next()">-</button>
<input type="text" readonly="readonly" [(ngModel)]='submitOrder.Personnumber' name="num" />
<button type="button" style="margin-left: -2px" class="input_right" (tap)="add()">+</button>
</span>
</ion-item>
<ion-item class="margin-top-10">
<ion-label>报名备注</ion-label>
<ion-textarea [(ngModel)]="submitOrder.Orderbz" class="content-textarea"></ion-textarea>
</ion-item>
<button class="submit-btn submit" (click)="submit()">提交订单</button>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { OrderEditPage } from './order-edit';
@NgModule({
declarations: [
OrderEditPage,
],
imports: [
IonicPageModule.forChild(OrderEditPage),
],
})
export class OrderEditPageModule {}
page-order-edit {
//新
.content{
text-align: left;
margin-top: 6px;
}
.sign-info,.feedback-info{
border-bottom: 1px solid #ddd;
margin-bottom: 20px;
}
.info-title{
padding-left: 10px;
position: relative;
}
.info-title::after{
content: '';
position: absolute;
left: 0;
top: 0;
width: 5px;
height: 25px;
background-color: #24bafc;
}
.content-item{
font-size: 16px;
padding: 0 20px;
p{
padding: 10px 0;
span:first-child{
color: #333;
}
span:last-child{
color: #666;
}
}
p + p{
border-top: 1px solid #ddd;
}
}
.content-button{
position: absolute;
bottom: 10px;
left: 0;
display: flex;
align-items: center;
width: 100%;
height: 60px;
font-size: 16px;
background-color: #e3f6fe;
div:first-child{
width: 65%;
padding-left: 20px;
}
}
.item-ios.item-block .item-inner{
margin-right: 16px;
border: none;
padding-left: 16px;
}
.content .item-ios.item-block:nth-child(5) .item-inner{
border: none;
}
.content-title{
padding: 0;
}
.content-title .item-inner{
padding-left: 16px;
margin: 0 !important;
}
.label-ios + ion-input .text-input, .label-ios + ion-textarea .text-input, .label-ios + .input + .cloned-input{
padding: 10px;
height: 100px;
border: 1px solid #ddd;
}
.submit{
margin-top: 20px;
border: 1px solid #34b4fc;
background-color: #34b4fc;
}
.com{
font-size: 0;
}
.com input{
font-size: 1.5rem;
height: 2rem;
width: 3rem;
vertical-align: bottom;
border: 1px solid #ddd;
text-align: center;
}
.com button{
height: 2rem;
width: 2rem;
}
}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {Response} from "@angular/http";
import {AppService} from "../../../service/appHttpService";
@IonicPage()
@Component({
selector: 'page-order-edit',
templateUrl: 'order-edit.html',
})
export class OrderEditPage {
order; //订单信息
activity ; //活动
batch; //批次
batchList = [];
submitOrder = {
Orderid: '', //订单id
Personnumber: 0, //携带人数
Orderbz: '', //报名备注
Activityid: '', //关联活动id
Batchid: '', //关联批次id
orderbz_end:''
};
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.order = this.navParams.get('item');
this.activity = this.navParams.get('item').activity;
this.batch = this.navParams.get('item').batch;
this.submitOrder.Batchid = this.order.batchid;
this.submitOrder.Orderbz = this.order.orderbz;
this.submitOrder.Personnumber = this.order.personnumber;
console.log(this.navParams.get('item'));
this.getAllBatch();
}
getAllBatch(){
this.appService.ObserverHttpGet("/wisdomgroup/modules/activity/findAllActivityForAppWithXQ", {"id":this.order.activityid})
.subscribe((res :Response) => {
this.batchList = res.json().batchList;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//携带人数 数字加减
add() {
if(this.submitOrder.Personnumber < this.batch.batchPerNumber){
this.submitOrder.Personnumber++;
}
}
next() {
if (this.submitOrder.Personnumber >= 1) {
this.submitOrder.Personnumber--;
}
}
submit(){
console.log('报名操作');
const data = {
Orderid: this.order.orderid, //订单id
Personnumber: this.submitOrder.Personnumber, //携带人数
Orderbz: this.submitOrder.Orderbz, //报名备注
Activityid: this.order.activityid, //关联活动id
Batchid: this.order.batchid, //关联批次id
orderbz_end:''
};
// this.order.Orderbz = this.order.orderbz_end;
console.log(data);
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/create", data)
.subscribe((res: Response) => {
if (true) {
setTimeout(() => {
this.navCtrl.setRoot("MyActivityListPage");
this.navCtrl.push("MyActivityListPage");
}, 1000);
} else {
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
}
......@@ -22,13 +22,6 @@
</ion-header>
<ion-content>
<div class="box">
<ion-slides>
<ion-slide direction="horizontal">
<span *ngFor="let item of box" class="box-item" (click)="scrollTop(item)">
{{item}}
</span>
</ion-slide>
</ion-slides>
</div>
......@@ -41,32 +34,50 @@
</div>
</div>
</div>
</ion-content>
<ion-slides #contentSlides (ionSlideDidChange)="slideChanged()">
<ion-slide>
<ion-content #content1>
<div class="city-item" *ngFor="let area of areaAll" id="{{area.code}}0">
<!--<div class="city-title">{{area.code}} </div>-->
<div class="city-box">
<div class="city">
<span (click)="selectedCity(area)">{{area.areaName}}</span>
</div>
</div>
</div>
<ion-item *ngFor="let area of areaAll;let i = index;">
<p (click)="select(area,i)">
<span>{{area.areaName}}</span>
<span float-right>+</span>
</p>
<ng-container *ngIf="selectIndex == i">
<ng-container *ngFor="let city of cityList">
<p class="areaChildren" (click)="selectedCity(city)">{{city.areaName}}</p>
</ng-container>
</ng-container>
</ion-item>
</ion-content>
</ion-slide>
<ion-slide>
<ion-content #content2>
<div class="city-item" *ngFor="let area of outerAreaAll" id="{{area.code}}1">
<!--<div class="city-title">{{area.code}}</div>-->
<div class="city-box">
<!--<div class="city" *ngFor="let item of area.list">-->
<span (click)="selectedCity(area)">{{area.areaName}}</span>
<!--</div>-->
</div>
</div>
<ion-item *ngFor="let area of outerAreaAll;let i = index;">
<p (click)="select(area,i)">
<span>{{area.areaName}}</span>
<span float-right>+</span>
</p>
<ng-container *ngIf="selectIndex == i">
<ng-container *ngFor="let city of cityList">
<p class="areaChildren" (click)="selectedCity(city)">{{city.areaName}}</p>
</ng-container>
</ng-container>
</ion-item>
<!--<div class="city-item" *ngFor="let area of outerAreaAll" id="{{area.code}}1">-->
<!--&lt;!&ndash;<div class="city-title">{{area.code}}</div>&ndash;&gt;-->
<!--<div class="city-box">-->
<!--&lt;!&ndash;<div class="city" *ngFor="let item of area.list">&ndash;&gt;-->
<!--<span (click)="selectedCity(area)">{{area.areaName}}</span>-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--</div>-->
<!--</div>-->
</ion-content>
</ion-slide>
</ion-slides>
......
......@@ -80,14 +80,27 @@ page-chooseAddress {
justify-content: left;
box-sizing: border-box;
position: relative;
margin: 10px 0;
}
.city{
text-align: left;
padding-left: 2rem;
display: inline-block;
width: 33.33%;
width: 100%;
margin: 5px 0;
}
.input-wrapper{
padding-left: 2rem;
padding-right: 2rem;
}
.item-ios p{
font-size: 1.8rem;
}
.item-ios p.areaChildren{
font-size: 1.6rem;
padding-left: 1rem;
margin: 10px 0;
}
.back-btn{
......
......@@ -21,7 +21,6 @@ export class ChooseAddressPage {
@ViewChild('content1') content1: Content;
@ViewChild('content2') content2: Content;
menus: Array<string> = ['国内', '国际/港澳台'];
box: Array<string> = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', , 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
searchValue: string;
currentIndex:number = 0;
......@@ -32,6 +31,9 @@ export class ChooseAddressPage {
//搜索
searchAreaAll: Array<String>[][];
selectIndex;
cityList;
isSearch:boolean = false;
constructor(
......@@ -105,9 +107,7 @@ export class ChooseAddressPage {
let index = this.contentSlides.getActiveIndex();
this.currentIndex = index;
this.setStyle(index);
//s切换菜单
this.swiper.slideTo(index, 300);
//s切换菜单
}
//清除搜索关键字
......@@ -166,17 +166,10 @@ export class ChooseAddressPage {
//选择城市
selectedCity(city):void{
const data = {
'parentId':city.id
};
this.appService.ObserverHttpGetOption('/wisdomgroup/area/area/getCityByParentId',data).subscribe(
(res:Response)=>{
console.log(res)
}
)
//this.navCtrl.pop();
// this.storage.set("city",city);
// this.navCtrl.push("OutGoingReportDetailPage");
this.selectIndex = null;
this.storage.set("city",city);
this.navCtrl.push("OutGoingReportDetailPage");
}
//搜索地址
......@@ -201,20 +194,16 @@ export class ChooseAddressPage {
}
initArea(){
// this.appService.ObserverHttpGetOption('/wisdomgroup/area/area/getProvince',data).subscribe(
// (res:Response)=>{
// console.log(res)
// }
// )
const data1 = {
'parentId':'8514'
};
this.appService.ObserverHttpGetOption('/wisdomgroup/area/area/getCityByParentId',data1).subscribe(
(res:Response)=>{
console.log(res)
}
)
}
select(item,index){
this.selectIndex = index;
const data = {
'parentId':item.id
};
this.appService.ObserverHttpGetOption('/wisdomgroup/area/area/getCityByParentId',data).subscribe(
(res:Response)=>{
this.cityList = res.json();
}
)
}
}
......@@ -5,13 +5,12 @@
<div class="pageMenuSlides">
<div class="swiper-container">
<div class="swiper-wrapper">
<!-- {{i==0?'bottomLine':''}}是初始化的时候默认选择第一个菜单 -->
<div class="swiper-slide" *ngFor="let item of menus;let i=index;" tappable (click)="selectPageMenu(i)">
<span class=" {{swiperIndex == i? 'swiper-title':''}} ">{{item}}</span>
<span *ngIf="i == 1" class="menu-index" style="line-height:15px;">
<span *ngIf="i == 1" class="menu-index" >
{{waitgoOrderCount}}
</span>
<span *ngIf="i == 2" class="menu-index" style="line-height:15px;">
<span *ngIf="i == 2" class="menu-index">
{{waitsureOrderCount}}
</span>
</div>
......@@ -68,7 +67,7 @@
</div>
<div class="right">
<button class="cancel" *ngIf="item.orderstate == 1 && !item.showParticipantBtn" (click)="sureCancelOrder(item.orderid);$event.stopPropagation();">取消报名</button>
<button class="reselection" *ngIf="item.orderstate == 1 && !item.showParticipantBtn" (click)="reelectBatch(item);$event.stopPropagation();">重选批次</button>
<button class="reselection" *ngIf="item.orderstate == 1 && !item.showParticipantBtn" (click)="reelectBatch(item);$event.stopPropagation();">重选批次</button>
<button class="cancel" *ngIf="item.orderstate == 1 && item.showParticipantBtn" (click)="joinPeople(item);$event.stopPropagation();">参与人员</button>
<button class="cancel" *ngIf="item.orderstate == 2" (click)="joinPeople(item);$event.stopPropagation();">参与人员</button>
......
......@@ -44,6 +44,7 @@ page-myActivityList {
margin-left: 5px;
right: 20%;
text-align: center;
line-height: 1.4rem;
}
ion-slides {
......
......@@ -9,6 +9,7 @@ import { JoinPersonsPage } from '../joinPersons/joinPersons';
import { ActivityStatisticService } from '../../service/activityStatisticService';
import {OrderDetailPage} from "../activity/order-detail/order-detail";
import {OrderEditPage} from "../activity/order-edit/order-edit";
......@@ -176,8 +177,9 @@ export class MyActivityListPage {
}
//重选批次(更新订单)
reelectBatch(order): void {
this.navCtrl.push('ActivityApplyPage', { changeOrderInfo: order, item: order.activity });
reelectBatch(item): void {
this.navCtrl.push('OrderEditPage',{item:item});
// this.navCtrl.push('ActivityApplyPage', { changeOrderInfo: order, item: order.activity });
}
//跳转人员参与情况列表页面
......@@ -319,13 +321,7 @@ export class MyActivityListPage {
//跳转到确认活动页面
goConfirmActivity(item) {
if( item.orderstate == 3||item.orderstate == 4 ){
this.navCtrl.push('OrderDetailPage',{item:item});
}else{
this.navCtrl.push("ActivityConfirmPage",{lookOrderDetails:item});
}
console.log(item);
}
goBack(){
......
......@@ -6,9 +6,9 @@
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide {{i==0?'bottomLine':''}}" *ngFor="let item of menus;let i=index;" tappable (click)="selectPageMenu(i)">{{item}}
<span *ngIf="i==0" class="menu-index" style="line-height:15px;">{{allReport.length}}</span>
<span *ngIf="i==1" class="menu-index" style="line-height:15px;">{{processingReport.length}}</span>
<span *ngIf="i==2" class="menu-index" style="line-height:15px;">{{endReport.length}}</span>
<span *ngIf="i==0" class="menu-index">{{allReport.length}}</span>
<span *ngIf="i==1" class="menu-index">{{processingReport.length}}</span>
<span *ngIf="i==2" class="menu-index">{{endReport.length}}</span>
</div>
</div>
</div>
......
......@@ -36,6 +36,7 @@ page-myReport {
color: white;
margin-left: 5px;
text-align: center;
line-height: 1.4rem;
}
ion-slides {
......
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