|
|
@@ -45,21 +45,11 @@
|
|
|
</FormDialog>
|
|
|
|
|
|
<!-- 取消预约弹窗 -->
|
|
|
- <FormDialog
|
|
|
- class="cancel_appointment_dialog"
|
|
|
+ <CancelAppointmentDialog
|
|
|
+ v-model:visible="cancelAppointmentDialogVisible"
|
|
|
:defaultFormData="cancelAppointmentDefaultFormData"
|
|
|
- title="取消预约" :submitLoading="false"
|
|
|
- :formItemList="cancelAppointmentFormItemList"
|
|
|
- :visible="cancelAppointmentDialogVisible"
|
|
|
- @close="CloseCancelAppointmentDialog"
|
|
|
@confirm="HandleCancelAppointmentConfirm">
|
|
|
- <template #form_pre>
|
|
|
- <div class="desc">
|
|
|
- {{ cancelAppointmentDefaultFormData.appointmentTime}} {{ cancelAppointmentDefaultFormData.school}}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </FormDialog>
|
|
|
-
|
|
|
+ </CancelAppointmentDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -70,8 +60,9 @@ import SearchBlock from '@/baseComponents/SearchBlock.vue';
|
|
|
import TimeNavLine from '@/baseComponents/TimeNavLine.vue';
|
|
|
import FollowCard from '@/components/FollowCard.vue';
|
|
|
import FormDialog from '@/baseComponents/FormDialog.vue';
|
|
|
-import {appointmentFormItemList,cancelAppointmentFormItemList} from './formDialog'
|
|
|
+import {appointmentFormItemList} from './formDialog'
|
|
|
|
|
|
+import CancelAppointmentDialog from '@/components/CancelAppointmentDialog/index.vue'
|
|
|
|
|
|
import {blockSearchList} from './searchBlock'
|
|
|
|
|
|
@@ -87,7 +78,6 @@ const props = defineProps({
|
|
|
type:Array
|
|
|
},
|
|
|
})
|
|
|
-
|
|
|
const emit = defineEmits(['searchChange'])
|
|
|
|
|
|
|
|
|
@@ -102,7 +92,7 @@ const appointmentStatusToClass = (status)=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 筛选项触发的变化
|
|
|
+// 1. 筛选项触发的变化
|
|
|
const HandleSearchChange = (params,key)=>{
|
|
|
blockSearchList.value = blockSearchList.value.map(item=>{
|
|
|
switch(item.key){
|
|
|
@@ -116,7 +106,7 @@ const HandleSearchChange = (params,key)=>{
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查看预约详情弹窗
|
|
|
+ * 2. 查看预约详情弹窗
|
|
|
*/
|
|
|
const appointmentDialogVisible = ref(false)
|
|
|
const appointmentDefaultFormData = ref({})
|
|
|
@@ -143,25 +133,22 @@ const CloseAppointmentDialog = ()=>{
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 取消预约弹窗
|
|
|
+ * 3. 取消预约弹窗
|
|
|
*/
|
|
|
const cancelAppointmentDialogVisible = ref(false)
|
|
|
const cancelAppointmentDefaultFormData = ref({})
|
|
|
const OpenCancelAppointmentDialog = (row,navItm)=>{
|
|
|
cancelAppointmentDialogVisible.value = true
|
|
|
cancelAppointmentDefaultFormData.value = {
|
|
|
- school:row.headerTitleList[0],
|
|
|
+ id:row.id,
|
|
|
+ customerName:row.headerTitleList[0],
|
|
|
appointmentTime:navItm.orderDatetime,
|
|
|
cancelReason:''
|
|
|
}
|
|
|
}
|
|
|
-const CloseCancelAppointmentDialog = ()=>{
|
|
|
- cancelAppointmentDialogVisible.value = false
|
|
|
-}
|
|
|
-const HandleCancelAppointmentConfirm = (params)=>{
|
|
|
- const {formData,formRef} = params
|
|
|
- console.log('取消预约',formData.cancelReason)
|
|
|
- CloseCancelAppointmentDialog()
|
|
|
+const HandleCancelAppointmentConfirm = ()=>{
|
|
|
+ cancelAppointmentDefaultFormData.value = {}
|
|
|
+ emit('searchChange',{})
|
|
|
}
|
|
|
|
|
|
watch(()=>props.followerList,(newVal)=>{
|
|
|
@@ -247,14 +234,5 @@ watch(()=>props.orderStatusList,(newVal)=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.cancel_appointment_dialog{
|
|
|
- .desc{
|
|
|
- line-height: 22px;
|
|
|
- font-weight: 600;
|
|
|
- font-size: 16px;
|
|
|
- color: #333333;
|
|
|
- margin-bottom: 16px;
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
</style>
|