From 29dfdea250de9a27b911b2e9bd80931b2dfffaf6 Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Wed, 4 Jun 2025 19:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 3 +- root/detail/job.vue | 442 ++++++++++---------------------------- root/person/memberApplyAdd.vue | 18 +- root/person/memberApplyQRCode.vue | 2 +- 4 files changed, 127 insertions(+), 338 deletions(-) diff --git a/pages.json b/pages.json index 94d0bd9..432abe1 100644 --- a/pages.json +++ b/pages.json @@ -208,7 +208,7 @@ "backgroundColorBottom": "#f5f5f5" } }, - { + { "path": "memberApplyQRCode", "style": { "navigationBarTitleText": "添加成员", @@ -217,7 +217,6 @@ "backgroundColorBottom": "#f5f5f5" } }, - { "path": "memberApplyAdd", "style": { diff --git a/root/detail/job.vue b/root/detail/job.vue index c0be546..ca4e4fa 100644 --- a/root/detail/job.vue +++ b/root/detail/job.vue @@ -143,254 +143,35 @@ --> - - 温馨提示 - {{ jobDetail.notes || "-" }} - 薪资待遇 - - - 薪资明细 - - {{ jobDetail.salaryDetail || "-" }} - - - - {{ jobDetail.daotian == 1 ? "发薪日" : "薪资发放" }} - - {{ jobDetail.payDay || "-" }} - - - - 银行卡 - - {{ jobDetail.bankInfo || "-" }} - - - - 保险 - - {{ jobDetail.employeeInsurance || "-" }} - - - - 押金 - - {{ jobDetail.foregift || "-" }} - - - - 培训 - - {{ jobDetail.storeJobDetail.trainingStr || "-" }} - - - - 试用期 - - {{ jobDetail.storeJobDetail.probationStr || "-" }} - - - - 培训/试用期 - - {{ jobDetail.training || "-" }} - - - - 福利待遇 - - {{ jobDetail.boon || "-" }} - - - - 薪资说明 - - {{ jobDetail.storeJobDetail.salaryDesp || "-" }} - - - - 招聘要求 - - - 性别年龄 - - - 男 {{ jobDetail.minAgeMan }} {{ "- " + jobDetail.maxAgeMan }} 岁 ; - - - 女 {{ jobDetail.minAgeWoman }} {{ "- " + jobDetail.maxAgeWoman }}岁 - - {{ jobDetail.genderRemark ? " " + jobDetail.genderRemark : "" }} - - - - 文化要求 - - {{ jobDetail.education || "-" }} - - - - 体检 - - {{ jobDetail.healthRequire || "-" }} - - - - 证件 - - {{ jobDetail.storeJobDetail.idCardStr || jobDetail.idCardStr || "-" }} - - - - 疑难杂症 - - {{ jobDetail.storeJobDetail.otherRequireStr || jobDetail.otherRequireStr || "-" }} - - - - 职位说明 - - - 工作内容 - - {{ jobDetail.workContent || "-" }} - - - - 工作方式 - - {{ jobDetail.workMode || "-" }} - - - - 班次工时 - - {{ jobDetail.workClasses || "-" }} - - - - 工作衣 - - {{ jobDetail.workClothes || "-" }} - - - - 车间 - - {{ jobDetail.securityCheck || "-" }} - - - - 保险 - - {{ jobDetail.employeeInsurance || "-" }} - - - - 吃饭住宿 - - - 吃饭 - - {{ jobDetail.workingLunch || "-" }} - - - - 住宿费用 - - {{ jobDetail.dormitory || "-" }} - - - - 宿舍设施 - - {{ jobDetail.dormitoryFacilities || "-" }} - - - - 宿舍距离 - - {{ jobDetail.dormDistance || "-" }} - - - - 入住条件 - - {{ jobDetail.storeJobDetail.dormitoryDesp || jobDetail.dormitoryDesp || "-" }} - + @@ -692,6 +473,45 @@ export default { }, applyList: [], wxPlat: "", + templateArr: [ + // 职位描述模板 + { + type: "工作内容", + show: false, + childrenType: ["工作内容", "工作方式", "班次工时", "休息", "工衣", "车间", "安检门", "带手机", "流水线"], + children: [], + }, + { + type: "工作要求", + show: false, + childrenType: ["性别年龄", "文化学历", "身份证", "资质证件", "纹身烟疤", "案底黑户", "少数民族", "区域要求", "身体状况", "体检要求", "返厂政策"], + children: [], + }, + { + type: "薪资待遇", + show: false, + childrenType: ["岗位薪资", "综合月薪", "薪资明细", "发薪日", "银行卡", "预支工资", "岗前培训", "试用期", "员工福利"], + children: [], + }, + { + type: "吃饭住宿", + show: false, + childrenType: ["吃饭", "住宿", "保险"], + children: [], + }, + { + type: "押金", + show: false, + childrenType: ["餐卡押金", "宿舍押金", "工装押金", "厂牌押金", "工具押金"], + children: [], + }, + { + type: "面试", + show: false, + childrenType: ["面试地址", "面试评价", "面试时间", "面试注意事项", "总包驻场"], + children: [], + }, + ], }; }, onLoad(options) { @@ -738,6 +558,36 @@ export default { }); this.getDetail().then((res) => { console.log("res", res); + let objMiddle = JSON.parse(res.cozeStructureRes); + console.log("objMiddle", objMiddle); + delete objMiddle["佣金"]; + delete objMiddle["佣金详情"]; + delete objMiddle["企业位置"]; + delete objMiddle["职位标签"]; + delete objMiddle["职位标题"]; + delete objMiddle["职位分类"]; + delete objMiddle["总包驻场"]; + let num1 = 1; + this.templateArr.forEach((item) => { + let num = 1; + item.childrenType.forEach((innerItem) => { + item.children.push({ + key: innerItem, + value: objMiddle[innerItem], + num, + show: objMiddle[innerItem] ? true : false, + edit: false, + }); + if (objMiddle[innerItem]) { + num++; + } + }); + item.num = num1; + if (item.children[item.children.length - 1].num != 1) { + item.show = true; + num1++; + } + }); this.toKnowInfo(res.agencyId); }); }, @@ -821,85 +671,27 @@ export default { console.log("职位详情:", res); res = { ...res, ...res.record }; if (!res.hasOwnProperty("storeJobDetail")) { - res.storeJobDetail = {}; - } - - if (res.jobType == 1) { - that.tabInfo.list = [ - { - name: "基本信息", - active: 1, - tip: 1, - }, - { - name: "财务结算", - active: 2, - tip: 2, - }, - { - name: "职位描述", - active: 3, - tip: 3, - }, - ]; - res.policyNumStr = that.G.policyNumToHanZi(res.storeJobDetail.policyNum, "add"); - res.storeJobDetail.jobDesp2 = res.storeJobDetail.jobDesp - .replace(/\*\*\*\*\*/g, "") - .replace(/\[红包\]/g, ``) - .replace(/\[太阳\]/g, ``) - .replace(/\[爱心\]/g, ``) - .replace(/\[注意\]/g, ``) - .replace(/⚠/g, ``) - .split("————————")[0]; - res.storeJobDetail.jobDesp3 = res.storeJobDetail.jobDesp.replace(/\*\*\*\*\*/g, "").split("————————")[0]; - } else if (res.jobType == 2 && res.daotian == 0) { - that.tabInfo.list = [ - { - name: "职位描述", - active: 1, - tip: 3, - }, - { - name: "财务结算", - active: 2, - tip: 2, - }, - { - name: "对接信息", - active: 3, - tip: 4, - }, - ]; - res.policyNumStr = that.G.policyNumToHanZi(res.policyNum, "add"); - } else if (res.jobType == 2 && res.daotian == 1) { - that.tabInfo.list = [ - { - name: "基本信息", - active: 1, - tip: 1, - }, - { - name: "财务结算", - active: 2, - tip: 2, - }, - { - name: "职位描述", - active: 3, - tip: 3, - }, - ]; - res.policyNumStr = that.G.policyNumToHanZi(res.policyNum, "add"); - res.storeJobDetail.jobDesp2 = res.jobDesp - .replace(/\*\*\*\*\*/g, "") - .replace(/\[红包\]/g, ``) - .replace(/\[太阳\]/g, ``) - .replace(/\[爱心\]/g, ``) - .replace(/\[注意\]/g, ``) - .replace(/⚠/g, ``) - .split("————————")[0]; - res.storeJobDetail.jobDesp3 = res.jobDesp.replace(/\*\*\*\*\*/g, "").split("————————")[0]; + res.storeJobDetail = { + jobDesp: "", + }; } + that.tabInfo.list = [ + { + name: "基本信息", + active: 1, + tip: 1, + }, + { + name: "财务结算", + active: 2, + tip: 2, + }, + { + name: "职位描述", + active: 3, + tip: 3, + }, + ]; console.log("职位详情1:", res); that.isPerson = res.agencyId == uni.getStorageSync("apply-agencyId") ? true : false; @@ -915,11 +707,11 @@ export default { // res.priceStr = that.G.getSalaryClassifyValue(res.salaryClassify, res.salaryClassifyValue); res.priceStr = res.salaryClassify != 7 ? that.G.getSalaryClassifyValue(res.salaryClassify, res.salaryClassifyValue) : that.G.getSalaryClassifyValue(res.salaryClassify, res.minMonthlyPay, res.maxMonthlyPay); res.updateTime = that.G.setDeadLine(res.updateTime, "jiaofu"); - console.log("res.images", res.images); + console.log("res.imgs", res.imgs); that.swiperArray = - res.images.length == 0 + res.imgs.length == 0 ? [] - : res.images.map((item, index) => { + : res.imgs.map((item, index) => { return { id: index + 1, image: item.url, diff --git a/root/person/memberApplyAdd.vue b/root/person/memberApplyAdd.vue index 75eeda2..99adc65 100644 --- a/root/person/memberApplyAdd.vue +++ b/root/person/memberApplyAdd.vue @@ -46,15 +46,14 @@ export default { console.log("sceneJson===", sceneJson); this.inviteUserId = sceneJson.storeJobId || sceneJson.id.split("AAAAA")[1]; this.uid = sceneJson.id.split("AAAAA")[0]; - this.getAgencyById(); - this.checkHasApply(); - + if (uni.getStorageSync("apply-token")) { + this.getAgencyById(); + this.checkHasApply(); + } + console.log("this.userId", this.userId, "this.uid", this.uid); // uni.setStorageSync("AGENCY_USER_ID", this.userId); } - if(uni.getStorageSync('apply-token')){ - - } }, created() {}, @@ -72,13 +71,12 @@ export default { that.agencyInfo = res; }); }, - checkHasApply(){ + checkHasApply() { let that = this; - this.G.Post(this.api.order_checkHasApply, { agencyId: that.uid, username: this.userName, userId: this.inviteUserId }, (res) => { + this.G.Post(this.api.order_checkHasApply, { agencyId: that.uid, username: this.userName, userId: this.inviteUserId }, (res) => { console.log(res); }); - - } + }, }, }; diff --git a/root/person/memberApplyQRCode.vue b/root/person/memberApplyQRCode.vue index 9ef1a67..5b3200f 100644 --- a/root/person/memberApplyQRCode.vue +++ b/root/person/memberApplyQRCode.vue @@ -187,7 +187,7 @@ export default { let _env = uni.getAccountInfoSync().miniProgram.envVersion; // #endif that.G.Get( - that.api.bind_getCode, + that.api.order_getCompanyQRCode, { env: _env, },