Commit fa77a0b2 authored by wangqinghua's avatar wangqinghua

初始化参数

parent 49f08228
......@@ -73,7 +73,7 @@
<ion-label class="item-left"><span class="color-red">*</span>参会人数:</ion-label>
<ion-input [(ngModel)]="obj.participantAmount" type="text" maxlength="20"
[placeholder]="roomMax"></ion-input>
<ion-label *ngIf="check.participantAmount" class="check-tips">请输入参会人数</ion-label>
<ion-label style="max-width: 100%" *ngIf="check.participantAmount" class="check-tips">参会人数不可大于会议室可容纳数({{roomMax}})</ion-label>
</ion-item>
<div class="item-box">
<div class="left"><span class="color-red">*</span>参会人员:
......
......@@ -26,7 +26,7 @@ export class RoomApplyPage {
personList: [],
remark: '',
participant: '',
participantAmount: '',
participantAmount: null,
equipmervice: [],
};
......@@ -185,7 +185,7 @@ export class RoomApplyPage {
handler: () => {
this.obj.roomId = e.id;
this.obj.roomText = e.name;
this.roomMax = `该会议室可容纳 ${e.accommodation}人`;
this.roomMax = `该会议室可容纳${e.accommodation}人`;
}
};
return data;
......@@ -275,6 +275,13 @@ export class RoomApplyPage {
}
submit() {
const max = this.roomMax.replace(/[^0-9]/ig, "");
console.log(max);
if (isNaN(this.obj.participantAmount) || this.obj.participantAmount > max) {
console.log(this.obj.participantAmount);
this.check.participantAmount = true;
return false;
}
//校验
let checkBool = false;
for (let i in this.check) {
......
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