Commit c3b8f40d by 张立顺

feat 功能开发

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