Compare commits
2
Commits
0db1848b10
...
446e83eed1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
446e83eed1 | ||
|
|
4371eca6c4 |
@@ -59,6 +59,7 @@ async function requestContractPreview(
|
|||||||
|
|
||||||
export interface OnboardingTask {
|
export interface OnboardingTask {
|
||||||
id: number;
|
id: number;
|
||||||
|
createUserId?: number | string;
|
||||||
taskNo: string;
|
taskNo: string;
|
||||||
companyId: number;
|
companyId: number;
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
@@ -190,6 +191,7 @@ export interface OnboardingPositionOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface OnboardingCompany extends OnboardingCompanyOption {
|
export interface OnboardingCompany extends OnboardingCompanyOption {
|
||||||
|
createUserId?: number | string;
|
||||||
companyCode: string;
|
companyCode: string;
|
||||||
legalName: string;
|
legalName: string;
|
||||||
unifiedSocialCreditCode?: string;
|
unifiedSocialCreditCode?: string;
|
||||||
@@ -203,6 +205,7 @@ export interface OnboardingCompany extends OnboardingCompanyOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface OnboardingDepartment extends OnboardingDepartmentOption {
|
export interface OnboardingDepartment extends OnboardingDepartmentOption {
|
||||||
|
createUserId?: number | string;
|
||||||
companyId: number;
|
companyId: number;
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
departmentCode: string;
|
departmentCode: string;
|
||||||
@@ -213,6 +216,7 @@ export interface OnboardingDepartment extends OnboardingDepartmentOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface OnboardingPosition extends OnboardingPositionOption {
|
export interface OnboardingPosition extends OnboardingPositionOption {
|
||||||
|
createUserId?: number | string;
|
||||||
companyId: number;
|
companyId: number;
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
departmentId?: number;
|
departmentId?: number;
|
||||||
@@ -226,6 +230,7 @@ export interface OnboardingPosition extends OnboardingPositionOption {
|
|||||||
|
|
||||||
export interface OnboardingContractTemplate {
|
export interface OnboardingContractTemplate {
|
||||||
id: number;
|
id: number;
|
||||||
|
createUserId?: number | string;
|
||||||
companyId?: number;
|
companyId?: number;
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
departmentId?: number;
|
departmentId?: number;
|
||||||
@@ -287,6 +292,7 @@ export interface OnboardingTaskContractVariableGroup {
|
|||||||
|
|
||||||
export interface OnboardingEmployee {
|
export interface OnboardingEmployee {
|
||||||
id: number;
|
id: number;
|
||||||
|
createUserId?: number | string;
|
||||||
employeeNo?: string;
|
employeeNo?: string;
|
||||||
employeeName: string;
|
employeeName: string;
|
||||||
companyId: number;
|
companyId: number;
|
||||||
@@ -307,8 +313,24 @@ export interface OnboardingEmployee {
|
|||||||
createTime?: string;
|
createTime?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 不受快捷维度筛选影响的正式员工统计。 */
|
||||||
|
export interface OnboardingEmployeeStatistics {
|
||||||
|
total: number;
|
||||||
|
fullTime: number;
|
||||||
|
partTime: number;
|
||||||
|
probation: number;
|
||||||
|
socialPurchased: number;
|
||||||
|
expiringContract: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 附带统计的正式员工档案分页结果。 */
|
||||||
|
export interface OnboardingEmployeePage extends ResPage<OnboardingEmployee> {
|
||||||
|
statistics: OnboardingEmployeeStatistics;
|
||||||
|
}
|
||||||
|
|
||||||
export interface OnboardingFormField {
|
export interface OnboardingFormField {
|
||||||
id: number;
|
id: number;
|
||||||
|
createUserId?: number | string;
|
||||||
fieldCode: string;
|
fieldCode: string;
|
||||||
fieldName: string;
|
fieldName: string;
|
||||||
dataType: string;
|
dataType: string;
|
||||||
@@ -320,6 +342,7 @@ export interface OnboardingFormField {
|
|||||||
|
|
||||||
export interface OnboardingMaterialType {
|
export interface OnboardingMaterialType {
|
||||||
id: number;
|
id: number;
|
||||||
|
createUserId?: number | string;
|
||||||
materialCode: string;
|
materialCode: string;
|
||||||
materialName: string;
|
materialName: string;
|
||||||
allowedExtensions?: string;
|
allowedExtensions?: string;
|
||||||
@@ -350,6 +373,7 @@ export interface OnboardingTemplateMaterialConfig {
|
|||||||
|
|
||||||
export interface OnboardingTemplate {
|
export interface OnboardingTemplate {
|
||||||
id: number;
|
id: number;
|
||||||
|
createUserId?: number | string;
|
||||||
templateCode: string;
|
templateCode: string;
|
||||||
templateName: string;
|
templateName: string;
|
||||||
companyId: number;
|
companyId: number;
|
||||||
@@ -815,9 +839,10 @@ export const onboardingTaskApi = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
employeePage(params: Record<string, unknown>) {
|
employeePage(params: Record<string, unknown>) {
|
||||||
return moduleRequest("/biz/onboarding/employee/").get<
|
return moduleRequest("/biz/onboarding/employee/").get<OnboardingEmployeePage>(
|
||||||
ResPage<OnboardingEmployee>
|
"page",
|
||||||
>("page", params);
|
params
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
employeeExport(params: Record<string, unknown>) {
|
employeeExport(params: Record<string, unknown>) {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||||
*/
|
*/
|
||||||
import { useAuthStore } from "@/stores/modules/auth";
|
import { useAuthStore } from "@/stores/modules/auth";
|
||||||
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
import type { Directive, DirectiveBinding } from "vue";
|
import type { Directive, DirectiveBinding } from "vue";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,6 +33,8 @@ const auth: Directive = {
|
|||||||
const { value, arg } = binding;
|
const { value, arg } = binding;
|
||||||
// 获取authStore
|
// 获取authStore
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
if ((userStore.userInfoGet?.roleCodeList || []).includes("superAdmin")) return;
|
||||||
// 获取用户权限按钮列表
|
// 获取用户权限按钮列表
|
||||||
const currentPageRoles = authStore.authButtonListGet ?? [];
|
const currentPageRoles = authStore.authButtonListGet ?? [];
|
||||||
// 如果传入的值是数组,并且数组的长度大于0
|
// 如果传入的值是数组,并且数组的长度大于0
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import { computed } from "vue";
|
||||||
|
import { useAuthStore } from "@/stores/modules/auth";
|
||||||
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
|
|
||||||
|
export interface OnboardingOwnedRecord {
|
||||||
|
createUserId?: number | string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入职业务页面统一权限判断:按钮权限控制功能入口,创建人/管理全部权限控制数据操作范围。
|
||||||
|
*/
|
||||||
|
export function useOnboardingPermission(manageAllCode: string) {
|
||||||
|
const authStore = useAuthStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
|
const isSuperAdmin = computed(() =>
|
||||||
|
(userStore.userInfoGet?.roleCodeList || []).includes("superAdmin")
|
||||||
|
);
|
||||||
|
const canManageAll = computed(
|
||||||
|
() =>
|
||||||
|
isSuperAdmin.value ||
|
||||||
|
authStore.authButtonListGet.includes(manageAllCode)
|
||||||
|
);
|
||||||
|
|
||||||
|
const hasAction = (code: string) =>
|
||||||
|
isSuperAdmin.value || authStore.authButtonListGet.includes(code);
|
||||||
|
|
||||||
|
const canManage = (record?: OnboardingOwnedRecord | null) => {
|
||||||
|
if (canManageAll.value) return true;
|
||||||
|
if (record?.createUserId == null || userStore.userInfoGet?.id == null)
|
||||||
|
return false;
|
||||||
|
return String(record.createUserId) === String(userStore.userInfoGet.id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const disabledReason = (record?: OnboardingOwnedRecord | null) =>
|
||||||
|
canManage(record) ? "" : "只能操作本人创建的数据";
|
||||||
|
|
||||||
|
return {
|
||||||
|
isSuperAdmin,
|
||||||
|
canManageAll,
|
||||||
|
hasAction,
|
||||||
|
canManage,
|
||||||
|
disabledReason
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
:request-api="onboardingTaskApi.templatePage"
|
:request-api="onboardingTaskApi.templatePage"
|
||||||
>
|
>
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<el-button type="primary" icon="Plus" @click="openTemplateCreate">
|
<el-button v-auth="'onboardingContractAdd'" type="primary" icon="Plus" @click="openTemplateCreate">
|
||||||
新增签署材料模板
|
新增签署材料模板
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -50,11 +50,27 @@
|
|||||||
版本与配置
|
版本与配置
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="primary" icon="Edit" @click="openTemplateEdit(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingContractEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="openTemplateEdit(scope.row)"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="danger" icon="Delete" @click="removeTemplate(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingContractDelete'"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="removeTemplate(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -184,7 +200,14 @@
|
|||||||
<el-tab-pane label="版本与DOCX模板" name="versions">
|
<el-tab-pane label="版本与DOCX模板" name="versions">
|
||||||
<div class="tab-pane-content">
|
<div class="tab-pane-content">
|
||||||
<div class="pane-action-bar">
|
<div class="pane-action-bar">
|
||||||
<el-button type="primary" icon="Upload" @click="openVersionCreate">
|
<el-button
|
||||||
|
v-auth="'onboardingContractVersionAdd'"
|
||||||
|
type="primary"
|
||||||
|
icon="Upload"
|
||||||
|
:disabled="!canManage(selectedTemplate)"
|
||||||
|
:title="disabledReason(selectedTemplate)"
|
||||||
|
@click="openVersionCreate"
|
||||||
|
>
|
||||||
上传新版本 DOCX
|
上传新版本 DOCX
|
||||||
</el-button>
|
</el-button>
|
||||||
<span class="pane-tip-text">
|
<span class="pane-tip-text">
|
||||||
@@ -233,29 +256,38 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingContractVersionStatus'"
|
||||||
v-if="scope.row.versionStatus !== 'enabled'"
|
v-if="scope.row.versionStatus !== 'enabled'"
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
icon="Check"
|
icon="Check"
|
||||||
|
:disabled="!canManage(selectedTemplate)"
|
||||||
|
:title="disabledReason(selectedTemplate)"
|
||||||
@click="changeVersionStatus(scope.row, 'enabled')"
|
@click="changeVersionStatus(scope.row, 'enabled')"
|
||||||
>
|
>
|
||||||
启用
|
启用
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingContractVersionStatus'"
|
||||||
v-else
|
v-else
|
||||||
link
|
link
|
||||||
type="warning"
|
type="warning"
|
||||||
icon="Close"
|
icon="Close"
|
||||||
|
:disabled="!canManage(selectedTemplate)"
|
||||||
|
:title="disabledReason(selectedTemplate)"
|
||||||
@click="changeVersionStatus(scope.row, 'disabled')"
|
@click="changeVersionStatus(scope.row, 'disabled')"
|
||||||
>
|
>
|
||||||
停用
|
停用
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingContractVersionDelete'"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
|
:disabled="!canManage(selectedTemplate)"
|
||||||
|
:title="disabledReason(selectedTemplate)"
|
||||||
@click="removeVersion(scope.row)"
|
@click="removeVersion(scope.row)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@@ -405,7 +437,15 @@
|
|||||||
|
|
||||||
<el-table-column label="操作" width="120" align="center" fixed="right">
|
<el-table-column label="操作" width="120" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="openVariableEdit(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingContractVariableEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(selectedTemplate)"
|
||||||
|
:title="disabledReason(selectedTemplate)"
|
||||||
|
@click="openVariableEdit(scope.row)"
|
||||||
|
>
|
||||||
检查调整
|
检查调整
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -501,6 +541,9 @@ import {
|
|||||||
} from "@/api/modules/biz/onboarding";
|
} from "@/api/modules/biz/onboarding";
|
||||||
import type { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
|
import type { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
|
||||||
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||||
|
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||||
|
|
||||||
|
const { canManage, disabledReason } = useOnboardingPermission("onboardingContractManageAll");
|
||||||
|
|
||||||
const templateTable = ref<ProTableInstance>();
|
const templateTable = ref<ProTableInstance>();
|
||||||
const selectedTemplate = ref<OnboardingContractTemplate>();
|
const selectedTemplate = ref<OnboardingContractTemplate>();
|
||||||
|
|||||||
@@ -1,20 +1,53 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<ProTable ref="proTable" title="员工档案" :columns="columns" :request-api="onboardingTaskApi.employeePage">
|
<ProTable ref="proTable" title="员工档案" :columns="columns" :request-api="getTableData">
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<el-button type="primary" plain icon="Download" :loading="exporting" @click="exportEmployees">
|
<div class="employee-table-toolbar">
|
||||||
导出当前筛选结果
|
<el-button v-auth="'onboardingEmployeeExport'" type="primary" plain icon="Download" :loading="exporting" @click="exportEmployees">
|
||||||
</el-button>
|
导出当前筛选结果
|
||||||
|
</el-button>
|
||||||
|
<div class="employee-metric-filters">
|
||||||
|
<el-tooltip
|
||||||
|
v-for="item in metricFilters"
|
||||||
|
:key="item.key"
|
||||||
|
:content="item.tooltip"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="metric-filter"
|
||||||
|
:class="[`tone-${item.tone}`, { 'is-active': activeMetricKey === item.key }]"
|
||||||
|
:aria-pressed="activeMetricKey === item.key"
|
||||||
|
@click="toggleMetricFilter(item.key)"
|
||||||
|
>
|
||||||
|
<el-icon><component :is="item.icon" /></el-icon>
|
||||||
|
<span class="metric-filter-label">{{ item.label }}</span>
|
||||||
|
<strong class="metric-filter-count">{{ item.count }}</strong>
|
||||||
|
</button>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button link type="primary" icon="UserFilled" @click="showDetail(scope.row)">查看档案</el-button>
|
<el-button link type="primary" icon="UserFilled" @click="showDetail(scope.row)">查看档案</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="openHrEdit(scope.row)">编辑人事信息</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingEmployeeHrEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="openHrEdit(scope.row)"
|
||||||
|
>编辑人事信息</el-button>
|
||||||
|
<el-button
|
||||||
|
v-auth="'onboardingEmployeeRegularize'"
|
||||||
v-if="canRegularize(scope.row)"
|
v-if="canRegularize(scope.row)"
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
icon="CircleCheck"
|
icon="CircleCheck"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="openRegularization(scope.row)"
|
@click="openRegularization(scope.row)"
|
||||||
>
|
>
|
||||||
办理转正
|
办理转正
|
||||||
@@ -372,19 +405,33 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button v-if="detail?.employee" type="primary" plain @click="openHrEdit(detail.employee)">编辑人事信息</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingEmployeeHrEdit'"
|
||||||
|
v-if="detail?.employee"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:disabled="!canManage(detail.employee)"
|
||||||
|
:title="disabledReason(detail.employee)"
|
||||||
|
@click="openHrEdit(detail.employee)"
|
||||||
|
>编辑人事信息</el-button>
|
||||||
|
<el-button
|
||||||
|
v-auth="'onboardingEmployeeRegularize'"
|
||||||
v-if="detail?.employee && canRegularize(detail.employee)"
|
v-if="detail?.employee && canRegularize(detail.employee)"
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
|
:disabled="!canManage(detail.employee)"
|
||||||
|
:title="disabledReason(detail.employee)"
|
||||||
@click="openRegularization(detail.employee)"
|
@click="openRegularization(detail.employee)"
|
||||||
>
|
>
|
||||||
办理转正
|
办理转正
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingEmployeeRegularizationRevoke'"
|
||||||
v-if="detail?.employee?.regularizationStatus === 'regular'"
|
v-if="detail?.employee?.regularizationStatus === 'regular'"
|
||||||
type="danger"
|
type="danger"
|
||||||
plain
|
plain
|
||||||
|
:disabled="!canManage(detail.employee)"
|
||||||
|
:title="disabledReason(detail.employee)"
|
||||||
@click="revokeRegularization(detail.employee)"
|
@click="revokeRegularization(detail.employee)"
|
||||||
>
|
>
|
||||||
撤销转正
|
撤销转正
|
||||||
@@ -498,7 +545,17 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="onboardingEmployee">
|
<script setup lang="ts" name="onboardingEmployee">
|
||||||
import { computed, onBeforeUnmount, onMounted, reactive, ref } from "vue";
|
import { computed, onBeforeUnmount, onMounted, reactive, ref } from "vue";
|
||||||
import { Document, Download, UserFilled } from "@element-plus/icons-vue";
|
import {
|
||||||
|
Briefcase,
|
||||||
|
Clock,
|
||||||
|
Connection,
|
||||||
|
Document,
|
||||||
|
Download,
|
||||||
|
FirstAidKit,
|
||||||
|
User,
|
||||||
|
UserFilled,
|
||||||
|
WarningFilled
|
||||||
|
} from "@element-plus/icons-vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import type { UploadFile, UploadRequestOptions, UploadUserFile } from "element-plus";
|
import type { UploadFile, UploadRequestOptions, UploadUserFile } from "element-plus";
|
||||||
import {
|
import {
|
||||||
@@ -510,8 +567,140 @@ import {
|
|||||||
} from "@/api/modules/biz/onboarding";
|
} from "@/api/modules/biz/onboarding";
|
||||||
import type { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
|
import type { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
|
||||||
import { getMessageBoxPromptResult, isMessageBoxConfirmed } from "@/utils/messageBox";
|
import { getMessageBoxPromptResult, isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||||
|
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||||
|
|
||||||
|
const { canManage, disabledReason } = useOnboardingPermission("onboardingEmployeeManageAll");
|
||||||
|
|
||||||
const proTable = ref<ProTableInstance>();
|
const proTable = ref<ProTableInstance>();
|
||||||
|
|
||||||
|
// 统计数量
|
||||||
|
const statistics = reactive({
|
||||||
|
total: 0,
|
||||||
|
fullTime: 0,
|
||||||
|
partTime: 0,
|
||||||
|
probation: 0,
|
||||||
|
socialPurchased: 0,
|
||||||
|
expiringContract: 0
|
||||||
|
});
|
||||||
|
|
||||||
|
const activeMetricKey = ref<string>("total");
|
||||||
|
|
||||||
|
const metricFilters = computed(() => [
|
||||||
|
{
|
||||||
|
key: "total",
|
||||||
|
label: "在册总数",
|
||||||
|
count: statistics.total,
|
||||||
|
icon: User,
|
||||||
|
tone: "blue",
|
||||||
|
tooltip: activeMetricKey.value === "total" ? "当前显示全部在册员工" : "点击查看全部在册员工"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "full_time",
|
||||||
|
label: "正式员工",
|
||||||
|
count: statistics.fullTime,
|
||||||
|
icon: Briefcase,
|
||||||
|
tone: "green",
|
||||||
|
tooltip: activeMetricKey.value === "full_time" ? "再次点击取消筛选" : "点击筛选正式员工"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "part_time",
|
||||||
|
label: "兼职员工",
|
||||||
|
count: statistics.partTime,
|
||||||
|
icon: Connection,
|
||||||
|
tone: "purple",
|
||||||
|
tooltip: activeMetricKey.value === "part_time" ? "再次点击取消筛选" : "点击筛选兼职员工"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "probation",
|
||||||
|
label: "试用期待转正",
|
||||||
|
count: statistics.probation,
|
||||||
|
icon: Clock,
|
||||||
|
tone: "orange",
|
||||||
|
tooltip: activeMetricKey.value === "probation" ? "再次点击取消筛选" : "点击筛选试用期待转正员工"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "social_purchased",
|
||||||
|
label: "社保已缴纳",
|
||||||
|
count: statistics.socialPurchased,
|
||||||
|
icon: FirstAidKit,
|
||||||
|
tone: "teal",
|
||||||
|
tooltip: activeMetricKey.value === "social_purchased" ? "再次点击取消筛选" : "点击筛选社保已缴纳员工"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "expiring_contract",
|
||||||
|
label: "合同即将到期",
|
||||||
|
count: statistics.expiringContract,
|
||||||
|
icon: WarningFilled,
|
||||||
|
tone: "red",
|
||||||
|
tooltip: activeMetricKey.value === "expiring_contract" ? "再次点击取消筛选" : "点击筛选合同30天内到期或已到期员工"
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
/** 点击统计项筛选员工,再次点击同一项取消筛选并返回全部。 */
|
||||||
|
function toggleMetricFilter(key: string) {
|
||||||
|
if (!proTable.value?.searchParam) return;
|
||||||
|
|
||||||
|
const isAlreadyActive = activeMetricKey.value === key;
|
||||||
|
|
||||||
|
// 清空快捷维度相关筛选
|
||||||
|
proTable.value.searchParam.employmentType = undefined;
|
||||||
|
proTable.value.searchParam.regularizationStatus = undefined;
|
||||||
|
proTable.value.searchParam.socialInsuranceStatus = undefined;
|
||||||
|
proTable.value.searchParam.contractExpiringSoon = undefined;
|
||||||
|
|
||||||
|
if (isAlreadyActive || key === "total") {
|
||||||
|
activeMetricKey.value = "total";
|
||||||
|
} else {
|
||||||
|
activeMetricKey.value = key;
|
||||||
|
if (key === "full_time") {
|
||||||
|
proTable.value.searchParam.employmentType = "full_time";
|
||||||
|
} else if (key === "part_time") {
|
||||||
|
proTable.value.searchParam.employmentType = "part_time";
|
||||||
|
} else if (key === "probation") {
|
||||||
|
proTable.value.searchParam.regularizationStatus = "probation";
|
||||||
|
} else if (key === "social_purchased") {
|
||||||
|
proTable.value.searchParam.socialInsuranceStatus = "purchased";
|
||||||
|
} else if (key === "expiring_contract") {
|
||||||
|
proTable.value.searchParam.contractExpiringSoon = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proTable.value.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 列表查询及统计数据刷新 */
|
||||||
|
async function getTableData(params: any) {
|
||||||
|
const res = await onboardingTaskApi.employeePage(params);
|
||||||
|
|
||||||
|
// 同步高亮选中的统计徽章
|
||||||
|
if (params.contractExpiringSoon === true || params.contractExpiringSoon === "true") {
|
||||||
|
activeMetricKey.value = "expiring_contract";
|
||||||
|
} else if (params.regularizationStatus === "probation" && !params.employmentType && !params.socialInsuranceStatus) {
|
||||||
|
activeMetricKey.value = "probation";
|
||||||
|
} else if (params.socialInsuranceStatus === "purchased" && !params.employmentType && !params.regularizationStatus) {
|
||||||
|
activeMetricKey.value = "social_purchased";
|
||||||
|
} else if (params.employmentType === "full_time" && !params.regularizationStatus && !params.socialInsuranceStatus) {
|
||||||
|
activeMetricKey.value = "full_time";
|
||||||
|
} else if (params.employmentType === "part_time" && !params.regularizationStatus && !params.socialInsuranceStatus) {
|
||||||
|
activeMetricKey.value = "part_time";
|
||||||
|
} else if (!params.employmentType && !params.regularizationStatus && !params.socialInsuranceStatus && !params.contractExpiringSoon) {
|
||||||
|
activeMetricKey.value = "total";
|
||||||
|
} else {
|
||||||
|
activeMetricKey.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
const stats = res.data?.statistics;
|
||||||
|
if (stats) {
|
||||||
|
statistics.total = stats.total ?? 0;
|
||||||
|
statistics.fullTime = stats.fullTime ?? 0;
|
||||||
|
statistics.partTime = stats.partTime ?? 0;
|
||||||
|
statistics.probation = stats.probation ?? 0;
|
||||||
|
statistics.socialPurchased = stats.socialPurchased ?? 0;
|
||||||
|
statistics.expiringContract = stats.expiringContract ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
const detailVisible = ref(false);
|
const detailVisible = ref(false);
|
||||||
const activeTab = ref("basic");
|
const activeTab = ref("basic");
|
||||||
const detail = ref<any>();
|
const detail = ref<any>();
|
||||||
@@ -1649,4 +1838,110 @@ onBeforeUnmount(clearMaterialPreviews);
|
|||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
/* 员工统计与快捷筛选工具栏 */
|
||||||
|
.employee-table-toolbar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.employee-metric-filters {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter {
|
||||||
|
--metric-color: #64748b;
|
||||||
|
--metric-bg: #f8fafc;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 10px;
|
||||||
|
color: var(--el-text-color-regular);
|
||||||
|
font: inherit;
|
||||||
|
font-size: 13px;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
border-radius: 6px;
|
||||||
|
transition: all 0.18s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter:hover {
|
||||||
|
color: var(--metric-color);
|
||||||
|
border-color: var(--metric-color);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.is-active {
|
||||||
|
color: var(--metric-color);
|
||||||
|
background: var(--metric-bg);
|
||||||
|
border-color: var(--metric-color);
|
||||||
|
box-shadow: inset 0 0 0 1px var(--metric-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.tone-blue {
|
||||||
|
--metric-color: #2563eb;
|
||||||
|
--metric-bg: #eff6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.tone-green {
|
||||||
|
--metric-color: #059669;
|
||||||
|
--metric-bg: #ecfdf5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.tone-purple {
|
||||||
|
--metric-color: #7c3aed;
|
||||||
|
--metric-bg: #f5f3ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.tone-orange {
|
||||||
|
--metric-color: #d97706;
|
||||||
|
--metric-bg: #fffbeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.tone-teal {
|
||||||
|
--metric-color: #0d9488;
|
||||||
|
--metric-bg: #f0fdfa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.tone-red {
|
||||||
|
--metric-color: #dc2626;
|
||||||
|
--metric-bg: #fef2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter .el-icon {
|
||||||
|
color: var(--metric-color);
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter-label {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter-count {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
padding: 0 5px;
|
||||||
|
color: var(--metric-color);
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
background: var(--metric-bg);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-filter.is-active .metric-filter-count {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--metric-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<el-button type="primary" icon="Search" @click="loadTemplates">查询</el-button>
|
<el-button type="primary" icon="Search" @click="loadTemplates">查询</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
<div class="toolbar-spacer" />
|
<div class="toolbar-spacer" />
|
||||||
<el-button type="primary" icon="Plus" @click="openCreate">新增入职模板</el-button>
|
<el-button v-auth="'onboardingEntryConfigAdd'" type="primary" icon="Plus" @click="openCreate">新增入职模板</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-alert title="入职模板统一管理公司、岗位、签署材料文件与员工上传材料;员工入职档案自动采用标准《入职登记表》。" type="info" :closable="false" show-icon
|
<el-alert title="入职模板统一管理公司、岗位、签署材料文件与员工上传材料;员工入职档案自动采用标准《入职登记表》。" type="info" :closable="false" show-icon
|
||||||
@@ -90,8 +90,22 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="openEdit(scope.row)">编辑</el-button>
|
<el-button
|
||||||
<el-button link type="danger" @click="removeTemplate(scope.row)">删除</el-button>
|
v-auth="'onboardingEntryConfigEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="openEdit(scope.row)"
|
||||||
|
>编辑</el-button>
|
||||||
|
<el-button
|
||||||
|
v-auth="'onboardingEntryConfigDelete'"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="removeTemplate(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -293,6 +307,9 @@ import {
|
|||||||
onboardingTaskApi
|
onboardingTaskApi
|
||||||
} from "@/api/modules/biz/onboarding";
|
} from "@/api/modules/biz/onboarding";
|
||||||
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||||
|
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||||
|
|
||||||
|
const { canManage, disabledReason } = useOnboardingPermission("onboardingEntryConfigManageAll");
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const saving = ref(false);
|
const saving = ref(false);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<el-button type="primary" icon="Search" @click="loadData">查询</el-button>
|
<el-button type="primary" icon="Search" @click="loadData">查询</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
<div class="spacer"></div>
|
<div class="spacer"></div>
|
||||||
<el-button type="primary" icon="Plus" @click="openCreate">新增自定义变量</el-button>
|
<el-button v-auth="'onboardingEntryConfigAdd'" type="primary" icon="Plus" @click="openCreate">新增自定义变量</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-alert
|
<el-alert
|
||||||
@@ -80,12 +80,23 @@
|
|||||||
<el-table-column label="操作" width="160" align="center" fixed="right">
|
<el-table-column label="操作" width="160" align="center" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div style="display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;">
|
<div style="display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;">
|
||||||
<el-button link type="primary" icon="Edit" @click="openEdit(row)">编辑</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingEntryConfigEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(row)"
|
||||||
|
:title="disabledReason(row)"
|
||||||
|
@click="openEdit(row)"
|
||||||
|
>编辑</el-button>
|
||||||
|
<el-button
|
||||||
|
v-auth="'onboardingEntryConfigDelete'"
|
||||||
v-if="!row.isBuiltIn"
|
v-if="!row.isBuiltIn"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
|
:disabled="!canManage(row)"
|
||||||
|
:title="disabledReason(row)"
|
||||||
@click="remove(row)"
|
@click="remove(row)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@@ -171,6 +182,9 @@ import { ref, reactive, onMounted } from "vue";
|
|||||||
import { ElMessage, ElMessageBox, FormInstance, FormRules } from "element-plus";
|
import { ElMessage, ElMessageBox, FormInstance, FormRules } from "element-plus";
|
||||||
import { onboardingTaskApi } from "@/api/modules/biz/onboarding";
|
import { onboardingTaskApi } from "@/api/modules/biz/onboarding";
|
||||||
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||||
|
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||||
|
|
||||||
|
const { canManage, disabledReason } = useOnboardingPermission("onboardingEntryConfigManageAll");
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const saving = ref(false);
|
const saving = ref(false);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<el-tab-pane label="上传资料类型" name="materials">
|
<el-tab-pane label="上传资料类型" name="materials">
|
||||||
<div class="tab-card-wrapper material-tab-wrapper">
|
<div class="tab-card-wrapper material-tab-wrapper">
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<el-button type="primary" icon="Plus" @click="openMaterialCreate">
|
<el-button v-auth="'onboardingEntryConfigAdd'" type="primary" icon="Plus" @click="openMaterialCreate">
|
||||||
新增资料类型
|
新增资料类型
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,11 +35,27 @@
|
|||||||
|
|
||||||
<el-table-column label="操作" width="150" fixed="right" align="center">
|
<el-table-column label="操作" width="150" fixed="right" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="openMaterialEdit(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingEntryConfigEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="openMaterialEdit(scope.row)"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="danger" icon="Delete" @click="removeMaterial(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingEntryConfigDelete'"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="removeMaterial(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -57,7 +73,7 @@
|
|||||||
|
|
||||||
<!-- 资料类型弹窗 -->
|
<!-- 资料类型弹窗 -->
|
||||||
<el-dialog v-model="materialVisible" :title="materialForm.id ? '编辑资料类型' : '新增资料类型'" width="560px" destroy-on-close>
|
<el-dialog v-model="materialVisible" :title="materialForm.id ? '编辑资料类型' : '新增资料类型'" width="560px" destroy-on-close>
|
||||||
<el-form :model="materialForm" label-width="110px">
|
<el-form :model="materialForm" label-width="120px" class="material-form">
|
||||||
<el-form-item label="资料编码" required>
|
<el-form-item label="资料编码" required>
|
||||||
<el-input v-model="materialForm.materialCode" />
|
<el-input v-model="materialForm.materialCode" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -72,10 +88,12 @@
|
|||||||
|
|
||||||
<el-form-item label="最大文件数">
|
<el-form-item label="最大文件数">
|
||||||
<el-input-number v-model="materialForm.maxFileCount" :min="1" :max="10" />
|
<el-input-number v-model="materialForm.maxFileCount" :min="1" :max="10" />
|
||||||
|
<span class="unit-suffix">个</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="单文件大小(MB)">
|
<el-form-item label="单文件大小">
|
||||||
<el-input-number v-model="materialForm.maxFileSizeMb" :min="1" :max="100" />
|
<el-input-number v-model="materialForm.maxFileSizeMb" :min="1" :max="100" />
|
||||||
|
<span class="unit-suffix">MB</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
@@ -104,6 +122,9 @@ import {
|
|||||||
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||||
import OnboardingTemplatePanel from "./components/OnboardingTemplatePanel.vue";
|
import OnboardingTemplatePanel from "./components/OnboardingTemplatePanel.vue";
|
||||||
import VariableDefinitionPanel from "./components/VariableDefinitionPanel.vue";
|
import VariableDefinitionPanel from "./components/VariableDefinitionPanel.vue";
|
||||||
|
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||||
|
|
||||||
|
const { canManage, disabledReason } = useOnboardingPermission("onboardingEntryConfigManageAll");
|
||||||
|
|
||||||
const activeTab = ref("variables");
|
const activeTab = ref("variables");
|
||||||
const materialTypes = ref<OnboardingMaterialType[]>([]);
|
const materialTypes = ref<OnboardingMaterialType[]>([]);
|
||||||
@@ -225,4 +246,14 @@ onMounted(() => {
|
|||||||
.toolbar {
|
.toolbar {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.material-form :deep(.el-form-item__label) {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unit-suffix {
|
||||||
|
margin-left: 10px;
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
:search-col="5"
|
:search-col="5"
|
||||||
>
|
>
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<el-button type="primary" icon="Plus" @click="openCompanyCreate">
|
<el-button v-auth="'onboardingSetupAdd'" type="primary" icon="Plus" @click="openCompanyCreate">
|
||||||
新增入职公司
|
新增入职公司
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -33,11 +33,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="openCompanyEdit(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingSetupEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="openCompanyEdit(scope.row)"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="danger" icon="Delete" @click="removeCompany(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingSetupDelete'"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="removeCompany(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -56,7 +72,7 @@
|
|||||||
:search-col="5"
|
:search-col="5"
|
||||||
>
|
>
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<el-button type="primary" icon="Plus" @click="openDepartmentCreate">
|
<el-button v-auth="'onboardingSetupAdd'" type="primary" icon="Plus" @click="openDepartmentCreate">
|
||||||
新增入职部门
|
新增入职部门
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -74,11 +90,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="openDepartmentEdit(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingSetupEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="openDepartmentEdit(scope.row)"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="danger" icon="Delete" @click="removeDepartment(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingSetupDelete'"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="removeDepartment(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -97,7 +129,7 @@
|
|||||||
:search-col="5"
|
:search-col="5"
|
||||||
>
|
>
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<el-button type="primary" icon="Plus" @click="openPositionCreate">
|
<el-button v-auth="'onboardingSetupAdd'" type="primary" icon="Plus" @click="openPositionCreate">
|
||||||
新增入职岗位
|
新增入职岗位
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -122,11 +154,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="openPositionEdit(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingSetupEdit'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="openPositionEdit(scope.row)"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="danger" icon="Delete" @click="removePosition(scope.row)">
|
<el-button
|
||||||
|
v-auth="'onboardingSetupDelete'"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
|
@click="removePosition(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -151,6 +199,7 @@
|
|||||||
:model="companyForm"
|
:model="companyForm"
|
||||||
:rules="companyRules"
|
:rules="companyRules"
|
||||||
label-width="140px"
|
label-width="140px"
|
||||||
|
class="setup-form"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -177,6 +226,7 @@
|
|||||||
placeholder="18位统一社会信用代码"
|
placeholder="18位统一社会信用代码"
|
||||||
maxlength="18"
|
maxlength="18"
|
||||||
clearable
|
clearable
|
||||||
|
@input="val => companyForm.unifiedSocialCreditCode = (val || '').toUpperCase()"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -377,6 +427,9 @@ import {
|
|||||||
} from "@/api/modules/biz/onboarding";
|
} from "@/api/modules/biz/onboarding";
|
||||||
import type { ColumnProps, ProTableInstance, EnumProps } from "@/components/ProTable/interface";
|
import type { ColumnProps, ProTableInstance, EnumProps } from "@/components/ProTable/interface";
|
||||||
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||||
|
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||||
|
|
||||||
|
const { canManage, disabledReason } = useOnboardingPermission("onboardingSetupManageAll");
|
||||||
|
|
||||||
const activeTab = ref("company");
|
const activeTab = ref("company");
|
||||||
|
|
||||||
@@ -446,7 +499,7 @@ const companyRules = reactive<FormRules>({
|
|||||||
{ required: true, message: "请输入公司编码", trigger: "blur" },
|
{ required: true, message: "请输入公司编码", trigger: "blur" },
|
||||||
{
|
{
|
||||||
pattern: /^[a-zA-Z0-9_-]{2,50}$/,
|
pattern: /^[a-zA-Z0-9_-]{2,50}$/,
|
||||||
message: "公司编码格式不正确,支持2-50位字母、数字、下划线或短横线",
|
message: "支持2-50位字母、数字、下划线或短横线",
|
||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -461,8 +514,8 @@ const companyRules = reactive<FormRules>({
|
|||||||
unifiedSocialCreditCode: [
|
unifiedSocialCreditCode: [
|
||||||
{ required: true, message: "请输入统一社会信用代码", trigger: "blur" },
|
{ required: true, message: "请输入统一社会信用代码", trigger: "blur" },
|
||||||
{
|
{
|
||||||
pattern: /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/i,
|
pattern: /^[0-9A-Za-z]{18}$/,
|
||||||
message: "统一社会信用代码格式不正确,请输入18位标准社会信用代码",
|
message: "请输入18位统一社会信用代码",
|
||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -470,7 +523,7 @@ const companyRules = reactive<FormRules>({
|
|||||||
{ required: true, message: "请输入法定代表人姓名", trigger: "blur" },
|
{ required: true, message: "请输入法定代表人姓名", trigger: "blur" },
|
||||||
{
|
{
|
||||||
pattern: /^[\u4e00-\u9fa5a-zA-Z·.\s]{2,20}$/,
|
pattern: /^[\u4e00-\u9fa5a-zA-Z·.\s]{2,20}$/,
|
||||||
message: "法定代表人姓名格式不正确,请输入2-20位中英文姓名",
|
message: "请输入2-20位中英文姓名",
|
||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -478,7 +531,7 @@ const companyRules = reactive<FormRules>({
|
|||||||
{ required: true, message: "请输入企业联系电话", trigger: "blur" },
|
{ required: true, message: "请输入企业联系电话", trigger: "blur" },
|
||||||
{
|
{
|
||||||
pattern: /^(1[3-9]\d{9}|(0\d{2,3}-?)?\d{7,8}|400(-?\d{3,4}){2})$/,
|
pattern: /^(1[3-9]\d{9}|(0\d{2,3}-?)?\d{7,8}|400(-?\d{3,4}){2})$/,
|
||||||
message: "联系电话格式不正确,请输入有效的手机号或固话号码",
|
message: "请输入有效的手机号或固话号码",
|
||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -492,14 +545,14 @@ const companyRules = reactive<FormRules>({
|
|||||||
qiyuesuoCategoryId: [
|
qiyuesuoCategoryId: [
|
||||||
{
|
{
|
||||||
pattern: /^\d*$/,
|
pattern: /^\d*$/,
|
||||||
message: "契约锁业务分类 Id 必须为纯数字",
|
message: "业务分类 Id 必须为纯数字",
|
||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
qiyuesuoSealId: [
|
qiyuesuoSealId: [
|
||||||
{
|
{
|
||||||
pattern: /^\d*$/,
|
pattern: /^\d*$/,
|
||||||
message: "契约锁企业印章 Id 必须为纯数字",
|
message: "企业印章 Id 必须为纯数字",
|
||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -909,4 +962,13 @@ onMounted(loadCompanies);
|
|||||||
.w-full {
|
.w-full {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.setup-form :deep(.el-form-item) {
|
||||||
|
margin-bottom: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-form :deep(.el-form-item__error) {
|
||||||
|
padding-top: 3px;
|
||||||
|
line-height: 1.25;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
>
|
>
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<div class="task-table-toolbar">
|
<div class="task-table-toolbar">
|
||||||
<el-button type="primary" icon="Plus" @click="openCreate">
|
<el-button v-auth="'onboardingTaskCreate'" type="primary" icon="Plus" @click="openCreate">
|
||||||
发起入职任务
|
发起入职任务
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="task-metric-filters">
|
<div class="task-metric-filters">
|
||||||
@@ -63,59 +63,77 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskVariableEdit'"
|
||||||
v-if="['pending_fill', 'rejected'].includes(scope.row.taskStatus)"
|
v-if="['pending_fill', 'rejected'].includes(scope.row.taskStatus)"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="Setting"
|
icon="Setting"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="openContractVariables(scope.row)"
|
@click="openContractVariables(scope.row)"
|
||||||
>
|
>
|
||||||
签署材料参数
|
签署材料参数
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskCopy'"
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
icon="CopyDocument"
|
icon="CopyDocument"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="openCopyTask(scope.row)"
|
@click="openCopyTask(scope.row)"
|
||||||
>
|
>
|
||||||
复制任务
|
复制任务
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskLink'"
|
||||||
v-if="['pending_fill', 'rejected'].includes(scope.row.taskStatus)"
|
v-if="['pending_fill', 'rejected'].includes(scope.row.taskStatus)"
|
||||||
link
|
link
|
||||||
type="warning"
|
type="warning"
|
||||||
icon="CopyDocument"
|
icon="CopyDocument"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="copyOrShareTaskLink(scope.row)"
|
@click="copyOrShareTaskLink(scope.row)"
|
||||||
>
|
>
|
||||||
复制链接
|
复制链接
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskAudit'"
|
||||||
v-if="scope.row.taskStatus === 'reviewing'"
|
v-if="scope.row.taskStatus === 'reviewing'"
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
icon="Check"
|
icon="Check"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="approve(scope.row)"
|
@click="approve(scope.row)"
|
||||||
>
|
>
|
||||||
通过
|
通过
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskAudit'"
|
||||||
v-if="scope.row.taskStatus === 'reviewing'"
|
v-if="scope.row.taskStatus === 'reviewing'"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Close"
|
icon="Close"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="reject(scope.row)"
|
@click="reject(scope.row)"
|
||||||
>
|
>
|
||||||
退回
|
退回
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskArchive'"
|
||||||
v-if="scope.row.taskStatus === 'approved'"
|
v-if="scope.row.taskStatus === 'approved'"
|
||||||
link
|
link
|
||||||
type="info"
|
type="info"
|
||||||
icon="FolderChecked"
|
icon="FolderChecked"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="archive(scope.row)"
|
@click="archive(scope.row)"
|
||||||
>
|
>
|
||||||
归档
|
归档
|
||||||
@@ -132,20 +150,26 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskRevoke'"
|
||||||
v-if="['pending_fill', 'reviewing', 'rejected'].includes(scope.row.taskStatus)"
|
v-if="['pending_fill', 'reviewing', 'rejected'].includes(scope.row.taskStatus)"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="revoke(scope.row)"
|
@click="revoke(scope.row)"
|
||||||
>
|
>
|
||||||
撤销
|
撤销
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskDelete'"
|
||||||
v-if="scope.row.taskStatus === 'revoked'"
|
v-if="scope.row.taskStatus === 'revoked'"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
|
:disabled="!canManage(scope.row)"
|
||||||
|
:title="disabledReason(scope.row)"
|
||||||
@click="removeTask(scope.row)"
|
@click="removeTask(scope.row)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@@ -813,19 +837,23 @@
|
|||||||
|
|
||||||
<div v-if="detail.task.taskStatus === 'reviewing'" class="review-btn-group">
|
<div v-if="detail.task.taskStatus === 'reviewing'" class="review-btn-group">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskMaterialReview'"
|
||||||
size="small"
|
size="small"
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
:disabled="item.reviewStatus === 'passed'"
|
:disabled="item.reviewStatus === 'passed' || !canManage(detail.task)"
|
||||||
|
:title="disabledReason(detail.task)"
|
||||||
@click="reviewMaterial(item.id, 'passed')"
|
@click="reviewMaterial(item.id, 'passed')"
|
||||||
>
|
>
|
||||||
合格
|
合格
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskMaterialReview'"
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
plain
|
plain
|
||||||
:disabled="item.reviewStatus === 'need_supplement'"
|
:disabled="item.reviewStatus === 'need_supplement' || !canManage(detail.task)"
|
||||||
|
:title="disabledReason(detail.task)"
|
||||||
@click="reviewMaterial(item.id, 'need_supplement')"
|
@click="reviewMaterial(item.id, 'need_supplement')"
|
||||||
>
|
>
|
||||||
需补充
|
需补充
|
||||||
@@ -854,11 +882,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="contract-right">
|
<div class="contract-right">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskContractGenerate'"
|
||||||
v-if="!item.generatedDocxFileId"
|
v-if="!item.generatedDocxFileId"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="small"
|
size="small"
|
||||||
icon="DocumentChecked"
|
icon="DocumentChecked"
|
||||||
|
:disabled="!canManage(detail.task)"
|
||||||
|
:title="disabledReason(detail.task)"
|
||||||
@click="generate(item.id)"
|
@click="generate(item.id)"
|
||||||
>
|
>
|
||||||
生成DOCX签署材料
|
生成DOCX签署材料
|
||||||
@@ -911,25 +942,34 @@
|
|||||||
<div v-if="detail" class="drawer-footer-actions">
|
<div v-if="detail" class="drawer-footer-actions">
|
||||||
<div class="drawer-footer-right">
|
<div class="drawer-footer-right">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskAudit'"
|
||||||
v-if="detail.task.taskStatus === 'reviewing'"
|
v-if="detail.task.taskStatus === 'reviewing'"
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Close"
|
icon="Close"
|
||||||
|
:disabled="!canManage(detail.task)"
|
||||||
|
:title="disabledReason(detail.task)"
|
||||||
@click="reject(detail.task)"
|
@click="reject(detail.task)"
|
||||||
>
|
>
|
||||||
退回修改
|
退回修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskAudit'"
|
||||||
v-if="detail.task.taskStatus === 'reviewing'"
|
v-if="detail.task.taskStatus === 'reviewing'"
|
||||||
type="success"
|
type="success"
|
||||||
icon="Check"
|
icon="Check"
|
||||||
|
:disabled="!canManage(detail.task)"
|
||||||
|
:title="disabledReason(detail.task)"
|
||||||
@click="approve(detail.task)"
|
@click="approve(detail.task)"
|
||||||
>
|
>
|
||||||
审核通过并建档
|
审核通过并建档
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskArchive'"
|
||||||
v-if="detail.task.taskStatus === 'approved'"
|
v-if="detail.task.taskStatus === 'approved'"
|
||||||
type="info"
|
type="info"
|
||||||
icon="FolderChecked"
|
icon="FolderChecked"
|
||||||
|
:disabled="!canManage(detail.task)"
|
||||||
|
:title="disabledReason(detail.task)"
|
||||||
@click="archive(detail.task)"
|
@click="archive(detail.task)"
|
||||||
>
|
>
|
||||||
归档该任务
|
归档该任务
|
||||||
@@ -943,9 +983,12 @@
|
|||||||
电子签约
|
电子签约
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskDelete'"
|
||||||
v-if="detail.task.taskStatus === 'revoked'"
|
v-if="detail.task.taskStatus === 'revoked'"
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
|
:disabled="!canManage(detail.task)"
|
||||||
|
:title="disabledReason(detail.task)"
|
||||||
@click="removeTask(detail.task)"
|
@click="removeTask(detail.task)"
|
||||||
>
|
>
|
||||||
删除该任务
|
删除该任务
|
||||||
@@ -1014,9 +1057,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskVariableEdit'"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
icon="Check"
|
icon="Check"
|
||||||
|
:disabled="!canManage(contractVariableTask)"
|
||||||
|
:title="disabledReason(contractVariableTask)"
|
||||||
@click="saveContractVariables(group)"
|
@click="saveContractVariables(group)"
|
||||||
>
|
>
|
||||||
保存《{{ group.contractName }}》参数
|
保存《{{ group.contractName }}》参数
|
||||||
@@ -1096,7 +1142,15 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer-flex">
|
<div class="dialog-footer-flex">
|
||||||
<el-button @click="contractVariablesVisible = false">关闭</el-button>
|
<el-button @click="contractVariablesVisible = false">关闭</el-button>
|
||||||
<el-button type="primary" icon="Check" :loading="savingAllVars" @click="saveAllContractVariables">
|
<el-button
|
||||||
|
v-auth="'onboardingTaskVariableEdit'"
|
||||||
|
type="primary"
|
||||||
|
icon="Check"
|
||||||
|
:loading="savingAllVars"
|
||||||
|
:disabled="!canManage(contractVariableTask)"
|
||||||
|
:title="disabledReason(contractVariableTask)"
|
||||||
|
@click="saveAllContractVariables"
|
||||||
|
>
|
||||||
一键保存全部签署材料参数
|
一键保存全部签署材料参数
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -1277,7 +1331,14 @@
|
|||||||
: '链接尚未生成或已过期,点击下方按钮自动刷新' }}
|
: '链接尚未生成或已过期,点击下方按钮自动刷新' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" plain @click="copyElectronicSignLink">
|
<el-button
|
||||||
|
v-auth="'onboardingTaskElectronicSign'"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:disabled="!canManage(electronicSignTask)"
|
||||||
|
:title="disabledReason(electronicSignTask)"
|
||||||
|
@click="copyElectronicSignLink"
|
||||||
|
>
|
||||||
获取并复制链接
|
获取并复制链接
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -1329,10 +1390,12 @@
|
|||||||
<div class="electronic-sign-footer">
|
<div class="electronic-sign-footer">
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskElectronicSign'"
|
||||||
v-if="electronicSignDetail?.hasProcess && canInvalidElectronicSign"
|
v-if="electronicSignDetail?.hasProcess && canInvalidElectronicSign"
|
||||||
type="danger"
|
type="danger"
|
||||||
plain
|
plain
|
||||||
:disabled="electronicSignLoading"
|
:disabled="electronicSignLoading || !canManage(electronicSignTask)"
|
||||||
|
:title="disabledReason(electronicSignTask)"
|
||||||
@click="invalidElectronicSign"
|
@click="invalidElectronicSign"
|
||||||
>
|
>
|
||||||
作废流程
|
作废流程
|
||||||
@@ -1341,27 +1404,34 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-button @click="electronicSignVisible = false">关闭</el-button>
|
<el-button @click="electronicSignVisible = false">关闭</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskElectronicSign'"
|
||||||
v-if="electronicSignDetail?.hasProcess && electronicSignDetail.signStatus === 'pending_employee_sign'"
|
v-if="electronicSignDetail?.hasProcess && electronicSignDetail.signStatus === 'pending_employee_sign'"
|
||||||
:disabled="electronicSignLoading"
|
:disabled="electronicSignLoading || !canManage(electronicSignTask)"
|
||||||
|
:title="disabledReason(electronicSignTask)"
|
||||||
@click="noticeElectronicSign"
|
@click="noticeElectronicSign"
|
||||||
>
|
>
|
||||||
催签
|
催签
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskElectronicSign'"
|
||||||
v-if="electronicSignDetail?.hasProcess && electronicSignDetail.providerContractId"
|
v-if="electronicSignDetail?.hasProcess && electronicSignDetail.providerContractId"
|
||||||
:loading="electronicSignLoading"
|
:loading="electronicSignLoading"
|
||||||
|
:disabled="!canManage(electronicSignTask)"
|
||||||
|
:title="disabledReason(electronicSignTask)"
|
||||||
@click="syncElectronicSign"
|
@click="syncElectronicSign"
|
||||||
>
|
>
|
||||||
同步状态
|
同步状态
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskElectronicSign'"
|
||||||
v-if="
|
v-if="
|
||||||
electronicSignDetail?.hasProcess
|
electronicSignDetail?.hasProcess
|
||||||
&& electronicSignDetail.signStatus === 'pending_company_seal'
|
&& electronicSignDetail.signStatus === 'pending_company_seal'
|
||||||
"
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="electronicSignLoading"
|
:loading="electronicSignLoading"
|
||||||
:disabled="!allEmployeeSignedDocumentsPreviewed"
|
:disabled="!allEmployeeSignedDocumentsPreviewed || !canManage(electronicSignTask)"
|
||||||
|
:title="disabledReason(electronicSignTask)"
|
||||||
@click="confirmCompanySeal"
|
@click="confirmCompanySeal"
|
||||||
>
|
>
|
||||||
确认企业盖章
|
确认企业盖章
|
||||||
@@ -1374,20 +1444,24 @@
|
|||||||
下载完整归档
|
下载完整归档
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskElectronicSign'"
|
||||||
v-if="electronicSignDetail?.canReinitiate"
|
v-if="electronicSignDetail?.canReinitiate"
|
||||||
type="warning"
|
type="warning"
|
||||||
plain
|
plain
|
||||||
:loading="electronicSignLoading"
|
:loading="electronicSignLoading"
|
||||||
:disabled="!electronicSignDetail.documents.length"
|
:disabled="!electronicSignDetail.documents.length || !canManage(electronicSignTask)"
|
||||||
|
:title="disabledReason(electronicSignTask)"
|
||||||
@click="reinitiateElectronicSign"
|
@click="reinitiateElectronicSign"
|
||||||
>
|
>
|
||||||
重新发起签约
|
重新发起签约
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-auth="'onboardingTaskElectronicSign'"
|
||||||
v-if="electronicSignDetail?.canInitiate"
|
v-if="electronicSignDetail?.canInitiate"
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="electronicSignLoading"
|
:loading="electronicSignLoading"
|
||||||
:disabled="!electronicSignDetail.documents.length"
|
:disabled="!electronicSignDetail.documents.length || !canManage(electronicSignTask)"
|
||||||
|
:title="disabledReason(electronicSignTask)"
|
||||||
@click="initiateElectronicSign"
|
@click="initiateElectronicSign"
|
||||||
>
|
>
|
||||||
{{ electronicSignDetail.hasProcess ? '继续/重试发起' : '确认发起电子签' }}
|
{{ electronicSignDetail.hasProcess ? '继续/重试发起' : '确认发起电子签' }}
|
||||||
@@ -1434,6 +1508,9 @@ import {
|
|||||||
} from "@/api/modules/biz/onboarding";
|
} from "@/api/modules/biz/onboarding";
|
||||||
import type { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
|
import type { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
|
||||||
import { getMessageBoxPromptResult, isMessageBoxConfirmed } from "@/utils/messageBox";
|
import { getMessageBoxPromptResult, isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||||
|
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||||
|
|
||||||
|
const { canManage, disabledReason } = useOnboardingPermission("onboardingTaskManageAll");
|
||||||
|
|
||||||
const proTable = ref<ProTableInstance>();
|
const proTable = ref<ProTableInstance>();
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ function onOpen(props: FormProps.Base<Button.ButtonInfo>) {
|
|||||||
if (props.record.id) {
|
if (props.record.id) {
|
||||||
//如果传了id,就去请求api获取record
|
//如果传了id,就去请求api获取record
|
||||||
buttonApi.detail({ id: props.record.id }).then(res => {
|
buttonApi.detail({ id: props.record.id }).then(res => {
|
||||||
|
if (!res.data) {
|
||||||
|
ElMessage.error("按钮详情不存在或按钮ID无效,请刷新列表后重试");
|
||||||
|
onClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
buttonProps.record = res.data;
|
buttonProps.record = res.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user