From 47047d626ea8fab28c04e6534fe6ffa3dc61de69 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 26 十二月 2025 16:09:22 +0800
Subject: [PATCH] feat: init
---
apps/bStandardMiniApp/src/subpackages/appointmentManage/appointmentManageDetail/InnerPage.vue | 73 ++++++++++++++++++++++++++++++++----
1 files changed, 65 insertions(+), 8 deletions(-)
diff --git a/apps/bStandardMiniApp/src/subpackages/appointmentManage/appointmentManageDetail/InnerPage.vue b/apps/bStandardMiniApp/src/subpackages/appointmentManage/appointmentManageDetail/InnerPage.vue
index 20f5aae..93df367 100644
--- a/apps/bStandardMiniApp/src/subpackages/appointmentManage/appointmentManageDetail/InnerPage.vue
+++ b/apps/bStandardMiniApp/src/subpackages/appointmentManage/appointmentManageDetail/InnerPage.vue
@@ -1,13 +1,36 @@
<template>
<!-- <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> -->
<ContentScrollView hasPaddingTop>
- <MineServiceDetailView />
+ <MineServiceDetailView
+ :contactName="detail?.name"
+ :contactPhoneNumber="detail?.contactPhoneNumber"
+ :addressDetail="detail?.addressDetail"
+ :serviceName="detail?.serviceName"
+ :price="detail?.specPrice"
+ :specName="detail?.specName"
+ :specNumber="detail?.specNumber"
+ :imgUrl="detail?.serviceFile"
+ statusText="棰勭害鐘舵��"
+ :beginTime="detail?.beginTime"
+ :endTime="detail?.endTime"
+ :supplierEnterpriseName="detail?.supplierEnterpriseName"
+ :remark="detail?.remark"
+ >
+ <template #status>
+ {{ EnumStandardOrderAppointmentStatusText[detail?.appointmentStatus] }}
+ </template>
+ </MineServiceDetailView>
</ContentScrollView>
- <PageFooter>
- <PageFooterBtn type="primary" class="business-card-btn" @click="goCancel"
+ <PageFooter
+ v-if="
+ detail?.appointmentStatus === EnumStandardOrderAppointmentStatus.WaitSure &&
+ detail?.payStatus !== EnumStandardOrderPayStatus.Completed
+ "
+ >
+ <PageFooterBtn class="business-card-btn" @click="cancelStandardOrderAppointment"
>鍙栨秷棰勭害</PageFooterBtn
>
- <PageFooterBtn type="primary" class="business-card-btn" @click="goConfirm"
+ <PageFooterBtn type="primary" class="business-card-btn" @click="handleSubmit"
>纭棰勭害</PageFooterBtn
>
</PageFooter>
@@ -17,8 +40,15 @@
<script setup lang="ts">
import { MineServiceDetailView } from '@12333/components';
import Taro from '@tarojs/taro';
-import * as standardServiceServices from '@12333/services/apiV2/standardService';
-import { RouterPath } from '@/constants';
+import {
+ EnumStandardOrderPayStatus,
+ EnumStandardOrderAppointmentStatus,
+ EnumStandardOrderAppointmentStatusText,
+} from '@12333/constants';
+import { useStandardOrder } from '@12333/hooks';
+import { Message } from '@12333/utils';
+import { goBack } from '@/utils';
+import * as standardOrderServices from '@12333/services/apiV2/standardOrder';
defineOptions({
name: 'InnerPage',
@@ -27,9 +57,36 @@
const route = Taro.useRouter();
const id = route.params?.id as string;
-function goCancel() {}
+const { detail } = useStandardOrder({
+ id: id,
+});
-function goConfirm() {}
+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">
--
Gitblit v1.10.0