Bladeren bron

Merge branch 'dev' of http://47.101.131.235:3000/LiChengjin/MiniScm into dev

Shu 3 maanden geleden
bovenliggende
commit
fcaa7487aa
1 gewijzigde bestanden met toevoegingen van 22 en 1 verwijderingen
  1. 22 1
      subpkg_checkin/addGuest/addGuest.vue

+ 22 - 1
subpkg_checkin/addGuest/addGuest.vue

@@ -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('请检查身份证照片')