<template>
	<view class="wrap">
		<view class='content1'>
			<view class='row'>
				<view class="left">{{dataList.warehouseName}}</view>
			</view>
			<view class='row '>
				<textarea placeholder="请输入仓库信息" class="textarea" maxlength="2000"
					v-model="dataList.acquisitionInformation" disabled></textarea>
				<view class="textarea-bottom">
					{{dataList.acquisitionInformation?dataList.acquisitionInformation.length:'0'}}/2000字</view>
			</view>
			<view class='row content-item'>
				显示在易粮易运收购信息中
				<view class="right">
					<u-switch v-model="checked" active-color="#22C572" inactive-color="#eee" size='40' disabled="disabled"></u-switch>
				</view>
			</view>
		</view>
		<u-toast ref="uToast" />
		<view style='padding:10px;' class='flex bottom-btn'>
			<u-button  @click='returnPage' type="error" class="btn1" hover-class='none'>返回</u-button>
		</view>
	</view>
</template>
<script>
	import {
		mapState
	} from 'vuex';
	export default {
		components: {},
		data() {
			return {
				isSHowBtn: true,
				isShowAlert: false,
				checked: false,
				toexamineId: "",
				isShow: false,
				dataList: {},
				everyCheck: "",
			}
		},
		onBackPress(e) {
			if (this.everyCheck) {
				uni.navigateTo({
					url: "/pages/task/my_task"
				})
				return true;
			}
		},
		onLoad(options) {
			this.toexamineId = options.id
			this.isShow = options.isShowbtn
			this.everyCheck = uni.getStorageSync("everyTask")
		},
		computed: {
			...mapState(['hasLogin', 'userInfo']),
		},
		onShow() {
			this.getList()
		},
		methods: {
			getList() {
				this.$api.doRequest('get', '/acquisitionInfo/getAcquisition', {
					id: this.toexamineId
				}).then(res => {
					if (res.data.code == 200) {
						this.dataList = res.data.data
						if (this.dataList.checkFlag == 1) {
							this.checked = true
						} else {
							this.checked = false
						}
					}
				})
			},
			returnPage(){
				uni.navigateBack()
			},
		}
	}
</script>
<style lang='scss' scoped>

	.wrap {
		background: #fff;
		margin: 10px;
		border-radius: 10px;
		padding: 40rpx 30rpx;

	}

	.content-item {
		margin-top: 50rpx;
		font-size: 28rpx;
	}

	.row {
		display: flex;
		justify-content: space-between;
		position: relative;

		/* border-bottom: 1px solid #EEEEEE; */
		.right,
		input {
			font-size: 28rpx;
			// color: #333333;
		}

		.left {
			font-size: 34rpx;
			color: #333333;
			font-weight: 600;
		}
	}

	.textarea {
		background: #F9F9FA;
		font-size: 26rpx;
		text-align: left;
		width: 100%;
		height: 60px;
		padding: 32rpx;
		border-radius: 10rpx;
		margin-top: 40rpx;
		height: 50vh;
		padding-bottom: 20rpx;
		color: #AFB3BF;
	}

	.textarea-bottom {
		position: absolute;
		bottom: 20rpx;
		right: 20rpx;
		color: #606266;
	}

	.bottom-btn {
		width: 100%;
		position: fixed;
		bottom: 0;
		display: flex;
		z-index: 2;
		left: 0;
		background-color: #f8f8f8;
		flex-direction: column;

		.btn1,
		.btn2 {
			width: 100%;
			margin-bottom: 26rpx;
			border-radius: 90rpx;
		}

		.btn1 {
			background: white;
			color: #00C265;
		}
	}

	.cancel,
	.confirm {
		position: absolute;
		display: inline-block;
		width: 50%;
		text-align: center;
		bottom: 0;
		padding: 10px;
		border-top: 1px solid #eee;
		font-size: 34rpx;
	}

	.cancel {
		left: 0;
		border-right: 1px solid #eee;
		color: #AFB3BF;
	}

	.confirm {
		right: 0;
		color: #22C572;
	}

	.u-textarea-style {
		margin: 20rpx;
		background: #F9F9FA;
		border-radius: 10px;
		border: 1px solid #EEEEEE;
		padding: 10rpx 20rpx;
		position: relative;

		.right-bottom {
			position: absolute;
			right: 20rpx;
			bottom: 20rpx;
			color: #AFB3BF;
		}
	}
</style>
