<template name='information'>
	<view class="container" :style="{paddingBottom :isIphoneX ? '218rpx' : '184rpx'}">
		<view class="wrap-info">
			<view class="row">
				<view class="info-title">基本信息</view>
			</view>
			<view class="info-from">
				<view class="label">公司名称</view>
				<input class="row-input" type="text"  v-model="params.name" placeholder="请与营业执照的注册名称保持一致" placeholder-class="placeholder" maxlength="30"/>
			</view>
			<view class="info-email">示例：华熙生物科技股份有限公司</view>
			<view class="info-from">
				<view class="label">公司简称</view>
				<input class="row-input" type="text" v-model="params.shortName" placeholder="请输入公司简称" placeholder-class="placeholder" maxlength="10"/>
			</view>
			<view class="info-email">示例：华熙生物</view>
			<view class="info-from">
				<view class="label">公司地址</view>
				<view class="row-input" @click="showMulLinkageThreePicker">
					 <text :class="addressData.address === '请选择公司所在地区' ? 'none' : ''">
					 	{{addressData.address}}
					 </text>	
					 <text class="iconfont icon-xiayibu"></text>
				</view> 
			</view>
			<textarea value="" v-model="params.address"  placeholder="请填写详细地址，如街道/小区/门牌等" maxlength="50" placeholder-class="placeholder" class="address-details"/>
			<view class="info-from">
				<view class="label">联系人</view>
				<input class="row-input"  v-model="params.linkMan" type="text" placeholder="请输入联系人姓名" placeholder-class="placeholder" maxlength="6"/>
			</view>
			<view class="info-from">
				<view class="label">邮箱</view>
				<input class="row-input" v-model="params.email" type="text" placeholder="请输入邮箱地址" placeholder-class="placeholder"/>
			</view>
			 <text class="info-email">邮箱可用作登录账号，请使用公司邮箱或法人邮箱</text>
			<view class="info-from">
				<view class="label">固定电话</view>
				<input class="row-input" v-model="params.contractPhone" type="text" placeholder="请在号码前加区" placeholder-class="placeholder" maxlength="11"/>
			</view>
			<view class="info-from">
				<view class="label">传真</view>
				<input class="row-input" v-model="params.fax" type="text" placeholder="请输入公司传真号" placeholder-class="placeholder"/>
			</view>
			<view class="info-from">
				<view class="label">法人代表</view>
				<input class="row-input" v-model="params.legalPerson" type="text" placeholder="请输入公司法人代表姓名" placeholder-class="placeholder" maxlength="6"/>
			</view>
			<view class="info-from">
				<view class="label">注册资本</view>
				<input class="row-input"  v-model="params.registeredCapital" type="text" placeholder="请填写公司注册资本 " placeholder-class="placeholder" />
			</view>
			<view class="info-from">
				<view class="label">公司性质</view>
				<input class="row-input" v-model="params.companyNature" type="text" placeholder="请填写公司性质" placeholder-class="placeholder"/>
			</view>
			<view class="info-from">
				<view class="label">年营业额</view>
				<input class="row-input" v-model="params.turnover" type="text" placeholder="请输入公司年营业额" placeholder-class="placeholder"/>
			</view>
		</view>
		
		<view class="wrap-content">
			<view class="row">
				<view class="info-title">经营信息</view>	
			</view>
			<view class="info-from" style="border: 0;">
				<view class="label">公司类型</view>
				<view class="row-input ShopTyperadio">
				 <radio-group @change="radioChange">
					 <label class="radio" v-for="(item, index) in typename" :key="item.value">
						 <radio :value="item.value" :checked="item.value == params.firstShopType" color='#E15616'/>{{item.name}}
					 </label>
				 </radio-group>
				 </view>
			</view>
			<view class="secondTyperadio"  v-if="params.firstShopType==1" >
				 <view class="radio" v-for="(item,index) in secondtype" :key="index" @click="secondypeRidio(item)" :class="item.value==params.secondShopType?'active':''">
				 	<view class="secondRadio" >{{item.name}}</view>
				 </view>
			</view>
			<view class="zizhi" v-if="params.secondShopType==3">
				<view class="info2-title zizhi-title">资质</view>
				<view class="uploadImage">
					 <view class="form-upload-image"  v-if="params.medicalPracticeLicense!=''&&params.medicalPracticeLicense!=null">
						   <image class="upload-img" :src="params.medicalPracticeLicense" alt="" ></image>
						   <view class="iconfont icon-shanchu1" @click="deleteMedicalImage()"></view>
					 </view>
					 <view class="formLine-file" @click="uploadzizhiImageFn" v-else>
						   <view class="file-zizhi"></view>
					  </view>
					  <view class="form-upload-tips">
						  <text class="iconfont icon-wenhao"></text>
						  <view class="wen-tips">点击图片可放大图片</view>
					  </view>
				</view>
			</view>
			<view class="business">
				<view class="info2-title business-title">主营内容</view>
				<view class="business-info">
					 <checkbox-group class="row-group" @change="chooseMaleLike">
								<label class="diyBox" v-for="(item, index) in mentuzCampList" :key="item.value" >
									<checkbox :value="item.value" :checked="item.checked"></checkbox>
									<view class="row-text">{{item.name}}</view>
								</label>
					 </checkbox-group>
					 <view class="addbusiness">
					 	<input class="row-input other" type="text" placeholder="请输入自定义项目"  v-model="mainProEdit"placeholder-class="placeholder" maxlength="5"/>
					 	<button type="default" class="button" @click.stop="mainProAdd">确认添加</button>
					 </view>
				</view>
			</view>
			<view class="business">
				<view class="info2-title business-title">经营范围</view>
				<view class="business-info">
					   <checkbox-group class="row-group" @change="chooseMaleLikes">
							<label class="row-input" v-for="(item, index) in medicaCampList" :key="item.value" >
								<checkbox :value="item.value" :checked="item.checked" ></checkbox>
								<view class="row-text">{{item.name}}</view>
							</label>
					   </checkbox-group>
					 <view class="addbusiness">
					 	<input class="row-input other" type="text" placeholder="请输入自定义经营范围" v-model="shopScopeEdit" placeholder-class="placeholder" maxlength="5"/>
					 	<button type="default" class="button" @click.stop="shopScopeAdd">确认添加</button>
					 </view>
				</view>
			</view>
			<view class="info input">
				<view class="label">网站地址:</view>
				<input class="row-input" v-model="params.website" type="text" placeholder="请输入公司网站地址" placeholder-class="placeholder" maxlength="100"/>
			</view>
			<view class="info input">
				<view class="label">微信公众号:</view>
				<input class="row-input" v-model="params.wxOfficialAccount" type="text" placeholder="请输入公司微信公众号" placeholder-class="placeholder" maxlength="20"/>
			</view>
			<view class="info input">
				<view class="label">微信小程序:</view>
				<input class="row-input" v-model="params.wxApplets" type="text" placeholder="请输入公司微信小程序名称" placeholder-class="placeholder" maxlength="20"/>
			</view>
			<view class="info">
				<view class="info2-title">公司介绍</view>
				 <textarea  v-model="params.shopDesc"  maxlength="2000" placeholder="公司简介会在公司介绍页面展示，有助于机构更好的了解您， 建议从个人规模、代理产品、机构服务、荣誉资质这4方面进行介绍" placeholder-class="placeholder" name="textarea"/>
			</view>
			<view class="info">
				<view class="info2-title">主打系列商品说明</view>
				 <textarea placeholder="请输入主打系列商品说明" v-model="params.mainProductDesc" maxlength="500" placeholder-class="placeholder" name="textarea"/>
			</view>
		</view>
		
		<view class="wrap-image">
			<view class="row">
				<view class="info-title">资质证明</view>
			</view>
			<view class="info-from">
				<view class="label Code">营业执照编号</view>
				<input class="row-input Code" v-model.trim="params.socialCreditCode" type="text" placeholder="请输入公司营业执照编号" placeholder-class="placeholder" maxlength="18"/>
			</view>
			<view class="zizhi">
				<view class="info2-title zizhi-title">营业执照图片</view>
				<view class="uploadImage">
					 <view class="form-upload-image"  v-if="params.businessLicense!=''&&params.businessLicense!=null">
						   <image class="upload-img" :src="params.businessLicense" @click="showViewerImageFn()" ></image>
						   <view class="iconfont icon-shanchu1" @click="deleteBusinessImage()"></view>
					 </view>
					 <view class="formLine-file" @click="uploadBusinessLicenseImageFn" v-else>
						   <view class="file-biss iconImage"></view>
					  </view>
				</view>
			</view>
			<view class="zizhi">
				<view class="info2-title zizhi-title">公司LOGO</view>
				<view class="uploadImage">
					 <view class="form-upload-image"  v-if="params.logo!=''&&params.logo!=null">
						   <image class="upload-img" :src="params.logo" alt="" @click="showViewerImageFn1()"></image>
						   <view class="iconfont icon-shanchu1"  @click="deletelogoImage()"></view>
					 </view>
					 <view class="formLine-file" @click="uploadlogoImageFn" v-else>
						   <view class="file-logo iconImage"></view>
					  </view>
				</view>
			</view>
			<view class="zizhi">
				<view class="info2-title zizhi-title">生产许可证</view>
				<view class="uploadImage">
					 <view class="form-upload-image"  v-if="params.operationLicence!=''&&params.operationLicence!=null">
						   <image class="upload-img" :src="params.operationLicence" alt="" @click="showViewerImageFn2()"></image>
						   <view class="iconfont icon-shanchu1" @click="deleteproducImage()"></view>
					 </view>
					 <view class="formLine-file" @click="uploadproductionLicenceImageFn" v-else>
						   <view class="file-produce iconImage"></view>
					  </view>
				</view>
			</view>
			<view class="zizhi">
				<view class="info2-title zizhi-title">卫生许可证</view>
				<view class="uploadImage">
					 <view class="form-upload-image"  v-if="params.hygienicLicense!=''&&params.hygienicLicense!=null">
						   <image class="upload-img" :src="params.hygienicLicense" alt="" @click="showViewerImageFn3()"></image>
						   <view class="iconfont icon-shanchu1" @click="deletehygienicImage()"></view>
					 </view>
					 <view class="formLine-file" @click="uploadhygienicLicenseImageFn" v-else>
						   <view class="file-health iconImage"></view>
					  </view>
				</view>
			</view>
			<view class="zizhi">
				<view class="info2-title zizhi-title">税务许可证</view>
				<view class="uploadImage">
					 <view class="form-upload-image"  v-if="params.taxLicense!=''&&params.taxLicense!=null">
						   <image class="upload-img" :src="params.taxLicense" alt="" @click="showViewerImageFn4()"></image>
						   <view class="iconfont icon-shanchu1" @click="deletaxImage()"></view>
					 </view>
					 <view class="formLine-file" @click="uploadtaxLicenseImageFn" v-else>
						   <view class="file-tax iconImage"></view>
					  </view>
				</view>
			</view>
			<view class="zizhi">
				<view class="info2-title zizhi-title hoor">荣誉证书</view>
					<view class="uploadImage list-image">
						<view class="formLine-file" @click="uploadHonorImageFn" v-if="HonorImagesList.length<5" >
								<view class="file-honor iconImage"></view>
						 </view>
						 <view class="form-upload-image" v-for="(item, index) in HonorImagesList" :key="index">
							   <image class="upload-img" :src="item" alt="" @click="showViewerImageFn5()"></image>
							   <view class="iconfont icon-shanchu1" @click="removeGoodsImagesFn(HonorImagesList)"></view>
						 </view>
					</view>
			</view>
			<view class="zizhi">
				<view class="info2-title zizhi-title hoor">产品证书</view>
				<view class="uploadImage list-image">
					<view class="formLine-file" @click="uploadproductImageFn" v-if="productImagesList.length<5" >
							<view class="file-product iconImage"></view>
					 </view>
					 <view class="form-upload-image" v-for="(item, index) in productImagesList" :key="index">
						   <image class="upload-img" :src="item" alt="" @click="showViewerImageFn6()"></image>
						   <view class="iconfont icon-shanchu1" @click="removeproductImagesFn(index)"></view>
					 </view>
				</view>
			</view>
		</view>
		<view class="wrap-Btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '34rpx'}">
			<button type="default" class="confirmBbtn" @click="shopSubmit">保存</button>
		</view>
		<mpvue-city-picker :themeColor="themeColor"
							ref="mpvueCityPicker" 
						    :pickerValueDefault="cityPickerValueDefault"
							@onCancel="onCancel" 
							@onConfirm="onConfirm">
		</mpvue-city-picker>
	</view>
</template>

<script>
	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
	import { uploadFileImage } from "@/services/public.js"
	import { mapState,mapMutations } from 'vuex';
	export default{
		name:'information',
		components:{
			mpvueCityPicker,
		},
		data(){
			return{
				isShowInput:false,
				firsttype:0,
				secontype:0,
				isfirstShow:false,
				issecondshow:false,
				addressData:{
					address:'请选择公司所在地区',
					townId:'',			//区ID
					cityId:'',			//区ID
					provinceId:'',		//区ID
					addressDetail: '',	//地址
				},
				typename:[
					{name:'医疗',value:1},
					{name:'非医疗',value:2}
				],
				secondtype:[
					{name:'一类器械',value:1},
					{name:'二类器械',value:2},
					{name:'三类器械',value:3},
					{name:'其它',value:4}
				],
				mentuzCampNullList:[
					{value:'1',name:'产品'},
					{value:'2',name:'仪器'},
					{value:'3',name:'服务'}
				],
				medicaCampNullList:[
					{value:'1',name:'仪器护理类'},
					{value:'2',name:'护肤品类'},
					{value:'3',name:'纹绣类'},
					{value:'4',name:'美体内衣'},
					{value:'5',name:'整形耗材'},
					{value:'6',name:'国际品牌'},
					{value:'7',name:'美胸类'},
					{value:'8',name:'健康保健类'},
					{value:'9',name:'面膜类'},
					{value:'10',name:'抗衰老'},
					{value:'11',name:'生殖保养'},
					{value:'12',name:'健康养生'},
					{value:'13',name:'纤体减肥'}
				],
				params:{
					userId:'',
					shopId:'',
					townId:'',
					provinceId: '',//省id
					cityId: '',
					address:'',
					name:'',//公司名称
					shortName:'',//公司简称
					linkMan:'',//联系人
					email:'',//
					contractPhone:'',//固定电话
					fax:'',//传真
					legalPerson:'',//法人代表
					registeredCapital:'',//注册资本
					companyNature:'',//公司性质
					turnover:'',//年营业额
					firstShopType:'',//公司类型 1医疗  2非医疗
					secondShopType:'',//医疗下的二级分类
					mainProduct:'',//主营产品
					businessScope:'',//经营内容
					website:'',//网站地址
					wxOfficialAccount:'',//微信公众号
					wxApplets:'',//微信小程序
					shopDesc:'',//公司介绍
					mainProductDesc:'',//主打说明
					medicalPracticeLicense:'',//三级器械/医疗执照
					socialCreditCode:'',//营业执照编号
					businessLicense:'',//营业执照
					logo:'',//公司logo
					operationLicence:'',//生产
					hygienicLicense:'',//卫生
					taxLicense:'',//税务
					honorCertification:'',//荣誉
					productCertification:'',//产品
				},
				mentuzCampList:[],
				medicaCampList:[],
				shopMainPros:[],
				shopScope:[],
				mainProEdit: '',
				shopScopeEdit:'',
				HonorImagesList:[],
				productImagesList:[],
				isPreviewImage:false,   	//预览图片开关
				isMainproCheck:false,
				isIphoneX:this.$store.state.isIphoneX,
			}
		},
		onLoad() {
		},
		created() {
			this.shopInfo();
		},
		methods:{
			chooseMaleLike(e){
				this.isMainproCheck = true
				this.params.mainProduct = this.checkLikes(e,this.mentuzCampList)
			},
			chooseMaleLikes(e){
				this.isMainproCheck = true
				this.params.businessScope = this.checkLikes(e,this.medicaCampList)
			},
			checkLikes(e,list){
				let	values = e.detail.value;
				let arr = []
				list.forEach(item => {
					if(values.indexOf(item.value) >= 0){
						this.$set(item,'checked',true)
						arr.push(item.name)
					}else{
						this.$set(item,'checked',false)
					}
				})
				console.log(arr)
				return arr.join('/')
			},
			setNewMainpro(arr){//回显处理主营内容
				let _ARRAY = [];
				arr.split('/').forEach((item,index) =>{
					if(item != ""){
						let _OBJ = {value:(index+1).toString(),name:item,checked:true}
						_ARRAY.push(_OBJ)
					}
				})
				return _ARRAY
			},
		  shopInfo(){
			  this.$api.getStorage().then((resolve) =>{
				  this.params.userId = resolve.userId;
				  this.params.shopId = resolve.shopId;
				  	console.log(resolve)
				  this.UserService.SupplierShopInfo({userId:this.params.userId}).then(response =>{
					if(response.code==0){
						console.log(response)
						let shop = response.data.shop;
						let user = response.data.user;
						this.params.name = shop.name;
						this.params.shortName = shop.shortName;
						this.params.linkMan = shop.linkMan;
						this.params.email = user.email;
						this.addressData.address =  shop.provincialAddress;
						this.params.address = shop.address;
						this.params.website = shop.website
						this.params.wxOfficialAccount = shop.wxOfficialAccount
						this.params.wxApplets = shop.wxApplets
						this.params.provinceId = shop.provinceId;
						this.params.cityId = shop.cityId;
						this.params.townId = shop.townId;
						if(shop.contractPhone!=""&&shop.contractPhone!=null){
							this.params.contractPhone = shop.contractPhone;
						}
						if(shop.fax!=""&&shop.fax!=null){
							this.params.fax = shop.fax;
						}
						this.params.legalPerson = shop.legalPerson;
						this.params.registeredCapital = shop.registeredCapital;
						this.params.companyNature = shop.companyNature;
						this.params.turnover = shop.turnover;
						this.params.firstShopType = shop.firstShopType ? shop.firstShopType:'';
						this.params.secondShopType = shop.secondShopType ? shop.secondShopType : '';
						this.params.medicalPracticeLicense = shop.medicalPracticeLicense;
						this.params.shopDesc = shop.shopDesc;
						this.params.mainProductDesc = shop.mainProductDesc;
						this.params.socialCreditCode = shop.socialCreditCode;
						this.params.businessLicense = shop.businessLicense;
						this.params.logo = shop.logo;
						this.params.operationLicence = shop.operationLicence;
						this.params.hygienicLicense = shop.hygienicLicense;
						this.params.taxLicense = shop.taxLicense;
						this.HonorImagesList = shop.honorCertification;
						this.productImagesList = shop.productCertification;
						if( shop.honorCertification!=''&& shop.honorCertification!=null){
							this.params.honorCertification =this.HonorImagesList.toString()+',';
						}
						if( shop.productCertification!=''&& shop.productCertification!=null){
							this.params.productCertification =this.productImagesList.toString()+',';
						}
						if(shop.mainProduct == "" || shop.mainProduct == null){
							this.mentuzCampList = this.mentuzCampNullList
						}else{
							this.mentuzCampList = this.setNewMainpro(shop.mainProduct)
							this.params.mainProduct = shop.mainProduct
						}
						if(shop.businessScope == "" || shop.businessScope == null){
								this.medicaCampList = this.medicaCampNullList
						}else{
							this.medicaCampList = this.setNewMainpro(shop.businessScope)
							this.params.businessScope = shop.businessScope
						}
					}
				 })
				 })
			 },
			shopSubmit(){//提交修改
				if(this.params.name==''||this.params.name==null){
					this.$util.msg('请输入公司名称',2000);
					return
				}
				if(this.params.townId==''||this.params.townId==null){
					this.$util.msg('请选择联系地址',2000);
					return
				}
				if(this.params.address==''||this.params.address==null){
					this.$util.msg('请输入正确的联系地址',2000);
					return
				}
				if(this.params.linkMan==''||this.params.linkMan==null){
					this.$util.msg('请输入正确的联系人姓名',2000);
					return
				} 
				if(this.params.legalPerson==''||this.params.legalPerson==null){
					this.$util.msg('请输入法人代表姓名',2000);
					return
				} 
				if(this.params.registeredCapital==''||this.params.registeredCapital==null){
					this.$util.msg('请输入注册资本',2000);
					return
				} 
				if(this.params.companyNature==''||this.params.companyNature==null){
					this.$util.msg('请输入公司性质',2000);
					return
				} 
				if(this.params.turnover==''||this.params.turnover==null){
					this.$util.msg('请输入年营业额',2000);
					return
				} 
				if(this.params.firstShopType==''||this.params.firstShopType==null){
					this.$util.msg('请选择公司类型',2000);
					return
				}
				if(this.params.firstShopType==1 && this.params.secondShopType==""){
					this.$util.msg('请选择公司类型',2000);
					return
				}
				if(this.params.secondShopType == 3){
					if(this.shopInfo.medicalPracticeLicense == ''){
						this.$util.msg('请上传医疗许可证书',2000);
						return
					}
				}
				if(this.params.mainProduct==''||this.params.mainProduct==null){
					this.$util.msg('请选择主营内容',2000);
					return
				}
				if(this.params.businessScope==''||this.params.businessScope==null){
					this.$util.msg('请选择经营内容',2000);
					return
				} 
				if(this.params.website){
					if(!this.$reg.isWebsite(this.params.website)){
						this.$util.msg('请输入正确的网站地址',2000);
						return
					}
				}
				if(this.params.shopDesc==''||this.params.shopDesc==null){
					this.$util.msg('请填写公司介绍',2000);
					return
				}
				if(this.params.mainProductDesc==''||this.params.mainProductDesc==null){
					this.$util.msg('请填系列商品说明',2000);
					return
				}
				
				if(this.params.socialCreditCode==''||this.params.socialCreditCode==null){
					this.$util.msg('请输入正确的统一社会信用代码',2000);
					return
				}
				if(this.params.businessLicense==''||this.params.businessLicense==null){
					this.$util.msg('请上传营业执照图片',2000);
					return
				}
				if(this.params.logo==''||this.params.logo==null){
					this.$util.msg('请上传公司logo',2000);
					return
				}
				if(this.params.operationLicence==''||this.params.operationLicence==null){
					this.$util.msg('请上传生产许可证',2000);
					return
				}
				if(this.params.hygienicLicense==''||this.params.hygienicLicense==null){
					this.$util.msg('请上传卫生许可证',2000);
					return
				}
				if(this.params.taxLicense==''||this.params.taxLicense==null){
					this.$util.msg('请上传税务许可证',2000);
					return
				}
				if(this.params.honorCertification==''||this.params.honorCertification==null){
					this.$util.msg('请上传荣誉证书',2000);
					return
				}
				if(this.params.productCertification==''||this.params.productCertification==null){
					this.$util.msg('请上传产品证书',2000);
					return
				}
				this.UserService.SupplierModifiedData(this.params).then(res=>{
					if(res.code === 0){
						  this.$util.msg('保存成功',2000,true,'success')
						  setTimeout(()=>{
							uni.navigateBack();
						  },2000)
					} else {
						this.$util.msg(res.msg,2000);
						this.loginLoading = false;
					}
				})
			},
			 mainProAdd(){//添加主营内容
					if (this.mainProEdit.length>0) {
						let obj = {name:this.mainProEdit,value:`${this.mentuzCampList.length+1}`};
						if(this.checkedArray(this.mainProEdit,this.mentuzCampList)){
							this.$util.msg('主营内容已存在!',2000)
						}else {
							this.mentuzCampList.push(obj);
						}
					}
				},
			shopScopeAdd(){ //经营内容
				if (this.shopScopeEdit.length>0) {
					let obj = {name:this.shopScopeEdit,value:`${this.medicaCampList.length+1}`};
					if(this.checkedArray(this.shopScopeEdit,this.medicaCampList)){
						this.$util.msg('主营内容已存在!',2000)
					}else {
						this.medicaCampList.push(obj);
						
					}
				}
			},
			 checkedArray(content,arr){//判断主营内容是否已存在
			 console.log(content,arr)
						 for(var i in arr){
								if(arr[i].name == content){
									return true;
								}
							}
			            return false;
			        },
			radioChange(e){
				this.params.firstShopType = e.target.value;
				// if (e.target.value==1){
				// 	this.isfirstShow = true;
				// }else {
				// 	this.isfirstShow = false;
				// }
				console.log(e.target.value)
			},
			showViewerImageFn6(e) {//预览产品
				this.myPreviewImageFnlist(this.productImagesList)
			},
			showViewerImageFn5(e) {//预览荣誉
				this.myPreviewImageFnlist(this.HonorImagesList)
			},
			showViewerImageFn4(e) {//预览税务
				this.myPreviewImageFn(this.params.taxLicense)
			},
			showViewerImageFn3(e) {//预览卫生
				this.myPreviewImageFn(this.params.hygienicLicense)
			},
			showViewerImageFn2(e) {//预览生产
				this.myPreviewImageFn(this.params.operationLicence)
			},
			showViewerImageFn1(e) {//预览logo
				this.myPreviewImageFn(this.params.logo)
			},
			showViewerImageFn(e) {//预览营业执照
				this.myPreviewImageFn(this.params.businessLicense)
			},
			myPreviewImageFnlist(arr){//多张预览
				this.isPreviewImage = true;
				uni.previewImage({
					urls: arr,
					current: 0
				})
				},
			myPreviewImageFn(url){//单张预览
				this.isPreviewImage = true
				let mentuzArray = []
				mentuzArray.push(url)
				uni.previewImage({
					urls: mentuzArray,
					current: 0
				});
			},
			uploadproductImageFn(event){//产品证书
				uploadFileImage().then(res =>{
					let imagePath = JSON.parse(res.data).data;
					this.productImagesList.push(imagePath);
					this.params.productCertification =this.productImagesList.toString()+',';
				 })
			},
			uploadHonorImageFn(event){//荣誉证书上传
				uploadFileImage().then(res =>{
					let imagePath = JSON.parse(res.data).data;
					this.HonorImagesList.push(imagePath);
					this.params.honorCertification =this.HonorImagesList.toString()+',';
				})
			},
			uploadlogoImageFn(event){//上传公司logo
				uploadFileImage().then(res =>{
					this.params.logo = JSON.parse(res.data).data;
				})
			},
			uploadproductionLicenceImageFn(event){//上传生产
				uploadFileImage().then(res =>{
					this.params.operationLicence = JSON.parse(res.data).data;
				})
			},
			uploadhygienicLicenseImageFn(event){//上传卫生
				uploadFileImage().then(res =>{
					this.params.hygienicLicense = JSON.parse(res.data).data;
				})
			},
			uploadtaxLicenseImageFn(event){//上传税务
			   uploadFileImage().then(res =>{
				this.params.taxLicense = JSON.parse(res.data).data;
			   })
			},
			uploadBusinessLicenseImageFn(event){//上传营业执照图片
				uploadFileImage().then(res =>{
					this.params.businessLicense = JSON.parse(res.data).data;
				})
			},
			uploadzizhiImageFn(event){//上传医疗图片
				uploadFileImage().then(res =>{
					this.params.medicalPracticeLicense = JSON.parse(res.data).data;
				})
			},
			removeGoodsImagesFn(index){//删除荣誉图片
					this.HonorImagesList.splice(index,1);
					this.params.honorCertification = this.HonorImagesList.toString()+',';
			},
			removeproductImagesFn(index){//删除产品图片
				this.productImagesList.splice(index,1);
				this.params.productCertification = this.productImagesList.toString()+',';
			 },
			deletaxImage(){//删除卫生
			      this.params.taxLicense = '';
			},
			 deletehygienicImage(){//删除卫生
				this.params.hygienicLicense = '';
			},
			deleteproducImage(){//删除生产
				this.params.operationLicence = '';
			},
			 deletelogoImage(){//删除logo图片
				this.params.logo = '';
			},
			 deleteBusinessImage(){//删除营业执照图片
				this.params.businessLicense = '';
			},
			 deleteMedicalImage(){//删除商品图片
			   this.medicalPracticeLicense = '';
			 },
			secondypeRidio(item){
				this.params.secondShopType = item.value;
				// if (item.value==3){
				// this.issecondshow = true;
				// }else {
				//  this.issecondshow = false;
				// }
			},
			showMulLinkageThreePicker() {//三级地址联动
				this.isShowInput = true
				this.$refs.mpvueCityPicker.show()
				},
			onConfirm(e) {//获取选择的地址信息
				console.log('地址',e);
				this.addressData.address = e.name;
				this.addressData.townId = e.townCode;
				this.addressData.cityId = e.cityCode;
				this.addressData.provinceId = e.provinceCode;
				this.params.townId = this.addressData.townId;
				this.params.provinceId = this.addressData.provinceId;
				this.params.cityId = this.addressData.cityId;
				this.params.address = this.addressData.address;
			},
			onConfirmbrand(e){
				this.brandname = e.name;
			},
		},
	}
</script>

<style  lang="scss">
	.container{
		width: 100%;
		height: auto;
	}
	.row{
		line-height: 80rpx;
		background: #f7f7f7;
		padding: 0 24rpx;
		.info-title{
			font-size: $font-size-30;
			color: $text-color;
			font-weight: bold;
		}
	}
	.placeholder{
		 color: #b2b2b2;
	}
	.info-from-tips{
		width: 100%;
		box-sizing: border-box;
		padding: 0 24rpx;
		line-height: 44rpx;
		font-size: $font-size-24;
		color: #fea785;
		text-align: left;
	}
	.info-from{
		width: 702rpx;
		height: 90rpx;
		line-height: 90rpx;
		border-bottom: 2rpx solid #e1e1e1;
		margin: auto;
		position: relative;
		.label{
			width: 112rpx;
			text-align: left;
			font-size: $font-size-28;
			color: #666666;
			line-height: 90rpx;
			float: left;
			&.Code{
				width: 170rpx;
			}
		}
		.row-input{
			width: 520rpx;
			padding-left:10rpx;
			font-size: $font-size-28;
			color: $text-color;
			line-height: 90rpx;
			float: left;
			height: 90rpx;
			margin-left: 50rpx;
			&.Code{
				width: 470rpx;
			}
			.icon-xiayibu{
				position: absolute;
				right: 0;
				color: #b2b2b2;
			}
			.none{
				color: #b2b2b2;
			}
		}
	}
	.address-details{
		height: 146rpx;
		border-bottom: 2rpx solid #e1e1e1;
		width: 702rpx;
		margin: auto;
		font-size: $font-size-28;
		padding-top: 20rpx;
	}
	 input[type="text"]::placeholder,textarea::placeholder {color: #b2b2b2;font-size: $font-size-28;}
	 .info-email{
		 width: 100%;
		 box-sizing: border-box;
		 padding: 0 24rpx;
		 line-height: 44rpx;
		 font-size: $font-size-20;
		 color: #fea785;
		 text-align: left;
	 }
	 .ShopTyperadio{
		 overflow: hidden;
		 height: auto;
		 border: 0;
		 .radio{
			 float: left;
			 margin-right: 77rpx;
			 .iconfont{
				 margin-right: 10rpx;
				 font-size: $font-size-36;
			 }
			 .icon-weixuanze{
				 color: #b2b2b2;
			 }
			 .icon-yixuanze{
				  color: $color-system;
			 }
		 }
	 }
	 .active{
		 color: $color-system;
	 }
	 .secondTyperadio{
		 overflow: hidden;
		 height: auto;
		 padding: 20rpx 24rpx;
		 margin-bottom: 20rpx;
		 color: #999999;
		 .radio{
				float: left;
				margin-right: 20rpx;
				.secondRadio{
					 border: 2rpx solid #e1e1e1;
					 padding: 0 30rpx;
					 text-align: center;
					 line-height: 42rpx;
					 font-size: $font-size-26;
					 border-radius: 21rpx;
				}
			}
	 }
	 .zizhi{
		 .uploadImage{
			 padding: 0 24rpx;
			 &.list-image{
				 overflow: hidden;
				 display: flex;
				 overflow-x: auto;
				 flex-shrink: 0;
				 padding-top: 15rpx;
				 
				 max-width: 702rpx;
				 .formLine-file{
					 float: left;
					 display: flex;
					 flex-shrink: 0;
					 margin:15rpx 15rpx 15rpx 0rpx;
				 }
				 .form-upload-image{
					  float: left;
					  -webkit-flex-shrink: 0;
					  flex-shrink: 0;
					  position: relative;
					  display: inline-block;
					  margin:15rpx 15rpx 15rpx 0rpx;
					  display: flex;
					  align-items: center;
				 }
			 }
			 .form-upload-image{
				 width: 200rpx;
				 height:180rpx; 
				 position: relative;
				 .upload-img{
					 width: 100%;
					 height: 100%;
				 }
				 .icon-shanchu1{
					position: absolute;
					top: -20rpx;
					right:-15rpx;
					color: #f94b4b;
					font-size: $font-size-36;
				}
			 }
			 .formLine-file{
					width:200rpx;
					height: 180rpx;
					display: inline-block;
				 .file-zizhi{
					background: url('https://static.caimei365.com/app/img/upload/club-yiliao.png') no-repeat;
					width:100%;
					height:100%;
					background-size: 100% 100%;
				 }
				 .iconImage{
					width: 100%;
					height:100%; 
					&.file-biss{
						background: url('https://static.caimei365.com/app/img/upload/club-zizhi.png') no-repeat;
						background-size: 100% 100%;
						}
					&.file-logo{
						background: url('https://static.caimei365.com/app/img/upload/icon-logo.png') no-repeat;
						background-size: 100% 100%;
						}
					&.file-produce{
						background: url('https://static.caimei365.com/app/img/upload/icon-produce.png') no-repeat;
						background-size: 100% 100%;
						}
					&.file-health{
						background: url('https://static.caimei365.com/app/img/upload/icon-health.png') no-repeat;
						background-size: 100% 100%;
						}
					&.file-tax{
						background: url('https://static.caimei365.com/app/img/upload/icon-tax.png') no-repeat;
						background-size: 100% 100%;
						}
					&.file-honor{
						background: url('https://static.caimei365.com/app/img/upload/icon-honor.png') no-repeat;
						background-size: 100% 100%;
						}
					&.file-product{
						background: url('https://static.caimei365.com/app/img/upload/icon-product.png') no-repeat;
						background-size: 100% 100%;
						}
						
				 }
			 }
			 .form-upload-tips{
				 display: inline-block;
				 vertical-align: top;
				 position: relative;
				 margin-left: 20rpx;
				 .icon-wenhao{
					font-size: 41rpx;
					 color:#1890f9 ;
				 }
				 .wen-tips{
						width: 360rpx;
					     height: 64rpx;
					     line-height: 64rpx;
					     text-align: center;
					     color: #FFF;
					     font-size: 28rpx;
					     background-color: #1890f9;
					     position: absolute;
					     bottom: -80rpx;
					     left: -4rpx;
					     border-radius: 2rpx;
						 display: none ;
				 }
				 .wen-tips:before {
				     content: '';
				     width: 0px;
				     height: 0px;
				     border-width: 20rpx;
				     border-style: solid;
				     border-color: transparent transparent #1890f9 transparent;
				     position: absolute;
				     top: -35rpx;
				     left: 10rpx;
				 }
			 }
		 }
	 }
	 .form-upload-tips:hover .wen-tips {display: block;}
	 .business{overflow: hidden;margin: 20rpx 0;}
	 .business-info{
		 float: left;
		 margin-left: 60rpx;
		 width: 550rpx;
		 }
	 .info2-title{
	 	padding: 0 0 24rpx 24rpx;
	 	font-size: $font-size-28;
	 	color: #666666;
		&.zizhi-title{
			padding: 24rpx;	
			 &.hoor{padding: 24rpx 24rpx 0 24rpx;}
			 }
			 &.business-title{
			 float: left;
		 }
		 
	 }
	 .addbusiness{
		 margin: 20rpx 0;
		 .other{
			 width: 350rpx;
			 height: 64rpx;
			 border: 2rpx solid #b2b2b2;
			 border-radius: 45rpx;
			 text-align: center;
			 line-height: 64rpx;
			 padding-left: 10rpx;
			 font-size: 28rpx;
			 display: inline-block;
		 }
		 .button{
			 width: 160rpx;
			 height: 64rpx;
			 text-align: center;
			 line-height: 64rpx;
			 display: inline-block;
			 color: $color-system;
			 background:#ffe6dc ;
			 margin-left: 15rpx;
			 border-radius: 45rpx;
		 }
	 }
	 .row-group{
		 .row-text{
		 	display: inline-block;
			font-size: 28rpx;
			color: #333333;
		 }
		 .row-input{
			width: 50%;
			display: inline-block;
			margin-bottom: 10rpx;
		 }
		 .diyBox{
			margin-bottom: 5px;
			// width: 33%;
			margin-right: 70rpx;
			display: inline-block;
		 }
		 
	 }
	 radio .wx-radio-input{
		 border-radius: 50%;
		 width: 36rpx; 
		 height: 36rpx;
	 }
	 radio .wx-radio-input.wx-radio-input-checked::before{
		 font-size:28rpx; 
	 }
	 checkbox .wx-checkbox-input{
	   border-radius: 50%;
	   width: 36rpx; 
	   height: 36rpx;
	 }
	 /* 选中后的 背景样式 */
	 checkbox .wx-checkbox-input.wx-checkbox-input-checked{
	   background: #E15616;
	   border: 2rpx solid #e15616;
	 }
	 checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
	   border-radius: 50%;
	   width: 36rpx;
	   height: 36rpx;
	   line-height: 36rpx;
	   text-align: center;
	   font-size:20rpx; 
	   color:#fff;
	   // background: transparent;
	   transform:translate(-50%, -50%) scale(1);
	   -webkit-transform:translate(-50%, -50%) scale(1);
	 }
	 .info{
		 margin: 20rpx 0;
		&.input{
			width: 702rpx;
			height: 90rpx;
			line-height: 90rpx;
			border-bottom: 2rpx solid #e1e1e1;
			margin: auto;
			position: relative;
			.label{
				width: 150rpx;
				text-align: left;
				font-size: $font-size-28;
				color: #666666;
				line-height: 90rpx;
				float: left;
			}
			.row-input{
				width: 490rpx;
				padding-left:10rpx;
				font-size: $font-size-28;
				color: $text-color;
				line-height: 90rpx;
				float: left;
				height: 90rpx;
				margin-left: 50rpx;
			}
		}
		 textarea{
			width: 680rpx;
			height: 200rpx; 
			border: 2rpx solid #b2b2b2;
			border-radius: 6rpx;
			font-size: $font-size-28;
			padding: 10rpx;
			margin: auto;
			line-height: 48rpx;
		 }
	 }
	 .wrap-Btn{
		 width: 100%;
		 height: 90rpx;
		 position: fixed;
		 left: 0;
		 bottom: 0;
		 padding-top: 40rpx;
		 background-color: #FFFFFF;
		 z-index: 999;
		 .confirmBbtn{
			 width: 600rpx;
			 height: 90rpx;
			 line-height: 90rpx;
			 text-align: center;
			color: #fff;
			background:$btn-confirm;
			border-radius: 45rpx;
		 }
	 }
</style>
