保誠-保戶業務員媒合平台
Tomas
2022-04-27 85c39644533f93559ccf51cc4c8dfa7388d36cd4
fix#137058: 顧問管理流程 - 約訪記錄填寫日期需要卡控
修改3個檔案
23 ■■■■■ 已變更過的檔案
PAMapp/components/DateTimePicker.vue 6 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/Interview/InterviewAdd.vue 2 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/Ui/UiDatePicker.vue 15 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/DateTimePicker.vue
@@ -4,6 +4,7 @@
    <div class="dateTime">
        <UiDatePicker
            @changeDate="changeDateTime($event, 'date')"
            :disabledBeforeSpecificDate="disabledBeforeSpecificDate"
            :isPastDateDisabled="isPastDateDisabled"
            :isFutureDateDisabled="isFutureDateDisabled"
            :defaultValue="defaultValue"
@@ -35,6 +36,9 @@
    @Prop()
    isFutureDateDisabled!: boolean;
    @Prop()
    disabledBeforeSpecificDate?: string;
    @Emit('changeDateTime')
    changeDateTime(event, type) {
        if (type === 'date') {
@@ -62,4 +66,4 @@
    justify-content: space-between;
    font-size: 20px;
}
</style>
</style>
PAMapp/components/Interview/InterviewAdd.vue
@@ -21,8 +21,10 @@
              ><i class="icon-edit"></i></span>
          </el-col>
      </el-row>
      <template v-if="!interviewId || isEdit">
          <DateTimePicker
            :disabledBeforeSpecificDate="appointmentDetail.appointmentDate"
            @changeDateTime="interviewTime = $event"
            :defaultValue="defaultValue"
          ></DateTimePicker>
PAMapp/components/Ui/UiDatePicker.vue
@@ -31,6 +31,9 @@
    @Prop({default: false})
    isFutureDateDisabled!: boolean;
    @Prop()
    disabledBeforeSpecificDate?: string;
    @Emit('changeDate')
    changeDate() {
        return this.dateValue;
@@ -47,6 +50,16 @@
    get pickerOptions() {
        const date = new Date();
        const currentDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
        if (!!this.disabledBeforeSpecificDate) {
          const compareDate = new Date(this.disabledBeforeSpecificDate);
          return {
              disabledDate(time: Date) {
                  const pickedDate = `${time.getFullYear()}/${time.getMonth() + 1}/${time.getDate()}`;
                  return new Date(pickedDate).getTime() < compareDate.getTime();
              }
          }
        }
        if (this.isPastDateDisabled) {
            return {
@@ -68,4 +81,4 @@
    }
}
</script>
</script>