资料关闭-审批模板修改
This commit is contained in:
@@ -6,7 +6,7 @@ import { useRouterPush } from '@/hooks/common/router';
|
|||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { formatTimestamp, downloadFileFun } from '@/utils/common';
|
import { formatTimestamp, downloadFileFun } from '@/utils/common';
|
||||||
import { uploadFileApi, deleteFileApi, fileListApi } from "@/service/api/file";
|
import { uploadFileApi, deleteFileApi, fileListApi } from "@/service/api/file";
|
||||||
import { systemConfigApi, peopleListApi } from '@/service/api/system';
|
import { systemConfigApi, peopleListApi, templateListApi } from '@/service/api/system';
|
||||||
import { getChangeDetailApi } from '@/service/api/change';
|
import { getChangeDetailApi } from '@/service/api/change';
|
||||||
import { myTasksCloseMaterialApi } from '@/service/api/myTasks';
|
import { myTasksCloseMaterialApi } from '@/service/api/myTasks';
|
||||||
import previewComponent from '@/components/previewFile/index.vue'
|
import previewComponent from '@/components/previewFile/index.vue'
|
||||||
@@ -221,8 +221,8 @@ const submitCloseDoc = async (type:string) => {
|
|||||||
type:type,
|
type:type,
|
||||||
result_status:resultStatus.value,
|
result_status:resultStatus.value,
|
||||||
note:acceptDesc.value,
|
note:acceptDesc.value,
|
||||||
use_date:formatTimestamp(useDate.value,'yyyy-MM-dd'),
|
use_time:formatTimestamp(useDate.value,'yyyy-MM-dd'),
|
||||||
accept_date:formatTimestamp(acceptDate.value,'yyyy-MM-dd'),
|
accept_time:formatTimestamp(acceptDate.value,'yyyy-MM-dd'),
|
||||||
cost:price.value,
|
cost:price.value,
|
||||||
close_docs:result,
|
close_docs:result,
|
||||||
approval_flow: {
|
approval_flow: {
|
||||||
@@ -247,8 +247,6 @@ const getDetail = async () => {
|
|||||||
const {data,error} = await getChangeDetailApi(currentId.value)
|
const {data,error} = await getChangeDetailApi(currentId.value)
|
||||||
if(!error){
|
if(!error){
|
||||||
currentInfo.value = data;
|
currentInfo.value = data;
|
||||||
// ******审批流程********
|
|
||||||
flowList.value = data?.approval_flow?.steps || [];
|
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
@@ -378,7 +376,18 @@ const finishApprover = async () => {
|
|||||||
approvalDrawer.value = false;
|
approvalDrawer.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取所有模板
|
||||||
|
const getTemplateList = async () => {
|
||||||
|
const {data,error} = await templateListApi();
|
||||||
|
if(!error){
|
||||||
|
const result = data.filter((item:any) => item.type === 3);
|
||||||
|
// ******审批模板********
|
||||||
|
flowList.value = result[0]?.steps || [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getTemplateList();
|
||||||
getAllMembers();
|
getAllMembers();
|
||||||
useDate.value = new Date().getTime();
|
useDate.value = new Date().getTime();
|
||||||
if(route.query){
|
if(route.query){
|
||||||
@@ -760,7 +769,7 @@ onMounted(() => {
|
|||||||
:style="{ width: '450px', height: 'auto' }"
|
:style="{ width: '450px', height: 'auto' }"
|
||||||
:segmented="{ content: true, footer: true }"
|
:segmented="{ content: true, footer: true }"
|
||||||
>
|
>
|
||||||
<div class="max-h-60vh overflow-y-auto">
|
<div v-if="fileList.length" class="max-h-60vh overflow-y-auto">
|
||||||
<NCheckboxGroup v-model:value="checkedFiles">
|
<NCheckboxGroup v-model:value="checkedFiles">
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
<div v-for="item in fileList" :key="item.id">
|
<div v-for="item in fileList" :key="item.id">
|
||||||
@@ -769,7 +778,10 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</NCheckboxGroup>
|
</NCheckboxGroup>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<div v-else>
|
||||||
|
<NEmpty description="暂无附件"></NEmpty>
|
||||||
|
</div>
|
||||||
|
<template v-if="fileList.length" #footer>
|
||||||
<div class="flex justify-end gap-[10px]">
|
<div class="flex justify-end gap-[10px]">
|
||||||
<NButton size="small" @click="filesModal = false">取消</NButton>
|
<NButton size="small" @click="filesModal = false">取消</NButton>
|
||||||
<NButton size="small" type="primary" @click="chooseFiles">确定选择</NButton>
|
<NButton size="small" type="primary" @click="chooseFiles">确定选择</NButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user