保誠-保戶業務員媒合平台
charlie
2022-01-20 449084cb30b77ebb7ad77f1bb4cdc6942ff0d266
PAMapp/pages/appointment/_appointmentId/close/index.vue
@@ -15,7 +15,7 @@
        <el-row
          type="flex"
          class="pam-paragraph" style="flex-direction: column">
          <UiField label="保戶身分證字號" :labelSize="20">
          <UiField label="保戶身分證字號" :labelSize="20" class="required">
            <input
              class="appointment-client-detail-close__input"
              :class="{'is-invalid':!identityIdValid}"
@@ -31,7 +31,7 @@
        <el-row
          type="flex"
          class="pam-paragraph">
          <UiField label="商品代碼Plan Code" :labelSize="20">
          <UiField label="商品代碼Plan Code" :labelSize="20" class="required">
            <input
              class="appointment-client-detail-close__input"
              v-model="appointmentCloseInfo.planCode"
@@ -43,7 +43,7 @@
        <el-row
          type="flex"
          class="pam-paragraph">
          <UiField label="進件時間" :labelSize="20">
          <UiField label="進件時間" :labelSize="20" class="required">
            <DateTimePicker  @changeDateTime="appointmentCloseDate = $event"></DateTimePicker>
          </UiField>
        </el-row>
@@ -52,8 +52,9 @@
      <template v-if="appointmentCloseInfo.selectCloseOption === 'close'">
        <el-row
          class="pam-paragraph">
          <UiField label="未成交原因" :labelSize="20">
          <UiField label="未成交原因" :labelSize="20" class="required">
          </UiField>
            <div class="appointment-client-detail-close__selectbox">
              <select
                class="appointment-client-detail-close__select"
                name="closedReason" id="closedReason" v-model="appointmentCloseInfo.closedReason">
@@ -61,17 +62,18 @@
                  {{ failReason.key }}
                </option>
              </select>
              <i class="icon-down down-icon"></i>
            </div>
            <div style="display: flex" class="mt-10">
              <div style="display: flex" class="mt-10">
                <input
                  v-if="appointmentCloseInfo.closedReason === 'other'
                      || appointmentCloseInfo.closedReason === 'no_suitable_commodity'"
                  class="appointment-client-detail-close__input"
                  v-model="appointmentCloseInfo.closedOtherReason"
                  placeholder="請輸入原因,限50字。"
                  type="text">
              </div>
              <input
                v-if="appointmentCloseInfo.closedReason === 'other'
                    || appointmentCloseInfo.closedReason === 'no_suitable_commodity'"
                class="appointment-client-detail-close__input"
                v-model="appointmentCloseInfo.closedOtherReason"
                placeholder="請輸入原因,限50字。"
                type="text">
            </div>
        </el-row>
      </template>
@@ -221,17 +223,16 @@
      selectCloseOption,
      policyholderIdentityId,
      planCode,
      remark,
      closedReason,
      closedOtherReason
    } = this.appointmentCloseInfo;
    // this.appointmentCloseInfo.policyEntryDate 並沒有辦法取值到 this.appointmentCloseDate
    if (selectCloseOption === 'done') {
      return !policyholderIdentityId || !this.identityIdValid || !planCode || !this.appointmentCloseDate || !remark
      return !policyholderIdentityId || !this.identityIdValid || !planCode || !this.appointmentCloseDate
    } else if (closedReason === 'other' || closedReason === 'no_suitable_commodity') {
      return !closedOtherReason || !remark
      return !closedOtherReason
    }
    return !remark
    return false
  }
  get identityIdValid() {
@@ -252,11 +253,24 @@
  font-size: 20px;
  padding  : 10px 20px;
  width    : 100%;
  box-sizing: border-box;
  &::placeholder {
    color: $MID_GREY;
  }
  &.is-invalid {
    border-color: $PRIMARY_RED !important;
  }
}
.appointment-client-detail-close__selectbox {
  position: relative;
  & .appointment-client-detail-close__select{
    appearance: none;
  }
  & .down-icon {
    position: absolute;
    right: 7px;
    bottom: 10px;
  }
}
.invite-review{
@@ -269,4 +283,17 @@
    @extend .text--primary;
    height: 16px;
  }
  .required {
    position: relative;
    &::before {
      content: '*';
      font-size: 20px;
      font-weight: bold;
      position: absolute;
      color: #FF0000;
      transform: translateX(-5px);
      z-index: 5;
    }
  }
</style>