msgDetail.vue 5.1 KB
<template>
	<view style="padding: 30rpx;">
		<view class="msgDetail">
			<view class="msgTitle">
				第一季度税收报表
			</view>
			<view class="msgContent">
				请以上各企业报一下税务主管部门,感谢配合。 有我微信的私信给我,或者发在群里。 还有哪些企业没有报的抓紧报谢谢配合
			</view>
			<view class="msgTime">
				2020-8-10
			</view>
			<!-- 条件判断是否显示信息填写模块 -->
			<view class="infoTitle">
				信息填写
			</view>
			<view class="infoForm">
				<view class="infoItem">
					<view class="infoLeft">
						报表字段名称
					</view>
					<view class="infoRight">
						填报
					</view>
				</view>
				<view class="infoItem">
					<view class="infoLeft">
						第一季度税务报表
					</view>
					<view class="infoRight">
						300000(元)
					</view>
				</view>
				<view class="infoItem">
					<view class="infoLeft">
						第一季度总水量报表
					</view>
					<view class="infoRight">
						300000(元)
					</view>
				</view>
			</view>
			<view class="infoTitle">
				文件上传
			</view>
			<view class="cu-form-group" style="padding-top: 32rpx;">
				<view class="grid col-4 grid-square flex-sub">
					<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
					 <image :src="imgList[index]" mode="aspectFill"></image>
						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
							<text class='cuIcon-close'></text>
						</view>
					</view>
					<view class="solids" style="width: 182rpx;height: 182rpx;" @tap="ChooseImage" v-if="imgList.length<9">
						<image src="../../static/image/no_upload@2x.png" style="width: 182rpx;height: 182rpx;" mode=""></image>
					</view>
				</view>
			</view>
			<!-- 底部按钮区域 -->
			<view class="loginBtnWrap">
				<view class="loginBtn">
					提交
				</view>
			</view>
		</view>
		<simple-confirm :alertTxt="'是否确认提交您的填报信息'" v-if="showConfirmAlert" @close="showConfirmAlert = false"></simple-confirm>
	</view>
</template>

<script>
	import simpleConfirm from '@/components/simpleConfirm.vue'
	export default {
		data() {
			return {
				showConfirmAlert:true,
				index: -1,
				picker: ['科室1', '科室2', '科室3'],
				multiIndex: [0, 0, 0],
				imgList: [],
				modalName: null,
				textareaAValue: '',
				textareaBValue: ''
			};
		},
		components:{
			simpleConfirm
		},
		methods: {
			PickerChange(e) {
				this.index = e.detail.value
			},
			ChooseImage() {
				uni.chooseImage({
					count: 4, //默认9
					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
					sourceType: ['album'], //从相册选择
					success: (res) => {
						if (this.imgList.length != 0) {
							this.imgList = this.imgList.concat(res.tempFilePaths)
						} else {
							this.imgList = res.tempFilePaths
						}
					}
				});
			},
			ViewImage(e) {
				uni.previewImage({
					urls: this.imgList,
					current: e.currentTarget.dataset.url
				});
			},
			DelImg(e) {
				uni.showModal({
					title: '提示',
					content: '确定要删除此照片吗?',
					cancelText: '再看看',
					confirmText: '确认',
					success: res => {
						if (res.confirm) {
							this.imgList.splice(e.currentTarget.dataset.index, 1)
						}
					}
				})
			},
			textareaAInput(e) {
				this.textareaAValue = e.detail.value
			},
			textareaBInput(e) {
				this.textareaBValue = e.detail.value
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: $uni-bg-color-hui;
		.msgDetail{
			background: $uni-bg-bai-color;
			padding: 32rpx;
			border-radius: 20rpx;
			.msgTitle{
				font-size: $uni-font-size-32;
				font-weight: 600;
			}
			.msgContent{
				padding-top: 32rpx;
				font-size: $uni-font-size-28;
				color: $uni-text-color-hui;
				line-height: $uni-font-lh-40;
			}
			.msgTime{
				padding-top: 32rpx;
				font-size: $uni-font-size-28;
				color: $uni-text-color-hui;
				line-height: $uni-font-lh-40;
				text-align: right;
			}
			.infoTitle{
				padding-top: 40rpx;
				font-size: $uni-font-size-28;
				font-weight: 600;
			}
			.infoForm{
				background: $uni-bg-color-hui;
				padding: 20rpx;
				margin-top: 32rpx;
				border-radius: 20rpx;
				.infoItem{
					margin-top: 20rpx;
					display: flex;
					justify-content: space-between;
					height: 84rpx;
					.infoLeft{
						width: 375rpx;
						background: $uni-bg-bai-color;
						line-height: 84rpx;
						text-align: center;
						border-radius: 20rpx;
						font-size: $uni-font-size-28;
					}
					.infoRight{
						width: 189rpx;
						background: $uni-bg-bai-color;
						line-height: 84rpx;
						text-align: center;
						border-radius: 20rpx;
						font-size: $uni-font-size-28;
					}
				}
				.infoItem:nth-of-type(1){margin-top: 0;}
			}
			/* 底部按钮区域 */
			.loginBtnWrap{
				padding-top: 32rpx;
				display: flex;
				justify-content: center;
				.loginBtn{
					width: 686rpx;
					height: 88rpx;
					background: $uni-bg-main-color;
					border-radius: 96rpx;
					text-align: center;
					color: $uni-bg-bai-color;
					line-height: 88rpx;
					font-size: $uni-font-size-32;
				}
			}
		}
	}
</style>