<template>
|
<div class="reserve-service-card-wrapper" :class="{ 'un-read': unRead }">
|
<div class="reserve-service-card-title-wrapper">
|
<div class="reserve-service-card-title">{{ serviceName }}</div>
|
<slot name="title-right">
|
<TaskPrice :value="toThousand(serviceFee ?? 0)" unit="元" />
|
</slot>
|
</div>
|
<div class="reserve-service-card-item-list">
|
<div class="reserve-service-card-item">
|
服务时间:{{
|
`${dayjs(beginTime).format('YYYY年MM月D日 HH:mm:ss')} - ${dayjs(endTime).format(
|
'YYYY年MM月D日 HH:mm:ss'
|
)}`
|
}}
|
</div>
|
<div class="reserve-service-card-item">服务地址:{{ addressDetail }}</div>
|
</div>
|
|
<div class="reserve-service-card-footer">
|
<div class="reserve-service-card-left">
|
<div class="reserve-service-card-footer-address">
|
<slot name="serviceCustome"> 服务机构:{{ supplierEnterpriseName }} </slot>
|
</div>
|
</div>
|
<div class="reserve-service-card-status">
|
<slot name="status">
|
{{ EnumStandardOrderAppointmentStatusText[appointmentStatus] }}
|
</slot>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
import {
|
EnumStandardOrderAppointmentStatus,
|
EnumEnterpriseCooperationServiceFeeCollectType,
|
EnumStandardOrderSettlementStatus,
|
EnumStandardOrderPayStatus,
|
EnumStandardOrderAppointmentStatusText,
|
} from '@12333/constants';
|
import dayjs from 'dayjs';
|
import { toThousand } from '@12333/utils';
|
import { TaskPrice } from '@12333/components';
|
|
defineOptions({
|
name: 'ReserveServiceCard',
|
});
|
|
type Props = {
|
/** Id */
|
id?: string;
|
/** 订单号 */
|
code?: string;
|
/** 服务名 */
|
serviceName?: string;
|
/** 服务单号 */
|
serviceCode?: string;
|
/** 服务图片 */
|
serviceFile?: string;
|
/** 省市区+详细地址+门牌号 */
|
addressDetail?: string;
|
/** 服务起始时间 */
|
beginTime?: string;
|
/** 服务截止时间 */
|
endTime?: string;
|
/** 下单用户Id */
|
createdUserId?: string;
|
/** 下单用户 */
|
createdUserName?: string;
|
/** 联系电话 */
|
createdUserContactPhoneNumber?: string;
|
/** 下单时间 */
|
createdTime?: string;
|
appointmentStatus?: EnumStandardOrderAppointmentStatus;
|
/** 甲方企业Id */
|
partyAEnterpriseId?: string;
|
/** 甲方企业 */
|
partyAEnterpriseName?: string;
|
/** 供应商Id */
|
supplierEnterpriseId?: string;
|
/** 供应商 */
|
supplierEnterpriseName?: string;
|
/** 服务人员 */
|
serverNames?: string;
|
/** 服务人员联系电话 */
|
serverContactPhoneNumbers?: string;
|
payStatus?: EnumStandardOrderPayStatus;
|
/** 支付完成时间 */
|
payCompletedTime?: string;
|
/** 实付金额 */
|
payAmount?: number;
|
/** 实收金额 */
|
receiveAmount?: number;
|
serviceFeeCollectType?: EnumEnterpriseCooperationServiceFeeCollectType;
|
/** 服务费 */
|
serviceFee?: number;
|
settlementStatus?: EnumStandardOrderSettlementStatus;
|
/** 结算单号 */
|
settlementCode?: string;
|
/** 结算时间 */
|
settlementTime?: string;
|
/** 结算金额 */
|
settlementAmount?: number;
|
|
unRead?: boolean;
|
showActions?: boolean;
|
};
|
|
const props = withDefaults(defineProps<Props>(), {
|
showActions: true,
|
|
unRead: false,
|
});
|
|
const emit = defineEmits<{
|
(e: 'apply', id: string): void;
|
}>();
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
|
.reserve-service-card-wrapper {
|
padding: 24px 32px;
|
margin-bottom: 24px;
|
background-color: #fff;
|
border-radius: 12px;
|
|
.task-price {
|
color: boleGetCssVar('color', 'danger');
|
}
|
|
&.un-read {
|
position: relative;
|
|
&::before {
|
content: '';
|
position: absolute;
|
width: 12px;
|
height: 12px;
|
border-radius: 50%;
|
background-color: red;
|
right: 18px;
|
top: 12px;
|
}
|
}
|
|
&:last-child {
|
margin-bottom: 0;
|
}
|
|
.reserve-service-card-title-wrapper {
|
display: flex;
|
align-items: center;
|
margin-bottom: 14px;
|
|
.reserve-service-card-title {
|
flex: 1;
|
min-width: 0;
|
@include ellipsis;
|
font-size: 30px;
|
color: boleGetCssVar('text-color', 'primary');
|
line-height: 42px;
|
}
|
}
|
|
.reserve-service-card-item-list {
|
margin-bottom: 6px;
|
|
.reserve-service-card-item {
|
font-size: 24px;
|
color: boleGetCssVar('text-color', 'regular');
|
line-height: 36px;
|
margin-bottom: 6px;
|
|
&:last-child {
|
margin-bottom: 0;
|
}
|
}
|
}
|
|
.reserve-service-card-footer {
|
display: flex;
|
align-items: center;
|
|
.reserve-service-card-left {
|
flex: 1;
|
min-width: 0;
|
display: flex;
|
align-items: center;
|
|
.reserve-service-card-footer-address {
|
font-size: 24px;
|
color: boleGetCssVar('text-color', 'regular');
|
line-height: 36px;
|
flex: 1;
|
min-width: 0;
|
@include ellipsis;
|
}
|
}
|
|
.reserve-service-card-status {
|
font-size: 32px;
|
color: boleGetCssVar('text-color', 'regular');
|
line-height: 36px;
|
}
|
}
|
}
|
</style>
|