Commit c3b8f40d by 张立顺

feat 功能开发

1 parent e146ca7d
...@@ -83,12 +83,12 @@ const actions = { ...@@ -83,12 +83,12 @@ const actions = {
if (agentId && agentId != 'undefined') ww_storage_info.agentId = agentId if (agentId && agentId != 'undefined') ww_storage_info.agentId = agentId
util.setLocalStorage('ww_storage_info', ww_storage_info) util.setLocalStorage('ww_storage_info', ww_storage_info)
} }
if (userInfo) { // if (userInfo) {
state.showWindow = true // state.showWindow = true
} else { // } else {
util.showLoading() // util.showLoading()
dispatch('login') // dispatch('login')
} // }
} }
} }
const getParams = name => { const getParams = name => {
......
...@@ -46,6 +46,10 @@ export default { ...@@ -46,6 +46,10 @@ export default {
getDemandStatAPI(data) { getDemandStatAPI(data) {
return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.stat', data, djStaffUrl) return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.stat', data, djStaffUrl)
}, },
// 获取招聘需求-审核详情
getDemandCheckDetailAPI(data) {
return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.demand.checkDetail', data, djStaffUrl)
},
// 招聘管理门店列表 // 招聘管理门店列表
// getDemandStoreListAPI(data) { // getDemandStoreListAPI(data) {
// return post('dj.api.staff.h5.recruitment.demand.store.list', data, djStaffUrl) // return post('dj.api.staff.h5.recruitment.demand.store.list', data, djStaffUrl)
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<div class="card_content"> <div class="card_content">
<div class="btn_group"> <div class="btn_group">
<div class="btn btn_outline" @click="handleViewResume(item.resumeUrl)">查看简历</div> <div class="btn btn_outline" @click="handleViewResume(item.resumeUrl)">查看简历</div>
<div v-if="item.processResult == null" class="btn btn_primary" @click="handleProcess(item.id)">处理</div> <div v-if="item.processResult == null || (item.processResult == 2 && item.interviewResult == null)" class="btn btn_primary" @click="handleProcess(item)">处理</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -163,22 +163,24 @@ ...@@ -163,22 +163,24 @@
<!-- 简历处理弹窗 --> <!-- 简历处理弹窗 -->
<van-popup v-model="showPopup" position="bottom" round :lock-scroll="true" @touchmove.prevent class="process-popup"> <van-popup v-model="showPopup" position="bottom" round :lock-scroll="true" @touchmove.prevent class="process-popup">
<div class="popup_content"> <div class="popup_content">
<div class="title">简历处理</div> <div class="title">{{ popupType === 'interview' ? '面试反馈' : '简历处理' }}</div>
<div class="scroll-view" style="overflow-y: auto; max-height: 443px"> <div class="scroll-view" style="overflow-y: auto; max-height: 443px">
<div class="form"> <div class="form">
<!-- 简历处理模式 -->
<template v-if="popupType === 'initial'">
<div class="form_item"> <div class="form_item">
<div class="label"> <div class="label">
处理结果 处理结果
<span class="required">*</span> <span class="required">*</span>
</div> </div>
<div class="value"> <div class="value">
<span class="tag" :class="{ active: formData.processResult == 1 }" @click="selectTag('processResult', 1)">人员不匹配</span> <span class="tag" :class="{ active: formData.processResult == 2 }" @click="selectTag('processResult', 2)">人员符合</span>
<span class="tag" :class="{ active: formData.processResult == 2 }" @click="selectTag('processResult', 2)">已完成面试</span> <span class="tag" :class="{ active: formData.processResult == 1 }" @click="selectTag('processResult', 1)">人员不符合</span>
</div> </div>
</div> </div>
<div class="form_item" v-if="formData.processResult == 2"> <div class="form_item" v-if="formData.processResult == 2">
<div class="label"> <div class="label">
面试时间 预计面试时间
<span class="required">*</span> <span class="required">*</span>
</div> </div>
<div class="value" @click.stop="showTimePicker"> <div class="value" @click.stop="showTimePicker">
...@@ -186,7 +188,11 @@ ...@@ -186,7 +188,11 @@
<van-icon name="arrow" color="#999" /> <van-icon name="arrow" color="#999" />
</div> </div>
</div> </div>
<div class="form_item" v-if="formData.processResult == 2"> </template>
<!-- 面试反馈模式 -->
<template v-else-if="popupType === 'interview'">
<div class="form_item">
<div class="label"> <div class="label">
面试结果 面试结果
<span class="required">*</span> <span class="required">*</span>
...@@ -196,6 +202,18 @@ ...@@ -196,6 +202,18 @@
<span class="tag" :class="{ active: formData.interviewResult == '0' }" @click="selectTag('interviewResult', '0')">不通过</span> <span class="tag" :class="{ active: formData.interviewResult == '0' }" @click="selectTag('interviewResult', '0')">不通过</span>
</div> </div>
</div> </div>
<div class="form_item">
<div class="label">
面试时间
<span class="required">*</span>
</div>
<div class="value" @click.stop="showTimePicker">
<div :class="formData.dipalyTime ? 'time_text' : 'placeholder_text'">{{ formData.dipalyTime || '请选择面试时间' }}</div>
<van-icon name="arrow" color="#999" />
</div>
</div>
</template>
<div class="form_item form_item_textarea"> <div class="form_item form_item_textarea">
<div class="label">说明</div> <div class="label">说明</div>
<div class="value"> <div class="value">
...@@ -215,7 +233,7 @@ ...@@ -215,7 +233,7 @@
</van-popup> </van-popup>
<!-- 时间选择器 --> <!-- 时间选择器 -->
<van-popup v-model="timeShow" position="bottom" round z-index="10000" @touchmove.prevent> <van-popup v-model="timeShow" position="bottom" round get-container="body" @touchmove.prevent>
<van-datetime-picker v-model="currentDate" type="date" :formatter="formatter" :max-date="today" @confirm="bindDateChange" @cancel="calcelDate" /> <van-datetime-picker v-model="currentDate" type="date" :formatter="formatter" :max-date="today" @confirm="bindDateChange" @cancel="calcelDate" />
</van-popup> </van-popup>
</div> </div>
...@@ -282,7 +300,8 @@ export default { ...@@ -282,7 +300,8 @@ export default {
formData: {}, formData: {},
detailLoaded: false, detailLoaded: false,
curDataId: '', curDataId: '',
isProcessing: false isProcessing: false,
popupType: 'initial' // initial or interview
} }
}, },
created() { created() {
...@@ -349,8 +368,14 @@ export default { ...@@ -349,8 +368,14 @@ export default {
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 apiDate = `${year}-${month}-${day} 00:00:00`
if (this.popupType === 'initial') {
this.formData.expectedInterviewTime = apiDate
} else {
this.formData.interviewTime = apiDate
}
this.formData.interviewTime = `${year}-${month}-${day} 00:00:00`
this.formData.dipalyTime = formattedDate this.formData.dipalyTime = formattedDate
this.timeShow = false this.timeShow = false
// Force update if needed // Force update if needed
...@@ -450,16 +475,26 @@ export default { ...@@ -450,16 +475,26 @@ export default {
console.error(err) console.error(err)
}) })
}, },
handleProcess(id) { handleProcess(item) {
this.showPopup = true this.showPopup = true
this.currentDate = new Date() this.currentDate = new Date()
// Determine popup type based on item status
if (item.processResult == 2) {
this.popupType = 'interview'
} else {
this.popupType = 'initial'
}
this.formData = { this.formData = {
id: id, id: item.id,
processResult: '', processResult: this.popupType === 'interview' ? 2 : '',
interviewTime: '', interviewTime: '',
expectedInterviewTime: '',
description: '', description: '',
descriptionLength: 0, descriptionLength: 0,
interviewResult: '' interviewResult: '',
dipalyTime: '' // Reset display time
} }
}, },
selectTag(field, value) { selectTag(field, value) {
...@@ -470,10 +505,15 @@ export default { ...@@ -470,10 +505,15 @@ export default {
} }
if (field === 'processResult') { if (field === 'processResult') {
if (value == 1 || value == 2) { // Reset time if process result changes in initial mode
this.formData.interviewTime = '' if (value == 1) {
// If mismatch, maybe clear expected time? user says expected time is required but logically mismatch shouldn't have it.
// However, if we switch back to 2, we need it.
this.formData.expectedInterviewTime = ''
this.formData.dipalyTime = ''
} else if (value == 2) {
this.formData.expectedInterviewTime = ''
this.formData.dipalyTime = '' this.formData.dipalyTime = ''
this.formData.interviewResult = ''
} }
} }
this.formData = { ...this.formData } this.formData = { ...this.formData }
...@@ -497,42 +537,56 @@ export default { ...@@ -497,42 +537,56 @@ export default {
const { formData } = this const { formData } = this
// Validation based on popupType
if (this.popupType === 'initial') {
if (!formData.processResult) { if (!formData.processResult) {
this.$toast('请选择处理结果') this.$toast('请选择处理结果')
return return
} }
if (formData.processResult == 2 && !formData.expectedInterviewTime) {
if (formData.processResult == 2 && !formData.interviewTime) { this.$toast('请选择预计面试时间')
this.$toast('请选择面试时间')
return return
} }
} else if (this.popupType === 'interview') {
if (formData.processResult == 2 && !formData.interviewResult) { if (!formData.interviewResult) {
this.$toast('请选择面试结果') this.$toast('请选择面试结果')
return return
} }
if (!formData.interviewTime) {
this.$toast('请选择面试时间')
return
}
}
this.isProcessing = true this.isProcessing = true
let requestParams = { let requestParams = {
id: formData.id, id: formData.id,
processResult: formData.processResult technicalSupervisorName: this.recruitment.technicalSupervisorName || '',
technicalSupervisorPhone: this.recruitment.technicalSupervisorPhone || ''
} }
if (formData.processResult == 1) { if (this.popupType === 'initial') {
requestParams.processResult = formData.processResult
requestParams.description = formData.description requestParams.description = formData.description
} else if (formData.processResult == 2) { if (formData.processResult == 2) {
requestParams.interviewTime = formData.interviewTime requestParams.expectedInterviewTime = formData.expectedInterviewTime
}
} else if (this.popupType === 'interview') {
// requestParams.processResult = 2
requestParams.interviewResult = formData.interviewResult requestParams.interviewResult = formData.interviewResult
requestParams.interviewTime = formData.interviewTime
requestParams.interviewExplanation = formData.description requestParams.interviewExplanation = formData.description
} }
api api
.processResumeAPI(requestParams) .processResumeAPI(requestParams)
.then(() => { .then(res => {
this.getDetail(this.curDataId) if (res == true) {
this.$toast.success('处理成功') this.$toast.success('处理成功')
this.hidePopup() this.hidePopup()
this.getDetail(this.curDataId)
}
}) })
.catch(error => { .catch(error => {
this.isProcessing = false this.isProcessing = false
......
...@@ -5,55 +5,55 @@ ...@@ -5,55 +5,55 @@
<div class="info-item"> <div class="info-item">
<span class="label">门店名称</span> <span class="label">门店名称</span>
<div class="value"> <div class="value">
{{ detail.merchantName || '--' }} {{ formatValue(detail.merchantName) }}
<img v-if="detail.urgent === 1" class="ji" :src="`${IMG_URL}miniProgram/ji.png`" /> <img v-if="detail.urgent === 1" class="ji" :src="`${IMG_URL}miniProgram/ji.png`" />
</div> </div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">近一月新车销量</span> <span class="label">近一月新车销量</span>
<div class="value">400</div> <div class="value">{{ formatValue(detail.salesVolume) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">主营品牌</span> <span class="label">主营品牌</span>
<div class="value">鸿蒙智行/比亚迪</div> <div class="value">{{ formatValue(detail.brand) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">门店地址</span> <span class="label">门店地址</span>
<div class="value">广东省深圳市深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层</div> <div class="value">{{ formatValue(detail.merchantAddress) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">业务类型</span> <span class="label">业务类型</span>
<div class="value">{{ detail.businessTypeName || '--' }}</div> <div class="value">{{ formatValue(detail.businessTypeName) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">招聘类型</span> <span class="label">招聘类型</span>
<div class="value">{{ detail.recruitmentTypeName || '--' }}</div> <div class="value">{{ formatValue(detail.recruitmentTypeName) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">招聘数量</span> <span class="label">招聘数量</span>
<div class="value">6</div> <div class="value">{{ formatValue(detail.recruitmentQuantity) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">区域运营</span> <span class="label">区域运营</span>
<div class="value">罗敏</div> <div class="value">{{ formatValue(detail.regionOperationName) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">需求描述</span> <span class="label">需求描述</span>
<div class="value">{{ detail.requirementDescription || '--' }}</div> <div class="value">{{ formatValue(detail.requirementDescription) }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="label">招聘负责人</span> <span class="label">招聘负责人</span>
<div class="value flex-center"> <div class="value flex-center">
{{ detail.recruiterName || '--' }} {{ formatValue(detail.recruiterName) }}
<a v-if="detail.recruiterPhone" :href="'tel:' + detail.recruiterPhone" class="phone-icon-wrapper"> <a v-if="detail.recruiterPhone" :href="'tel:' + detail.recruiterPhone" class="phone-icon-wrapper">
<!-- <van-icon name="phone-o" /> --> <!-- <van-icon name="phone-o" /> -->
<img class="phone_icon" src="../image/call-icon.png" /> <img class="phone_icon" src="../image/call-icon.png" />
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<div class="info-item"> <div class="info-item">
<span class="label">技术督导</span> <span class="label">技术督导</span>
<div class="value flex-center"> <div class="value flex-center">
{{ detail.technicalSupervisorName || '--' }} {{ formatValue(detail.technicalSupervisorName) }}
<a v-if="detail.technicalSupervisorPhone" :href="'tel:' + detail.technicalSupervisorPhone" class="phone-icon-wrapper"> <a v-if="detail.technicalSupervisorPhone" :href="'tel:' + detail.technicalSupervisorPhone" class="phone-icon-wrapper">
<!-- <van-icon name="phone-o" /> --> <!-- <van-icon name="phone-o" /> -->
<img class="phone_icon" src="../image/call-icon.png" /> <img class="phone_icon" src="../image/call-icon.png" />
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<div class="info-item"> <div class="info-item">
<span class="label">申请时间</span> <span class="label">申请时间</span>
<div class="value">{{ detail.createdDate || '--' }}</div> <div class="value">{{ formatValue(detail.createdDate) }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -125,6 +125,10 @@ export default { ...@@ -125,6 +125,10 @@ export default {
this.fetchDetail() this.fetchDetail()
}, },
methods: { methods: {
formatValue(val) {
if (val === 0 || val === '0') return val
return val || '--'
},
async fetchDetail() { async fetchDetail() {
const id = this.$route.query.id const id = this.$route.query.id
if (!id) { if (!id) {
...@@ -132,12 +136,8 @@ export default { ...@@ -132,12 +136,8 @@ export default {
return return
} }
try { try {
const res = await api.getRecruitDetailAPI({ id }) const res = await api.getDemandCheckDetailAPI({ id })
// if (res.code === 200) { this.detail = res || {}
this.detail = res?.recruitment || {}
// } else {
// Toast(res.msg || '获取详情失败')
// }
} catch (error) { } catch (error) {
console.error(error) console.error(error)
Toast('网络错误') Toast('网络错误')
...@@ -166,28 +166,26 @@ export default { ...@@ -166,28 +166,26 @@ export default {
console.error(error) console.error(error)
} }
}, },
async handleConfirm() { handleConfirm() {
// Dialog.confirm({ Dialog.confirm({
// title: '提示', title: '提示',
// message: '确认通过该招聘需求吗?' message: '确认后当前招聘需求自动进入招聘中。\n确定是否确认?'
// }) })
// .then(async () => { .then(async () => {
// try { try {
// await await api.updateDemandStatusAPI({
const res = await api.updateDemandStatusAPI({
id: this.detail.id || this.$route.query.id, id: this.detail.id || this.$route.query.id,
status: 1 // 1-招聘中 status: 1 // 1-招聘中
}) })
Toast.success('已确认') Toast.success('已确认')
this.$router.back() this.$router.back()
// } } catch (error) {
// catch (error) { console.error(error)
// console.error(error) }
// } })
// }) .catch(() => {
// .catch(() => { // on cancel
// // on cancel })
// })
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!