Commit f63a2418 by 张立顺

feat 功能开发

1 parent fe3867a8
...@@ -144,10 +144,19 @@ Page({ ...@@ -144,10 +144,19 @@ Page({
const month = String(date.getMonth() + 1).padStart(2, '0') const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0') const day = String(date.getDate()).padStart(2, '0')
const formattedDate = `${year}年${month}月${day}日` const formattedDate = `${year}年${month}月${day}日`
const formattedFull = new Date(timestamp) const apiDate = `${year}-${month}-${day} 00:00:00`
const { formData, pageScrollTop } = this.data
formData.interviewTime = `${year}-${month}-${day} 00:00:00` const { formData, pageScrollTop, popupType } = this.data
// 根据 popupType 设置不同的字段
if (popupType === 'initial') {
formData.expectedInterviewTime = apiDate
} else if (popupType === 'interview') {
formData.interviewTime = apiDate
}
formData.dipalyTime = formattedDate formData.dipalyTime = formattedDate
this.setData( this.setData(
{ {
formData, formData,
...@@ -365,7 +374,14 @@ Page({ ...@@ -365,7 +374,14 @@ Page({
* 处理按钮点击 * 处理按钮点击
*/ */
handleProcess(e) { handleProcess(e) {
let { id } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const item = this.data.recruitmentPlans[index]
// Determine popup type based on item status
let popupType = 'initial'
if (item.processResult == 2 && item.interviewResult == null) {
popupType = 'interview'
}
// 保存当前页面滚动位置 // 保存当前页面滚动位置
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
...@@ -380,9 +396,10 @@ Page({ ...@@ -380,9 +396,10 @@ Page({
this.setData({ this.setData({
showPopup: true, showPopup: true,
popupType,
currentDate: new Date().getTime(), // 重置当前时间为今天 currentDate: new Date().getTime(), // 重置当前时间为今天
formData: { formData: {
id: id, id: item.id,
processResult: '', // 处理结果 processResult: '', // 处理结果
interviewTime: '', // 面试时间 interviewTime: '', // 面试时间
description: '', // 说明 description: '', // 说明
...@@ -506,40 +523,44 @@ Page({ ...@@ -506,40 +523,44 @@ Page({
* 确认处理 * 确认处理
*/ */
confirmProcess() { confirmProcess() {
const { formData, isProcessing } = this.data const { formData, isProcessing, popupType, recruitment } = this.data
// 防止重复提交 // 防止重复提交
if (isProcessing) return if (isProcessing) return
// 验证必填项 if (popupType === 'initial') {
if (!formData.processResult) { // 简历处理阶段验证
wx.showToast({ if (!formData.processResult) {
title: '请选择处理结果', wx.showToast({
icon: 'none' title: '请选择处理结果',
}) icon: 'none'
return })
} return
// 对于面试通过和面试不通过,都需要选择面试时间 }
if ( // 人员符合(2)时,预计面试时间必填
(formData.processResult == 2 || formData.processResult == 3) && if (formData.processResult == 2 && !formData.expectedInterviewTime) {
!formData.interviewTime wx.showToast({
) { title: '请选择预计面试时间',
wx.showToast({ icon: 'none'
title: '请选择面试时间', })
icon: 'none' return
}) }
return } else if (popupType === 'interview') {
} // 面试反馈阶段验证
// 对于面试通过和面试不通过,都需要选择面试时间 if (!formData.interviewResult) {
if ( wx.showToast({
(formData.processResult == 2 || formData.processResult == 3) && title: '请选择面试结果',
!formData.interviewResult icon: 'none'
) { })
wx.showToast({ return
title: '请选择面试结果', }
icon: 'none' if (!formData.interviewTime) {
}) wx.showToast({
return title: '请选择面试时间',
icon: 'none'
})
return
}
} }
// 设置处理状态为true,防止重复提交 // 设置处理状态为true,防止重复提交
...@@ -549,10 +570,21 @@ Page({ ...@@ -549,10 +570,21 @@ Page({
let requestParams = { let requestParams = {
id: formData.id, id: formData.id,
processResult: formData?.processResult, technicalSupervisorName: recruitment.technicalSupervisorName,
interviewTime: formData?.interviewTime, technicalSupervisorPhone: recruitment.technicalSupervisorPhone,
interviewResult: formData?.interviewResult, processResult: formData?.processResult
description: formData?.description }
if (popupType === 'initial') {
requestParams.processResult = formData?.processResult
if (formData.processResult == 2) {
requestParams.expectedInterviewTime = formData.expectedInterviewTime
}
requestParams.description = formData?.description
} else {
requestParams.interviewTime = formData?.interviewTime
requestParams.interviewResult = formData?.interviewResult
requestParams.interviewExplanation = formData?.description
} }
processResumeAPI(requestParams) processResumeAPI(requestParams)
......
...@@ -137,7 +137,12 @@ ...@@ -137,7 +137,12 @@
</view> </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 || (item.processResult == 2 && item.interviewResult == null) }}"
class="btn btn_primary"
bindtap="handleProcess"
data-index="{{ index }}"
>处理</view>
<!-- <van-button wx:if="{{item.status === 0}}" class="btn btn_primary" bindtap="handleProcess" data-id="{{item.id}}" plain type="primary">处理</van-button> --> <!-- <van-button wx:if="{{item.status === 0}}" class="btn btn_primary" bindtap="handleProcess" data-id="{{item.id}}" plain type="primary">处理</van-button> -->
</view> </view>
</view> </view>
...@@ -194,55 +199,71 @@ ...@@ -194,55 +199,71 @@
catchtouchmove="preventTouchMove" catchtouchmove="preventTouchMove"
> >
<view class="popup_content"> <view class="popup_content">
<view class="title">简历处理</view> <view class="title">{{ popupType == 'initial' ? '简历处理' : '面试反馈' }}</view>
<scroll-view scroll-y style="height: var(--fontSize807);" bindtouchmove="stopPropagation"> <scroll-view scroll-y style="height: var(--fontSize807);" bindtouchmove="stopPropagation">
<view class="form"> <view class="form">
<view class="form_item"> <!-- Initial Processing -->
<view class="label"> <block wx:if="{{ popupType == 'initial' }}">
处理结果 <view class="form_item">
<text class="required">*</text> <view class="label">
</view> 处理结果
<view class="value"> <text class="required">*</text>
<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="" />
<view class="cily" wx:else></view>
<view class="text">人员不匹配</view>
</view> </view>
<view class="radio" bindtap="selectTag" data-field="processResult" data-value="2"> <view class="value">
<image class="radio-icon" wx:if="{{ formData.processResult == 2 }}" src="{{ IMG_URL }}radio-checked.png" mode="" /> <view class="radio mar-r20" bindtap="selectTag" data-field="processResult" data-value="{{ 2 }}">
<view class="cily" wx:else></view> <image class="radio-icon" wx:if="{{ formData.processResult == 2 }}" src="{{ IMG_URL }}radio-checked.png" />
<view class="text">已完成面试</view> <view class="cily" wx:else></view>
<view class="text">人员符合</view>
</view>
<view class="radio" bindtap="selectTag" data-field="processResult" data-value="{{ 1 }}">
<image class="radio-icon" wx:if="{{ formData.processResult == 1 }}" src="{{ IMG_URL }}radio-checked.png" />
<view class="cily" wx:else></view>
<view class="text">人员不符合</view>
</view>
</view> </view>
</view> </view>
</view> <view class="form_item">
<view class="form_item" wx:if="{{ formData.processResult == 2 }}"> <view class="label">
<view class="label"> 预计面试时间
面试时间 <text class="required">*</text>
<text class="required">*</text> </view>
</view> <view class="value" bindtap="showTimePicker">
<view class="value" catchtap="showTimePicker"> <view class="{{ formData.dipalyTime ? 'time_text' : 'placeholder_text' }}">{{formData.dipalyTime || '点击选择'}}</view>
<view class="{{ formData.dipalyTime ? 'time_text' : 'placeholder_text' }}">{{formData.dipalyTime || '点击选择'}}</view> <image class="arrow_right" src="{{ IMG_URL }}arrow_right.png" mode="aspectFill" />
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" /> </view>
</view> </view>
</view> </block>
<view class="form_item" wx:if="{{ formData.processResult == 2 }}"> <!-- Interview Feedback -->
<view class="label"> <block wx:if="{{ popupType == 'interview' }}">
面试结果 <view class="form_item">
<text class="required">*</text> <view class="label">
面试结果
<text class="required">*</text>
</view>
<view class="value">
<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" />
<view class="cily" wx:else></view>
<view class="text">通过</view>
</view>
<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" />
<view class="cily" wx:else></view>
<view class="text">不通过</view>
</view>
</view>
</view> </view>
<view class="value"> <view class="form_item">
<view class="radio mar-r20" bindtap="selectTag" data-field="interviewResult" data-value="1"> <view class="label">
<image class="radio-icon" wx:if="{{ formData.interviewResult == '1' }}" src="{{ IMG_URL }}radio-checked.png" mode="" /> 面试时间
<view class="cily" wx:else></view> <text class="required">*</text>
<view class="text">通过</view>
</view> </view>
<view class="radio" bindtap="selectTag" data-field="interviewResult" data-value="0"> <view class="value" bindtap="showTimePicker">
<image class="radio-icon" wx:if="{{ formData.interviewResult == '0' }}" src="{{ IMG_URL }}radio-checked.png" mode="" /> <view class="{{ formData.dipalyTime ? 'time_text' : 'placeholder_text' }}">{{formData.dipalyTime || '点击选择'}}</view>
<view class="cily" wx:else></view> <image class="arrow_right" src="{{ IMG_URL }}arrow_right.png" mode="aspectFill" />
<view class="text">不通过</view>
</view> </view>
</view> </view>
</view> </block>
<view class="form_item form_item_textarea"> <view class="form_item form_item_textarea">
<view class="label">说明</view> <view class="label">说明</view>
<view class="value"> <view class="value">
...@@ -250,10 +271,10 @@ ...@@ -250,10 +271,10 @@
<textarea <textarea
placeholder="请输入" placeholder="请输入"
value="{{ formData.description }}" value="{{ formData.description }}"
data-field="description"
bindinput="handleTextareaInput" bindinput="handleTextareaInput"
maxlength="200" maxlength="200"
data-field="description" ></textarea>
/>
<view class="char_count">{{formData.descriptionLength || 0}}/200</view> <view class="char_count">{{formData.descriptionLength || 0}}/200</view>
</view> </view>
</view> </view>
...@@ -267,24 +288,14 @@ ...@@ -267,24 +288,14 @@
</view> </view>
</van-popup> </van-popup>
<!-- 时间选择器 --> <!-- 时间选择器 -->
<van-popup <van-popup show="{{ timeShow }}" position="bottom" round bind:close="calcelDate" catchtouchmove="preventTouchMove">
show="{{ timeShow }}"
position="bottom"
bind:close="calcelDate"
close-on-click-overlay="{{ true }}"
z-index="10000"
round
catchtouchmove="preventTouchMove"
>
<van-datetime-picker <van-datetime-picker
type="date" type="date"
bind:input="onInput"
bind:cancel="calcelDate"
confirm-button-text="确定"
value="{{ currentDate }}" value="{{ currentDate }}"
formatter="{{ formatter }}" formatter="{{ formatter }}"
max-date="{{ today }}" max-date="{{ today }}"
bind:confirm="bindDateChange" bind:confirm="bindDateChange"
bind:cancel="calcelDate"
/> />
</van-popup> </van-popup>
</view> </view>
\ No newline at end of file \ No newline at end of file
<!-- 招聘管理 --> <!-- 招聘管理 -->
<glsx-privacy appletName="招聘管理" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="招聘管理" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="container_page"> <view class="container_page">
<!-- 顶部Tab模块 --> <!-- 顶部Tab模块 -->
<view class="top_content" wx:if="{{ tabList.length }}"> <view class="top_content" wx:if="{{ tabList.length }}">
<view class="tab_box"> <view class="tab_box">
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" /> <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" />
</view> </view>
</view> </view>
<!-- 列表模块 --> <!-- 列表模块 -->
<view class="content"> <view class="content">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscrolltolower="onBottomRefresh" bindscroll="handleScroll" class="list" scroll-top="{{ scrollTop }}" lower-threshold="400" refresher-threshold="104" refresher-triggered="{{ triggered }}">
scroll-y <!-- 需求列表 -->
enable-back-to-top <block wx:if="{{ list.length && list[0].length }}">
refresher-enabled="{{ true }}" <block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
bindrefresherrefresh="search" <view wx:for="{{ i }}" wx:key="index" class="item {{ userInfo.isSuper ? 'super_item' : '' }}" bind:tap="handleDetail" data-item="{{ item }}">
bindscrolltolower="onBottomRefresh" <view class="item_header">
bindscroll="handleScroll" <image wx:if="{{ item.urgent == 1 }}" class="ji" src="{{ IMG_URL }}ji.png" mode="aspectFill"></image>
class="list" <text class="merchant-name">{{item.merchantName}}</text>
scroll-top="{{ scrollTop }}" <text class="status-tag status-{{ item.status }}">{{item.statusName}}</text>
lower-threshold="400" </view>
refresher-threshold="104" <view class="item_content" wx:for="{{ mentorshipFormData }}" wx:for-item="it" wx:for-index="subInd" wx:key="subInd">
refresher-triggered="{{ triggered }}" <block>
> <view class="label">{{it.label}}</view>
<!-- 需求列表 --> <view class="value">
<block wx:if="{{ list.length && list[0].length }}"> {{item[it.labelName] || '-'}}
<block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind"> <text wx:if="{{ it.label == '招聘数量' }}">人</text>
<view </view>
wx:for="{{ i }}" </block>
wx:key="index" </view>
class="item {{ userInfo.isSuper ? 'super_item' : '' }}" <!-- 提示消息 -->
bind:tap="handleDetail" <view class="item_footer" wx:if="{{ tabIndex == 0 && item.showTip && item.confirmFlag == 'N' && item.status !== 0 }}">
data-item="{{ item }}" <view class="msg_tips">
> <text>{{item.tipText}}</text>
<view class="item_header"> <image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
<image wx:if="{{ item.urgent == 1 }}" class="ji" src="{{ IMG_URL }}miniProgram/ji.png" mode="aspectFill"></image> </view>
<text class="merchant-name">{{item.merchantName}}</text> </view>
<text class="status-tag status-{{ item.status }}">{{item.statusName}}</text> </view>
</view> </block>
<view class="item_content" wx:for="{{ mentorshipFormData }}" wx:for-item="it" wx:for-index="subInd" wx:key="subInd"> <block wx:if="{{ nothing }}">
<block> <view class="list-nothing">没有更多了</view>
<view class="label">{{it.label}}</view> </block>
<view class="value"> </block>
{{item[it.labelName] || '-'}} <!-- 空数据占位 -->
<text wx:if="{{ it.label == '招聘数量' }}">人</text> <view class="no_data" wx:else>
</view> <empty-data />
</block> </view>
</view> </scroll-view>
<!-- 提示消息 --> </view>
<view class="item_footer" wx:if="{{ tabIndex == 0 && item.showTip && item.confirmFlag == 'N' && item.status !== 0 }}"> <!-- 添加招聘按钮 -->
<view class="msg_tips"> <view class="insert_btn {{ btnVisible ? 'btn-visible' : 'btn-hidden' }}" bindtap="handleInsertRecruit">
<text>{{item.tipText}}</text> <image class="insert_icon" src="{{IMG_URL}}new-recruitment.png" mode="widthFix" />
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" /> <view class="label">
</view> <text>新增招聘</text>
</view> </view>
</view> </view>
</block> <!-- 箭头图标 - 与按钮互斥显示 -->
<block wx:if="{{ nothing }}"> <view class="arrowIcon {{ btnVisible ? 'arrow-hidden' : 'arrow-visible' }}">
<view class="list-nothing">没有更多了</view> <image class="image" src="{{ IMG_URL }}arrow-left.png" />
</block> </view>
</block>
<!-- 空数据占位 -->
<view class="no_data" wx:else>
<empty-data />
</view>
</scroll-view>
</view>
<!-- 添加招聘按钮 -->
<view class="insert_btn {{ btnVisible ? 'btn-visible' : 'btn-hidden' }}" bindtap="handleInsertRecruit">
<image class="insert_icon" src="{{IMG_URL}}new-recruitment.png" mode="widthFix" />
<view class="label">
<text>新增招聘</text>
</view>
</view>
<!-- 箭头图标 - 与按钮互斥显示 -->
<view class="arrowIcon {{ btnVisible ? 'arrow-hidden' : 'arrow-visible' }}">
<image class="image" src="{{ IMG_URL }}arrow-left.png" />
</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!