|
@@ -51,11 +51,11 @@
|
|
|
label="操作" align="center" min-width="160">
|
|
label="操作" align="center" min-width="160">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button v-hasPerm="['module_payment:employee:detail']" type="info" size="small" link :icon="View"
|
|
<el-button v-hasPerm="['module_payment:employee:detail']" type="info" size="small" link :icon="View"
|
|
|
- @click="handleOpenDialog('detail', scope.row.employee_id)">
|
|
|
|
|
|
|
+ @click="handleOpenDialog('detail', scope.row.employee_id, scope.row.enterprise_id)">
|
|
|
详情
|
|
详情
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button v-hasPerm="['module_payment:employee:update']" type="primary" size="small" link
|
|
<el-button v-hasPerm="['module_payment:employee:update']" type="primary" size="small" link
|
|
|
- @click="handleOpenDialog('update', scope.row.employee_id)">
|
|
|
|
|
|
|
+ @click="handleOpenDialog('update', scope.row.employee_id, scope.row.enterprise_id)">
|
|
|
编辑
|
|
编辑
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button v-hasPerm="['module_payment:employee:invite']" type="success" size="small" link
|
|
<el-button v-hasPerm="['module_payment:employee:invite']" type="success" size="small" link
|
|
@@ -129,21 +129,21 @@
|
|
|
<EnhancedDialog v-model="dialogVisible.visible" :title="dialogVisible.title" @close="handleCloseDialog">
|
|
<EnhancedDialog v-model="dialogVisible.visible" :title="dialogVisible.title" @close="handleCloseDialog">
|
|
|
<template v-if="dialogVisible.type === 'detail'">
|
|
<template v-if="dialogVisible.type === 'detail'">
|
|
|
<template v-if="dialogVisible.entity === 'employee'">
|
|
<template v-if="dialogVisible.entity === 'employee'">
|
|
|
- <EmployeeDetail :employee-id="currentEmployeeId" :enterprise-id="currentEnterpriseId" />
|
|
|
|
|
|
|
+ <EmployeeDetail :employee-id="currentEmployeeId" :enterprise-id="currentRowEnterpriseId || currentEnterpriseId" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="dialogVisible.entity === 'department'">
|
|
<template v-else-if="dialogVisible.entity === 'department'">
|
|
|
- <DepartmentDetail :department-id="currentDepartmentId" :enterprise-id="currentEnterpriseId" />
|
|
|
|
|
|
|
+ <DepartmentDetail :department-id="currentDepartmentId" :enterprise-id="currentRowEnterpriseId || currentEnterpriseId" />
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
<template v-if="dialogVisible.entity === 'employee'">
|
|
<template v-if="dialogVisible.entity === 'employee'">
|
|
|
<EmployeeForm ref="formRef" :type="dialogVisible.type" :employee-id="currentEmployeeId"
|
|
<EmployeeForm ref="formRef" :type="dialogVisible.type" :employee-id="currentEmployeeId"
|
|
|
- :enterprise-id="currentEnterpriseId" @success="handleFormSuccess" />
|
|
|
|
|
|
|
+ :enterprise-id="currentRowEnterpriseId || currentEnterpriseId" @success="handleFormSuccess" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="dialogVisible.entity === 'department'">
|
|
<template v-else-if="dialogVisible.entity === 'department'">
|
|
|
<DepartmentForm ref="deptFormRef" :type="dialogVisible.type" :department-id="currentDepartmentId"
|
|
<DepartmentForm ref="deptFormRef" :type="dialogVisible.type" :department-id="currentDepartmentId"
|
|
|
- :enterprise-id="currentEnterpriseId || enterpriseIdFromUrl.value" @success="handleDeptFormSuccess" />
|
|
|
|
|
|
|
+ :enterprise-id="currentRowEnterpriseId || currentEnterpriseId" @success="handleDeptFormSuccess" />
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -313,6 +313,7 @@ const useEnterprise = useEnterpriseStore();
|
|
|
|
|
|
|
|
const currentEmployeeId = ref<string>("");
|
|
const currentEmployeeId = ref<string>("");
|
|
|
const currentDepartmentId = ref<string>("");
|
|
const currentDepartmentId = ref<string>("");
|
|
|
|
|
+const currentRowEnterpriseId = ref<string>("");
|
|
|
const currentEnterpriseId = computed(() => enterpriseIdFromUrl.value || useEnterprise.getCurrentEnterprise?.enterprise_id || "");
|
|
const currentEnterpriseId = computed(() => enterpriseIdFromUrl.value || useEnterprise.getCurrentEnterprise?.enterprise_id || "");
|
|
|
|
|
|
|
|
// 部门搜索配置
|
|
// 部门搜索配置
|
|
@@ -463,10 +464,11 @@ const deptContentConfig = reactive<IContentConfig<DepartmentPageQuery>>({
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-function handleOpenDialog(type: "create" | "update" | "detail", employeeId: string) {
|
|
|
|
|
|
|
+function handleOpenDialog(type: "create" | "update" | "detail", employeeId: string, enterpriseId?: string) {
|
|
|
dialogVisible.type = type;
|
|
dialogVisible.type = type;
|
|
|
dialogVisible.entity = "employee";
|
|
dialogVisible.entity = "employee";
|
|
|
currentEmployeeId.value = employeeId;
|
|
currentEmployeeId.value = employeeId;
|
|
|
|
|
+ currentRowEnterpriseId.value = enterpriseId || "";
|
|
|
if (type === "create") {
|
|
if (type === "create") {
|
|
|
dialogVisible.title = "添加员工";
|
|
dialogVisible.title = "添加员工";
|
|
|
} else if (type === "update") {
|
|
} else if (type === "update") {
|