<template>
	<page-meta :page-style="themeColor"></page-meta>
	<div class="view">
		<div class="card">
			<div class="row">
				<div class="title">发票类型</div>
				<div class="desc">
					{{data.invoiceType}}
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">抬头类型</div>
				<div class="desc">
					{{data.headerType}}
					<!-- <image :src="$util.img('/upload/weapp/user/arrow-right.png')" mode=""></image> -->
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">发票抬头</div>
				<div class="desc">
					<u-input placeholder="请输入发票抬头"></u-input>
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">税号</div>
				<div class="desc">
					<u-input placeholder="请输入纳税人识别号"></u-input>
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">开票金额</div>
				<div class="desc">
					<span class="rmb">￥</span>
					{{data.money}}
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">发票内容</div>
				<div class="desc">
					{{data.content}}
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">设为默认抬头</div>
				<div class="desc">
					<u-switch
						space="2" v-model="value11" activeColor="var(--base-color)"
						inactiveColor="#E8E8E8">
					</u-switch>
				</div>
			</div>
			
		</div>
		
		<div class="card">
			<div class="row">
				<div class="title">开户银行</div>
				<div class="desc">
					<u-input placeholder="请输入开户银行"></u-input>
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">银行账号</div>
				<div class="desc">
					<u-input placeholder="请输入银行账号"></u-input>
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">企业地址</div>
				<div class="desc">
					<u-input placeholder="请输入企业地址"></u-input>
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">企业电话</div>
				<div class="desc">
					<u-input placeholder="请输入企业电话"></u-input>
				</div>
			</div>
			<u-line style="margin: 24rpx 0;"></u-line>
			
			<div class="row">
				<div class="title">邮箱地址</div>
				<div class="desc">
					<u-input placeholder="请输入邮箱地址"></u-input>
				</div>
			</div>	
		</div>
		
		<div class="btnbox">
			<div class="btn1" @click="bukai">不开发票</div>
			<div class="btn2" @click="submit">申请开票</div>
		</div>
		
		<u-modal :show="modalShow" class="modal" title="提示" >
			<div class="content">
				发票申请成功
			</div>
			<div slot="confirmButton" class="modal_btn" @click="modal_confirm">
				确认
			</div>
		</u-modal>
		<u-overlay :show="show">
			<view class="connection-type">
				<div  v-for="(item,index) in list" :key="index">
					<div class="arr df aic jcsb" @click="four(index)">
						<div class="df aic">
							<text>{{item.name}}</text>
						</div>
						<image v-if="index==indexd" :src="$util.img(`/upload/weapp/user/gou.png`)" mode=""></image>
						<image v-else :src="$util.img(`/upload/weapp/user/un_gou.png`)" mode=""></image>
					</div>
					
				</div>
								
				 <view class="df Type-confirmation">
				 	<div class="df aic jcsa btn1"  @click="show= false">返回</div>
				 	<div class="df aic jcsa btn2"  @click="show= false">确定</div>
				 </view>
			</view>
			
		</u-overlay>
		<u-overlay :show="show1">
			<view class="connection-type">
				<div  v-for="(item,index) in goods" :key="index">
					<div class="arr df aic jcsb" @click="time(index)">
						<div class="df aic">
							<text>{{item.name}}</text>
						</div>
						<image v-if="index==indexa" :src="$util.img(`/upload/weapp/user/gou.png`)" mode=""></image>
						<image v-else :src="$util.img(`/upload/weapp/user/un_gou.png`)" mode=""></image>
					</div>
					
				</div>
								
				 <view class="df Type-confirmation">
				 	<div class="df aic jcsa btn1"  @click="show1= false">返回</div>
				 	<div class="df aic jcsa btn2"  @click="show1= false">确定</div>
				 </view>
			</view>
			
		</u-overlay>
	</div>
</template>

<script>
	export default {
		data () {
			return {
				indexd:0,
				show:false,
				indexa:0,
				show1:false,
				data:{
					invoiceType: '增值税电子普通发票',
					headerType: '企业',
					money :638.88,
					content: '商品清单',
				},
				list:[
					{name:'增值税电子普通发票'},
					{name:'增值税电子普通发票'}
				],
				goods:[
					{
						name:'企业'
					},
					{
						name:'个人'
					},
					{
						name:'其它'
					}
				],
				value11: '',
				modalShow: false,
			}
		},
		methods:{
			bukai(){
				uni.navigateTo({
					url: '/page_salesman_index/Commodity-time/Commodity-time'
				})
			},
			submit() {
				this.modalShow = true
			},
			modal_confirm () {
				this.modalShow = false
			},
			four(index){
				this.indexd=index
			},
			time(index){
				this.indexa=index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.connection-type{
		width: 596rpx;
		height: 1430rpx;
		background: #F8F6F6;
		border-radius: 2rpx;
		position: fixed;
		right: 0;
		bottom: 88rpx;
		.Add-label{
			font-size: 28rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #222222;
			line-height: 44rpx;
			margin: 32rpx 0 0 34rpx;
		}
		.add-name{
			padding: 0 32rpx;
			box-sizing: border-box;
			margin-top: 32rpx;
			div{
				width: 166rpx;
				height: 60rpx;
				background: #FFFFFF;
				border-radius: 12rpx;
				
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #585858;
				line-height: 34rpx;
				
			}
			div:nth-child(2){
				margin-left: 18rpx;
				margin-right: 18rpx;
			}
			
			div:nth-child(5){
				margin: 0 18rpx;
			}
			div:nth-child(n+4){
				margin-top: 40rpx;
			}
		}
			.arr{
				margin-right: 16rpx;
				margin-bottom: 32rpx;
				
				margin: 0 32rpx;
				margin-top: 32rpx;
				image{
					width: 40rpx;
					height: 40rpx;
				}
				text{
					font-size: 28rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #222222;
					line-height: 40rpx;
				}
			
		}
		.Type-confirmation{
			
			position: fixed;
			bottom: 0;
			.btn1{
				width: 172rpx;
				height: 88rpx;
				background: #DDDDDD;
				font-size: 28rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #585858;
				line-height: 40rpx;
			}
			.btn2{
				width: 424rpx;
				height: 88rpx;
				background: #21BBF3;
				font-size: 28rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				line-height: 40rpx;
			}
		}
	}
	
	.view {
		min-height: 100vh;
		.card {
			background-color: #fff;
			margin: 24rpx;
			padding: 32rpx;			
			border-radius: 16rpx;
			.row {
				display: flex;
				.title {
					font-size: 28rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #222222;
					flex-grow: 1;
				}
				.desc {
					font-size: 28rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					color: #222222;
					line-height: 40rpx;
					image {
						width: 28rpx;
						height: 28rpx;
					}
					::v-deep {
						.uni-input-placeholder {
							text-align: end;
						}
						.u-input {
							border: 0;
							padding: 0 !important;
						}
						.u-input__content__field-wrapper__field {
							border-radius: 16rpx;
							text-align: end !important;
						}
						.input-placeholder {
							font-size: 28rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #BFBFBF;
						}
					}
				}
			}
		}
		.btnbox {
			position: fixed;
			bottom: 0;
			padding-bottom: 76rpx;
			display: flex;
			width: 100%;
			justify-content: space-around;
			.btn1 {
				width: 334rpx;
				height: 80rpx;
				background: #FFFFFF;
				border-radius: 40rpx;
				border: 2rpx solid #E8E8E8;
				
				display: flex;
				justify-content: center;
				align-items: center;
				
				font-size: 28rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 600;
				color: #585858;
			}
			.btn2 {
				width: 334rpx;
				height: 80rpx;
				background: $base-color;
				border-radius: 40rpx;
				
				display: flex;
				justify-content: center;
				align-items: center;
			
				font-size: 28rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 600;
				color: #FFFFFF;
			}
		}
		.modal{
			.content {
				font-size: 28rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #585858;
			}
			.modal_btn {
				position: relative;
				left: 50%;
				transform: translate(-50%);
				
				
				width: 444rpx;
				height: 72rpx;
				background: $base-color;
				border-radius: 40rpx;
				
				display: flex;
				align-items: center;
				justify-content: center;
				
				font-size: 28rpx;
				font-weight: 600;
				color: #FFFFFF;
			}
			::v-deep {
				.u-popup__content {
					background: #FFFFFF;
					border-radius: 24rpx !important;
				}
			}
		}
	}
</style>