Sfoglia il codice sorgente

加上认证实习企业按钮:1.我已投递展示逻辑:是学生&&属于招聘会职位&&未上报为实习企业 2.实习记录:等待中&&未上报为实习企业

lifanagju_citu 1 mese fa
parent
commit
799757e3e2

+ 11 - 0
api/student.js

@@ -126,3 +126,14 @@ export const getMajorList = async (params) => {
 		}
 	})
 }
+
+// 上报实习企业
+export const reportStudentPracticeEnterprise = async (enterpriseId, internshipJobId) => {
+	return request({
+		url: `/app-api/menduner/system/student/internship/enterprise?enterpriseId=${enterpriseId}&internshipJobId=${internshipJobId}`,
+		method: 'POST',
+		custom: {
+			auth: true
+		}
+	})
+}

+ 114 - 63
components/PositionList/index.vue

@@ -2,73 +2,81 @@
   <view class="ss-m-x-20">
     <!-- 岗位列表 -->
     <view v-if="list.length > 0" class="ss-p-b-30 ss-p-t-20">
-      <view v-for="(item, index) in list" :key="index" class="mList default-border list-item-bgc" :class="{ 'disable': !jobFairId && item.job?.status === '1'}" @click="toDetail(item)">
-        <!-- 职位信息 -->
-        <view class="list-shape" :style="`border-radius: ${props.showEntInfo ? '12px 12px 0 0' : '12px'};`">
-          <!-- 职位 -->
-          <view class="titleBox ss-m-y-10">
-            <view style="display: flex;align-items: center;">
-              <view v-if="item.job?.hire" class="iconfont icon-a-1_zhaopin ss-m-r-10" style="color: #e03506; font-size: 25px;"></view>
-              <image v-if="props.jobFairId" src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
-              <rich-text v-if="item.job?.name?.indexOf('style') !== -1" class="job-name MiSans-Semibold default-text-color" :nodes="item.job.name"></rich-text>
-              <view v-else class="job-name MiSans-Semibold default-text-color">{{ formatName(item.job?.name) }}</view>
+      <view v-for="(item, index) in list" :key="index" class="mList default-border list-item-bgc"  @click="toDetail(item)">
+        <view :class="{ 'disable': !jobFairId && item.job?.status === '1'}">
+          <!-- 职位信息 -->
+          <view class="list-shape" :style="`border-radius: ${props.showEntInfo ? '12px 12px 0 0' : '12px'};`">
+            <!-- 职位 -->
+            <view class="titleBox ss-m-y-10">
+              <view style="display: flex;align-items: center;">
+                <view v-if="item.job?.hire" class="iconfont icon-a-1_zhaopin ss-m-r-10" style="color: #e03506; font-size: 25px;"></view>
+                <image v-if="props.jobFairId" src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
+                <rich-text v-if="item.job?.name?.indexOf('style') !== -1" class="job-name MiSans-Semibold default-text-color" :nodes="item.job.name"></rich-text>
+                <view v-else class="job-name MiSans-Semibold default-text-color">{{ formatName(item.job?.name) }}</view>
+              </view>
             </view>
-          </view>
-          <!-- 薪酬、工作地、学历、工作经验 -->
-          <view class="ellipsis" style="max-width: 100%; align-items: baseline;">
-            <span class="ss-m-r-20">
-              <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text MiSans-Bold">面议</span>
-              <span v-else class="salary-text MiSans-Bold">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>
-            </span>
-              <span class="desc-tag font-size-13">
-                <span class="MiSans-Normal">{{item.job?.area?.str ?? '全国' }}</span>
-                <span class="divider-mx" v-if="item.job?.eduName">|</span>
-                <span class="MiSans-Normal">{{item.job?.eduName }}</span>
-                <span class="divider-mx" v-if="item.job?.expName">|</span>
-                <span class="MiSans-Normal">{{item.job?.expName }}</span>
+            <!-- 薪酬、工作地、学历、工作经验 -->
+            <view class="ellipsis" style="max-width: 100%; align-items: baseline;">
+              <span class="ss-m-r-20">
+                <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text MiSans-Bold">面议</span>
+                <span v-else class="salary-text MiSans-Bold">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>
               </span>
+                <span class="desc-tag font-size-13">
+                  <span class="MiSans-Normal">{{item.job?.area?.str ?? '全国' }}</span>
+                  <span class="divider-mx" v-if="item.job?.eduName">|</span>
+                  <span class="MiSans-Normal">{{item.job?.eduName }}</span>
+                  <span class="divider-mx" v-if="item.job?.expName">|</span>
+                  <span class="MiSans-Normal">{{item.job?.expName }}</span>
+                </span>
+            </view>
+            <!-- 岗位tag  -->
+            <view class="ss-m-t-15" v-if="showWelfareTag">
+              <uni-tag 
+                v-for="(tag,i) in item.job?.tagList || []"
+                :key="i"
+                class="tag-gap MiSans-Normal"
+                :text="tag"
+                inverted="false"
+                size="mini"
+                custom-style="background-color: #ececec;color:#666;border-color:#ececec;display: inline-block;"
+              />
+            </view>
+            <view style="text-align: end;" v-if="item.job?.hire">
+              <uni-tag
+                class="ss-m-l-10"
+                v-if="item?.job?.hirePrice && item?.job?.hirePrice > 0" 
+                :text="`赏金:${commissionCalculation(item.job.hirePrice / 100, 1)}元`"
+                inverted="false"
+                size="default"
+                custom-style="background-color: #e2f0ef; color:#666; border-color:#e2f0ef;"
+              />
+            </view>
+            <view
+              v-if="props.showUpdateTime"
+              class="font-size-13 color-666 ss-m-t-20 MiSans-Normal d-flex align-center"
+            >
+              <image src="https://minio.menduner.com/dev/2b50f8ccb13045a58c69e96ae1f986234452825b8ae01aba8fa08cabbcf86cd8.png" class="ss-m-r-20" style="width: 15px; height: 15px;"></image>
+              更新时间:{{ timesTampChange(item?.job?.refreshTime || item.job?.updateTime, 'Y-M-D h:m') }}
+            </view>
           </view>
-          <!-- 岗位tag  -->
-          <view class="ss-m-t-15" v-if="showWelfareTag">
-            <uni-tag 
-              v-for="(tag,i) in item.job?.tagList || []"
-              :key="i"
-              class="tag-gap MiSans-Normal"
-              :text="tag"
-              inverted="false"
-              size="mini"
-              custom-style="background-color: #ececec;color:#666;border-color:#ececec;display: inline-block;"
-            />
-          </view>
-          <view style="text-align: end;" v-if="item.job?.hire">
-            <uni-tag
-              class="ss-m-l-10"
-              v-if="item?.job?.hirePrice && item?.job?.hirePrice > 0" 
-              :text="`赏金:${commissionCalculation(item.job.hirePrice / 100, 1)}元`"
-              inverted="false"
-              size="default"
-              custom-style="background-color: #e2f0ef; color:#666; border-color:#e2f0ef;"
-            />
-          </view>
-          <view
-            v-if="props.showUpdateTime"
-            class="font-size-13 color-666 ss-m-t-20 MiSans-Normal d-flex align-center"
-          >
-            <image src="https://minio.menduner.com/dev/2b50f8ccb13045a58c69e96ae1f986234452825b8ae01aba8fa08cabbcf86cd8.png" class="ss-m-r-20" style="width: 15px; height: 15px;"></image>
-            更新时间:{{ timesTampChange(item?.job?.refreshTime || item.job?.updateTime, 'Y-M-D h:m') }}
-          </view>
-        </view>
-        <!-- 企业信息 -->
-        <view v-if="props.showEntInfo" class="sub-li-bottom" @tap="handleClickEnt(item)">
-          <view class="avatarBox">
-            <image class="enterAvatar ss-m-l-20 default-border default-radius" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
-          </view>
-          <view class="ss-m-l-35 MiSans-Normal" style="flex: 1; max-width: calc(100% - 40px);">
-            <view class="default-text-color ellipsis" style="width: 98%;">{{ formatName(item.enterprise?.anotherName || item.enterprise.name) }}</view>
-            <span class="color-666 ss-m-r-10 font-size-12">{{ item.enterprise?.industryName || '' }}</span>
-            <span class="color-666 font-size-12">{{ item.enterprise?.scaleName || '' }}</span>
+          <!-- 企业信息 -->
+          <view v-if="props.showEntInfo" class="sub-li-bottom" @tap="handleClickEnt(item)">
+            <view class="avatarBox">
+              <image class="enterAvatar ss-m-l-20 default-border default-radius" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
+            </view>
+            <view class="ss-m-l-35 MiSans-Normal" style="flex: 1; max-width: calc(100% - 40px);">
+              <view class="default-text-color ellipsis" style="width: 98%;">{{ formatName(item.enterprise?.anotherName || item.enterprise.name) }}</view>
+              <span class="color-666 ss-m-r-10 font-size-12">{{ item.enterprise?.industryName || '' }}</span>
+              <span class="color-666 font-size-12">{{ item.enterprise?.scaleName || '' }}</span>
+            </view>
           </view>
         </view>
+        <view v-if="showReportBtn && isStudent && item.job?.bizId && !item.internshipEnterprise" class="ss-m-y-30">
+					<view class="ss-m-y-30" style="border-top: 1rpx solid #E1E4E9;"></view>
+					<view style="text-align: right;" class="ss-m-x-30">
+            <button @tap.stop="handleReport(item)" class="ss-m-l-10" type="warning" size="mini" style="color:#fff; backgroundColor:#00897b;borderColor:#00897b">上报为实习企业</button>
+					</view>
+				</view>
       </view>
       <view v-if="props.noMore" class="noMore">暂无更多数据</view>
     </view>
@@ -76,6 +84,17 @@
       <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
       <view style="color: gray; text-align: center;">暂无数据</view>
     </view>
+    <!-- 确认框 -->
+    <uni-popup ref="confirmRef" type="dialog">
+      <uni-popup-dialog
+        type="warn"
+        cancelText="取消"
+        confirmText="确认" 
+        title="系统提示"
+        content="是否确定上报为实习企业?"
+        @confirm="handleConfirm"
+      ></uni-popup-dialog>
+    </uni-popup>
   </view>
 </template>
 
@@ -83,17 +102,24 @@
 import { commissionCalculation } from '@/utils/position'
 import { timesTampChange } from '@/utils/date'
 import { formatName } from '@/utils/getText'
-const emit = defineEmits(['entClick'])
+import { ref, computed } from 'vue'
+import { userStore } from '@/store/user'
+import { reportStudentPracticeEnterprise } from '@/api/student'
+const emit = defineEmits(['entClick', 'refresh'])
 
 const props = defineProps({
   list: { type: Array, default: () => [] },
   jobFairId: { type: [String, Number], default: '' }, // 招聘会id
   showEntInfo: { type: Boolean, default: true },
+  showReportBtn: { type: Boolean, default: false },
   showUpdateTime: { type: Boolean, default: true },
   noMore: { type: Boolean, default: false },
   showWelfareTag: { type: Boolean, default: true }
 })
 
+const useUserStore = userStore()
+const isStudent = computed(() => useUserStore?.baseInfo?.type && Boolean(Number(useUserStore.baseInfo.type) === 1))
+
 //岗位详情
 const toDetail = (item) =>{
   if (!item?.job?.id) return
@@ -110,6 +136,31 @@ const handleClickEnt = (item) => {
   emit('entClick', info)
 }
 
+const handleConfirm = async() => {
+	try {
+    const enterpriseId = handleVal.value?.enterprise?.id
+    const jobId = handleVal.value?.job?.id
+    await reportStudentPracticeEnterprise(enterpriseId, jobId)
+    uni.showToast({ title: '上报成功', icon: 'success' })
+	} catch (error) {
+    uni.showToast({ title: error?.msg || error, icon: 'none' })
+	} finally {
+    confirmRef.value.close()
+    emit('refresh')
+	}
+}
+
+const confirmRef = ref()
+const handleVal = ref('')
+
+// 上报为实习企业
+const handleReport = (val) => {
+  if (!val?.job?.bizId) return uni.showToast({ title: '不是招聘会职位不能上报为实习企业', icon: 'none' })
+  if (!val?.enterprise?.id || !val?.job?.id) uni.showToast({ title: '企业或职位信息错误', icon: 'none' })
+  handleVal.value = val
+  confirmRef.value.open()
+}
+
 </script>
 
 <style scoped lang="scss">

+ 7 - 1
pagesA/interview/index.vue

@@ -3,7 +3,7 @@
     <uni-segmented-control :current="current" class="MiSans-Normal" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00B760"></uni-segmented-control>
     <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="height: calc(100vh - 36px);">
       <view v-if="items.length">
-        <PositionList v-if="current === 0" class="pb-10" :list="items" :noMore="false"></PositionList>
+        <PositionList v-if="current === 0" class="pb-10" showReportBtn :list="items" :noMore="false" @refresh="refresh"></PositionList>
         <Items v-else class="pb-10" :list="items" @action="handleAction"></Items>
         <uni-load-more :status="more" />
       </view>
@@ -86,6 +86,12 @@ const loadingMore = () => {
   getList()
 }
 
+const refresh = () => {
+  queryParams.value.pageNo = 1
+  items.value = []
+  getList()
+}
+
 // 同意、拒绝
 const handleAction = (item, typeVal) => {
   id.value = item.id

+ 45 - 2
pagesA/student/internshipRecord.vue

@@ -34,12 +34,17 @@
             </view>
           </view>
           <view>实习时间:{{ timesTampChange(val?.startTime, 'Y-M-D') }} 至 {{ timesTampChange(val?.endTime, 'Y-M-D') }}</view>
-          <view class="line ss-m-y-20"></view>
-          <view style="text-align: right;">
+          <view v-if="current" style="text-align: right;">
+            <view class="line ss-m-y-20"></view>
             <button @tap="handleToReport(val)" class="ss-m-r-10" type="warning" size="mini" style="color:#fff; backgroundColor:#fb8c00;borderColor:#fb8c00">实习报告</button>
             <button @tap="handleToCertificate(val)" class="ss-m-x-10" type="warning" size="mini" style="color:#fff; backgroundColor:#00b760;borderColor:#00b760">实习证书</button>
             <button @tap="preview(val?.recommendationLetter)" class="ss-m-l-10" type="warning" size="mini" style="color:#fff; backgroundColor:#00897b;borderColor:#00897b">企业推荐信</button>
           </view>
+          <!-- 等待中 -->
+          <view v-if="!current && val.job?.bizId && !val.internshipEnterprise" style="text-align: right;">
+            <view class="line ss-m-y-20"></view>
+            <button @tap.stop="handleReport(val)" class="ss-m-l-10" type="warning" size="mini" style="color:#fff; backgroundColor:#00897b;borderColor:#00897b">上报为实习企业</button>
+          </view>
         </uni-card>
         <uni-load-more :status="more" />
       </view>
@@ -47,6 +52,17 @@
         <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
       </view>
     </scroll-view>
+    <!-- 确认框 -->
+    <uni-popup ref="confirmRef" type="dialog">
+      <uni-popup-dialog
+        type="warn"
+        cancelText="取消"
+        confirmText="确认" 
+        title="系统提示"
+        content="是否确定上报为实习企业?"
+        @confirm="handleConfirm"
+      ></uni-popup-dialog>
+    </uni-popup>
   </view>
 </template>
 
@@ -58,6 +74,7 @@ import { formatName } from '@/utils/getText'
 import { timesTampChange } from '@/utils/date'
 import { dealDictObjData } from '@/utils/position'
 import { preview } from '@/utils/preview'
+import { reportStudentPracticeEnterprise } from '@/api/student'
 
 const more = ref('more')
 const current = ref(0)
@@ -138,6 +155,32 @@ const handleToCertificate = (val) => {
   uni.navigateTo({ url: `/pagesA/student/certificateDetail?itemData=${itemData}` })
 }
 
+const handleConfirm = async() => {
+	try {
+    const enterpriseId = handleVal.value?.enterprise?.id
+    const jobId = handleVal.value?.job?.id
+    await reportStudentPracticeEnterprise(enterpriseId, jobId)
+    uni.showToast({ title: '上报成功', icon: 'success' })
+	} catch (error) {
+    uni.showToast({ title: error?.msg || error, icon: 'none' })
+	} finally {
+    confirmRef.value.close()
+    query.value.pageNo = 1
+    dataList.value = []
+    getData()
+	}
+}
+
+const confirmRef = ref()
+const handleVal = ref('')
+
+// 上报为实习企业
+const handleReport = (val) => {
+  if (!val?.job?.bizId) return uni.showToast({ title: '不是招聘会职位不能上报为实习企业', icon: 'none' })
+  if (!val?.enterprise?.id || !val?.job?.id) uni.showToast({ title: '企业或职位信息错误', icon: 'none' })
+  handleVal.value = val
+  confirmRef.value.open()
+}
 
 </script>