af-mobile-client-vue3 1.4.24 → 1.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,168 +1,168 @@
1
- <script setup lang="ts">
2
- import { Icon as VanIcon } from 'vant'
3
-
4
- interface ChargeItem {
5
- id: number
6
- workOrderCode?: string
7
- workOrderId?: string
8
- type: string
9
- item: string
10
- unitPrice: number
11
- quantity: number
12
- total: string
13
- }
14
-
15
- defineProps<{
16
- item: ChargeItem
17
- index: number
18
- isWorkOrder?: boolean
19
- workOrderData?: any
20
- }>()
21
-
22
- defineEmits<{
23
- (e: 'remove', id: number): void
24
- }>()
25
-
26
- function formatPrice(price: number): string {
27
- return price.toFixed(2)
28
- }
29
- </script>
30
-
31
- <template>
32
- <div class="other-charge-item">
33
- <div class="other-charge-item__header">
34
- <h5 class="other-charge-item__title">
35
- 费用项 #{{ index + 1 }}
36
- </h5>
37
- <VanIcon
38
- name="cross"
39
- class="other-charge-item__delete"
40
- @click="$emit('remove', item.id)"
41
- />
42
- </div>
43
-
44
- <div class="other-charge-item__info">
45
- <div v-if="isWorkOrder" class="other-charge-item__field">
46
- <p class="other-charge-item__label">
47
- 所属工单
48
- </p>
49
- <p class="other-charge-item__value">
50
- {{ item.workOrderCode }}
51
- </p>
52
- </div>
53
- <div class="other-charge-item__field">
54
- <p class="other-charge-item__label">
55
- 收费类型
56
- </p>
57
- <p class="other-charge-item__value">
58
- {{ item.type }}
59
- </p>
60
- </div>
61
- <div class="other-charge-item__field">
62
- <p class="other-charge-item__label">
63
- 具体项目
64
- </p>
65
- <p class="other-charge-item__value">
66
- {{ item.item }}
67
- </p>
68
- </div>
69
- </div>
70
-
71
- <div class="other-charge-item__details">
72
- <div class="other-charge-item__field">
73
- <p class="other-charge-item__label">
74
- 单价
75
- </p>
76
- <p class="other-charge-item__value">
77
- ¥{{ formatPrice(item.unitPrice) }}
78
- </p>
79
- </div>
80
- <div class="other-charge-item__field">
81
- <p class="other-charge-item__label">
82
- 数量
83
- </p>
84
- <p class="other-charge-item__value">
85
- {{ item.quantity }}
86
- </p>
87
- </div>
88
- <div class="other-charge-item__field">
89
- <p class="other-charge-item__label">
90
- 小计
91
- </p>
92
- <p class="other-charge-item__value--highlight">
93
- ¥{{ item.total }}
94
- </p>
95
- </div>
96
- </div>
97
- </div>
98
- </template>
99
-
100
- <style scoped lang="less">
101
- .other-charge-item {
102
- background-color: #f9fafb;
103
- padding: 12px;
104
- border-radius: 6px;
105
- border: 1px solid #e5e7eb;
106
- margin-bottom: 12px;
107
-
108
- &__header {
109
- display: flex;
110
- justify-content: space-between;
111
- align-items: flex-start;
112
- margin-bottom: 8px;
113
- }
114
-
115
- &__title {
116
- font-size: 12px;
117
- font-weight: 500;
118
- color: #374151;
119
- margin: 0;
120
- }
121
-
122
- &__delete {
123
- color: #ef4444;
124
- font-size: 16px;
125
-
126
- &:active {
127
- color: #b91c1c;
128
- }
129
- }
130
-
131
- &__info {
132
- display: grid;
133
- grid-template-columns: 1fr 1fr;
134
- gap: 12px;
135
- margin-bottom: 8px;
136
- }
137
-
138
- &__details {
139
- display: grid;
140
- grid-template-columns: 1fr 1fr 1fr;
141
- gap: 12px;
142
- }
143
-
144
- &__field {
145
- margin-bottom: 0;
146
- }
147
-
148
- &__label {
149
- font-size: 12px;
150
- color: #6b7280;
151
- margin: 0 0 2px 0;
152
- }
153
-
154
- &__value {
155
- font-size: 14px;
156
- font-weight: 500;
157
- color: #1f2937;
158
- margin: 0;
159
-
160
- &--highlight {
161
- font-size: 14px;
162
- font-weight: 500;
163
- color: #2563eb;
164
- margin: 0;
165
- }
166
- }
167
- }
168
- </style>
1
+ <script setup lang="ts">
2
+ import { Icon as VanIcon } from 'vant'
3
+
4
+ interface ChargeItem {
5
+ id: number
6
+ workOrderCode?: string
7
+ workOrderId?: string
8
+ type: string
9
+ item: string
10
+ unitPrice: number
11
+ quantity: number
12
+ total: string
13
+ }
14
+
15
+ defineProps<{
16
+ item: ChargeItem
17
+ index: number
18
+ isWorkOrder?: boolean
19
+ workOrderData?: any
20
+ }>()
21
+
22
+ defineEmits<{
23
+ (e: 'remove', id: number): void
24
+ }>()
25
+
26
+ function formatPrice(price: number): string {
27
+ return price.toFixed(2)
28
+ }
29
+ </script>
30
+
31
+ <template>
32
+ <div class="other-charge-item">
33
+ <div class="other-charge-item__header">
34
+ <h5 class="other-charge-item__title">
35
+ 费用项 #{{ index + 1 }}
36
+ </h5>
37
+ <VanIcon
38
+ name="cross"
39
+ class="other-charge-item__delete"
40
+ @click="$emit('remove', item.id)"
41
+ />
42
+ </div>
43
+
44
+ <div class="other-charge-item__info">
45
+ <div v-if="isWorkOrder" class="other-charge-item__field">
46
+ <p class="other-charge-item__label">
47
+ 所属工单
48
+ </p>
49
+ <p class="other-charge-item__value">
50
+ {{ item.workOrderCode }}
51
+ </p>
52
+ </div>
53
+ <div class="other-charge-item__field">
54
+ <p class="other-charge-item__label">
55
+ 收费类型
56
+ </p>
57
+ <p class="other-charge-item__value">
58
+ {{ item.type }}
59
+ </p>
60
+ </div>
61
+ <div class="other-charge-item__field">
62
+ <p class="other-charge-item__label">
63
+ 具体项目
64
+ </p>
65
+ <p class="other-charge-item__value">
66
+ {{ item.item }}
67
+ </p>
68
+ </div>
69
+ </div>
70
+
71
+ <div class="other-charge-item__details">
72
+ <div class="other-charge-item__field">
73
+ <p class="other-charge-item__label">
74
+ 单价
75
+ </p>
76
+ <p class="other-charge-item__value">
77
+ ¥{{ formatPrice(item.unitPrice) }}
78
+ </p>
79
+ </div>
80
+ <div class="other-charge-item__field">
81
+ <p class="other-charge-item__label">
82
+ 数量
83
+ </p>
84
+ <p class="other-charge-item__value">
85
+ {{ item.quantity }}
86
+ </p>
87
+ </div>
88
+ <div class="other-charge-item__field">
89
+ <p class="other-charge-item__label">
90
+ 小计
91
+ </p>
92
+ <p class="other-charge-item__value--highlight">
93
+ ¥{{ item.total }}
94
+ </p>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </template>
99
+
100
+ <style scoped lang="less">
101
+ .other-charge-item {
102
+ background-color: #f9fafb;
103
+ padding: 12px;
104
+ border-radius: 6px;
105
+ border: 1px solid #e5e7eb;
106
+ margin-bottom: 12px;
107
+
108
+ &__header {
109
+ display: flex;
110
+ justify-content: space-between;
111
+ align-items: flex-start;
112
+ margin-bottom: 8px;
113
+ }
114
+
115
+ &__title {
116
+ font-size: 12px;
117
+ font-weight: 500;
118
+ color: #374151;
119
+ margin: 0;
120
+ }
121
+
122
+ &__delete {
123
+ color: #ef4444;
124
+ font-size: 16px;
125
+
126
+ &:active {
127
+ color: #b91c1c;
128
+ }
129
+ }
130
+
131
+ &__info {
132
+ display: grid;
133
+ grid-template-columns: 1fr 1fr;
134
+ gap: 12px;
135
+ margin-bottom: 8px;
136
+ }
137
+
138
+ &__details {
139
+ display: grid;
140
+ grid-template-columns: 1fr 1fr 1fr;
141
+ gap: 12px;
142
+ }
143
+
144
+ &__field {
145
+ margin-bottom: 0;
146
+ }
147
+
148
+ &__label {
149
+ font-size: 12px;
150
+ color: #6b7280;
151
+ margin: 0 0 2px 0;
152
+ }
153
+
154
+ &__value {
155
+ font-size: 14px;
156
+ font-weight: 500;
157
+ color: #1f2937;
158
+ margin: 0;
159
+
160
+ &--highlight {
161
+ font-size: 14px;
162
+ font-weight: 500;
163
+ color: #2563eb;
164
+ margin: 0;
165
+ }
166
+ }
167
+ }
168
+ </style>