<template>
	<div class="detail-list">
		<div>
			<h5>基本信息</h5>
			<ul class="flex">
				<li>
					<div>单位名称</div>
					<div>{{detail.companyName}}</div>
				</li>
				<li>
					<div>法人姓名</div>
					<div>{{detail.legalPersonName}}</div>
				</li>
				<li>
					<div>统一社会信用代码</div>
					<div>{{detail.socialCode}}</div>
				</li>
				<li>
					<div>行政区域 </div>
					<div>{{detail.location}}</div>
				</li>
				<li>
					<div>单位性质</div>
					<div>{{detail.companyNatureName}}</div>
				</li>
				<li>
					<div>单位所在地</div>
					<div>{{detail.contactAddress}}</div>
				</li>

				<li>
					<div>注册资本(万元)</div>
					<div>{{detail.registeredCapital}}</div>
				</li>
				<li>
					<div>联系地址</div>
					<div>{{detail.contactAddress}}</div>
				</li>
				<li>
					<div>联系人姓名</div>
					<div>{{detail.contacts.userName}}</div>
				</li>
				<li>
					<div> 手机号 </div>
					<div>{{detail.legalPersonPhone}}</div>
				</li>
				<li>
					<div>电子邮箱 </div>
					<div>{{detail.email}}</div>
				</li>
			</ul>
			<div class="detail-item">
				<div>经营范围</div>
				<div>{{detail.businessScope}}</div>
			</div>
			<div class="detail-item">
				<div>行业类型</div>
				<div>{{detail.industryName}}</div>
			</div>
		</div>
	</div>
</template>

<script>
	import {
		companyDetail
	} from '@api/common/list'
	export default {
		props: {
			companyId: {
				type: String,
				default: 0
			},
		},
		data() {
			return {
				detail: {},
			}
		},
		created() {
			this.getcompanyDetail();
		},
		methods: {
			async getcompanyDetail() {
				try {
					let companyId = this.companyId
					const {
						data,
						code
					} = await companyDetail(companyId)
					if (code === 200) {
						this.detail = data
					}
				} catch (e) {
					console.log(e)
				}
			}
		}

	}
</script>

<style>
	.detail-list>div>ul>li {
		margin-right: 150px;
		margin-bottom: 50px;
		width: 180px
	}

	.detail-list>div>ul {
		flex-wrap: wrap;
		margin-left: 30px;
		margin-top: 20px;
	}

	.detail-head {
		margin-left: 30px;
		padding-top: 10px;
	}

	.detail-head>h3 {
		font-weight: bold;
		margin-top: 10px;
		margin-bottom: 10px;
	}

	.detail-list {
		box-sizing: border-box;
		padding-top: 20px;
		background-color: #F0F2F5;
		margin-top: 10px;
	}

	.detail-list>div {
		background-color: #FFFF;
		padding-bottom: 20px;
	}

	.detail-list h5 {
		font-weight: bold;
		height: 50px;
		line-height: 50px;
		border-bottom: 1px solid #F0F2F5;
		box-sizing: border-box;
		padding-left: 30px;
	}

	.detail-item {
		margin-left: 30px;
		margin-bottom: 30px;
	}

	.detail-item>div:first-child {
		margin-bottom: 10px;
	}
</style>
