@tplc/business 0.4.21 → 0.4.23

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 CHANGED
@@ -2,6 +2,15 @@
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.23](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.22...v0.4.23) (2025-03-26)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 新增组件 ([af04c93](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/af04c93df2bdcf41fde656d5f0e5712539f243c1))
11
+
12
+ ### [0.4.22](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.21...v0.4.22) (2025-03-26)
13
+
5
14
  ### [0.4.21](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.20...v0.4.21) (2025-03-26)
6
15
 
7
16
 
@@ -84,13 +84,7 @@ withDefaults(defineProps<LcbCalendarSearchProps>(), {
84
84
  icon: 'search',
85
85
  mode: 'search',
86
86
  })
87
- const urlParams = computed(() => {
88
- return stringify({
89
- startDate: form.value.startDate,
90
- endDate: form.value.endDate,
91
- keywords: form.value.keywords,
92
- })
93
- })
87
+
94
88
  const form = inject(FORM_KEY) as Ref<Record<string, any>>
95
89
  const addressCity = ref<LcbAddress | undefined>(
96
90
  (form.value.cityId || form.value.areaId || form.value.provinceId
@@ -101,6 +95,16 @@ const dayRange = ref([
101
95
  form.value.startDate ? dayjs(form.value.startDate).valueOf() : dayjs().valueOf(),
102
96
  form.value.endDate ? dayjs(form.value.endDate).valueOf() : dayjs().add(1, 'day').valueOf(),
103
97
  ])
98
+ const urlParams = computed(() => {
99
+ return stringify({
100
+ startDate: form.value.startDate,
101
+ endDate: form.value.endDate,
102
+ keywords: form.value.keywords,
103
+ provinceId: form.value.provinceId,
104
+ cityId: form.value.cityId,
105
+ areaId: form.value.areaId,
106
+ })
107
+ })
104
108
  const { translate } = useTranslate()
105
109
  const { getLocation, userLocation } = useLocation()
106
110
 
@@ -21,8 +21,10 @@ export interface UserCommissionLog {
21
21
  relevanceTypeName: string
22
22
  status: number
23
23
  statusInfo: StatusInfo
24
+ subTitle: string
24
25
  statusName: string
25
26
  userId: string
27
+ buttomContent: string
26
28
  }
27
29
  export interface StatusInfo {
28
30
  statusColor: string
@@ -6,30 +6,38 @@
6
6
  @query="queryList"
7
7
  :height="height"
8
8
  :fixed="false"
9
- :auto="true"
9
+ :auto="Boolean(recordType)"
10
10
  :use-page-scroll="false"
11
11
  >
12
- <lcb-block v-bind="$attrs" v-for="item in dataList" :key="item.distributorCommissionLogId">
13
- <view class="flex items-center justify-between border-bottom pr-3 font-500">
14
- <view class="relative">
15
- {{ item.title }}
12
+ <lcb-block v-bind="$props" v-for="item in dataList" :key="item.distributorCommissionLogId">
13
+ <view class="border-bottom">
14
+ <view class="flex items-center justify-between pr-3 font-500">
15
+ <view class="relative">
16
+ {{ item.title }}
17
+ <view
18
+ class="title-view"
19
+ :style="{
20
+ backgroundColor: item.statusInfo.statusColor,
21
+ }"
22
+ ></view>
23
+ </view>
16
24
  <view
17
- class="title-view"
18
25
  :style="{
19
- backgroundColor: item.statusInfo.statusColor,
26
+ color: item.statusInfo.statusColor,
20
27
  }"
21
- ></view>
22
- </view>
23
- <view
24
- :style="{
25
- color: item.statusInfo.statusColor,
26
- }"
27
- >
28
- {{ item.statusInfo.statusName }}
28
+ >
29
+ {{ item.statusInfo.statusName }}
30
+ </view>
29
31
  </view>
32
+ <view class="text-#333 mt-1" v-if="item.subTitle">{{ item.subTitle }}</view>
30
33
  </view>
31
34
 
32
- <view class="border-bottom pb-2 text-24rpx grid grid-cols-3">
35
+ <view
36
+ class="text-24rpx grid grid-cols-3"
37
+ :class="{
38
+ 'border-bottom pb-2': item.buttomContent,
39
+ }"
40
+ >
33
41
  <view
34
42
  v-for="detail in item.pageListFieldDetailList"
35
43
  :key="detail.fieldName"
@@ -38,22 +46,30 @@
38
46
  'border-b-dashed': detail.lineFlag,
39
47
  }"
40
48
  >
41
- <view class="text-#969696">{{ detail.fieldName }}</view>
42
- <view>{{ detail.fieldValue }}</view>
49
+ <view class="text-#969696 flex-shrink-0">{{ detail.fieldName }}</view>
50
+ <view
51
+ class="flex-1 ml-2"
52
+ :style="{
53
+ textAlign: props.textAlign,
54
+ }"
55
+ >
56
+ {{ detail.fieldValue }}
57
+ </view>
43
58
  </view>
44
59
  </view>
45
- <view>
46
- {{ item.createDate }}
60
+ <view v-if="item.buttomContent">
61
+ {{ item.buttomContent }}
47
62
  </view>
48
63
  </lcb-block>
49
64
  </z-paging>
50
65
  </template>
51
66
 
52
67
  <script lang="ts" setup>
53
- import { ref, watch } from 'vue'
68
+ import { ref, watch, inject, Ref } from 'vue'
54
69
  import { getRecordPageList, UserCommissionLog } from './api'
55
70
  import { LcbParticularsProps } from './types'
56
71
  import useAutoHeight from '../../hooks/useAutoHeight'
72
+ import { FORM_KEY } from '../../constants'
57
73
  defineOptions({
58
74
  name: 'LcbParticulars',
59
75
  options: {
@@ -63,7 +79,10 @@ defineOptions({
63
79
  },
64
80
  })
65
81
  const { height } = useAutoHeight('particularsTop')
66
- const props = defineProps<LcbParticularsProps>()
82
+ const form = inject(FORM_KEY) as Ref<Record<string, any>>
83
+ const props = withDefaults(defineProps<LcbParticularsProps>(), {
84
+ textAlign: 'left',
85
+ })
67
86
  const paging = ref()
68
87
  const dataList = ref<UserCommissionLog[]>([])
69
88
  const queryList = async (page: number, limit: number) => {
@@ -74,6 +93,7 @@ const queryList = async (page: number, limit: number) => {
74
93
  limit,
75
94
  page,
76
95
  },
96
+ ...form.value,
77
97
  })
78
98
  paging.value.complete(data)
79
99
  } catch (error) {
@@ -81,25 +101,24 @@ const queryList = async (page: number, limit: number) => {
81
101
  }
82
102
  }
83
103
  watch(
84
- () => props.recordType,
85
- (value) => {
86
- console.log(value, 'value')
87
- paging.value?.reload()
104
+ [() => props.recordType, form],
105
+ () => {
106
+ paging.value?.reload?.()
88
107
  },
89
108
  {
90
- immediate: true,
109
+ deep: true,
91
110
  },
92
111
  )
93
112
  </script>
94
113
  <style lang="scss" scoped>
95
114
  .border-bottom {
96
- padding-bottom: 24rpx;
97
- margin-bottom: 24rpx;
115
+ padding-bottom: 8rpx;
116
+ margin-bottom: 8rpx;
98
117
  border-bottom: 1rpx solid #eeeeee;
99
118
  }
100
119
  .border-b-dashed {
101
- padding-bottom: 24rpx;
102
- margin-bottom: 24rpx;
120
+ padding-bottom: 8rpx;
121
+ margin-bottom: 8rpx;
103
122
  border-bottom: 1rpx dashed #eeeeee;
104
123
  }
105
124
  .title-view {
@@ -2,4 +2,5 @@ import { LcbBlockProps } from '../lcb-block/types'
2
2
 
3
3
  export interface LcbParticularsProps extends LcbBlockProps {
4
4
  recordType: string
5
+ textAlign?: 'left' | 'right'
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.21",
3
+ "version": "0.4.23",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -18,8 +18,10 @@ export interface UserCommissionLog {
18
18
  relevanceTypeName: string
19
19
  status: number
20
20
  statusInfo: StatusInfo
21
+ subTitle: string
21
22
  statusName: string
22
23
  userId: string
24
+ buttomContent: string
23
25
  }
24
26
  export interface StatusInfo {
25
27
  statusColor: string
@@ -1,6 +1,11 @@
1
1
  import { LcbParticularsProps } from './types'
2
2
  declare const _default: import('vue').DefineComponent<
3
- __VLS_TypePropsToOption<LcbParticularsProps>,
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbParticularsProps>,
5
+ {
6
+ textAlign: string
7
+ }
8
+ >,
4
9
  {},
5
10
  unknown,
6
11
  {},
@@ -10,11 +15,34 @@ declare const _default: import('vue').DefineComponent<
10
15
  {},
11
16
  string,
12
17
  import('vue').PublicProps,
13
- Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbParticularsProps>>>,
14
- {},
18
+ Readonly<
19
+ import('vue').ExtractPropTypes<
20
+ __VLS_WithDefaults<
21
+ __VLS_TypePropsToOption<LcbParticularsProps>,
22
+ {
23
+ textAlign: string
24
+ }
25
+ >
26
+ >
27
+ >,
28
+ {
29
+ textAlign: 'left' | 'right'
30
+ },
15
31
  {}
16
32
  >
17
33
  export default _default
34
+ type __VLS_WithDefaults<P, D> = {
35
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
36
+ ? __VLS_Prettify<
37
+ P[K] & {
38
+ default: D[K]
39
+ }
40
+ >
41
+ : P[K]
42
+ }
43
+ type __VLS_Prettify<T> = {
44
+ [K in keyof T]: T[K]
45
+ } & {}
18
46
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
19
47
  type __VLS_TypePropsToOption<T> = {
20
48
  [K in keyof T]-?: {} extends Pick<T, K>
@@ -1,4 +1,5 @@
1
1
  import { LcbBlockProps } from '../lcb-block/types'
2
2
  export interface LcbParticularsProps extends LcbBlockProps {
3
3
  recordType: string
4
+ textAlign?: 'left' | 'right'
4
5
  }