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,12 +523,13 @@ Page({ ...@@ -506,12 +523,13 @@ 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) { if (!formData.processResult) {
wx.showToast({ wx.showToast({
title: '请选择处理结果', title: '请选择处理结果',
...@@ -519,28 +537,31 @@ Page({ ...@@ -519,28 +537,31 @@ Page({
}) })
return return
} }
// 对于面试通过和面试不通过,都需要选择面试时间 // 人员符合(2)时,预计面试时间必填
if ( if (formData.processResult == 2 && !formData.expectedInterviewTime) {
(formData.processResult == 2 || formData.processResult == 3) &&
!formData.interviewTime
) {
wx.showToast({ wx.showToast({
title: '请选择面试时间', title: '请选择预计面试时间',
icon: 'none' icon: 'none'
}) })
return return
} }
// 对于面试通过和面试不通过,都需要选择面试时间 } else if (popupType === 'interview') {
if ( // 面试反馈阶段验证
(formData.processResult == 2 || formData.processResult == 3) && if (!formData.interviewResult) {
!formData.interviewResult
) {
wx.showToast({ wx.showToast({
title: '请选择面试结果', title: '请选择面试结果',
icon: 'none' icon: 'none'
}) })
return return
} }
if (!formData.interviewTime) {
wx.showToast({
title: '请选择面试时间',
icon: 'none'
})
return
}
}
// 设置处理状态为true,防止重复提交 // 设置处理状态为true,防止重复提交
this.setData({ this.setData({
...@@ -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">
<!-- Initial Processing -->
<block wx:if="{{ popupType == 'initial' }}">
<view class="form_item"> <view class="form_item">
<view class="label"> <view class="label">
处理结果 处理结果
<text class="required">*</text> <text class="required">*</text>
</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="{{ 2 }}">
<image class="radio-icon" wx:if="{{ formData.processResult == 1 }}" src="{{ IMG_URL }}radio-checked.png" mode="" /> <image class="radio-icon" wx:if="{{ formData.processResult == 2 }}" src="{{ IMG_URL }}radio-checked.png" />
<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="{{ 1 }}">
<image class="radio-icon" wx:if="{{ formData.processResult == 2 }}" src="{{ IMG_URL }}radio-checked.png" mode="" /> <image class="radio-icon" wx:if="{{ formData.processResult == 1 }}" src="{{ IMG_URL }}radio-checked.png" />
<view class="cily" wx:else></view> <view class="cily" wx:else></view>
<view class="text">已完成面试</view> <view class="text">人员不符合</view>
</view> </view>
</view> </view>
</view> </view>
<view class="form_item" wx:if="{{ formData.processResult == 2 }}"> <view class="form_item">
<view class="label"> <view class="label">
面试时间 预计面试时间
<text class="required">*</text> <text class="required">*</text>
</view> </view>
<view class="value" catchtap="showTimePicker"> <view class="value" bindtap="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="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" /> <image class="arrow_right" src="{{ IMG_URL }}arrow_right.png" mode="aspectFill" />
</view> </view>
</view> </view>
<view class="form_item" wx:if="{{ formData.processResult == 2 }}"> </block>
<!-- Interview Feedback -->
<block wx:if="{{ popupType == 'interview' }}">
<view class="form_item">
<view class="label"> <view class="label">
面试结果 面试结果
<text class="required">*</text> <text class="required">*</text>
</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" />
<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" />
<view class="cily" wx:else></view> <view class="cily" wx:else></view>
<view class="text">不通过</view> <view class="text">不通过</view>
</view> </view>
</view> </view>
</view> </view>
<view class="form_item">
<view class="label">
面试时间
<text class="required">*</text>
</view>
<view class="value" bindtap="showTimePicker">
<view class="{{ formData.dipalyTime ? 'time_text' : 'placeholder_text' }}">{{formData.dipalyTime || '点击选择'}}</view>
<image class="arrow_right" src="{{ IMG_URL }}arrow_right.png" mode="aspectFill" />
</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
...@@ -9,31 +9,13 @@ ...@@ -9,31 +9,13 @@
</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
refresher-enabled="{{ true }}"
bindrefresherrefresh="search"
bindscrolltolower="onBottomRefresh"
bindscroll="handleScroll"
class="list"
scroll-top="{{ scrollTop }}"
lower-threshold="400"
refresher-threshold="104"
refresher-triggered="{{ triggered }}"
>
<!-- 需求列表 --> <!-- 需求列表 -->
<block wx:if="{{ list.length && list[0].length }}"> <block wx:if="{{ list.length && list[0].length }}">
<block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind"> <block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view <view wx:for="{{ i }}" wx:key="index" class="item {{ userInfo.isSuper ? 'super_item' : '' }}" bind:tap="handleDetail" data-item="{{ item }}">
wx:for="{{ i }}"
wx:key="index"
class="item {{ userInfo.isSuper ? 'super_item' : '' }}"
bind:tap="handleDetail"
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> <image wx:if="{{ item.urgent == 1 }}" class="ji" src="{{ IMG_URL }}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!