Browse Source

众聘展示

Xiao_123 11 tháng trước cách đây
mục cha
commit
c0f9985638

+ 1 - 1
src/components/FormUI/TextInput/index.vue

@@ -8,7 +8,7 @@
       :rules="item.rules"
       :disabled="item.disabled"
       :style="{width: item.width}"
-      :color="item.color || 'primary'"
+      color="primary"
       :label="item.label"
       :placeholder="item.placeholder || item.label"
       :autofocus="item.autofocus"

+ 6 - 3
src/views/enterprise/personnelManagement/components/table.vue

@@ -50,11 +50,10 @@ import Snackbar from '@/plugins/snackbar'
 
 const { t } = useI18n()
 const emit = defineEmits(['refresh'])
-defineProps({
+const props = defineProps({
   tab: String,
   items: Array
 })
-
 const badgeColor = computed(() => (item) => {
   return (item.person && item.person.sex) ? (item.person.sex === '1' ? '#1867c0' : 'error') : 'error'
 })
@@ -64,7 +63,7 @@ const badgeIcon = computed(() => (item) => {
 })
 
 const selected = ref([])
-const headers = [
+const defaultHeaders = [
   { title: '牛人', value: 'name' },
   { title: '应聘职位', value: 'job.name' },
   { title: '求职状态', key: 'person.jobStatusName' },
@@ -73,6 +72,10 @@ const headers = [
   { title: '岗位薪资', key: 'job', value: item => `${item.job.payFrom}-${item.job.payTo}/${item.job.payName}`},
   { title: '操作', value: 'actions' }
 ]
+const headers = ref(defaultHeaders)
+if (props.tab === '5614') headers.value.splice(headers.value.length - 1, 0, { title: '推荐人', key: 'recommend' })
+else if (props.tab === '5615') headers.value.splice(headers.value.length - 1, 0, { title: '已结算赏金', key: 'settlementBounty' })
+else headers.value = defaultHeaders
 
 // 人才详情
 const handleToPersonDetail = ({ userId, id }) => {

+ 12 - 7
src/views/enterprise/personnelManagement/index.vue

@@ -2,7 +2,7 @@
 <template>
   <v-card class="pa-5 card-box">
     <div class="d-flex justify-space-between">
-      <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa" @update:model-value="handleChangeTab">
+      <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa">
         <v-tab v-for="k in tabList" :value="k.value" :key="k.value">{{ k.label }}</v-tab>
       </v-tabs>
       <TextInput v-model="textItems.value" :item="textItems" @appendInnerClick="handleSearch" @enter="handleSearch"></TextInput>
@@ -13,6 +13,7 @@
       <v-window-item v-for="k in tabList" :value="k.value" :key="k.value">
         <TablePage :items="items" :tab="k.value" @refresh="getList"></TablePage>
         <CtPagination
+          v-if="total > 0"
           :total="total"
           :page="query.pageNo"
           :limit="query.pageSize"
@@ -52,7 +53,11 @@ const textItems = ref({
 const getTabData = () => {
   getDict('menduner_job_cv_status').then(({ data }) => {
     data = data?.length && data || []
-    tabList.value = data
+    tabList.value = [
+      ...data,
+      { dictType: 'menduner_job_cv_status', id: '5614', label: '已推荐', value: '5614' },
+      { dictType: 'menduner_job_cv_status', id: '5615', label: '已结算', value: '5615' }
+    ]
   })
 }
 getTabData()
@@ -76,11 +81,6 @@ const getList = async () => {
 }
 getList()
 
-const handleChangeTab = () => {
-  query.value.status = tab.value
-  getList()
-}
-
 // 分页
 const handleChangePage = (i) => {
   query.value.pageNo = i
@@ -104,6 +104,11 @@ const handleScreen = ({ value, key }) => {
 
 // 下拉筛选重置
 const handleScreenReset = () => {
+  if (tab.value === '5614' || tab.value === '5615') {
+    items.value = []
+    total.value = 0
+    return
+  }
   query.value = {
     pageSize: 10,
     pageNo: 1,

+ 30 - 2
src/views/enterprise/positionManagement/components/baseInfo.vue

@@ -35,10 +35,38 @@ const props = defineProps({
   itemData: Object
 })
 
+const handleChangePublic = () => {
+  const value = items.value.options.find(e => e.key === 'isPublicRecruitment').value
+  const obj = items.value.options.find(e => e.key === 'moneyReward')
+  obj.hide = value === '1' ? false : true
+}
+
 const formPageRef = ref()
 let query = reactive({})
 const items = ref({
   options: [
+    {
+      type: 'ifRadio',
+      key: 'isPublicRecruitment',
+      value: '0',
+      label: '众聘岗位 *',
+      width: 90,
+      noParam: true,
+      items: [
+        { label: '是', value: '1' },
+        { label: '否', value: '0' }
+      ],
+      change: handleChangePublic
+    },
+    {
+      type: 'number',
+      key: 'moneyReward',
+      value: null,
+      label: '众聘赏金 *',
+      hide: true,
+      noParam: true,
+      rules: [v => !!v || '请填写众聘赏金']
+    },
     {
       type: 'text',
       key: 'name',
@@ -62,9 +90,9 @@ const items = ref({
       class: 'mb-3',
       options: {
         format: 'timestamp',
-        placeholder: '期时间 *',
+        placeholder: '期时间 *',
       },
-      rules: [v => !!v || '请选择期时间']
+      rules: [v => !!v || '请选择期时间']
     },
     {
       type: 'textarea',