diff --git a/src/main/resources/views/mobile/therapyRecuperation/baseManagement.html b/src/main/resources/views/mobile/therapyRecuperation/baseManagement.html index 0904e8a..8eda315 100644 --- a/src/main/resources/views/mobile/therapyRecuperation/baseManagement.html +++ b/src/main/resources/views/mobile/therapyRecuperation/baseManagement.html @@ -223,9 +223,6 @@ layout("/mobile/platform.html"){
- {{baseData.baseName}}
@@ -250,16 +247,9 @@ layout("/mobile/platform.html"){
- - 上下滑动翻页,单击查看图片,再单击返回
-
@@ -354,36 +344,6 @@ layout("/mobile/platform.html"){ - - - - - - - - - - - - - - - - - - @@ -499,7 +459,7 @@ layout("/mobile/platform.html"){ async openRead(){ const url = '/platform/theRapyRecuperation/baseManagement/showBaseApplyPdf?baseName=' + (this.formData.baseName ? this.formData.baseName : '') + '&specificTime=' + (this.formData.specificTime ? this.formData.specificTime : '') - + '&sign=' + (this.formData.sign ? this.configData.sign : '') + '&idCard=' + (this.formData.idCard ? this.formData.idCard : '') + + '&sign=' + (this.formData.sign ? this.formData.sign : '') + '&idCard=' + (this.formData.idCard ? this.formData.idCard : '') this.readVisible = true this.$nextTick(() => { @@ -525,43 +485,6 @@ layout("/mobile/platform.html"){ this.$set(this.formData, "specificTime", moment(date).format('YYYY年MM月DD日')) this.timeVisible = false }, - getAgeAndSex(item){ - try { - const value = item.idCard - const age = this.calculateAgeFromIdCard(value) - this.$set(item, "age", age) - - const sex = this.getGenderFromIdCard(value) - this.$set(item, "sex", sex) - } catch (error) { - console.log(error) - } - }, - roomCancel() { - if (!this.self) { - this.formData.companionList[this.active].bedInfo.bedType = '' - } - this.roomVisible = false - }, - roomConfirm(value, index) { - if (this.self) { - this.formData.bedInfo.bedType = value - } else { - this.formData.companionList[this.active].bedInfo.bedType = value - } - this.roomVisible = false - }, - bedConfirm(value, index) { - if (this.self) { - this.formData.bedInfo.bedNum = value - } else { - this.formData.companionList[this.active].bedInfo.bedNum = value - } - this.bedVisible = false - }, - validator(value) { - return value != null - }, async joinSubmit() { if (this.hasReadSafe === false) { this.$toast('请先阅读安全告知书') @@ -572,7 +495,7 @@ layout("/mobile/platform.html"){ return } if (!this.formData.sign) { - this.$toast.fail('请签字') + this.$toast('请签字') return } this.formData.editOther = this.editOther ? this.editOther : '' @@ -613,12 +536,6 @@ layout("/mobile/platform.html"){ // on cancel }) }, - addCompanion() { - this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}}) - }, - delCompanion() { - this.formData.companionList.splice(this.active, 1) - }, async join() { const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', { enroll: JSON.stringify({ @@ -710,106 +627,7 @@ layout("/mobile/platform.html"){ }) this.minDate = new Date(res.data.minDate) this.maxDate = new Date(res.data.maxDate) - }, - calculateAgeFromIdCard(idCard) { - // 检查身份证号码是否合法 - if (!idCard) { - throw new Error("Invalid ID card format") - } - - let birthDateStr - let birthYear, birthMonth, birthDay - - // 处理18位身份证号码 - if (idCard.length === 18) { - birthDateStr = idCard.substring(6, 14) - birthYear = parseInt(birthDateStr.substring(0, 4), 10) - birthMonth = parseInt(birthDateStr.substring(4, 6), 10) - 1 // 月份从0开始 - birthDay = parseInt(birthDateStr.substring(6, 8), 10) - } - // 处理15位身份证号码 - else if (idCard.length === 15) { - birthDateStr = idCard.substring(6, 12) - birthYear = parseInt("19" + birthDateStr.substring(0, 2), 10) // 使用字符串拼接 - birthMonth = parseInt(birthDateStr.substring(2, 4), 10) - 1 // 月份从0开始 - birthDay = parseInt(birthDateStr.substring(4, 6), 10) - } else { - throw new Error("Invalid ID card format. Only 15 or 18 digits are supported.") - } - - // 获取当前日期 - const currentDate = new Date() - - // 计算年龄 - let age = currentDate.getFullYear() - birthYear - - // 如果当前日期还没过生日,则年龄减1 - if (currentDate.getMonth() < birthMonth || (currentDate.getMonth() === birthMonth && currentDate.getDate() < birthDay)) { - age -= 1 - } - - return age - }, - getGenderFromIdCard(idCard) { - // 检查身份证号码是否合法 - if (!idCard) { - throw new Error("Invalid ID card format") - } - - let genderDigit - - // 处理18位身份证号码 - if (idCard.length === 18) { - genderDigit = parseInt(idCard.charAt(16), 10) // 第17位 - } - // 处理15位身份证号码 - else if (idCard.length === 15) { - genderDigit = parseInt(idCard.charAt(14), 10) // 第15位 - } else { - throw new Error("Invalid ID card format. Only 15 or 18 digits are supported.") - } - - // 判断性别 - if (genderDigit % 2 === 0) { - return "女" - } else { - return "男" - } - }, - validateIdCard(idCard) { - if (!idCard) { - return false - } - - // 18位身份证号码校验 - if (idCard.length === 18) { - const idCardRegex = /^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/ - if (!idCardRegex.test(idCard)) { - return false - } - - // 校验码计算 - const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] - const checksums = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"] - let sum = 0 - for (let i = 0; i < 17; i++) { - sum += idCard[i] * weights[i] - } - const checksum = checksums[sum % 11] - return checksum === idCard[17].toUpperCase() - } - - // 15位身份证号码校验 - else if (idCard.length === 15) { - const idCardRegex = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/ - return idCardRegex.test(idCard) - } - - // 外国人或其他情况 - else { - return false - } - }, + } }, async created() { // 修改其他线路标识 diff --git a/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html b/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html index ac8a47c..07b47f9 100644 --- a/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html +++ b/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html @@ -806,11 +806,11 @@ layout("/mobile/platform.html"){ url = '/platform/theRapyRecuperation/line/enroll/doSignUpForLine' } - const msg = this.editOther ? ('此操作会取消之前报名线路,并修改为【'+ this.formData.lineName +'】是否确认?') : '请确保信息填写无误,是否确认?' + const msg = this.editOther ? ('此操作会取消之前报名线路,并修改为【'+ this.formData.lineName +'】是否确认提交?') : '请确保信息填写无误,是否确认提交?' vant.Dialog.confirm({ title: '温馨提示', message: msg, - confirmButtonText: '确认', + confirmButtonText: '提交', cancelButtonText: '取消', }).then(async () => { this.showButton = false diff --git a/src/main/resources/views/platform/theRapyRecuperation/mine/index.html b/src/main/resources/views/platform/theRapyRecuperation/mine/index.html index e583181..63fe9d9 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/mine/index.html +++ b/src/main/resources/views/platform/theRapyRecuperation/mine/index.html @@ -32,7 +32,7 @@ layout("/layouts/platform.html"){ - + - + + @@ -123,11 +124,16 @@ layout("/layouts/platform.html"){ + + + +