Commit bbd50545 authored by youjie's avatar youjie

no message

parent 65dc1fd3
...@@ -713,10 +713,11 @@ export default { ...@@ -713,10 +713,11 @@ export default {
return this.orderKey != ""; return this.orderKey != "";
}, },
async submit() { async submit() {
let roomGroupLen = this.msg.searchroomGroup.length; let roomGroupLen = this.msg.searchroomGroup.length;
//判断选择的人数与入住人数 //判断选择的人数与入住人数
let Count1=0 let Count1=0
let roomGroup = JSON.parse(JSON.stringify(this.parameters.roomGroup)) let roomGroup = this.parameters.roomGroup
roomGroup.forEach(x=>{ roomGroup.forEach(x=>{
Count1+= Number(x.roomMaleCount)+Number(x.roomFemaleCount)+Number(x.roomChildCount) Count1+= Number(x.roomMaleCount)+Number(x.roomFemaleCount)+Number(x.roomChildCount)
}) })
...@@ -727,6 +728,15 @@ export default { ...@@ -727,6 +728,15 @@ export default {
this.$message.error('入住人數與總入住數不匹配'); this.$message.error('入住人數與總入住數不匹配');
return; return;
} }
for (let i = 0; i < roomGroup.length; i++) {
roomGroup[i].roomMaleCount = roomGroup[i].roomMaleCount?roomGroup[i].roomMaleCount:0
roomGroup[i].roomFemaleCount = roomGroup[i].roomFemaleCount?roomGroup[i].roomFemaleCount:0
roomGroup[i].roomChildCount = roomGroup[i].roomChildCount?roomGroup[i].roomChildCount:0
if(!roomGroup[i].roomMaleCount&&!roomGroup[i].roomMaleCount){
this.$message.error('一個房間至少入住一人');
return;
}
}
this.parameters.CustomerId = this.userInfo.Id; this.parameters.CustomerId = this.userInfo.Id;
this.parameters.EmployeeIdStr = this.userInfo.Surname+this.userInfo.Name this.parameters.EmployeeIdStr = this.userInfo.Surname+this.userInfo.Name
this.$refs.mail.validate() this.$refs.mail.validate()
...@@ -736,12 +746,8 @@ export default { ...@@ -736,12 +746,8 @@ export default {
this.$refs.guestAddress.validate() this.$refs.guestAddress.validate()
this.$refs.checkInTime.validate() this.$refs.checkInTime.validate()
this.parameters.guestEmail = this.userInfo.Mailbox this.parameters.guestEmail = this.userInfo.Mailbox
for (let i = 0; i < this.parameters.roomGroup.length; i++) {
if(!this.parameters.roomGroup[i].roomMaleCount&&!this.parameters.roomGroup[i].roomMaleCount){
this.$message.error('一個房間至少入住一人');
return;
}
}
let flag = true let flag = true
......
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