| | |
| | | <template v-if="appointmentCloseInfo.selectCloseOption === 'done'"> |
| | | <el-row |
| | | type="flex" |
| | | class="pam-paragraph"> |
| | | class="pam-paragraph" style="flex-direction: column"> |
| | | <UiField label="保戶身分證字號" :labelSize="20"> |
| | | <input |
| | | class="appointment-client-detail-close__input" |
| | | :class="{'is-invalid':!identityIdValid}" |
| | | v-model="appointmentCloseInfo.policyholderIdentityId" |
| | | placeholder="請輸入" |
| | | type="text"> |
| | | </UiField> |
| | | <div class="error mt-5 mb-5" v-show="!identityIdValid"> |
| | | <span>身分證字號格式有誤</span> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-row |
| | |
| | | justify="center" |
| | | class="pam-paragraph"> |
| | | <el-button @click="$router.go(-1)">取消</el-button> |
| | | <el-button @click="closeAppointment">確認</el-button> |
| | | <el-button @click="closeAppointment" :disabled="isSubmitBtnDisabled">確認</el-button> |
| | | </el-row> |
| | | |
| | | <PopUpFrame :isOpen.sync="isShowSuccessAlert"> |
| | |
| | | this.$router.push(`/myAppointmentList/contactedList`); |
| | | } |
| | | |
| | | get isSubmitBtnDisabled() { |
| | | const { |
| | | selectCloseOption, |
| | | policyholderIdentityId, |
| | | planCode, |
| | | remark, |
| | | closedReason, |
| | | closedOtherReason |
| | | } = this.appointmentCloseInfo; |
| | | // this.appointmentCloseInfo.policyEntryDate 並沒有辦法取值到 this.appointmentCloseDate |
| | | if (selectCloseOption === 'done') { |
| | | return !policyholderIdentityId || !this.identityIdValid || !planCode || !this.appointmentCloseDate || !remark |
| | | } else if (closedReason === 'other' || closedReason === 'no_suitable_commodity') { |
| | | return !closedOtherReason || !remark |
| | | } |
| | | return !remark |
| | | } |
| | | |
| | | get identityIdValid() { |
| | | const rule = /^[A-Z]\d{9}$/; |
| | | const identityId = this.appointmentCloseInfo.policyholderIdentityId; |
| | | return identityId ? rule.test(identityId) : true; |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | |
| | | &::placeholder { |
| | | color: $MID_GREY; |
| | | } |
| | | &.is-invalid { |
| | | border-color: $PRIMARY_RED !important; |
| | | } |
| | | } |
| | | .invite-review{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | .error { |
| | | @extend .smTxt_bold; |
| | | @extend .text--primary; |
| | | height: 16px; |
| | | } |
| | | </style> |