Explorar el Código

职位管理:过期时间去除

Xiao_123 hace 4 semanas
padre
commit
e2c42fc80e

+ 0 - 5
src/views/recruit/enterprise/positionManagement/components/add.vue

@@ -212,11 +212,6 @@ const handleSave = async () => {
   if (baseInfo === 'failed') return
   const requirement = await jobRequirementsRef.value[0].getQuery()
   if (!requirement) return Snackbar.warning('请按要求填写信息')
-  if (!baseInfo.expireTime && !baseInfo.soFar) {
-    Snackbar.warning('请选择职位过期时间')
-    window.scrollTo({ top: 0, behavior: 'smooth' })
-    return
-  }
   if (!baseInfo || !requirement) return Snackbar.warning('请将信息填写完整')
   
   submitParams = Object.assign(baseInfo, requirement, { currency_type: 0 }) // currency_type: 写死0(人民币)  source: 0职位管理|1招聘会

+ 0 - 33
src/views/recruit/enterprise/positionManagement/components/baseInfo.vue

@@ -15,21 +15,6 @@
         </v-menu>
         <v-btn v-if="showTemplateBtn" class="ml-3 half-button" color="primary" style="margin-top: 2px;" @click="useJobTemplate(item)">职位模板</v-btn>
       </template>
-      <template #expireTime="{ item }">
-        <div>
-          <v-checkbox-btn
-            v-model="soFar"
-            color="primary"
-            label="长期有效"
-            class="ml-2"
-            :disabled="false"
-            :style="`line-height: ${item.dense === 'default' ? 56 : item.dense === 'comfortable' ? 48 : 40 }px;`"
-            style="width: 110px;"
-            hide-details
-            @update:modelValue="v => handleSoFarChange(v, item)"
-          ></v-checkbox-btn>
-        </div>
-      </template>
     </CtForm>
 
     <CtDialog :visible="showDialog" :widthType="1" titleClass="text-h6" :footer="false" title="重复职位列表" @close="showDialog = false">
@@ -145,22 +130,10 @@ const items = ref({
       blur: handleValidName, // 效验职位名称是否重复
       rules: [v => !!v || '请填写职位名称']
     },
-    {
-      type: 'datePicker',
-      key: 'expireTime',
-      value: null,
-      format: 'YYYY-MM-DD',
-      label: '到期时间 *',
-      disabledDate: true,
-      dayAfter: true,
-      labelWidth: 120,
-      slotName: 'expireTime',
-    },
     {
       type: 'wangEditor',
       key: 'content',
       value: '',
-      flexStyle: 'mt-3',
       label: '岗位职责 *',
       maxLength: 5000,
       rules: '请填写岗位职责'
@@ -257,12 +230,6 @@ const getQuery = async () => {
     Snackbar.warning('请填写岗位要求')
     return 'failed'
   }
-
-  if (!obj.expireTime && !soFar.value) {
-    Snackbar.warning('请填写到期时间')
-    return 'failed'
-  }
-  
   obj.source = props.isFair ? '2' : '0' // 职位来源(0职位管理|1众聘职位|2招聘会)
 
   Object.assign(query, obj)

+ 1 - 38
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -52,8 +52,6 @@
         </div>
         <div class="bottom-item" v-ellipse-tooltip :style="{'text-align': val.hrName ? 'center' : 'start'}">
           <span>{{ $t('position.refreshTime') }} :{{ val.refreshTime ? timesTampChange(val.refreshTime, 'Y-M-D h:m') : '暂无' }}</span>
-          <span class="septal-line"></span>
-          <span>到期时间:{{ val.expireTime ? timesTampChange(val.expireTime, 'Y-M-D') : '长期有效' }}</span>
         </div>
         <div class="d-flex bottom-item justify-end">
           <div class="ml-10 d-flex">
@@ -99,10 +97,6 @@
   ></confirmPaymentDialog>
 
   <Loading :visible="loading"></Loading>
-
-  <!-- <CtDialog :visible="showExpire" :widthType="2" titleClass="text-h6" title="修改职位到期时间" @close="showExpire = false; expireTimeId = null" @submit="handleSubmit">
-    <CtForm v-if="showExpire" ref="CtFormRef" :items="formItem"></CtForm>
-  </CtDialog> -->
 </template>
 
 <script setup>
@@ -112,7 +106,7 @@ import { useRouter } from 'vue-router'
 import { timesTampChange } from '@/utils/date'
 import { useI18n } from '@/hooks/web/useI18n'
 import { getEnterprisePubJobTypePermission } from '@/api/recruit/enterprise/position'
-import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, updatePositionExpireTime, topJobAdvertisedCancel, createTradeOrder } from '@/api/position'
+import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel, createTradeOrder } from '@/api/position'
 import Snackbar from '@/plugins/snackbar'
 import { useUserStore } from '@/store/user'
 import Confirm from '@/plugins/confirm'
@@ -133,25 +127,9 @@ const props = defineProps({
   jobNum: Number
 })
 
-// const showExpire = ref(false)
-// const CtFormRef = ref()
 const loading = ref(false)
 const selectAll = ref(false) // 全选
 const selectList = ref([]) // 选中列表
-// const formItem = ref({
-//   options: [
-//     {
-//       type: 'datePicker',
-//       key: 'time',
-//       value: null,
-//       format: 'YYYY-MM-DD',
-//       label: '到期时间 *',
-//       labelWidth: 110,
-//       teleported: true,
-//       disabledDate: true
-//     }
-//   ]
-// })
 const dealSelect = () => {
   selectList.value = props.items.filter(e => e.select).map(k => k.id)
 }
@@ -291,21 +269,6 @@ const handleAction = async (index, type, { id }, item) => {
   }
 }
 
-// 职位过期时间修改
-// const expireTimeId = ref('')
-// const handleUpdateExpireTime = (item) => {
-//   expireTimeId.value = item.id
-//   showExpire.value = true
-// }
-// const handleSubmit = async () => {
-//   const time = formItem.value.options.find(e => e.key === 'time').value
-//   if (!time) return Snackbar.warning('请选择职位到期时间')
-//   await updatePositionExpireTime({ id: expireTimeId.value, time })
-//   expireTimeId.value = ''
-//   showExpire.value = false
-//   emit('refresh')
-// }
-
 const router = useRouter()
 // 职位编辑
 const handleEdit = async (val) => {

+ 2 - 9
src/views/recruit/enterprise/positionManagement/index.vue

@@ -169,8 +169,7 @@ const tab = ref(route.query?.tab ? route.query?.tab-0 : 1)
 const tabList = [
   { label: '待发布', value: 0, status: 99 },
   { label: t('position.recruitmentInProgress'), value: 1, status: 0 },
-  { label: t('position.closed'), value: 2, status: 1 },
-  // { label: t('position.expiredPosition'), value: 3 }
+  { label: t('position.closed'), value: 2, status: 1 }
 ]
 let baseInfo = ref(JSON.parse(localStorage.getItem('entBaseInfo')) || {})
 store.$subscribe((mutation, state) => {
@@ -205,13 +204,7 @@ const getPositionList = async () => {
   await store.getEnterpriseInfo(true)
   items.value = []; total.value = 0
   loading.value = true
-  if (tab.value !== 3) {
-    query.value.status = tabList[tab.value].status
-    query.value.hasExpiredData = false
-  } else {
-    query.value.hasExpiredData = true
-    delete query.value.status
-  }
+  query.value.status = tabList[tab.value].status
   const { list, total: number } = await getJobAdvertisedList(query.value)
   if (!list.length) {
     if (query.value.name) tipsText.value = '暂无数据,请更换关键词后再试'