|
@@ -747,8 +747,29 @@
|
|
|
// #endif
|
|
|
}
|
|
|
},
|
|
|
- finishIdCardUpload() {
|
|
|
+ async finishIdCardUpload() {
|
|
|
if (this.getAllInfo) {
|
|
|
+ //判断此顾客信息是否已添加
|
|
|
+ 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,
|
|
|
+ status: 1,
|
|
|
+ hotelId: this.currentHotel.hotelId,
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 1
|
|
|
+ })
|
|
|
+ if (res.data.code == 200 && res.data.data.records.length > 0) {
|
|
|
+ uni.$showMsg('该顾客已入住!')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.step = 'checkIdentity'
|
|
|
} else {
|
|
|
uni.$showMsg('请检查身份证照片')
|