<template>
	<view class="content">
	    <view style="height: 20rpx;"></view>
		<view class="competeCont">
			<view class="competeContTitle">对门店行动完成情况打分</view>
			<view class="xxBox">
				<uni-rate :max="5" v-model="xx" @change="onXXChange"/>
			</view>

			<view>
				<textarea placeholder-style="color:#CCCCCC" placeholder="请填写十字以上的评价内容～" v-model="shopEvaContent" class="textareaCont"/>
			</view>
			<view class="submitBox">
				<view class="submit" @click="submit">提交</view>
			</view>
		</view>
	</view>
</template>

<script>
	
	export default {
		
		data() {
			return {
				sheetID:'',
				shopEvaContent:'',
				shopEvaStar:0,
				xx:0,
			}
		},
		onLoad(opt) {
		  this.sheetID=opt.id
		  
		},
		onShow() {
				
		},
		methods: {
		  
			onXXChange(e){
				console.log(e)
				this.shopEvaStar=e.value
			},
			submit(){
				if(this.shopEvaStar<5){
					if(this.shopEvaContent.length<10){
						uni.showToast({
						    title: '请填写十字以上的评价内容',
							icon:'none',
						    duration: 2000,
						})
						return false;
					}
				}
				
				
				
				uni.showLoading({ });
				
				this.$http('accompany/SuperCheckSheet/shopEvaStar', {
					sheetID:this.sheetID,
					shopEvaStar:this.shopEvaStar,
					shopEvaContent:this.shopEvaContent
				}, 'POST').then(res => {
				    //this.submitSuperCheckSheet()
					uni.showToast({
					    title: '提交成功',
						icon:'none',
					    duration: 2000,
					});
					uni.navigateBack({
						delta:1
					})
				})
			}
			
		}
	}
</script>

<style scoped>
	.content {
		background: #F4F5F7;
		min-height: 100vh;
	
	}

	/* #ifdef H5 */
	.content {
		background: #F4F5F7;
	
		
	}

	/* #endif */
	.status_bar{
		background: #FFFFFF;
	}
	.nav{
		width: 100vw;
		height: 44px;
		background: #FFFFFF;
		display: flex;
		justify-content: space-between;
		font-size: 34rpx;
		line-height: 44px;
	}
	.baiheiback{
		width: 70px;
		height: 44px;
	}
	.zdyNav{
		position: fixed;
		left: 0;
		top: 0;
		background: #FFFFFF;
		z-index: 11;
	}
	.top{
		background: #FFFFFF;
	}
	.toptop{
		display: flex;
		justify-content: center;
		padding-top: 20rpx;
	}
	.toptopIMg{
		width: 44rpx;height: 44rpx;
	}
	.topTitle{
		font-size: 36rpx;
		padding-left: 10rpx;
		color: #3C3C3C;
	}
	.topCont{
		display: flex;
		justify-content: space-around;
		padding: 40rpx;
	}
	.topContBtn{
		width: 150rpx;
		height: 56rpx;
		border-radius: 34rpx;
		border: 2rpx solid #DDDDDD;
		line-height: 56rpx;
		text-align: center;
		font-size: 28rpx;
		color: #3C3C3C;
	}
	.competeCont{
		margin-top: 20rpx;
		background: #FFFFFF;
		padding: 40rpx 24rpx;
	}
	.competeContTitle{
		font-size: 30rpx;
		color: #3C3C3C;
		text-align: center;
	}
	.textareaCont{
		width: 662rpx;
		height: 200rpx;
		background: #F4F5F7;
		border-radius: 10rpx;
		padding: 20rpx;
		margin-top: 20rpx;
		font-size: 28rpx;
	}
	.submit{
		width: 420rpx;
		height: 74rpx;
		background: #FF4F00;
		border-radius: 50rpx;
		line-height: 74rpx;
		text-align: center;
		font-size: 30rpx;
		color: #FFFFFF;
	}
	.submitBox{
		display: flex;
		justify-content: center;
		padding-top: 40rpx;
	}
	.xxBox{
		display: flex;
		justify-content: center;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
	}
</style>
