外宿申请-已经有申请记录不能继续申请
This commit is contained in:
@@ -647,7 +647,16 @@ export default {
|
||||
},
|
||||
// 跳转申请表
|
||||
openForm() {
|
||||
this.$router.push("/dormitory/outsideAccommodation/applicationForm");
|
||||
// 利用some方法快速判断是否存在重复申请(找到匹配项后立即终止遍历)
|
||||
const isDuplicate = this.outsideAccommodationApplyList?.some(element =>
|
||||
element.studentName === this.user?.nickName && element.studentNo === this.user?.userName
|
||||
) || false;
|
||||
|
||||
if (isDuplicate) {
|
||||
this.$message.error('您已经申请过了,请勿重新申请!');
|
||||
} else {
|
||||
this.$router.push("/dormitory/outsideAccommodation/applicationForm");
|
||||
}
|
||||
},
|
||||
detail(row) {
|
||||
this.$router.push({
|
||||
|
||||
Reference in New Issue
Block a user