<template>
	<view class="center">
		<view>
			<image @click='consent' style='width:14px;height:14px;position:relative;top:2px;margin-right:5px;' :src="consentStatus==true?'../../static/img/login/select@2x.png':'../../static/img/login/selected2.png'" alt=""></image>
			<text>公司</text>
			<image @click='consent' style='width:14px;height:14px;position:relative;top:2px;margin-right:5px;' :src="consentStatus1==true?'../../static/img/login/select@2x.png':'../../static/img/login/selected2.png'" alt=""></image>
			<text>个人</text>
			<!-- <label class="radio" v-model="radios">
				<radio value="1" name="radios" /><text>公司</text>
				<radio value="2" name="radios" /><text>个人</text>
			</label> -->
		</view>
		<view v-if="consentStatus == true">
			<view>
				<button type="default" @click="license">营业执照</button>
			</view>
			<view class="c-row b-b">
				<text class="tit">公司名称</text>
				<view class="con-list">
					{{deptList.compName}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">纳税人识别号</text>
				<view class="con-list">
				{{deptList.payTaxesCard}}
				</view>
			</view>
			<view>
				<button type="default">身份证正面</button>
				<button type="default">身份证反面</button>
			</view>
			<view class="c-row b-b">
				<text class="tit">姓名</text>
				<view class="con-list">
					{{deptList.customerName}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">身份证号</text>
				<view class="con-list">
					{{deptList.customerNumberCard}}
				</view>
			</view>
			<view>
				<button type="default">银行卡正面</button>
				<button type="default">银行卡反面</button>
			</view>
			<view class="c-row b-b">
				<text class="tit">银行卡号</text>
				<view class="con-list">
					{{deptList.bankCard}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">开户行</text>
				<view class="con-list">
					{{deptList.bankDeposit}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">开户支行</text>
				<view class="con-list">
					{{deptList.bankDepositBranch}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">手机号</text>
				<view class="con-list">
					{{deptList.customerPhone}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">公司地址</text>
				<view class="con-list">
					{{deptList.compAddress}}
				</view>
			</view>
		</view>
		<view v-else>
			<view>
				<button type="default">上传身份证正面</button>
				<button type="default">上传身份证反面</button>
			</view>
			<view class="c-row b-b">
				<text class="tit">姓名</text>
				<view class="con-list">
					{{deptList.customerName}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">身份证号</text>
				<view class="con-list">
					{{deptList.customerNumberCard}}
				</view>
			</view>
			<view>
				<button type="default">上传银行卡正面</button>
				<button type="default">上传银行卡反面</button>
			</view>
			<view class="c-row b-b">
				<text class="tit">银行卡号</text>
				<view class="con-list">
					{{deptList.bankCard}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">开户行</text>
				<view class="con-list">
					{{deptList.bankDeposit}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">开户支行</text>
				<view class="con-list">
					{{deptList.bankDepositBranch}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">收款人姓名</text>
				<view class="con-list">
					{{ deptList.payeeName}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">收款人身份证号</text>
				<view class="con-list">
					{{deptList.payeeNumberCard}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">手机号</text>
				<view class="con-list">
					{{deptList.customerPhone}}
				</view>
			</view>
			<view class="c-row b-b">
				<text class="tit">联系地址</text>
				<view class="con-list">
					{{deptList.compAddress}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
	    mapState 
	} from 'vuex';
	export default {
		name: "buy",
		data() {
			return {
				radios: 2,
				deptList:{},
				id:"2c4b2845e9dc47ca95c05ad471881be0",
				consentStatus:true,
				consentStatus1:false,

			};
		},
		onLoad() {
			this.getList()
		},
		computed: {
			...mapState(['hasLogin','userInfo'])
		},
		methods: {
			getList() {
				
				this.$api.doRequest('get', '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo', {id:this.id}, 'application/json;').then(res => {
						console.log("成功连接")
						this.procurementPlanInfos = res.data.data
					})
					.catch(res => {
						uni.showToast({
							title: res.errmsg,
							icon: 'none',
							duration: 2000
						})
					});
			},
			consent(){
				if(this.consentStatus == false && this.consentStatus1 == true){
					this.consentStatus = true
					this.consentStatus1 = false
				}else if(this.consentStatus == true && this.consentStatus1 == false){
					this.consentStatus = false
					this.consentStatus1 = true
				}
				
			},
			
		}
	}
</script>

<style>
	.center {
		padding: 10px 20px;
	}

	.c-row {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		padding: 20rpx 30rpx;
		position: relative;
	}

	.con-list {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-webkit-flex-direction: column;
		flex-direction: column;
		color: #303133;
		line-height: 40rpx;
		text-align: right;
		padding-right: 20rpx;
		font-size: 14px;
	}
</style>
