This commit is contained in:
@@ -2,6 +2,7 @@ const planningApi = require('../../api/planning')
|
||||
const customersApi = require('../../api/customers')
|
||||
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
||||
const { showErrorToast, toUserMessage } = require('../../utils/toast')
|
||||
const { showActionModal } = require('../../utils/action-modal')
|
||||
|
||||
function displayValue(value, fallback) {
|
||||
if (value === null || value === undefined) return fallback
|
||||
@@ -127,21 +128,20 @@ Page({
|
||||
this.updateStatus(2)
|
||||
},
|
||||
|
||||
cancel() {
|
||||
async cancel() {
|
||||
if (!this.data.showCancel || this.data.updating) return
|
||||
this._cancelReason = ''
|
||||
wx.showModal({
|
||||
const result = await showActionModal(this, {
|
||||
title: '取消预约',
|
||||
editable: true,
|
||||
placeholderText: '可填写取消原因',
|
||||
content: '',
|
||||
cancelText: '取消',
|
||||
confirmText: '确认取消',
|
||||
success: result => {
|
||||
if (!result.confirm) return
|
||||
this._cancelReason = result.content || ''
|
||||
this.updateStatus(3)
|
||||
}
|
||||
confirmType: 'danger'
|
||||
})
|
||||
if (!result.confirm) return
|
||||
this._cancelReason = result.content || ''
|
||||
this.updateStatus(3)
|
||||
},
|
||||
|
||||
async dialCustomer() {
|
||||
|
||||
Reference in New Issue
Block a user