diff --git a/src/views/details/closeDoc/index.vue b/src/views/details/closeDoc/index.vue index c29245a..9303e40 100644 --- a/src/views/details/closeDoc/index.vue +++ b/src/views/details/closeDoc/index.vue @@ -6,7 +6,7 @@ import { useRouterPush } from '@/hooks/common/router'; import { useRoute } from 'vue-router'; import { formatTimestamp, downloadFileFun } from '@/utils/common'; 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 { myTasksCloseMaterialApi } from '@/service/api/myTasks'; import previewComponent from '@/components/previewFile/index.vue' @@ -221,8 +221,8 @@ const submitCloseDoc = async (type:string) => { type:type, result_status:resultStatus.value, note:acceptDesc.value, - use_date:formatTimestamp(useDate.value,'yyyy-MM-dd'), - accept_date:formatTimestamp(acceptDate.value,'yyyy-MM-dd'), + use_time:formatTimestamp(useDate.value,'yyyy-MM-dd'), + accept_time:formatTimestamp(acceptDate.value,'yyyy-MM-dd'), cost:price.value, close_docs:result, approval_flow: { @@ -247,8 +247,6 @@ const getDetail = async () => { const {data,error} = await getChangeDetailApi(currentId.value) if(!error){ currentInfo.value = data; - // ******审批流程******** - flowList.value = data?.approval_flow?.steps || []; } loading.value = false; }; @@ -378,7 +376,18 @@ const finishApprover = async () => { 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(() => { + getTemplateList(); getAllMembers(); useDate.value = new Date().getTime(); if(route.query){ @@ -760,7 +769,7 @@ onMounted(() => { :style="{ width: '450px', height: 'auto' }" :segmented="{ content: true, footer: true }" > -
+
@@ -769,7 +778,10 @@ onMounted(() => {
-