<template>
	<view class="container">
		<view class="page">
			<view class="housing">
				<view class="steps">
					<view class="item active">
						<view class="uni-icons"><uni-icons type="home-filled" size="20" color="#6A59F2"></uni-icons>
						</view>
						<view class="name">房屋信息</view>
					</view>
					<view class="dotted"></view>
					<view class="item">
						<view class="uni-icons"><uni-icons type="person-filled" size="20" color="#B5B8ED"></uni-icons>
						</view>
						<view class="name">住户信息</view>
					</view>
					<view class="dotted"></view>
					<view class="item">
						<view class="uni-icons"><uni-icons type="auth-filled" size="20" color="#B5B8ED"></uni-icons>
						</view>
						<view class="name">物业审核</view>
					</view>
					<view class="dotted"></view>
					<view class="item">
						<view class="uni-icons"><uni-icons type="checkbox-filled" size="20" color="#B5B8ED"></uni-icons>
						</view>
						<view class="name">认证成功</view>
					</view>
				</view>
				<view class="form">
					<uni-forms>
						<view class="form-item">
							<view class="form-item-fl">物业公司</view>
							<view class="form-item-fr">
								<picker @change="bindPickerChange" :value="index" :range="array" class="form-item-tit">
									<view class="uni-input">{{array[index] || '请选择'}}</view>
								</picker>
								<uni-icons type="forward" color="#E4E4EA"></uni-icons>
							</view>
						</view>
						<view class="form-item">
							<view class="form-item-fl">小区</view>
							<view class="form-item-fr">
								<picker @change="bindPickerChange" :value="index" :range="array" class="form-item-tit">
									<view class="uni-input">{{array[index] || '请选择'}}</view>
								</picker>
								<uni-icons type="forward" color="#E4E4EA"></uni-icons>
							</view>
						</view>
						<view class="form-item">
							<view class="form-item-fl">楼栋</view>
							<view class="form-item-fr">
								<picker @change="bindPickerChange" :value="index" :range="array" class="form-item-tit">
									<view class="uni-input">{{array[index] || '请选择'}}</view>
								</picker>
								<uni-icons type="forward" color="#E4E4EA"></uni-icons>
							</view>
						</view>
						<view class="form-item">
							<view class="form-item-fl">单元</view>
							<view class="form-item-fr">
								<picker @change="bindPickerChange" :value="index" :range="array" class="form-item-tit">
									<view class="uni-input">{{array[index] || '请选择'}}</view>
								</picker>
								<uni-icons type="forward" color="#E4E4EA"></uni-icons>
							</view>
						</view>
						<view class="form-item">
							<view class="form-item-fl">户号</view>
							<view class="form-item-fr">
								<picker @change="bindPickerChange" :value="index" :range="array" class="form-item-tit">
									<view class="uni-input">{{array[index] || '请选择'}}</view>
								</picker>
								<uni-icons type="forward" color="#E4E4EA"></uni-icons>
							</view>
						</view>
						<view class="form-item">
							<view class="form-item-fl">房屋状态</view>
							<view class="form-item-fr">
								<picker @change="bindPickerChange" :value="index" :range="array" class="form-item-tit">
									<view class="uni-input">{{array[index] || '请选择'}}</view>
								</picker>
								<uni-icons type="forward" color="#E4E4EA"></uni-icons>
							</view>
						</view>
						<view class="form-item">
							<view class="form-item-fl">房屋用途</view>
							<view class="form-item-fr">
								<picker @change="bindPickerChange" :value="index" :range="array" class="form-item-tit">
									<view class="uni-input">{{array[index] || '请选择'}}</view>
								</picker>
								<uni-icons type="forward" color="#E4E4EA"></uni-icons>
							</view>
						</view>
						<view class="form-item">
							<view class="form-item-fl">设为默认房屋</view>
							<view class="form-item-fr">
								<switch checked color="#6A59F2" style="transform:scale(0.7)" />
							</view>
						</view>
					</uni-forms>
				</view>

				<view class="form-submit" @click="toNext()">下一步</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				index: '',
				array: ['选择一', '选择二', '选择三']
			}
		},
		methods: {
			bindPickerChange: function(e) {
				this.index = e.detail.value
			},
			toNext() {
				uni.navigateTo({
					url: '/pages/housingResidents/index',
				});
			}
		},
		onLoad() {

		},
		onShow() {

		}
	}
</script>
<style>
	page {
		background-color: #F8F6F9;
	}
</style>
<style lang="scss" scoped>
	.page {
		padding: 30rpx;
	}

	.housing {
		.steps {
			display: flex;
			justify-content: space-between;
			background-color: #ffffff;
			border-radius: 16rpx;
			padding: 30rpx;
			margin-bottom: 30rpx;

			.item {
				display: flex;
				flex-wrap: wrap;
				justify-content: center;

				.uni-icons {
					text-align: center;
					width: 60rpx;
					height: 60rpx;
					border-radius: 60rpx;
					border: 1px solid #B5B8ED;
					line-height: 60rpx;
				}

				.name {
					margin-top: 10rpx;
					font-size: 28rpx;
					color: #9D9CA6;
				}

			}

			.active {
				.uni-icons {
					border: 1px solid #6A59F2;
				}

				.name {
					color: #373737;
				}
			}

			.dotted {
				margin-top: 28rpx;
				width: 40px;
				height: 1px;
				border-bottom: 1px dashed #B5B8ED;
			}
		}

		.form {
			background-color: #ffffff;
			border-radius: 16rpx;
			padding: 30rpx;
			margin-bottom: 30rpx;

			.form-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 84rpx;
				line-height: 84rpx;
				border-bottom: 1px solid #F8F6F9;
				overflow: hidden;
			}

			.form-item-fl {
				font-size: 28rpx;
				color: #373737;
			}

			.form-item-fr {
				display: flex;
				flex: 2;
				align-items: center;
				justify-content: flex-end;
				margin-left: 20rpx;
			}

			.form-item-tit {
				font-size: 28rpx;
				color: #666;
				margin-right: 20rpx;
			}
		}
	}
	.form-submit {
		height: 80rpx;
		line-height: 80rpx;
		background-color: #6A59F2;
		border-radius: 80rpx;
		width: 100%;
		text-align: center;
		font-size: 28rpx;
		color: #FFFFFF;
	}
</style>