<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
	<div>
		<el-dialog :title="title" :close-on-click-modal="false" draggable width="1400px" height="500px" @close="close"
			append-to-body v-model="visible">
			<el-row>
				<el-row>
					<el-form :model="inputForm" ref="inputForm" v-loading="loading"
						:class="method === 'view' ? 'readonly' : ''"
						:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"
						label-width="100px" @submit.native.prevent>

						<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
						<el-row :gutter="26">
							<el-col :span="12">
								<el-form-item label="姓名" prop="name">
									<el-input v-model="inputForm.name"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="身份证号码" prop="idCard">
									<el-input v-model="inputForm.idCard"
										@blur="idCardOnly(inputForm.idCard)"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="性别" prop="sex">
									<el-radio-group v-model="inputForm.sex">
										<el-radio v-for="item in $dictUtils.getDictList('sex')" :label="item.value"
											:key="item.value">{{ item.label }}</el-radio>
									</el-radio-group>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="年龄" prop="age">
									<el-input v-model="inputForm.age" type="number"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="出生日期" prop="birthday">
									<el-date-picker style="width: 100%" v-model="inputForm.birthday"
										value-format="YYYY-MM-DD" placeholder="选择日期">
									</el-date-picker>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="政治面貌" prop="politicalOutlook" :rules="[]">
									<!--						<el-input v-model="inputForm.politicalOutlook"></el-input>-->
									<el-select v-model="inputForm.politicalOutlook" placeholder="请选择政治面貌"
										style="width:100%;">
										<el-option v-for="item in $dictUtils.getDictList('political_outlook')"
											:key="item.value" :label="item.label" :value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="籍贯" prop="nativePlace" :rules="[]">
									<el-input v-model="inputForm.nativePlace"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="民族" prop="nation" :rules="[]">
									<el-input v-model="inputForm.nation"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="婚姻状况" prop="maritalStatus" :rules="[]">
									<el-select v-model="inputForm.maritalStatus" placeholder="请选择婚姻状况" clearable
										style="width: 100%;">
										<el-option v-for="item in $dictUtils.getDictList('marital_status')"
											:key="item.value" :label="item.label" :value="item.value">
										</el-option>
									</el-select>
								</el-form-item>

							</el-col>
							<el-col :span="12">
								<el-form-item label="联系电话" prop="mobilePhone">
									<el-input v-model="inputForm.mobilePhone"
										@blur="mobilePhoneOnly(inputForm.mobilePhone)"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="家庭住址" prop="homeAddress" :rules="[]">
									<el-input v-model="inputForm.homeAddress"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="常住住址" prop="permanentAddress" :rules="[]">
									<el-input v-model="inputForm.permanentAddress"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-divider content-position="left"><i class="el-icon-document"></i> 学历信息</el-divider>
						<el-row :gutter="26">
							<el-col :span="12">
								<el-form-item label="毕业院校" prop="graduatedFrom" :rules="[]">
									<el-input v-model="inputForm.graduatedFrom"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="专业" prop="speciality" :rules="[]">
									<el-input v-model="inputForm.speciality"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="开始时间" prop="startTime" :rules="[
								]">
									<el-date-picker style="width: 100%" v-model="inputForm.startTime"
										value-format="YYYY-MM-DD" placeholder="选择日期">
									</el-date-picker>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="毕业时间" prop="endTime" :rules="[
								]">
									<el-date-picker style="width: 100%" v-model="inputForm.endTime"
										value-format="YYYY-MM-DD" placeholder="选择日期">
									</el-date-picker>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="学历" prop="education" :rules="[]">
									<el-select v-model="inputForm.education" placeholder="请选择学历" clearable
										style="width: 100%;">
										<el-option v-for="item in $dictUtils.getDictList('education')" :key="item.value"
											:label="item.label" :value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="学历性质" prop="educationNature" :rules="[]">
									<el-select v-model="inputForm.educationNature" placeholder="请选择学历性质" clearable
										style="width: 100%;">
										<el-option v-for="item in $dictUtils.getDictList('education_nature')"
											:key="item.value" :label="item.label" :value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="是否毕业" prop="graduatedOrNot" :rules="[]">
									<el-radio-group v-model="inputForm.graduatedOrNot">
										<el-radio v-for="item in $dictUtils.getDictList('graduated_or_not')"
											:label="item.value" :key="item.value">{{ item.label }}</el-radio>
									</el-radio-group>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="英语等级" prop="englishLevel" :rules="[]">
									<el-select v-model="inputForm.englishLevel" placeholder="请选择英语等级" clearable
										style="width: 100%;">
										<el-option v-for="item in $dictUtils.getDictList('english_level')"
											:key="item.value" :label="item.label" :value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="计算机等级" prop="ncre" :rules="[]">
									<el-select v-model="inputForm.ncre" placeholder="请选择英语等级" clearable
										style="width: 100%;">
										<el-option v-for="item in $dictUtils.getDictList('computer_level')"
											:key="item.value" :label="item.label" :value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="26">
							<el-col :span="12">
								<el-form-item label="个人简介" prop="remarks" :rules="[]">
									<el-input type="textarea" maxlength="200" show-word-limit
										v-model="inputForm.remarks"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-divider content-position="left"><i class="el-icon-document"></i> 部门信息</el-divider>
						<el-row :gutter="26">
							<el-form v-if="status === 'audit'" style="width: 100%" :model="inputForm" ref="inputForm"
								v-loading="loading" :class="method === 'view' ? 'readonly' : ''"
								:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"
								label-width="110px" @submit.native.prevent>
								<el-row :gutter="26">
									<el-col :span="12">
										<el-form-item label="所属部门" prop="department" :rules="[
											{ required: true, message: '请选择所属部门', trigger: 'blur' }
										]">
											<SelectTree ref="officeTree" :props="{
												value: 'id',             // ID字段名
												label: 'name',         // 显示名称
												children: 'children'    // 子级字段名
											}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.department" :accordion="true"
												size="default" @getValue="(value) => { inputForm.department = value }" />
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="员工类型" prop="onJobStatus" :rules="[
											{ required: true, message: '请选择员工类型', trigger: 'blur' }
										]">
											<!--						<el-input v-model="inputForm.politicalOutlook"></el-input>-->
											<el-select v-model="inputForm.onJobStatus" placeholder="请选择员工类型"
												style="width:100%;">
												<el-option v-for="item in $dictUtils.getDictList('on_job_status')"
													:key="item.value" :label="item.label" :value="item.value">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="岗位" prop="postIdList" :rules="[]">
											<el-select v-model="inputForm.postIdList" style="width: 100%" multiple
												placeholder="请选择">
												<el-option v-for="item in postList" :key="item.id" :label="item.name"
													:value="item.id">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="角色" prop="roleIdList"
											:rules="[{ required: true, message: '角色不能为空', trigger: 'change' }]">
											<el-select v-model="inputForm.roleIdList" style="width: 100%" multiple
												placeholder="请选择">
												<el-option v-for="role in roleList" :key="role.id" :label="role.name"
													:value="role.id">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="进所日期" prop="entryDate" :rules="[
											{ required: true, message: '请填写进所日期', trigger: 'blur' }
										]">
											<el-date-picker style="width: 100%" v-model="inputForm.entryDate"
												value-format="YYYY-MM-DD" placeholder="选择日期">
											</el-date-picker>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="合同开始日期" prop="contractStartDate" :rules="[
											{ required: true, message: '请填写合同开始日期', trigger: 'blur' }
										]">
											<el-date-picker style="width: 100%" v-model="inputForm.contractStartDate"
												value-format="YYYY-MM-DD" placeholder="选择日期">
											</el-date-picker>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="合同结束日期" prop="contractEndDate" :rules="[
											{ required: true, message: '请填写合同结束日期', trigger: 'blur' }
										]">
											<el-date-picker style="width: 100%" v-model="inputForm.contractEndDate"
												value-format="YYYY-MM-DD" placeholder="选择日期">
											</el-date-picker>
										</el-form-item>
									</el-col>
								</el-row>
							</el-form>
							<el-form v-else-if="inputForm.type !== '0'" style="width: 100%" :model="inputForm"
								ref="inputForm" v-loading="loading" :class="method === 'view' ? 'readonly' : ''"
								:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"
								label-width="110px" @submit.native.prevent>
								<el-row :gutter="26">
									<el-col :span="12">
										<el-form-item label="所属部门" prop="department" :rules="[
										]">
											<SelectTree ref="officeTree" :props="{
												value: 'id',             // ID字段名
												label: 'name',         // 显示名称
												children: 'children'    // 子级字段名
											}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.department" :accordion="true"
												size="default" @getValue="(value) => { inputForm.department = value }" />
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="员工类型" prop="onJobStatus" :rules="[
										]">
											<!--						<el-input v-model="inputForm.politicalOutlook"></el-input>-->
											<el-select v-model="inputForm.onJobStatus" placeholder="请选择员工类型"
												style="width:100%;">
												<el-option v-for="item in $dictUtils.getDictList('on_job_status')"
													:key="item.value" :label="item.label" :value="item.value">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="岗位" prop="postIdList" :rules="[]">
											<el-select v-model="inputForm.postIdList" style="width: 100%" multiple
												placeholder="请选择">
												<el-option v-for="item in postList" :key="item.id" :label="item.name"
													:value="item.id">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="角色" prop="roleIdList"
											:rules="[{ required: true, message: '角色不能为空', trigger: 'change' }]">
											<el-select v-model="inputForm.roleIdList" style="width: 100%" multiple
												placeholder="请选择">
												<el-option v-for="role in roleList" :key="role.id" :label="role.name"
													:value="role.id">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="进所日期" prop="entryDate" :rules="[
										]">
											<el-date-picker style="width: 100%" v-model="inputForm.entryDate"
												value-format="YYYY-MM-DD" placeholder="选择日期">
											</el-date-picker>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="合同开始日期" prop="contractStartDate" :rules="[
										]">
											<el-date-picker style="width: 100%" v-model="inputForm.contractStartDate"
												value-format="YYYY-MM-DD" placeholder="选择日期">
											</el-date-picker>
										</el-form-item>
									</el-col>
									<el-col :span="12">
										<el-form-item label="合同结束日期" prop="contractEndDate">
											<el-date-picker style="width: 100%" v-model="inputForm.contractEndDate"
												value-format="YYYY-MM-DD" placeholder="选择日期">
											</el-date-picker>
										</el-form-item>
									</el-col>
								</el-row>
							</el-form>
						</el-row>
						<el-divider content-position="left"><i class="el-icon-document"></i> 社保信息（选填）</el-divider>
						<el-row :gutter="26" v-if="status === 'audit' || status === 'taskFormDetail'">
							<el-col :span="12">
								<el-form-item label="社保编号" prop="socialSecurityNumber" :rules="[]">
									<el-input v-model="inputForm.socialSecurityNumber" maxlength="10"
										@input="validateInput"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="社保银行卡号" prop="socialSecurityBankNumber" :rules="[]">
									<el-input v-model="inputForm.socialSecurityBankNumber"
										@change="checkBankNumber(inputForm.socialSecurityBankNumber)"
										maxlength="19"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="社保卡照片正面" prop="socialSecurityPictureFront" :rules="[]">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="hideUploadEdit" list-type="picture-card"
										:auto-upload="true" :on-success="handleUploadSuccess"
										v-model:file-list="fileList">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="handlePictureCardPreview(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="handleDownload(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!disabled" style="display:none;"
														class="el-upload-list__item-delete"
														@click="handleRemove(file, fileList)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="dialogVisible">
										<img w-full :src="inputForm.socialSecurityPictureFrontUrl" alt="Preview Image"
											:style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>

								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="社保卡照片反面" prop="socialSecurityPictureOpposite" :rules="[]">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="hideUploadEdit2" list-type="picture-card"
										:auto-upload="true" :on-success="handleUploadSuccess2"
										v-model:file-list="fileList2">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="handlePictureCardPreview2(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="handleDownload2(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!disabled" style="display:none;"
														class="el-upload-list__item-delete"
														@click="handleRemove2(file, fileList2)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="dialogVisible2">
										<img w-full :src="inputForm.socialSecurityPictureOppositeUrl"
											alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>

								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="26" v-else>
							<el-col :span="12">
								<el-form-item label="社保编号" prop="socialSecurityNumber" :rules="[]">
									<el-input v-model="inputForm.socialSecurityNumber" maxlength="10"
										@input="validateInput"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="社保银行卡号" prop="socialSecurityBankNumber" :rules="[]">
									<el-input v-model="inputForm.socialSecurityBankNumber"
										@change="checkBankNumber(inputForm.socialSecurityBankNumber)"
										maxlength="19"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="社保卡照片正面" prop="socialSecurityPictureFront" :rules="[]">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="hideUploadEdit" list-type="picture-card"
										:auto-upload="true" :on-success="handleUploadSuccess"
										v-model:file-list="fileList">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="handlePictureCardPreview(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="handleDownload(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="handleRemove(file, fileList)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="dialogVisible">
										<img w-full :src="inputForm.socialSecurityPictureFrontUrl" alt="Preview Image"
											:style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>

								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="社保卡照片反面" prop="socialSecurityPictureOpposite" :rules="[]">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="hideUploadEdit2" list-type="picture-card"
										:auto-upload="true" :on-success="handleUploadSuccess2"
										v-model:file-list="fileList2">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="handlePictureCardPreview2(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="handleDownload2(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="handleRemove2(file, fileList2)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="dialogVisible2">
										<img w-full :src="inputForm.socialSecurityPictureOppositeUrl"
											alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>

								</el-form-item>
							</el-col>
						</el-row>
						<el-divider content-position="left"><i class="el-icon-document"></i> 中信银行卡信息</el-divider>
						<el-row :gutter="26">
							<el-col :span="12">
								<el-form-item label="中信银行卡号" prop="zxBankCardNumber">
									<el-input v-model="inputForm.zxBankCardNumber"
										@change="checkBankNumber(inputForm.zxBankCardNumber, 'zx')"
										maxlength="19"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="开户行" prop="zxAccountHolder">
									<el-input v-model="inputForm.zxAccountHolder"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="银行卡正面" prop="accountHolderFront">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="bankHideUploadEdit" list-type="picture-card"
										:auto-upload="true" :on-success="bankHandleUploadSuccess"
										v-model:file-list="bankFileList">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="bankHandlePictureCardPreview(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="bankHandleDownload(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!(method === 'view')"
														class="el-upload-list__item-delete"
														@click="bankHandleRemove(file, fileList)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="bankDialogVisible">
										<img w-full :src="inputForm.accountHolderFrontUrl" alt="Preview Image"
											:style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="银行卡反面" prop="accountHolderOpposite">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="bankHideUploadEdit2" list-type="picture-card"
										:auto-upload="true" :on-success="bankHandleUploadSuccess2"
										v-model:file-list="bankFileList2">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="bankHandlePictureCardPreview2(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="bankHandleDownload2(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!(method === 'view')"
														class="el-upload-list__item-delete"
														@click="bankHandleRemove2(file, fileList)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="bankDialogVisible2">
										<img w-full :src="inputForm.accountHolderOppositeUrl" alt="Preview Image"
											:style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>
								</el-form-item>
							</el-col>
						</el-row>
						<el-divider content-position="left"><i class="el-icon-document"></i> 招商银行卡信息</el-divider>
						<el-row :gutter="26">
							<el-col :span="12">
								<el-form-item label="招商银行卡号" prop="gsBankCardNumber">
									<el-input v-model="inputForm.gsBankCardNumber"
										@change="checkBankNumber(inputForm.gsBankCardNumber, 'gs')"
										maxlength="19"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="开户行" prop="gsAccountHolder">
									<el-input v-model="inputForm.gsAccountHolder"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="银行卡正面" prop="gsAccountHolderFront">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="gsHideUploadEdit" list-type="picture-card"
										:auto-upload="true" :on-success="gsHandleUploadSuccess"
										v-model:file-list="gsFileList">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="gsHandlePictureCardPreview(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="gsHandleDownload(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!(method === 'view')"
														class="el-upload-list__item-delete"
														@click="gsHandleRemove(file, fileList)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="gsDialogVisible">
										<img w-full :src="inputForm.gsAccountHolderFrontUrl" alt="Preview Image"
											:style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="银行卡反面" prop="gsAccountHolderOpposite">
									<el-upload
										:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
										:limit="limitNum" :disabled="gsHideUploadEdit2" list-type="picture-card"
										:auto-upload="true" :on-success="gsHandleUploadSuccess2"
										v-model:file-list="gsFileList2">
										<el-icon>
											<Plus />
										</el-icon>

										<template #file="{ file }">
											<div>
												<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
												<span class="el-upload-list__item-actions">
													<span class="el-upload-list__item-preview"
														@click="gsHandlePictureCardPreview2(file)">
														<el-icon><zoom-in /></el-icon>
													</span>
													<span v-if="!disabled" class="el-upload-list__item-delete"
														@click="gsHandleDownload2(file)">
														<el-icon>
															<Download />
														</el-icon>
													</span>
													<span v-if="!(method === 'view')"
														class="el-upload-list__item-delete"
														@click="gsHandleRemove2(file, fileList)">
														<el-icon>
															<Delete />
														</el-icon>
													</span>
												</span>
											</div>
										</template>
									</el-upload>
									<el-dialog v-model="gsDialogVisible2">
										<img w-full :src="inputForm.gsAccountHolderOppositeUrl" alt="Preview Image"
											:style="{ maxWidth: '100%', maxHeight: '100%' }" />
									</el-dialog>
								</el-form-item>
							</el-col>
						</el-row>

					</el-form> </el-row>
			</el-row>
			<template #footer>
				<span class="dialog-footer">
					<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
					<el-button v-if="method === 'edit'" type="primary" icon="el-icon-circle-check"
						@click="doSubmit()">确定</el-button>
				</span>
			</template>
		</el-dialog>
	</div>
</template>

<script>
import SelectTree from '@/components/treeSelect/treeSelect.vue'
import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
import OSSSerivce, {
	httpRequest,
	fileName,
	toHref,
} from '@/api/sys/OSSService'
import postService from "@/api/sys/postService";
import roleService from "@/api/sys/roleService";
export default {
	props: {
		businessId: {
			type: String,
			default: ''
		},
		formReadOnly: {
			type: Boolean,
			default: false
		},
		status: {
			type: String,
			default: ''
		}
	},
	data() {
		return {
			bankHideUploadEdit: false, //控制上传点击
			bankHideUploadEdit2: false, //控制上传点击
			bankFileList: [],
			bankFileList2: [],
			bankDialogVisible: false,
			bankDialogVisible2: false,
			gsDialogVisible: false,
			gsDialogVisible2: false,
			gsHideUploadEdit: false, //控制上传点击
			gsHideUploadEdit2: false, //控制上传点击
			gsFileList: [],
			gsFileList2: [],

			hideUploadEdit: false, //隐藏上传按钮
			hideUploadEdit2: false, //隐藏上传按钮
			limitNum: 1,
			fileList: [],
			fileList2: [],
			dialogImageUrl: '',
			dialogVisible: false,
			dialogVisible2: false,
			disabled: false,
			title: '',
			method: '',
			visible: false,
			loading: false,
			showViewer: false,
			inputForm: {
				wageCardId: '',//银行卡信息id
				zxBankCardNumber: '',//银行卡信息
				zxAccountHolder: '',
				accountHolderFront: '',
				accountHolderFrontUrl: '',
				accountHolderOpposite: '',
				accountHolderOppositeUrl: '',
				gsAccountHolder: '',
				gsBankCardNumber: '',
				gsAccountHolderFront: '',
				gsAccountHolderFrontUrl: '',
				gsAccountHolderOpposite: '',
				gsAccountHolderOppositeUrl: '',

				id: '',
				userId: '',
				name: '',
				sex: '',
				age: '',
				birthday: '',
				politicalOutlook: '',
				nativePlace: '',
				nation: '',
				maritalStatus: '',
				mobilePhone: '',
				idCard: '',
				homeAddress: '',
				permanentAddress: '',
				graduatedFrom: '',
				speciality: '',
				startTime: '',
				endTime: '',
				education: '',
				educationNature: '',
				graduatedOrNot: '',
				englishLevel: '',
				ncre: '',
				department: '',
				entryDate: '',
				contractStartDate: '',
				contractEndDate: '',
				remarks: '',
				type: '',
				onJobStatus: '',
				socialSecurityNumber: '',
				socialSecurityBankNumber: '',
				socialSecurityPictureFront: '',
				socialSecurityPictureFrontUrl: '',
				socialSecurityPictureOpposite: '',
				socialSecurityPictureOppositeUrl: '',
				roleIdList: [],
				postIdList: [],
			},
			keyWatch: '',
			roleList: [],
			postList: [],
		}
	},
	created() {
		this.ossService = new OSSSerivce()
	},
	components: {
		SelectTree,
	},
	computed: {
		bus: {
			get() {
				return this.businessId
			},
			set(val) {
				this.businessId = val
			}
		},
		name() {
			return this.$store.state.user.name
		},
		userId() {
			return this.$store.state.user.id
		}
	},
	watch: {
		'keyWatch': {
			handler(newVal) {
				if (this.commonJS.isNotEmpty(this.bus)) {
					this.init('', this.bus)
				} else {
					this.$nextTick(() => {
						this.$refs.inputForm.resetFields()
					})
				}
			}
		},
		'loading': {
			handler(newVal) {
				this.$emit('changeLoading', newVal)
			}
		}
	},
	methods: {
		handleUploadSuccess(response, file, fileList) {
			return this.handleAvatarSuccess(response, file, fileList, null, 'front')
		},
		handleUploadSuccess2(response, file, fileList) {
			return this.handleAvatarSuccess2(response, file, fileList, null, 'front')
		},
		handleRemove(file, fileList) {
			console.log(file);
			this.hideUploadEdit = false
			// 如果需要删除图片信息，可以根据file或其他标识从相应的数据结构中删除信息
			const fileIndex = this.fileList.indexOf(file);
			if (fileIndex !== -1) {
				this.fileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
			}
		},
		handleRemove2(file) {
			console.log(file);
			this.hideUploadEdit = false
			// 如果需要删除图片信息，可以根据file或其他标识从相应的数据结构中删除信息
			const fileIndex = this.fileList2.indexOf(file);
			if (fileIndex !== -1) {
				this.fileList2.splice(fileIndex, 1); // 从fileList中删除该图片信息
			}
		},
		handleDownload(file) {
			let file2 = {
				url: this.inputForm.socialSecurityPictureFront
			}
			toHref(file2)
		},
		handleDownload2(file) {
			let file2 = {
				url: this.inputForm.socialSecurityPictureOpposite
			}
			toHref(file2)
		},
		handlePictureCardPreview(file) {
			this.dialogImageUrl = file.url;
			this.inputForm.socialSecurityPictureFrontUrl = file.url
			console.log('file.url1', file.url)
			this.dialogVisible = true;
		},
		handlePictureCardPreview2(file) {
			this.dialogImageUrl = file.url;
			this.inputForm.socialSecurityPictureOppositeUrl = file.url
			this.dialogVisible2 = true;
		},
		async httpRequest(file) {
			await httpRequest(file, fileName(file), this.directory, this.maxValue)
		},

		getKeyWatch(keyWatch) {
			this.keyWatch = keyWatch
		},
		getUpload() {
		},
		init(method, id) {
			this.method = method
			this.inputForm = {
				wageCardId: '',//银行卡信息id
				zxBankCardNumber: '',//银行卡信息
				zxAccountHolder: '',
				accountHolderFront: '',
				accountHolderFrontUrl: '',
				accountHolderOpposite: '',
				accountHolderOppositeUrl: '',
				gsAccountHolder: '',
				gsBankCardNumber: '',
				gsAccountHolderFront: '',
				gsAccountHolderFrontUrl: '',
				gsAccountHolderOpposite: '',
				gsAccountHolderOppositeUrl: '',
				id: '',
				userId: '',
				name: '',
				sex: '',
				age: '',
				birthday: '',
				politicalOutlook: '',
				nativePlace: '',
				nation: '',
				maritalStatus: '',
				mobilePhone: '',
				idCard: '',
				homeAddress: '',
				permanentAddress: '',
				graduatedFrom: '',
				speciality: '',
				startTime: '',
				endTime: '',
				education: '',
				educationNature: '',
				graduatedOrNot: '',
				englishLevel: '',
				ncre: '',
				department: '',
				entryDate: '',
				contractStartDate: '',
				contractEndDate: '',
				remarks: '',
				type: '',
				onJobStatus: '',
				socialSecurityNumber: '',
				socialSecurityBankNumber: '',
				socialSecurityPictureFront: '',
				socialSecurityPictureFrontUrl: '',
				socialSecurityPictureOpposite: '',
				socialSecurityPictureOppositeUrl: '',
				roleIdList: [],
				postIdList: [],
				ddId: ''
			}
			if (method === 'add') {
				this.title = `新建入职登记`
			} else if (method === 'edit') {
				this.title = '修改入职登记信息'
			} else if (method === 'view') {
				this.title = '查看入职登记信息'
			}
			this.inputForm.id = id
			this.visible = true
			this.loading = false
			this.$nextTick(() => {
				this.loading = true
				enrollmentRegistrationService.findById(this.inputForm.id).then(async (data) => {
					this.fileList = []
					this.fileList2 = []
					if (this.status === 'audit' || this.status === 'taskFormDetail') {
						method = 'view'
					}
					this.inputForm = this.recover(this.inputForm, data)
					console.log('this.inputForm', this.inputForm)
					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
					if (this.commonJS.isEmpty(this.inputForm.roleIdList)) {
						this.inputForm.roleIdList = []
					}
					if (this.commonJS.isEmpty(this.inputForm.postIdList)) {
						this.inputForm.postIdList = []
					}
					if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureFront)) {
						await this.ossService.getTemporaryUrl(this.inputForm.socialSecurityPictureFront).then((data) => {
							let file = {
								url: data
							}
							this.fileList.push(file)
						})
					}
					if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureOpposite)) {
						await this.ossService.getTemporaryUrl(this.inputForm.socialSecurityPictureOpposite).then((data) => {
							let file = {
								url: data
							}
							this.fileList2.push(file)
						})
					}
					if (this.commonJS.isNotEmpty(this.inputForm.accountHolderFront)) {

						await this.ossService.getTemporaryUrl(this.inputForm.accountHolderFront).then((data) => {
							console.log('data', data)
							let file = {
								url: data
							}
							this.bankFileList.push(file)
						})
					}
					if (this.commonJS.isNotEmpty(this.inputForm.accountHolderOpposite)) {
						console.log('123')
						await this.ossService.getTemporaryUrl(this.inputForm.accountHolderOpposite).then((data) => {
							let file = {
								url: data
							}
							this.bankFileList2.push(file)
						})
					}
					if (this.commonJS.isNotEmpty(this.inputForm.gsAccountHolderFront)) {
						await this.ossService.getTemporaryUrl(this.inputForm.gsAccountHolderFront).then((data) => {
							let file = {
								url: data
							}
							this.gsFileList.push(file)
						})
					}
					if (this.commonJS.isNotEmpty(this.inputForm.gsAccountHolderOpposite)) {
						await this.ossService.getTemporaryUrl(this.inputForm.gsAccountHolderOpposite).then((data) => {
							let file = {
								url: data
							}
							this.gsFileList2.push(file)
						})
					}
					roleService.list2(this.inputForm.department).then((data) => {
						this.roleList = data
					})
					console.log('123', this.inputForm.department)
					postService.list2(this.inputForm.department).then((data) => {
						this.postList = data
						console.log('this.postList', this.postList)

					})
					this.loading = false
				})

			})
		},
		// 表单提交
		doSubmit() {
			this.$refs['inputForm'].validate((valid) => {
				if (valid) {
					this.loading = true
					// if (this.commonJS.isEmpty(this.inputForm.idCard)) {
					// 	this.loading = false
					// 	this.$message.error('身份证号码不能为空')
					// 	throw new Error('身份证号码不能为空')
					// }
					// if (!this.validateXG.isPhoneOrMobile(this.inputForm.mobilePhone)) {
					// 	this.$message.error('”联系电话“填写不正确，请重新填写')
					// 	this.loading = false
					// 	this.inputForm.mobilePhone = ''
					// 	throw new Error('”联系电话“填写不正确，请重新填写')
					// }
					//
					// if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityNumber) && (this.commonJS.isEmpty(this.inputForm.socialSecurityBankNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityPictureFront))) {
					// 	this.loading = false
					// 	this.$message.error('社保银行卡号与社保卡照片不能为空');
					// 	throw new Error('社保银行卡号与社保卡照片不能为空')
					// }
					// if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityBankNumber) && (this.commonJS.isEmpty(this.inputForm.socialSecurityNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityPictureFront))) {
					// 	this.loading = false
					// 	this.$message.error('社保编号与社保卡照片不能为空');
					// 	throw new Error('社保编号与社保卡照片不能为空')
					// }
					// if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureFront) && (this.commonJS.isEmpty(this.inputForm.socialSecurityNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityBankNumber))) {
					// 	this.loading = false
					// 	this.$message.error('社保编号与社保银行卡号不能为空');
					// 	throw new Error('社保编号与社保银行卡号不能为空')
					// }
					// this.inputForm.id = this.businessId
					enrollmentRegistrationService.updateInfo(this.inputForm).then((data) => {
						this.close()
						this.$message.success(data.msg)
						this.$emit('refreshDataList')
						this.loading = false
					}).catch(() => {
						this.loading = false
					})
				}
			})
		},
		close() {
			this.$refs.inputForm.resetFields()
			this.fileList = []
			this.fileList2 = []
			this.bankFileList = []
			this.bankFileList2 = []
			this.gsFileList = []
			this.gsFileList2 = []
			this.visible = false
		},
		reapplyForm(callback) {
			this.loading = true
			enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
				if (data.type !== '4') { // 审核状态不是“驳回”，就弹出提示
					this.loading = false
					this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
					throw new Error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
				} else {
					this.startForm(callback)
				}
			})
		},
		// 送审
		async startForm(callback) {
			this.$refs['inputForm'].validate(async (valid) => {
				if (valid) {
					this.loading = true

					if (this.commonJS.isEmpty(this.inputForm.idCard)) {
						this.loading = false
						this.$message.error('身份证号码不能为空')
						throw new Error('身份证号码不能为空')
					}
					if (!this.validateXG.isPhoneOrMobile(this.inputForm.mobilePhone)) {
						this.$message.error('”联系电话“填写不正确，请重新填写')
						this.loading = false
						this.inputForm.mobilePhone = ''
						throw new Error('”联系电话“填写不正确，请重新填写')
					}

					if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityNumber) && (this.commonJS.isEmpty(this.inputForm.socialSecurityBankNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityPictureFront))) {
						this.loading = false
						this.$message.error('社保银行卡号与社保卡照片不能为空');
						throw new Error('社保银行卡号与社保卡照片不能为空')
					}
					if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityBankNumber) && (this.commonJS.isEmpty(this.inputForm.socialSecurityNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityPictureFront))) {
						this.loading = false
						this.$message.error('社保编号与社保卡照片不能为空');
						throw new Error('社保编号与社保卡照片不能为空')
					}
					if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureFront) && (this.commonJS.isEmpty(this.inputForm.socialSecurityNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityBankNumber))) {
						this.loading = false
						this.$message.error('社保编号与社保银行卡号不能为空');
						throw new Error('社保编号与社保银行卡号不能为空')
					}
					this.inputForm.type = '2'
					enrollmentRegistrationService.save(this.inputForm).then((data) => {
						this.inputForm.title = `${this.$store.state.user.name} 发起了 [${this.inputForm.name} - 入职登记]`
						this.inputForm.id = data.businessId
						callback(data.businessTable, data.businessId, this.inputForm)
						this.$refs.inputForm.resetFields()
						this.loading = false
					}).catch(() => {
						this.$refs.inputForm.resetFields()
						this.loading = false
					})
				} else {
					this.loading = false
				}
			})
		},

		// 通过
		async agreeForm(callback) {
			this.loading = true
			enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
				if (data.type !== '2') { // 审核状态不是“审核中”，就弹出提示
					this.loading = false
					this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
					throw new Error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
				} else {
					this.$refs['inputForm'].validate(async (valid) => {
						if (valid) {
							this.loading = true
							this.inputForm.type = '5'
							console.log('this.inputForm', this.inputForm)
							enrollmentRegistrationService.save(this.inputForm).then((data) => {
								callback(data.businessTable, data.businessId, this.inputForm)
								this.loading = false
							}).catch(() => {
								this.loading = false
							})
						} else {
							this.loading = false
						}
					})
				}
			})
		},
		// 修改状态
		updateStatusById(type, callback) {
			if (type === 'reject') {
				this.loading = true
				enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
					if (data.type !== '2') { // 审核状态不是“审核中”，就弹出提示
						this.loading = false
						this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
						throw new Error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
					} else {
						this.inputForm.type = '4'
						enrollmentRegistrationService.updateStatusById(this.inputForm).then(() => {
							this.loading = false
							callback()
						})
					}
				})
			} else if (type === 'hold') {
				this.loading = true
				enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
					if (data.type !== '4') { // 审核状态不是“驳回”，就弹出提示
						this.loading = false
						this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
						throw new Error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
					} else {
						this.inputForm.type = '1'
						enrollmentRegistrationService.updateStatusById(this.inputForm).then(() => {
							this.loading = false
							callback()
						})
					}
				})
			}
		},
		//身份证号码唯一性判断
		idCardOnly(idCard) {
			enrollmentRegistrationService.findIdCardOnly(idCard).then((data) => {
				if (data !== 0) {
					this.$message.error('身份证号码已存在，请重新确认')
					this.inputForm.idCard = ''
					throw new Error('身份证号码已存在，请重新确认')
				} else {
					let sex = null
					let birth = null
					let myDate = new Date()
					let month = myDate.getMonth() + 1
					let day = myDate.getDate()
					let age = 0

					if (idCard.length === 18) {
						age = myDate.getFullYear() - idCard.substring(6, 10) - 1
						sex = idCard.substring(16, 17)
						birth = idCard.substring(6, 10) + '-' + idCard.substring(10, 12) + '-' + idCard.substring(12, 14)
						// eslint-disable-next-line no-mixed-operators
						if (idCard.substring(10, 12) < month || idCard.substring(10, 12) === month && idCard.substring(12, 14) <= day) age++

					}
					if (idCard.length === 15) {
						age = myDate.getFullYear() - idCard.substring(6, 8) - 1901
						sex = idCard.substring(13, 14)
						birth = '19' + idCard.substring(6, 8) + '-' + idCard.substring(8, 10) + '-' + idCard.substring(10, 12)
						// eslint-disable-next-line no-mixed-operators
						if (idCard.substring(8, 10) < month || idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day) age++
					}

					if (sex % 2 === 0) {
						sex = '2'  // 性别代码 1代表男，2代表女，暂时不涉及其他类型性别
					} else {
						sex = '1'
					}
					this.inputForm.age = age
					this.inputForm.sex = sex
					this.inputForm.birthday = birth
					return { age, sex, birth }
				}
			})
		},
		//联系电话唯一性判断
		mobilePhoneOnly(mobilePhone) {
			if (!this.validateXG.isPhoneOrMobile(mobilePhone)) {
				this.$message.error('”联系电话“填写不正确，请重新填写')
				this.loading = false
				this.inputForm.mobilePhone = ''
				throw new Error('”联系电话“填写不正确，请重新填写')
			}
			enrollmentRegistrationService.findMobilePhoneOnly(mobilePhone).then((data) => {
				if (data !== 0) {
					this.$message.error('联系电话已存在，请重新确认')
					this.inputForm.mobilePhone = ''
					throw new Error('联系电话已存在，请重新确认')
				}
			})

		},
		checkBankNumber(bankNumber, type) {
			if (!this.validateXG.isBankNum(bankNumber)) {
				if (type === 'zx') {
					this.inputForm.zxBankCardNumber = ''
				} else if (type === 'gs') {
					this.inputForm.gsBankCardNumber = ''
				} else {
					this.$message.error('请输入正确的社保银行卡号')
					this.inputForm.socialSecurityBankNumber = ''
					throw new Error('请输入正确的社保银行卡号')
				}
				this.$message.error('请输入正确的银行卡号')
				throw new Error('请输入正确的银行卡号')
			}
		},
		handleAvatarSuccess(res, file, fileList, index, val) {
			console.log('foleList', fileList)
			if (val === 'front') {
				this.inputForm.socialSecurityPictureFront = '/' + res.url
				this.inputForm.socialSecurityPictureFrontUrl = res.lsUrl
				console.log('res.url', res.url)
				console.log('res.lsUrl', res.lsUrl)
			}
			this.hideUploadEdit = true
			this.$forceUpdate()
		},
		handleAvatarSuccess2(res, file, fileList, index, val) {
			console.log('foleList', fileList)
			if (val === 'front') {
				this.inputForm.socialSecurityPictureOpposite = '/' + res.url
				this.inputForm.socialSecurityPictureOppositeUrl = res.lsUrl
			}
			this.hideUploadEdit = true
			this.$forceUpdate()
		},
		onPreview(url) {
			if (url !== '' && url !== undefined && url !== null) {
				this.url = url
				this.showViewer = true
			}
		},
		checkIsPic(file) {
			return this.commonJS.isPic(file)
		},
		validateInput() {
			// 使用正则表达式验证输入内容，禁止中文
			this.inputForm.socialSecurityNumber = this.inputForm.socialSecurityNumber.replace(/[\u4e00-\u9fa5]/g, '');
		},
		bankHandleUploadSuccess(response, file, fileList) {
			return this.bankHandleAvatarSuccess(response, file, fileList, null, 'front')
		},
		bankHandleAvatarSuccess(res, file, fileList, index, val) {
			if (val === 'front') {
				this.inputForm.accountHolderFront = '/' + res.url
				this.inputForm.accountHolderFrontUrl = res.lsUrl
			}
			this.bankHideUploadEdit = true
			this.$forceUpdate()
		},
		bankHandlePictureCardPreview(file) {
			this.inputForm.accountHolderFrontUrl = file.url
			this.bankDialogVisible = true;
		},
		bankHandleDownload(file) {
			let file2 = {
				url: this.inputForm.accountHolderFront
			}
			toHref(file2)
		},
		bankHandleRemove(file, fileList) {
			this.bankHideUploadEdit = false
			// 如果需要删除图片信息，可以根据file或其他标识从相应的数据结构中删除信息
			const fileIndex = this.bankFileList.indexOf(file);
			if (fileIndex !== -1) {
				this.bankFileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
				this.inputForm.accountHolderFront = ""
			}
		},
		bankHandleUploadSuccess2(response, file, fileList) {
			return this.bankHandleAvatarSuccess2(response, file, fileList, null, 'front')
		},
		bankHandleAvatarSuccess2(res, file, fileList, index, val) {
			if (val === 'front') {
				this.inputForm.accountHolderOpposite = '/' + res.url
				this.inputForm.accountHolderOppositeUrl = res.lsUrl
			}
			this.bankHideUploadEdit2 = true
			this.$forceUpdate()
		},
		bankHandlePictureCardPreview2(file) {
			this.inputForm.accountHolderOppositeUrl = file.url
			this.bankDialogVisible2 = true;
		},
		bankHandleDownload2(file) {
			let file2 = {
				url: this.inputForm.accountHolderOpposite
			}
			toHref(file2)
		},
		bankHandleRemove2(file, fileList) {
			this.hideUploadEdit2 = false
			// 如果需要删除图片信息，可以根据file或其他标识从相应的数据结构中删除信息
			const fileIndex = this.bankFileList2.indexOf(file);
			if (fileIndex !== -1) {
				this.bankFileList2.splice(fileIndex, 1); // 从fileList中删除该图片信息
				this.inputForm.accountHolderOpposite = ""
			}
		},
		gsHandleUploadSuccess(response, file, fileList) {
			return this.gsHandleAvatarSuccess(response, file, fileList, null, 'front')
		},
		gsHandleUploadSuccess2(response, file, fileList) {
			return this.gsHandleAvatarSuccess2(response, file, fileList, null, 'front')
		},
		gsHandleAvatarSuccess(res, file, fileList, index, val) {
			if (val === 'front') {
				this.inputForm.gsAccountHolderFront = '/' + res.url
				this.inputForm.gsAccountHolderFrontUrl = res.lsUrl
			}
			this.hideUploadEdit = true
			this.$forceUpdate()
		},
		gsHandleAvatarSuccess2(res, file, fileList, index, val) {
			if (val === 'front') {
				this.inputForm.gsAccountHolderOpposite = '/' + res.url
				this.inputForm.gsAccountHolderOppositeUrl = res.lsUrl
			}
			this.hideUploadEdit2 = true
			this.$forceUpdate()
		},
		gsHandlePictureCardPreview(file) {
			this.dialogImageUrl = file.url;
			this.inputForm.gsAccountHolderFrontUrl = file.url
			this.gsDialogVisible = true;
		},
		gsHandlePictureCardPreview2(file) {
			this.inputForm.gsAccountHolderOppositeUrl = file.url
			this.gsDialogVisible2 = true;
		},
		gsHandleDownload(file) {
			let file2 = {
				url: this.inputForm.gsAccountHolderFront
			}
			toHref(file2)
		},
		gsHandleDownload2(file) {
			let file2 = {
				url: this.inputForm.gsAccountHolderOpposite
			}
			toHref(file2)
		},
		gsHandleRemove(file, fileList) {
			this.gsHideUploadEdit = false
			// 如果需要删除图片信息，可以根据file或其他标识从相应的数据结构中删除信息
			const fileIndex = this.gsFileList.indexOf(file);
			if (fileIndex !== -1) {
				this.gsFileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
				this.inputForm.gsAccountHolderFront = ""
			}
		},
		gsHandleRemove2(file, fileList) {
			this.gsHideUploadEdit2 = false
			// 如果需要删除图片信息，可以根据file或其他标识从相应的数据结构中删除信息
			const fileIndex = this.gsFileList2.indexOf(file);
			if (fileIndex !== -1) {
				this.gsFileList2.splice(fileIndex, 1); // 从fileList中删除该图片信息
				this.inputForm.gsAccountHolderOpposite = ""
			}
		},
	}
}
</script>
