12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const common_config = require("../../common/config.js");
- const _sfc_main = {
- data() {
- return {
- // 添加承诺书相关数据
- showPromiseModal: true,
- promiseChecked: false,
- formData: {
- name: "",
- gender: "",
- threePeriod: "",
- birthDate: "",
- idCard: "",
- political: "",
- ethnic: "",
- height: "",
- weight: "",
- nativePlace: "",
- residence: "",
- marriage: "",
- expectedSalary: "",
- phone: "",
- email: "",
- currentAddress: "",
- emergencyContact: "",
- emergencyPhone: "",
- hobby: "",
- motto: "",
- // 添加应聘来源相关字段
- sourceType: "social",
- // 默认为社招
- socialSource: "",
- // 社招来源
- otherSocialSource: "",
- // 其他社招来源
- otherSchoolSource: "",
- // 其他学校来源
- // 添加技能和培训字段
- skills: "",
- training: ""
- },
- genderOptions: ["男", "女"],
- genderIndex: -1,
- threePeriodOptions: ["无", "孕期", "产期", "哺乳期"],
- threePeriodIndex: -1,
- politicalOptions: ["群众", "共青团员", "中共党员", "民主党派"],
- politicalIndex: -1,
- ethnicOptions: ["汉族", "蒙古族", "回族", "藏族", "维吾尔族", "其他"],
- ethnicIndex: -1,
- marriageOptions: ["未婚", "已婚", "离异", "丧偶"],
- marriageIndex: -1,
- familyMembers: [],
- familyMemberForm: {
- relation: "",
- name: "",
- workplaceOrAddress: "",
- position: "",
- phone: ""
- },
- isEditing: false,
- editingIndex: -1,
- // 添加教育经历相关数据
- educationList: [],
- educationForm: {
- startTime: "",
- endTime: "",
- schoolName: "",
- major: "",
- degree: ""
- },
- isEditingEducation: false,
- editingEducationIndex: -1,
- degreeOptions: ["高中", "中专", "大专", "本科", "硕士", "博士"],
- degreeIndex: -1,
- // 添加工作经历相关数据
- workList: [],
- workForm: {
- startTime: "",
- endTime: "",
- companyName: "",
- department: "",
- employeeCount: "",
- position: "",
- monthlySalary: "",
- supervisor: "",
- supervisorPhone: ""
- },
- isEditingWork: false,
- editingWorkIndex: -1,
- // 添加步骤控制
- currentStep: 1,
- steps: [
- { id: 1, name: "个人基本信息" },
- { id: 2, name: "紧急联系人信息" },
- { id: 3, name: "家庭成员信息" },
- { id: 4, name: "应聘来源" },
- { id: 5, name: "教育经历" },
- { id: 6, name: "专业技能" },
- { id: 7, name: "培训经历" },
- { id: 8, name: "工作经历" },
- { id: 9, name: "确认提交" }
- ],
- formErrors: {
- name: "",
- idCard: "",
- phone: ""
- }
- };
- },
- methods: {
- // 添加承诺书相关方法
- togglePromiseChecked() {
- this.promiseChecked = !this.promiseChecked;
- },
- confirmPromise() {
- if (this.promiseChecked) {
- this.showPromiseModal = false;
- } else {
- common_vendor.index.showToast({
- title: "请先阅读并同意承诺书内容",
- icon: "none"
- });
- }
- },
- bindGenderChange(e) {
- this.genderIndex = e.detail.value;
- this.formData.gender = this.genderOptions[this.genderIndex];
- if (this.formData.gender !== "女") {
- this.formData.threePeriod = "";
- this.threePeriodIndex = -1;
- }
- },
- bindThreePeriodChange(e) {
- this.threePeriodIndex = e.detail.value;
- this.formData.threePeriod = this.threePeriodOptions[this.threePeriodIndex];
- },
- bindPoliticalChange(e) {
- this.politicalIndex = e.detail.value;
- this.formData.political = this.politicalOptions[this.politicalIndex];
- },
- bindEthnicChange(e) {
- this.ethnicIndex = e.detail.value;
- this.formData.ethnic = this.ethnicOptions[this.ethnicIndex];
- },
- bindMarriageChange(e) {
- this.marriageIndex = e.detail.value;
- this.formData.marriage = this.marriageOptions[this.marriageIndex];
- },
- bindDateChange(e) {
- this.formData.birthDate = e.detail.value;
- },
- saveFamilyMember() {
- if (!this.familyMemberForm.relation) {
- common_vendor.index.showToast({
- title: "请输入称谓",
- icon: "none"
- });
- return;
- }
- if (!this.familyMemberForm.name) {
- common_vendor.index.showToast({
- title: "请输入姓名",
- icon: "none"
- });
- return;
- }
- if (!this.familyMemberForm.phone) {
- common_vendor.index.showToast({
- title: "请输入联系电话",
- icon: "none"
- });
- return;
- }
- if (this.isEditing) {
- this.familyMembers[this.editingIndex] = { ...this.familyMemberForm };
- common_vendor.index.showToast({
- title: "修改成功",
- icon: "success"
- });
- this.isEditing = false;
- this.editingIndex = -1;
- } else {
- this.familyMembers.push({ ...this.familyMemberForm });
- common_vendor.index.showToast({
- title: "添加成功",
- icon: "success"
- });
- }
- this.familyMemberForm = {
- relation: "",
- name: "",
- workplaceOrAddress: "",
- position: "",
- phone: ""
- };
- },
- editFamilyMember(index) {
- this.isEditing = true;
- this.editingIndex = index;
- this.familyMemberForm = { ...this.familyMembers[index] };
- common_vendor.index.pageScrollTo({
- selector: ".family-member-form",
- duration: 300
- });
- },
- cancelEdit() {
- this.isEditing = false;
- this.editingIndex = -1;
- this.familyMemberForm = {
- relation: "",
- name: "",
- workplaceOrAddress: "",
- position: "",
- phone: ""
- };
- },
- deleteFamilyMember(index) {
- if (this.isEditing && this.editingIndex === index) {
- this.cancelEdit();
- }
- this.familyMembers.splice(index, 1);
- common_vendor.index.showToast({
- title: "已删除",
- icon: "none"
- });
- },
- // 选择应聘来源类型
- selectSourceType(type) {
- this.formData.sourceType = type;
- if (type === "social") {
- this.formData.socialSource = "BOSS";
- } else {
- this.formData.socialSource = "";
- }
- },
- // 选择社招来源
- selectSocialSource(source) {
- this.formData.sourceType = "social";
- this.formData.socialSource = source;
- },
- // 教育经历相关方法
- bindStartTimeChange(e) {
- this.educationForm.startTime = e.detail.value;
- },
- bindEndTimeChange(e) {
- this.educationForm.endTime = e.detail.value;
- },
- bindDegreeChange(e) {
- this.degreeIndex = e.detail.value;
- this.educationForm.degree = this.degreeOptions[this.degreeIndex];
- },
- saveEducation() {
- if (!this.educationForm.startTime) {
- common_vendor.index.showToast({
- title: "请选择开始时间",
- icon: "none"
- });
- return;
- }
- if (!this.educationForm.endTime) {
- common_vendor.index.showToast({
- title: "请选择结束时间",
- icon: "none"
- });
- return;
- }
- if (!this.educationForm.schoolName) {
- common_vendor.index.showToast({
- title: "请输入学校名称",
- icon: "none"
- });
- return;
- }
- if (!this.educationForm.major) {
- common_vendor.index.showToast({
- title: "请输入专业",
- icon: "none"
- });
- return;
- }
- if (!this.educationForm.degree) {
- common_vendor.index.showToast({
- title: "请选择学历",
- icon: "none"
- });
- return;
- }
- if (this.isEditingEducation) {
- this.educationList[this.editingEducationIndex] = { ...this.educationForm };
- common_vendor.index.showToast({
- title: "修改成功",
- icon: "success"
- });
- this.isEditingEducation = false;
- this.editingEducationIndex = -1;
- } else {
- this.educationList.push({ ...this.educationForm });
- common_vendor.index.showToast({
- title: "添加成功",
- icon: "success"
- });
- }
- this.educationForm = {
- startTime: "",
- endTime: "",
- schoolName: "",
- major: "",
- degree: ""
- };
- this.degreeIndex = -1;
- },
- editEducation(index) {
- this.isEditingEducation = true;
- this.editingEducationIndex = index;
- this.educationForm = { ...this.educationList[index] };
- this.degreeIndex = this.degreeOptions.findIndex((item) => item === this.educationForm.degree);
- common_vendor.index.pageScrollTo({
- selector: ".education-form",
- duration: 300
- });
- },
- cancelEditEducation() {
- this.isEditingEducation = false;
- this.editingEducationIndex = -1;
- this.educationForm = {
- startTime: "",
- endTime: "",
- schoolName: "",
- major: "",
- degree: ""
- };
- this.degreeIndex = -1;
- },
- deleteEducation(index) {
- if (this.isEditingEducation && this.editingEducationIndex === index) {
- this.cancelEditEducation();
- }
- this.educationList.splice(index, 1);
- common_vendor.index.showToast({
- title: "已删除",
- icon: "none"
- });
- },
- // 工作经历相关方法
- bindWorkStartTimeChange(e) {
- this.workForm.startTime = e.detail.value;
- },
- bindWorkEndTimeChange(e) {
- this.workForm.endTime = e.detail.value;
- },
- saveWork() {
- if (!this.workForm.startTime) {
- common_vendor.index.showToast({
- title: "请选择开始时间",
- icon: "none"
- });
- return;
- }
- if (!this.workForm.endTime) {
- common_vendor.index.showToast({
- title: "请选择结束时间",
- icon: "none"
- });
- return;
- }
- if (!this.workForm.companyName) {
- common_vendor.index.showToast({
- title: "请输入单位名称",
- icon: "none"
- });
- return;
- }
- if (!this.workForm.department) {
- common_vendor.index.showToast({
- title: "请输入任职部门",
- icon: "none"
- });
- return;
- }
- if (!this.workForm.position) {
- common_vendor.index.showToast({
- title: "请输入担任职务",
- icon: "none"
- });
- return;
- }
- if (this.isEditingWork) {
- this.workList[this.editingWorkIndex] = { ...this.workForm };
- common_vendor.index.showToast({
- title: "修改成功",
- icon: "success"
- });
- this.isEditingWork = false;
- this.editingWorkIndex = -1;
- } else {
- this.workList.push({ ...this.workForm });
- common_vendor.index.showToast({
- title: "添加成功",
- icon: "success"
- });
- }
- this.workForm = {
- startTime: "",
- endTime: "",
- companyName: "",
- department: "",
- employeeCount: "",
- position: "",
- monthlySalary: "",
- supervisor: "",
- supervisorPhone: ""
- };
- },
- editWork(index) {
- this.isEditingWork = true;
- this.editingWorkIndex = index;
- this.workForm = { ...this.workList[index] };
- common_vendor.index.pageScrollTo({
- selector: ".work-form",
- duration: 300
- });
- },
- cancelEditWork() {
- this.isEditingWork = false;
- this.editingWorkIndex = -1;
- this.workForm = {
- startTime: "",
- endTime: "",
- companyName: "",
- department: "",
- employeeCount: "",
- position: "",
- monthlySalary: "",
- supervisor: "",
- supervisorPhone: ""
- };
- },
- deleteWork(index) {
- if (this.isEditingWork && this.editingWorkIndex === index) {
- this.cancelEditWork();
- }
- this.workList.splice(index, 1);
- common_vendor.index.showToast({
- title: "已删除",
- icon: "none"
- });
- },
- submitForm() {
- if (!this.formData.name) {
- common_vendor.index.showToast({
- title: "请输入姓名",
- icon: "none"
- });
- return;
- }
- if (this.genderIndex === -1) {
- common_vendor.index.showToast({
- title: "请选择性别",
- icon: "none"
- });
- return;
- }
- if (this.formData.gender === "女" && this.threePeriodIndex === -1) {
- common_vendor.index.showToast({
- title: "请选择是否为三期",
- icon: "none"
- });
- return;
- }
- if (!this.formData.emergencyContact) {
- common_vendor.index.showToast({
- title: "请输入紧急联系人",
- icon: "none"
- });
- return;
- }
- if (!this.formData.emergencyPhone) {
- common_vendor.index.showToast({
- title: "请输入紧急联系人电话",
- icon: "none"
- });
- return;
- }
- if (this.familyMembers.length === 0) {
- common_vendor.index.showToast({
- title: "请至少添加一位家庭成员",
- icon: "none"
- });
- return;
- }
- if (this.formData.sourceType === "school" && !this.formData.otherSchoolSource) {
- common_vendor.index.showToast({
- title: "请填写学校来源",
- icon: "none"
- });
- return;
- }
- if (this.formData.sourceType === "social") {
- if (!this.formData.socialSource) {
- common_vendor.index.showToast({
- title: "请选择社招来源",
- icon: "none"
- });
- return;
- }
- if (this.formData.socialSource === "other" && !this.formData.otherSocialSource) {
- common_vendor.index.showToast({
- title: "请填写其他社招来源",
- icon: "none"
- });
- return;
- }
- }
- if (this.educationList.length === 0) {
- common_vendor.index.showToast({
- title: "请至少添加一项教育经历",
- icon: "none"
- });
- return;
- }
- if (this.workList.length === 0) {
- common_vendor.index.showToast({
- title: "请至少添加一项工作经历",
- icon: "none"
- });
- return;
- }
- const submitData = {
- tenant_id: 1,
- user_id: JSON.parse(common_vendor.index.getStorageSync("userInfo")).id,
- // 从存储中获取用户ID
- personal_info: {
- name: this.formData.name,
- gender: this.formData.gender,
- birth_date: this.formData.birthDate,
- phone: this.formData.phone,
- id_card: this.formData.idCard,
- email: this.formData.email,
- address: this.formData.currentAddress,
- professional_skills: this.formData.skills ? this.formData.skills.split(",") : []
- },
- profile: {
- // 女性特殊状态映射
- female_status: this.formData.gender === "女" ? this.formData.threePeriod === "孕期" ? 1 : this.formData.threePeriod === "产期" ? 2 : this.formData.threePeriod === "哺乳期" ? 3 : 0 : 0,
- // 婚姻状况映射
- marital_status: this.formData.marriage === "未婚" ? 0 : this.formData.marriage === "已婚" ? 1 : this.formData.marriage === "离异" ? 2 : this.formData.marriage === "丧偶" ? 3 : 0,
- height: parseFloat(this.formData.height) || 0,
- weight: parseFloat(this.formData.weight) || 0,
- political_status: this.formData.political,
- ethnicity: this.formData.ethnic,
- native_place: this.formData.nativePlace,
- household_location: this.formData.residence,
- current_address: this.formData.currentAddress,
- expected_salary: parseFloat(this.formData.expectedSalary) || 0,
- emergency_contact: this.formData.emergencyContact,
- emergency_phone: this.formData.emergencyPhone,
- specialties: this.formData.hobby,
- life_motto: this.formData.motto,
- // 应聘来源映射
- recruitment_source: this.formData.sourceType === "social" ? this.formData.socialSource === "BOSS" ? 2 : this.formData.socialSource === "zhilian" ? 3 : this.formData.socialSource === "liepin" ? 4 : 5 : 1,
- recruitment_source_detail: this.formData.sourceType === "social" ? this.formData.socialSource === "other" ? this.formData.otherSocialSource : this.formData.socialSource === "BOSS" ? "BOSS直聘" : this.formData.socialSource === "zhilian" ? "智联招聘" : this.formData.socialSource === "liepin" ? "猎聘" : "" : this.formData.otherSchoolSource
- },
- // 教育经历映射
- education: this.educationList.map((edu, index) => ({
- education_type: index === 0 ? 1 : 2,
- // 第一个为第一学历,第二个为最高学历
- degree: this.mapDegreeToNumber(edu.degree),
- start_date: edu.startTime,
- end_date: edu.endTime,
- school_name: edu.schoolName,
- major: edu.major
- })),
- // 家庭成员映射
- family_members: this.familyMembers.map((member) => ({
- relation: member.relation,
- name: member.name,
- workplace: member.workplaceOrAddress,
- position: member.position,
- phone: member.phone
- })),
- // 工作经历映射
- work_experiences: this.workList.map((work) => ({
- start_date: work.startTime,
- end_date: work.endTime,
- company_name: work.companyName,
- //单位名称
- department: work.department,
- //任职部门
- company_size: work.employeeCount,
- //员工人数
- position: work.position,
- //担任职务
- monthly_salary: work.monthlySalary,
- //月薪
- supervisor_name: work.supervisor,
- //直属上级
- supervisor_phone: work.supervisorPhone
- //直属上级电话
- }))
- // 培训经历可以从技能和培训文本框中提取
- /* trainings: this.formData.training ? [{
- training_name: "培训经历",
- description: this.formData.training
- }] : [] */
- };
- console.log("提交的表单数据:", submitData);
- common_vendor.index.showLoading({
- title: "提交中..."
- });
- common_vendor.index.request({
- url: `${common_config.apiBaseUrl}/wechat/user/profile/update`,
- // 根据实际API路径调整
- method: "POST",
- data: submitData,
- success: (res) => {
- common_vendor.index.hideLoading();
- this.formErrors = {
- name: "",
- idCard: "",
- phone: ""
- };
- if (res.data.code === 2e3) {
- this.currentStep++;
- common_vendor.index.switchTab({
- url: "/pages/index/index"
- });
- } else {
- let errorMsg = res.data.msg || "身份验证失败";
- common_vendor.index.showToast({
- title: errorMsg,
- icon: "none",
- duration: 2e3
- });
- }
- },
- fail: (err) => {
- common_vendor.index.hideLoading();
- common_vendor.index.showToast({
- title: "网络错误,请检查网络连接",
- icon: "none"
- });
- console.error("提交失败:", err);
- }
- });
- },
- // 学历映射辅助方法
- mapDegreeToNumber(degreeText) {
- const degreeMap = {
- "高中": 1,
- "中专": 1,
- "大专": 2,
- "本科": 3,
- "硕士": 4,
- "博士": 5
- };
- return degreeMap[degreeText] || 6;
- },
- prevStep() {
- if (this.currentStep > 1) {
- this.currentStep--;
- common_vendor.index.pageScrollTo({
- scrollTop: 0,
- duration: 300
- });
- }
- },
- nextStep() {
- if (!this.validateCurrentStep()) {
- return;
- }
- if (this.currentStep === 1) {
- this.formErrors = {
- name: "",
- idCard: "",
- phone: ""
- };
- common_vendor.index.showLoading({
- title: "身份验证中..."
- });
- common_vendor.index.request({
- url: `${common_config.apiBaseUrl}/wechat/identity/verify`,
- method: "POST",
- data: {
- name: this.formData.name,
- id_number: this.formData.idCard,
- mobile: this.formData.phone
- },
- header: {
- "content-type": "application/x-www-form-urlencoded"
- },
- success: (res) => {
- common_vendor.index.hideLoading();
- if (res.data.code === 200) {
- this.currentStep++;
- common_vendor.index.pageScrollTo({
- scrollTop: 0,
- duration: 300
- });
- } else {
- res.data.msg || "身份验证失败";
- this.formErrors.name = "姓名验证失败,请检查姓名是否正确";
- this.formErrors.idCard = "身份证号验证失败,请检查身份证号是否正确";
- this.formErrors.phone = "手机号验证失败,请检查手机号是否正确";
- }
- },
- fail: (err) => {
- common_vendor.index.hideLoading();
- common_vendor.index.showToast({
- title: "网络错误,请检查网络连接",
- icon: "none",
- duration: 2e3
- });
- console.error("身份验证请求失败:", err);
- }
- });
- } else {
- if (this.currentStep < this.steps.length) {
- this.currentStep++;
- common_vendor.index.pageScrollTo({
- scrollTop: 0,
- duration: 300
- });
- }
- }
- },
- // 验证当前步骤的必填项
- validateCurrentStep() {
- switch (this.currentStep) {
- case 1:
- if (!this.formData.name) {
- common_vendor.index.showToast({
- title: "请输入姓名",
- icon: "none"
- });
- return false;
- }
- if (this.genderIndex === -1) {
- common_vendor.index.showToast({
- title: "请选择性别",
- icon: "none"
- });
- return false;
- }
- if (this.formData.gender === "女" && this.threePeriodIndex === -1) {
- common_vendor.index.showToast({
- title: "请选择是否为三期",
- icon: "none"
- });
- return false;
- }
- return true;
- case 2:
- if (!this.formData.emergencyContact) {
- common_vendor.index.showToast({
- title: "请输入紧急联系人",
- icon: "none"
- });
- return false;
- }
- if (!this.formData.emergencyPhone) {
- common_vendor.index.showToast({
- title: "请输入紧急联系人电话",
- icon: "none"
- });
- return false;
- }
- return true;
- case 3:
- if (this.familyMembers.length === 0) {
- common_vendor.index.showToast({
- title: "请至少添加一位家庭成员",
- icon: "none"
- });
- return false;
- }
- return true;
- case 4:
- if (this.formData.sourceType === "school" && !this.formData.otherSchoolSource) {
- common_vendor.index.showToast({
- title: "请填写学校来源",
- icon: "none"
- });
- return false;
- }
- if (this.formData.sourceType === "social") {
- if (!this.formData.socialSource) {
- common_vendor.index.showToast({
- title: "请选择社招来源",
- icon: "none"
- });
- return false;
- }
- if (this.formData.socialSource === "other" && !this.formData.otherSocialSource) {
- common_vendor.index.showToast({
- title: "请填写其他社招来源",
- icon: "none"
- });
- return false;
- }
- }
- return true;
- case 5:
- if (this.educationList.length === 0) {
- common_vendor.index.showToast({
- title: "请至少添加一项教育经历",
- icon: "none"
- });
- return false;
- }
- return true;
- case 6:
- return true;
- case 7:
- return true;
- case 8:
- if (this.workList.length === 0) {
- common_vendor.index.showToast({
- title: "请至少添加一项工作经历",
- icon: "none"
- });
- return false;
- }
- return true;
- default:
- return true;
- }
- }
- },
- // 添加监听器来清除错误信息
- watch: {
- "formData.name": function(newVal) {
- if (newVal && this.formErrors.name) {
- this.formErrors.name = "";
- }
- },
- "formData.idCard": function(newVal) {
- if (newVal && this.formErrors.idCard) {
- this.formErrors.idCard = "";
- }
- },
- "formData.phone": function(newVal) {
- if (newVal && this.formErrors.phone) {
- this.formErrors.phone = "";
- }
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: $data.showPromiseModal
- }, $data.showPromiseModal ? {
- b: $data.promiseChecked,
- c: common_vendor.o((...args) => $options.togglePromiseChecked && $options.togglePromiseChecked(...args)),
- d: !$data.promiseChecked,
- e: common_vendor.o((...args) => $options.confirmPromise && $options.confirmPromise(...args))
- } : {}, {
- f: $data.currentStep === 1
- }, $data.currentStep === 1 ? common_vendor.e({
- g: $data.formErrors.name ? 1 : "",
- h: $data.formData.name,
- i: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
- j: $data.formErrors.name
- }, $data.formErrors.name ? {
- k: common_vendor.t($data.formErrors.name)
- } : {}, {
- l: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
- m: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
- n: $data.genderIndex,
- o: $data.genderOptions,
- p: $data.formData.gender === "女"
- }, $data.formData.gender === "女" ? {
- q: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
- r: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
- s: $data.threePeriodIndex,
- t: $data.threePeriodOptions
- } : {}, {
- v: $data.formErrors.phone ? 1 : "",
- w: $data.formData.phone,
- x: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
- y: $data.formErrors.phone
- }, $data.formErrors.phone ? {
- z: common_vendor.t($data.formErrors.phone)
- } : {}, {
- A: $data.formErrors.idCard ? 1 : "",
- B: $data.formData.idCard,
- C: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
- D: $data.formErrors.idCard
- }, $data.formErrors.idCard ? {
- E: common_vendor.t($data.formErrors.idCard)
- } : {}, {
- F: common_vendor.t($data.politicalOptions[$data.politicalIndex] || "请选择政治面貌"),
- G: common_vendor.o((...args) => $options.bindPoliticalChange && $options.bindPoliticalChange(...args)),
- H: $data.politicalIndex,
- I: $data.politicalOptions,
- J: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
- K: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
- L: $data.ethnicIndex,
- M: $data.ethnicOptions,
- N: $data.formData.height,
- O: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
- P: $data.formData.weight,
- Q: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
- R: $data.formData.nativePlace,
- S: common_vendor.o(($event) => $data.formData.nativePlace = $event.detail.value),
- T: $data.formData.residence,
- U: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
- V: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
- W: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
- X: $data.marriageIndex,
- Y: $data.marriageOptions,
- Z: $data.formData.expectedSalary,
- aa: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
- }) : {}, {
- ab: $data.currentStep === 2
- }, $data.currentStep === 2 ? {
- ac: $data.formData.email,
- ad: common_vendor.o(($event) => $data.formData.email = $event.detail.value),
- ae: $data.formData.currentAddress,
- af: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
- ag: $data.formData.emergencyContact,
- ah: common_vendor.o(($event) => $data.formData.emergencyContact = $event.detail.value),
- ai: $data.formData.emergencyPhone,
- aj: common_vendor.o(($event) => $data.formData.emergencyPhone = $event.detail.value),
- ak: $data.formData.hobby,
- al: common_vendor.o(($event) => $data.formData.hobby = $event.detail.value),
- am: $data.formData.motto,
- an: common_vendor.o(($event) => $data.formData.motto = $event.detail.value)
- } : {}, {
- ao: $data.currentStep === 3
- }, $data.currentStep === 3 ? common_vendor.e({
- ap: $data.familyMembers.length > 0
- }, $data.familyMembers.length > 0 ? {
- aq: common_vendor.f($data.familyMembers, (member, index, i0) => {
- return {
- a: common_vendor.t(index + 1),
- b: common_vendor.o(($event) => $options.editFamilyMember(index), index),
- c: common_vendor.o(($event) => $options.deleteFamilyMember(index), index),
- d: common_vendor.t(member.relation),
- e: common_vendor.t(member.name),
- f: common_vendor.t(member.workplaceOrAddress),
- g: common_vendor.t(member.position),
- h: common_vendor.t(member.phone),
- i: index
- };
- })
- } : {}, {
- ar: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
- as: $data.isEditing
- }, $data.isEditing ? {
- at: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
- } : {}, {
- av: $data.familyMemberForm.relation,
- aw: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
- ax: $data.familyMemberForm.name,
- ay: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
- az: $data.familyMemberForm.workplaceOrAddress,
- aA: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
- aB: $data.familyMemberForm.position,
- aC: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
- aD: $data.familyMemberForm.phone,
- aE: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
- aF: common_vendor.t($data.isEditing ? "✓" : "+"),
- aG: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
- aH: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
- }) : {}, {
- aI: $data.currentStep === 4
- }, $data.currentStep === 4 ? {
- aJ: $data.formData.sourceType === "social" && $data.formData.socialSource === "BOSS",
- aK: common_vendor.o(($event) => $options.selectSocialSource("BOSS")),
- aL: $data.formData.sourceType === "social" && $data.formData.socialSource === "zhilian",
- aM: common_vendor.o(($event) => $options.selectSocialSource("zhilian")),
- aN: $data.formData.sourceType === "social" && $data.formData.socialSource === "liepin",
- aO: common_vendor.o(($event) => $options.selectSocialSource("liepin")),
- aP: $data.formData.sourceType !== "social" || $data.formData.socialSource !== "other",
- aQ: common_vendor.o(($event) => $options.selectSocialSource("other")),
- aR: $data.formData.otherSocialSource,
- aS: common_vendor.o(($event) => $data.formData.otherSocialSource = $event.detail.value)
- } : {}, {
- aT: $data.currentStep === 5
- }, $data.currentStep === 5 ? common_vendor.e({
- aU: $data.educationList.length > 0
- }, $data.educationList.length > 0 ? {
- aV: common_vendor.f($data.educationList, (edu, index, i0) => {
- return {
- a: common_vendor.t(index === 0 ? "第一学历" : "最高学历"),
- b: common_vendor.o(($event) => $options.editEducation(index), index),
- c: common_vendor.o(($event) => $options.deleteEducation(index), index),
- d: common_vendor.t(edu.startTime),
- e: common_vendor.t(edu.endTime),
- f: common_vendor.t(edu.schoolName),
- g: common_vendor.t(edu.major),
- h: common_vendor.t(edu.degree),
- i: index
- };
- })
- } : {}, {
- aW: $data.educationList.length < 2 || $data.isEditingEducation
- }, $data.educationList.length < 2 || $data.isEditingEducation ? common_vendor.e({
- aX: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
- aY: $data.isEditingEducation
- }, $data.isEditingEducation ? {
- aZ: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
- } : {}, {
- ba: common_vendor.t($data.educationForm.startTime || "开始时间"),
- bb: $data.educationForm.startTime,
- bc: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
- bd: common_vendor.t($data.educationForm.endTime || "结束时间"),
- be: $data.educationForm.endTime,
- bf: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
- bg: $data.educationForm.schoolName,
- bh: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
- bi: $data.educationForm.major,
- bj: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
- bk: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
- bl: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
- bm: $data.degreeIndex,
- bn: $data.degreeOptions,
- bo: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
- bp: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
- bq: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
- }) : {}) : {}, {
- br: $data.currentStep === 6
- }, $data.currentStep === 6 ? {
- bs: $data.formData.skills,
- bt: common_vendor.o(($event) => $data.formData.skills = $event.detail.value)
- } : {}, {
- bv: $data.currentStep === 7
- }, $data.currentStep === 7 ? {
- bw: $data.formData.training,
- bx: common_vendor.o(($event) => $data.formData.training = $event.detail.value)
- } : {}, {
- by: $data.currentStep === 8
- }, $data.currentStep === 8 ? common_vendor.e({
- bz: $data.workList.length > 0
- }, $data.workList.length > 0 ? {
- bA: common_vendor.f($data.workList, (work, index, i0) => {
- return {
- a: common_vendor.t(index + 1),
- b: common_vendor.o(($event) => $options.editWork(index), index),
- c: common_vendor.o(($event) => $options.deleteWork(index), index),
- d: common_vendor.t(work.startTime),
- e: common_vendor.t(work.endTime),
- f: common_vendor.t(work.companyName),
- g: common_vendor.t(work.department),
- h: common_vendor.t(work.employeeCount),
- i: common_vendor.t(work.position),
- j: common_vendor.t(work.monthlySalary),
- k: common_vendor.t(work.supervisor),
- l: common_vendor.t(work.supervisorPhone),
- m: index
- };
- })
- } : {}, {
- bB: $data.workList.length < 2 || $data.isEditingWork
- }, $data.workList.length < 2 || $data.isEditingWork ? common_vendor.e({
- bC: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
- bD: $data.isEditingWork
- }, $data.isEditingWork ? {
- bE: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
- } : {}, {
- bF: common_vendor.t($data.workForm.startTime || "开始时间"),
- bG: $data.workForm.startTime,
- bH: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
- bI: common_vendor.t($data.workForm.endTime || "结束时间"),
- bJ: $data.workForm.endTime,
- bK: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
- bL: $data.workForm.companyName,
- bM: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
- bN: $data.workForm.employeeCount,
- bO: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
- bP: $data.workForm.department,
- bQ: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
- bR: $data.workForm.position,
- bS: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
- bT: $data.workForm.monthlySalary,
- bU: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
- bV: $data.workForm.supervisor,
- bW: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
- bX: $data.workForm.supervisorPhone,
- bY: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
- bZ: common_vendor.t($data.isEditingWork ? "✓" : "+"),
- ca: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
- cb: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
- }) : {}) : {}, {
- cc: $data.currentStep === 9
- }, $data.currentStep === 9 ? {
- cd: common_vendor.t($data.formData.name),
- ce: common_vendor.t($data.formData.gender)
- } : {}, {
- cf: $data.currentStep > 1
- }, $data.currentStep > 1 ? {
- cg: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
- } : {}, {
- ch: $data.currentStep < $data.steps.length
- }, $data.currentStep < $data.steps.length ? {
- ci: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
- } : {}, {
- cj: $data.currentStep === $data.steps.length
- }, $data.currentStep === $data.steps.length ? {
- ck: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
- } : {});
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
- wx.createPage(MiniProgramPage);
|