@tplc/business 0.4.136 → 0.4.137
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.
- package/CHANGELOG.md +10 -0
- package/components/lcb-room-calendar/lcb-room-calendar.vue +148 -9
- package/components/lcb-room-calendar/types.ts +2 -0
- package/package.json +1 -1
- package/types/components/lcb-room-calendar/lcb-room-calendar.vue.d.ts +9 -0
- package/types/components/lcb-room-calendar/types.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.4.137](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.136...v0.4.137) (2025-06-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 修改字段展示 ([e39ee81](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e39ee81a0c55b3edb0c983ceed5c4be7f10bf425))
|
|
11
|
+
* 新增cursor rule ([e6de982](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e6de982146ac5c5af64fe701e6a40deb4b7af22c))
|
|
12
|
+
* 组件ui完成 ([1f050dc](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1f050dcd83b8e17fac9f7b131abc971c282aaacd))
|
|
13
|
+
* 跳转编辑 ([ba86490](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ba864901130dcc104249cf7fd7bbae102e15ee16))
|
|
14
|
+
|
|
5
15
|
### [0.4.136](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.135...v0.4.136) (2025-06-23)
|
|
6
16
|
|
|
7
17
|
|
|
@@ -1,13 +1,66 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<!--background-size: 100% auto; -->
|
|
3
|
+
<lcb-block
|
|
4
|
+
v-bind="$props"
|
|
5
|
+
:custom-style="{
|
|
6
|
+
backgroundSize: '100% auto',
|
|
7
|
+
}"
|
|
8
|
+
v-if="list.length"
|
|
9
|
+
>
|
|
10
|
+
<view class="p-1 pt-3 box-border">
|
|
11
|
+
<view class="flex justify-between items-center text-white pl-2 pr-1.5 box-border w-full">
|
|
12
|
+
<view class="text-4 font-bold flex gap-1.5 items-center">
|
|
13
|
+
<wd-icon :name="calendarIcon" class-prefix="lcb" size="30rpx" v-if="calendarIcon" />
|
|
14
|
+
{{ currentMonth }}月
|
|
15
|
+
</view>
|
|
16
|
+
<lcb-action-view v-bind="link" custom-class="!flex !items-center !justify-center gap-1.5">
|
|
17
|
+
<view class="font-bold text-3.5">{{ linkTitle }}</view>
|
|
18
|
+
<wd-icon name="a-xingzhuang97" class-prefix="lcb" size="22rpx" />
|
|
19
|
+
</lcb-action-view>
|
|
6
20
|
</view>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
21
|
+
<scroll-view
|
|
22
|
+
class="bg-white rounded-2 pl-3 box-border py-2 mt-2 overflow-x-auto whitespace-nowrap"
|
|
23
|
+
scroll-x
|
|
24
|
+
>
|
|
25
|
+
<view
|
|
26
|
+
class="flex-col items-center justify-between inline-flex"
|
|
27
|
+
v-for="(item, index) in list"
|
|
28
|
+
:key="index"
|
|
29
|
+
:class="{
|
|
30
|
+
'full-room': !item.total,
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
<view class="day-title flex items-center justify-center gap-1 mr-2">
|
|
34
|
+
<text>{{ item.dateStr }}</text>
|
|
35
|
+
<view
|
|
36
|
+
class="day-title-tip"
|
|
37
|
+
:class="{
|
|
38
|
+
'day-title-tip-rest': item.restNumber === 0,
|
|
39
|
+
}"
|
|
40
|
+
v-if="item.dateTip"
|
|
41
|
+
>
|
|
42
|
+
{{ item.dateTip }}
|
|
43
|
+
</view>
|
|
44
|
+
</view>
|
|
45
|
+
<view class="day-info flex flex-col items-center justify-center p-1 box-border mr-0.75">
|
|
46
|
+
<view class="day-info-top">余{{ item.total }}</view>
|
|
47
|
+
<view class="day-info-bottom mt-1.5">
|
|
48
|
+
<view>
|
|
49
|
+
<text>销:¥{{ item.pp }}/</text>
|
|
50
|
+
<text class="text-2.5">起</text>
|
|
51
|
+
</view>
|
|
52
|
+
<view>
|
|
53
|
+
<text>分:¥{{ item.dp }}/</text>
|
|
54
|
+
<text class="text-2.5">起</text>
|
|
55
|
+
</view>
|
|
56
|
+
<view>
|
|
57
|
+
<text>结:¥{{ item.sp }}/</text>
|
|
58
|
+
<text class="text-2.5">起</text>
|
|
59
|
+
</view>
|
|
60
|
+
</view>
|
|
61
|
+
</view>
|
|
62
|
+
</view>
|
|
63
|
+
</scroll-view>
|
|
11
64
|
</view>
|
|
12
65
|
</lcb-block>
|
|
13
66
|
</template>
|
|
@@ -15,6 +68,27 @@
|
|
|
15
68
|
<script setup lang="ts">
|
|
16
69
|
import { dayjs } from '@tplc/wot'
|
|
17
70
|
import { LcbRoomCalendarProps } from './types'
|
|
71
|
+
import { computed, onMounted, ref } from 'vue'
|
|
72
|
+
interface CalendarInfo {
|
|
73
|
+
dateTypeStateMap: Record<
|
|
74
|
+
string,
|
|
75
|
+
{
|
|
76
|
+
dateStr: number
|
|
77
|
+
/** 0班8休 */
|
|
78
|
+
restNumber: number
|
|
79
|
+
dateTip?: string
|
|
80
|
+
}
|
|
81
|
+
>
|
|
82
|
+
priceInfoMap: Record<
|
|
83
|
+
string,
|
|
84
|
+
{
|
|
85
|
+
pp: number
|
|
86
|
+
dp: number
|
|
87
|
+
sp: number
|
|
88
|
+
}
|
|
89
|
+
>
|
|
90
|
+
totalInventoryMap: Record<string, number>
|
|
91
|
+
}
|
|
18
92
|
defineOptions({
|
|
19
93
|
name: 'LcbRoomCalendar',
|
|
20
94
|
options: {
|
|
@@ -25,8 +99,73 @@ defineOptions({
|
|
|
25
99
|
})
|
|
26
100
|
withDefaults(defineProps<LcbRoomCalendarProps>(), {
|
|
27
101
|
linkTitle: '进入我家',
|
|
102
|
+
backgroundColor: 'var(--wot-color-theme)',
|
|
103
|
+
topRadius: 16,
|
|
104
|
+
bottomRadius: 16,
|
|
28
105
|
})
|
|
29
106
|
const currentMonth = dayjs().format('MM')
|
|
107
|
+
const info = ref<CalendarInfo>()
|
|
108
|
+
onMounted(async () => {
|
|
109
|
+
const { data } = await uni.$lcb.http.post<CalendarInfo>('/storeHotelRoom/queryCalendarInfoIndex')
|
|
110
|
+
info.value = data
|
|
111
|
+
})
|
|
112
|
+
const list = computed(() => {
|
|
113
|
+
return Object.keys(info.value?.dateTypeStateMap || {}).map((key) => {
|
|
114
|
+
return {
|
|
115
|
+
...info.value?.priceInfoMap[key],
|
|
116
|
+
total: info.value?.totalInventoryMap[key],
|
|
117
|
+
...info.value?.dateTypeStateMap[key],
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
})
|
|
30
121
|
</script>
|
|
31
122
|
|
|
32
|
-
<style lang="scss" scoped
|
|
123
|
+
<style lang="scss" scoped>
|
|
124
|
+
.day-title {
|
|
125
|
+
font-weight: 400;
|
|
126
|
+
font-size: 24rpx;
|
|
127
|
+
color: #333333;
|
|
128
|
+
padding-bottom: 12rpx;
|
|
129
|
+
width: 100%;
|
|
130
|
+
text-align: center;
|
|
131
|
+
border-bottom: 1rpx solid #f1f1f1;
|
|
132
|
+
margin-bottom: 12rpx;
|
|
133
|
+
}
|
|
134
|
+
.day-info {
|
|
135
|
+
background: color-mix(in srgb, var(--wot-color-theme) 4%, transparent);
|
|
136
|
+
border-radius: 8rpx;
|
|
137
|
+
&-top {
|
|
138
|
+
font-size: 22rpx;
|
|
139
|
+
color: var(--wot-color-theme);
|
|
140
|
+
background: color-mix(in srgb, var(--wot-color-theme) 10%, transparent);
|
|
141
|
+
border-radius: 4rpx;
|
|
142
|
+
width: 100%;
|
|
143
|
+
line-height: 46rpx;
|
|
144
|
+
text-align: center;
|
|
145
|
+
}
|
|
146
|
+
&-bottom {
|
|
147
|
+
font-size: 24rpx;
|
|
148
|
+
padding: 0 20rpx;
|
|
149
|
+
color: #969696;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// 满房
|
|
153
|
+
.full-room {
|
|
154
|
+
background: #fff6f6;
|
|
155
|
+
&-top {
|
|
156
|
+
background: rgba(218, 67, 67, 0.1);
|
|
157
|
+
color: #d51818;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
.day-title-tip {
|
|
161
|
+
font-size: 20rpx;
|
|
162
|
+
padding: 0 10rpx;
|
|
163
|
+
border-radius: 4rpx;
|
|
164
|
+
color: var(--wot-color-theme);
|
|
165
|
+
background: color-mix(in srgb, var(--wot-color-theme) 10%, transparent);
|
|
166
|
+
&-rest {
|
|
167
|
+
color: #999;
|
|
168
|
+
background: color-mix(in srgb, #999 10%, transparent);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
</style>
|
package/package.json
CHANGED
|
@@ -4,6 +4,9 @@ declare const _default: import('vue').DefineComponent<
|
|
|
4
4
|
__VLS_TypePropsToOption<LcbRoomCalendarProps>,
|
|
5
5
|
{
|
|
6
6
|
linkTitle: string
|
|
7
|
+
backgroundColor: string
|
|
8
|
+
topRadius: number
|
|
9
|
+
bottomRadius: number
|
|
7
10
|
}
|
|
8
11
|
>,
|
|
9
12
|
{},
|
|
@@ -21,11 +24,17 @@ declare const _default: import('vue').DefineComponent<
|
|
|
21
24
|
__VLS_TypePropsToOption<LcbRoomCalendarProps>,
|
|
22
25
|
{
|
|
23
26
|
linkTitle: string
|
|
27
|
+
backgroundColor: string
|
|
28
|
+
topRadius: number
|
|
29
|
+
bottomRadius: number
|
|
24
30
|
}
|
|
25
31
|
>
|
|
26
32
|
>
|
|
27
33
|
>,
|
|
28
34
|
{
|
|
35
|
+
backgroundColor: string
|
|
36
|
+
topRadius: number
|
|
37
|
+
bottomRadius: number
|
|
29
38
|
linkTitle: string
|
|
30
39
|
},
|
|
31
40
|
{}
|