af-mobile-client-vue3 1.4.16 → 1.4.17

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