|
@@ -241,6 +241,15 @@
|
|
|
uni.$showMsg('手机号格式错误!')
|
|
|
return
|
|
|
}
|
|
|
+ //判断此顾客信息是否已添加
|
|
|
+ if (JSON.stringify(this.checkinInfo) !== '{}' && this.checkinInfo.length > 0) {
|
|
|
+ for (let info of this.checkinInfo) {
|
|
|
+ if (info.idNumber === this.idNumber) {
|
|
|
+ uni.$showMsg('已添加此顾客,请检查填写信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//检查该顾客是否在当前酒店入住
|
|
|
let res = await uni.$http.post('/checkinInfo/queryByCondition', {
|
|
|
userIdNumber: this.idNumber,
|
|
@@ -257,16 +266,6 @@
|
|
|
let pages = getCurrentPages()
|
|
|
let beforePage = pages[pages.length - 2]
|
|
|
|
|
|
- //判断此顾客信息是否已添加
|
|
|
- if (JSON.stringify(this.checkinInfo) !== '{}' && this.checkinInfo.length > 0) {
|
|
|
- for (let info of this.checkinInfo) {
|
|
|
- if (info.idNumber === this.idNumber) {
|
|
|
- uni.$showMsg('已添加此顾客,请检查填写信息')
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
//判断本地缓存是否有顾客身份证信息,有则跳转step 2
|
|
|
for (const info of this.idCardInfo) {
|
|
|
if (info.idNumber === this.idNumber && info.name === this.name) {
|