<template>
|
<!-- <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> -->
|
<ContentScrollView hasPaddingTop>
|
<MineServiceDetailView />
|
</ContentScrollView>
|
<PageFooter class="order-settle-bar">
|
<PageFooterBtn class="business-card-btn" @click="cancelStandardOrderAppointment"
|
>取消预约</PageFooterBtn
|
>
|
<PageFooterBtn type="primary" class="business-card-btn" @click="handleSubmit"
|
>确认预约</PageFooterBtn
|
>
|
</PageFooter>
|
<!-- </LoadingLayout> -->
|
</template>
|
|
<script setup lang="ts">
|
import { MineServiceDetailView } from '@12333/components';
|
import Taro from '@tarojs/taro';
|
import * as standardOrderServices from '@12333/services/apiV2/standardOrder';
|
import { Message } from '@12333/utils';
|
import { goBack } from '@/utils';
|
import { useStandardOrder } from '@12333/hooks';
|
|
defineOptions({
|
name: 'InnerPage',
|
});
|
|
const route = Taro.useRouter();
|
const id = route.params?.id as string;
|
|
const { detail } = useStandardOrder({
|
id: id,
|
});
|
|
async function cancelStandardOrderAppointment() {
|
try {
|
await Message.confirm({ message: '确认要取消预约吗?' });
|
let params: API.CancelStandardOrderAppointmentCommand = {
|
id: id,
|
};
|
let res = await standardOrderServices.cancelStandardOrderAppointment(params);
|
if (res) {
|
Message.success('操作成功');
|
goBack();
|
}
|
} catch (error) {}
|
}
|
|
async function handleSubmit() {
|
try {
|
let params: API.SureStandardOrderAppointmentCommand = {
|
id: id,
|
};
|
let res = await standardOrderServices.sureStandardOrderAppointment(params);
|
if (res) {
|
Message.success('操作成功');
|
goBack();
|
}
|
} catch (error) {}
|
}
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
|
.orderManageDetail-page-wrapper {
|
.order-settle-bar {
|
.order-settle-price-wrapper {
|
height: 100%;
|
flex: 1;
|
min-width: 0;
|
display: flex;
|
align-items: center;
|
margin-left: 28px;
|
|
.order-settle-price-label {
|
color: boleGetCssVar('text-color', 'primary');
|
}
|
}
|
}
|
}
|
</style>
|