浏览代码

投递简历

lifanagju_citu 8 月之前
父节点
当前提交
043bb033ee
共有 2 个文件被更改,包括 101 次插入7 次删除
  1. 13 0
      api/position.js
  2. 88 7
      pagesB/positionDetail/index.vue

+ 13 - 0
api/position.js

@@ -80,3 +80,16 @@ export const getPersonJobUnfavorite = (jobId) => {
     }
   })
 }
+
+// 投递简历
+export const jobCvRelSend = (data) => {
+  return request({
+    url: '/app-api/menduner/system/job-cv-rel/send',
+    method: 'POST',
+    data,
+    custom: {
+      auth: true,
+      showLoading: false
+    }
+  })
+}

+ 88 - 7
pagesB/positionDetail/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <scroll-view class="scrollBox" scroll-y="true" style="position:relative;">
+    <scroll-view class="scrollBox" style="position:relative;">
       <view class="box">
         <view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
         <view v-else>
@@ -99,15 +99,53 @@
         <button v-else class="buttons" @click="handleDelivery">我要投递</button>
       </view>
     </view>
+    <uni-popup ref="popup" background-color="#fff">
+      <view class="dialogBox" style="width: 86vw;">
+        <view class="dialog-title">
+          <view class="title">选择简历</view>
+          <uni-icons type="close" color="grey" size="26" @click="popupClose" />
+        </view>
+        <view style="height: 1px; margin: 0 10rpx; color: gray;"></view>
+        <view class="dialog-content" style="max-height: 50vh;">
+          <uni-card
+            v-for="(item, index) in resumeList"
+            :key="index"
+            shadow="0px 0px 3px 1px rgba(0,0,0,0.1)"
+            :is-shadow="true"
+            :border='false'
+             background-color="red"
+            :class="{'selected': selectIndex === index}"
+            @click="selectIndex = index"
+          >
+            <view class="d-flex align-center">
+              <view style="flex: 1;">
+                <view style="font-weight: bold;">
+                  <uni-icons v-if="selectIndex === index" color="green" type="checkmarkempty" size="18"></uni-icons>
+                  {{ item.title }}
+                </view>
+                <view>上传时间:{{ timesTampChange(item.createTime, 'Y-M-D') }}</view>
+              </view>
+              <view class="ss-m-l-30" style="width: 60rpx;">
+                <uni-icons @click="preview(item.url)" type="eye" size="24"></uni-icons>
+              </view>
+            </view>
+          </uni-card>
+        </view>
+        <view class="dialog-bottom" @click="handleSubmit">确认投递</view>
+      </view>
+    </uni-popup>
   </view>
 </template>
 <script setup>
 import { commissionCalculation } from '@/utils/position'
+import { timesTampChange } from '@/utils/date'
+import { preview } from '@/utils/preview'
 // import loginPage from '@/views/common/loginDialog.vue'
 // import simplePage from './sendResume/simple.vue'
 // import selectPage from './sendResume/select.vue'
 import { reactive, ref } from 'vue';
 import {
+  jobCvRelSend,
   getPositionDetails,
   jobCvRelCheckSend,
   getPersonJobUnfavorite, // 取消收藏
@@ -153,9 +191,6 @@ onLoad((options) => {
   }
 })
 
-
-
-
 // 效验是否有投递过简历
 const delivery = ref(true) // 是否已投递简历
 const deliveryCheck = async () => {
@@ -167,10 +202,10 @@ const deliveryCheck = async () => {
   }
 }
 
+const popup = ref()
 const resumeList = ref([])
-// const selectResume = ref()
+const selectIndex = ref(null)
 const handleDelivery = async () => {
-  // delivery.value = true
   if (delivery.value) {
     uni.showToast({ title: '您已投递过该职位!', icon: 'none', duration: 2000, })
     return
@@ -181,7 +216,23 @@ const handleDelivery = async () => {
     uni.showToast({ title: '您还未上传过简历,请先上传简历', icon: 'none', duration: 2000, })
     return
   }
-  // showResume.value = true
+  // show.value = true
+  popup.value.open()
+}
+const handleSubmit = async () => {
+  const resume = resumeList.value[selectIndex.value]
+  if (!resume) {
+    selectIndex.value = null
+    uni.showToast({ title: '请选择简历', icon: 'none', duration: 2000, })
+    return
+  }
+  await jobCvRelSend({ jobId, title: resume.title, url: resume.url, type: info.value.hire ? 1 : 0 })
+  uni.showToast({ title: '投递成功', icon: 'none', duration: 2000, })
+  deliveryCheck()
+  popup.value.close()
+}
+const popupClose = () => {
+  selectIndex.value = null
 }
 
 
@@ -370,4 +421,34 @@ const handleCollection = async () => {
 .mr { margin-right: 20rpx; }
 .mr-10{ margin-right: 10rpx; }
 .my-5{ margin: 5px 0; }
+
+
+// 选择简历
+.dialogBox {
+  .dialog-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    color:#767a82;
+    padding: 20rpx;
+    .title {
+      font-weight:bold;
+    }
+  }
+  .dialog-content{
+    padding: 20rpx;
+    padding-bottom: 50rpx;
+    .selected {
+      background-color: #00897b !important;
+    }
+  }
+  .dialog-bottom{
+    width: 100%;
+    height: 44px;
+    line-height: 44px;
+    text-align: center;
+    color: #fff !important;
+    background-color: #00897b !important;
+  }
+}
 </style>