wupengfei
6 小时以前 47047d626ea8fab28c04e6534fe6ffa3dc61de69
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<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(payAmount ?? 0)" unit="元" />
      </slot>
    </div>
    <div class="reserve-service-card-item-list">
      <div class="reserve-service-card-item">
        <div class="reserve-service-card-item-label">服务时间:</div>
        <div class="reserve-service-card-item-content">
          {{
            `${dayjs(beginTime).format('YYYY年MM月D日 HH:mm:ss')} - ${dayjs(endTime).format(
              'YYYY年MM月D日 HH:mm:ss'
            )}`
          }}
        </div>
      </div>
      <div class="reserve-service-card-item">
        <div class="reserve-service-card-item-label">服务地址:</div>
        <div class="reserve-service-card-item-content">
          {{ addressDetail }}
        </div>
      </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;
      display: flex;
      align-items: flex-start;
 
      .reserve-service-card-item-content {
        flex: 1;
        min-width: 0;
      }
 
      &: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>