@tplc/business 0.4.20 → 0.4.21

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,13 @@
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.21](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.20...v0.4.21) (2025-03-26)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * search 调整 ([62102ae](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/62102ae0d4dbc56a910aa95264550df796a8cf55))
11
+
5
12
  ### [0.4.20](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.19...v0.4.20) (2025-03-26)
6
13
 
7
14
  ### [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,48 @@
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
+ statusName: string
25
+ userId: string
26
+ }
27
+ export interface StatusInfo {
28
+ statusColor: string
29
+ statusRemark: string
30
+ statusName: string
31
+ }
32
+
33
+ interface DistributorCommissionDetailList {
34
+ fieldName: string
35
+ fieldValue: string
36
+ lineFlag: boolean
37
+ singleFlag: boolean
38
+ }
39
+
40
+ export const getRecordPageList = (params: {
41
+ recordType: string
42
+ pageSearch: {
43
+ limit: number
44
+ page: number
45
+ }
46
+ }) => {
47
+ return uni.$lcb.http.post<UserCommissionLog[]>('/recordPageList/page', params)
48
+ }
@@ -0,0 +1,120 @@
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="true"
10
+ :use-page-scroll="false"
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 }}
16
+ <view
17
+ class="title-view"
18
+ :style="{
19
+ backgroundColor: item.statusInfo.statusColor,
20
+ }"
21
+ ></view>
22
+ </view>
23
+ <view
24
+ :style="{
25
+ color: item.statusInfo.statusColor,
26
+ }"
27
+ >
28
+ {{ item.statusInfo.statusName }}
29
+ </view>
30
+ </view>
31
+
32
+ <view class="border-bottom pb-2 text-24rpx grid grid-cols-3">
33
+ <view
34
+ v-for="detail in item.pageListFieldDetailList"
35
+ :key="detail.fieldName"
36
+ :class="{
37
+ inLine: detail.singleFlag,
38
+ 'border-b-dashed': detail.lineFlag,
39
+ }"
40
+ >
41
+ <view class="text-#969696">{{ detail.fieldName }}</view>
42
+ <view>{{ detail.fieldValue }}</view>
43
+ </view>
44
+ </view>
45
+ <view>
46
+ {{ item.createDate }}
47
+ </view>
48
+ </lcb-block>
49
+ </z-paging>
50
+ </template>
51
+
52
+ <script lang="ts" setup>
53
+ import { ref, watch } from 'vue'
54
+ import { getRecordPageList, UserCommissionLog } from './api'
55
+ import { LcbParticularsProps } from './types'
56
+ import useAutoHeight from '../../hooks/useAutoHeight'
57
+ defineOptions({
58
+ name: 'LcbParticulars',
59
+ options: {
60
+ addGlobalClass: true,
61
+ virtualHost: true,
62
+ styleIsolation: 'shared',
63
+ },
64
+ })
65
+ const { height } = useAutoHeight('particularsTop')
66
+ const props = defineProps<LcbParticularsProps>()
67
+ const paging = ref()
68
+ const dataList = ref<UserCommissionLog[]>([])
69
+ const queryList = async (page: number, limit: number) => {
70
+ try {
71
+ const { data } = await getRecordPageList({
72
+ recordType: props.recordType,
73
+ pageSearch: {
74
+ limit,
75
+ page,
76
+ },
77
+ })
78
+ paging.value.complete(data)
79
+ } catch (error) {
80
+ paging.value.complete(false)
81
+ }
82
+ }
83
+ watch(
84
+ () => props.recordType,
85
+ (value) => {
86
+ console.log(value, 'value')
87
+ paging.value?.reload()
88
+ },
89
+ {
90
+ immediate: true,
91
+ },
92
+ )
93
+ </script>
94
+ <style lang="scss" scoped>
95
+ .border-bottom {
96
+ padding-bottom: 24rpx;
97
+ margin-bottom: 24rpx;
98
+ border-bottom: 1rpx solid #eeeeee;
99
+ }
100
+ .border-b-dashed {
101
+ padding-bottom: 24rpx;
102
+ margin-bottom: 24rpx;
103
+ border-bottom: 1rpx dashed #eeeeee;
104
+ }
105
+ .title-view {
106
+ position: absolute;
107
+ top: 4rpx;
108
+ left: -24rpx;
109
+ width: 8rpx;
110
+ height: 32rpx;
111
+ margin: auto;
112
+ }
113
+ .inLine {
114
+ display: flex;
115
+ grid-column: span 3;
116
+ gap: 16rpx;
117
+ align-items: center;
118
+ width: 100% !important;
119
+ }
120
+ </style>
@@ -0,0 +1,5 @@
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+
3
+ export interface LcbParticularsProps extends LcbBlockProps {
4
+ recordType: string
5
+ }
@@ -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.21",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -0,0 +1,42 @@
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
+ statusName: string
22
+ userId: string
23
+ }
24
+ export interface StatusInfo {
25
+ statusColor: string
26
+ statusRemark: string
27
+ statusName: string
28
+ }
29
+ interface DistributorCommissionDetailList {
30
+ fieldName: string
31
+ fieldValue: string
32
+ lineFlag: boolean
33
+ singleFlag: boolean
34
+ }
35
+ export declare const getRecordPageList: (params: {
36
+ recordType: string
37
+ pageSearch: {
38
+ limit: number
39
+ page: number
40
+ }
41
+ }) => Promise<import('../../action').IResData<UserCommissionLog[]>>
42
+ export {}
@@ -0,0 +1,28 @@
1
+ import { LcbParticularsProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_TypePropsToOption<LcbParticularsProps>,
4
+ {},
5
+ unknown,
6
+ {},
7
+ {},
8
+ import('vue').ComponentOptionsMixin,
9
+ import('vue').ComponentOptionsMixin,
10
+ {},
11
+ string,
12
+ import('vue').PublicProps,
13
+ Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbParticularsProps>>>,
14
+ {},
15
+ {}
16
+ >
17
+ export default _default
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
19
+ type __VLS_TypePropsToOption<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K>
21
+ ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
23
+ }
24
+ : {
25
+ type: import('vue').PropType<T[K]>
26
+ required: true
27
+ }
28
+ }
@@ -0,0 +1,4 @@
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+ export interface LcbParticularsProps extends LcbBlockProps {
3
+ recordType: string
4
+ }