Commit 5cefb65c authored by wangqinghua's avatar wangqinghua

update

parent 80e8ba7e
...@@ -15,6 +15,9 @@ import {MobileAccessibility} from "@ionic-native/mobile-accessibility"; ...@@ -15,6 +15,9 @@ import {MobileAccessibility} from "@ionic-native/mobile-accessibility";
import {timer} from "rxjs/observable/timer"; import {timer} from "rxjs/observable/timer";
import {ScreenOrientation} from "@ionic-native/screen-orientation"; import {ScreenOrientation} from "@ionic-native/screen-orientation";
import {AppMainService} from "./app.service"; import {AppMainService} from "./app.service";
import {async} from "rxjs/scheduler/async";
import {TabsService} from "../pages/tabs/tabs.service";
import {version} from "moment";
@Component({ @Component({
templateUrl: 'app.html' templateUrl: 'app.html'
...@@ -27,7 +30,7 @@ export class MyApp { ...@@ -27,7 +30,7 @@ export class MyApp {
user; user;
constructor(platform: Platform, constructor(public platform: Platform,
public statusBar: StatusBar, public statusBar: StatusBar,
public splashScreen: SplashScreen, public splashScreen: SplashScreen,
private alertCtrl: AlertController, private alertCtrl: AlertController,
...@@ -36,92 +39,90 @@ export class MyApp { ...@@ -36,92 +39,90 @@ export class MyApp {
private appVersion: AppVersion, private appVersion: AppVersion,
private screenOrientation: ScreenOrientation, private screenOrientation: ScreenOrientation,
public emitSer: EmitService, public emitSer: EmitService,
public storage: Storage, public storage: Storage, private tabSer: TabsService,
public mobileAccess: MobileAccessibility, public mobileAccess: MobileAccessibility,
private appMainSer:AppMainService, private appMainSer: AppMainService,
public appService: AppService) { public appService: AppService) {
platform.ready().then(() => { this.platform.ready().then(() => {
this.splashScreen.hide(); this.splashScreen.hide();
this.statusBar.show(); this.statusBar.show();
this.statusBar.overlaysWebView(false); this.statusBar.overlaysWebView(false);
this.statusBar.backgroundColorByHexString('#e12724'); this.statusBar.backgroundColorByHexString('#e12724');
this.statusBar.styleLightContent(); this.statusBar.styleLightContent();
if (platform.is('android')) {
this.screenOrientation.lock('portrait-primary'); //锁定竖屏
}
timer(4500).subscribe((res) => { timer(4500).subscribe((res) => {
this.showSplash = false; this.showSplash = false;
this.checkVersion(); this.device();
this.loadLogin(); this.loadLogin();
}); });
//app字体不跟随手机字体大小变化 //app字体不跟随手机字体大小变化
this.mobileAccess.usePreferredTextZoom(false); this.mobileAccess.usePreferredTextZoom(false);
});
});
}
//用户设备
device(){
if (this.platform.is('android')) {
this.screenOrientation.lock('portrait-primary'); //锁定竖屏
this.checkVersion();
}
} }
//检测是否需要更新 //检测是否需要更新
checkVersion() { async checkVersion() {
//检测是否需要更新 let appVersion;
this.appVersion.getVersionNumber().then((version: string) => {
version = version.replace(' ', ''); await this.appVersion.getVersionNumber().then((ver: string) => {
this.appUpdateService.compariVersion().subscribe(res => { appVersion = ver.trim();
let data = res.json(); });
data.latestVersion = data.latestVersion.replace(' ', ''); await this.appUpdateService.compariVersion().subscribe(res => {
if (data.code == 200) { const data = res.json();
if (data.latestVersion != null && data.latestVersion != version) { data.latestVersion = data.latestVersion.trim();
this.appUpdateService.detectionUpgrade(data.androidDownload, true); //提示升级 if (data.code == 200) {
} if (data.latestVersion != null && data.latestVersion != appVersion) {
this.appUpdateService.detectionUpgrade(data.androidDownload, true); //提示升级
} }
}); }
}).catch(err => {
console.log('getVersionNumber:' + err);
}); });
} }
async loadLogin() {
loadLogin() { await setTimeout(()=>{
this.storage.get("userLoginInfo").then((value) => { console.log('setTimeout')
},3000);
await this.storage.get('userLoginInfo').then((value => {
console.log('userLoginInfo')
if (value != null && value != '') { if (value != null && value != '') {
this.user = value; this.user = value;
if (this.user.remember) {
this.appService.ObserverHttpPost("/wisdomgroup/app/loginpost", this.user)
.subscribe((res: Response) => {
let data = res.json();
if (data["code"] == '200') {
this.storage.set('user', data.data);
this.user.userid = data.data.id;
this.storage.set('userLoginInfo', this.user);
this.rootPage = TabsPage;
} else {
this.appService.alert('手机号或密码错误!');
this.rootPage = LoginPage;
}
}, error => {
this.rootPage = LoginPage;
this.appService.alert('网络异常!');
}
);
} else {
this.rootPage = LoginPage;
}
this.getNoRead();
} else { } else {
this.rootPage = LoginPage; this.rootPage = LoginPage;
} }
}));
await this.tabSer.loginpost(this.user).subscribe((res) => {
if (res.code == '200') {
this.storage.set('user', res.data);
this.user.userid = res.data.id;
this.storage.set('userLoginInfo', this.user);
this.rootPage = TabsPage;
} else {
this.appService.alert('手机号或密码错误!');
this.rootPage = LoginPage;
}
}); });
await this.getNoRead();
} }
getNoRead() { getNoRead() {
this.appService.ObserverHttpPost("/wisdomgroup/modules/message/findAllActivityForAppWithXQ", null) this.appService.ObserverHttpPost("/wisdomgroup/modules/message/findAllActivityForAppWithXQ", null)
.subscribe((res: Response) => { .subscribe((res: Response) => {
console.log('getNoRead');
let data = res.json(); let data = res.json();
let num = 0; let num = 0;
if (data.length > 0) { if (data.length > 0) {
...@@ -129,7 +130,6 @@ export class MyApp { ...@@ -129,7 +130,6 @@ export class MyApp {
if (e.isRead == 0) num++; if (e.isRead == 0) num++;
}); });
this.appMainSer.setRead(num); this.appMainSer.setRead(num);
console.log(num);
} }
}, error => { }, error => {
} }
......
...@@ -44,7 +44,13 @@ ...@@ -44,7 +44,13 @@
</div> </div>
</div> </div>
</div> </div>
<ion-list text-center style="margin-top: 10rem;color: #666666"
*ngIf="page.isLoad && newList.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无
</p>
</ion-list>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)"> <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content <ion-infinite-scroll-content
loadingSpinner="bubbles" loadingSpinner="bubbles"
......
...@@ -18,14 +18,15 @@ export class BusinessUnitPage { ...@@ -18,14 +18,15 @@ export class BusinessUnitPage {
picture: string = AppGlobal.picture; picture: string = AppGlobal.picture;
newList = []; newList = [];
searchObj = {
page = {
isLoad: false,
P_pageNumber: 1,
P_pageSize: AppGlobal.pageCount,
title: '', title: '',
total: null
}; };
pageNumber: number = 1;
pageSize = AppGlobal.pageCount;
totalNum: number;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public serveSer: ServeService) { public serveSer: ServeService) {
} }
...@@ -38,13 +39,14 @@ export class BusinessUnitPage { ...@@ -38,13 +39,14 @@ export class BusinessUnitPage {
search() { search() {
const data = { const data = {
P_pageNumber: 1, P_pageNumber: 1,
P_pageSize: this.pageSize, P_pageSize: this.page.P_pageSize,
title: this.searchObj.title title: this.page.title
}; };
this.serveSer.searchBusinessSystem(data).subscribe( this.serveSer.searchBusinessSystem(data).subscribe(
(res) => { (res) => {
this.newList = res.data.list; this.newList = res.data.list;
this.totalNum = res.data.total; this.page.total = res.data.total;
this.page.isLoad = true;
this.newList.forEach(e => { this.newList.forEach(e => {
if (e.attachments && e.attachments.length > 0) { if (e.attachments && e.attachments.length > 0) {
e.path = e.attachments[0].path; e.path = e.attachments[0].path;
...@@ -66,19 +68,19 @@ export class BusinessUnitPage { ...@@ -66,19 +68,19 @@ export class BusinessUnitPage {
//上拉加载 //上拉加载
doInfinite(e) { doInfinite(e) {
if (this.totalNum == this.newList.length) { if (this.page.total == this.newList.length) {
console.log('done'); console.log('done');
e.enable(false); e.enable(false);
return false; return false;
} }
this.pageNumber++; this.page.P_pageNumber++;
const data = { const data = {
P_pageNumber: this.pageNumber, P_pageNumber: this.page.P_pageNumber,
P_pageSize: this.pageSize, P_pageSize: this.page.P_pageSize,
}; };
this.serveSer.searchBusinessSystem(data).subscribe( this.serveSer.searchBusinessSystem(data).subscribe(
(res) => { (res) => {
this.totalNum = res.data.total; this.page.total = res.data.total;
res.data.list.forEach(e => { res.data.list.forEach(e => {
if (e.attachments && e.attachments.length > 0) { if (e.attachments && e.attachments.length > 0) {
e.path = e.attachments[0].path; e.path = e.attachments[0].path;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<ion-item> <ion-item>
<ion-label class="item-left"><span class="color-red">*</span>用餐日期:</ion-label> <ion-label class="item-left"><span class="color-red">*</span>用餐日期:</ion-label>
<ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD" <ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD"
pickerFormat="YYYY MM DD" placeholder="请选择" pickerFormat="YYYY MM DD" placeholder="请选择" [min]="nowDate"
[(ngModel)]="obj.orderDate"></ion-datetime> [(ngModel)]="obj.orderDate"></ion-datetime>
<ion-label class="right-arrow"> <ion-label class="right-arrow">
<ion-icon name="arrow-forward"></ion-icon> <ion-icon name="arrow-forward"></ion-icon>
......
...@@ -33,6 +33,7 @@ export class FoodApplyPage { ...@@ -33,6 +33,7 @@ export class FoodApplyPage {
personList = []; personList = [];
applyId; //是否编辑 applyId; //是否编辑
type; type;
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public modalCtrl: ModalController, private serveSer: ServeService, public modalCtrl: ModalController,
...@@ -53,6 +54,7 @@ export class FoodApplyPage { ...@@ -53,6 +54,7 @@ export class FoodApplyPage {
//初始化参数 //初始化参数
initParams() { initParams() {
const data = this.navParams.get('data'); const data = this.navParams.get('data');
this.nowDate = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm');
console.log(data); console.log(data);
if (data) { if (data) {
...@@ -101,14 +103,6 @@ export class FoodApplyPage { ...@@ -101,14 +103,6 @@ export class FoodApplyPage {
} }
}, },
{ {
text: '20元',
handler: () => {
this.obj.standard = '2';
this.obj.standardText = '20元';
this.obj.amount = '20';
}
},
{
text: '其他', text: '其他',
handler: () => { handler: () => {
this.obj.standard = '3'; this.obj.standard = '3';
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<div class="morning"> <div class="morning">
<div class="morning-room"> <div class="morning-room">
<ng-container *ngFor="let item3 of room?.uncheckList"> <ng-container *ngFor="let item3 of room?.uncheckList">
<span (click)="goApplyEdit(item3)" *ngIf=" role.includes(11) || (role.includes(1) && mineInfo.orgName == item1.orgName)" > <span (click)="goApplyEdit(item3)" *ngIf=" role.includes(11) || (role.includes(1) && mineInfo.orgName == item3.orgName)" >
<span *ngIf="item3?.type == 1">午餐</span>&nbsp;&nbsp; <span *ngIf="item3?.type == 1">午餐</span>&nbsp;&nbsp;
<span *ngIf="item3?.type == 2">晚餐</span> {{item3.orgName}}等{{item3.peopleCount}}人,标准:{{item3.total}}元 <span *ngIf="item3?.type == 2">晚餐</span> {{item3.orgName}}等{{item3.peopleCount}}人,标准:{{item3.total}}元
</span> </span>
...@@ -119,6 +119,11 @@ ...@@ -119,6 +119,11 @@
loadingSpinner="bubbles" loadingSpinner="bubbles"
loadingText="加载中"></ion-infinite-scroll-content> loadingText="加载中"></ion-infinite-scroll-content>
</ion-infinite-scroll> </ion-infinite-scroll>
<ion-fab right bottom>
<button ion-fab color="light" (click)="buy()">
<span class="issue">抢购</span>
</button>
</ion-fab>
</ion-content> </ion-content>
</ion-content> </ion-content>
...@@ -178,4 +178,9 @@ export class FoodPage { ...@@ -178,4 +178,9 @@ export class FoodPage {
this.navCtrl.push(FoodApplyPage); this.navCtrl.push(FoodApplyPage);
} }
} }
//抢购
buy(){
}
} }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<ion-item> <ion-item>
<ion-label class="item-left"><span class="color-red">*</span>预约时间:</ion-label> <ion-label class="item-left"><span class="color-red">*</span>预约时间:</ion-label>
<ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD" <ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD"
pickerFormat="YYYY MM DD" placeholder="请选择" pickerFormat="YYYY MM DD" placeholder="请选择" [min]="nowDate"
[(ngModel)]="obj.appointmentDate"></ion-datetime> [(ngModel)]="obj.appointmentDate"></ion-datetime>
<ion-label *ngIf="check.appointmentDate" class="check-tips">请选择开始时间</ion-label> <ion-label *ngIf="check.appointmentDate" class="check-tips">请选择开始时间</ion-label>
</ion-item> </ion-item>
......
...@@ -44,6 +44,7 @@ export class HairApplyPage { ...@@ -44,6 +44,7 @@ export class HairApplyPage {
]; ];
applyId; //是否编辑 applyId; //是否编辑
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController, constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController,
private serveSer: ServeService, public modalCtrl: ModalController, private serveSer: ServeService, public modalCtrl: ModalController,
...@@ -60,6 +61,7 @@ export class HairApplyPage { ...@@ -60,6 +61,7 @@ export class HairApplyPage {
//初始化参数 //初始化参数
initParams() { initParams() {
this.nowDate = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm');
const data = this.navParams.get('data'); const data = this.navParams.get('data');
console.log(data); console.log(data);
if (data) { if (data) {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<ion-item> <ion-item>
<ion-label class="item-left"><span class="color-red">*</span>开始时间:</ion-label> <ion-label class="item-left"><span class="color-red">*</span>开始时间:</ion-label>
<ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm" <ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
pickerFormat="YYYY MM DD HH mm" placeholder="请选择" [max]="obj.endTime" pickerFormat="YYYY MM DD HH mm" placeholder="请选择" [max]="obj.endTime" [min]="nowDate"
[(ngModel)]="obj.startTime"></ion-datetime> [(ngModel)]="obj.startTime"></ion-datetime>
<ion-label class="right-arrow"> <ion-label class="right-arrow">
<ion-icon name="arrow-forward"></ion-icon> <ion-icon name="arrow-forward"></ion-icon>
......
...@@ -20,8 +20,8 @@ export class RoomApplyPage { ...@@ -20,8 +20,8 @@ export class RoomApplyPage {
roomText: '请选择', roomText: '请选择',
orgId: null, orgId: null,
orgText: '请选择', orgText: '请选择',
startTime: '', startTime: null,
endTime: '', endTime: null,
orgLeader: [], orgLeader: [],
personList: [], personList: [],
remark: '', remark: '',
...@@ -70,6 +70,7 @@ export class RoomApplyPage { ...@@ -70,6 +70,7 @@ export class RoomApplyPage {
applyId; //是否编辑 applyId; //是否编辑
mineInfo; //申请人信息 mineInfo; //申请人信息
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController, constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController,
private serveSer: ServeService, public _modalCtrl: ModalController, private appMainSer: AppMainService, private serveSer: ServeService, public _modalCtrl: ModalController, private appMainSer: AppMainService,
...@@ -81,27 +82,27 @@ export class RoomApplyPage { ...@@ -81,27 +82,27 @@ export class RoomApplyPage {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.initParams();
this.applyId = this.navParams.get('id'); this.applyId = this.navParams.get('id');
if (this.applyId) { if (this.applyId) {
this.meetDetail(); this.meetDetail();
this.roomMax = `该会议室可容纳${this.navParams.get('accommodation')}人`; this.roomMax = `该会议室可容纳${this.navParams.get('accommodation')}人`;
}else{
this.initParams();
} }
} }
//时间和会议室初始化 //时间和会议室初始化
initParams() { initParams() {
this.obj.startTime = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm');
this.nowDate = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm');
const data = this.navParams.get('data'); const data = this.navParams.get('data');
if (data) { if (data) {
this.obj.startTime = this.datePipe.transform(data.startTime, 'yyyy-MM-ddTHH:mm');
this.obj.roomId = data.roomId; this.obj.roomId = data.roomId;
this.obj.roomText = data.roomName; this.obj.roomText = data.roomName;
this.roomMax = `该会议室可容纳${data.accommodation}人`; this.roomMax = `该会议室可容纳${data.accommodation}人`;
this.obj.equipmervice = data.equipmervice.split(','); this.obj.equipmervice = data.equipmervice.split(',');
this.getEquipmervice(this.obj.equipmervice); this.getEquipmervice(this.obj.equipmervice);
} else {
const now = this.datePipe.transform(new Date(), 'yyyy-MM-dd') + ' 9:00';
this.obj.startTime = this.datePipe.transform(now, 'yyyy-MM-ddTHH:mm');
} }
} }
...@@ -127,6 +128,7 @@ export class RoomApplyPage { ...@@ -127,6 +128,7 @@ export class RoomApplyPage {
this.obj.startTime = this.datePipe.transform(res.startTime, 'yyyy-MM-ddTHH:mm'); this.obj.startTime = this.datePipe.transform(res.startTime, 'yyyy-MM-ddTHH:mm');
this.obj.endTime = this.datePipe.transform(res.endTime, 'yyyy-MM-ddTHH:mm'); this.obj.endTime = this.datePipe.transform(res.endTime, 'yyyy-MM-ddTHH:mm');
this.obj.remark = res.remark; this.obj.remark = res.remark;
this.obj.orgText = res.orgName;
this.obj.equipmervice = res.equipmervice.split(','); this.obj.equipmervice = res.equipmervice.split(',');
this.obj.participantAmount = res.participantAmount; this.obj.participantAmount = res.participantAmount;
this.obj.orgId = res.orgId; this.obj.orgId = res.orgId;
...@@ -155,7 +157,7 @@ export class RoomApplyPage { ...@@ -155,7 +157,7 @@ export class RoomApplyPage {
(res) => { (res) => {
this.orgList = res; this.orgList = res;
const org = <any>this.orgList.filter(e => e.name == this.mineInfo.orgName); const org = <any>this.orgList.filter(e => e.name == this.mineInfo.orgName);
if (org && org.length > 0) { if (org && org.length > 0 && !this.applyId) {
this.obj.orgText = org[0].name; this.obj.orgText = org[0].name;
this.obj.orgId = org[0].id; this.obj.orgId = org[0].id;
} }
...@@ -298,7 +300,6 @@ export class RoomApplyPage { ...@@ -298,7 +300,6 @@ export class RoomApplyPage {
} }
const max = this.roomMax.replace(/[^0-9]/ig, ""); const max = this.roomMax.replace(/[^0-9]/ig, "");
console.log(max);
if (isNaN(this.obj.participantAmount)) { if (isNaN(this.obj.participantAmount)) {
console.log("max is Nan"); console.log("max is Nan");
this.check.participantAmount = true; this.check.participantAmount = true;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<ion-item> <ion-item>
<ion-label class="item-left"><span class="color-red">*</span>用车时间:</ion-label> <ion-label class="item-left"><span class="color-red">*</span>用车时间:</ion-label>
<ion-datetime [disabled]="type == 'deal' " cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm" <ion-datetime [disabled]="type == 'deal' " cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
pickerFormat="YYYY MM DD HH mm" placeholder="请选择" pickerFormat="YYYY MM DD HH mm" placeholder="请选择" [max]="obj.endTime" [min]="nowDate"
[(ngModel)]="obj.startTime"></ion-datetime> [(ngModel)]="obj.startTime"></ion-datetime>
<ion-label class="right-arrow"> <ion-label class="right-arrow">
<ion-icon name="arrow-forward"></ion-icon> <ion-icon name="arrow-forward"></ion-icon>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<ion-item> <ion-item>
<ion-label class="item-left"><span class="color-red">*</span>还车时间:</ion-label> <ion-label class="item-left"><span class="color-red">*</span>还车时间:</ion-label>
<ion-datetime [disabled]="type == 'deal' " cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm" <ion-datetime [disabled]="type == 'deal' " cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
pickerFormat="YYYY MM DD HH mm" placeholder="请选择" pickerFormat="YYYY MM DD HH mm" placeholder="请选择" [min]="obj.startTime"
[(ngModel)]="obj.endTime"></ion-datetime> [(ngModel)]="obj.endTime"></ion-datetime>
<ion-label class="right-arrow"> <ion-label class="right-arrow">
<ion-icon name="arrow-forward"></ion-icon> <ion-icon name="arrow-forward"></ion-icon>
......
...@@ -28,13 +28,14 @@ page-car-apply { ...@@ -28,13 +28,14 @@ page-car-apply {
font-size: 1.4rem; font-size: 1.4rem;
} }
.segment-ios .segment-button{ .segment-ios .segment-button {
border-color: #e12724; border-color: #e12724;
color: #e12724; color: #e12724;
height: 2.2rem; height: 2.2rem;
line-height: 2rem; line-height: 2rem;
} }
.segment-ios .segment-button.segment-activated{
.segment-ios .segment-button.segment-activated {
background-color: #e12724; background-color: #e12724;
} }
...@@ -50,7 +51,7 @@ page-car-apply { ...@@ -50,7 +51,7 @@ page-car-apply {
font-size: 1.6rem; font-size: 1.6rem;
} }
.choose{ .choose {
text-align: right; text-align: right;
margin-right: 20px; margin-right: 20px;
font-size: 1.5rem; font-size: 1.5rem;
...@@ -118,10 +119,12 @@ page-car-apply { ...@@ -118,10 +119,12 @@ page-car-apply {
} }
} }
} }
ion-item,.item-box{
ion-item, .item-box {
position: relative; position: relative;
} }
.check-tips{
.check-tips {
position: absolute; position: absolute;
font-size: 1.2rem; font-size: 1.2rem;
top: 24px; top: 24px;
...@@ -135,8 +138,12 @@ page-car-apply { ...@@ -135,8 +138,12 @@ page-car-apply {
padding: 0; padding: 0;
min-height: 4rem; min-height: 4rem;
} }
.picker-columns > div:first-child,
.picker-columns > div:last-child{ .picker-columns > div:nth-child(2) button {
flex: 2; text-align: right;
}
.picker-columns > div:nth-child(6) button {
text-align: left;
} }
...@@ -34,6 +34,7 @@ export class CarApplyPage { ...@@ -34,6 +34,7 @@ export class CarApplyPage {
personList = []; personList = [];
applyId; //是否编辑 applyId; //是否编辑
type; type;
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public modalCtrl: ModalController, private serveSer: ServeService, public modalCtrl: ModalController,
...@@ -59,6 +60,10 @@ export class CarApplyPage { ...@@ -59,6 +60,10 @@ export class CarApplyPage {
} else { } else {
this.obj.startTime = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm'); this.obj.startTime = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm');
this.nowDate = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm');
console.log(this.obj)
console.log(this.nowDate)
} }
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<ion-item> <ion-item>
<ion-label class="item-left"><span class="color-red">*</span>到访时间:</ion-label> <ion-label class="item-left"><span class="color-red">*</span>到访时间:</ion-label>
<ion-datetime (ionChange)="change($event)" cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm" <ion-datetime (ionChange)="change($event)" cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
pickerFormat="YYYY MM DD HH mm" placeholder="请选择" pickerFormat="YYYY MM DD HH mm" placeholder="请选择" [min]="nowDate"
[(ngModel)]="obj.visitTime"></ion-datetime> [(ngModel)]="obj.visitTime"></ion-datetime>
<ion-label class="right-arrow"> <ion-label class="right-arrow">
<ion-icon name="arrow-forward"></ion-icon> <ion-icon name="arrow-forward"></ion-icon>
......
...@@ -28,6 +28,7 @@ export class VistorApplyPage { ...@@ -28,6 +28,7 @@ export class VistorApplyPage {
applyId; //是否编辑 applyId; //是否编辑
mineInfo; //申请人信息 mineInfo; //申请人信息
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController, constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController,
private serveSer: ServeService, public _modalCtrl: ModalController, private appMainSer: AppMainService, private serveSer: ServeService, public _modalCtrl: ModalController, private appMainSer: AppMainService,
...@@ -51,6 +52,7 @@ export class VistorApplyPage { ...@@ -51,6 +52,7 @@ export class VistorApplyPage {
//时间初始化 //时间初始化
initParams() { initParams() {
this.nowDate = this.datePipe.transform(new Date(), 'yyyy-MM-ddTHH:mm');
const data = this.navParams.get('data'); const data = this.navParams.get('data');
if (data) { if (data) {
// this.obj.visitTime = this.datePipe.transform(new Date(data.startTime).toISOString(), 'yyyy-MM-ddTHH:mm'); // this.obj.visitTime = this.datePipe.transform(new Date(data.startTime).toISOString(), 'yyyy-MM-ddTHH:mm');
......
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