step2.vue
3.88 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<template>
<view>
<!-- 个人信息完善 -->
<view class="title-left-border">个人信息</view>
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="80">
<view class="photobox" v-if="baseFormData.photo">
<image mode="aspectFill" :src="config.baseUrl_api + baseFormData.photo"></image>
</view>
<uni-forms-item label="会员编号" required name="perCode">
<uni-easyinput disabled v-model="baseFormData.perCode" placeholder="请输入会员编号" />
</uni-forms-item>
<uni-forms-item label="有效期" required name="validityDate">
<uni-easyinput disabled v-model="baseFormData.validityDate" placeholder="请输入会员编号" />
</uni-forms-item>
<uni-forms-item label="姓名" required name="name">
<uni-easyinput disabled v-model="baseFormData.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="性别" required name="sex">
<uni-data-checkbox v-model="baseFormData.sex" disabled :localdata="sexs" />
</uni-forms-item>
<uni-forms-item label="证件类型" required name="idcType">
<uni-data-select v-model="baseFormData.idcType" disabled :localdata="certificates">
</uni-data-select>
</uni-forms-item>
<uni-forms-item label="证件号码" required name="idcCode">
<uni-easyinput v-model="baseFormData.idcCode" placeholder="请输入证件号码" disabled />
</uni-forms-item>
<uni-forms-item label="出生日期" required name="birth">
<!-- <uni-datetime-picker type="date" disabled :clear-icon="false" v-model="baseFormData.birth" /> -->
<uni-easyinput disabled v-model="baseFormData.birth" />
</uni-forms-item>
<uni-forms-item label="联系方式" required name="phone">
<uni-easyinput v-model="baseFormData.phone" disabled placeholder="请输入联系方式" />
</uni-forms-item>
<uni-forms-item label="所在地区" required name="cityName">
<uni-easyinput disabled v-model="baseFormData.cityName" placeholder="请输入所在地区" />
</uni-forms-item>
<uni-forms-item label="详细地址" required name="address">
<uni-easyinput disabled v-model="baseFormData.address" placeholder="请输入详细地址" />
</uni-forms-item>
</uni-forms>
</view>
<view class="fixedBottom">
<button class="btn btn-red-kx" @click="prev">上一步</button>
<button class="btn btn-red" @click="next">下一步</button>
</view>
</template>
<script setup>
import {
onLoad
} from '@dcloudio/uni-app'
import {
ref,
reactive,
toRefs,
computed
} from 'vue'
import * as train from '@/training/train.js'
import config from '@/config.js'
const emit = defineEmits(['prev', 'next'])
const props = defineProps({
personal: {
type: Object,
default: () => {}
}
})
const baseFormData = computed(() => props.personal)
const sexs = ref([{
value: '0',
text: '女'
}, {
value: '1',
text: '男'
}])
const certificates = ref([{
text: '身份证',
value: '0'
},
{
text: '港澳台通行证 ',
value: '1'
},
{
text: '中国护照',
value: '2'
},
{
text: '外国护照',
value: '3'
},
{
text: '其它',
value: '4'
},
{
text: '户口本',
value: '5'
}
])
onLoad(options => {
// console.log(baseFormData)
})
function prev() {
emit('prev')
}
function next() {
emit('next')
}
</script>
<style scoped lang="scss">
.photobox {
margin: 30rpx 0;
image {
width: 150rpx;
height: 200rpx;
display: block;
margin: auto;
}
}
:deep(.is-disabled.is-input-border){color: #000!important;}
:deep(.uni-data-checklist .checklist-group .checklist-box.is--default.is-checked.is-disable .checklist-text){
opacity: 1!important;
}
:deep(.uni-data-checklist .checklist-group .checklist-box.is--default.is-checked.is-disable .radio__inner){
opacity: 1!important;
}
</style>