<template>
	<view class="addbox" :style="'padding-top:'+listTop+'rpx;'">
		<!-- 步骤条 -->
		<view class="navtop">
			<uni-nav-bar color="#ffffff" leftWidth="160rpx" rightWidth="160rpx"   title="业务申报" :background-color="actcolor" :border="false"
				 statusBar='true'>
				<block slot="left">
					<view class="topl" v-if="ftype" @click="getBack">
						<image class="backimg" :src="backimg" ></image>
					</view>
					<cover-view class="topl" v-else @click="getBack">
						<cover-image class="backimg" :src="backimg" @click.stop="getBack"></cover-image>
					</cover-view>
				</block>
				<!-- #ifndef MP-WEIXIN -->
				<block slot="right">
					<view class="edit" v-if="ftype" @click="getGiveupFn">
						<image :src="feditimg"></image>
						放弃编辑
					</view>
					<cover-view class="edit" v-else @click="getGiveupFn">
						<cover-image :src="feditimg" @click.stop="getGiveupFn" class="img"></cover-image>
						<cover-view @click.stop="getGiveupFn" class="txt">放弃编辑</cover-view>
					</cover-view>
				</block>
				<!-- #endif -->
				
			</uni-nav-bar>
			<!-- 头部 -->
			<step-bar :steps="steps" :fixeda='false' :stepval="stepval"></step-bar>
		</view>
		<uni-forms ref="form" :model="datainfo" :rules="rules">
			<view class="bgf plr12 mt12">
				<uni-forms-item label="项目编号" name="loanApplicationNumber">
					<view class="lbtabp">
						<view :class="datainfo.loanApplicationNumber?'':'coa'">{{datainfo.loanApplicationNumber}}</view>
					</view>
				</uni-forms-item>
			</view>	
			<!-- 企业信息 -->
			<view v-show="stepval==1">
				<!-- 企业信息 -->
				<view class="addtit mt3"><text>*</text>企业信息</view>
				<view class="bgf plr12">
					<picker  range-key='label' :value="qyidx" :range="qylist" class="isborder"  @change='bindDateChangea'>
						<uni-forms-item label="企业名称" name="enterpriseName">
							<view class="lbtabp">
								<view class="chtit" :class="datainfo.enterpriseName?'':'coa'">{{datainfo.enterpriseName||"请选择已添加的企业"}}</view>
								<image :src="hrimg" class="rimg"></image>
							</view>
						</uni-forms-item>
					</picker>
					<uni-forms-item label="行业类型" name="categoryType">
						<view class="lbtabp" @click="getTalbFn">
							<view :class="datainfo.categoryType?'':'coa'">{{datainfo.categoryType||"请选择行业类型"}}</view>
							<image :src="hrimg" class="rimg"></image>
						</view>
					</uni-forms-item>
					<uni-forms-item label="是否是制造业" name="isMake">
						<view class="checkbox">
							<uni-data-checkbox :selectedColor="actcolor" selectedTextColor='#222327' v-model="datainfo.isMake" :localdata="sfList" />
						</view>
					</uni-forms-item>
					<uni-forms-item label="是否专精特新" name="isNew">
						<view class="checkbox">
							<uni-data-checkbox :selectedColor="actcolor" selectedTextColor='#222327' v-model="datainfo.isNew" :localdata="sfList" />
						</view>
					</uni-forms-item>
					<uni-forms-item label="是否小微企业" name="isSmall">
						<view class="flexc">
							<view class="checkbox flex1">
								<uni-data-checkbox :selectedColor="actcolor" selectedTextColor='#222327' v-model="datainfo.isSmall" :localdata="sfList" />
							</view>
							<view class="ywicon flexc" @click="showImg"><image :src="ywicon"></image>划分标准</view>
						</view>
					</uni-forms-item>
					<uni-forms-item label="公司简介" name="companyIntroduction">
						<uni-easyinput type="textarea" autoHeight v-model="datainfo.companyIntroduction" :inputBorder='false' placeholder="请输入公司简介" />
					</uni-forms-item>
					<uni-forms-item label="公司简介" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.gszc">
								<!-- fileName 给label 0 -->
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.gsjj" fileVal='gsjj' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">公司简介附件与输入信息填一个即可。</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='gsjj'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="公司章程" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.gszc">
								<!-- fileName 给label 0 -->
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.gszc" fileVal='gszc' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传公司章程并盖市监局备案章</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='gszc'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="开户许可证" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.khxkz">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.khxkz" fileVal='khxkz' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit">上传开户许可证</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='khxkz'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<!-- <uni-forms-item label="企业名称" name="email">
						<uni-easyinput v-model="datainfo.email" :inputBorder='false' placeholder="自动识别" />
					</uni-forms-item> -->
					
				</view>
				<!-- 全体股东身份信息 -->
				<view class="addtit mt3"><text>*</text>全体股东身份信息<text style="color: red; font-size: 12px;">(身份证信息与营业执照两者只需上传一个)</text></view>
				<view class="bgf plr12">
					<block v-for="(ite,idx) in gdlist" :key="idx">
						<uni-forms-item  name="iszcy">
							<view class="labtxt">股东{{(Number(idx)+1)}}身份证
								<text class="del" @click="getdelGdFn(idx,ite)">删除</text>
							</view>
							<view class="phobox" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
								<view class="phoboxa">
									<lsj-upload ref="lsjUpload" childId="upload1" :fileName="'股东'+(Number(idx)+1)+'身份证'" :fileVal='idx' bigType="cardz"  :width="pwidth" :height="pheight"  :formats="gdformats" :option="option" :size="size"  :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="gdonuploadEnd" >
										<view  class="photop">
											<image v-if="ite.cardz" :src="baseUrl+ite.cardz" class="bgimg"></image>
											<image v-else :src="cardz" class="bgimg"></image>
											<image :src="phoicon" class="addimg"></image>
										</view>
									</lsj-upload>
									<view class="photit">上传人像面</view>
								</view>
								<view class="phoboxa" >
									<lsj-upload ref="lsjUpload" childId="upload1" :fileName="'股东'+(Number(idx)+1)+'身份证'" :fileVal='idx' bigType="cardf"  :width="pwidth" :height="pheight"  :option="option" :size="size" :formats="gdformats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="gdonuploadEnd" >
										<view class="photop">
											<image v-if="ite.cardf" :src="baseUrl+ite.cardf" class="bgimg"></image>
											<image v-else :src="cardf" class="bgimg"></image>
											
											<image :src="phoicon" class="addimg"></image>
										</view>
									</lsj-upload>
									<view class="photit">上传国徽面</view>
								</view>
								
							</view>
						</uni-forms-item>
						<uni-forms-item  name="iszcy">
							<view class="labtxt">股东{{(Number(idx)+1)}}营业执照
								<text class="del" @click="getdelGdFn(idx,ite)">删除</text>
							</view>
							<view class="phobox">
								<view class="phoboxa">
									<lsj-upload ref="lsjUpload" childId="upload1" :fileName="'股东'+(Number(idx)+1)+'营业执照'" :fileVal='idx' bigType="zhz"  :width="pwidth" :height="pheight" :option="option" :size="size" :formats="gdformats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="gdonuploadEnd" >
										<view  class="photop" >
											<image :src="zico" class="bgimg"></image>
											<image :src="phoicon" class="addimg"></image>
										</view>
									</lsj-upload>
									<view class="photit">上传实际控股人营业执照</view>
								</view>
								<block v-if="ite.zhizhao&&ite.zhizhao.length">
									<view class="phoboxa" v-for="(zxite,zxidx) in ite.zhizhao" :key="zxidx">
										<view class="photop" @click="getDown(zxite)">
											<image :src="lookico" class="bgimg"></image>
											<image :src="phoicon" class="addimg"></image>
											<image :src="delimg" class="delimg" @click.stop="getDelgdyy(idx,zxidx)"></image>
										</view>
										<!-- <view class="photit">{{zxite.name}}</view> -->
									</view>
								</block>
							</view>
						</uni-forms-item>
					</block>
					<view class="addgdbox">
						<view class="rzbtnadd" @click="getAddGdFn">
							<image :src="addgd"></image>添加股东
						</view>
					</view>
				</view>
				<!-- * 企业征信（由中国人民银行提供） -->
				<view class="addtit mt3"><text>*</text>企业征信（由中国人民银行提供）</view>
				<view class="bgf plr12">
					<uni-forms-item label="申请企业" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.sqqyzxbg">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.sqqyzxbg" fileVal='sqqyzxbg' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传申请企业征信报告</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='sqqyzxbg'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="关联企业" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.glqyzxbg">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.glqyzxbg" fileVal='glqyzxbg' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传关联企业征信报告</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='glqyzxbg'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
				</view>
				<!-- * 企业法人征信-->
				<view class="addtit mt3"><text>*</text>企业法人征信</view>
				<view class="bgf plr12">
					<uni-forms-item label="企业法人" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.qyfrzxbg">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.qyfrzxbg" fileVal='qyfrzxbg' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传企业法人征信报告</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='qyfrzxbg'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
				</view>
				<!-- * 实际控股人夫妻双方征信-->
				<view class="addtit mt3"><text>*</text>实际控股人夫妻双方征信</view>
				<view class="bgf plr12">
					<uni-forms-item label="实际控股人" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.sjkgrzxbg">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.sjkgrzxbg" fileVal='sjkgrzxbg' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传实际控股人征信报告</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='sjkgrzxbg'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="配偶征信" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.sjkgrpozxbg">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.sjkgrpozxbg" fileVal='sjkgrpozxbg' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传实际控股人配偶征信报告</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='sjkgrpozxbg'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
				</view>
				<!-- * 各股东个人征信（请与上面所填股东对应） -->
				<view class="addtit mt3"><text>*</text>各股东个人征信（请与上面所填股东对应）</view>
				<view class="bgf plr12">
					<block v-for="(ite,idx) in gdlist" :key="idx">
						<uni-forms-item :label="'股东'+(Number(idx)+1)+'征信'" name="iszcy">
							<view class="phobox">
								<view class="phoboxa">
									<lsj-upload ref="lsjUpload" childId="upload1" :fileName="'股东'+(Number(idx)+1)+'征信'" :fileVal='idx' bigType="zx"  :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="gdonuploadEnd" >
										<view  class="photop" >
											<image :src="zico" class="bgimg"></image>
											<image :src="phoicon" class="addimg"></image>
										</view>
									</lsj-upload>
									<view class="photit">上传实际控股人征信报告</view>
								</view>
								<block v-if="ite.zxurl&&ite.zxurl.length">
									<view class="phoboxa" v-for="(zxite,zxidx) in ite.zxurl" :key="zxidx">
										<view class="photop" @click="getDown(zxite)">
											<image :src="lookico" class="bgimg"></image>
											<image :src="phoicon" class="addimg"></image>
											<image :src="delimg" class="delimg" @click.stop="getDelgdFj(idx,zxidx)"></image>
										</view>
										<!-- <view class="photit">{{zxite.name}}</view> -->
									</view>
								</block>
							</view>
						</uni-forms-item>
					</block>
				</view>
			</view>
			<!-- 法人信息 -->
			<view v-show="stepval==2">
				<!-- 用户类型 -->
				<view class="addtit mt3"><text>*</text>用户类型</view>
				<view class="bgf plr12">
					<picker  range-key='label' :value="yhlxidx" :range="yhlxlist" class=""  @change='bindDateChangeb'>
						<uni-forms-item label="用户类型" name="customerType">
							<view class="lbtabp">
								<view v-if="datainfo.customerType&&!yhlx">{{statusFormat(datainfo.customerType,yhlxlist,'yhlx')}}</view>
								<view v-else :class="yhlx?'':'coa'">{{yhlx||"请选择用户类型"}}</view>
								<image :src="hrimg" class="rimg"></image>
							</view>
						</uni-forms-item>
					</picker>
				</view>
				<!-- 法定代表人基本信息 -->
				<view class="addtit mt3"><text>*</text>法定代表人基本信息</view>
				<view class="bgf plr12">
					<uni-forms-item label="身份证" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.frsfzrmx">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.frsfzrmx" fileVal='frsfzrmx' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="gdformats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="ponuploadEnd" >
									<view class="photop">
										<image :src="cardz" class="bgimg"></image>
										<image v-if="datainfo.corporationFront" :src="baseUrl+datainfo.corporationFront" class="bgimga"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传人像面</view>
							</view>
							<view class="phoboxa" v-if="jcfjobj.frsfzghm">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.frsfzghm" fileVal='frsfzghm' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="gdformats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="ponuploadEnd" >
									<view class="photop">
										<view class="photop">
											<image :src="cardf" class="bgimg"></image>
											<image v-if="datainfo.corporationBack" :src="baseUrl+datainfo.corporationBack" class="bgimga"></image>
											<image :src="phoicon" class="addimg"></image>
										</view>
									</view>
								</lsj-upload>
								<view class="photit">上传国徽面</view>
							</view>
						</view>
					</uni-forms-item>
					<uni-forms-item label="姓名" name="corporationName">
						<uni-easyinput v-model="datainfo.corporationName" disabled :inputBorder='false' placeholder="自动识别" />
					</uni-forms-item>
					<!-- disabled -->
					<uni-forms-item label="身份证号" name="corporationIdCard">
						<uni-easyinput v-model="datainfo.corporationIdCard" disabled :inputBorder='false' placeholder="自动识别" />
					</uni-forms-item>
					<uni-forms-item label="手机号码" name="corporationPhone">
						<uni-easyinput v-model="datainfo.corporationPhone" type="number" :inputBorder='false' placeholder="请输入手机号码" />
					</uni-forms-item>
					<!--  家庭人口选填-->
					<uni-forms-item label="家庭人口" name="familyPopulation">
						<uni-easyinput v-model="datainfo.familyPopulation" type="number" :inputBorder='false' placeholder="请输入家庭人口" />
					</uni-forms-item>
					<uni-forms-item label="法人职业" name="corporationJob">
						<uni-easyinput v-model="datainfo.corporationJob"  :inputBorder='false' placeholder="请输入法人职业" />
					</uni-forms-item>
					<picker  range-key='label' :value="ywidx" class="isborder" :range="ywList"  @change='bindDateChangec'>
						<uni-forms-item label="有无贷款" name="qymc">
							<view class="lbtabp">
								<view v-if="datainfo.isLoan">{{datainfo.isLoan=='Y'?'有':'无'}}</view>
								<view v-else class="coa">请选择有/无</view>
								<image :src="hrimg" class="rimg"></image>
							</view>
						</uni-forms-item>
					</picker>
					<!-- <uni-forms-item label="应收应付款" name="email">
						<uni-easyinput v-model="datainfo.email" type="number" :inputBorder='false' placeholder="请输入应收应付款" />
					</uni-forms-item> -->
					<!-- <uni-forms-item label="经营情况" name="iszcy">
						<uni-easyinput type="textarea" autoHeight v-model="datainfo.email" :inputBorder='false' placeholder="请描述近几年经营情况" />
					</uni-forms-item> -->
					<!-- <uni-forms-item label="经营效益" name="email">
						<uni-easyinput v-model="datainfo.email" type="number" :inputBorder='false' placeholder="请输入经营效益" />
					</uni-forms-item> -->
				</view>
				<!-- * 家庭婚姻信息 -->
				<view class="addtit mt3"><text>*</text>家庭婚姻信息</view>
				<view class="bgf plr12">
					<picker  range-key='label' :value="frhyzkidx" :range="hyztlist" class="isborder"  @change='bindDateChanged'>
						<uni-forms-item label="婚姻状态" name="corporationMaritalStatus">
							<view class="lbtabp">
								<view v-if="datainfo.corporationMaritalStatus&&!frhyzk">{{statusFormat(datainfo.corporationMaritalStatus,hyztlist,'frhyzk')}}</view>
								<view v-else :class="frhyzk?'':'coa'">{{frhyzk||"请选择婚姻状态"}}</view>
								<image :src="hrimg" class="rimg"></image>
							</view>
						</uni-forms-item>
					</picker>
					<uni-forms-item label="配偶身份证" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.frsfzpormx">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.frsfzpormx" fileVal='frsfzpormx' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size"  :formats="gdformats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="ponuploadEnd" >
									<view class="photop">
										<image :src="cardz" class="bgimg"></image>
										<image v-if="datainfo.spouseFront" :src="baseUrl+datainfo.spouseFront" class="bgimga"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<!-- 删除 -->
								<view class="frdelimg" v-if="datainfo.spouseFront" @click.stop="getDelfzpo('front')">
									<image :src="fdelimg"></image>
								</view>
								<view class="photit atit">上传人像面</view>
							</view>
							<view class="phoboxa" v-if="jcfjobj.frsfzpoghm">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.frsfzpoghm" fileVal='frsfzpoghm' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size"  :formats="gdformats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="ponuploadEnd" >
									<view class="photop">
										<view class="photop">
											<image :src="cardf" class="bgimg"></image>
											<image v-if="datainfo.spouseBack" :src="baseUrl+datainfo.spouseBack" class="bgimga"></image>
											<image :src="phoicon" class="addimg"></image>
										</view>
									</view>
								</lsj-upload>
								<!-- 删除 -->
								<view class="frdelimg" v-if="datainfo.spouseBack" @click.stop="getDelfzpo('back')">
									<image :src="fdelimg"></image>
								</view>
								<view class="photit">上传国徽面</view>
							</view>
						</view>
					</uni-forms-item>
					<uni-forms-item label="配偶姓名" name="spouseName">
						<uni-easyinput v-model="datainfo.spouseName" disabled :inputBorder='false' placeholder="自动识别" />
					</uni-forms-item>
					<uni-forms-item label="配偶身份证号" name="spouseIdCard">
						<uni-easyinput v-model="datainfo.spouseIdCard" disabled :inputBorder='false' placeholder="自动识别" />
					</uni-forms-item>
				</view>
				<!-- * 企业法人征信-->
				<view class="addtit mt3"><text>*</text>婚姻证明</view>
				<view class="bgf plr12">
					<!-- 离婚状态上传 -->
					<uni-forms-item label="离婚证" name="iszcy" v-if="datainfo.corporationMaritalStatus==3">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.frlhz">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.frlhz" fileVal='frlhz' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="jhico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传离婚证</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='frlhz'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="结婚证" name="iszcy" v-else>
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.frjhz">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.frjhz" fileVal='frjhz' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="jhico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传结婚证</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='frjhz'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
				</view>
				<!-- * 户口簿信息-->
				<view class="addtit mt3"><text>*</text>户口簿信息</view>
				<view class="bgf plr12">
					<uni-forms-item label="户口簿首页" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.frhkbsy">
								<lsj-upload ref="lsjUpload" childId="frhkbsy"  :fileName="jcfjobj.frhkbsy" fileVal='frhkbsy' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="hkico" class="bgimg"></image>
										<!-- <block v-for="(ite,idx) in filelist" :key='idx'>
											<image v-if="ite.type=='frhkbsy'&&ite.bigType=='a'" :src="baseUrl+ite.url" class="bgimga"></image>
										</block> -->
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传户口簿第一页</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='frhkbsy'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="户口簿单页" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.frhkbbry">
								<!-- 法人户口簿每一页 -->
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.frhkbbry" fileVal='frhkbbry' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="hkico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传户口簿每一页</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='frhkbbry'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
							<!-- <view class="phoboxa">
								<view class="photop">
									<image :src="hkico" class="bgimg"></image>
									<image :src="phoicon" class="addimg"></image>
								</view>
								<view class="photit atit">上传户口簿配偶页</view>
							</view> -->
						</view>
					</uni-forms-item>
				</view>
			</view>
			<!-- 反担保人信息 -->
			<view v-show="stepval==3">
				<!--  担保类型 -->
				<view class="addtit mt3"><text>*</text>担保类型</view>
				<view class="bgf plr12">
					<uni-forms-item label="担保类型" name="guaranteeType">
						<view class="lbtabp" @click="getRecorddwFn">
							<view v-if="datainfo.guaranteeType&&!dblx">{{statusFormats(datainfo.guaranteeType,dblxlist,'dblx')}}</view>
							<view v-else :class="dblx?'':'coa'">{{dblx||"请选择担保类型"}}</view>
							<image :src="hrimg" class="rimg"></image>
						</view>
					</uni-forms-item>
					<!-- <picker  range-key='label' :value="dblxidx" :range="dblxlist" class=""  @change='bindDateChangee'>
						<uni-forms-item label="担保类型" name="guaranteeType">
							<view class="lbtabp">
								<view v-if="datainfo.guaranteeType&&!dblx">{{statusFormat(datainfo.guaranteeType,dblxlist,'dblx')}}</view>
								<view v-else :class="dblx?'':'coa'">{{dblx||"请选择担保类型"}}</view>
								<image :src="hrimg" class="rimg"></image>
							</view>
						</uni-forms-item>
					</picker> -->
				</view>
				<!-- 反担保人基本信息 v-if="datainfo.guaranteeType==2"-->
				<block>
					<view class="addtit mt3"><text>*</text>反担保人基本信息</view>
					<view class="bgf plr12">
						<uni-forms-item label="身份证" name="iszcy">
							<view class="phobox">
								<view class="phoboxa" v-if="jcfjobj.fdbrsfzrmx">
									<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.fdbrsfzrmx" fileVal='fdbrsfzrmx' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="gdformats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="ponuploadEnd" >
										<view class="photop">
											<image :src="cardz" class="bgimg"></image>
											<image v-if="datainfo.guaranteeFront" :src="baseUrl+datainfo.guaranteeFront" class="bgimga"></image>
											<image :src="phoicon" class="addimg"></image>
										</view>
									</lsj-upload>
									<view class="frdelimg" v-if="datainfo.guaranteeFront" @click.stop="getDelfdbfzpo('front')">
										<image :src="fdelimg"></image>
									</view>
									<view class="photit atit">上传人像面</view>
								</view>
								<view class="phoboxa" v-if="jcfjobj.fdbrsfzghm">
									<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.fdbrsfzghm" fileVal='fdbrsfzghm' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size"  :formats="gdformats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="ponuploadEnd" >
										<view class="photop">
											<view class="photop">
												<image :src="cardf" class="bgimg"></image>
												<image v-if="datainfo.guaranteeBack" :src="baseUrl+datainfo.guaranteeBack" class="bgimga"></image>
												<image :src="phoicon" class="addimg"></image>
											</view>
										</view>
									</lsj-upload>
									<view class="frdelimg" v-if="datainfo.guaranteeBack" @click.stop="getDelfdbfzpo('back')">
										<image :src="fdelimg"></image>
									</view>
									<view class="photit">上传国徽面</view>
								</view>
							</view>
						</uni-forms-item>
						<uni-forms-item label="姓名" name="guaranteeName">
							<uni-easyinput v-model="datainfo.guaranteeName" disabled :inputBorder='false' placeholder="自动识别" />
						</uni-forms-item>
						<uni-forms-item label="身份证号" name="guaranteeIdCard">
							<uni-easyinput v-model="datainfo.guaranteeIdCard" disabled :inputBorder='false' placeholder="自动识别" />
						</uni-forms-item>
						<uni-forms-item label="手机号码" name="guaranteePhone">
							<uni-easyinput v-model="datainfo.guaranteePhone" type="number" :inputBorder='false' placeholder="请输入手机号码" />
						</uni-forms-item>
					</view>
				</block>
				<!-- * 反担保人信用担保证明-->
				<view class="addtit mt3">反担保人信用担保证明</view>
				<view class="bgf plr12">
					<uni-forms-item name="iszcy">
						<view class="labtxt">个人工作证明
							<text>(选填)</text>
						</view>
						<view class="phobox" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
							<view class="phoboxa" v-if="jcfjobj.fdbrgrgzzm">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.fdbrgrgzzm" fileVal='fdbrgrgzzm' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">公职人员上传个人工作证明</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='fdbrgrgzzm'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="身份证复印件" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.fdbrsfzfyj">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.fdbrsfzfyj" fileVal='fdbrsfzfyj' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="cardz" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传身份证复印件</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='fdbrsfzfyj'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="个人征信报告" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.fdbrgrzxbg">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.fdbrgrzxbg" fileVal='fdbrgrzxbg' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传个人征信报告</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='fdbrgrzxbg'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
				</view>
				<!-- 企业反担保 -->
				<view class="addtit mt3">企业反担保证明</view>
				<view class="bgf plr12">
					<picker  range-key='shareholderName' :value="qyidx" :range="qygdlist" class="isborder"  @change='bindDateChangeg'>
						<uni-forms-item label="企业名称" name="guaranteeShareholderName">
							<view class="lbtabp">
								<view class="chtit" :class="datainfo.guaranteeShareholderName?'':'coa'">{{datainfo.guaranteeShareholderName||"请选择关联企业"}}</view>
								<image :src="hrimg" class="rimg"></image>
							</view>
						</uni-forms-item>
					</picker>
					<uni-forms-item name="iszcy">
						<view class="labtxt">营业执照</view>
						<view class="phobox" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
							<view class="phoboxa" v-if="jcfjobj.fdbqyyyzz">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.fdbqyyyzz" fileVal='fdbqyyyzz' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="zico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传企业营业执照</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='fdbqyyyzz'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
					<uni-forms-item label="企业征信" name="iszcy">
						<view class="phobox">
							<view class="phoboxa" v-if="jcfjobj.fdbqyzx">
								<lsj-upload ref="lsjUpload" childId="upload1" :fileName="jcfjobj.fdbqyzx" fileVal='fdbqyzx' bigType="a" :width="pwidth" :height="pheight" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="onuploadEnd" >
									<view  class="photop" >
										<image :src="cardz" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
									</view>
								</lsj-upload>
								<view class="photit atit">上传企业征信</view>
							</view>
							<block v-for="(ite,idx) in filelist" :key='idx'>
								<view class="phoboxa" v-if="ite.type=='fdbqyzx'&&ite.bigType=='a'">
									<view class="photop" @click="getDown(ite.url)">
										<image :src="lookico" class="bgimg"></image>
										<image :src="phoicon" class="addimg"></image>
										<image :src="delimg" class="delimg" @click.stop="getDelFj(idx)"></image>
									</view>
									<view class="photit">{{ite.name}}</view>
								</view>
							</block>
						</view>
					</uni-forms-item>
				</view>
			</view>
			<!-- 添加附件 -->
			<view v-show="stepval==4">
				<!--  附件信息 -->
				<view class="addtit mt3">
					<view @click="getDbclFn" class="flexc">附件信息<image :src="ywicon" class="ywimg"></image></view>
				</view>
				<block v-for="(ite,idx) in sbfjlist" :key="ite.val">
					<!-- 委托担保申请书 -->
					<!-- <view class="bgf plr12 mb12" v-if="ite.val=='wtdbsqs'||ite.val=='gdhyjy'">
						<view class="fjbox">
							<view class="fjtop flext">
								<view class="ftit"><text>*</text>{{ite.label}}<text class="mtxt">(须面签)</text></view>
								<view class="fbtns cof64" @click="getExportMb(ite)">
									<image :src="downimg" class="downimg"></image>下载模板
								</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image>
										<view>{{'上传附件'}}</view>	
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view> -->
					<view class="bgf plr12" v-if="ite.val=='syndcwbb'||ite.val=='syndsjbg'">
						<view class="fjbox" :class="ite.val!='syndsjbg'?'isborder':''">
							<view class="fjtop flext">
								<view class="ftit"><text v-if="ite.val=='syndcwbb'">*</text>{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- {{ite.fjlist&&ite.fjlist.length?'重新上传':'上传附件'}} -->
					<view class="bgf plr12" v-if="ite.val=='dqcwbb'&&datainfo.applicationType==1">
						<view class="fjbox isborder">
							<view class="fjtop flext">
								<view class="ftit"><text>*</text>{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view class="bgf plr12 mt12" v-if="ite.val=='nszm'">
						<view class="fjbox isborder">
							<picker  range-key='text' :value="sfidx" :range="sfList"  @change='bindDateChangef'>
								<view class="fjtop flexc chek">
									<view class="ftit"><text>*</text>是否免税企业</view>
									<view v-if="datainfo.isDuty">{{datainfo.isDuty=='Y'?'是':'否'}}</view>
									<view v-else class="coa">请选择是/否</view>
									<!-- <view :class="datainfo.isDuty?'':'coa'">{{msqy||"请选择是/否"}}</view> -->
									<image :src="hrimg" class="rimg"></image>
								</view>
							</picker>
						</view>
						<view class="fjbox isborder">
							<view class="fjtop flext">
								<view class="ftit">{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view class="bgf plr12 " v-if="ite.val=='jsyyhdzd'">
						<view class="fjbox">
							<view class="fjtop flext">
								<view class="ftit">{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 主要账户银行流水 -->
					<view class="mt12" v-if="ite.val=='zyzhyhls'">
						<view class="bgf plr12 " >
							<view class="fjbox">
								<view class="fjtop flext">
									<view class="ftit"><text>*</text>{{ite.label}}</view>
									<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="fjonuploadEnd" >
										<view class="fbtns co0a" :style="{width: width,height: height}">
											<image :src="upimg"></image><view>上传附件</view>
										</view>
									</lsj-upload>
								</view>
								<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
									<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
										<view class="flext" @click="getDown(fite.url)">
											<view class="imgl"><image :src="filico" ></image></view>
											<view class="tit">{{fite.name}}</view>
										</view>
										<!-- 删除 -->
										<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
											<image :src="fdelimg"></image>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="addtit tips">提供能够反映企业资金流向的法人或控股股东不低于半年的个人 主要账户银行流水</view>
					</view>
					<view class="bgf plr12 " :class="ite.val=='gxht'?'isborder':''" v-if="ite.val=='gxht'|| ite.val=='dqcsxmqkzm'">
						<view class="fjbox">
							<view class="fjtop flext">
								<view class="ftit"><text>*</text>{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 企业基本注册信息查询单 -->
					<view class="bgf plr12 mt12 mb12" v-if="ite.val=='qyjbzcxxcxd'">
						<view class="fjbox">
							<view class="fjtop flext">
								<view class="ftit"><text>*</text>{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 企业固定资产证明 -->
					<view class="bgf plr12 " v-if="ite.val=='qygdzczm'||ite.val=='frzczmfc'||ite.val=='frzczmdc'||ite.val=='frzczmcl'">
						<view class="fjbox" :class="ite.val!='frzczmcl'?'isborder':''">
							<view class="fjtop flext">
								<view class="ftit">{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>			
					<!-- 反担保抵(质)押物复印件 -->
					<view class="mt12" v-if="ite.val=='fdbdyfyj'">
						<view class="bgf plr12 " >
							<view class="fjbox">
								<view class="fjtop flext">
									<view class="ftit">{{ite.label}}</view>
									<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="fjonuploadEnd" >
										<view class="fbtns co0a" :style="{width: width,height: height}">
											<image :src="upimg"></image><view>上传附件</view>
										</view>
									</lsj-upload>
								</view>
								<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
									<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
										<view class="flext" @click="getDown(fite.url)">
											<view class="imgl"><image :src="filico" ></image></view>
											<view class="tit">{{fite.name}}</view>
										</view>
										<!-- 删除 -->
										<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
											<image :src="fdelimg"></image>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="addtit tips">机械设备需提供发票原件；若上传附件，后期则需提供证明</view>
					</view>
					<!-- 代理相关品牌授权书 -->
					<view class="bgf plr12 " v-if="ite.val=='dlxgcpsqs'||ite.val=='dlxgppht'">
						<view class="fjbox isborder">
							<view class="fjtop flext">
								<view class="ftit">{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 反担保抵(质)押物复印件 -->
					<view  v-if="ite.val=='scjyxkzgy'">
						<view class="bgf plr12 " >
							<view class="fjbox">
								<view class="fjtop flext">
									<view class="ftit">{{ite.label}}</view>
									<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
										    @progress="" @uploadEnd="fjonuploadEnd" >
										<view class="fbtns co0a" :style="{width: width,height: height}">
											<image :src="upimg"></image><view>上传附件</view>
										</view>
									</lsj-upload>
								</view>
								<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
									<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
										<view class="flext" @click="getDown(fite.url)">
											<view class="imgl"><image :src="filico" ></image></view>
											<view class="tit">{{fite.name}}</view>
										</view>
										<!-- 删除 -->
										<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
											<image :src="fdelimg"></image>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="addtit tips">例如：塑料包装行业《印刷经营许可证》、食品卫生行业《卫生 许可证》、环保达标认定表原件(工业)</view>
					</view>
					<!--  纳税申报表 -->
					<view class="bgf plr12 mb12" v-if="ite.val=='sdffpyn'||ite.val=='rggzb'||ite.val=='nssbb'">
						<view class="fjbox">
							<view class="fjtop flext">
								<view class="ftit"><text>*</text>{{ite.label}}</view>
								<lsj-upload ref="lsjUpload" :fileName="ite.label" :fjidx='idx' :fileVal='ite.val' bigType="b" childId="upload1" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
									    @progress="" @uploadEnd="fjonuploadEnd" >
									<view class="fbtns co0a" :style="{width: width,height: height}">
										<image :src="upimg"></image><view>上传附件</view>
									</view>
								</lsj-upload>
							</view>
							<view class="mt8" v-if="ite.fjlist&&ite.fjlist.length">
								<view class="fjlists" v-for="(fite,fidx) in ite.fjlist">
									<view class="flext" @click="getDown(fite.url)">
										<view class="imgl"><image :src="filico" ></image></view>
										<view class="tit">{{fite.name}}</view>
									</view>
									<!-- 删除 -->
									<view class="delimg flex0" @click.stop="getDelsbFj(idx,fidx)">
										<image :src="fdelimg"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
				</block>
			</view>	
		</uni-forms>
		<!-- btnd -->
		<view class="addbtns" v-if="ftype">
			<view class="addlbtn" @click="getZanFn">
				<image :src="zancio" class="addlbtna"></image>
				<view class="addlbtnb">暂存</view>
			</view>
			<view class="addrbtn bga" @click="getPreFn" v-if="stepval>1">上一步</view>
			<view class="addrbtn bgb" @click="getNextFn" v-if="stepval<4">下一步</view>
			<view class="addrbtn bgb" @click="getSubmit" v-if="stepval==4">提交</view>
		</view>
		<cover-view class="addbtns" v-else>
			<cover-view class="addlbtn" @click="getZanFn">
				<cover-image :src="zancio" class="addlbtna" @click.stop="getZanFn"></cover-image>
				<cover-view class="addlbtnb" @click.stop="getZanFn">暂存</cover-view>
			</cover-view>
			<cover-view class="addrbtn bga" @click="getPreFn" v-if="stepval>1">上一步</cover-view>
			<cover-view class="addrbtn bgb" @click="getNextFn" v-if="stepval<4">下一步</cover-view>
			<cover-view class="addrbtn bgb" @click="getSubmit" v-if="stepval==4">提交</cover-view>
		</cover-view>
		<block v-if="lookflag">
			<view class="bgbox" @click="lookflag=false" ></view>
			<image :src="lookico" class="looimg" @click="getPreview(lookico)"></image>
		</block>
		<!-- 放弃编辑 -->
		<!-- #ifdef MP-WEIXIN -->
		<view class="edit editcir" v-if="ftype" @click="getGiveupFn">
			<image :src="feditimg"></image>
			放弃编辑
		</view>
		<cover-view class="edit editcir" v-else @click="getGiveupFn">
			<cover-image :src="feditimg" @click.stop="getGiveupFn" class="img"></cover-image>
			<cover-view @click.stop="getGiveupFn" class="txt">放弃编辑</cover-view>
		</cover-view>
		<!-- #endif -->
		<!-- 选择担保类型 -->
		<bartree-pickerfixed ref="treePickerzrdw" deptType='1' :multiple='true' @select-change="selectChangezrdw" title="选择担保类型"
		:localdata="dblxlist" :checkVal='datainfo.guaranteeType'  valueKey="value" textKey="label" childrenKey="children"></bartree-pickerfixed>
		<!--附件 remark==1  后台生成的pdf,自己删除 -->
		<pop-up :type='ftype' :xwimgList="xwimgList" :content="content" @getClose='getClose'></pop-up>
	</view>
</template>

<script>
	import config from '@/config'
	const baseUrl = config.baseUrl
	const baseUrlimg=config.baseUrlimg
	const baseName = config.baseName
	import self from '@/utils/location.js';
	import popUp from "@/work/components/popup/popup.vue"
	import stepBar from "@/components/toptab/stepbar.vue"
	import { getToken } from '@/utils/auth'
	import {getApplicationNum,getApplicationZc,getApplicationAdd,getApplicationDet,getApplicationEdit,getExportMb,getDocumentList,getGdlistNoPage} from "@/api/mine/work.js"
	import {getQyListNoPage,getOcrIdCard,getIdCardDet,getOcrBusinessLicense} from "@/api/mine/card.js"
	import {uploadmore,selectValueKey,showConfirm} from '@/utils/common.js'
	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
	import {getDictionaryFn} from "@/api/mine/register.js"
	import bartreePickerfixed from "@/components/ba-tree-picker/ba-tree-pickerfixed.vue"
	// 340622185605234521
	export default{
		components:{stepBar,popUp,bartreePickerfixed},
		data(){
			return{
				//附件
				option: {
				    // 上传服务器地址，需要替换为你的接口地址
				    url: baseUrl+'/common/uploadNew', // 该地址非真实路径，需替换为你项目自己的接口地址
				    // 上传附件的key
				    name: 'file',
				     // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
				    header: {
				        // 示例参数可删除
				        'Authorization':  'Bearer ' + getToken(),
				    },
				    // 根据你接口需求自定义body参数
				    formData: {
						loanApplicationNumber:'',
					}
				},
				gdformats: 'png,jpg,jpeg',
				// 选择文件后是否立即自动上传，true=选择后立即上传
				instantly: true,
				// 必传宽高且宽高应与slot宽高保持一致
				width: '',
				height: '100rpx',
				pwidth:'200rpx',
				pheight:'126rpx',
				// 限制允许上传的格式，空串=不限制，默认为空
				formats: 'doc,docx,xls,xlsx,ppt,txt,pdf,zip,rar,word,png,jpg,jpeg',
				// 文件上传大小限制
				size: 100,
				// 文件数量限制 默认10
				count: 5,
				// 文件回显列表
				files: new Map(),
				// 微信小程序Map对象for循环不显示，所以转成普通数组，不要问为什么，我也不知道
				wxFiles: [],
				// 是否打印日志
				debug: false,
				filelist:[],
				gdfilelist:[],//股东附件列表
				
				backimg:require("@/work/static/images/back.png"),
				feditimg:require("@/work/static/images/fedit.png"),
				hrimg:require('@/work/static/images/hrimg.png'),
				ywicon:require('@/work/static/images/busin/ywicon.png'),
				delimg:require('@/work/static/images/del.png'),
				lookico:require('@/work/static/images/busin/lookico.png'),
				phoicon:require('@/work/static/images/busin/phoicon.png'),
				zico:require('@/work/static/images/busin/zico.png'),
				cardz:require('@/work/static/images/busin/cardz.png'),
				cardf:require('@/work/static/images/busin/cardf.png'),
				addgd:require('@/work/static/images/busin/addgd.png'),
				jhico:require('@/work/static/images/busin/jhico.png'),
				hkico:require('@/work/static/images/busin/hkico.png'),
				zancio:require('@/work/static/images/zancio.png'),
				downimg:require('@/work/static/images/down.png'),
				upimg:require('@/work/static/images/fup.png'),
				filico:require('@/work/static/images/filico.png'),
				fdelimg:require('@/work/static/images/del.png'),
				steps:[{tit:'申请额度',status:0},{tit:'企业信息',status:1},{tit:'法人信息',status:2},{tit:'反担保人信息',status:3},{tit:'添加附件',status:4},],
				stepval:1,
				datainfo:{
					// qymcid:1,
					// hylx:'',
					// hylxid:'',
					// iszcy:'0',
			        // "loanApplicationId": 1,//贷款申请id
			        "loanApplicationNumber": "",//贷款申请编号
			        'applicationType':'',//申请类型 1：企业 2：个人
					"applicationAmount": '',//申请额度(万元)
			        "applicationBank": "",//申请银行
			        "usagePeriod": "",//使用期限(月)
			        "purposeFunds": "",//资金用途
			        "repaymentSource": "",//还款来源
			        "enterpriseName": "",//企业名称
					"enterpriseId":"",//企业信息id
			        "categoryType": "",//行业类型
			        "isMake": "Y",//是否是制造业 
			        "isNew": "Y",//是否是精特新
			        "isSmall": "Y",//是否是小微企业
			        "isDuty": "",//是否是免税企业
			        "companyIntroduction": "",//公司简介
			        "customerType": "",//用户类型
			        "corporationFront": "",//法人身份证正面
			        "corporationBack": "",//法人身份证反面
			        "corporationName": "",//	法人姓名
			        "corporationIdCard": "",//法人身份证号
			        "corporationPhone": "",//	法人手机号
			        "familyPopulation": "",//家庭人口数
			        "corporationJob": "",//法人职业
			        "isLoan": "",//有无贷款
			        "receivablePay": "",//应收应付款
			        "businessSituation": "",//经营情况
			        "businessEfficiency": "",//经营效益
			        "corporationMaritalStatus": "",//法人婚姻状态
			        "spouseFront": "",//配偶身份证正面
			        "spouseBack": "",//配偶身份证反面
			        "spouseName": "",//配偶姓名
			        "spouseIdCard": "",//配偶身份证号
			        "spousePhone": "",//配偶手机号
			        "guaranteeType": "",//担保类型
			        "guaranteeFront": "",//反担保人身份证正面
			        "guaranteeBack": "",//反担保人身份证反面
			        "guaranteeName": "",//反担保人姓名
			        "guaranteeIdCard": "",//反担保人身份证号
			        "guaranteePhone": "",//反担保人手机号
			        // "guaranteeMaritalStatus": "",//反担保人婚姻状态
			        // "guaranteeSpouseFront": "",//反担保人配偶身份证正面
			        // "guaranteeSpouseBack": "",//反担保人配偶身份证反面
			        // "guaranteeSpouseName": "",//反担保人配偶姓名
			        // "guaranteeSpouseIdCard": "",//反担保人配偶身份证号
			        // "guaranteeSpousePhone": "",//反担保人配偶手机号
			        // "userId": '',//申请人用户ID
			        // "idCard": "",//申请人身份证号码
			        // "applicationTime": "",//申请时间
			        // "fileTime": "",//归档时间
			        // "loanSchedule": "",//贷款申请进度(业务进度表查询进度列表)：1：申报提交2：业务审核/分配 3：担保初审 4：尽职调查 5：初审风险合规 6：评审会 7：合同签约 8：放款合规风险审核 9：放款通知 10：归档
			        // "loanScheduleName": '',//贷款申请进度名称(中文字)
			        // "auditSchedule": "",//审核进度1：担保初审 2：A角色审核 3：B角色审核 4：风险审核 5：尽职调查 6：上会评审
			        // "auditType": "",//审核状态 1：待审核 2：已通过 3：未通过
			        // "loanApplicationType": "",//贷款申请状态 1：暂存 2：正常 3：回收站 4：归档
			        // "aUserId": "",//A角色用户ID
			        // "aUserName": "",//A角色用户名称
			        // "bUserId": '',//B角色用户ID
			        // "bUserName": '',//B角色用户名称
			        "shareholderFjList": [],//全体股东信息附件
			        "loanApplicationFjList": [],//相关附件
			        "loanApplicationFjIdList": [],//fj删除id集合
			        "shareholderFjIdList": [],//股东fj表股东整体删除id集合
					"basicFj":{},//基础附件
					"declareFj":{},//申报附件
					"fileFj":{},//文件出具
					"otherFj":{},//其他附件
				},
				qymc:'',
				msqy:'',
				qyidx:0,
				ywidx:0,
				categoryId:'',//行业的id
				rules:{
				},
				gdlist:[{cardz:'',cardf:'',zxurl:[],zhizhao:[],shareholderName:"",shareholderIdCard:'',}],
				qylist:[],//企业列表
				sfList:[{text: '是',value: 'Y'},{text: '否',value: 'N'}],
				ywList:[{label: '有',value: 'Y'},{label: '无',value: 'N'}],
				actcolor:'#00A9F0',
				sqtype:'qy',//个人gr ,企业 qy,
				hyztlist:[],//婚姻状态
				yhlxlist:[],//用户类型
				dblxlist:[],//担保类型
				lookflag:false,
				listTop:70,
				userId:this.$store.state.user.userId,
				categoryId:"",//行业类型id;
				jcfjlist:[],//基础附件
				sbfjlist:[],//申报附件
				wjfjlist:[],//文件出具
				jcfjobj:{},//基础附件
				shareholderFjList:[],//全体股东信息附件
				loanApplicationFjList:[],//相关附件
				ftype:'',//弹窗type
				baseUrl:'',
				dblx:'',
				yhlx:'',
				frhyzk:'',//婚姻状况
				dblxidx:0,
				yhlxidx:0,
				sfidx:0,
				frhyzkidx:0,
				btfiles:[
					{tit:'公司章程',type:'gszc'},
					{tit:'开户许可证',type:'khxkz'},{tit:'申请企业征信报告',type:'sqqyzxbg'},{tit:'关联企业征信报告',type:'glqyzxbg'},{tit:'企业法人征信报告',type:'qyfrzxbg'},{tit:'实际控股人征信报告',type:'sjkgrzxbg'},
				{tit:'户口簿首页',type:'frhkbsy'},
				],
				sqbtfiles:[
				{tit:'上一年度财务报表',type:'syndcwbb'},{tit:'主要账户银行流水',type:'zyzhyhls'},{tit:'购销合同',type:'gxht'},
				{tit:'当前从事项目情况证明',type:'dqcsxmqkzm'},{tit:'企业基本注册信息查询单',type:'qyjbzcxxcxd'},{tit:'水电费发票（一年）',type:'sdffpyn'},{tit:'人员工资表',type:'rggzb'},{tit:'纳税申报表',type:'nssbb'},
				],
				content:'',//小微企业富文本
				xwimgList:[],//小微企业图片
				ptype:'add',
				id:'',//申请id
				declareFj:{},//
				// {tit:'法人结婚证',type:'frjhz'},{tit:'法人离婚证',type:'frlhz'},
				// {tit:'法人配偶身份证人面像',type:'frsfzpormx'},{tit:'法人配偶身份证国徽面',type:'frsfzpoghm'},
				//担保类型为反担保人担保{tit:'反担保人身份证人面像',type:'fdbrsfzrmx'},{tit:'反担保人身份证国徽面',type:'fdbrsfzghm'},
				//担保类型为抵押{tit:'企业固定资产证明',type:'qygdzczm'},
				ischange:false,
				isdetail:false,
				qygdlist:[],//企业股东列表
				dfdwpicker: {
					title: '选择担保类型',
					layer: null,
					titflag:true,
					data: []
				},
				loadflag:false,
				fjdelIdList:[],//fj删除id集合
				gdFjdelIdList:[],//股东fj表股东整体删除id集合
				fjRemarkFj:[],//附件pdf
			}
		},
		onUnload(){
			uni.$off('refreshtalb')
		},
		watch:{
			datainfo:{
				handler(newVal, oldVal) {
					if(this.isdetail){
						this.isdetail=false
					}else{
						this.ischange=true
					}  
				},
				deep: true
			},
		},
		onBackPress(e) {
			var that=this;
			if(this.ischange){
				var a=0;
				showConfirm('内容已做修改，是否暂存').then(res => {
				  if (res.confirm) {  
				    this.getZanFn('back')
				  }else{
					 this.ischange=false;
					 uni.navigateBack({
					 	delta:1
					 })
					 return false
				  }
				})
				return true
			}else{
				return false
				uni.navigateBack({
					delta:1
				})
			}
			
		},
		onLoad(e) { 
			// this.getIdCardDet()
			// return
			this.baseUrl=baseUrl
			var data=JSON.parse(decodeURIComponent(e.data))
			if(data.type){
				this.ptype=data.type;
				this.id=data.id;
				if(Number(data.val)<4){
					this.stepval=Number(data.val)+1
				}
				this.getDetail()
			}else{
				this.datainfo.applicationAmount=data.applicationAmount;
				this.datainfo.applicationBank=data.applicationBank;
				this.datainfo.usagePeriod=data.usagePeriod;
				this.datainfo.purposeFunds=data.purposeFunds;
				this.datainfo.repaymentSource=data.repaymentSource;
				this.datainfo.applicationType=data.applicationType;
				if(data.applicationType==1){
					var obj={tit:'当期财务报表',type:'dqcwbb'};
					this.sqbtfiles.push(obj)
				}
				this.getNumber();
				this.getSbjListFn()
			}
			uni.$on('refreshtalb', (e) => {	
				this.datainfo.categoryType=e.categoryName
				this.categoryId=e.categoryId
			})
			this.init()
			this.getQylist()
			this.getDocumentList()
		},
		mounted() {
			this.getHeightFn()
			// var obj={
			// 	loanApplicationNumber:this.datainfo.loanApplicationNumber
			// }
			// this.option.formData=JSON.parse(JSON.stringify(obj))
			// this.$refs['lsjUpload'].setData('formData.loanApplicationNumber','RZDB202404251759453241637'); 
		},
		methods:{
			checkPermi, checkRole,
			getRecorddwFn(){
				this.$refs.treePickerzrdw._show();
			},
			selectChangezrdw(e){
				var val=e;
				var newArr=[],newVal=[];
				var a=0;
				e.forEach((ite,idx)=>{
					newArr[idx]=ite.deptName
					newVal[idx]=ite.deptId
					if(ite.deptId==4){
						a=1
					}
				})
				this.dblx=newArr.join(',')
				this.datainfo.guaranteeType=newVal.join(',');
				if(a==1){
					this.getGdFjlist()
				}
			},
			getIdCardDet(){
				getIdCardDet(this.userId).then(res=>{
					if(res.code==200){
						
					}
				})
			},
			init(){
				// 用户类型
				getDictionaryFn('customer_type').then(res=>{
					if(res.code==200){
						this.yhlxlist = res.data.map(v => {
							return {
								label: v.dictLabel,
								value: v.dictValue
							}
						})
					}
				})
				// 婚姻状况
				getDictionaryFn('marital_status').then(res=>{
					if(res.code==200){
						this.hyztlist = res.data.map(v => {
							return {
								label: v.dictLabel,
								value: v.dictValue
							}
						})
					}
				})
				// 担保类型
				getDictionaryFn('guarantee_type').then(res=>{
					if(res.code==200){
						this.dblxlist = res.data.map(v => {
							return {
								label: v.dictLabel,
								value: v.dictValue,
							}
						})
					}
				})
				// 基础附件
				getDictionaryFn('application_fj_jc').then(res=>{
					if(res.code==200){
						var obj={}
						var data=res.data;
						data.forEach(v=>{
							obj[v.dictValue]=v.dictLabel
						})
						this.jcfjobj=obj
					}
				})
			},
			getSbjListFn(){
				// 申报附件
				getDictionaryFn('application_fj_sb').then(res=>{
					if(res.code==200){
						var declareFj=this.declareFj;
						this.sbfjlist = res.data.map(v => {
							return {
								label: v.dictLabel,
								val: v.dictValue,
								fjlist:declareFj[v.dictValue]||[]
							}
						})
						let signArr = JSON.parse(JSON.stringify(this.filelist));
						signArr = signArr.filter(s => {
							// if (res.data.find(l => l.dictValue == s.type && l.title == s.title)) return false
							if (res.data.find(l => l.dictValue == s.type)) return false
							else return true;
						})
						this.filelist = signArr;
					}
				})
			},
			getGdFjlist(){
				var params={
					loanApplicationNumber:this.datainfo.loanApplicationNumber
				}
				getGdlistNoPage(params).then(res=>{
					if(res.code==200){
						this.qygdlist=res.data
					}
				})
			},
			getQylist(){
				// 需要userid
				var params={
					userId:this.userId
				}
				getQyListNoPage(params).then(res=>{
					if(res.code==200){
						this.qylist = res.rows.map(v => {
							return {
								label: v.enterpriseName,
								value: v.enterpriseId
							}
						})
					}
				})
			},
			getNumber(){
				getApplicationNum().then(res=>{
					if(res.code==200){
						this.datainfo.loanApplicationNumber=res.data;
						var obj={
							loanApplicationNumber:this.datainfo.loanApplicationNumber
						}
						this.option.formData=JSON.parse(JSON.stringify(obj))
					}
				})
			},
			getHeightFn(){
				let query = uni.createSelectorQuery().in(this);
				var s=uni.getSystemInfoSync().statusBarHeight;
				//需要给黄色区域设置一个id标识，在这里是demo
				query.select('.navtop').boundingClientRect(data => {
					// #ifdef H5
					this.listTop =s ? Number(data.height)*2:(Number(data.height)-20)*2//赋值，待会要用
					// #endif
					// #ifndef H5
					this.listTop = Number(data.height)*2//赋值，待会要用
					// #endif
					
					
				}).exec();
			},
			getDbclFn(){
				this.$tab.navigateTo("/work/pages/prove/dbcltips")
			},
			getBack(){
				// 暂存
				uni.navigateBack({
					delta:1
				})
			},
			getGiveupFn(){
				var that=this;
				uni.showModal({
					title: '放弃编辑',
					content: "是否确认放弃编辑",
					cancelText: '取消',
					confirmText: '确认',
					success: function(res) {
						if (res.confirm) {
							that.$tab.reLaunch('/pages/index/index')
						} else if (res.cancel) {
						}
					}
				});
			},
			getPreFn(){
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 0
				})
				this.stepval=Number(this.stepval)-1
			},
			getNextFn(){
				// 暂不判断必填写完否
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 0
				})
				this.stepval=Number(this.stepval)+1
			},
			getPreview(url) {
				var newArr=[];
				newArr.push(url)
				uni.previewImage({
					urls: newArr,
					current:0,
					success: function(data) {
						
					},
					fail: function(err) {
						
					}
				});
			},
			showImg(){
				this.ftype='fwb'
				// this.lookflag=true
			},
			getClose(){
				this.ftype=''
			},
			getTalbFn(){
				var obj={
					id:this.categoryId,
					name:this.datainfo.categoryType,
				}
				this.$tab.navigateTo('/work/pages/business/talbclass?data='+encodeURIComponent(JSON.stringify(obj)))
			},
			getAddGdFn(){
				var obj = {cardz:'',cardf:'',zxurl:[],zhizhao:[],shareholderName:"",shareholderIdCard:'',}
				this.gdlist.push(obj);
			},
			getdelGdFn(idx,ite){
				var that=this;
				uni.showModal({
					title: '确认删除',
					content: "是否确认删除",
					cancelText: '取消',
					confirmText: '确认',
					success: function(res) {
						if (res.confirm) {
							if(ite.shareholderFjId){
								var id=ite.shareholderFjId;
								that.gdFjdelIdList.push(id)
							}
							that.gdlist.splice(idx,1);
						} else if (res.cancel) {
						}
					}
				});
			},
			statusFormats(ite,list,type){//多选匹配
				if(ite){
					var actions = [];
					list.forEach(s => {
						if(ite.indexOf(s.value)>-1){
							actions.push(s.label);
						}
					})
					return actions.join(',')
				}else{
					return ''
				}
			},
			statusFormat(ite,list,type) {
				var aite=selectValueKey(list, ite);
				if(type=='qy'){
					this.qyidx=aite.key
				}else if(type=='dblx'){
					this.dblxidx=aite.key
				}else if(type=='yhlx'){
					this.yhlxidx=aite.key
				}else if(type=='ywdk'){
					this.ywidx=aite.key
				}else if(type=='msqy'){
					this.sfidx=aite.key
				}else if(type=='frhyzk'){
					this.frhyzkidx=aite.key
					this.frhyzk=aite.actions;
				}
				return aite.actions;
			},
			bindDateChangea(e){
				// 企业信息
				var val=e.detail.value;
				this.datainfo.enterpriseName=this.qylist[val].label;
				this.datainfo.enterpriseId=this.qylist[val].value;
			},
			bindDateChangeb(e){
				// 用户类型
				var val=e.detail.value;
				this.yhlx=this.yhlxlist[val].label;
				this.datainfo.customerType=this.yhlxlist[val].value;
			},
			bindDateChangec(e){
				// 有无贷款
				var val=e.detail.value;
				this.datainfo.isLoan=this.ywList[val].value;
			},
			getDelfzpo(type){
				if(type=='front'){
					this.datainfo.spouseFront="";
					this.datainfo.spouseName="";
					this.datainfo.spouseIdCard="";
				}else{
					this.datainfo.spouseBack="";	
				}	
			},
			getDelfdbfzpo(type){
				if(type=='front'){
					this.datainfo.guaranteeFront="";
					this.datainfo.guaranteeName="";
					this.datainfo.guaranteeIdCard="";
				}else{
					this.datainfo.guaranteeBack="";	
				}	
			},
			bindDateChanged(e){
				// 婚姻状态
				var val=e.detail.value;
				var value=this.hyztlist[val].value;
				var list=this.btfiles;
				if(this.datainfo.corporationMaritalStatus!=value){
					this.frhyzk=this.hyztlist[val].label;
					this.datainfo.corporationMaritalStatus=this.hyztlist[val].value;
					if(value==3){//离异
						// 删除结婚证
						var obj={tit:'法人离婚证',type:'frlhz'}
						const index = list.findIndex(text => text.type === "frjhz");
						if(index!=-1){
							this.btfiles.splice(index,1,obj)
						}else{
							this.btfiles.push(obj)
						}	
					}else if(value==1){//已婚
						// 删除离婚证
						var obj={tit:'法人结婚证',type:'frjhz'}
						const index = list.findIndex(text => text.type === "frlhz");
						if(index!=-1){
							this.btfiles.splice(index,1,obj)
						}else{
							this.btfiles.push(obj)
						}	
					}else{
						// 未婚
						const index = this.btfiles.findIndex(text => text.type === "frlhz");
						if(index!=-1){
							this.btfiles.splice(index,1)
						}
						const indexa = this.btfiles.findIndex(text => text.type === "frjhz");
						if(indexa!=-1){
							this.btfiles.splice(indexa,1)
						}
					}
				}
				
			},
			bindDateChangee(e){
				// 担保类型
				var val=e.detail.value;
				this.dblx=this.dblxlist[val].label;
				this.datainfo.guaranteeType=this.dblxlist[val].value;
				var value=this.dblxlist[val].value;
				var list=this.btfiles;
				var sqlist=this.sqlist;
			},
			// 反担保企业
			bindDateChangeg(e){
				var val=e.detail.value;
				var data=this.qygdlist[val]
				this.datainfo.guaranteeShareholderName=data.shareholderName;
				var obj={
					name:'企业营业执照',
					// oldName:oldName,
					url:data.shareholderBusinessUrl,
					type:'fdbqyyyzz',
					bigType:'a',
				}
				let indices = this.filelist.filter((ite, index) => ite.type!== "fdbqyyyzz")||[]
				indices.push(obj)
				this.filelist=indices
				this.datainfo.loanApplicationFjList=JSON.parse(JSON.stringify(this.filelist))
			},
			// 免税
			bindDateChangef(e){
				var val=e.detail.value;
				// this.dblx=this.sfList[val].text;
				this.datainfo.isDuty=this.sfList[val].value;
			},
			getZanFn(type){
				var that=this;
				if(this.loadflag){
					return
				}
				var params=this.datainfo;
				var gdlist=this.gdlist;
				var shFjList=[]
				Object.keys(gdlist).some((key) => {
					var fjurl={
						shareholderFrontUrl:gdlist[key].cardz,
						shareholderBackUrl:gdlist[key].cardf,
						shareholderZxUrl:gdlist[key].zxurl.join(','),
						shareholderBusinessUrl:gdlist[key].zhizhao.join(','),
						shareholderName:gdlist[key].shareholderName,
						shareholderIdCard:gdlist[key].shareholderIdCard,
						shareholderFjId:gdlist[key].shareholderFjId,
						shareholderZxUrlPdf:gdlist[key].shareholderZxUrlPdf,
						loanApplicationNumber:gdlist[key].loanApplicationNumber,
					} 
					shFjList.push(fjurl)
				})
				params.shareholderFjList=JSON.parse(JSON.stringify(shFjList))
				var flist=JSON.parse(JSON.stringify(this.filelist));
				var sbfjlist=this.sbfjlist;
				sbfjlist.forEach(ite=>{
					if(ite.fjlist&&ite.fjlist.length){
						ite.fjlist.forEach(itet=>{
							flist.push(itet)
						})
						
					}
				})
				if(this.fjRemarkFj&&this.fjRemarkFj.length>0){
					flist=flist.concat(this.fjRemarkFj)
				}
				params.loanApplicationFjList=JSON.parse(JSON.stringify(flist))
				params.loanApplicationFjIdList=JSON.parse(JSON.stringify(this.fjdelIdList))
				params.shareholderFjIdList=JSON.parse(JSON.stringify(this.gdFjdelIdList))
				console.log(this.fjdelIdList,this.gdFjdelIdList,123)
				uni.showLoading({
					title: '加载中'
				});
				this.loadflag=true;
				getApplicationZc(params).then(res=>{
					uni.hideLoading();
					this.loadflag=false;
					if(res.code==200){
						this.ischange=false;
						
						// 刷新列表
						setTimeout(function(){
							if(that.ptype=='add'){
								that.$toast('暂存成功')
								that.$tab.reLaunch('/pages/index/index') 
							}else{
								that.$toast('暂存成功，请稍后重新刷新')
								uni.$emit('refreshywlist')
								if(type&&type=='back'){
									uni.navigateBack({
										delta:1
									})
								}
							}
						},1200)
					}
				})
			},
			getDetail(){
				getApplicationDet(this.id).then(res=>{
					if(res.code==200){
						this.datainfo=res.data;
						this.isdetail=true;
						if(res.data&&res.data.applicationType==1){
							var obj={tit:'当期财务报表',type:'dqcwbb'};
							this.sqbtfiles.push(obj)
						}
						var data=res.data;
						var obj={
							loanApplicationNumber:res.data.loanApplicationNumber
						}
						this.option.formData=JSON.parse(JSON.stringify(obj))
						
						if(data.loanApplicationFjList){
							// 筛除自动生成的附件
							var filterlist=JSON.parse(JSON.stringify(data.loanApplicationFjList))
							var fjRemarkFj=[]
							this.filelist=filterlist.filter((ite) => {
								if(ite.remark==1){
									fjRemarkFj.push(ite)
								}
								return ite.remark!=1;
							})
							this.fjRemarkFj=JSON.parse(JSON.stringify(fjRemarkFj));
							console.log(fjRemarkFj,1)
							// this.filelist=JSON.parse(JSON.stringify(data.loanApplicationFjList))
						}
						if(data.declareFj){
							var declareFj=data.declareFj;
							Object.keys(declareFj).some((key) => {
								declareFj[key]=declareFj[key].filter((ite) => {
									return ite.remark!=1
								})
							})
							this.declareFj=JSON.parse(JSON.stringify(declareFj));
							// this.declareFj=data.declareFj;
						}
						if(data.shareholderFjList){
							var shFjList=[]
							var gdlist=data.shareholderFjList;
							Object.keys(gdlist).some((key) => {
								var fjurl={
									shareholderFjId:gdlist[key].shareholderFjId,
									cardz:gdlist[key].shareholderFrontUrl,
									cardf:gdlist[key].shareholderBackUrl,
									zxurl:[],
									zhizhao:[],
									shareholderName:gdlist[key].shareholderName,
									shareholderIdCard:gdlist[key].shareholderIdCard,
									shareholderZxUrlPdf:gdlist[key].shareholderZxUrlPdf,
									loanApplicationNumber:gdlist[key].loanApplicationNumber,
								}
								if(gdlist[key].shareholderZxUrl){
									fjurl.zxurl=gdlist[key].shareholderZxUrl.split(',')
								}
								if(gdlist[key].shareholderBusinessUrl){
									fjurl.zhizhao=gdlist[key].shareholderBusinessUrl.split(',')
								}
								shFjList.push(fjurl)
							})
							this.gdlist=JSON.parse(JSON.stringify(shFjList))
						}
						this.getSbjListFn()
						this.getGdFjlist()
					}
				})
			},
			getSubmit(){
				var that=this;
				if(this.loadflag){
					return
				}
					// 判断附件是否完整
				var params=this.datainfo;
				if(!params.enterpriseName){
					this.$toast("请选择企业名称")
					return
				}
				if(!params.categoryType){
					this.$toast("请选择行业类型")
					return
				}
				if(!params.customerType){
					this.$toast("请选择用户类型")
					return
				}
				if(!params.corporationFront){
					this.$toast("请上传法人身份证人面像")
					return
				}
				if(!params.corporationBack){
					this.$toast("请上传法人身份证国徽面")
					return
				}
				if(!params.isLoan){
					this.$toast("请选择有无贷款")
					return
				}
				if(!this.frhyzk){
					this.$toast("请选择婚姻状态")
					return
				}
				if(params.corporationMaritalStatus==1){
					if(!params.spouseFront){
						this.$toast("请上传配偶身份证人像面")
						return
					}
					if(!params.spouseBack){
						this.$toast("请上传配偶身份证国徽面")
						return
					}
				}
				
				if(!params.guaranteeType){
					this.$toast("请选择担保类型")
					return
				}
				if(!params.corporationPhone){
					// 验证手机号
					this.$toast("请输入法人手机号")
					return
				}
				
				let regphone = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
				if (params.corporationPhone && !regphone.test(params.corporationPhone)) {
					that.$toast("请输入正确的法人手机号")
					return
				}
				
				var gdlist=this.gdlist;
				var shFjList=[]
				var a=0;
				Object.keys(gdlist).some((key) => {
					var str="请上传股东"+(Number(key)+1)
					if(gdlist[key].zhizhao<1 && !gdlist[key].cardz){
						a=1;
						that.$toast(str+'营业执照或者身份证')
						return true;
					}else{
						if(gdlist[key].cardz){
							if(!gdlist[key].cardf){
								a=1;
								that.$toast(str+'身份证国徽面')
								return true;
							}
						}
					}
					
					// if(!gdlist[key].cardz){
					// 	a=1;
					// 	that.$toast(str+"身份证人像面")
					// 	return true;
					// }else if(!gdlist[key].cardf){
					// 	a=1;
					// 	that.$toast(str+'身份证国徽面')
					// 	return true;
					// }
					
					 if(gdlist[key].zxurl<1){
						a=1;
						that.$toast(str+'征信报告')
						return true;
					}
					var fjurl={
						shareholderFrontUrl:gdlist[key].cardz,
						shareholderBackUrl:gdlist[key].cardf,
						shareholderZxUrl:gdlist[key].zxurl.join(','),
						shareholderBusinessUrl:gdlist[key].zhizhao.join(','),
						shareholderName:gdlist[key].shareholderName,
						shareholderIdCard:gdlist[key].shareholderIdCard,
						shareholderFjId:gdlist[key].shareholderFjId,
						shareholderZxUrlPdf:gdlist[key].shareholderZxUrlPdf,
						loanApplicationNumber:gdlist[key].loanApplicationNumber,
					} 
					shFjList.push(fjurl)
				})
				params.shareholderFjList=JSON.parse(JSON.stringify(shFjList))
				if(a==1){
					return
				}
				var flist=JSON.parse(JSON.stringify(this.filelist));
				var btfiles=JSON.parse(JSON.stringify(this.btfiles));
				var sqbtfiles=JSON.parse(JSON.stringify(this.sqbtfiles));
				if(params.guaranteeType.indexOf('1')>-1){//抵押担保
					var obj={tit:'企业固定资产证明',type:'qygdzczm'}
					sqbtfiles.push(obj)
				}
				if(params.guaranteeType.indexOf('2')>-1){//反担保人担保
					// 选择担保人担保
					if(!params.guaranteePhone){
						// 验证手机号
						this.$toast("请输入反担保人手机号")
						return
					}
					if (params.guaranteePhone && !regphone.test(params.guaranteePhone)) {
						that.$toast("请输入正确的反担保人手机号")
						return
					}
					if(!params.guaranteeFront){
						this.$toast("请上传法人身份证人面像")
						return
					}
					if(!params.guaranteeBack){
						this.$toast("请上传法人身份证国徽面")
						return
					}
				}
				if(params.guaranteeType.indexOf('3')>-1){//企业保证
					var obj={tit:'反担保抵（质）押复印件',type:'fdbdyfyj'}
					sqbtfiles.push(obj)
				}
				if(params.guaranteeType.indexOf('4')>-1){//企业保证
					var obj={tit:'反担保企业营业执照',type:'fdbqyyyzz'}
					var objb={tit:'反担保企业征信',type:'fdbqyzx'}
					btfiles.push(obj)
					btfiles.push(objb)
				}
				var b=0;
				Object.keys(btfiles).some((key) => {
					if (flist.find(l => l.type == btfiles[key].type)) {
						return false
					}else{
						b=1;
						that.$toast('请上传'+btfiles[key].tit)
						 return true;
					}
				})
				if(b==1){
					return
				}
				if(!params.isDuty){
					this.$toast("请选择是否免税企业")
					return
				}
				var sbfjlist=this.sbfjlist;
				var sbArr=[]
				var c=0;
				Object.keys(sqbtfiles).some((key) => {
					if (sbfjlist.find(l => (l.val == sqbtfiles[key].type) && l.fjlist.length>0)) {
						return false
					}else{
						c=1;
						that.$toast('请上传'+sqbtfiles[key].tit)
						 return true;
					}
				})
				if(c==1){
					return
				}
				sbfjlist.forEach(ite=>{
					if(ite.fjlist&&ite.fjlist.length){
						ite.fjlist.forEach(itet=>{
							flist.push(itet)
						})
					}
				})
				if(this.fjRemarkFj&&this.fjRemarkFj.length>0){
					flist=flist.concat(this.fjRemarkFj)
				}
				params.loanApplicationFjList=JSON.parse(JSON.stringify(flist))
				params.loanApplicationFjIdList=JSON.parse(JSON.stringify(this.fjdelIdList))
				params.shareholderFjIdList=JSON.parse(JSON.stringify(this.gdFjdelIdList))
				console.log(this.fjdelIdList,this.gdFjdelIdList,222)
				if(this.ptype=='add'){
					getApplicationAdd(params).then(res=>{
						if(res.code==200){
							that.ischange=false;
							that.$toast("新增成功")
							setTimeout(function(){
								that.$tab.redirectTo('/work/pages/success')
							},1200)
						}
					})
				}else{
					getApplicationEdit(params).then(res=>{
						if(res.code==200){
							that.ischange=false;
							that.$toast("修改成功")
							setTimeout(function(){
								uni.$emit('refreshywlist')
								uni.navigateBack({
									delta:1
								})
							},1200)
						}
					})
				}
				
				// 
				// this.$tab.navigateTo('/work/pages/success')
			},
			getaddImage(e){
				let that = this;
				let file =[],count=9
				// if(e=='zj'){
				// 	file = that.zjfile;
				// 	count=9
				// }else{
				// 	file = that.mjfile;
				// 	count=9
				// }
				uni.chooseImage({
					count: 1,
					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(',')
								}
							})	
						}
					}
				});
			},
			// 人像面
			ponuploadEnd(item,fileVal,bigType){
				var newobj={}
				var responseText=JSON.parse(item.responseText)
				var url=responseText.fileName
				var urlOnline=responseText.urlOnline
				if(fileVal=='frsfzrmx'){
					this.datainfo.corporationFront=url;
					// 获取姓名 身份证号
					this.getocrIdCard(urlOnline,fileVal)
				}else if(fileVal=='frsfzghm'){
					this.datainfo.corporationBack=url
				}else if(fileVal=='frsfzpormx'){
					this.datainfo.spouseFront=url
					this.getocrIdCard(urlOnline,fileVal)
				}else if(fileVal=='frsfzpoghm'){
					this.datainfo.spouseBack=url
				}else if(fileVal=='fdbrsfzrmx'){
					this.getocrIdCard(urlOnline,fileVal)
					this.datainfo.guaranteeFront=url
				}else if(fileVal=='fdbrsfzghm'){
					this.datainfo.guaranteeBack=url
				}
			},
			getDocumentList(){
				var params={
					explainType:2
				}
				getDocumentList(params).then(res=>{
					if(res.code==200){
						var list=res.rows;
						if(list&&list.length){
							var content=list[0].explainContent;
							this.content=this.formatRichText(content);
							
							// 图片
							if(list[0].explainImage){
								this.xwimgList=list[0].explainImage.split(',')
							}
							
						}
					}
				})
			},
			//解析富文本方法
			formatRichText(html) {
					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
						return match;
					});
					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
						return match;
					});
					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
					newContent = newContent.replace(/\<img src="/gi,
						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +baseUrlimg);
					return newContent;
			},
			getOcrBusinessLicense(url,name,idx){
				var that=this;
				var obj=this.gdlist[idx];
				var params={
					image:url,
				}
				getOcrBusinessLicense(params).then(res=>{
					if(res.code==200){
						var params=JSON.parse(JSON.stringify(res.data))
						obj.shareholderName=params.enterpriseName
						obj.shareholderIdCard=params.creditCode
						obj.zhizhao[0]=name
						this.gdlist.splice(idx,1,obj)
					}
				})
			},
			getocrIdCard(url,type){
				var that=this;
				var burl=url;
				var params={
					image:url,
					idCardSide:'front'
				}
				getOcrIdCard(params).then(res=>{
					if(res.code==200){
						var data=res.data;
						if(type=='frsfzrmx'){
							that.datainfo.corporationName=data.realName
							that.datainfo.corporationIdCard=data.idCard
						}else if(type=='frsfzpormx'){
							that.datainfo.spouseName=data.realName
							that.datainfo.spouseIdCard=data.idCard
						}else if(type=='fdbrsfzrmx'){
							that.datainfo.guaranteeName=data.realName
							that.datainfo.guaranteeIdCard=data.idCard
						}
					}
				})
			},
			onuploadEnd(item,fileVal,bigType) {
				var newobj={}
				var responseText=JSON.parse(item.responseText)
				newobj.name=responseText.newFileName;
				newobj.oldName=responseText.originalFilename;
				newobj.url=responseText.fileName;
				newobj.type=fileVal;
				newobj.bigType=bigType;
				this.filelist.push(newobj)
				this.datainfo.loanApplicationFjList=JSON.parse(JSON.stringify(this.filelist))
				if(fileVal=='fdbqyyyzz'){
					this.datainfo.guaranteeShareholderName='';
				}
			},
			// 股东附件上传
			gdonuploadEnd(item,fileVal,bigType){
				var idx=Number(fileVal);
				var type=bigType;
				var obj=this.gdlist[idx];
				var responseText=JSON.parse(item.responseText);
				if(type=='cardz'){
					obj.cardz=responseText.fileName
				}else if(type=='cardf'){
					obj.cardf=responseText.fileName
				}else if(type=='zx'){
					obj.zxurl.push(responseText.fileName)
					// obj.zxurl[0]=responseText.fileName
				}else if(type=='zhz'){
					// obj.zhizhao.push(responseText.fileName)
					// obj.zhizhao[0]=responseText.fileName
					this.getOcrBusinessLicense(responseText.urlOnline,responseText.fileName,idx)
					return
				}
				console.log(this.gdlist,3)
				this.gdlist.splice(idx,1,obj)
				// this.datainfo.shareholderFjList=JSON.parse(JSON.stringify(this.gdlist))
			},
			// 申请附件上传
			fjonuploadEnd(item,fileVal,bigType,idx){
				
				var newobj={};
				var sbfjlist=this.sbfjlist[idx].fjlist;
				var responseText=JSON.parse(item.responseText)
				newobj.name=responseText.newFileName;
				newobj.oldName=responseText.originalFilename;
				newobj.url=responseText.fileName;
				newobj.type=fileVal;
				newobj.bigType=bigType;
				this.sbfjlist[idx].fjlist.push(newobj)
				
			},
			getDelsbFj(idx,fidx){
				var that=this;
				var obj=this.sbfjlist[idx];
				uni.showModal({
					title: '确认删除',
					content: "是否确认删除",
					cancelText: '取消',
					confirmText: '确认',
					success: function(res) {
						if (res.confirm) {
							var fjlist=obj.fjlist[fidx]
							if(fjlist.fjId){
								that.fjdelIdList.push(fjlist.fjId)
							}
							obj.fjlist.splice(fidx,1)
							that.sbfjlist.splice(idx,1,obj)
						} else if (res.cancel) {
						}
					}
				});
			},
			getDelgdFj(idx,zxidx){
				var obj=this.gdlist[idx];
				var that=this;
				uni.showModal({
					title: '确认删除',
					content: "是否确认删除",
					cancelText: '取消',
					confirmText: '确认',
					success: function(res) {
						if (res.confirm) {
							obj.zxurl.splice(zxidx,1)
							that.gdlist.splice(idx,1,obj)
						} else if (res.cancel) {
						}
					}
				});
			},
			getDelgdyy(idx,zxidx){
				var obj=this.gdlist[idx];
				var that=this;
				uni.showModal({
					title: '确认删除',
					content: "是否确认删除",
					cancelText: '取消',
					confirmText: '确认',
					success: function(res) {
						if (res.confirm) {
							obj.zhizhao.splice(zxidx,1)
							that.gdlist.splice(idx,1,obj)
						} else if (res.cancel) {
						}
					}
				});
			},
			getDelFj(idx){
				var that=this;
				uni.showModal({
					title: '确认删除',
					content: "是否确认删除",
					cancelText: '取消',
					confirmText: '确认',
					success: function(res) {
						if (res.confirm) {
							var ite=that.filelist[idx];
							if(ite.fjId){
								that.fjdelIdList.push(ite.fjId)
							}
							that.filelist.splice(idx,1)
							that.datainfo.loanApplicationFjList=JSON.parse(JSON.stringify(that.filelist))
						} else if (res.cancel) {
						}
					}
				});
			},
			getDownloader(path,name){
				// console.log(path,name)
				// #ifdef APP-PLUS
				self.getFilePermissions(function(res){
					if(res==1){
						uni.showLoading({
							title: '加载中'
						});
						var url = baseUrl + path;
						let dtask = plus.downloader.createDownload(url, {
							filename: 'file://storage/emulated/0/'+baseName+'/' + name
						}, (d, status) => {
							//d为下载的文件对象
							if (status == 200) {
								uni.hideLoading();
								uni.showToast({
									icon: 'none',
									mask: true,
									title: '已保存到文件夹：/'+baseName+'/'+ name, //保存路径
									duration: 3000,
								});
								
								//下载成功,d.filename是文件在保存在本地的相对路径，使用下面的API可转为平台绝对路径
								let fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
								setTimeout(() => {
									plus.runtime.openFile(d.filename); //选择软件打开文件
								}, 1500)
							} else {
								//下载失败
								uni.hideLoading();
								plus.downloader.clear(); //清除下载任务
								uni.showToast({
									icon: 'none',
									mask: true,
									title: '下载失败，请稍后重试',
								});
							}
						})
						dtask.start();
					}else{
						uni.hideLoading();
						uni.showToast({
							title: '无法获取权限，文件下载将出错！',
							icon: 'none',
						})
					}			
				})
				// #endif
			},
			getExportMb(ite){
				var that=this;
				var params=this.datainfo;
				if(ite.val=='wtdbsqs'){
					params.type=1;
				}else{
					params.type=11;
				}
				params.bigType='b';
				params.fileType=ite.val;
				getExportMb(params).then(res=>{
					if(res.code==200){
						var data=res.data;
						var url=data.path;
						var name=data.fileName;
						that.getDownloader(url,name)
					}
				})
			},
			getDown(e){
				uni.showLoading({
					title: '加载中'
				});
				var url=baseUrl+e;
				let index1 = e.lastIndexOf("."); // 得到一个索引值
				let index2 = e.length;
				let type = e.substring(index1, index2);
				if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
					uni.previewImage({
						current: 0,
						urls: [url],
						// background: '#ffffff'
					});
					uni.hideLoading();
				} else {
				uni.downloadFile({
					url: url,//文件的下载路径
					success(result) {
							uni.hideLoading()
						var filePath = result.tempFilePath;
						   uni.openDocument({
						     filePath: filePath,
						     showMenu: true,
						     success: function (res) {
						       // console.log('打开文档成功');
						     }
						   });
					},
					fail(res) {uni.hideLoading()}
				})
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
.addbox /deep/ .uni-forms-item{min-height: 112rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:18rpx 0;position: relative;}
.addbox .bgf /deep/ .uni-forms-item:last-child{border-bottom: none;}
.addbox /deep/ .uni-forms-item__label{font-weight: bold;font-size: 32rpx;color: #161616;flex: 0 0 auto;width: auto !important;padding-left: 12rpx;min-width: 240rpx;box-sizing: border-box;}
.addbox /deep/ .uni-easyinput{flex: 1;text-align: left;font-size: 30rpx;color: #222327;}
.addbox /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 30rpx;}
.addbox /deep/ .uni-easyinput__placeholder-class{font-size: 30rpx;color: #AAAAAA;}
.addbox /deep/ .uni-input-input{font-size: 30rpx;}
.addbox /deep/ .uni-easyinput__content-input{padding-left: 0 !important;}
.addbox /deep/ .uni-textarea-textarea{font-size: 30rpx;}
.addbox /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
.isborder{border-bottom: 2rpx solid #E6E6E6;}
.labtxt{font-weight: bold;font-size: 32rpx;color: #161616;flex: 0 0 auto;width: auto !important;padding-left: 12rpx;width: 240rpx;box-sizing: border-box;
	position: absolute;left: -240rpx;top:50%;transform: translateY(-50%);
	text{color: #AAAAAA;font-size: 26rpx;font-weight: normal;display: block;
		&.del{
			color: #FF6969;margin-top: 6rpx;text-align: center;padding: 4rpx 0;
		}
	}
}
.navtop{
	position: fixed;left:0;right: 0;top: 0;z-index: 2;
}
.topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
	.backimg{width: 40rpx;height: 30rpx;}
}
.edit{font-weight: 500;font-size: 26rpx;color: #FFFFFF;display: flex;align-items: center;
	image{width: 24rpx;height: 26rpx;margin-right: 10rpx;}
	.img{width: 24rpx;height: 26rpx;margin-right: 10rpx;}
	.txt{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
}
.editcir{box-shadow: 0px 0px 20rpx 0px rgba(0,169,240,0.6);
	width: 120rpx;height: 120rpx;border-radius: 50%;position: fixed;right:0;bottom:140rpx;background-color: $com-cd3;flex-direction: column;align-items: center;justify-content: center;
	.img{margin-bottom: 8rpx;margin-right: 0;}
}
.addbox{padding: 140rpx 0 136rpx;
	.addtit{font-weight: bold;padding: 18rpx 34rpx;font-size: 26rpx;color: #666666;
		text{color: #DF0303;margin-right: 8rpx;}
		.ywimg{width: 30rpx;height: 30rpx;margin-left: 16rpx;}
		&.tips{font-weight: 500;font-size: 24rpx;color: #FF6969;}
	}
	.lbtabp{
		display: flex;align-items: center;
		view{flex: 1;font-size: 30rpx;color: #222327;}
		.rimg{flex: 0 0 auto;width: 16rpx;height: 26rpx;flex: 0 0 auto;margin-left: 18rpx;}
	}
	.ywicon{font-weight: 400;font-size: 26rpx;color: $com-cd3;padding-right: 14rpx;
		image{width: 26rpx;height: 26rpx;margin-right: 8rpx;}
	}
	// 上传样式
	.phobox{display: flex;flex-wrap: wrap;justify-content: space-between;
		.phoboxa{display: flex;flex-direction: column;align-items: center;margin: 10rpx 26rpx 0 0;padding-bottom: 4rpx;position: relative;min-height: 176rpx;box-sizing: border-box;
			.photop{width: 200rpx;height: 126rpx;position: relative;
				.bgimg{width: 100%;height: 100%;}
				.addimg{width: 34rpx;height: 30rpx;position: absolute;left: 50%;margin-left: -17rpx;top: 50%;margin-top: -15rpx;z-index: 1;}
				.delimg{position: absolute;width: 24rpx;height: 24rpx;right: -12rpx;top: -12rpx;}
				.bgimga{width: 100%;height: 100%;position: absolute;left:0;right: 0;top:0;bottom: 0;}
			}
			// .pupdata{position: absolute;left: 0;right: 0;top:0;bottom: 0;opacity: 0;}
			.photit{font-weight: 500;font-size: 20rpx;color: #AAAAAA;margin-top: 18rpx;max-width:200rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
				&.atit{position: absolute;left: 50%;transform: translate(-50%);bottom: 4rpx;word-break: keep-all;max-width: none;}
			}
		}
		.frdelimg{
			position: absolute;width: 32rpx;height: 32rpx;right: -16rpx;top: -16rpx;
			image{width: 24rpx;height: 24rpx;}
		}
	}
	.addgdbox{padding: 34rpx 10rpx 36rpx;}
	
	// 附件
	.fjbox{padding: 24rpx 0;
		min-height: 150rpx;box-sizing: border-box;
		// &:last-child{border-bottom: none;border-bottom: 2rpx solid #E6E6E6;}
		.fjtop{
			&.chek{
				.chtit{flex: 1;font-size: 30rpx;color: #222327;text-align: right;}
				.rimg{flex: 0 0 auto;width: 16rpx;height: 26rpx;flex: 0 0 auto;margin-left: 18rpx;}
			}
			.ftit{font-weight: bold;font-size: 32rpx;color: #161616;flex: 1;padding:28rpx 0;
				text{color: #DF0303;margin-right: 8rpx;}
				.mtxt{color: #AAAAAA;font-size: 26rpx;}
			}
			.fbtns{font-weight: 500;font-size: 26rpx;padding-right: 12rpx;margin-left: 36rpx;display: flex;align-items: center;height: 100rpx;justify-content: center;
				image{width: 22rpx;height: 22rpx;margin-right: 10rpx;
					&.downimg{width: 20rpx;}
				}
			}
		}
		
		
	} 
	// 18
	.fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 12rpx;
		// image{flex: 0 0 auto;}
		.imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;flex: 0 0 auto;
			image{width: 26rpx;height: 24rpx;}
		}
		.tit{font-size: 26rpx;color: #222327;font-weight: 500;margin-top: 4rpx;}
		.delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;flex: 0 0 auto;
			image{width: 24rpx;height: 24rpx;}
		}
	}
}
.addbtns{z-index: 4;
		width: 100%;height: 100rpx;position: fixed;left: 0;right: 0;bottom: 0;display: flex;
		.addlbtn{background-color: #ffffff;font-weight: 500;justify-content: center;
display: flex;align-items: center;width: 232rpx;flex: 0 0 auto;height: 100rpx;
			.addlbtna{width: 32rpx;height: 32rpx;margin-right: 12rpx;display: block;}
			.addlbtnb{font-size: 30rpx;color: $com-cd3;}
		}
			
	}
.addrbtn{flex: 1;height: 100rpx;font-weight: bold;font-size: 30rpx;display: flex;align-items: center;justify-content: center;
color: #FFFFFF;text-align: center;line-height: 100rpx;
			&.bga{background: #29E18A;}
			&.bgb{background: $com-cd3;}
		}
// 标准
.looimg{width: 100%;height: 400rpx;position: fixed;left: 0;right: 0;top: 50%;margin-top: -200rpx;z-index: 10;}	
</style>