保誠-保戶業務員媒合平台
Jack
2022-01-20 8569be7fee25fd327800f9c8b73aaf1ee3dd83bc
Merge branch 'Phase3' of ssh://dev.pollex.com.tw:29418/pcalife/PAM into Phase3
修改1個檔案
48 ■■■■ 已變更過的檔案
PAMapp/pages/appointment/_appointmentId/close/index.vue 48 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/appointment/_appointmentId/close/index.vue
@@ -14,14 +14,18 @@
      <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
@@ -40,7 +44,7 @@
          type="flex"
          class="pam-paragraph">
          <UiField label="進件時間" :labelSize="20">
          <DateTimePicker  @changeDateTime="appointmentCloseDate = $event"></DateTimePicker>
            <DateTimePicker  @changeDateTime="appointmentCloseDate = $event"></DateTimePicker>
          </UiField>
        </el-row>
      </template>
@@ -100,7 +104,7 @@
        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">
@@ -212,6 +216,30 @@
    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>
@@ -227,10 +255,18 @@
  &::placeholder {
    color: $MID_GREY;
  }
  &.is-invalid {
    border-color: $PRIMARY_RED !important;
  }
}
.invite-review{
    display: flex;
    flex-direction: column;
    align-items: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
 .error {
    @extend .smTxt_bold;
    @extend .text--primary;
    height: 16px;
  }
</style>