| | |
| | | <span style="margin-left: 10px" class="search_title">合同结束日期:</span> |
| | | <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange" |
| | | placeholder="请选择" clearable @change="changeDaterange" /> |
| | | <!-- <span style="margin-left: 10px" class="search_title">状态:</span> |
| | | <el-select v-model="searchForm.staffState" clearable placeholder="请选择状态" style="width: 140px"> |
| | | <el-option label="离职" :value="0" /> |
| | | <el-option label="在职" :value="1" /> |
| | | <el-option label="试用" :value="2" /> |
| | | </el-select> --> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | |
| | | ></PIMTable> |
| | | </div> |
| | | <form-dia ref="formDia" @close="handleQuery"></form-dia> |
| | | <regularize-dia ref="regularizeDiaRef" @success="getList" /> |
| | | <transfer-dia ref="transferDiaRef" @success="getList" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import {onMounted, ref} from "vue"; |
| | | import FormDia from "@/views/personnelManagement/employeeRecord/components/formDia.vue"; |
| | | import RegularizeDia from "@/views/personnelManagement/employeeRecord/components/regularizeDia.vue"; |
| | | import TransferDia from "@/views/personnelManagement/employeeRecord/components/transferDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {staffOnJobListPage} from "@/api/personnelManagement/employeeRecord.js"; |
| | | import dayjs from "dayjs"; |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | staffName: "", |
| | | staffState: 1, |
| | | entryDate: undefined, // 录入日期 |
| | | entryDateStart: undefined, |
| | | entryDateEnd: undefined, |
| | |
| | | return "离职"; |
| | | } else if (params == 1) { |
| | | return "在职"; |
| | | } else if (params == 2) { |
| | | return "试用"; |
| | | } else { |
| | | return null; |
| | | } |
| | |
| | | return "danger"; |
| | | } else if (params == 1) { |
| | | return "primary"; |
| | | } else if (params == 2) { |
| | | return "warning"; |
| | | } else { |
| | | return null; |
| | | } |
| | |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: 'right', |
| | | width: 150, |
| | | operation: [ |
| | | { |
| | | name: "详情", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm("edit", row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "转正", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openRegularizeDialog(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "调岗", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openTransferDialog(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | total: 0 |
| | | }); |
| | | const formDia = ref() |
| | | const regularizeDiaRef = ref() |
| | | const transferDiaRef = ref() |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | const changeDaterange = (value) => { |
| | |
| | | tableLoading.value = true; |
| | | const params = { ...searchForm.value, ...page }; |
| | | params.entryDate = undefined |
| | | staffOnJobListPage({...params, staffState: 1}).then(res => { |
| | | staffOnJobListPage({...params}).then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records |
| | | page.total = res.data.total; |
| | |
| | | formDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | const openRegularizeDialog = (row) => { |
| | | regularizeDiaRef.value?.openDialog(row) |
| | | } |
| | | const openTransferDialog = (row) => { |
| | | transferDiaRef.value?.openDialog(row) |
| | | } |
| | | // 导出 |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/staff/staffOnJob/export", {staffState: 1}, "在职员工台账.xlsx"); |
| | | proxy.download("/staff/staffOnJob/export", { ...searchForm.value }, "员工台账.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |