<template>
	<view class="content">
		<view class="main" v-for="(item,index) in 10" :key="index">
			<view class="main-top flex">
				<view class="main-title ">
					旷工处罚
				</view>
				<view class="main-type" :class="{red:index%3==1}">
					{{index%3 ==1?'待处理':index%3 ==2?'已反对':'已完成'}}
				</view>
			</view>
			<view class="main-time">
				处罚日期：2023年10月10日
			</view>
			<view class="main-info">
				<view class="main-info-item">
					<text
						class="main-info-title">处罚说明:</text>处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由
				</view>
				<view class="main-info-item" v-if="index%3 !=1">
					<text
						class="main-info-title">领导处理说明:</text>领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明
				</view>
			</view>
			<view class="main-name flex">
				<view class="main-name-left">
					扣款人：李丹丹
				</view>
				<view class="main-name-right">
					￥200
				</view>
			</view>
			<view class="btn-box" @click="open()">
				<view class="btn1">
					修改处罚
				</view>
				<view class="btn2">
					撤销处罚
				</view>
			</view>
		</view>
		<view class="add-box" @click="navTo('/pages/leader/addpunish')">
			<image class="add-icon" src="../../static/icon/add.png" mode=""></image>
			<view class="add-font">
				添加处罚
			</view>
		</view>
		<uni-popup ref="popup" type="center">
			<view class="popup-box">
				<view class="popup-title">
					撤销说明
				</view>
				<view class="popup-main">
					<textarea placeholder="请点击输入..." class="popup-main-font" name="" id="" cols="30"
						rows="10"></textarea>
				</view>
				<view class="popup-btn-box flex">
					<view class="popup-btn-item qx" @click="cancel()">
						取消
					</view>
					<view class="popup-btn-item qd">
						确定
					</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {};
		},
		onLoad() {},
		onShow() {},
		onReachBottom() {},
		onReady() {},
		methods: {
			open() {
				this.$refs.popup.open()
			},
			cancel() {
				this.$refs.popup.close()
			},
			navTo(url) {
				uni.navigateTo({
					url
				})
			}
		}
	};
</script>

<style lang="scss">
	page,
	.content {
		min-height: 100%;
		height: auto;
	}

	.main {
		margin: 20rpx auto 0;
		width: 706rpx;
		background: #FFFFFF;
		border-radius: 15rpx;
		padding: 34rpx 20rpx 0rpx;

		.main-top {
			padding: 0 16rpx;

			.main-title {
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #333333;
			}

			.main-type {
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
			}

			.red {
				color: #FF4C4C;
			}
		}

		.main-time {
			margin-top: 20rpx;
			padding: 0 16rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #666666;
		}

		.main-info {
			padding: 0 14rpx;
			margin-top: 20rpx;
			padding: 26rpx 26rpx 26rpx 20rpx;
			background: #f2f2f2;

			.main-info-item {
				.main-info-title {
					color: #333333;
				}

				margin-top: 24rpx;
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #666666;
			}

			.main-info-item:first-child {
				margin-top: 0;
			}
		}

		.main-name {
			padding: 28rpx 16rpx;

			.main-name-left {
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #333333;
			}

			.main-name-right {
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #FF4C4C;
			}
		}

		.btn-box {
			border-top: 1px solid #f6f6f6;
			padding: 28rpx 12rpx 20rpx;
			display: flex;
			justify-content: flex-end;

			.btn1 {
				display: flex;
				justify-content: center;
				align-items: center;
				width: 144rpx;
				height: 55rpx;
				border: 2px solid #EBEBEB;
				border-radius: 28rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
			}

			.btn2 {
				margin-left: 20rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				width: 144rpx;
				height: 55rpx;
				border: 2px solid #FF4C4C;
				border-radius: 28rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FF4C4C;
			}
		}
	}

	.add-box {
		margin: 100rpx auto 0;
		width: 622rpx;
		height: 85rpx;
		background: #069CFA;
		border-radius: 15rpx;
		display: flex;
		justify-content: center;
		align-items: center;

		.add-icon {
			width: 38rpx;
			height: 38rpx;
		}

		.add-font {
			margin-left: 10rpx;
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #FFFFFF;
		}
	}

	.popup-box {
		width: 582rpx;
		background: #FFFFFF;
		border-radius: 7rpx;
		padding: 64rpx 32rpx 54rpx;

		.popup-title {
			text-align: center;
			font-size: 42rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #2D2D2D;
		}

		.popup-main {
			margin-top: 42rpx;
			width: 100%;
			height: 194rpx;
			background: #F4F4F4;
			border-radius: 10rpx;
			padding: 20rpx;

			.popup-main-font {
				width: 100%;
				height: 100%;
				font-size: 34rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
			}
		}

		.popup-btn-box {
			margin-top: 50rpx;

			.popup-btn-item {
				display: flex;
				justify-content: center;
				align-items: center;
				width: 248rpx;
				height: 78rpx;
				border-radius: 5rpx;
				font-size: 34rpx;
				font-family: PingFang SC;
				font-weight: 500;
			}

			.qx {
				color: #333333;
				background: #FFFFFF;
				border: 1px solid #999999;
			}

			.qd {
				background: #069CFA;
				color: #FFFFFF;
			}
		}
	}
</style>