<template>
	<view>
		<view class="upper-steps">
			<u-steps :current="formSwitch">
				<view @click="formSwitch = 0">
					<u-steps-item title="企业基本信息"></u-steps-item>
				</view>
				<view @click="formSwitch = 1">
					<u-steps-item title="被授权人信息"></u-steps-item>
				</view>
				<view @click="formSwitch = 2">
					<u-steps-item title="银行信息"></u-steps-item>
				</view>
			</u-steps>
		</view>
		<view class="comp-info" v-show="formSwitch == 0">
			<h5>企业基本信息</h5>
			<uni-forms ref="compInfoForm" :rules="compRules" :modelValue="compInfoFormData" label-position="top">
				<uni-forms-item required name="name" label="单位名称" label-width="150">
					<uni-easyinput placeholder="请输入" v-model="compInfoFormData.name"></uni-easyinput>
				</uni-forms-item>
				<uni-forms-item required name="code" label="统一社会信用代码" label-width="150">
					<uni-easyinput placeholder="请输入" v-model="compInfoFormData.code"></uni-easyinput>
				</uni-forms-item>
			</uni-forms>
		</view>
		<view class="authed-info" v-show="formSwitch == 1">
			<h5>被授权人信息</h5>
		</view>
		<view class="bank-info" v-show="formSwitch == 2"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formSwitch: 0,
				compInfoFormData: {
					name: '',
					code: ''
				},
				compRules: {
					name: {
						rules: [
							{
								required: true,
								errorMessage: '请输入企业名称！'
							}
						]
					},
					code: {
						rules: [
							{
								required: true,
								errorMessage: '请输入统一社会信用代码！'
							}
						]
					}
				}
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	body{
		background-color: #F2F2F2;
	}
	.upper-steps, .comp-info, .authed-info, .bank-info{
		width: 95%;
		margin: 20rpx auto;
		background-color: #fff;
		box-sizing: border-box;
		padding: 25rpx;
		border-radius: 15rpx;
		h5{
			margin-bottom: 30rpx;
		}
	}
	.upper-steps{
		.u-steps{
			justify-content: space-around;
			/* .u-steps-item{
				.u-steps-item__line:first-child{
					width: 110px;
				}
				.u-steps-item__line:last-child{
					width: 90px;
				}
			} */
		}
	}
</style>
