@tplc/business 0.7.69 → 0.7.70
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,29 @@
|
|
|
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.70](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.28...v0.7.70) (2026-01-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
9
|
+
|
|
10
|
+
* **wd-img:** remove unnecessary class from image component for cleaner styling ([05e83d5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/05e83d5a211aba9d90704b7e871f0a29a4962d7a))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ Features | 新功能
|
|
14
|
+
|
|
15
|
+
* 修改字段 ([8ed5c88](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8ed5c880145b1d96d1afdd3848da9a6d20ae2ed5))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
19
|
+
|
|
20
|
+
* **release:** 0.7.68 ([03c52e5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/03c52e5aa2bed75f0bd7cf66c0d3934d1196329a))
|
|
21
|
+
* **release:** 0.7.69 ([658ab2d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/658ab2d29555b2f148956fbd8e2600e02ea7d84d))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### ♻️ Code Refactoring | 代码重构
|
|
25
|
+
|
|
26
|
+
* **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))
|
|
27
|
+
|
|
5
28
|
### [0.7.69](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.68...v0.7.69) (2026-01-14)
|
|
6
29
|
|
|
7
30
|
### [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(item)">
|
|
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(item)">
|
|
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
|
|
@@ -237,6 +343,62 @@ const onModifyPrice = (price: number, max: number) => {
|
|
|
237
343
|
}
|
|
238
344
|
})
|
|
239
345
|
}
|
|
346
|
+
|
|
347
|
+
// ==================== 代下单弹窗相关 ====================
|
|
348
|
+
const insteadPopupVisible = ref(false)
|
|
349
|
+
const currentInsteadItem = ref<ChildContent | null>()
|
|
350
|
+
const tempInsteadForm = ref<Record<string, any>>({})
|
|
351
|
+
const insteadFormRef = ref()
|
|
352
|
+
|
|
353
|
+
// 是否已填写表单数据
|
|
354
|
+
const hasInsteadFormData = computed(() => {
|
|
355
|
+
return (
|
|
356
|
+
Object.keys(insteadForm.value).length > 0 &&
|
|
357
|
+
Object.values(insteadForm.value).some((v) => v !== undefined && v !== '' && v !== null)
|
|
358
|
+
)
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
// 打开弹窗
|
|
362
|
+
const openInsteadPopup = (item: ChildContent) => {
|
|
363
|
+
currentInsteadItem.value = item
|
|
364
|
+
// 如果已有数据,用于回显编辑
|
|
365
|
+
tempInsteadForm.value = { ...insteadForm.value }
|
|
366
|
+
insteadPopupVisible.value = true
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// 获取弹窗表单选项
|
|
370
|
+
const getPopupColumns = (frontInputContent: string) => {
|
|
371
|
+
try {
|
|
372
|
+
return JSON.parse(frontInputContent || '[]')
|
|
373
|
+
} catch {
|
|
374
|
+
return []
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// 表单提交
|
|
379
|
+
const onInsteadFormSubmit = async () => {
|
|
380
|
+
if (!insteadFormRef.value) return
|
|
381
|
+
const { valid } = await insteadFormRef.value.validate()
|
|
382
|
+
if (!valid) return
|
|
383
|
+
|
|
384
|
+
insteadForm.value = { ...tempInsteadForm.value }
|
|
385
|
+
insteadPopupVisible.value = false
|
|
386
|
+
syncInsteadPaymentInfo()
|
|
387
|
+
emits('refresh')
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// 获取字段显示值
|
|
391
|
+
const getDisplayValue = (field: LcbFormField) => {
|
|
392
|
+
const value = insteadForm.value[field.field]
|
|
393
|
+
if (value === undefined || value === null || value === '') {
|
|
394
|
+
return '-'
|
|
395
|
+
}
|
|
396
|
+
// 处理数组类型(checkbox等)
|
|
397
|
+
if (Array.isArray(value)) {
|
|
398
|
+
return value.join('、')
|
|
399
|
+
}
|
|
400
|
+
return value
|
|
401
|
+
}
|
|
240
402
|
</script>
|
|
241
403
|
<style lang="scss">
|
|
242
404
|
.pay-group {
|
|
@@ -261,11 +423,132 @@ const onModifyPrice = (price: number, max: number) => {
|
|
|
261
423
|
padding: 0px !important;
|
|
262
424
|
}
|
|
263
425
|
}
|
|
426
|
+
}
|
|
264
427
|
|
|
265
|
-
|
|
266
|
-
|
|
428
|
+
// 代下单填写入口
|
|
429
|
+
.instead-entry {
|
|
430
|
+
display: flex;
|
|
431
|
+
align-items: center;
|
|
432
|
+
justify-content: space-between;
|
|
433
|
+
padding: 24rpx;
|
|
434
|
+
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
|
|
435
|
+
border: 2rpx dashed #e5e5e5;
|
|
436
|
+
border-radius: 16rpx;
|
|
437
|
+
cursor: pointer;
|
|
438
|
+
transition: all 0.2s ease;
|
|
439
|
+
|
|
440
|
+
&:active {
|
|
441
|
+
background: linear-gradient(135deg, #f0f1f2 0%, #f8f8f8 100%);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.entry-content {
|
|
445
|
+
display: flex;
|
|
446
|
+
align-items: center;
|
|
447
|
+
gap: 12rpx;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.entry-text {
|
|
451
|
+
color: #999;
|
|
452
|
+
font-size: 28rpx;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// 代下单回显卡片
|
|
457
|
+
.instead-preview {
|
|
458
|
+
display: flex;
|
|
459
|
+
align-items: center;
|
|
460
|
+
justify-content: space-between;
|
|
461
|
+
padding: 24rpx;
|
|
462
|
+
background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
|
|
463
|
+
border: 2rpx solid #e8f4ff;
|
|
464
|
+
border-radius: 16rpx;
|
|
465
|
+
cursor: pointer;
|
|
466
|
+
transition: all 0.2s ease;
|
|
467
|
+
|
|
468
|
+
&:active {
|
|
469
|
+
background: linear-gradient(135deg, #e5f2ff 0%, #f5f5f5 100%);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.preview-content {
|
|
473
|
+
flex: 1;
|
|
474
|
+
display: flex;
|
|
475
|
+
flex-direction: column;
|
|
476
|
+
gap: 12rpx;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.preview-row {
|
|
480
|
+
display: flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
gap: 16rpx;
|
|
483
|
+
font-size: 26rpx;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.preview-label {
|
|
487
|
+
color: #999;
|
|
488
|
+
flex-shrink: 0;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.preview-value {
|
|
492
|
+
color: #333;
|
|
493
|
+
font-weight: 500;
|
|
494
|
+
word-break: break-all;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.edit-action {
|
|
498
|
+
display: flex;
|
|
499
|
+
align-items: center;
|
|
500
|
+
gap: 4rpx;
|
|
501
|
+
flex-shrink: 0;
|
|
502
|
+
margin-left: 16rpx;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.edit-text {
|
|
506
|
+
color: var(--wd-color-primary);
|
|
507
|
+
font-size: 26rpx;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// 代下单弹窗
|
|
512
|
+
.instead-popup {
|
|
513
|
+
display: flex;
|
|
514
|
+
flex-direction: column;
|
|
515
|
+
max-height: 70vh;
|
|
516
|
+
background: #fff;
|
|
517
|
+
padding: 0 32rpx;
|
|
518
|
+
box-sizing: border-box;
|
|
519
|
+
|
|
520
|
+
.popup-header {
|
|
521
|
+
padding: 32rpx 0;
|
|
522
|
+
border-bottom: 1rpx solid #f0f0f0;
|
|
523
|
+
flex-shrink: 0;
|
|
524
|
+
box-sizing: border-box;
|
|
525
|
+
text-align: center;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.popup-title {
|
|
529
|
+
font-size: 32rpx;
|
|
530
|
+
font-weight: 600;
|
|
531
|
+
color: #333;
|
|
532
|
+
text-align: center;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.popup-body {
|
|
536
|
+
flex: 1;
|
|
537
|
+
padding: 24rpx 32rpx;
|
|
538
|
+
overflow-y: auto;
|
|
539
|
+
max-height: 50vh;
|
|
540
|
+
box-sizing: border-box;
|
|
541
|
+
|
|
542
|
+
:deep(.wd-cell__wrapper) {
|
|
267
543
|
padding: 16rpx 0rpx !important;
|
|
268
544
|
}
|
|
269
545
|
}
|
|
546
|
+
|
|
547
|
+
.popup-footer {
|
|
548
|
+
padding: 24rpx 32rpx;
|
|
549
|
+
border-top: 1rpx solid #f0f0f0;
|
|
550
|
+
box-sizing: border-box;
|
|
551
|
+
flex-shrink: 0;
|
|
552
|
+
}
|
|
270
553
|
}
|
|
271
554
|
</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
|
},
|