调整
This commit is contained in:
@@ -217,6 +217,10 @@ export const onboardingTaskApi = {
|
|||||||
return taskHttp.post("revoke", params);
|
return taskHttp.post("revoke", params);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
deleteTask(id: number) {
|
||||||
|
return taskHttp.post("delete", { id });
|
||||||
|
},
|
||||||
|
|
||||||
reviewMaterial(params: {
|
reviewMaterial(params: {
|
||||||
taskMaterialId: number;
|
taskMaterialId: number;
|
||||||
reviewStatus: string;
|
reviewStatus: string;
|
||||||
@@ -390,6 +394,13 @@ export const onboardingTaskApi = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
deleteVersion(id: number) {
|
||||||
|
return moduleRequest("/biz/onboarding/contract-template/").post(
|
||||||
|
"version/delete",
|
||||||
|
{ id }
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
variablePage(params: {
|
variablePage(params: {
|
||||||
templateVersionId: number;
|
templateVersionId: number;
|
||||||
pageNum: number;
|
pageNum: number;
|
||||||
|
|||||||
@@ -174,6 +174,15 @@
|
|||||||
>
|
>
|
||||||
停用
|
停用
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
@click="removeVersion(scope.row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -565,6 +574,13 @@ async function changeVersionStatus(row: OnboardingContractVersion, status: strin
|
|||||||
ElMessage.success(`版本状态已更新为:${versionText(status)}`);
|
ElMessage.success(`版本状态已更新为:${versionText(status)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function removeVersion(row: OnboardingContractVersion) {
|
||||||
|
await ElMessageBox.confirm(`确认删除合同版本“${row.versionNo}”?此操作不可撤销。`, "删除确认", { type: "warning" });
|
||||||
|
await onboardingTaskApi.deleteVersion(row.id);
|
||||||
|
await loadVersions();
|
||||||
|
ElMessage.success("版本删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
function downloadDocx(fileId?: number) {
|
function downloadDocx(fileId?: number) {
|
||||||
if (!fileId) return ElMessage.warning("暂无 DOCX 源文件");
|
if (!fileId) return ElMessage.warning("暂无 DOCX 源文件");
|
||||||
window.open(`/api/sys/dev/file/download?id=${fileId}`, "_blank");
|
window.open(`/api/sys/dev/file/download?id=${fileId}`, "_blank");
|
||||||
|
|||||||
@@ -356,13 +356,15 @@ function toggleMaterial(materialTypeId: number, selected: boolean) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openCreate() {
|
async function openCreate() {
|
||||||
Object.assign(form, emptyForm());
|
Object.assign(form, emptyForm());
|
||||||
positions.value = [];
|
positions.value = [];
|
||||||
|
await loadBaseData();
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openEdit(row: OnboardingTemplate) {
|
async function openEdit(row: OnboardingTemplate) {
|
||||||
|
await loadBaseData();
|
||||||
const { data } = await onboardingTaskApi.onboardingTemplateDetail({ id: row.id! });
|
const { data } = await onboardingTaskApi.onboardingTemplateDetail({ id: row.id! });
|
||||||
Object.assign(form, emptyForm(), data);
|
Object.assign(form, emptyForm(), data);
|
||||||
await loadPositions(form.companyId);
|
await loadPositions(form.companyId);
|
||||||
|
|||||||
@@ -106,6 +106,16 @@
|
|||||||
>
|
>
|
||||||
撤销
|
撤销
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.taskStatus === 'revoked'"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
@click="removeTask(scope.row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
</div>
|
</div>
|
||||||
@@ -495,6 +505,14 @@
|
|||||||
>
|
>
|
||||||
归档该任务
|
归档该任务
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="detail.task.taskStatus === 'revoked'"
|
||||||
|
type="danger"
|
||||||
|
icon="Delete"
|
||||||
|
@click="removeTask(detail.task)"
|
||||||
|
>
|
||||||
|
删除该任务
|
||||||
|
</el-button>
|
||||||
<el-button @click="detailVisible = false">关闭</el-button>
|
<el-button @click="detailVisible = false">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1012,6 +1030,18 @@ async function revoke(row: OnboardingTask) {
|
|||||||
proTable.value?.refresh();
|
proTable.value?.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function removeTask(row: OnboardingTask) {
|
||||||
|
await ElMessageBox.confirm(
|
||||||
|
`确认永久删除已撤销的入职任务【${row.taskNo}】吗?此操作将清理该任务全部数据,且不可恢复。`,
|
||||||
|
"删除任务确认",
|
||||||
|
{ type: "error", confirmButtonText: "确定删除", cancelButtonText: "取消" }
|
||||||
|
);
|
||||||
|
await onboardingTaskApi.deleteTask(row.id);
|
||||||
|
ElMessage.success("入职任务已删除");
|
||||||
|
detailVisible.value = false;
|
||||||
|
proTable.value?.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(loadCompanies);
|
onMounted(loadCompanies);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user