From 66a8dd0cfd0122aee97a6f6859407630d6b4d384 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期四, 13 一月 2022 16:51:45 +0800 Subject: [PATCH] update: appointmentService - add closeAppointment() --- PAMapp/shared/services/appointment.service.ts | 11 ++++++++--- PAMapp/shared/models/enum/contact-status.ts | 8 ++++++++ PAMapp/shared/models/appointment.model.ts | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/PAMapp/shared/models/appointment.model.ts b/PAMapp/shared/models/appointment.model.ts index 8919dc9..c6b5d13 100644 --- a/PAMapp/shared/models/appointment.model.ts +++ b/PAMapp/shared/models/appointment.model.ts @@ -1,3 +1,5 @@ +import { ContactStatus } from "./enum/contact-status"; + export interface AppointmentLog { id : number; createdDate : string; @@ -130,3 +132,20 @@ content: string; id : number; } + +export interface ToDoneAppointment { + appointmentId : number; + contactStatus : ContactStatus; + planCode : string; + policyEntryDate : string; + policyholderIdentityId: string; +} + +export interface ToCloseAppointment { + appointmentId : number; + closedOtherReason: string; + closedReason : string; + contactStatus : ContactStatus; + remark : string; +} + diff --git a/PAMapp/shared/models/enum/contact-status.ts b/PAMapp/shared/models/enum/contact-status.ts new file mode 100644 index 0000000..782ce6b --- /dev/null +++ b/PAMapp/shared/models/enum/contact-status.ts @@ -0,0 +1,8 @@ +export enum ContactStatus { + PICKED = 'picked', + RESERVED = 'reserved', + CONTACTED = 'contacted', + DONE = 'done', + CLOSE = 'close', + CANCEL = 'cancel', +} diff --git a/PAMapp/shared/services/appointment.service.ts b/PAMapp/shared/services/appointment.service.ts index a97c333..a928a4f 100644 --- a/PAMapp/shared/services/appointment.service.ts +++ b/PAMapp/shared/services/appointment.service.ts @@ -1,6 +1,6 @@ import { http } from "./httpClient"; -import { Appointment, AppointmentDetail, AppointmentMemoInfo, createdMemoInfo, EditAppointmentParams, updatedMemoInfo } from "~/shared/models/appointment.model"; +import { Appointment, AppointmentDetail, AppointmentMemoInfo, createdMemoInfo, EditAppointmentParams, ToCloseAppointment, ToDoneAppointment, updatedMemoInfo } from "~/shared/models/appointment.model"; class AppointmentService { @@ -41,12 +41,12 @@ } // �憓酉閮� - createMemo(memoInfo: createdMemoInfo): Promise<AppointmentMemoInfo> { + async createMemo(memoInfo: createdMemoInfo): Promise<AppointmentMemoInfo> { return http.post('/appointment/memo/create', memoInfo).then(res => res.data); } // 蝺刻摩閮餉�� - updateMemo(memoInfo: updatedMemoInfo): Promise<AppointmentMemoInfo> { + async updateMemo(memoInfo: updatedMemoInfo): Promise<AppointmentMemoInfo> { return http.post('/appointment/memo/update', memoInfo).then(res => res.data); } @@ -54,6 +54,11 @@ deleteMemo(appointmentMemoId: number) { return http.delete(`/appointment/memo/${appointmentMemoId}`) } + + // ���蝯�� + async closeAppointment(appointmentInfo: ToDoneAppointment | ToCloseAppointment) { + return http.post(`/appointment/close`, appointmentInfo).then((res) => res.data); + } } export default new AppointmentService(); -- Gitblit v1.8.0