@tplc/business 0.7.69 → 0.7.71
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,41 @@
|
|
|
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.7.71](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.70...v0.7.71) (2026-01-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* Remove numerous TypeScript declaration files and update the `lcb-order-payment` component. ([c4860c8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c4860c866b272f26b5da30e0b5688bb7fae9dd57))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ♻️ Code Refactoring | 代码重构
|
|
14
|
+
|
|
15
|
+
* **lcb-order-payment:** simplify openInsteadPopup function and improve item handling ([5fdd2b6](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5fdd2b6d6339e9c5fa5cd4affa06eb9ed1908443))
|
|
16
|
+
|
|
17
|
+
### [0.7.70](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.28...v0.7.70) (2026-01-15)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
21
|
+
|
|
22
|
+
* **wd-img:** remove unnecessary class from image component for cleaner styling ([05e83d5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/05e83d5a211aba9d90704b7e871f0a29a4962d7a))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### ✨ Features | 新功能
|
|
26
|
+
|
|
27
|
+
* 修改字段 ([8ed5c88](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8ed5c880145b1d96d1afdd3848da9a6d20ae2ed5))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
31
|
+
|
|
32
|
+
* **release:** 0.7.68 ([03c52e5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/03c52e5aa2bed75f0bd7cf66c0d3934d1196329a))
|
|
33
|
+
* **release:** 0.7.69 ([658ab2d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/658ab2d29555b2f148956fbd8e2600e02ea7d84d))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### ♻️ Code Refactoring | 代码重构
|
|
37
|
+
|
|
38
|
+
* **types:** remove unused type definitions and clean up component type files for better maintainability ([923135e](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/923135ebed7bcbee56deb891cdbc42206cb40b2a))
|
|
39
|
+
|
|
5
40
|
### [0.7.69](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.68...v0.7.69) (2026-01-14)
|
|
6
41
|
|
|
7
42
|
### [0.7.68](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.27...v0.7.68) (2026-01-14)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view class="pay-group">
|
|
3
3
|
<wd-radio-group v-model="groupValue" @change="onChange">
|
|
4
4
|
<block v-for="item in data" :key="item.title">
|
|
5
|
-
<!-- instead:
|
|
5
|
+
<!-- instead: 一级单选,选中后展示弹窗入口 -->
|
|
6
6
|
<view v-if="item.type === 'instead'">
|
|
7
7
|
<wd-radio :value="item.type" shape="dot" cell v-if="item.type === 'instead'">
|
|
8
8
|
<view>
|
|
@@ -24,13 +24,35 @@
|
|
|
24
24
|
</view>
|
|
25
25
|
</view>
|
|
26
26
|
</wd-radio>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
<!-- 选中代下单时显示入口/回显卡片 -->
|
|
28
|
+
<view class="ml-56rpx mt-16rpx" v-if="payType === item.type && item.items">
|
|
29
|
+
<!-- 未填写时:显示填写入口 -->
|
|
30
|
+
<view v-if="!hasInsteadFormData" class="instead-entry" @click="openInsteadPopup">
|
|
31
|
+
<view class="entry-content">
|
|
32
|
+
<wd-icon name="edit" size="32rpx" color="#999" />
|
|
33
|
+
<text class="entry-text">{{ t('请填写代下单信息') }}</text>
|
|
34
|
+
</view>
|
|
35
|
+
<wd-icon name="xiangyou" class-prefix="lcb" size="28rpx" color="#999" />
|
|
36
|
+
</view>
|
|
37
|
+
|
|
38
|
+
<!-- 已填写时:显示回显卡片 -->
|
|
39
|
+
<view v-else class="instead-preview" @click="openInsteadPopup">
|
|
40
|
+
<view class="preview-content">
|
|
41
|
+
<view v-for="field in item.items" :key="field.field" class="preview-row">
|
|
42
|
+
<text class="preview-label">{{ field.fieldCustomName }}</text>
|
|
43
|
+
<text class="preview-value">{{ getDisplayValue(field) }}</text>
|
|
44
|
+
</view>
|
|
45
|
+
</view>
|
|
46
|
+
<view class="edit-action">
|
|
47
|
+
<text class="edit-text">{{ t('修改') }}</text>
|
|
48
|
+
<wd-icon
|
|
49
|
+
name="xiangyou"
|
|
50
|
+
class-prefix="lcb"
|
|
51
|
+
size="24rpx"
|
|
52
|
+
color="var(--wd-color-primary)"
|
|
53
|
+
/>
|
|
54
|
+
</view>
|
|
55
|
+
</view>
|
|
34
56
|
</view>
|
|
35
57
|
</view>
|
|
36
58
|
|
|
@@ -106,13 +128,97 @@
|
|
|
106
128
|
</block>
|
|
107
129
|
</wd-radio-group>
|
|
108
130
|
<wd-message-box />
|
|
131
|
+
|
|
132
|
+
<!-- 代下单信息填写弹窗 -->
|
|
133
|
+
<wd-popup
|
|
134
|
+
v-model="insteadPopupVisible"
|
|
135
|
+
position="center"
|
|
136
|
+
closable
|
|
137
|
+
custom-style="width: 90%; max-height: 80%; border-radius: 16rpx; overflow: hidden;"
|
|
138
|
+
>
|
|
139
|
+
<view class="instead-popup">
|
|
140
|
+
<view class="popup-header">
|
|
141
|
+
<text class="popup-title">{{ t('填写代下单信息') }}</text>
|
|
142
|
+
</view>
|
|
143
|
+
<scroll-view scroll-y class="popup-body">
|
|
144
|
+
<wd-form ref="insteadFormRef" :model="tempInsteadForm">
|
|
145
|
+
<wd-cell-group border>
|
|
146
|
+
<wd-cell
|
|
147
|
+
v-for="field in currentInsteadItem?.items"
|
|
148
|
+
:key="field.field"
|
|
149
|
+
:title="field.fieldCustomName"
|
|
150
|
+
:required="field.requiredFlag"
|
|
151
|
+
:prop="field.field"
|
|
152
|
+
title-width="200rpx"
|
|
153
|
+
:rules="field.requiredFlag ? [{ required: true, message: t('内容不能为空') }] : []"
|
|
154
|
+
>
|
|
155
|
+
<wd-input
|
|
156
|
+
v-if="field.frontInputType === 'input'"
|
|
157
|
+
:placeholder="field.frontPlaceholder || t('请输入') + field.fieldCustomName"
|
|
158
|
+
v-model="tempInsteadForm[field.field]"
|
|
159
|
+
v-bind="field.props"
|
|
160
|
+
no-border
|
|
161
|
+
/>
|
|
162
|
+
<wd-input-number
|
|
163
|
+
v-else-if="field.frontInputType === 'number'"
|
|
164
|
+
:placeholder="field.frontPlaceholder || t('请输入') + field.fieldCustomName"
|
|
165
|
+
v-model="tempInsteadForm[field.field]"
|
|
166
|
+
v-bind="field.props"
|
|
167
|
+
no-border
|
|
168
|
+
/>
|
|
169
|
+
<wd-textarea
|
|
170
|
+
v-else-if="field.frontInputType === 'inputArea'"
|
|
171
|
+
:placeholder="field.frontPlaceholder || t('请输入') + field.fieldCustomName"
|
|
172
|
+
v-model="tempInsteadForm[field.field]"
|
|
173
|
+
v-bind="field.props"
|
|
174
|
+
/>
|
|
175
|
+
<wd-picker
|
|
176
|
+
v-else-if="field.frontInputType === 'selector'"
|
|
177
|
+
:columns="getPopupColumns(field.frontInputContent)"
|
|
178
|
+
v-model="tempInsteadForm[field.field]"
|
|
179
|
+
v-bind="field.props"
|
|
180
|
+
/>
|
|
181
|
+
<wd-datetime-picker
|
|
182
|
+
v-else-if="field.frontInputType === 'date'"
|
|
183
|
+
v-model="tempInsteadForm[field.field]"
|
|
184
|
+
v-bind="field.props"
|
|
185
|
+
/>
|
|
186
|
+
<wd-radio-group
|
|
187
|
+
v-else-if="
|
|
188
|
+
field.frontInputType === 'radio' || field.frontInputType === 'radioTag'
|
|
189
|
+
"
|
|
190
|
+
v-model="tempInsteadForm[field.field]"
|
|
191
|
+
v-bind="field.props"
|
|
192
|
+
inline
|
|
193
|
+
:shape="field.frontInputType === 'radioTag' ? 'button' : 'dot'"
|
|
194
|
+
>
|
|
195
|
+
<wd-radio
|
|
196
|
+
v-for="opt in getPopupColumns(field.frontInputContent)"
|
|
197
|
+
:key="opt"
|
|
198
|
+
:value="opt"
|
|
199
|
+
>
|
|
200
|
+
{{ opt }}
|
|
201
|
+
</wd-radio>
|
|
202
|
+
</wd-radio-group>
|
|
203
|
+
</wd-cell>
|
|
204
|
+
</wd-cell-group>
|
|
205
|
+
</wd-form>
|
|
206
|
+
</scroll-view>
|
|
207
|
+
<view class="popup-footer">
|
|
208
|
+
<wd-button type="primary" block @click="onInsteadFormSubmit">
|
|
209
|
+
{{ t('确认') }}
|
|
210
|
+
</wd-button>
|
|
211
|
+
</view>
|
|
212
|
+
</view>
|
|
213
|
+
</wd-popup>
|
|
109
214
|
</view>
|
|
110
215
|
</template>
|
|
111
216
|
|
|
112
217
|
<script lang="ts" setup>
|
|
113
|
-
import type { LcbOrderPaymentProps } from './types'
|
|
218
|
+
import type { LcbOrderPaymentProps, ChildContent } from './types'
|
|
219
|
+
import type { LcbFormField } from '../lcb-form/types'
|
|
114
220
|
import { useMessage, useTranslate } from '@tplc/wot'
|
|
115
|
-
import { ref, watch, onMounted } from 'vue'
|
|
221
|
+
import { ref, watch, onMounted, computed } from 'vue'
|
|
116
222
|
const { translate: t } = useTranslate()
|
|
117
223
|
defineOptions({
|
|
118
224
|
name: 'OrderPayment',
|
|
@@ -123,7 +229,7 @@ defineOptions({
|
|
|
123
229
|
},
|
|
124
230
|
})
|
|
125
231
|
const props = defineProps<LcbOrderPaymentProps>()
|
|
126
|
-
const emits = defineEmits(['onWalletPriceChange'])
|
|
232
|
+
const emits = defineEmits(['onWalletPriceChange', 'refresh'])
|
|
127
233
|
const payType = defineModel<string>()
|
|
128
234
|
const payCardId = defineModel<string>('payCardId')
|
|
129
235
|
// 代下单(instead)表单数据:提交到父级 form.paymentInfoJson
|
|
@@ -172,6 +278,10 @@ const onChange = ({ value }: { value: string }) => {
|
|
|
172
278
|
payCardId.value = undefined
|
|
173
279
|
return
|
|
174
280
|
}
|
|
281
|
+
if (value === 'instead') {
|
|
282
|
+
openInsteadPopup()
|
|
283
|
+
}
|
|
284
|
+
|
|
175
285
|
const [newPayType, newPayCardId] = value.split('-')
|
|
176
286
|
payType.value = newPayType
|
|
177
287
|
payCardId.value = newPayCardId || undefined
|
|
@@ -237,6 +347,61 @@ const onModifyPrice = (price: number, max: number) => {
|
|
|
237
347
|
}
|
|
238
348
|
})
|
|
239
349
|
}
|
|
350
|
+
|
|
351
|
+
// ==================== 代下单弹窗相关 ====================
|
|
352
|
+
const insteadPopupVisible = ref(false)
|
|
353
|
+
const currentInsteadItem = computed(() => props.data?.find((d) => d.type === 'instead'))
|
|
354
|
+
const tempInsteadForm = ref<Record<string, any>>({})
|
|
355
|
+
const insteadFormRef = ref()
|
|
356
|
+
|
|
357
|
+
// 是否已填写表单数据
|
|
358
|
+
const hasInsteadFormData = computed(() => {
|
|
359
|
+
return (
|
|
360
|
+
Object.keys(insteadForm.value).length > 0 &&
|
|
361
|
+
Object.values(insteadForm.value).some((v) => v !== undefined && v !== '' && v !== null)
|
|
362
|
+
)
|
|
363
|
+
})
|
|
364
|
+
|
|
365
|
+
// 打开弹窗
|
|
366
|
+
const openInsteadPopup = () => {
|
|
367
|
+
// 如果已有数据,用于回显编辑
|
|
368
|
+
tempInsteadForm.value = { ...insteadForm.value }
|
|
369
|
+
insteadPopupVisible.value = true
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// 获取弹窗表单选项
|
|
373
|
+
const getPopupColumns = (frontInputContent: string) => {
|
|
374
|
+
try {
|
|
375
|
+
return JSON.parse(frontInputContent || '[]')
|
|
376
|
+
} catch {
|
|
377
|
+
return []
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// 表单提交
|
|
382
|
+
const onInsteadFormSubmit = async () => {
|
|
383
|
+
if (!insteadFormRef.value) return
|
|
384
|
+
const { valid } = await insteadFormRef.value.validate()
|
|
385
|
+
if (!valid) return
|
|
386
|
+
|
|
387
|
+
insteadForm.value = { ...tempInsteadForm.value }
|
|
388
|
+
insteadPopupVisible.value = false
|
|
389
|
+
syncInsteadPaymentInfo()
|
|
390
|
+
emits('refresh')
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// 获取字段显示值
|
|
394
|
+
const getDisplayValue = (field: LcbFormField) => {
|
|
395
|
+
const value = insteadForm.value[field.field]
|
|
396
|
+
if (value === undefined || value === null || value === '') {
|
|
397
|
+
return '-'
|
|
398
|
+
}
|
|
399
|
+
// 处理数组类型(checkbox等)
|
|
400
|
+
if (Array.isArray(value)) {
|
|
401
|
+
return value.join('、')
|
|
402
|
+
}
|
|
403
|
+
return value
|
|
404
|
+
}
|
|
240
405
|
</script>
|
|
241
406
|
<style lang="scss">
|
|
242
407
|
.pay-group {
|
|
@@ -261,11 +426,132 @@ const onModifyPrice = (price: number, max: number) => {
|
|
|
261
426
|
padding: 0px !important;
|
|
262
427
|
}
|
|
263
428
|
}
|
|
429
|
+
}
|
|
264
430
|
|
|
265
|
-
|
|
266
|
-
|
|
431
|
+
// 代下单填写入口
|
|
432
|
+
.instead-entry {
|
|
433
|
+
display: flex;
|
|
434
|
+
align-items: center;
|
|
435
|
+
justify-content: space-between;
|
|
436
|
+
padding: 24rpx;
|
|
437
|
+
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
|
|
438
|
+
border: 2rpx dashed #e5e5e5;
|
|
439
|
+
border-radius: 16rpx;
|
|
440
|
+
cursor: pointer;
|
|
441
|
+
transition: all 0.2s ease;
|
|
442
|
+
|
|
443
|
+
&:active {
|
|
444
|
+
background: linear-gradient(135deg, #f0f1f2 0%, #f8f8f8 100%);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.entry-content {
|
|
448
|
+
display: flex;
|
|
449
|
+
align-items: center;
|
|
450
|
+
gap: 12rpx;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.entry-text {
|
|
454
|
+
color: #999;
|
|
455
|
+
font-size: 28rpx;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// 代下单回显卡片
|
|
460
|
+
.instead-preview {
|
|
461
|
+
display: flex;
|
|
462
|
+
align-items: center;
|
|
463
|
+
justify-content: space-between;
|
|
464
|
+
padding: 24rpx;
|
|
465
|
+
background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
|
|
466
|
+
border: 2rpx solid #e8f4ff;
|
|
467
|
+
border-radius: 16rpx;
|
|
468
|
+
cursor: pointer;
|
|
469
|
+
transition: all 0.2s ease;
|
|
470
|
+
|
|
471
|
+
&:active {
|
|
472
|
+
background: linear-gradient(135deg, #e5f2ff 0%, #f5f5f5 100%);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.preview-content {
|
|
476
|
+
flex: 1;
|
|
477
|
+
display: flex;
|
|
478
|
+
flex-direction: column;
|
|
479
|
+
gap: 12rpx;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.preview-row {
|
|
483
|
+
display: flex;
|
|
484
|
+
align-items: center;
|
|
485
|
+
gap: 16rpx;
|
|
486
|
+
font-size: 26rpx;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.preview-label {
|
|
490
|
+
color: #999;
|
|
491
|
+
flex-shrink: 0;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.preview-value {
|
|
495
|
+
color: #333;
|
|
496
|
+
font-weight: 500;
|
|
497
|
+
word-break: break-all;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.edit-action {
|
|
501
|
+
display: flex;
|
|
502
|
+
align-items: center;
|
|
503
|
+
gap: 4rpx;
|
|
504
|
+
flex-shrink: 0;
|
|
505
|
+
margin-left: 16rpx;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.edit-text {
|
|
509
|
+
color: var(--wd-color-primary);
|
|
510
|
+
font-size: 26rpx;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// 代下单弹窗
|
|
515
|
+
.instead-popup {
|
|
516
|
+
display: flex;
|
|
517
|
+
flex-direction: column;
|
|
518
|
+
max-height: 70vh;
|
|
519
|
+
background: #fff;
|
|
520
|
+
padding: 0 32rpx;
|
|
521
|
+
box-sizing: border-box;
|
|
522
|
+
|
|
523
|
+
.popup-header {
|
|
524
|
+
padding: 32rpx 0;
|
|
525
|
+
border-bottom: 1rpx solid #f0f0f0;
|
|
526
|
+
flex-shrink: 0;
|
|
527
|
+
box-sizing: border-box;
|
|
528
|
+
text-align: center;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.popup-title {
|
|
532
|
+
font-size: 32rpx;
|
|
533
|
+
font-weight: 600;
|
|
534
|
+
color: #333;
|
|
535
|
+
text-align: center;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.popup-body {
|
|
539
|
+
flex: 1;
|
|
540
|
+
padding: 24rpx 32rpx;
|
|
541
|
+
overflow-y: auto;
|
|
542
|
+
max-height: 50vh;
|
|
543
|
+
box-sizing: border-box;
|
|
544
|
+
|
|
545
|
+
:deep(.wd-cell__wrapper) {
|
|
267
546
|
padding: 16rpx 0rpx !important;
|
|
268
547
|
}
|
|
269
548
|
}
|
|
549
|
+
|
|
550
|
+
.popup-footer {
|
|
551
|
+
padding: 24rpx 32rpx;
|
|
552
|
+
border-top: 1rpx solid #f0f0f0;
|
|
553
|
+
box-sizing: border-box;
|
|
554
|
+
flex-shrink: 0;
|
|
555
|
+
}
|
|
270
556
|
}
|
|
271
557
|
</style>
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
17
17
|
'update:modelValue': (modelValue: string) => void
|
|
18
18
|
'update:payCardId': (payCardId: string) => void
|
|
19
19
|
'update:paymentInfoJson': (paymentInfoJson: Record<string, any>) => void
|
|
20
|
+
refresh: (...args: any[]) => void
|
|
20
21
|
onWalletPriceChange: (...args: any[]) => void
|
|
21
22
|
},
|
|
22
23
|
string,
|
|
@@ -24,6 +25,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
24
25
|
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
25
26
|
'onUpdate:modelValue'?: ((modelValue: string) => any) | undefined
|
|
26
27
|
onOnWalletPriceChange?: ((...args: any[]) => any) | undefined
|
|
28
|
+
onRefresh?: ((...args: any[]) => any) | undefined
|
|
27
29
|
'onUpdate:payCardId'?: ((payCardId: string) => any) | undefined
|
|
28
30
|
'onUpdate:paymentInfoJson'?: ((paymentInfoJson: Record<string, any>) => any) | undefined
|
|
29
31
|
},
|