DivisionTestStep2Allocate.vue
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<template>
<div class="division-test-step2">
<div class="merchant-grid">
<div
v-for="(item, index) in merchants"
:key="merchantKey(item, index)"
class="merchant-grid-item"
>
<p class="merchant-name">
<span class="bullet">•</span>{{ item.merchantName }}
</p>
<div v-if="item.testCompleted" class="completed-tag">已完成测试</div>
<el-input
v-else
:value="item.displayDivisionMoney"
size="small"
disabled
placeholder="请输入分润金额"
/>
</div>
</div>
<p class="step2-hint">
设置待测试商户的分润金额<br>
说明:分润总金额必须等于3.5元,最后一个商户默认承担手续费
</p>
</div>
</template>
<script>
export default {
name: 'DivisionTestStep2Allocate',
props: {
merchants: {
type: Array,
default: () => []
}
},
methods: {
merchantKey(item, index) {
return item.merchantId ?? item.merchantName ?? index
}
}
}
</script>
<style scoped lang="scss">
.division-test-step2 {
background: #f5f7fa;
border-radius: 8px;
padding: 24px 32px 20px;
min-height: 280px;
}
.merchant-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px 40px;
max-width: 640px;
margin: 0 auto;
}
.merchant-grid-item {
.merchant-name {
margin: 0 0 8px;
font-size: 14px;
color: #333;
.bullet {
margin-right: 4px;
color: #666;
}
}
.completed-tag {
height: 32px;
line-height: 32px;
font-size: 14px;
color: #2b58ad;
padding-left: 8px;
}
}
.step2-hint {
text-align: center;
font-size: 12px;
color: #666;
line-height: 1.6;
margin: 24px 0 0;
}
</style>