diff --git a/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js b/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js index 2cd25a3..3327c49 100644 --- a/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js +++ b/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js @@ -179,7 +179,7 @@ const optionSelect = { - + @@ -387,7 +387,9 @@ const optionSelect = { this.selectedRadioId = null this.contactForm = { mobile: "", - receiveAddress: "" + receiveAddress: "", + userName: "", + userSign: "" } this.getProjectInfo() @@ -439,6 +441,7 @@ const optionSelect = { if (this.userSelection && this.userSelection.length > 0) { this.contactForm.mobile = this.userSelection[0]?.mobile + this.$set(this.contactForm, "userSign", this.userSelection[0]?.userSign || "") } else { if (this.isProxySelect) { // 否则使用默认手机号 @@ -494,6 +497,11 @@ const optionSelect = { if (!valid) { return } + // 仅“需要签字”时校验签字,避免默认“不签字”的项目仍展示或提交签字字段 + if (this.projectInfo.signMode === 2 && !this.contactForm.userSign) { + this.$message.warning("请签字") + return + } if (this.isSubmitting) return this.isSubmitting = true @@ -509,7 +517,7 @@ const optionSelect = { selectNum: 1, mobile: this.contactForm.mobile, userName: this.contactForm.userName, - userSign: this.contactForm.userSign, + userSign: this.projectInfo.signMode === 2 ? this.contactForm.userSign : "", receiveAddress: this.contactForm.receiveAddress } ] @@ -522,7 +530,7 @@ const optionSelect = { selectNum: option.selectNum, mobile: this.contactForm.mobile, userName: this.contactForm.userName, - userSign: this.contactForm.userSign, + userSign: this.projectInfo.signMode === 2 ? this.contactForm.userSign : "", receiveAddress: this.contactForm.receiveAddress })) }