| | |
| | | <div class="mdTxt">內容描述</div> |
| | | <div |
| | | class="smTxt text--bold text--primary cursor--pointer text--underline edit" |
| | | @click='isEdit = !isEdit' |
| | | @click='editMemo' |
| | | >編輯</div> |
| | | </div> |
| | | |
| | |
| | | |
| | | markAppointment() { |
| | | myConsultantService.markAsContact(this.client.id).then(data => { |
| | | // TODO: 要接後台傳回的 updated client 資料 - Ben 2021/11/16 |
| | | const updatedClient = {...this.client}; |
| | | updatedClient.communicateStatus = 'contacted'; |
| | | updatedClient.contactTime = new Date().toString(); |
| | | |
| | | this.updateMyAppointment(updatedClient); |
| | | this.updateMyAppointment(data); |
| | | this.isVisibleDialog = false; |
| | | }) |
| | | } |
| | |
| | | |
| | | private createMemo(params) { |
| | | appointmentService.createMemo(params).then(memoRes => { |
| | | this.updateStoreMemo(memoRes); |
| | | this.storeMemo(memoRes); |
| | | }); |
| | | } |
| | | |
| | | private updateMemo(params) { |
| | | appointmentService.updateMemo(params).then(memoRes => { |
| | | this.updateStoreMemo(memoRes); |
| | | this.storeMemo(memoRes); |
| | | }); |
| | | } |
| | | |
| | | private updateStoreMemo(memoRes) { |
| | | private storeMemo(memoRes) { |
| | | this.memoInfo = memoRes; |
| | | this.memo = this.memoInfo.content; |
| | | this.client.appointmentMemoList[0] = this.memoInfo; |
| | | this.isEdit = false; |
| | | } |
| | | |
| | | editMemo() { |
| | | this.isEdit = !this.isEdit; |
| | | this.memo = this.memoInfo.content; |
| | | } |
| | | |
| | | cancelEditMemo() { |
| | | this.isEdit = false; |
| | | this.memo = this.memoInfo.content; |