<template>
	<view class="content">
		<view class="acountbox">
			<text class="atitle">出票人</text>
			<view class="inacount">
				<text class="acoutitle">出票人</text>
				<input type="text" v-model="form.name" class="checkword" placeholder="请输入出票人的姓名"
					placeholder-style="font-size:30rpx;color:#BEBDBB" />
			</view>
			<view class="inacount">
				<text class="acoutitle">账户</text>
				<input type="text" v-model="form.bankAccount" class="checkword" placeholder="请输入出票人的账户"
					placeholder-style="font-size:30rpx;color:#BEBDBB" />
			</view>
			<view class="inacount">
				<text class="acoutitle">开户行名称</text>
				<input type="text" v-model="form.bankName" class="checkword" placeholder="请输入出票人开户行名称"
					placeholder-style="font-size:30rpx;color:#BEBDBB" />
			</view>

		</view>
		<view class="logininbtn" @click="makeNew">
			<text>确认</text>
		</view>
	</view>
</template>

<script>
	let that
	export default {
		data() {
			return {
				form: {
					name: '',
					bankAccount: '',
					bankName: ''
				},

			}
		},
		onLoad() {
			that = this
		},
		methods: {
			makeNew() {

				if (that.form.name.length == 0) {
					that.$toast("请输入出票人的姓名")
					return
				}
				if (that.form.bankAccount.length == 0) {
					that.$toast("请输入出票人的账户")
					return
				}
				if (that.form.bankName.length == 0) {
					that.$toast("请输入开户行名称")
					return
				}
				uni.showLoading()
				uni.$u.http.post('/api/Drawer', that.form, {
					custom: {
						auth: true
					}
				}).then((res) => {
					uni.hideLoading()
					let form = {
						name: '',
						bankAccount: '',
						bankName: ''
					}
					that.$toast("提交成功")
					setTimeout(()=>{
						uni.navigateBack({
							delta:1
						})
					},500)
				}).catch((err) => {
					uni.hideLoading()
					that.$toast(err.msg)
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	/* uni.scss */
	@import 'uview-ui/theme.scss';

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

	}

	.atitle {
		display: block;
		padding-top: 102rpx;
		// padding-left: 30rpx;
		font-size: 60rpx;
		font-weight: 600;
	}

	.loginbg {
		background-image: url("https://t39.9026.com/web/uploads/thumbs/mall10000/20220629/e01b927c95ee1f05364f5e456f281388.png");
		height: 559rpx;
		width: 750rpx;
		background-size: 100% 100%;

		// display: flex;
		// align-items: center;
		// justify-content: center;
	}

	.logo {
		margin: 0 auto;
		height: 200rpx;
		width: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.logobox {
		margin: 0 auto;
		margin-top: 212rpx;
		width: 269rpx;
		height: 191rpx;
		// background-color: #F1F1F1;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.checkbox {}

	.business {
		width: 305rpx;
		height: 90rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
		// background-color: #D8AB5A;
		border-raotherdius: 20rpx;
		color: #FFFFFF;
		margin-top: 57rpx;
	}

	.bnesper {
		background-size: 100%;
		background-image: url("@/static/img/loginbtn4.png");
		padding-top: 10rpx;
		color: #FFF1D8;
		line-height: 90rpx;
	}

	.applyper {
		background-image: url("@/static/img/loginbt1.png");
		background-size: 100%;
		padding-top: 10rpx;
		color: #FFF1D8;
	}

	.actapp {
		background-image: url("@/static/img/loginbtn3.png");
		background-size: 100%;
		color: #D05C39;
	}

	.actbnes {
		background-image: url("@/static/img/loginbt2.png");
		background-size: 100%;
		color: #D05C39;
	}

	.acountbox {
		.inacount {
			display: flex;
			padding: 35rpx 20rpx;
			box-sizing: border-box;
			width: 690rpx;
			margin-top: 40rpx;
			background-color: #F6F6F6;
			border-radius: 20rpx;
			font-size: 30rpx;
			color: #1F242A;

			input {
				width: 360rpx;
				color: #68625B;
			}
		}

		.acoutitle {
			font-weight: 600;
		}

		.checkword {
			padding-left: 20rpx;
			color: #1F242A;
			font-size: 30rpx;
		}
	}

	.otherbt {
		width: 606rpx;
		display: flex;
		justify-content: space-between;
		font-size: 24rpx;
		padding-top: 30rpx;
	}

	.regbt {
		color: $uni-all-theme;
	}

	.logininbtn {
		margin-top: 80rpx;
		width: 690rpx;
		border-radius: 20rpx;
		background: linear-gradient(to right, #FFE1AD,#D8AB5A);
		box-shadow: 0 10rpx 20rpx 1rpx rgba(179, 116, 5, 0.2);
		height: 100rpx;
		text-align: center;
		color: #fff;
		line-height: 100rpx;
	}
</style>
