Commit fdc96cfd authored by wangqinghua's avatar wangqinghua

color

parent 9859b9c0
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="1.2.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.starter" version="1.2.2" 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>
......
......@@ -30,7 +30,8 @@ export class ActivityApplyPage {
batchPerNumber:null,
activityId:'',
id:'',
batchLimitNumber:null
batchLimitNumber:null,
hasSignUpCount:null
};
role = {
loginName:''
......@@ -88,8 +89,6 @@ 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) => {
......@@ -136,7 +135,10 @@ export class ActivityApplyPage {
//验证信息:
/**0.对于暂未有批次的。
1.判断携带人数是否超过限额人数。
leaveNum: 剩余人数
applyNum:报名批次数量
**/
let leaveNum = this.item.batchLimitNumber - this.item.hasSignUpCount;
let applyNum = 0;
this.activity.batchList.forEach((res)=>{
if(res.order){
......@@ -149,10 +151,11 @@ export class ActivityApplyPage {
if(applyNum >= this.activity.applyCount){
this.appService.popToastView("提交失败,报名批次达到上限",'middle',1000);
return;
}
if (Number(this.order.Personnumber +1) > Number(this.item.batchLimitNumber)) {
}else if (Number(this.order.Personnumber +1) > Number(leaveNum)) {
this.appService.popToastView("报名人数超过了该批次的剩余人数",'middle',1000);
return;
}else{
this.submitOrder();
}
} else { //报名(新增)
this.submitOrder();
......
......@@ -20,13 +20,6 @@
<p> <span>报名备注:</span><span>{{order?.orderbz}}</span> </p>
</div>
</div>
<!--<div class="feedback-info" *ngIf="batch.order">-->
<!--<p class="info-title">出行反馈</p>-->
<!--<div class="content-item">-->
<!--<p> <span>出行结果:</span><span>1</span> </p>-->
<!--<p> <span>评价反馈:</span><span>备注</span> </p>-->
<!--</div>-->
<!--</div>-->
<div class="batch-info">
<div class="content-item">
<p> <span>报名截止:</span><span>{{this.batch.batchEndDate}}</span> </p>
......@@ -42,7 +35,8 @@
<div class="button-right" >
<!--是否报名了>时间是否截止->人数是否满了->-->
<ng-container *ngIf="batch.order">
<span class="button-btn button-btn2" (click)="sureCancelOrder()">取消报名</span>
<span *ngIf="!isFlag" class="button-btn button-btn2" (click)="sureCancelOrder()">取消报名</span>
<span *ngIf="isFlag" class="button-btn button-btn1" (click)="reelectBatch()">订单确认</span>
</ng-container>
<ng-container *ngIf="!batch.order">
<!--时间截止-->
......@@ -60,8 +54,6 @@
<span class="button-btn button-btn3">报名截止</span>
</ng-container>
</ng-container>
</div>
</div>
</div>
......
......@@ -15,6 +15,7 @@ declare var Swiper;
export class BatchDetailPage {
@ViewChild('contentSlides') contentSlides: Slides;
isFlag = false; //是否过截止日期
batch={
batchEndDate:'',
signUp:true,
......@@ -38,6 +39,15 @@ export class BatchDetailPage {
if( this.batch.order ){
this.order = this.batch.order;
}
//判断是否过截止日期
const nowDate = new Date().getTime();
const endDate = new Date(this.batch.batchEndDate).getTime();
console.log(nowDate,endDate);
if( nowDate > endDate ){
this.isFlag = true; //已过截止日期
}
}
initSwiper(){
......@@ -102,6 +112,11 @@ export class BatchDetailPage {
});
}
//订单确认
reelectBatch(): void {
// this.navCtrl.push('OrderDetailPage',{item:this.activity.id});
}
cancelOrder(): void {
this.appService.ObserverHttpGet("/wisdomgroup/modules/order/deleteOrder", { "id": this.batch.order.orderid })
.subscribe((res: Response) => {
......
......@@ -16,7 +16,7 @@
</ion-item>
<ion-item class="margin-top-15">
<ion-label>换班原因</ion-label>
<ion-textarea class="duty-textarea" [(ngModel)]="reason"></ion-textarea>
<ion-textarea placeholder="请输入换班原因" class="duty-textarea" [(ngModel)]="reason"></ion-textarea>
</ion-item>
</ion-list>
<button class="submit-btn submit" (click)="submit()">申请</button>
......
......@@ -12,4 +12,7 @@ page-duty-apply {
.label-ios + ion-textarea .text-input{
min-height: 100px;
}
.list-ios > .item-block:last-child, .list-ios > .item-wrapper:last-child .item-block{
border-bottom: none;
}
}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
import {DutyApplyHandlePage} from "../duty-apply-handle/duty-apply-handle";
import {DutyChangeDetailPage} from "../duty-change-detail/duty-change-detail";
@IonicPage()
@Component({
selector: 'page-change-apply-list',
templateUrl: 'change-apply-list.html',
selector: 'page-change-apply-list',
templateUrl: 'change-apply-list.html',
})
export class ChangeApplyListPage {
menuList = [
{name:'待处理'},
{name:'已处理'},
{name: '待处理'},
{name: '已处理'},
];
changeType = 1;
noList = [];
doneList = [];
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.getList();
}
ionViewDidEnter() {
const len = this.navCtrl.length() - 2 - 1;
this.navCtrl.remove(2, len);
this.getList();
}
getList(){
//0 未处理 1 已处理
const data = {
type:0
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/applyListOfType',data)
.subscribe((res)=>{
this.noList = res.json();
}
);
getList() {
//0 未处理 1 已处理
const data = {
type: 0
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/applyListOfType', data)
.subscribe((res) => {
this.noList = res.json();
}
);
const data1 = {
type:1
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/applyListOfType',data1)
.subscribe((res)=>{
this.doneList = res.json();
}
);
const data1 = {
type: 1
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/applyListOfType', data1)
.subscribe((res) => {
this.doneList = res.json();
}
);
}
}
change(type){
this.changeType = type;
}
change(type) {
this.changeType = type;
}
goApplyDetail(item){
this.navCtrl.push('DutyApplyHandlePage',{'item':item});
goApplyDetail(item) {
this.navCtrl.push('DutyApplyHandlePage', {'item': item});
}
goToDetail(item){
this.navCtrl.push('DutyChangeDetailPage',{'item':item});
goToDetail(item) {
this.navCtrl.push('DutyChangeDetailPage', {'item': item});
}
}
......@@ -18,7 +18,7 @@
<div class="detail-item">
<p class="detail-title2">换班信息</p>
<p>换班对象:{{this.item?.name}}</p>
<p>值班日期:{{this.applyDetail?.createTime | date:'yyyy-MM-dd'}}</p>
<p *ngIf="applyType == 'change'">值班日期:{{this.item?.time | date:'yyyy-MM-dd'}}</p>
</div>
<button *ngIf="applyType == 'replace'" class="submit-btn submit" (click)="replace()">确认替班</button>
<button *ngIf="applyType == 'change'" class="submit-btn submit" (click)="change()">确认换班</button>
......
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
import {ChangeApplyListPage} from "../change-apply-list/change-apply-list";
@IonicPage()
......@@ -10,7 +11,7 @@ import {AppService} from "../../../service/appHttpService";
})
export class ChangeApplySurePage {
item; //替班人信息
item; //替班人信息or换班人信息
applyDetail; //申请信息
applyType; //申请类型
changeId; // 换班Id
......@@ -27,10 +28,6 @@ export class ChangeApplySurePage {
this.personId = this.navParams.get('personId');
this.nowId = this.navParams.get('nowId');
this.changeId = this.navParams.get('changeId');
console.log('applyId:' + this.applyId);
console.log('personId:' + this.personId);
console.log('nowId:' + this.nowId);
console.log('changeId:' + this.changeId);
if (this.personId) {
this.applyType = 'replace'; //值班
} else {
......@@ -41,7 +38,6 @@ export class ChangeApplySurePage {
.subscribe((res)=>{
this.applyDetail = res.json();
})
}
//替班
......@@ -50,10 +46,10 @@ export class ChangeApplySurePage {
id: this.nowId, //值班记录id
personId: this.personId //替班人id
};
console.log(data);
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/replace', data)
.subscribe((res) => {
console.log(res.json());
this.appService.popToastView('处理成功!','middle',1000);
this.navCtrl.push('ChangeApplyListPage');
})
}
......@@ -63,10 +59,11 @@ export class ChangeApplySurePage {
nowId: this.nowId, //值班记录id
changeId: this.changeId //互换的值班ID
};
console.log(data);
// this.navCtrl.pop();
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/change',data)
.subscribe((res) => {
console.log(res.json());
this.appService.popToastView('处理成功!','middle',1000);
this.navCtrl.push('ChangeApplyListPage');
})
}
......
......@@ -8,12 +8,12 @@
</ion-header>
<ion-content >
<ion-content class="padding-10">
<ion-list>
<ion-item>
<span>申请人</span>
<span>{{personDetail.name}}</span>
<span>{{personDetail.phoneNumber}}</span>
<span class="margin-left-15">{{personDetail.phoneNumber}}</span>
</ion-item>
<ion-item>
<span>值班日期</span>
......
......@@ -41,7 +41,8 @@ export class DutyApplyHandlePage {
switch (type){
case '1':{ //换班
this.navCtrl.push('SelectChangePersonPage',{
nowId:this.applyDetail.scheduleId,
scheduleId:this.applyDetail.scheduleId,
applyId:this.applyDetail.id,
date:this.personDetail.dutyDate
});
break;
......
......@@ -13,18 +13,11 @@
</div>
<ion-calendar
[(ngModel)]="date"
(onChange)="onChange($event)"
(onSelect)="onSelect($event)"
(monthChange)="monChange($event)"
[options]="optionsMulti"
type="'js-date'"
[format]="'YYYY-MM-DD'">
</ion-calendar>
<ion-list>
<ion-item *ngFor="let item of list;" >
<div (click)="select(item)">
<span>{{item.dutyDate | date:'yyyy-MM-dd'}}</span>
<span>{{item.name}}</span>
</div>
</ion-item>
</ion-list>
<button class="submit-btn submit" (click)="submit()">安排换班</button>
</ion-content>
......@@ -4,8 +4,10 @@ page-select-change-person {
}
ion-calendar-month .primary button.days-btn small{
color: #474747;
transform: scale(0.8);
transform: scale(0.9);
font-size: 12px;
width: 50px;
left: -10px;
}
.calen-tab{
......@@ -44,4 +46,12 @@ page-select-change-person {
.calen4::after{
background-color: #f7ce53;
}
.submit{
border: 1px solid #34b4fc;
background-color: #34b4fc;
margin-top: 20px;
}
ion-calendar-month button.days-btn.dayOff1{
border: 1px solid #dddddd;
}
}
......@@ -17,19 +17,32 @@ export class SelectChangePersonPage {
optionsMulti: CalendarComponentOptions;
newArr: DayConfig[] = [];
nowId;
scheduleId; //换班申请中值班Id
changeInfo; //换班信息
date; //换班日期
list = [];
changeType = 0;
type;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService,public datePipe: DatePipe) {
}
ionViewDidLoad() {
this.nowId = this.navParams.get('nowId');
const year = this.datePipe.transform( this.navParams.get('date'),'yyyy' );
const month = this.datePipe.transform( this.navParams.get('date'),'MM' );
this.getMonth(year,month);
this.scheduleId = this.navParams.get('scheduleId');
this.getDetail();
}
getDetail(){
const year = this.datePipe.transform( this.navParams.get('date'),'yyyy' );
const month = this.datePipe.transform( this.navParams.get('date'),'MM' );
const data = {
id:this.scheduleId
}
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/getScheduleById',data).
subscribe((res)=>{
this.type = res.json().type;
this.getMonth(year,month);
})
}
//选择月份
......@@ -39,9 +52,24 @@ export class SelectChangePersonPage {
}
getMonth(year,month){
let date = new Date();
//4.每月的周末
let d = new Date(year, month, 0).getDate();
// for (let i = 1; i < d + 1; i++) {
// date.setFullYear(year, month - 1, i);
// let day = date.getDay();
// if (day == 6 || day == 0) {
// const data = {
// date: new Date(year, month - 1, i),
// cssClass: 'dayOff1'
// };
// this.newArr.push(data);
// }
// }
const data = {
date:year + '/' + month + '/01',
type:this.changeType
type:this.type
};
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/getScheduleByMonthAndType',data)
.subscribe((res)=>{
......@@ -49,32 +77,44 @@ export class SelectChangePersonPage {
response.forEach(event=>{
this.newArr.push({
date:new Date(event.dutyDate),
disable:false,
subTitle:event.name,
cssClass:event.id
})
});
this.optionsMulti = {
pickMode: 'multi',
pickMode: 'single',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay,
monthPickerFormat: monthCh,
weekStart: 0,
disableWeeks: [0, 1, 2, 3, 4, 5, 6],
daysConfig: this.newArr
};
})
}
//换班
select(item){
this.navCtrl.push('ChangeApplySurePage',{
'changeId':item.id,
'nowId':this.nowId
})
}
change(type){
this.changeType = type;
// this.getMonth();
onSelect(e){
console.log(e);
this.changeInfo = e;
}
//换班
submit(){
if(!this.changeInfo){
this.appService.popToastView('请选择换班人员','middle',1500);
return false;
}
const item = {
name:this.changeInfo.subTitle,
time:this.changeInfo.time
};
this.navCtrl.push('ChangeApplySurePage',{
'changeId':this.changeInfo.cssClass,
'nowId':this.scheduleId,
'item':item,
'applyId':this.navParams.get('applyId'),
})
}
}
......@@ -43,6 +43,7 @@ export class SelectRelayPersonPage {
//替班
selectPerson(item){
this.navCtrl.push('ChangeApplySurePage',{
'item':item,
'applyId':this.navParams.get('applyId'),
......
......@@ -177,7 +177,7 @@ export class MyActivityListPage {
);
}
//重选批次(更新订单)
//更新订单)
reelectBatch(item): void {
this.navCtrl.push('ActivityDetailPage',{id:item.activityid});
}
......
......@@ -110,6 +110,8 @@ export class HomePage {
}
ionViewWillEnter() {
this.slidersItems = [];
//初始化日期
this.getHasNewActivity();
......@@ -145,6 +147,7 @@ export class HomePage {
this.slides.stopAutoplay();
}
//获取权限
getRole() {
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
......@@ -267,7 +270,7 @@ export class HomePage {
//问卷调查
goToMySurvey() {
this.navCtrl.push('MySurveyPage');
this.navCtrl.push('SurveryPage');
}
goDuty() {
......@@ -354,7 +357,6 @@ export class HomePage {
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
///schedule/app/getMyScheduleOnMonth
//2.参加活动日期
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/order/appOrderCal", null)
......
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