This commit is contained in:
fuenmao
2026-09-09 14:57:46 +08:00
parent 709e02a04f
commit 68704a091b
4 changed files with 685 additions and 15 deletions
+33 -6
View File
@@ -174,7 +174,7 @@
</div>
<el-row :gutter="16">
<el-col :xs="24" :sm="6">
<el-col :xs="24" :sm="8">
<el-form-item label="所属公司" required>
<el-select
v-model="form.companyId"
@@ -188,7 +188,7 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="6">
<el-col :xs="24" :sm="8">
<el-form-item label="所属部门" required>
<el-select
v-model="form.departmentId"
@@ -203,7 +203,7 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="6">
<el-col :xs="24" :sm="8">
<el-form-item label="入职岗位" required>
<el-select
v-model="form.positionId"
@@ -218,7 +218,7 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="6">
<el-col :xs="24" :sm="12">
<el-form-item label="入职模板" required>
<el-select
v-model="form.onboardingTemplateId"
@@ -232,6 +232,15 @@
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12">
<el-form-item label="用工类型" required>
<el-select v-model="form.employmentType" class="full-width">
<el-option label="正式员工" value="full_time" />
<el-option label="兼职员工" value="part_time" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
@@ -460,6 +469,9 @@
<el-descriptions-item label="入职岗位">
{{ copySourceTask?.positionName || "-" }}
</el-descriptions-item>
<el-descriptions-item label="用工类型">
{{ employmentTypeText(copySourceTask?.employmentType) }}
</el-descriptions-item>
</el-descriptions>
<div class="copy-count-row">
@@ -566,6 +578,7 @@
<span>所属公司:<strong>{{ detail.task.companyName || '-' }}</strong></span>
<span>所属部门:<strong>{{ detail.task.departmentName || '-' }}</strong></span>
<span>入职岗位:<strong>{{ detail.task.positionName || '-' }}</strong></span>
<span>用工类型:<strong>{{ employmentTypeText(detail.task.employmentType) }}</strong></span>
<span>入职模板:<strong>{{ detail.task.onboardingTemplateName || '-' }}</strong></span>
</div>
</div>
@@ -1703,6 +1716,7 @@ const form = reactive({
departmentId: undefined as number | undefined,
positionId: undefined as number | undefined,
onboardingTemplateId: undefined as number | undefined,
employmentType: "full_time" as "full_time" | "part_time",
contractVariables: [] as Array<{
contractTemplateVersionId: number;
variableCode: string;
@@ -1806,6 +1820,13 @@ const columns: ColumnProps<OnboardingTask>[] = [
label: "所属公司 / 部门 / 岗位",
minWidth: 220
},
{
prop: "employmentType",
label: "用工类型",
minWidth: 100,
align: "center",
render: scope => employmentTypeText(scope.row.employmentType)
},
{
prop: "taskStatus",
label: "当前状态",
@@ -1936,7 +1957,7 @@ const auditActionType = (action: string): EpTagType => {
const auditActionText = (action: string) => {
const map: Record<string, string> = {
submit: "候选人提交入职资料",
approve: "人事审核通过并创建正式员工",
approve: "人事审核通过并创建员工档案",
reject: "人事驳回退回材料",
archive: "人事完成归档",
revoke: "人事撤销任务"
@@ -2258,6 +2279,7 @@ function openCreate() {
departmentId: undefined,
positionId: undefined,
onboardingTemplateId: undefined,
employmentType: "full_time",
contractVariables: [],
remark: ""
});
@@ -2290,6 +2312,7 @@ function buildTaskCreatePayload() {
departmentId: form.departmentId,
positionId: form.positionId,
onboardingTemplateId: form.onboardingTemplateId,
employmentType: form.employmentType,
remark: form.remark.trim(),
contractVariables: form.contractVariables.map(item => ({
contractTemplateVersionId: item.contractTemplateVersionId,
@@ -2544,7 +2567,7 @@ function buildContractVariableSaveValues(group: OnboardingTaskContractVariableGr
async function approve(row: OnboardingTask) {
const confirmed = await isMessageBoxConfirmed(
ElMessageBox.confirm(
"确认审核通过?系统将自动创建正式员工档案并锁定签署材料快照。",
"确认审核通过?系统将自动创建员工档案并锁定签署材料快照。",
"审核通过确认",
{ type: "success", confirmButtonText: "审核通过", cancelButtonText: "取消" }
)
@@ -2694,6 +2717,10 @@ async function syncElectronicSign() {
}
}
function employmentTypeText(value?: string) {
return value === "part_time" ? "兼职员工" : "正式员工";
}
async function previewEmployeeSignedDocument(
documentItem: OnboardingElectronicSignDocument
) {