|
@@ -40,7 +40,11 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="sub-li-bottom ss-m-t-20">
|
|
|
- <view class="sub-li-bottom-item color-primary" @tap.stop="handlePreview(val)">查看/下载附件</view>
|
|
|
+ <view
|
|
|
+ class="sub-li-bottom-item color-primary"
|
|
|
+ v-if="(props.current === 0 && val.url) || (props.current !== 0 && val?.cvRel && val?.cvRel?.url)"
|
|
|
+ @tap.stop="handlePreview(val)"
|
|
|
+ >查看/下载附件</view>
|
|
|
<view
|
|
|
class="sub-li-bottom-item d-flex align-center justify-center"
|
|
|
@tap.stop="handleLoadMore(val)"
|
|
@@ -60,6 +64,7 @@
|
|
|
class="action-item"
|
|
|
v-for="(val, index) in actionItems(itemData)"
|
|
|
:key="index"
|
|
|
+ :style="{'color': val?.disabled ? '#ccc' : '#00B760'}"
|
|
|
@tap.stop="val.click(itemData)"
|
|
|
>{{ val.title }}</view>
|
|
|
</view>
|
|
@@ -94,12 +99,14 @@ const itemData = ref({})
|
|
|
|
|
|
// 查看在线简历
|
|
|
const handleDetail = async (val) => {
|
|
|
- if (!val.userId || !val.id) {
|
|
|
+ const id = props.current === 0 ? val.id : val?.cvRel?.id
|
|
|
+ if (!val.userId || !id) {
|
|
|
uni.showToast({ title: '用户ID不存在', icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
try {
|
|
|
- const {data } = await personJobCvLook(val.id)
|
|
|
+ const {data } = await personJobCvLook(id)
|
|
|
if (data) emit('refresh')
|
|
|
} catch {}
|
|
|
uni.navigateTo({
|
|
@@ -109,19 +116,21 @@ const handleDetail = async (val) => {
|
|
|
|
|
|
// 查看附件
|
|
|
const handlePreview = async (val) => {
|
|
|
- if (!val.userId || !val.id) {
|
|
|
+ const id = props.current === 0 ? val.id : val?.cvRel?.id
|
|
|
+ const url = props.current === 0 ? val.url : val?.cvRel?.url
|
|
|
+ if (!val.userId || !id) {
|
|
|
uni.showToast({ title: '用户ID不存在', icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
- try {
|
|
|
- const {data } = await personJobCvLook(val.id)
|
|
|
- if (data) emit('refresh')
|
|
|
- } catch {}
|
|
|
- if (!val.url) {
|
|
|
+ if (!url) {
|
|
|
uni.showToast({ title: '附件地址不存在', icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
- preview(val.url)
|
|
|
+ try {
|
|
|
+ const {data } = await personJobCvLook(id)
|
|
|
+ if (data) emit('refresh')
|
|
|
+ } catch {}
|
|
|
+ preview(url)
|
|
|
}
|
|
|
|
|
|
// 更多操作
|
|
@@ -163,8 +172,12 @@ const handleInterviewInvite = (item) => {
|
|
|
uni.showToast({ title: '职位已关闭', icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
+ if (item.handleStatus) {
|
|
|
+ uni.showToast({ title: '已邀面试', icon: 'none' })
|
|
|
+ return
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
|
- url: `/pagesB/InviteInterview/index?id=${item.userId}&jobId=${item.job.id}`
|
|
|
+ url: `/pagesB/InviteInterview/index?id=${item.userId}&jobId=${item.job.id}&jobCvRelId=${item.id}`
|
|
|
})
|
|
|
handleClosePopup()
|
|
|
}
|
|
@@ -179,6 +192,7 @@ const handleEliminate = async (item) => {
|
|
|
bizId: item.id,
|
|
|
jobId: item.job.id,
|
|
|
userId: item.userId,
|
|
|
+ jobCvRelId: props.current === 0 ? item.id : item?.cvRel?.id,
|
|
|
type: props.current === 0 ? '0' : '1' // 投递简历0 已邀约1
|
|
|
}
|
|
|
// 招聘会职位则带id
|
|
@@ -280,8 +294,22 @@ const handleEnterByEnterprise = async (item) => {
|
|
|
}
|
|
|
|
|
|
const actionItems = (item) => {
|
|
|
+ const jobClosed = item.job.status === '1' || false
|
|
|
const arr = []
|
|
|
- if (props.current === 0) arr.push({ title: '邀请面试', click: handleInterviewInvite }, { title: '立即沟通', click: handleToCommunicate })
|
|
|
+ if (props.current === 0) {
|
|
|
+ arr.push(
|
|
|
+ {
|
|
|
+ title: jobClosed ? '邀请面试(职位已关闭)' : item.handleStatus ? '邀请面试(已邀面试)' : '邀请面试',
|
|
|
+ disabled: jobClosed || item.handleStatus,
|
|
|
+ click: handleInterviewInvite
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: jobClosed ? '立即沟通(职位已关闭)' : '立即沟通',
|
|
|
+ disabled: jobClosed,
|
|
|
+ click: handleToCommunicate
|
|
|
+ },
|
|
|
+ )
|
|
|
+ }
|
|
|
if ([0, 1].includes(props.current)) arr.push({ title: '不合适', click: handleEliminate })
|
|
|
if (props.current === 4) arr.push({ title: '取消不合适', click: handleCancelEliminate })
|
|
|
if (props.current === 2 && item?.job?.hire) arr.push({ title: '结算', click: handleSettlement })
|