Xiao_123 10 mesi fa
parent
commit
450bb6ad0b

+ 17 - 1
src/views/recruit/enterprise/publicRecruitmentManagement/commission/index.vue

@@ -1,9 +1,25 @@
 <template>
-  <div>佣金比例</div>
+  <v-card class="pa-5 card-box d-flex align-center justify-center">
+    <CtForm ref="formPageRef" :items="items" style="width: 600px;"></CtForm>
+  </v-card>
 </template>
 
 <script setup>
 defineOptions({ name: 'public-recruitment-commission'})
+import { ref } from 'vue'
+
+const formPageRef = ref()
+const items = ref({
+  options: [
+    {
+      type: 'number',
+      key: 'moneyReward',
+      value: null,
+      label: '佣金比例 *',
+      rules: [v => !!v || '请填写佣金比例']
+    }
+  ]
+})
 </script>
 
 <style scoped lang="scss">

+ 106 - 0
src/views/recruit/enterprise/publicRecruitmentManagement/deliver/components/table.vue

@@ -0,0 +1,106 @@
+<template>
+  <div>
+    <!-- <div class="text-end">
+      <v-btn v-if="tab === '0'" color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleAction('all', 0)">不合适</v-btn>
+      <v-btn v-if="tab === '1'" color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleAction('all', 1)">入职</v-btn>
+    </div> -->
+    <v-data-table
+      class="mt-3"
+      v-model="selected"
+      :items="items"
+      :headers="headers"
+      hover
+      show-select
+      :disable-sort="true"
+      height="60vh"
+      item-value="id"
+    >
+      <template #bottom></template>
+      <template v-slot:item.name="{ item }">
+        <div class="d-flex align-center cursor-pointer" @click="handleToPersonDetail(item)">
+          <v-badge
+            bordered
+            offset-y="6"
+            :color="badgeColor(item)"
+            :icon="badgeIcon(item)">
+            <v-avatar size="40" :image="item.person.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></v-avatar>
+          </v-badge>
+          <span class="defaultLink ml-3">{{ item?.person?.name }}</span>
+        </div>
+      </template>
+      <template v-slot:item.actions="{ item }">
+        <!-- <div v-if="tab === '0'">
+          <v-btn color="primary" variant="text" @click="previewFile(item.url)">查看简历</v-btn>
+          <v-btn color="primary" variant="text" @click="handleAction('', 0, item)">不合适</v-btn>
+        </div>
+        <div v-if="tab === '1'">
+          <v-btn color="primary" variant="text" @click="handleAction('', 1, item)">入职</v-btn>
+        </div> -->
+      </template>
+    </v-data-table>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'table-page'})
+import { ref, computed } from 'vue'
+// import { previewFile } from '@/utils'
+// import { joinEliminate, personEntryByEnterprise } from '@/api/enterprise'
+// import { useI18n } from '@/hooks/web/useI18n'
+// import Snackbar from '@/plugins/snackbar'
+
+// const { t } = useI18n()
+// const emit = defineEmits(['refresh'])
+defineProps({
+  tab: Number,
+  items: Array
+})
+const badgeColor = computed(() => (item) => {
+  return (item.person && item.person.sex) ? (item.person.sex === '1' ? '#1867c0' : 'error') : 'error'
+})
+
+const badgeIcon = computed(() => (item) => {
+  return (item.person && item.person.sex) ? (item.person.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'
+})
+
+const selected = ref([])
+const headers = ref([
+  { title: '姓名', value: 'name' },
+  { title: '应聘职位', value: 'job.name' },
+  { title: '求职状态', key: 'person.jobStatusName' },
+  { title: '工作经验', key: 'person.expName' },
+  { title: '最高学历', key: 'person.eduName' },
+  { title: '岗位薪资', key: 'job', value: item => `${item.job.payFrom}-${item.job.payTo}/${item.job.payName}`},
+  { title: '操作', value: 'actions' }
+])
+
+// 人才详情
+const handleToPersonDetail = ({ userId, id }) => {
+  if (!userId || !id) return
+  window.open(`/recruit/enterprise/talentPool/details/${userId}?id=${id}`)
+}
+
+// const apiList = [
+//   joinEliminate, // 不合适
+//   personEntryByEnterprise // 入职
+// ]
+
+// 不合适、入职
+// const handleAction = async (type, index, item) => {
+//   const ids = type ? selected.value : [item?.id]
+//   if (!ids) return
+//   await apiList[index](ids)
+//   Snackbar.success(t('common.operationSuccessful'))
+//   emit('refresh')
+// }
+</script>
+
+<style scoped lang="scss">
+:deep(.v-table > .v-table__wrapper > table > thead) {
+  background-color: #f7f8fa !important;
+}
+:deep(.v-selection-control__input) {
+  // color: var(--v-primary-base) !important;
+  color: #767778;
+}
+</style>

+ 54 - 1
src/views/recruit/enterprise/publicRecruitmentManagement/deliver/index.vue

@@ -1,9 +1,62 @@
 <template>
-  <div>投递管理</div>
+  <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">
+        <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>
+    </div>
+
+    <v-window v-model="tab" class="mt-1">
+      <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"
+          @handleChange="handleChangePage"
+        ></CtPagination>
+      </v-window-item>
+    </v-window>
+  </v-card>
 </template>
 
 <script setup>
 defineOptions({ name: 'public-recruitment-deliver'})
+import { ref } from 'vue'
+import TablePage from './components/table.vue'
+
+const total = ref(0)
+const tab = ref(0)
+const query = ref({
+  pageNo: 1,
+  pageSize: 10
+})
+const items = ref([])
+const tabList = ref([
+  { label: '已推荐', value: 0 },
+  { label: '已结算', value: 1 }
+])
+const textItems = ref({
+  type: 'text',
+  value: '',
+  width: 250,
+  label: '搜索姓名',
+  appendInnerIcon: 'mdi-magnify'
+})
+
+const getList = async () => {}
+
+const handleSearch = () => {
+  getList()
+}
+
+// 分页
+const handleChangePage = (i) => {
+  query.value.pageNo = i
+  getList()
+}
 </script>
 
 <style scoped lang="scss">