@tplc/business 0.4.20 → 0.4.22

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.22](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.21...v0.4.22) (2025-03-26)
6
+
7
+ ### [0.4.21](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.20...v0.4.21) (2025-03-26)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * search 调整 ([62102ae](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/62102ae0d4dbc56a910aa95264550df796a8cf55))
13
+
5
14
  ### [0.4.20](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.19...v0.4.20) (2025-03-26)
6
15
 
7
16
  ### [0.4.19](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.16...v0.4.19) (2025-03-26)
@@ -111,7 +111,7 @@
111
111
  </template>
112
112
 
113
113
  <script setup lang="ts">
114
- import { computed, ref, reactive, watchEffect } from 'vue'
114
+ import { computed, ref, reactive, watchEffect, inject } from 'vue'
115
115
  import { LcbHomeSearch } from './types'
116
116
  import dayjs from 'dayjs/esm'
117
117
  import useLocation from '../../hooks/useLocation'
@@ -119,6 +119,7 @@ import { useTranslate } from '@tplc/wot'
119
119
  import { ChildHotAddress } from '../lcb-city-select/api'
120
120
  import { stringify } from 'qs'
121
121
  import { getHistoryCity } from '../../utils/history'
122
+ import { FORM_KEY } from '../../constants'
122
123
  const dayRange = ref([dayjs().valueOf(), dayjs().add(1, 'day').valueOf()])
123
124
  const { translate } = useTranslate()
124
125
  const { getLocation, userLocation, locationIng } = useLocation()
@@ -144,7 +145,7 @@ const props = withDefaults(defineProps<LcbHomeSearch>(), {
144
145
  })
145
146
 
146
147
  const current = ref(0)
147
- const form = reactive({
148
+ const form = inject(FORM_KEY, {
148
149
  categoryTags: '',
149
150
  keywords: '',
150
151
  startDate: '',
@@ -0,0 +1,50 @@
1
+ // /api/recordPageList/page
2
+ // recordType
3
+ // 这个给我个type
4
+ export interface UserCommissionLog {
5
+ auditDateTime: string
6
+ auditRemark: string
7
+ auditStatus: number
8
+ changeAmount: number
9
+ checkoutAmount: number
10
+ commissionName: string
11
+ createDate: string
12
+ distributorCheckoutLogId: string
13
+ pageListFieldDetailList: DistributorCommissionDetailList[]
14
+ distributorCommissionLogId: string
15
+ lastModifyDate: string
16
+ orderNo: string
17
+ title: string
18
+ relevanceAction: string
19
+ relevanceId: string
20
+ relevanceType: string
21
+ relevanceTypeName: string
22
+ status: number
23
+ statusInfo: StatusInfo
24
+ subTitle: string
25
+ statusName: string
26
+ userId: string
27
+ buttomContent: string
28
+ }
29
+ export interface StatusInfo {
30
+ statusColor: string
31
+ statusRemark: string
32
+ statusName: string
33
+ }
34
+
35
+ interface DistributorCommissionDetailList {
36
+ fieldName: string
37
+ fieldValue: string
38
+ lineFlag: boolean
39
+ singleFlag: boolean
40
+ }
41
+
42
+ export const getRecordPageList = (params: {
43
+ recordType: string
44
+ pageSearch: {
45
+ limit: number
46
+ page: number
47
+ }
48
+ }) => {
49
+ return uni.$lcb.http.post<UserCommissionLog[]>('/recordPageList/page', params)
50
+ }
@@ -0,0 +1,133 @@
1
+ <template>
2
+ <view id="particularsTop"></view>
3
+ <z-paging
4
+ ref="paging"
5
+ v-model="dataList"
6
+ @query="queryList"
7
+ :height="height"
8
+ :fixed="false"
9
+ :auto="recordType"
10
+ :use-page-scroll="false"
11
+ >
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>
24
+ <view
25
+ :style="{
26
+ color: item.statusInfo.statusColor,
27
+ }"
28
+ >
29
+ {{ item.statusInfo.statusName }}
30
+ </view>
31
+ </view>
32
+ <view class="text-#333 mt-1" v-if="item.subTitle">{{ item.subTitle }}</view>
33
+ </view>
34
+
35
+ <view
36
+ class="text-24rpx grid grid-cols-3"
37
+ :class="{
38
+ 'border-bottom pb-2': item.buttomContent,
39
+ }"
40
+ >
41
+ <view
42
+ v-for="detail in item.pageListFieldDetailList"
43
+ :key="detail.fieldName"
44
+ :class="{
45
+ inLine: detail.singleFlag,
46
+ 'border-b-dashed': detail.lineFlag,
47
+ }"
48
+ >
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>
58
+ </view>
59
+ </view>
60
+ <view v-if="item.buttomContent">
61
+ {{ item.buttomContent }}
62
+ </view>
63
+ </lcb-block>
64
+ </z-paging>
65
+ </template>
66
+
67
+ <script lang="ts" setup>
68
+ import { ref, watch } from 'vue'
69
+ import { getRecordPageList, UserCommissionLog } from './api'
70
+ import { LcbParticularsProps } from './types'
71
+ import useAutoHeight from '../../hooks/useAutoHeight'
72
+ defineOptions({
73
+ name: 'LcbParticulars',
74
+ options: {
75
+ addGlobalClass: true,
76
+ virtualHost: true,
77
+ styleIsolation: 'shared',
78
+ },
79
+ })
80
+ const { height } = useAutoHeight('particularsTop')
81
+ const props = withDefaults(defineProps<LcbParticularsProps>(), {
82
+ textAlign: 'left',
83
+ })
84
+ const paging = ref()
85
+ const dataList = ref<UserCommissionLog[]>([])
86
+ const queryList = async (page: number, limit: number) => {
87
+ try {
88
+ const { data } = await getRecordPageList({
89
+ recordType: props.recordType,
90
+ pageSearch: {
91
+ limit,
92
+ page,
93
+ },
94
+ })
95
+ paging.value.complete(data)
96
+ } catch (error) {
97
+ paging.value.complete(false)
98
+ }
99
+ }
100
+ watch(
101
+ () => props.recordType,
102
+ (value) => {
103
+ paging.value?.reload()
104
+ },
105
+ )
106
+ </script>
107
+ <style lang="scss" scoped>
108
+ .border-bottom {
109
+ padding-bottom: 8rpx;
110
+ margin-bottom: 8rpx;
111
+ border-bottom: 1rpx solid #eeeeee;
112
+ }
113
+ .border-b-dashed {
114
+ padding-bottom: 8rpx;
115
+ margin-bottom: 8rpx;
116
+ border-bottom: 1rpx dashed #eeeeee;
117
+ }
118
+ .title-view {
119
+ position: absolute;
120
+ top: 4rpx;
121
+ left: -24rpx;
122
+ width: 8rpx;
123
+ height: 32rpx;
124
+ margin: auto;
125
+ }
126
+ .inLine {
127
+ display: flex;
128
+ grid-column: span 3;
129
+ gap: 16rpx;
130
+ align-items: center;
131
+ width: 100% !important;
132
+ }
133
+ </style>
@@ -0,0 +1,6 @@
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+
3
+ export interface LcbParticularsProps extends LcbBlockProps {
4
+ recordType: string
5
+ textAlign?: 'left' | 'right'
6
+ }
@@ -22,7 +22,7 @@
22
22
  <wd-img
23
23
  :src="item.productTypeIcon"
24
24
  v-if="item.productTypeIcon"
25
- height="auto"
25
+ height="0rpx"
26
26
  width="28rpx"
27
27
  custom-class="mt-1 mr-2"
28
28
  mode="widthFix"
@@ -42,7 +42,7 @@
42
42
  <wd-img
43
43
  :src="item.titleIcon"
44
44
  v-if="item.titleIcon"
45
- height="24rpx"
45
+ height="0rpx"
46
46
  width="24rpx"
47
47
  custom-class="ml-1"
48
48
  mode="aspectFill"
@@ -168,10 +168,14 @@ const popupProvide = inject('wd-popup', {
168
168
  getLocation()
169
169
  const form = inject(FORM_KEY) as Ref<Record<string, any>>
170
170
  const onSearch = async (e: { detail: { value: string } }) => {
171
- onSelect(searchListRef.value?.getList()?.[0])
171
+ if (form?.value?.keywords) {
172
+ uni.$emit(`${getPreviousPageId()}_filter_change`, {
173
+ keywords: form?.value?.keywords,
174
+ })
175
+ uni.navigateBack()
176
+ }
172
177
  }
173
- const onSelect = (keyword?: ProductInfo) => {
174
- if (!keyword) return
178
+ const onSelect = (keyword: ProductInfo) => {
175
179
  searchHistoryRef.value?.saveHistory(keyword)
176
180
  const [path, query] = keyword.link.jumpUrl.split('?')
177
181
  let queryParams = query ? parse(query) : {}
package/global.d.ts CHANGED
@@ -29,6 +29,7 @@ declare module 'vue' {
29
29
  'lcb-nav': (typeof import('@tplc/business/components/lcb-nav/lcb-nav.vue'))['default']
30
30
  'lcb-notice': (typeof import('@tplc/business/components/lcb-notice/lcb-notice.vue'))['default']
31
31
  'lcb-operation-actions': (typeof import('@tplc/business/components/lcb-operation-actions/lcb-operation-actions.vue'))['default']
32
+ 'lcb-particulars': (typeof import('@tplc/business/components/lcb-particulars/lcb-particulars.vue'))['default']
32
33
  'lcb-poster': (typeof import('@tplc/business/components/lcb-poster/lcb-poster.vue'))['default']
33
34
  'lcb-product': (typeof import('@tplc/business/components/lcb-product/lcb-product.vue'))['default']
34
35
  'lcb-product-item': (typeof import('@tplc/business/components/lcb-product-item/lcb-product-item.vue'))['default']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.20",
3
+ "version": "0.4.22",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -0,0 +1,44 @@
1
+ export interface UserCommissionLog {
2
+ auditDateTime: string
3
+ auditRemark: string
4
+ auditStatus: number
5
+ changeAmount: number
6
+ checkoutAmount: number
7
+ commissionName: string
8
+ createDate: string
9
+ distributorCheckoutLogId: string
10
+ pageListFieldDetailList: DistributorCommissionDetailList[]
11
+ distributorCommissionLogId: string
12
+ lastModifyDate: string
13
+ orderNo: string
14
+ title: string
15
+ relevanceAction: string
16
+ relevanceId: string
17
+ relevanceType: string
18
+ relevanceTypeName: string
19
+ status: number
20
+ statusInfo: StatusInfo
21
+ subTitle: string
22
+ statusName: string
23
+ userId: string
24
+ buttomContent: string
25
+ }
26
+ export interface StatusInfo {
27
+ statusColor: string
28
+ statusRemark: string
29
+ statusName: string
30
+ }
31
+ interface DistributorCommissionDetailList {
32
+ fieldName: string
33
+ fieldValue: string
34
+ lineFlag: boolean
35
+ singleFlag: boolean
36
+ }
37
+ export declare const getRecordPageList: (params: {
38
+ recordType: string
39
+ pageSearch: {
40
+ limit: number
41
+ page: number
42
+ }
43
+ }) => Promise<import('../../action').IResData<UserCommissionLog[]>>
44
+ export {}
@@ -0,0 +1,56 @@
1
+ import { LcbParticularsProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbParticularsProps>,
5
+ {
6
+ textAlign: string
7
+ }
8
+ >,
9
+ {},
10
+ unknown,
11
+ {},
12
+ {},
13
+ import('vue').ComponentOptionsMixin,
14
+ import('vue').ComponentOptionsMixin,
15
+ {},
16
+ string,
17
+ import('vue').PublicProps,
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
+ },
31
+ {}
32
+ >
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
+ } & {}
46
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
47
+ type __VLS_TypePropsToOption<T> = {
48
+ [K in keyof T]-?: {} extends Pick<T, K>
49
+ ? {
50
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
51
+ }
52
+ : {
53
+ type: import('vue').PropType<T[K]>
54
+ required: true
55
+ }
56
+ }
@@ -0,0 +1,5 @@
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+ export interface LcbParticularsProps extends LcbBlockProps {
3
+ recordType: string
4
+ textAlign?: 'left' | 'right'
5
+ }