<template>
  <view class="addbox">
	  <uni-forms ref="form" :rules="rules" :modelValue="datainfo">
	  		  <!-- 家长 -->
			<view class="ftit">基本信息</view>
			<view class="fbox">
				<picker range-key="dictLabel" v-if="roles!='teacher'&&pagetype=='add'" :range="classlist"  :value="classidx"  @change="bindDateChangeb">
					<uni-forms-item name="className"  label="班级">
						<view class="f15 flex1 txr co16" v-if="datainfo.className" >{{datainfo.className}}</view>
						<view class="f15 flex1 txr coa" v-else >请选择班级</view>
					</uni-forms-item>
				</picker>
				<picker range-key="dictLabel" :disabled="pagetype=='update'||!teaflag" :range="teacherlist"  :value="nameidx"  @change="bindDateChangef">
					<uni-forms-item name="name" :disabled="pagetype=='update'||!teaflag" required  label="老师">
						<view class="f15 flex1 txr co16" v-if="datainfo.name" >{{datainfo.name}}</view>
						<view class="f15 flex1 txr coa" v-else >请选择老师</view>
					</uni-forms-item>
				</picker>
				<uni-forms-item label="身份证号"  name="idCard">
					<uni-easyinput :inputBorder="false" @blur="getIdcardInfo" v-model="datainfo.idCard" placeholder="请输入身份证号">
					</uni-easyinput>
				</uni-forms-item>
				<!-- <uni-forms-item label="姓名"  name="name">
					<uni-easyinput :inputBorder="false" v-model="datainfo.name" placeholder="请输入姓名">
					</uni-easyinput>
				</uni-forms-item> -->
				<picker range-key="text" :range="sexrange"  :value="sexidx"  @change="bindDateChange">
					<uni-forms-item name="sex" required  label="性别">
						<view class="f15 flex1 txr co16" v-if="datainfo.sex" >{{datainfo.sex==1?'男':'女'}}</view>
						<view class="f15 flex1 txr coa" v-else >请选择性别</view>
					</uni-forms-item>
				</picker>
				<uni-forms-item label="年龄"  name="age">
					<uni-easyinput :inputBorder="false" v-model="datainfo.age" placeholder="请输入年龄">
					</uni-easyinput>
				</uni-forms-item>
				<picker range-key="dictLabel" :range="outlook"  :value="lookidx"  @change="bindDateChangea">
					<uni-forms-item name="politicalStatus"  label="政治面貌">
						<view class="f15 flex1 txr" :class="datainfo.politicalStatus?'co16':'coa'">{{datainfo.politicalStatus||'请选择政治面貌'}}</view>
					</uni-forms-item>
				</picker>
				
				<picker range-key="dictLabel" :range="zctitle"  :value="zcidx"  @change="bindDateChangec">
					<uni-forms-item name="professional"  label="职称">
						<view class="f15 flex1 txr" :class="datainfo.professional?'co16':'coa'">{{datainfo.professional||'请选择职称'}}</view>
					</uni-forms-item>
				</picker>
				<uni-forms-item label="联系方式"  name="phone">
					<uni-easyinput :inputBorder="false" v-model="datainfo.phone" placeholder="请输入联系方式">
					</uni-easyinput>
				</uni-forms-item>
				<uni-forms-item label="居住地址"  name="phone">
					<view @click="getMapFn" class="flexc flex1">
						<view class="flex1 f15 txr" :class="datainfo.address?'co16':'coa'">{{datainfo.address||'请选择居住地址'}}</view>
						<image :src="rimg" class="ilrmgr"></image>
					</view>
				</uni-forms-item>
			</view>
			<view class="ftit">职业信息</view>
			<view class="fbox">
				<!-- <uni-forms-item label="教龄"  name="height">
					<uni-easyinput :inputBorder="false" v-model="datainfo.height" placeholder="请输入教龄	">
					</uni-easyinput>
					<view class="f16 co16 ml6">年</view>
				</uni-forms-item> -->
				<picker  mode="date"  @change="bindDateChanged">
					<uni-forms-item name="onBoardTime"  label="入职时间">
						<view class="f15 flex1 txr" :class="datainfo.onBoardTime?'co16':'coa'">{{datainfo.onBoardTime||'请选择入职时间'}}</view>
					</uni-forms-item>
				</picker>
				<picker  mode="date"  @change="bindDateChangee">
					<uni-forms-item name="jobTime" required  label="参加工作时间">
						<view class="f15 flex1 txr" :class="datainfo.jobTime?'co16':'coa'">{{datainfo.jobTime||'请选择参加工作时间'}}</view>
					</uni-forms-item>
				</picker>
			</view>
			<view class="ftit">照片信息</view>
			<view class="fbox">
				<uni-forms-item label="证件照"  name="identificationPhoto">
					<view class="flex1"></view>
					<view class="imgs">
						<view class="photos" v-for="(item,index) in zjfile" :key='index' @click="getPreview(zjfile,index)">
							<image :src="baseUrl+item" class="addimg"></image>
							<image :src="delimg" class="del" @click.stop="delimgFn('zj',index)" ></image>
						</view>
						<image :src="addimg" class="photos" v-if="zjfile.length<9" @click.stop="getphotoFn('zj')"></image>
					</view>
					
				</uni-forms-item>
				<uni-forms-item label="门禁照"  name="entrancePermit">
					<view class="flex1"></view>
					<view class="imgs">
						<view class="photos" v-for="(item,index) in mjfile" :key='index' @click="getPreview(mjfile,index)">
							<image :src="baseUrl+item" class="addimg"></image>
							<image :src="delimg" class="del" @click.stop="delimgFn('mj',index)" ></image>
						</view>
						<image :src="addimg" class="photos" v-if="mjfile.length<9" @click.stop="getphotoFn('mj')"></image>
					</view>
				</uni-forms-item>
			</view>
			<view class="ftit">资质信息</view>
			<view class="fbox">
				<uni-forms-item label="毕业证明照"  name="identificationPhoto">
					<view class="flex1"></view>
					<view class="imgs">
						<view class="photos" v-for="(item,index) in byzmfile" :key='index' @click="getPreview(byzmfile,index)">
							<image :src="baseUrl+item" class="addimg"></image>
							<image :src="delimg" class="del" @click.stop="delimgFn('byzm',index)" ></image>
						</view>
						<image :src="addsimg" class="photos" v-if="byzmfile.length<9" @click.stop="getphotoFn('byzm')"></image>
					</view>
					
				</uni-forms-item>
				<uni-forms-item label="毕业证书照"  name="entrancePermit">
					<view class="flex1"></view>
					<view class="imgs">
						<view class="photos" v-for="(item,index) in byzsfile" :key='index' @click="getPreview(byzsfile,index)">
							<image :src="baseUrl+item" class="addimg"></image>
							<image :src="delimg" class="del" @click.stop="delimgFn('byzs',index)" ></image>
						</view>
						<image :src="addsimg" class="photos" v-if="byzsfile.length<9" @click.stop="getphotoFn('byzs')"></image>
					</view>
				</uni-forms-item>
				<uni-forms-item label="教资证明照"  name="entrancePermit">
					<view class="flex1"></view>
					<view class="imgs">
						<view class="photos" v-for="(item,index) in jzzmfile" :key='index' @click="getPreview(jzzmfile,index)">
							<image :src="baseUrl+item" class="addimg"></image>
							<image :src="delimg" class="del" @click.stop="delimgFn('jzzm',index)" ></image>
						</view>
						<image :src="addsimg" class="photos" v-if="jzzmfile.length<9" @click.stop="getphotoFn('jzzm')"></image>
					</view>
				</uni-forms-item>
				<uni-forms-item label="职称证明照"  name="entrancePermit">
					<view class="flex1"></view>
					<view class="imgs">
						<view class="photos" v-for="(item,index) in zczmfile" :key='index' @click="getPreview(zczmfile,index)">
							<image :src="baseUrl+item" class="addimg"></image>
							<image :src="delimg" class="del" @click.stop="delimgFn('zczm',index)" ></image>
						</view>
						<image :src="addsimg" class="photos" v-if="zczmfile.length<9" @click.stop="getphotoFn('zczm')"></image>
					</view>
				</uni-forms-item>
			</view>
			<view class="ftit">其他信息</view>
			<view class="fbox">
				<uni-forms-item label="身高"  name="height">
					<uni-easyinput :inputBorder="false" v-model="datainfo.height" placeholder="请输入身高">
					</uni-easyinput>
					<view class="f16 co16 ml6">cm</view>
				</uni-forms-item>
				<uni-forms-item label="体重"  name="weight">
					<uni-easyinput :inputBorder="false" v-model="datainfo.weight" placeholder="请输入体重">
					</uni-easyinput>
					<view class="f16 co16 ml6">kg</view>
				</uni-forms-item>
				<picker range-key="dictLabel" :range="bloodrange"  :value="bloodidx"  @change="bindDateChangeg">
					<uni-forms-item name="bloodType"  label="血型">
						<view class="f15 flex1 txr" :class="datainfo.bloodType?'co16':'coa'">{{datainfo.bloodType||'请选择血型'}}</view>
						<image :src="rimg" class="ilrmgr"></image>
					</uni-forms-item>
				</picker>
				<!-- <uni-forms-item label="血型"  name="bloodType">
					<uni-easyinput :inputBorder="false" v-model="datainfo.bloodType" placeholder="请输入血型">
					</uni-easyinput>
				</uni-forms-item> -->
			</view>
			<view class="fbtns">
				<view class="rebtn" @click="getSubmit">确认</view>
			</view>
			
	  </uni-forms>
  </view>
</template>

<script>
	// import tabSearch from "@/components/toptab/search.vue"
	import config from '@/config'
	const baseUrl = config.baseUrl
	import {uploadmore,selectDictLabel} from '@/utils/common.js'
	import {getDeptList} from "@/api/mine/mine.js"
	import {getDictionaryFn} from '@/api/mine/register.js'
	import {getteaDetFn,getteaAddtFn,getteaPutFn,getteanoListFn} from "@/api/mine/files.js"
  export default {
	components:{},
	data(){
		return{
			// adddj
			addimg:require("@/mine/static/score/addd.png"),
			addsimg:require("@/mine/static/score/adddj.png"),
			delimg: require("@/static/images/del.png"),
			rimg:require("@/mine/static/score/rimg.png"),
			date:'',
			baseUrl:'',
			sexrange:[{"val": 1,"text":"男"},{"val":2,"text":"女"}],// 性别
			zjfile:[],
			mjfile:[],
			byzmfile:[],
			byzsfile:[],
			jzzmfile:[],
			zczmfile:[],
			autoHeight:true,
			
			rules: {
			  name: {rules: [{required: true,errorMessage: '请选择老师'}]},
			  sex: {rules: [{required: true,errorMessage: '请选择性别'}]},
			  jobTime: {rules: [{required: true,errorMessage: '请选择参加工作时间'}]},
			  // subject: {rules: [{required: true,errorMessage: '请选择调课科目'}]},
			  // beSubject: {rules: [{required: true,errorMessage: '请选择被调科目'}]},
			  // week: {rules: [{required: true,errorMessage: '请选择时间(星期)'}]},
			},
			datainfo:{
				"teacherId":"",//学生id
				"name":"",//姓名
				"sex":"",//性别(1：男，2：女)
				"age":"",//年龄
				"school":"",//学校(汉字)
				"studentNumber":"",//学号
				"idCard":"",//身份证号
				"height":"",//身高
				"weight":"",//体重
				"bloodType":"",//血型
				"politicalStatus":"",//政治面貌（字典值：political_outlook）
				"identificationPhoto":"",//证件照(地址)
				"entrancePermit":"",//门禁照(地址)
				"graduationPhoto":"",//毕业证明照(地址)
				"degreePhoto":"",//学位证书照(地址)
				"teachingPhoto":"",//教资证明照(地址)
				"professionalPhoto":"",//职称证明照(地址)
				"address":"",
				'onBoardTime':'',//入职时间
				'jobTime':'',//入职时间
				'professional':'',//职称
				"classId":'',
				"className":''
			},
			pagetype:'add',
			stulist:'',
			schoolval:[],
			outlook:[],
			zctitle:[],
			bloodrange:[],
			zcidx:0,
			bloodidx:0,
			sexidx:0,
			lookidx:0,
			schoolidx:0,
			classidx:0,
			nameidx:0,
			id:'',
			schoolId:'',
			classlist:[],
			teacherlist:[],
			teaflag:true,
			roles:''
		}
	},
	onLoad: function(e) {
		uni.$on('refreshaddr',(e) => {
			var addr=JSON.parse(JSON.stringify(e))
			this.datainfo.address=e.address
			this.datainfo.longitude=e.lng
			this.datainfo.latitude=e.lat
		})
		this.pagetype=e.type||'add';
		this.baseUrl=baseUrl;
		this.init()
		if(e.type=='update'){
			this.id=e.id
			this.getDataFn()
		}else{
			var roles=this.$store.state.user.choseroles;
			this.roles=roles;
			if(roles=='parents'){
			}else if(roles=='teacher'){
				// 老师
				this.datainfo.teacherId=this.$store.state.user.userId
				this.datainfo.name=this.$store.state.user.name
				this.datainfo.phone=this.$store.state.user.phonenumber
				this.teaflag=false
			}else{
				this.schoolId=this.$store.state.user.deptId;
				this.getclassListFn()
			}
		}
	},
	methods:{
		getclassListFn(){
			//  获取学校id
			var id=this.schoolId;
			getDeptList(id).then(res=>{
				if(res.code==200){
					var newArr=res.data;
					if(newArr&&newArr.length){
						this.classlist = newArr.map(v => {
							return {
								dictLabel: v.deptName,
								dictValue: v.deptId,
							}
						})
					}
				}else{
					this.$toast(res.msg)
				}
			})
		},
		getteanoListFn(){
			var params={
				classId:this.datainfo.classId
			}
			params['params[role]']=this.$store.state.user.choseroles
			getteanoListFn(params).then(res=>{
				if(res.code==200){
					this.teacherlist = res.rows.map(v => {
						return {
							dictLabel: v.teacherName,
							dictValue: Number(v.teacherId),
							classId:v.classId
						}
					})
				}
			})
		},
		go(idCard) {
			let sex = null;
			let birth = null;
			let myDate = new Date();
			let month = myDate.getMonth() + 1;
			let day = myDate.getDate();
			let age = 0;
							
			if (idCard.length === 18) {
			  age = myDate.getFullYear() - idCard.substring(6, 10) - 1;
			  sex = idCard.substring(16, 17);
			  birth = idCard.substring(6, 10) + "-" + idCard.substring(10, 12) + "-" + idCard.substring(12, 14);
			  if (idCard.substring(10, 12) < month || idCard.substring(10, 12) === month && idCard.substring(12, 14) <= day)
			    age++;
							
			}
			if (idCard.length === 15) {
			  age = myDate.getFullYear() - idCard.substring(6, 8) - 1901;
			  sex = idCard.substring(13, 14);
			  birth = "19" + idCard.substring(6, 8) + "-" + idCard.substring(8, 10) + "-" + idCard.substring(10, 12);
			  if (idCard.substring(8, 10) < month || idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day)
			    age++;
			}			
			if (sex % 2 === 0) sex = '2';
			else sex = '1';
			this.datainfo.sex = sex
			this.datainfo.age = age
			return {
			  age,
			  sex,
			  birth
			}
		},
		/* 上传后端获取身份证信息 */
		getIdcardInfo(val) {
			var idCard=this.datainfo.idCard;
			if(!idCard){
				return
			}
			// 身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X
			let _IDRe18 =/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
			let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
			// 校验身份证：
			if (_IDRe18.test(idCard) || _IDre15.test(idCard)) {
				this.go(idCard)		
			} else {
						
			}
		},
		getMapFn(){
			// #ifdef APP-PLUS
			this.$tab.navigateTo('/mine/pages/files/maps')
			// #endif
			// #ifndef APP-PLUS
			this.$tab.navigateTo('/mine/pages/files/map')
			// #endif
		},
		getDataFn() {
			getteaDetFn(this.id).then(res => {
				if (res.code == 200) {
					this.datainfo = res.data;
					if(res.data.identificationPhoto){
						this.zjfile=res.data.identificationPhoto.split(',')
					}else{
						this.zjfile=[];
					}
					if(res.data.entrancePermit){
						this.mjfile=res.data.entrancePermit.split(',')
					}else{
						this.mjfile=[];
					}
					if(res.data.graduationPhoto){
						this.byzmfile=res.data.graduationPhoto.split(',')
					}else{
						this.byzmfile=[];
					}
					if(res.data.degreePhoto){
						this.byzsfile=res.data.degreePhoto.split(',')
					}else{
						this.byzsfile=[];
					}
					if(res.data.teachingPhoto){
						this.jzzmfile=res.data.teachingPhoto.split(',')
					}else{
						this.jzzmfile=[];
					}
					if(res.data.professionalPhoto){
						this.zczmfile=res.data.professionalPhoto.split(',')
					}else{
						this.zczmfile=[];
					}
					if(res.data.sex){
						this.sexidx=res.data.sex==1?0:1
					}
					this.datainfo.rzsh='123'
					// 政治面貌
					if(res.data.politicalStatus){
						for(var i=0;i<this.outlook.length;i++){
							if(this.outlook[i].dictLabel==res.data.politicalStatus){
								this.lookidx=Number(i)
								break;
							}
						}
					}
					// 职称
					if(res.data.professional){
						for(var i=0;i<this.zctitle.length;i++){
							if(this.zctitle[i].dictLabel==res.data.professional){
								this.zcidx=Number(i)
								break;
							}
						}
					}
					// if(res.data.school){
					// 	for(var i=0;i<this.schoolval.length;i++){
					// 		if(this.schoolval[i].dictLabel==res.data.school){
					// 			this.schoolidx=Number(i)
					// 			break;
					// 		}
					// 	}
					// }
				} else {
					this.$toast(res.msg)
				}
			})
		},
		init(){
			// 政治面貌
			getDictionaryFn('political_outlook').then(res=>{
				if(res.code==200){
					this.outlook = res.data.map(v => {
						return {
							dictLabel: v.dictLabel,
							dictValue: v.dictValue
						}
					})
				}
			})
			// 职称
			getDictionaryFn('title').then(res=>{
				if(res.code==200){
					this.zctitle = res.data.map(v => {
						return {
							dictLabel: v.dictLabel,
							dictValue: v.dictValue
						}
					})
				}
			})
			// 血型
			getDictionaryFn('blood_type').then(res=>{
				if(res.code==200){
					this.bloodrange = res.data.map(v => {
						return {
							dictLabel: v.dictLabel,
							dictValue: v.dictValue
						}
					})
				}
			})
		},
		getSubmit(){
			var that = this;
			this.$refs.form.validate().then(res => {
				var params = JSON.parse(JSON.stringify(this.datainfo))
				if (this.pagetype == 'add') {
					if(params.idCard){
						let _IDRe18 =
							/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
						let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
						// 校验身份证：
						if (_IDRe18.test(params.idCard) || _IDre15.test(params.idCard)) {
						}else{
							this.$toast('请输入正确身份证号')
							return
						}
					}
					getteaAddtFn(params).then(res => {
						if (res.code == 200) {
							that.$toast('新增成功')
							setTimeout(function() {
								uni.$emit('refreshdalist');
								uni.navigateBack({
									delta:1
								})
							}, 1500)
						} else {
							this.$toast(res.msg)
						}
					})
				} else {
					getteaPutFn(params).then(res => {
						if (res.code == 200) {
							that.$toast('修改成功')
							setTimeout(function() {
								uni.$emit('refreshdadetail');
								uni.$emit('refreshdalist');
								uni.navigateBack({
									delta:1
								})
							}, 1500)
						} else {
							this.$toast(res.msg)
						}
					})
				}
			})
		},
		bindDateChange(e){
			var idx=e.detail.value
			this.datainfo.sex=this.sexrange[idx].val
		},
		bindDateChangea(e){
			var idx=e.detail.value
			this.datainfo.politicalStatus=this.outlook[idx].dictLabel
		},
		bindDateChangec(e){
			var idx=e.detail.value
			this.datainfo.professional=this.zctitle[idx].dictLabel
		},
		bindDateChanged(e){
			this.datainfo.onBoardTime=e.detail.value;
		},
		bindDateChangee(e){
			this.datainfo.jobTime=e.detail.value;
		},
		
		bindDateChangeb(e){
			var idx=e.detail.value
			this.datainfo.className=this.classlist[idx].dictLabel;
			this.datainfo.classId=this.classlist[idx].dictValue;
			this.datainfo.name='';
			this.datainfo.teacherId='';
			this.getteanoListFn()
		},
		bindDateChangef(e){
			var idx=e.detail.value
			this.datainfo.name=this.teacherlist[idx].dictLabel
			this.datainfo.teacherId=this.teacherlist[idx].dictValue
		},
		bindDateChangeg(e){
			var idx=e.detail.value
			this.datainfo.bloodType=this.bloodrange[idx].dictLabel
		},
		// 查看照片
		getPreview(iurl,idx) {
			var newArr=[];
			iurl.forEach(ite=>{
				var ds=this.baseUrl+ite
				newArr.push(ds)
			})
			uni.previewImage({
				urls: newArr,
				current:idx,
				success: function(data) {
					
				},
				fail: function(err) {
					console.log(err.errMsg);
				}
			});
		},
		delimgFn(e,idx){
			var that = this;
			if(e=='zj'){
				that.zjfile.splice(idx,1);
				that.datainfo.identificationPhoto=that.zjfile.join(',')
			}else if(e=='mj'){
				that.mjfile.splice(idx,1);
				that.datainfo.entrancePermit=that.mjfile.join(',')
			}else if(e=='byzm'){
				that.byzmfile.splice(idx,1);
				that.datainfo.entrancePermit=that.byzmfile.join(',')
			}else if(e=='byzs'){
				that.byzsfile.splice(idx,1);
				that.datainfo.entrancePermit=that.byzsfile.join(',')
			}else if(e=='jzzm'){
				that.jzzmfile.splice(idx,1);
				that.datainfo.entrancePermit=that.jzzmfile.join(',')
			}else if(e=='zczm'){
				that.zczmfile.splice(idx,1);
				that.datainfo.entrancePermit=that.zczmfile.join(',')
			}
			
		},
		getphotoFn(e){
			let that = this;
			let file =[],count=9
			if(e=='zj'){
				file = that.zjfile;
				count=9
			}else{
				file = that.mjfile;
				count=9
			}
			if(file.length < count){
				uni.chooseImage({
					count: count - parseInt(file.length),
					success:function(res){
						let img= res.tempFilePaths;
						if(img.length + file.length > count){
							uni.showToast({
								title: '最多上传'+count+'张图片',
								icon: 'none',
								duration: 2000
							})
						}else{
							let imglen = res.tempFilePaths.length;
							var fuwufile = [];
							uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
								if(e=='zj'){
									that.zjfile = that.zjfile.concat(rs);
									that.datainfo.identificationPhoto=that.zjfile.join(',')
								}else if(e=='mj'){
									that.mjfile = that.mjfile.concat(rs);
									that.datainfo.entrancePermit=that.mjfile.join(',')
								}else if(e=='byzm'){
									that.byzmfile = that.byzmfile.concat(rs);
									that.datainfo.graduationPhoto=that.byzmfile.join(',')
								}else if(e=='byzs'){
									that.byzsfile = that.byzsfile.concat(rs);
									that.datainfo.degreePhoto=that.byzsfile.join(',')
								}else if(e=='jzzm'){
									that.jzzmfile = that.jzzmfile.concat(rs);
									that.datainfo.teachingPhoto=that.jzzmfile.join(',')
								}else if(e=='zczm'){
									that.zczmfile = that.zczmfile.concat(rs);
									that.datainfo.professionalPhoto=that.zczmfile.join(',')
								}
							})	
						}
					}
				});
			}
		},
	},
	
  }
</script>

<style lang="scss" scoped>
.addbox{padding: 24rpx 36rpx 180rpx;}
.ftit{font-size: 30rpx;font-weight: 500;color: #666666;padding: 8rpx;margin-bottom: 16rpx;}
.fbox{background: #FFFFFF;border-radius: 18rpx;padding: 12rpx 0;margin-bottom: 32rpx;
	.addimg{width: 120rpx;height: 120rpx;}
	.ilrmgr{width: 14rpx;height: 24rpx;margin-left: 20rpx;flex: 0 0 auto;}
}
.addbtn{height: 98rpx;width: 100%;
background: #1f57e6;
border-radius: 48rpx;display: flex;align-items: center;justify-content: center;font-size: 34rpx;font-weight: 500;
color: #FFFFFF;}
.comboxl{min-height: 70rpx;padding:15rpx 0rpx;box-sizing: border-box;line-height: 40rpx;flex: 1;
		textarea{width: 100%;font-size: 30rpx;color: #161616;text-align: right;}
	}
.imgs{display: flex;align-items: center;flex-wrap: wrap;justify-content: flex-end;
	.photos{width: 120rpx;height: 120rpx;position: relative;margin: 0 0rpx 16rpx 16rpx;
	// &:nth-child(3n){margin-left: 0;}
	.rimg{width: 100%;height: 100%;}
	.del{width: 36rpx;height: 36rpx;position: absolute;right: 0rpx;top: 0rpx;}
	}
}


.addbox /deep/ .uni-forms{flex: 1;}
.addbox /deep/ .uni-forms-item__label{flex: 0 0 auto;width: auto !important;font-size: 32rpx;font-weight: bold;
color: #161616;}
.addbox /deep/ .uni-forms .uni-forms-item{margin-bottom: 0;padding: 4rpx 32rpx;
	// &:nth-of-type(3){margin-bottom: 0;border-bottom: 0;}
}
.addbox /deep/  .uni-easyinput{height: 70rpx;}
// .addbox /deep/  .uni-textarea-textarea{height: auto;}
.addbox /deep/ .uni-forms-item__content{display: flex;align-items: center;flex-direction: row;}
.addbox /deep/ .uni-easyinput{flex: 1;text-align: right;}
.addbox /deep/ .uni-easyinput__placeholder-class{font-size: 30rpx;}
.addbox /deep/ .uni-easyinput__content-input{font-size: 30rpx;}
 .addbox /deep/ .uni-forms-item__error{margin-top:-12rpx;left: auto;right: 0;}
 .addbox /deep/ .uni-data-checklist .checklist-group .checklist-box{margin-right: 30rpx;}
  .addbox /deep/ .uni-data-checklist .checklist-group{justify-content: flex-end;}
</style>
