Commit fe3867a8 by 张立顺

feat 招聘管理功能开发

1 parent 7bac585c
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2 let index = 1
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
const envName = accountInfo.miniProgram.envVersion const envName = accountInfo.miniProgram.envVersion
......
{ {
"name": "dj-car-boutique-work-wechat", "name": "regional-assistant",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
......
{
"navigationBarTitleText": "招聘详情",
"disableScroll": false,
"usingComponents": {
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-popup": "@vant/weapp/popup/index",
"empty-card": "../components/emptyCard/emptyCard",
}
}
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/recruitManage/pages/recruitDetail/recruitDetail.js // packageWorkspace/pages/recruitManage/pages/recruitDetail/recruitDetail.js
import { unix } from 'dayjs' import { unix } from 'dayjs'
import { getRecruitDetailAPI, processResumeAPI } from '../api' import { getRecruitDetailAPI, processResumeAPI } from '../api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
// 统计列表配置映射 // 统计列表配置映射
const STATISTICS_CONFIG = [ const STATISTICS_CONFIG = [
{ title: '需求数量', field: 'recruitmentQuantity' }, { title: '需求数量', field: 'recruitmentQuantity' },
{ title: '投递简历数', field: 'resumeCount' }, { title: '投递简历数', field: 'resumeCount' },
{ title: '处理简历数', field: 'processResumeCount' }, { title: '处理简历数', field: 'processResumeCount' },
{ title: '试岗人数', field: 'trialOnboardingCount' },
{ title: '入职人数', field: 'entryCount' } { title: '入职人数', field: 'entryCount' }
] ]
// 入职计划卡片字段配置 // 入职计划卡片字段配置
const ONBOARDING_FIELDS_CONFIG = [ const ONBOARDING_FIELDS_CONFIG = [
{ label: '性格', field: 'personalityName' }, { label: '性格', field: 'personalityName' },
{ label: '能力表现', field: 'abilityPerformanceName' }, { label: '能力表现', field: 'abilityPerformanceName' }
// { label: '学历', field: 'educationLevelName' }, // { label: '学历', field: 'educationLevelName' },
// { label: '形象', field: 'appearanceName' }, // { label: '形象', field: 'appearanceName' },
// { label: '岗位匹配度', field: 'positionMatchDegreeName' } // { label: '岗位匹配度', field: 'positionMatchDegreeName' }
] ]
// 学历 岗位匹配度 形象tag // 学历 岗位匹配度 形象tag
const TAGLIST = ['educationLevelName', 'appearanceName', 'positionMatchDegreeName'] const TAGLIST = [
'educationLevelName',
'appearanceName',
'positionMatchDegreeName'
]
// 招聘信息字段配置 // 招聘信息字段配置
const RECRUITMENT_INFO_CONFIG = [ const RECRUITMENT_INFO_CONFIG = [
...@@ -28,6 +34,7 @@ const RECRUITMENT_INFO_CONFIG = [ ...@@ -28,6 +34,7 @@ const RECRUITMENT_INFO_CONFIG = [
{ label: '业务类型', field: 'businessTypeName' }, { label: '业务类型', field: 'businessTypeName' },
{ label: '招聘类型', field: 'recruitmentTypeName' }, { label: '招聘类型', field: 'recruitmentTypeName' },
{ label: '招聘负责人', field: 'recruiterName' }, { label: '招聘负责人', field: 'recruiterName' },
{ label: '技术督导', field: 'technicalSupervisorName' },
{ label: '申请时间', field: 'createdDate' }, { label: '申请时间', field: 'createdDate' },
{ label: '需求描述', field: 'requirementDescription' }, { label: '需求描述', field: 'requirementDescription' },
{ label: '拒绝理由', field: 'recallReason' } { label: '拒绝理由', field: 'recallReason' }
...@@ -72,6 +79,7 @@ Page({ ...@@ -72,6 +79,7 @@ Page({
statisticsList: [], statisticsList: [],
onboardingPlans: [], onboardingPlans: [],
recruitmentPlans: [], recruitmentPlans: [],
trialOnboardingPlans: [],
recruitmentInfoConfig: RECRUITMENT_INFO_CONFIG, recruitmentInfoConfig: RECRUITMENT_INFO_CONFIG,
onboardingFieldsConfig: ONBOARDING_FIELDS_CONFIG, onboardingFieldsConfig: ONBOARDING_FIELDS_CONFIG,
handleShowMessagePop: false, // 控制弹窗显示 handleShowMessagePop: false, // 控制弹窗显示
...@@ -174,7 +182,9 @@ Page({ ...@@ -174,7 +182,9 @@ Page({
const obj = this.data.recruitmentPlans[index] const obj = this.data.recruitmentPlans[index]
const { reasonMaxLen } = this.data const { reasonMaxLen } = this.data
this.setData({ this.setData({
[`recruitmentPlans[${index}].recommendedReasonTxt`]: obj.isShowReasonAll ? (obj.recommendedReason.slice(0, reasonMaxLen) + '...') : obj.recommendedReason, [`recruitmentPlans[${index}].recommendedReasonTxt`]: obj.isShowReasonAll
? obj.recommendedReason.slice(0, reasonMaxLen) + '...'
: obj.recommendedReason,
[`recruitmentPlans[${index}].isShowReasonAll`]: !obj.isShowReasonAll [`recruitmentPlans[${index}].isShowReasonAll`]: !obj.isShowReasonAll
}) })
}, },
...@@ -222,7 +232,7 @@ Page({ ...@@ -222,7 +232,7 @@ Page({
this.lastViewResumeTime = now this.lastViewResumeTime = now
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask:true mask: true
}) })
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
let _this = this let _this = this
...@@ -230,7 +240,7 @@ Page({ ...@@ -230,7 +240,7 @@ Page({
wx.$util.showToast('暂无简历信息') wx.$util.showToast('暂无简历信息')
return return
} }
const resumeType = url.split(".")[url.split(".").length - 1] const resumeType = url.split('.')[url.split('.').length - 1]
if (resumeType == 'png') { if (resumeType == 'png') {
wx.previewImage({ wx.previewImage({
urls: [url], // 图片地址数组 urls: [url], // 图片地址数组
...@@ -246,8 +256,8 @@ Page({ ...@@ -246,8 +256,8 @@ Page({
const manage = wx.getFileSystemManager() const manage = wx.getFileSystemManager()
let file = url.split('/') let file = url.split('/')
let fileName = file[file.length - 1] let fileName = file[file.length - 1]
console.log('fileName',fileName) console.log('fileName', fileName)
console.log('manage',manage) console.log('manage', manage)
manage.saveFile({ manage.saveFile({
tempFilePath: res.tempFilePath, tempFilePath: res.tempFilePath,
filePath: wx.env.USER_DATA_PATH + '/' + fileName, filePath: wx.env.USER_DATA_PATH + '/' + fileName,
...@@ -263,8 +273,9 @@ Page({ ...@@ -263,8 +273,9 @@ Page({
}) })
}, },
fail: function (err) { fail: function (err) {
console.log("异常",err); console.log('异常', err)
},complete: function() { },
complete: function () {
wx.hideLoading() wx.hideLoading()
} }
}) })
...@@ -283,14 +294,24 @@ Page({ ...@@ -283,14 +294,24 @@ Page({
id: id id: id
}) })
.then(res => { .then(res => {
let { stat, onboardingPlans, recruitmentPlans, recruitment } = res.data let {
stat,
onboardingPlans,
recruitmentPlans,
recruitment,
trialOnboardingPlans
} = res.data
const { reasonMaxLen } = this.data const { reasonMaxLen } = this.data
// 格式化 recruitmentPlans 中的 createdDate // 格式化 recruitmentPlans 中的 createdDate
if (recruitmentPlans && recruitmentPlans.length > 0) { if (recruitmentPlans && recruitmentPlans.length > 0) {
recruitmentPlans = recruitmentPlans.map(item => ({ recruitmentPlans = recruitmentPlans.map(item => ({
...item, ...item,
createdDate: this.formatDate(item.createdDate), createdDate: this.formatDate(item.createdDate),
recommendedReasonTxt: item.recommendedReason ? (item.recommendedReason.length > reasonMaxLen ? (item.recommendedReason.slice(0, reasonMaxLen) + '...') : item.recommendedReason) : '-', recommendedReasonTxt: item.recommendedReason
? item.recommendedReason.length > reasonMaxLen
? item.recommendedReason.slice(0, reasonMaxLen) + '...'
: item.recommendedReason
: '-',
isShowReasonAll: false isShowReasonAll: false
})) }))
} }
...@@ -301,6 +322,13 @@ Page({ ...@@ -301,6 +322,13 @@ Page({
onboardingDate: this.formatDate(item.onboardingDate) onboardingDate: this.formatDate(item.onboardingDate)
})) }))
} }
// 格式化 trialOnboardingPlans 中的 onboardingDate
if (trialOnboardingPlans && trialOnboardingPlans?.length > 0) {
trialOnboardingPlans = trialOnboardingPlans.map(item => ({
...item,
onboardingDate: this.formatDate(item.onboardingDate)
}))
}
// 格式化 recruitment 中的 createdDate // 格式化 recruitment 中的 createdDate
if (recruitment && recruitment.createdDate) { if (recruitment && recruitment.createdDate) {
......
...@@ -24,7 +24,8 @@ page { ...@@ -24,7 +24,8 @@ page {
padding: 0 var(--fontSize23); padding: 0 var(--fontSize23);
.statistic_item { .statistic_item {
width: var(--fontSize176); // width: var(--fontSize176);
width: var(--fontSize150);
height: var(--fontSize90); height: var(--fontSize90);
opacity: 1; opacity: 1;
position: relative; position: relative;
...@@ -72,7 +73,7 @@ page { ...@@ -72,7 +73,7 @@ page {
.sub_title { .sub_title {
font-weight: 400; font-weight: 400;
color:#999999; color: #999999;
text-align: left; text-align: left;
font-size: var(--fontSize24); font-size: var(--fontSize24);
line-height: var(--fontSize34); line-height: var(--fontSize34);
...@@ -105,12 +106,14 @@ page { ...@@ -105,12 +106,14 @@ page {
margin-bottom: var(--fontSize16); margin-bottom: var(--fontSize16);
} }
} }
.date { .date {
color: #5A5E66; color: #5A5E66;
font-size: var(--fontSize25); font-size: var(--fontSize25);
flex-shrink: 0; flex-shrink: 0;
padding-bottom: var(--fontSize12); padding-bottom: var(--fontSize12);
} }
// 卡片顶部 // 卡片顶部
.card_top { .card_top {
display: flex; display: flex;
...@@ -120,10 +123,12 @@ page { ...@@ -120,10 +123,12 @@ page {
opacity: 1; opacity: 1;
background: linear-gradient(90deg, #2c66f700 0%, #2c66f70f 100%); background: linear-gradient(90deg, #2c66f700 0%, #2c66f70f 100%);
padding: var(--fontSize24) 0; padding: var(--fontSize24) 0;
&.white_bg { &.white_bg {
background: #FFFFFF; background: #FFFFFF;
padding: 0; padding: 0;
} }
.user_info { .user_info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -153,10 +158,12 @@ page { ...@@ -153,10 +158,12 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
padding-right: var(--fontSize16); padding-right: var(--fontSize16);
.phone_text { .phone_text {
color: #666666; color: #666666;
font-size: var(--fontSize26); font-size: var(--fontSize26);
} }
.phone_icon { .phone_icon {
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
...@@ -209,6 +216,7 @@ page { ...@@ -209,6 +216,7 @@ page {
gap: var(--fontSize8); gap: var(--fontSize8);
align-items: center; align-items: center;
margin-top: var(--fontSize8); // 推到底部 margin-top: var(--fontSize8); // 推到底部
.tag { .tag {
height: var(--fontSize40); height: var(--fontSize40);
line-height: var(--fontSize40); line-height: var(--fontSize40);
...@@ -222,6 +230,7 @@ page { ...@@ -222,6 +230,7 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #666666; color: #666666;
} }
.phone { .phone {
color: #666666; color: #666666;
font-size: var(--fontSize26); font-size: var(--fontSize26);
...@@ -253,9 +262,11 @@ page { ...@@ -253,9 +262,11 @@ page {
display: flex; display: flex;
line-height: 1.5; line-height: 1.5;
margin-bottom: var(--fontSize8); margin-bottom: var(--fontSize8);
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.label { .label {
color: #999999; color: #999999;
font-size: var(--fontSize26); font-size: var(--fontSize26);
...@@ -280,13 +291,17 @@ page { ...@@ -280,13 +291,17 @@ page {
.card_middle { .card_middle {
margin-bottom: var(--fontSize20); margin-bottom: var(--fontSize20);
font-size: var(--fontSize24); font-size: var(--fontSize24);
.label, .tips {
.label,
.tips {
color: #999ea8; color: #999ea8;
} }
.label { .label {
width: var(--fontSize120); width: var(--fontSize120);
flex-shrink: 0; flex-shrink: 0;
} }
.value { .value {
position: relative; position: relative;
width: 100%; width: 100%;
...@@ -294,9 +309,11 @@ page { ...@@ -294,9 +309,11 @@ page {
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }
.show { .show {
display: inline-block; display: inline-block;
} }
.btn-reason-all { .btn-reason-all {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
...@@ -306,15 +323,18 @@ page { ...@@ -306,15 +323,18 @@ page {
background-color: #FFFFFF; background-color: #FFFFFF;
background: linear-gradient(90deg, #ffffff80 0%, #ffffff 100%); background: linear-gradient(90deg, #ffffff80 0%, #ffffff 100%);
} }
.reason-box { .reason-box {
display: flex; display: flex;
} }
} }
.card_content { .card_content {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.btn_group { .btn_group {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -383,6 +403,21 @@ page { ...@@ -383,6 +403,21 @@ page {
margin-left: var(--fontSize20); margin-left: var(--fontSize20);
line-height: 1.5; line-height: 1.5;
} }
.ji {
display: inline-block;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.phone_icon {
display: inline-block;
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
vertical-align: middle;
}
} }
} }
} }
...@@ -449,20 +484,24 @@ page { ...@@ -449,20 +484,24 @@ page {
.radio { .radio {
display: flex; display: flex;
align-items: center; align-items: center;
&.mar-r20 { &.mar-r20 {
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
} }
.cily { .cily {
width: var(--fontSize26); width: var(--fontSize26);
height: var(--fontSize26); height: var(--fontSize26);
border-radius: var(--fontSize14); border-radius: var(--fontSize14);
border: var(--fontSize2) solid #D0D2D6; border: var(--fontSize2) solid #D0D2D6;
} }
.radio-icon { .radio-icon {
flex-shrink: 0; flex-shrink: 0;
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
} }
.text { .text {
color: #222222; color: #222222;
font-size: var(--fontSize28); font-size: var(--fontSize28);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="card"> <view class="card">
<view class="date">入职时间:{{item.onboardingDate}}</view> <view class="date">入职时间:{{item.onboardingDate}}</view>
<view class="card_top"> <view class="card_top">
<image class="user_icon" src="{{IMG_URL}}staff-icon.png" mode="aspectFill" /> <image class="user_icon" src="{{ IMG_URL }}staff-icon.png" mode="aspectFill" />
<view class="user_info"> <view class="user_info">
<view class="user_top"> <view class="user_top">
<view class="name">{{item.personName}}</view> <view class="name">{{item.personName}}</view>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</view> </view>
</view> </view>
<view class="user_bottom"> <view class="user_bottom">
<view class="tag" wx:for="{{TAGLIST}}" wx:for-item="subItem" wx:key="subIndex">{{item[subItem]}}</view> <view class="tag" wx:for="{{ TAGLIST }}" wx:for-item="subItem" wx:key="subIndex">{{item[subItem]}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -49,11 +49,42 @@ ...@@ -49,11 +49,42 @@
</block> </block>
<block wx:else> <block wx:else>
<view class="card-empty"> <view class="card-empty">
<image class="icon" src="{{IMG_URL}}empty-data.png" mode="aspectFill" /> <image class="icon" src="{{ IMG_URL }}empty-data.png" mode="aspectFill" />
<text>暂无数据</text> <text>暂无数据</text>
</view> </view>
</block> </block>
</view> </view>
<!-- 试岗计划 -->
<view class="entry_plan">
<view class="block_title">试岗计划</view>
<block wx:if="{{ trialOnboardingPlans.length }}">
<block wx:for="{{ trialOnboardingPlans }}" wx:key="index">
<view class="card">
<view class="card_top">
<image class="user_icon" src="{{ IMG_URL }}staff-icon.png" mode="aspectFill" />
<view class="user_info">
<view class="user_top">
<view class="name">{{item.personName }}</view>
</view>
<view class="user_bottom">
<view class="phone" data-phone="{{ item.phoneNumber }}" bind:tap="phoneCall">
<text class="phone_text"> {{ item.phoneNumber}}</text>
<image class="phone_icon" src="/packageWorkspace/pages/image/call-icon.png" mode="widthFix" />
</view>
<view class="date">入职时间: {{ item.onboardingDate}}</view>
</view>
</view>
</view>
</view>
</block>
</block>
<block wx:else>
<view class="card-empty">
<image class="icon" src="{{ IMG_URL }}empty-data.png" mode="aspectFill" />
<text>暂无内容</text>
</view>
</block>
</view>
<!-- 招聘计划模块 --> <!-- 招聘计划模块 -->
<view class="recruit_plan"> <view class="recruit_plan">
<view class="block_title"> <view class="block_title">
...@@ -87,15 +118,23 @@ ...@@ -87,15 +118,23 @@
<view class="label">推荐理由:</view> <view class="label">推荐理由:</view>
<view class="value"> <view class="value">
{{item.recommendedReasonTxt}} {{item.recommendedReasonTxt}}
<view wx:if="{{ item.recommendedReason && item.recommendedReason.length > reasonMaxLen }}" class="{{['tips', item.isShowReasonAll ? 'show' : '']}}" bind:tap="handleShowReason" data-index="{{ index }}"> <view
<text wx:if="{{item.isShowReasonAll}}">收起</text> wx:if="{{ item.recommendedReason && item.recommendedReason.length > reasonMaxLen }}"
class="{{ ['tips', item.isShowReasonAll ? 'show' : ''] }}"
bind:tap="handleShowReason"
data-index="{{ index }}"
>
<text wx:if="{{ item.isShowReasonAll }}">收起</text>
<view wx:else class="btn-reason-all">查看全部</view> <view wx:else class="btn-reason-all">查看全部</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="card_content"> <view class="card_content">
<view class="date"><text style="margin-right: var(--fontSize8);">投递于</text>{{item.createdDate}}</view> <view class="date">
<text style="margin-right: var(--fontSize8);">投递于</text>
{{item.createdDate}}
</view>
<view class="btn_group"> <view class="btn_group">
<view class="btn btn_outline" bindtap="handleViewResume" data-url="{{ item.resumeUrl }}">查看简历</view> <view class="btn btn_outline" bindtap="handleViewResume" data-url="{{ item.resumeUrl }}">查看简历</view>
<view wx:if="{{ item.status === 0 }}" class="btn btn_primary" bindtap="handleProcess" data-id="{{ item.id }}">处理</view> <view wx:if="{{ item.status === 0 }}" class="btn btn_primary" bindtap="handleProcess" data-id="{{ item.id }}">处理</view>
...@@ -107,7 +146,7 @@ ...@@ -107,7 +146,7 @@
</block> </block>
<block wx:else> <block wx:else>
<view class="card-empty"> <view class="card-empty">
<image class="icon" src="{{IMG_URL}}empty-data.png" mode="aspectFill" /> <image class="icon" src="{{ IMG_URL }}empty-data.png" mode="aspectFill" />
<text>暂无数据</text> <text>暂无数据</text>
</view> </view>
</block> </block>
...@@ -118,13 +157,28 @@ ...@@ -118,13 +157,28 @@
<view class="card"> <view class="card">
<view class="info_item" wx:for="{{ recruitmentInfoConfig }}" wx:key="field" wx:for-item="infoItem"> <view class="info_item" wx:for="{{ recruitmentInfoConfig }}" wx:key="field" wx:for-item="infoItem">
<text class="label">{{infoItem.label}}</text> <text class="label">{{infoItem.label}}</text>
<text class="value">{{recruitment[infoItem.field] || '--'}}</text> <view class="value value_box" wx:if="{{ infoItem.label === '门店名称' }}">
<text> {{recruitment[infoItem.field] || '--'}}</text>
<image class="ji" wx:if="{{ recruitment.urgent == 1 }}" src="{{ IMG_URL }}ji.png" mode="aspectFill" />
</view>
<view class="value value_box" wx:elif="{{ infoItem.label === '招聘负责人' || infoItem.label === '技术督导' }}">
<text> {{recruitment[infoItem.field] || '--'}}</text>
<image
class="phone_icon"
wx:if="{{ (infoItem.label === '招聘负责人' && recruitment.recruiterPhone) || (infoItem.label === '技术督导' && recruitment.technicalSupervisorPhone) }}"
src="/packageWorkspace/pages/image/call-icon.png"
mode="widthFix"
catchtap="phoneCall"
data-phone="{{ infoItem.label === '招聘负责人' ? recruitment.recruiterPhone : recruitment.technicalSupervisorPhone }}"
/>
</view>
<text class="value" wx:else>{{recruitment[infoItem.field] || '--'}}</text>
</view> </view>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="card-empty"> <view class="card-empty">
<image class="icon" src="{{IMG_URL}}empty-data.png" mode="aspectFill" /> <image class="icon" src="{{ IMG_URL }}empty-data.png" mode="aspectFill" />
<text>暂无数据</text> <text>暂无数据</text>
</view> </view>
</block> </block>
...@@ -150,12 +204,12 @@ ...@@ -150,12 +204,12 @@
</view> </view>
<view class="value"> <view class="value">
<view class="radio mar-r20" bindtap="selectTag" data-field="processResult" data-value="1"> <view class="radio mar-r20" bindtap="selectTag" data-field="processResult" data-value="1">
<image class="radio-icon" wx:if="{{formData.processResult == 1}}" src="{{IMG_URL}}radio-checked.png" mode=""/> <image class="radio-icon" wx:if="{{ formData.processResult == 1 }}" src="{{ IMG_URL }}radio-checked.png" mode="" />
<view class="cily" wx:else></view> <view class="cily" wx:else></view>
<view class="text">人员不匹配</view> <view class="text">人员不匹配</view>
</view> </view>
<view class="radio" bindtap="selectTag" data-field="processResult" data-value="2"> <view class="radio" bindtap="selectTag" data-field="processResult" data-value="2">
<image class="radio-icon" wx:if="{{formData.processResult == 2}}" src="{{IMG_URL}}radio-checked.png" mode=""/> <image class="radio-icon" wx:if="{{ formData.processResult == 2 }}" src="{{ IMG_URL }}radio-checked.png" mode="" />
<view class="cily" wx:else></view> <view class="cily" wx:else></view>
<view class="text">已完成面试</view> <view class="text">已完成面试</view>
</view> </view>
...@@ -178,12 +232,12 @@ ...@@ -178,12 +232,12 @@
</view> </view>
<view class="value"> <view class="value">
<view class="radio mar-r20" bindtap="selectTag" data-field="interviewResult" data-value="1"> <view class="radio mar-r20" bindtap="selectTag" data-field="interviewResult" data-value="1">
<image class="radio-icon" wx:if="{{formData.interviewResult == '1'}}" src="{{IMG_URL}}radio-checked.png" mode=""/> <image class="radio-icon" wx:if="{{ formData.interviewResult == '1' }}" src="{{ IMG_URL }}radio-checked.png" mode="" />
<view class="cily" wx:else></view> <view class="cily" wx:else></view>
<view class="text">通过</view> <view class="text">通过</view>
</view> </view>
<view class="radio" bindtap="selectTag" data-field="interviewResult" data-value="0"> <view class="radio" bindtap="selectTag" data-field="interviewResult" data-value="0">
<image class="radio-icon" wx:if="{{formData.interviewResult == '0'}}" src="{{IMG_URL}}radio-checked.png" mode=""/> <image class="radio-icon" wx:if="{{ formData.interviewResult == '0' }}" src="{{ IMG_URL }}radio-checked.png" mode="" />
<view class="cily" wx:else></view> <view class="cily" wx:else></view>
<view class="text">不通过</view> <view class="text">不通过</view>
</view> </view>
......
...@@ -9,7 +9,8 @@ import { ...@@ -9,7 +9,8 @@ import {
const FORM_FIELDS = { const FORM_FIELDS = {
MERCHANT: 0, // 门店 MERCHANT: 0, // 门店
QUANTITY: 2, // 招聘数量 QUANTITY: 2, // 招聘数量
DESCRIPTION: 4, // 需求描述 URGENT: 4, // 是否急招
DESCRIPTION: 5, // 需求描述
RECRUIT_TYPE: 3, // 招聘类型 RECRUIT_TYPE: 3, // 招聘类型
BUSINESS_TYPE: 1 // 业务类型 BUSINESS_TYPE: 1 // 业务类型
} }
...@@ -18,7 +19,11 @@ const VALIDATION_CONFIG = { ...@@ -18,7 +19,11 @@ const VALIDATION_CONFIG = {
[FORM_FIELDS.MERCHANT]: { tip: '请选择招聘门店', required: true }, [FORM_FIELDS.MERCHANT]: { tip: '请选择招聘门店', required: true },
[FORM_FIELDS.BUSINESS_TYPE]: { tip: '请选择业务类型', required: true }, [FORM_FIELDS.BUSINESS_TYPE]: { tip: '请选择业务类型', required: true },
[FORM_FIELDS.QUANTITY]: { tip: '请输入招聘数量', required: true }, [FORM_FIELDS.QUANTITY]: { tip: '请输入招聘数量', required: true },
[FORM_FIELDS.RECRUIT_TYPE]: { tip: '请选择招聘类型', required: true } [FORM_FIELDS.RECRUIT_TYPE]: { tip: '请选择招聘类型', required: true },
[FORM_FIELDS.DESCRIPTION]: {
tip: '请简单描述用人要求等信息',
required: false
}
} }
Page({ Page({
...@@ -29,13 +34,15 @@ Page({ ...@@ -29,13 +34,15 @@ Page({
{ id: 1, label: '业务类型', placeholder: '点击选择', options: [] }, { id: 1, label: '业务类型', placeholder: '点击选择', options: [] },
{ id: 2, label: '招聘数量', placeholder: '请输入' }, { id: 2, label: '招聘数量', placeholder: '请输入' },
{ id: 3, label: '招聘类型', placeholder: '点击选择', options: [] }, { id: 3, label: '招聘类型', placeholder: '点击选择', options: [] },
{ id: 4, label: '是否急招', value: 0 },
{ {
id: 4, id: 5,
label: '需求描述', label: '需求描述',
placeholder: '请简单描述用人要求等信息', placeholder: '请简单描述用人要求等信息',
textCount: 0 textCount: 0
} }
], ],
switch1Checked: false,
showPopup: false, showPopup: false,
currentItem: {}, currentItem: {},
currentIndex: -1, currentIndex: -1,
...@@ -47,6 +54,14 @@ Page({ ...@@ -47,6 +54,14 @@ Page({
searchTimer: null, // 防抖定时器 searchTimer: null, // 防抖定时器
isDialogShowing: false // Dialog显示状态 isDialogShowing: false // Dialog显示状态
}, },
onFormItemTap(e) {
const index = e.currentTarget.dataset.index
const item = this.data.formList && this.data.formList[index]
const label = item && item.label
if (label === '需求描述' || label === '招聘数量' || label === '是否急招')
return
return this.showPopup(e)
},
// 显示popup // 显示popup
async showPopup(e) { async showPopup(e) {
const index = e.currentTarget.dataset.index const index = e.currentTarget.dataset.index
...@@ -370,15 +385,31 @@ Page({ ...@@ -370,15 +385,31 @@ Page({
recruitmentQuantity: formList[FORM_FIELDS.QUANTITY].value, recruitmentQuantity: formList[FORM_FIELDS.QUANTITY].value,
recruitmentType: formList[FORM_FIELDS.RECRUIT_TYPE].value, recruitmentType: formList[FORM_FIELDS.RECRUIT_TYPE].value,
recruitmentTypeName: formList[FORM_FIELDS.RECRUIT_TYPE].displayValue, recruitmentTypeName: formList[FORM_FIELDS.RECRUIT_TYPE].displayValue,
requirementDescription: formList[FORM_FIELDS.DESCRIPTION].value || '' requirementDescription: formList[FORM_FIELDS.DESCRIPTION].value || '',
urgent: formList[FORM_FIELDS.URGENT].value
} }
}, },
switch1Change(e) {
const checked = !!(e && e.detail && e.detail.value)
const urgent = checked ? 1 : 0
const { formList } = this.data
if (Array.isArray(formList) && formList[FORM_FIELDS.URGENT]) {
formList[FORM_FIELDS.URGENT].value = urgent
}
this.setData({
formList,
switch1Checked: checked
})
},
// 提交表单 // 提交表单
submit() { submit() {
// 验证表单 // 验证表单
if (!this.validateForm()) return if (!this.validateForm()) return
const { formList } = this.data
const isUrgent =
Array.isArray(formList) &&
formList[FORM_FIELDS.URGENT] &&
Number(formList[FORM_FIELDS.URGENT].value) === 1
// 设置Dialog显示状态为true // 设置Dialog显示状态为true
this.setData({ this.setData({
isDialogShowing: true isDialogShowing: true
...@@ -387,7 +418,9 @@ Page({ ...@@ -387,7 +418,9 @@ Page({
// 显示确认对话框 // 显示确认对话框
Dialog.confirm({ Dialog.confirm({
title: '提示', title: '提示',
message: '是否确定提交招聘需求?', message: isUrgent
? '申请急招,在招聘负责人推送简历后,需在24小时内完成简历跟进处理,否则将自动上报总部,请知悉!'
: '是否确定提交招聘需求?',
className: 'custom-dialog', className: 'custom-dialog',
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
...@@ -488,7 +521,7 @@ Page({ ...@@ -488,7 +521,7 @@ Page({
resolve(options) resolve(options)
} }
}) })
.catch(err => {}) .catch(err => { })
} catch (err) { } catch (err) {
console.error('获取字典列表失败', err) console.error('获取字典列表失败', err)
reject(err) reject(err)
......
...@@ -4,12 +4,15 @@ page { ...@@ -4,12 +4,15 @@ page {
display: flex; display: flex;
background: #f7f8fa; background: #f7f8fa;
} }
.scrollarea { .scrollarea {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
} }
.container { .container {
padding: 0 var(--fontSize20); padding: 0 var(--fontSize20);
.title { .title {
color: #292d33; color: #292d33;
height: var(--fontSize80); height: var(--fontSize80);
...@@ -19,6 +22,7 @@ page { ...@@ -19,6 +22,7 @@ page {
font-weight: 600; font-weight: 600;
line-height: var(--fontSize80); line-height: var(--fontSize80);
} }
.form { .form {
box-sizing: border-box; box-sizing: border-box;
min-height: var(--fontSize976); min-height: var(--fontSize976);
...@@ -27,12 +31,14 @@ page { ...@@ -27,12 +31,14 @@ page {
background: #ffffff; background: #ffffff;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a; box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
padding: 0 var(--fontSize44); padding: 0 var(--fontSize44);
.form-item { .form-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: var(--fontSize104); height: var(--fontSize104);
align-items: center; align-items: center;
font-size: var(--fontSize28); font-size: var(--fontSize28);
.required { .required {
color: #f24724; color: #f24724;
text-align: left; text-align: left;
...@@ -42,6 +48,7 @@ page { ...@@ -42,6 +48,7 @@ page {
top: var(--fontSize4); top: var(--fontSize4);
box-sizing: border-box; box-sizing: border-box;
} }
.placeholder { .placeholder {
width: var(--fontSize280); width: var(--fontSize280);
height: var(--fontSize36); height: var(--fontSize36);
...@@ -51,6 +58,7 @@ page { ...@@ -51,6 +58,7 @@ page {
text-align: right; text-align: right;
line-height: var(--fontSize36); line-height: var(--fontSize36);
} }
.display_value { .display_value {
width: var(--fontSize320); width: var(--fontSize320);
height: var(--fontSize36); height: var(--fontSize36);
...@@ -63,20 +71,65 @@ page { ...@@ -63,20 +71,65 @@ page {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.value { .value {
display: flex; display: flex;
align-items: center; align-items: center;
switch {
transform: scale(0.67);
transform-origin: 100% 50%;
}
.wx-switch-input {
width: 140rpx !important;
height: 60rpx !important;
background: #dcdfe6 !important;
border-color: #dcdfe6 !important;
border-radius: 30rpx !important;
} }
.wx-switch-input::before {
width: 136rpx !important;
height: 56rpx !important;
background: #dcdfe6 !important;
border-radius: 28rpx !important;
}
.wx-switch-input::after {
width: 56rpx !important;
height: 56rpx !important;
border-radius: 28rpx !important;
top: 2rpx !important;
left: 2rpx !important;
}
.wx-switch-input-checked {
background: #347BFF !important;
border-color: #347BFF !important;
}
.wx-switch-input-checked::before {
background: #347BFF !important;
}
.wx-switch-input-checked::after {
transform: translateX(80rpx) !important;
}
}
.arrow_right { .arrow_right {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin-left: var(--fontSize8); margin-left: var(--fontSize8);
} }
.unit { .unit {
color: #222222; color: #222222;
font-size: var(--fontSize28); font-size: var(--fontSize28);
margin-left: var(--fontSize16); margin-left: var(--fontSize16);
} }
.number-input { .number-input {
flex: 1; flex: 1;
height: var(--fontSize36); height: var(--fontSize36);
...@@ -87,19 +140,23 @@ page { ...@@ -87,19 +140,23 @@ page {
background: transparent; background: transparent;
} }
} }
.form-item-textarea { .form-item-textarea {
height: auto; height: auto;
min-height: var(--fontSize104); min-height: var(--fontSize104);
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
padding: var(--fontSize24) 0; padding: var(--fontSize24) 0;
.label { .label {
margin-bottom: var(--fontSize20); margin-bottom: var(--fontSize20);
} }
.textarea-wrapper { .textarea-wrapper {
width: 100%; width: 100%;
position: relative; position: relative;
} }
.textarea-input { .textarea-input {
width: 100%; width: 100%;
height: var(--fontSize440); height: var(--fontSize440);
...@@ -115,12 +172,14 @@ page { ...@@ -115,12 +172,14 @@ page {
overflow-y: scroll; overflow-y: scroll;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
scrollbar-width: none; scrollbar-width: none;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
display: none; display: none;
} }
} }
.textarea-count { .textarea-count {
position: absolute; position: absolute;
right: var(--fontSize16); right: var(--fontSize16);
...@@ -130,12 +189,14 @@ page { ...@@ -130,12 +189,14 @@ page {
} }
} }
} }
.footer { .footer {
margin-top:var(--fontSize200); margin-top: var(--fontSize150);
.btn { .btn {
margin:0 auto; margin: 0 auto;
width: var(--fontSize622); width: var(--fontSize622);
height:var(--fontSize88); height: var(--fontSize88);
border-radius: var(--fontSize24); border-radius: var(--fontSize24);
opacity: 1; opacity: 1;
background: #2C66F7; background: #2C66F7;
...@@ -146,6 +207,7 @@ page { ...@@ -146,6 +207,7 @@ page {
} }
} }
} }
/* popup样式 */ /* popup样式 */
.popup-content { .popup-content {
height: 100%; height: 100%;
...@@ -154,14 +216,17 @@ page { ...@@ -154,14 +216,17 @@ page {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
/* 设置popup顶部圆角 */ /* 设置popup顶部圆角 */
.van-popup--bottom { .van-popup--bottom {
border-radius: var(--fontSize20) var(--fontSize20) 0 0 !important; border-radius: var(--fontSize20) var(--fontSize20) 0 0 !important;
overflow: hidden; overflow: hidden;
} }
.popup-fixed-top { .popup-fixed-top {
flex: 0 0 auto; flex: 0 0 auto;
} }
.popup-fixed-bottom { .popup-fixed-bottom {
flex: 0 0 auto; flex: 0 0 auto;
padding: 0 var(--fontSize40); padding: 0 var(--fontSize40);
...@@ -188,6 +253,7 @@ page { ...@@ -188,6 +253,7 @@ page {
padding: var(--fontSize16) 0; padding: var(--fontSize16) 0;
border-bottom: var(--fontSize2) solid #eff0f2; border-bottom: var(--fontSize2) solid #eff0f2;
margin: 0 var(--fontSize40); margin: 0 var(--fontSize40);
.search-input { .search-input {
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -236,9 +302,11 @@ page { ...@@ -236,9 +302,11 @@ page {
} }
} }
} }
.popup-options { .popup-options {
padding: var(--fontSize10) 0; padding: var(--fontSize10) 0;
} }
.option-item { .option-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -248,15 +316,19 @@ page { ...@@ -248,15 +316,19 @@ page {
font-size: var(--fontSize28); font-size: var(--fontSize28);
} }
.option-item:active { .option-item:active {
background-color: #f2f3f5; background-color: #f2f3f5;
} }
.option-name { .option-name {
flex: 1; flex: 1;
} }
.option-item.checked .option-name { .option-item.checked .option-name {
color: #2C66F7; color: #2C66F7;
} }
.option-check { .option-check {
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
...@@ -264,6 +336,7 @@ page { ...@@ -264,6 +336,7 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.option-check.checked { .option-check.checked {
color: #2C66F7; color: #2C66F7;
} }
...@@ -300,7 +373,8 @@ page { ...@@ -300,7 +373,8 @@ page {
padding: var(--fontSize20) 0; padding: var(--fontSize20) 0;
} }
.cancel-btn, .confirm-btn { .cancel-btn,
.confirm-btn {
width: var(--fontSize331); width: var(--fontSize331);
height: var(--fontSize80); height: var(--fontSize80);
border-radius: var(--fontSize24); border-radius: var(--fontSize24);
......
...@@ -3,22 +3,24 @@ ...@@ -3,22 +3,24 @@
<view class="container"> <view class="container">
<view class="title">请完善用人需求</view> <view class="title">请完善用人需求</view>
<view class="form"> <view class="form">
<block wx:for="{{ formList }}" wx:key="{{ index}}"> <block wx:for="{{ formList }}" wx:key="index">
<!-- bindtap="{{item.label === '需求描述' || item.label === '招聘数量' ? '' : 'showPopup'}}" -->
<view <view
class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}"
bindtap="{{item.label === '需求描述' || item.label === '招聘数量' ? '' : 'showPopup'}}" bindtap="onFormItemTap"
data-index="{{ index }}" data-index="{{ index }}"
> >
<view class="label"> <view class="label">
{{item.label}} {{item.label}}
<text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text> <text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
</view> </view>
<view class="value" wx:if="{{ item.label !== '需求描述' && item.label !== '招聘数量' }}"> <block wx:if="{{ item.label === '是否急招' }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text> <view class="value">
<text class="placeholder" wx:else>{{item.placeholder}}</text> <switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view> </view>
<view class="value" wx:if="{{ item.label === '招聘数量' }}"> </block>
<block wx:elif="{{ item.label === '招聘数量' }}">
<view class="value">
<input <input
class="number-input" class="number-input"
type="number" type="number"
...@@ -30,6 +32,17 @@ ...@@ -30,6 +32,17 @@
/> />
<text class="unit">人</text> <text class="unit">人</text>
</view> </view>
</block>
<block wx:elif="{{ item.label === '需求描述' }}">
<!-- 需求描述没有普通value部分 -->
</block>
<block wx:else>
<view class="value">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view>
</block>
<block wx:if="{{ !showPopup }}"> <block wx:if="{{ !showPopup }}">
<view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}"> <view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}">
<textarea <textarea
...@@ -95,7 +108,7 @@ ...@@ -95,7 +108,7 @@
> >
<view class="option-name">{{item.text}}</view> <view class="option-name">{{item.text}}</view>
<view class="option-check" wx:if="{{ item.checked }}"> <view class="option-check" wx:if="{{ item.checked }}">
<image src="{{IMG_URL}}checked.png" mode=""/> <image src="{{ IMG_URL }}checked.png" mode="" />
</view> </view>
</view> </view>
<view class="empty-tip" wx:if="{{ filteredOptions.length === 0 }}"> <view class="empty-tip" wx:if="{{ filteredOptions.length === 0 }}">
......
...@@ -125,22 +125,50 @@ export const statusTipConfig = { ...@@ -125,22 +125,50 @@ export const statusTipConfig = {
} }
} }
// // 获取状态提示文本
// export const getStatusTipText = function (item) {
// const config = statusTipConfig[item.status]
// if (!config || !config.show) {
// return null
// }
// // 如果有显示条件,先判断条件
// if (config.showCondition && !config.showCondition(item)) {
// return null
// }
// // 如果 text 是函数,执行函数获取文本
// if (typeof config.text === 'function') {
// return config.text(item)
// }
// return config.text
// }
// 获取状态提示文本 // 获取状态提示文本
export const getStatusTipText = function (item) { export const getStatusTipText = function (item) {
const config = statusTipConfig[item.status] const {
if (!config || !config.show) { status,
return null waitProcessResumeCount,
} confirmFlag,
trialWaitConfirmCount,
onboardingWaitConfirmCount
} = item
// 如果有显示条件,先判断条件 // 待处理提示文案显示逻辑
if (config.showCondition && !config.showCondition(item)) { if (status == 1 && waitProcessResumeCount > 0) {
return null return `您有${waitProcessResumeCount}份简历待处理,请及时跟进`
} } else if (status == 1 && confirmFlag == 'Y' && trialWaitConfirmCount > 0) {
return '您有新的试岗记录,请及时查看'
// 如果 text 是函数,执行函数获取文本 } else if (
if (typeof config.text === 'function') { status == 1 &&
return config.text(item) confirmFlag == 'Y' &&
onboardingWaitConfirmCount > 0
) {
return '您有新的入职记录,请及时查看'
} else if (status == 2 && confirmFlag == 'Y') {
return '您的招聘需求已完成,请及时查看'
} else if (status == 3 && confirmFlag == 'Y') {
return '您的招聘需求已拒绝,请及时查看'
} }
return null
return config.text
} }
\ No newline at end of file \ No newline at end of file
...@@ -96,7 +96,12 @@ page { ...@@ -96,7 +96,12 @@ page {
align-items: center; align-items: center;
margin-bottom: var(--fontSize4); margin-bottom: var(--fontSize4);
justify-content: space-between; justify-content: space-between;
.ji {
display: inline-block;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.merchant-name { .merchant-name {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
data-item="{{ item }}" data-item="{{ item }}"
> >
<view class="item_header"> <view class="item_header">
<image wx:if="{{ item.urgent == 1 }}" class="ji" src="{{ IMG_URL }}miniProgram/ji.png" mode="aspectFill"></image>
<text class="merchant-name">{{item.merchantName}}</text> <text class="merchant-name">{{item.merchantName}}</text>
<text class="status-tag status-{{ item.status }}">{{item.statusName}}</text> <text class="status-tag status-{{ item.status }}">{{item.statusName}}</text>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!