Quellcode durchsuchen

企业认证添加上传公司照片以及在职证明功能

wkw vor 6 Monaten
Ursprung
Commit
a1c4b3e0e1

+ 93 - 14
src/components/header/header.vue

@@ -250,13 +250,13 @@
 										免费
 									</div>
 									<div class="myVipCon-li-con-items myVipCon-li-con-itemscolor2">
-										{{ trialVersion.money }}/
+										{{ trialVersion.money }}/{{ vipNameTypeText(trialVersion.vipNameType) }}
 									</div>
 									<div class="myVipCon-li-con-items myVipCon-li-con-itemscolor2">
-										{{ monthlyPayment.money }}/
+										{{ monthlyPayment.money }}/{{ vipNameTypeText(monthlyPayment.vipNameType) }}
 									</div>
 									<div class="myVipCon-li-con-items myVipCon-li-con-itemscolor2">
-										{{ annual.money }}/
+										{{ annual.money }}/{{ vipNameTypeText(annual.vipNameType) }}
 									</div>
 								</div>
 							</div>
@@ -537,7 +537,7 @@
 				</el-form-item> -->
 				<el-form-item prop="companyCertification"
 					:rules="[{required: true,message: '请上传营业执照照片',trigger: 'blur',},]" class="row45" label="营业执照">
-					<el-upload class="avatar-uploader flex align-center justify-center" :action="action"
+					<el-upload class="flex align-center justify-center" :action="action"
 						:show-file-list="false" :on-success="handleAvatarSuccessC">
 						<img style="width: 100px;height: 100px;border-radius: 6px;" v-if="form.companyCertification"
 							:src="form.companyCertification" />
@@ -546,17 +546,31 @@
 						</el-icon>
 					</el-upload>
 				</el-form-item>
-				<!-- <el-form-item prop="companyLogo" :rules="[{required: true,message: '请上传企业头像照片',trigger: 'blur',},]"
-					class="row45" label="企业头像">
-					<el-upload class="avatar-uploader flex align-center justify-center" :action="action"
-						:show-file-list="false" :on-success="handleAvatarSuccessL">
-						<img v-if="form.companyLogo" :src="form.companyLogo"
-							style="width: 100px;height: 100px;border-radius: 6px;" />
-						<el-icon v-else class="avatar-uploader-icon">
+
+				<!-- 公司证明(最多4张图片) -->
+				<el-form-item prop="companyVerification"
+					:rules="[{ required: true, message: '请上传公司证明图片', trigger: 'change' }]" class="row45" label="公司证明(最多上传 4 张公司证明图片)">
+					<el-upload list-type="picture-card" :action="action" :limit="4"
+						:file-list="proofFileList" :on-success="handleProofSuccess" :on-remove="handleProofRemove">
+						<el-icon v-if="proofFileList.length < 4" class="avatar-uploader-icon">
 							<Plus />
 						</el-icon>
 					</el-upload>
-				</el-form-item> -->
+					<!-- 预览弹窗 -->
+					<!-- <el-dialog v-model="dialogVisible" width="50%" height="300px">
+						<img :src="dialogImageUrl" alt="Preview" style="width: 100%" />
+					</el-dialog> -->
+				</el-form-item>
+
+				<!-- 在职证明(PDF 上传) -->
+				<el-form-item prop="employmentVerification"
+					:rules="[{ required: true, message: '请上传在职证明 PDF 文件', trigger: 'change' }]" class="row45"
+					label="在职证明(PDF)">
+					<el-upload :action="action" :limit="1" accept=".pdf" :file-list="pdfFileList"
+						:on-success="handlePdfSuccess" :on-remove="handlePdfRemove" :show-file-list="true">
+						<el-button v-if="pdfFileList.length === 0" type="primary">上传 PDF 文件</el-button>
+					</el-upload>
+				</el-form-item>
 
 				<div style="width: 100%;margin-top: 20px;" class="flex align-center justify-center">
 					<el-button @click="dialogCompay = false" style="width: 100px;" type="Info">取消</el-button>
@@ -720,6 +734,8 @@
 					companyDetails: '', //简介
 					companyLogo: '',
 					companyCertification: '', //营业执照
+					employmentVerification:'',//在职证明
+					companyVerification:[],//公司证明
 					email: '', //企业邮箱
 					province: '',
 					city: '',
@@ -788,7 +804,11 @@
 				remainingDays: 0, // 剩余天数
 				vipName: "",
 				hrEmail:'',
-				hrPosition:''
+				hrPosition:'',
+				pdfFileList: [],
+				proofFileList: [],
+				dialogImageUrl: '', // 预览图片URL
+				dialogVisible: false, // 预览图片是否可见
 			}
 		},
 		created() {
@@ -856,6 +876,19 @@
 			},
 		},
 		methods: {
+			// 点击预览
+			handlePreview(file) {
+				this.dialogImageUrl = file.url
+				this.dialogVisible = true
+			},
+			vipNameTypeText(value) {
+				const map = {
+					0: '月',
+					1: '季',
+					2: '年'
+				};
+				return map[value] || '月';
+			},
 			// 获取HR信息
 			getUserHrInfo() {
 				this.$Request.get("/app/HrFirst/getUserHr").then((res) => {
@@ -1202,7 +1235,9 @@
 						const data = {
 							companyAllName: form.companyName,
 							companyPeople: form.companyPeople,
-							companyCertification: form.companyCertification
+							companyCertification: form.companyCertification,
+							employmentVerification: form.employmentVerification,
+							companyVerification: form.companyVerification.join(',')
 						};
 						this.loadingCompany = true
 						this.$Request.post("/app/company/insertCompany", data,{type:'json'}).then(res=>{
@@ -1269,6 +1304,28 @@
 			handleAvatarSuccessC(res) {
 				this.form.companyCertification = res.data
 			},
+			// PDF 上传成功
+			handlePdfSuccess(res, file) {
+				this.form.employmentVerification = res.url
+				this.pdfFileList = [{ name: file.name, url: res.url }]
+			},
+			handlePdfRemove() {
+				this.form.employmentVerification = ''
+				this.pdfFileList = []
+			},
+			// 公司证明上传成功
+			handleProofSuccess(res, file, fileList) {
+				this.form.companyVerification = fileList.map(
+					item => item.response ? item.response.url : item.url
+				)
+				this.proofFileList = fileList
+			},
+			handleProofRemove(file, fileList) {
+				this.form.companyVerification = fileList.map(
+					item => item.response ? item.response.url : item.url
+				)
+				this.proofFileList = fileList
+			},
 			//上传公司logo
 			handleAvatarSuccessL(res) {
 				this.form.companyLogo = res.data
@@ -1733,7 +1790,29 @@
 
 <style lang="scss" scoped>
 	$margin-60: 120px;
+	:deep(.el-upload--picture-card){
+		width: 100px;
+		height: 100px;
+	}
+	:deep(.el-upload-list--picture-card .el-upload-list__item) {
+		width: 100px;
+		height: 100px;
+		border: none;
+	}
+
+	.avatar-uploader-icon {
+		color: var(--el-border-color);
+		font-size: 25px;
+		width: 100px;
+		height: 100px;
+		border-radius: 6px;
+		background: #f5f7fa;
+	}
 
+	:deep(.el-upload--picture-card) {
+		border: none !important;
+		width: initial !important;
+	}
 	:deep(.el-radio__label) {
 		display: flex;
 		align-items: center;

+ 16 - 8
src/components/postPush/postPush.vue

@@ -35,7 +35,7 @@
 
 					<el-form-item prop="positionTag" :rules="[{ required: true, message: '请选择跨境标签', trigger: 'blur', },]"
 						class="row45" label="跨境标签">
-						<el-input :disabled="type == 'updata' && postPushForm.status != 3" @click.stop="openIndustry()"
+						<el-input @click.stop="openIndustry()"
 							placeholder="请选择跨境标签" readonly class="inputClass" v-model="positionTagDisplay" />
 					</el-form-item>
 					
@@ -44,6 +44,10 @@
 						<el-autocomplete style="width: 100%;" @input="workInput" v-model="postPushForm.address"
 							:fetch-suggestions="querySearchAsync" placeholder="请输入工作地址" @select="handleSelect" />
 					</el-form-item>
+					<el-form-item prop="detailedAddress" :rules="[{ required: true, message: '请输入详细地址', trigger: 'blur', },]"
+						class="row45" label="详细地址">
+						<el-input placeholder="请输入详细地址" class="inputClass" v-model="postPushForm.detailedAddress" />
+					</el-form-item>
 					<el-form-item prop="experience" :rules="[{ required: true, message: '请选择经验要求', trigger: 'blur', },]"
 						class="row45" label="经验要求">
 						<el-select style="width: 100%;" v-model="postPushForm.experience" placeholder="请选择经验要求">
@@ -97,6 +101,7 @@
 						<Editor style="width: 100%;min-height: 200px;" v-model="postPushForm.positionDetails"
 							:defaultConfig="editorConfig" mode="default" @onCreated="handleCreated" />
 					</el-form-item>
+					<el-form-item class="row45"></el-form-item>
 					<el-form-item class="row45">
 						<!-- <div style="width: 100%;" class="flex align-center justify-end">
 							<el-checkbox v-model="checked" label="我已同意" size="large" />
@@ -292,6 +297,7 @@ export default {
 				lng: '',
 				lat: '',
 				companyId: localStorage.getItem('companyId'),
+				detailedAddress: '', //详细地址
 			},
 			minSalary:'',
 			maxSalary:'',
@@ -552,6 +558,7 @@ export default {
 			if (postPushId) {
 				data.postPushId = postPushId
 			}
+			data.address = data.address + '--' + data.detailedAddress
 			this.$Request.post('/app/postPush/savePostPush', data, {
 				type: 'json'
 			}).then(res => {
@@ -567,12 +574,12 @@ export default {
 
 				} else {
 					this.loadingPostpush = false
-					ElMessage({
-						message: res.msg,
-						type: 'error',
-						duration: 1500,
-						offset: this.screenHeight / 2
-					})
+					// ElMessage({
+					// 	message: res.msg,
+					// 	type: 'error',
+					// 	duration: 1500,
+					// 	offset: this.screenHeight / 2
+					// })
 				}
 			})
 		},
@@ -590,7 +597,8 @@ export default {
 					// this.postPushForm.stationName = obj.stationName
 					this.postPushForm.ruleClassifyName = obj.ruleClassifyName
 					this.postPushForm.ruleClassifyId = obj.ruleClassifyId
-					this.postPushForm.address = obj.address
+					this.postPushForm.address = obj.address.split('--')[0]
+					this.postPushForm.detailedAddress = obj.address.split('--')[1]
 					this.postPushForm.experience = obj.experience
 					this.postPushForm.education = obj.education
 					// this.postPushForm.salaryRange = obj.salaryRange

+ 8 - 20
src/views/myPostPush/myPostPush.vue

@@ -61,10 +61,12 @@
 									@click="closeJob(item.postPushId,'close')">关闭岗位</el-button>
 								<el-button v-if="item.status == 5"
 									@click="closeJob(item.postPushId,'open')">开启岗位</el-button>
+								<el-button v-if="item.status == 5"
+									@click="deletePosition(item.postPushId)">删除</el-button>
 								<el-button v-if="item.status == 1 || item.status == 3 || item.status == 4 || item.status == 6"
 									@click="updataServeType(item.postPushId,'save')">重新发布</el-button>
 								<el-button
-									v-if="item.status == 1 || item.status==6"
+									v-if="item.status == 1 || item.status == 5 || item.status==6"
 									@click="updataServeType(item.postPushId,'updata')">修改内容</el-button>
 							</div>
 						</div>
@@ -181,10 +183,10 @@
 					this.dialogPostPush = true
 				}
 			},
-			//取消招聘
-			cancelProject(postPushId) {
+			//删除岗位
+			deletePosition(postPushId) {
 				ElMessageBox.confirm(
-					'确认取消该招聘?',
+					'确认删除该岗位?',
 					'温馨提示', {
 						confirmButtonText: '确认',
 						cancelButtonText: '取消',
@@ -194,22 +196,15 @@
 					let data = {
 						postPushId: postPushId
 					}
-					this.$Request.post('/app/postPush/cancelPostPush', data).then(res => {
+					this.$Request.post('/app/postPush/deletePostPush', data).then(res => {
 						if (res.code == 0) {
 							ElMessage({
-								message: '取消成功',
+								message: '删除成功',
 								type: 'success',
 								duration: 1500,
 								offset: this.screenHeight / 2
 							})
 							this.getlist()
-						} else {
-							ElMessage({
-								message: res.msg,
-								type: 'error',
-								duration: 1500,
-								offset: this.screenHeight / 2
-							})
 						}
 					})
 				}).catch(() => {
@@ -240,13 +235,6 @@
 								offset: this.screenHeight / 2
 							})
 							this.getlist()
-						} else {
-							ElMessage({
-								message: res.msg,
-								type: 'error',
-								duration: 1500,
-								offset: this.screenHeight / 2
-							})
 						}
 					})
 				}).catch(() => {