1
This commit is contained in:
@@ -22,30 +22,30 @@
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-input v-model="formData.username" clearable disabled></el-input>
|
||||
<el-input v-model="formData.name" clearable disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="手机" prop="phone">
|
||||
<el-input v-model="formData.phone" placeholder="请输入手机" clearable></el-input>
|
||||
<el-form-item label="账号" prop="phone">
|
||||
<el-input disabled v-model="formData.username" placeholder="请输入账号" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="formData.email" placeholder="请输入邮箱" clearable></el-input>
|
||||
<el-form-item label="公司" prop="orgName">
|
||||
<el-input v-model="formData.orgName" placeholder="请输入公司" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="昵称" prop="nickname">
|
||||
<el-input v-model="formData.nickname" placeholder="请输入昵称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入姓名" clearable></el-input>
|
||||
<el-form-item label="部门" prop="deptName">
|
||||
<el-input v-model="formData.deptName" placeholder="请输入部门" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24" class="mb20">-->
|
||||
<!-- <el-form-item label="姓名" prop="name">-->
|
||||
<!-- <el-input v-model="formData.name" placeholder="请输入姓名" clearable></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleSaveUser"> 更新个人信息 </el-button>
|
||||
@@ -154,9 +154,9 @@ const formData = ref({
|
||||
userId: '',
|
||||
username: '',
|
||||
name: '',
|
||||
email: '',
|
||||
orgName: '',
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
deptName: '',
|
||||
wxDingUserid: '',
|
||||
wxCpUserid: '',
|
||||
phone: ('' as string) || undefined,
|
||||
@@ -177,9 +177,9 @@ const ruleForm = reactive({
|
||||
{ required: true, message: '手机号不能为空', trigger: 'blur' },
|
||||
{ validator: rule.validatePhone, trigger: 'blur' },
|
||||
],
|
||||
nickname: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '昵称不能为空', trigger: 'blur' }],
|
||||
email: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
|
||||
name: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
||||
deptName: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '部门不能为空', trigger: 'blur' }],
|
||||
orgName: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
|
||||
userId: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
||||
});
|
||||
const validatorPassword2 = (rule: any, value: any, callback: any) => {
|
||||
if (value !== passwordFormData.newpassword1) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
>
|
||||
<el-table-column type="index" :label="$t('projectReviewPolicy.index')" width="60" />
|
||||
|
||||
<el-table-column prop="projectType" :label="$t('projectReviewPolicy.projectType')">
|
||||
<el-table-column prop="projectType" label="投资类别">
|
||||
<template #default="{ row, $index }">
|
||||
<el-select
|
||||
v-model="row.projectType"
|
||||
@@ -30,7 +30,7 @@
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in projectTypeOptions"
|
||||
v-for="item in investmentCategoryOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -109,6 +109,7 @@ import {
|
||||
deleteProjectReviewPolicy
|
||||
} from '/@/api/config/projectReviewPolicy';
|
||||
import { debounce } from 'lodash';
|
||||
import { investmentCategoryOptions } from '/@/hooks/enums';
|
||||
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
|
||||
@@ -33,15 +33,15 @@
|
||||
<!-- Content Area -->
|
||||
<el-scrollbar class="h-[calc(100vh-20px)]">
|
||||
<step1 v-show="activeStep === 0" :groupId="paramGroupId" ref="step1Ref" />
|
||||
<step2 v-show="activeStep === 1" ref="step2Ref" />
|
||||
<step3 v-show="activeStep === 2" :nodeConfigObj="step3NodeConfig" ref="step3Ref" />
|
||||
<!-- <step2 v-show="activeStep === 1" ref="step2Ref" />-->
|
||||
<step3 v-show="activeStep === 1" :nodeConfigObj="step3NodeConfig" ref="step3Ref" />
|
||||
</el-scrollbar>
|
||||
|
||||
<!-- Validation Dialog -->
|
||||
<el-dialog v-model="validateDialogShow" :title="$t('flow.processCheck')">
|
||||
<el-steps :active="validateFlowStep" finish-status="success" simple class="mt-5">
|
||||
<el-step :title="$t('flow.basicInformation')" />
|
||||
<el-step :title="$t('flow.formDesign')" />
|
||||
<!-- <el-step :title="$t('flow.formDesign')" />-->
|
||||
<el-step :title="$t('flow.processDesign')" />
|
||||
</el-steps>
|
||||
|
||||
@@ -181,7 +181,7 @@ const checkStep1 = () => {
|
||||
validateFlowStep.value = 1;
|
||||
|
||||
setTimeout(function () {
|
||||
checkStep2();
|
||||
checkStep3();
|
||||
}, 500);
|
||||
} else {
|
||||
validatingShow.value = false;
|
||||
@@ -251,5 +251,7 @@ const submitFlow = () => {
|
||||
};
|
||||
|
||||
// Add steps data
|
||||
const steps = [{ title: 'flow.basicInformation' }, { title: 'flow.formDesign' }, { title: 'flow.processDesign' }];
|
||||
const steps = [{ title: 'flow.basicInformation' },
|
||||
// { title: 'flow.formDesign' },
|
||||
{ title: 'flow.processDesign' }];
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import selectShow from '/@/components/OrgSelector/index.vue';
|
||||
|
||||
import uploadImg from "/@/components/Upload/Image.vue"
|
||||
interface UserVo {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -28,6 +28,7 @@ const props = defineProps<{
|
||||
nodeUser: Record<string, any>;
|
||||
row: FlowNode[];
|
||||
disableSelect: boolean;
|
||||
disabled: boolean;
|
||||
}>();
|
||||
|
||||
// Create a map to store active tabs for each node
|
||||
@@ -71,7 +72,7 @@ import { Check, Plus, Refresh } from '@element-plus/icons-vue';
|
||||
<div v-if="node.userVoList?.length" class="flex flex-wrap gap-2 mb-3">
|
||||
<div v-for="(item1, index1) in node.userVoList" :key="index1" class="w-10 text-center">
|
||||
<div class="flex flex-col items-center">
|
||||
<upload-img v-model:image-url="item1.avatar" width="30px" height="30px"></upload-img>
|
||||
<upload-img v-model:image-url="item1.avatar" width="30px" height="30px" :disabled="disabled"></upload-img>
|
||||
<div class="mt-1 w-full text-xs truncate">{{ item1.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,7 +90,7 @@ import { Check, Plus, Refresh } from '@element-plus/icons-vue';
|
||||
<span class="ml-1 text-gray-500">(添加了评论) {{ item1.showTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-3 text-sm bg-gray-50 rounded">{{ item1.approveDesc }}</div>
|
||||
<div class="p-3 text-sm bg-gray-50 rounded break-words break-all whitespace-pre-wrap">{{ item1.approveDesc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ let props = defineProps({
|
||||
type: Array,
|
||||
dafault: () => [],
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const row = ref([]);
|
||||
|
||||
@@ -88,5 +92,5 @@ defineExpose({ validate, formatSelectNodeUser });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<flow-node-format :row="row" :node-user="nodeUser" :disableSelect="disableSelect" ref="flowNodeFormatRef"></flow-node-format>
|
||||
<flow-node-format :row="row" :node-user="nodeUser" :disableSelect="disableSelect" ref="flowNodeFormatRef" :disabled="disabled"></flow-node-format>
|
||||
</template>
|
||||
|
||||
@@ -59,16 +59,17 @@ const handleSubmit = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const submitFormData = await formDataRef.value.validateRefFn();
|
||||
const submitFormData:PostInvestmentEvaluation|boolean = await formDataRef.value.validateRefFn();
|
||||
// 提交表单数据
|
||||
if (submitFormData) {
|
||||
submitFormData.attachmentUrl = JSON.stringify(submitFormData.attachmentUrl);
|
||||
submitFormData.deptId = formData.value.deptId;
|
||||
await addInvestmentEvaluation(submitFormData as PostInvestmentEvaluation);
|
||||
message.success(t('common.success'));
|
||||
message.success(t('成功'));
|
||||
router.back();
|
||||
}
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || 'Submission failed');
|
||||
message.error(error.msg || '失败');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -513,6 +513,9 @@ const createEmptyDetail = (): ProjectPlanApplyFormData => ({
|
||||
submitUnitLeadershipOpinion: '',
|
||||
submitUnitMainLeadershipOpinion: '',
|
||||
planImageQuota:'',
|
||||
deptId:0,
|
||||
status:0,
|
||||
processInstanceId:'',
|
||||
},
|
||||
investmentProjects: [
|
||||
{
|
||||
|
||||
@@ -40,6 +40,8 @@ export interface PostInvestmentEvaluation {
|
||||
|
||||
/** 创建时间 */
|
||||
createTime?: string; // date-time
|
||||
/**部门id*/
|
||||
deptId?: string; // integer(int64)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -225,6 +227,8 @@ export interface ProjectInvestmentInfo {
|
||||
|
||||
/** 投资项目进度实体列表 */
|
||||
investmentProjectsProgressEntities?: InvestmentProjectProgress[];
|
||||
/**部门id*/
|
||||
deptId?: string; // integer(int64)
|
||||
}
|
||||
export interface requestData {
|
||||
page: number,
|
||||
|
||||
@@ -76,12 +76,12 @@
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item>
|
||||
<el-input v-model="formData.projectName" :placeholder="t('committeeReview.form.selectPlaceholder')" readonly>
|
||||
<template #append>
|
||||
<el-icon class="cursor-pointer interactive-icon" @click="handleSelect">
|
||||
<FolderOpened />
|
||||
</el-icon>
|
||||
</template>
|
||||
<el-input v-model="formData.projectName" :placeholder="t('committeeReview.form.inputPlaceholder')">
|
||||
<!-- <template #append>-->
|
||||
<!-- <el-icon class="cursor-pointer interactive-icon" @click="handleSelect">-->
|
||||
<!-- <FolderOpened />-->
|
||||
<!-- </el-icon>-->
|
||||
<!-- </template>-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -177,10 +177,10 @@
|
||||
@select="handleProjectSelect"
|
||||
/>
|
||||
|
||||
<LibrarySelect
|
||||
v-model="librarySelectVisible"
|
||||
@select="handleLibrarySelect"
|
||||
/>
|
||||
<!-- <LibrarySelect-->
|
||||
<!-- v-model="librarySelectVisible"-->
|
||||
<!-- @select="handleLibrarySelect"-->
|
||||
<!-- />-->
|
||||
<templet-table-comom/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -27,45 +27,41 @@
|
||||
|
||||
<!-- 标题、描述、上传附件 -->
|
||||
<el-row class="mb10">
|
||||
<el-form :model="headerForm" label-width="80px" class="w-full" :rules="headerRequiredRule"
|
||||
ref="headerFormRef">
|
||||
<el-form :model="headerForm" label-width="80px" class="w-full" :rules="headerRequiredRule" ref="headerFormRef">
|
||||
<el-form-item :label="t('planApply.headerForm.title')" prop="title">
|
||||
<el-input v-model="headerForm.title"
|
||||
:placeholder="t('planApply.headerForm.titlePlaceholder')" />
|
||||
<el-input v-model="headerForm.title" :placeholder="t('planApply.headerForm.titlePlaceholder')"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.headerForm.description')">
|
||||
<el-input v-model="headerForm.description"
|
||||
:placeholder="t('planApply.headerForm.descriptionPlaceholder')" />
|
||||
<el-input v-model="headerForm.description" :placeholder="t('planApply.headerForm.descriptionPlaceholder')"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.headerForm.attachments')">
|
||||
<UploadFile :modelValue="headerForm.attachments" :fileSize="20" type="simple" :limit="10"
|
||||
@change="uploadChange" />
|
||||
@change="uploadChange"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<ProjectPlanApplyForm v-model="formData" :rules="formDataRules" ref="formDataRef"
|
||||
:is-update="props.isUpdate" />
|
||||
<ProjectPlanApplyForm v-model="formData" :rules="formDataRules" ref="formDataRef" :is-update="props.isUpdate"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import {reactive, ref} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {useMessage} from '/@/hooks/message';
|
||||
import {
|
||||
investmentProjectsPlanAdd, investmentProjectsPlanGetById,
|
||||
investmentProjectsPlanUserDeptBelong
|
||||
} from '/@/api/investment/investmentManagement';
|
||||
import ProjectPlanApplyForm from '/@/components/investment/common/ProjectPlanApplyForm.vue';
|
||||
import type { ProjectPlanApplyFormData } from '/@/components/investment/interface/types';
|
||||
import type { FormInstance, FormRules } from 'element-plus';
|
||||
import type {ProjectPlanApplyFormData} from '/@/components/investment/interface/types';
|
||||
import type {FormInstance, FormRules} from 'element-plus';
|
||||
import UploadFile from '/@/components/Upload/index.vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { flowFn } from "/@/utils/flowFn";
|
||||
import { addFlowForm } from "/@/api/flow/flow";
|
||||
import { flowNameOptions } from "/@/hooks/enums";
|
||||
import {useRoute} from 'vue-router';
|
||||
import {flowFn} from "/@/utils/flowFn";
|
||||
import {addFlowForm} from "/@/api/flow/flow";
|
||||
import {flowNameOptions} from "/@/hooks/enums";
|
||||
|
||||
const props = defineProps({
|
||||
isUpdate: {
|
||||
@@ -73,7 +69,7 @@ const props = defineProps({
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const { t } = useI18n();
|
||||
const {t} = useI18n();
|
||||
const message = useMessage();
|
||||
const route = useRoute();
|
||||
const submitLoading = ref(false);
|
||||
@@ -82,7 +78,7 @@ const headerForm = reactive<{ title: string, description: string, attachments: a
|
||||
description: '',
|
||||
attachments: [] as any[],
|
||||
});
|
||||
const requiredRule = [{ required: true, message: `${t('该字段必填')}` }];
|
||||
const requiredRule = [{required: true, message: `${t('该字段必填')}`}];
|
||||
const headerRequiredRule = ref<FormRules<{ title: string, description: string, attachments: any[] | string }>>({
|
||||
title: requiredRule,
|
||||
});
|
||||
@@ -154,9 +150,9 @@ const formData = ref<ProjectPlanApplyFormData>({
|
||||
submitUnitLeadershipOpinion: '',
|
||||
submitUnitMainLeadershipOpinion: '',
|
||||
planImageQuota: '',
|
||||
status: 1,
|
||||
processInstanceId: '',
|
||||
deptId: 0,
|
||||
status:1,
|
||||
processInstanceId:'',
|
||||
deptId:0,
|
||||
},
|
||||
investmentProjects: [],
|
||||
});
|
||||
@@ -207,51 +203,40 @@ const formDataRules = ref<FormRules<ProjectPlanApplyFormData>>({
|
||||
'entity.financialFunds': requiredRule,
|
||||
'entity.planImageQuota': requiredRule,
|
||||
'entity.planPaymentLimit': requiredRule,
|
||||
'entity.projectApprovalFileNo': [{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (formData.value.entity.isProjectApprovalCompleted === '1' && !value) {
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, required: true, trigger: ['blur', 'change']
|
||||
}],
|
||||
'entity.projectApprovalFileInfo': [{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (formData.value.entity.isProjectApprovalCompleted === '1' && !value) {
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, required: true, trigger: ['blur', 'change']
|
||||
}],
|
||||
'entity.decisionProcedureFileNo': [{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value) {
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, required: true, trigger: ['blur', 'change']
|
||||
}],
|
||||
'entity.decisionFileInfo': [{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value) {
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, required: true, trigger: ['blur', 'change']
|
||||
}],
|
||||
'entity.projectApprovalFileNo':[{validator:(rule: any, value: any, callback: any) =>{
|
||||
if (formData.value.entity.isProjectApprovalCompleted === '1' && !value){
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
}else {
|
||||
callback();
|
||||
}
|
||||
},required:true,trigger: ['blur', 'change']}],
|
||||
'entity.projectApprovalFileInfo':[{validator:(rule: any, value: any, callback: any) =>{
|
||||
if (formData.value.entity.isProjectApprovalCompleted === '1' && !value){
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
}else {
|
||||
callback();
|
||||
}
|
||||
},required: true,trigger: ['blur', 'change']}],
|
||||
'entity.decisionProcedureFileNo':[{validator:(rule: any, value: any, callback: any) =>{
|
||||
if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value){
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
}else {
|
||||
callback();
|
||||
}
|
||||
},required:true,trigger: ['blur', 'change']}],
|
||||
'entity.decisionFileInfo':[{validator:(rule: any, value: any, callback: any) =>{
|
||||
if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value){
|
||||
callback(new Error(`${t('该字段必填')}`));
|
||||
}else {
|
||||
callback();
|
||||
}
|
||||
},required: true,trigger: ['blur', 'change']}],
|
||||
});
|
||||
const handleInitiateApproval = async () => {
|
||||
try {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) return;
|
||||
|
||||
const valid = await formDataRef.value?.validateForm().catch(() => false);
|
||||
if (!valid) return;
|
||||
|
||||
const headerValid = await headerFormRef.value?.validate();
|
||||
const valid = await formDataRef.value?.validateForm();
|
||||
if (!valid && !headerValid) return;
|
||||
submitLoading.value = true;
|
||||
let flowIdKey = ''
|
||||
const data = await investmentProjectsPlanUserDeptBelong()
|
||||
@@ -271,7 +256,7 @@ const handleInitiateApproval = async () => {
|
||||
default:
|
||||
flowIdKey = props.isUpdate ? 'VITE_FLOWID_27' : 'VITE_FLOWID_23';
|
||||
}
|
||||
const { processInstanceId } = await flowFn(flowIdKey, {
|
||||
const {processInstanceId} = await flowFn(flowIdKey, {
|
||||
paramMap: {}
|
||||
})
|
||||
const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration';
|
||||
@@ -286,7 +271,7 @@ const handleInitiateApproval = async () => {
|
||||
formData.value.entity.processInstanceId = processInstanceId;
|
||||
formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment);
|
||||
formData.value.entity.status = 1
|
||||
Object.assign(formData.value.entity, { flowType: flowNameObj.value })
|
||||
Object.assign(formData.value.entity,{flowType:flowNameObj.value})
|
||||
const params = {
|
||||
...formData.value,
|
||||
entity: {
|
||||
@@ -296,14 +281,14 @@ const handleInitiateApproval = async () => {
|
||||
}
|
||||
}
|
||||
investmentProjectsPlanAdd(params)
|
||||
.then(() => {
|
||||
submitLoading.value = false;
|
||||
message.success(t('planApply.messages.initiateApproval'));
|
||||
})
|
||||
.catch((err: any) => {
|
||||
submitLoading.value = false;
|
||||
message.error(err.msg);
|
||||
});
|
||||
.then(() => {
|
||||
submitLoading.value = false;
|
||||
message.success(t('planApply.messages.initiateApproval'));
|
||||
})
|
||||
.catch((err: any) => {
|
||||
submitLoading.value = false;
|
||||
message.error(err.msg);
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error, 'error');
|
||||
}
|
||||
@@ -311,32 +296,28 @@ const handleInitiateApproval = async () => {
|
||||
|
||||
const saveLoading = ref<boolean>(false);
|
||||
const handleSaveDraft = async () => {
|
||||
try {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) return;
|
||||
|
||||
const valid = await formDataRef.value?.validateForm().catch(() => false);
|
||||
if (!valid) return;
|
||||
|
||||
saveLoading.value = true;
|
||||
const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration';
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0]
|
||||
formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment);
|
||||
formData.value.entity.status = 1
|
||||
Object.assign(formData.value.entity, { flowType: flowNameObj.value })
|
||||
const params = {
|
||||
...formData.value,
|
||||
entity: {
|
||||
...formData.value.entity,
|
||||
attachments: formData.value.entity.attachments ? JSON.stringify(formData.value.entity.attachments) : '',
|
||||
projectPreliminaryPlanAttachment: formData.value.entity.projectPreliminaryPlanAttachment ? JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment) : ''
|
||||
},
|
||||
temporaryStorage: {
|
||||
title: headerForm.title,
|
||||
businessType: flowNameObj.value,
|
||||
}
|
||||
const headerValid = await headerFormRef.value?.validate();
|
||||
const valid = await formDataRef.value?.validateForm();
|
||||
if (!valid && !headerValid) return;
|
||||
saveLoading.value = true;
|
||||
const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration';
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0]
|
||||
formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment);
|
||||
formData.value.entity.status = 1
|
||||
Object.assign(formData.value.entity,{flowType:flowNameObj.value})
|
||||
const params = {
|
||||
...formData.value,
|
||||
entity: {
|
||||
...formData.value.entity,
|
||||
attachments: formData.value.entity.attachments ? JSON.stringify(formData.value.entity.attachments) : '',
|
||||
projectPreliminaryPlanAttachment: formData.value.entity.projectPreliminaryPlanAttachment ? JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment) : ''
|
||||
},
|
||||
temporaryStorage:{
|
||||
title: headerForm.title,
|
||||
businessType: flowNameObj.value,
|
||||
}
|
||||
investmentProjectsPlanAdd(params)
|
||||
}
|
||||
investmentProjectsPlanAdd(params)
|
||||
.then(() => {
|
||||
saveLoading.value = false;
|
||||
message.success('保存代发成功');
|
||||
@@ -345,9 +326,6 @@ const handleSaveDraft = async () => {
|
||||
saveLoading.value = false;
|
||||
message.error(err.msg);
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error, 'error');
|
||||
}
|
||||
};
|
||||
|
||||
const handleLoadTemplate = () => {
|
||||
|
||||
@@ -27,19 +27,15 @@
|
||||
|
||||
<!-- 标题、描述、上传附件 -->
|
||||
<el-row class="mb10">
|
||||
<el-form :model="headerForm" :rules="headerFormRules" ref="headerFormRef" label-width="80px"
|
||||
class="w-full">
|
||||
<el-form-item :label="t('progressReport.headerForm.title')" prop="title" required>
|
||||
<el-input v-model="headerForm.title"
|
||||
:placeholder="t('progressReport.headerForm.titlePlaceholder')" />
|
||||
<el-form :model="headerForm" label-width="80px" class="w-full">
|
||||
<el-form-item :label="t('progressReport.headerForm.title')">
|
||||
<el-input v-model="headerForm.title" :placeholder="t('progressReport.headerForm.titlePlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('progressReport.headerForm.description')">
|
||||
<el-input v-model="headerForm.description"
|
||||
:placeholder="t('progressReport.headerForm.descriptionPlaceholder')" />
|
||||
<el-input v-model="headerForm.description" :placeholder="t('progressReport.headerForm.descriptionPlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('progressReport.headerForm.attachments')">
|
||||
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20"
|
||||
type="simple" :limit="10" />
|
||||
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" type="simple" :limit="10" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
@@ -50,7 +46,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import ProjectProgressReportForm from '/@/components/investment/common/ProjectProgressReportForm.vue';
|
||||
@@ -61,18 +57,14 @@ import {
|
||||
getInvestmentProjectsProgressUserDeptBelongAPI
|
||||
} from '/@/api/investment/progressOfInvestmentProjects';
|
||||
import UploadFile from "/@/components/Upload/index.vue";
|
||||
import { flowFn } from "/@/utils/flowFn";
|
||||
import { addFlowForm } from "/@/api/flow/flow";
|
||||
import { flowNameOptions } from "/@/hooks/enums";
|
||||
import {flowFn} from "/@/utils/flowFn";
|
||||
import {addFlowForm} from "/@/api/flow/flow";
|
||||
import {flowNameOptions} from "/@/hooks/enums";
|
||||
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
|
||||
const headerFormRef = ref<any>();
|
||||
const headerFormRules = {
|
||||
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }]
|
||||
};
|
||||
const headerForm = reactive<{ title: string; description: string; attachments: any[] | string }>({
|
||||
const headerForm = reactive<{ title: string; description: string; attachments: any[] | string}>({
|
||||
title: '',
|
||||
description: '',
|
||||
attachments: [],
|
||||
@@ -111,7 +103,6 @@ const formData = reactive<InvestmentProjectProgress>({
|
||||
delFlag: '',
|
||||
processInstanceId: '',
|
||||
status: '',
|
||||
deptId: '',
|
||||
});
|
||||
// 必填规则
|
||||
const requiredRule = [{ required: true, message: `${t('该字段必填')}` }];
|
||||
@@ -127,10 +118,6 @@ const formDataRef = ref<FormRules<InvestmentProjectProgress>>({
|
||||
const handleInitiateApproval = async () => {
|
||||
// message.info(t('progressReport.messages.initiateApproval'));
|
||||
try {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
const valid = await formRef.value?.validate();
|
||||
submitLoading.value = true;
|
||||
let flowIdKey = '';
|
||||
@@ -152,14 +139,10 @@ const handleInitiateApproval = async () => {
|
||||
flowIdKey = 'VITE_FLOWID_31';
|
||||
}
|
||||
headerForm.attachments = JSON.stringify(headerForm.attachments);
|
||||
const flowResult = await flowFn(flowIdKey, {
|
||||
paramMap: {
|
||||
const {processInstanceId} = await flowFn(flowIdKey,{
|
||||
paramMap:{
|
||||
}
|
||||
})
|
||||
if (flowResult instanceof Error) {
|
||||
throw flowResult;
|
||||
}
|
||||
const { processInstanceId } = flowResult;
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'projectProgressDeclaration')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
@@ -171,9 +154,10 @@ const handleInitiateApproval = async () => {
|
||||
valid.processInstanceId = processInstanceId;
|
||||
valid.supportingDocuments = JSON.stringify(valid.supportingDocuments);
|
||||
valid.status = 1;
|
||||
await addInvestmentProjectsProgressAPI(valid).then(() => {
|
||||
valid.flowType = flowNameObj.value
|
||||
await addInvestmentProjectsProgressAPI(valid).then(()=>{
|
||||
message.success(t('common.success'));
|
||||
}).finally(() => {
|
||||
}).finally(()=>{
|
||||
submitLoading.value = false;
|
||||
}).catch((err: any) => {
|
||||
submitLoading.value = false;
|
||||
@@ -199,12 +183,12 @@ const handleSaveTemplate = () => {
|
||||
const handleViewWorkflow = () => {
|
||||
message.info(t('progressReport.messages.viewWorkflow'));
|
||||
};
|
||||
const uploadChange = (_: any, data: any[]) => {
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) {
|
||||
const uploadChange = (_:any,data:any[]) =>{
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
|
||||
headerForm.attachments = [];
|
||||
return;
|
||||
}
|
||||
headerForm.attachments = data.map((item: any) => {
|
||||
headerForm.attachments = data.map((item:any) => {
|
||||
return {
|
||||
name: item.name,
|
||||
url: item.url
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!-- 进度申报审核-->
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue';
|
||||
import {onMounted} from 'vue';
|
||||
import ApprovalAction from '/@//components/workbench/common/ApprovalAction.vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import {useRoute} from 'vue-router';
|
||||
import ProjectProgressReportFormDeatils from '/@/components/investment/common/ProjectProgressReportFormDeatils.vue';
|
||||
import {
|
||||
getInvestmentProjectsProgressGetByProcessInstanceIdAPI,
|
||||
@@ -15,13 +15,13 @@ const taskId = ref<string>('0');
|
||||
const status = ref<'pending' | 'reviewed' | 'withdrawable'>('pending');
|
||||
const projectId = ref<string>('0');
|
||||
const detailFormData = ref<InvestmentProjectProgress>({} as InvestmentProjectProgress);
|
||||
const getProjectDetail = (id: string) => {
|
||||
getInvestmentProjectsProgressGetByProcessInstanceIdAPI(id).then(res => {
|
||||
const getProjectDetail = (id:string) =>{
|
||||
getInvestmentProjectsProgressGetByProcessInstanceIdAPI(id).then(res =>{
|
||||
detailFormData.value = res.data
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
if (route.query.processInstanceId) {
|
||||
onMounted(() =>{
|
||||
if (route.query.processInstanceId){
|
||||
taskId.value = <string>route.query.tId;
|
||||
projectId.value = <string>route.query.processInstanceId;
|
||||
getProjectDetail(projectId.value);
|
||||
@@ -33,12 +33,11 @@ onMounted(() => {
|
||||
<el-card>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="isPreview ? 24 : 18">
|
||||
<FlowFormView :process-instance-id="projectId" />
|
||||
<ProjectProgressReportFormDeatils v-model="detailFormData" title="投资项目进度审核" />
|
||||
<FlowFormView :process-instance-id="projectId"/>
|
||||
<ProjectProgressReportFormDeatils v-model="detailFormData" title="投资项目进度审核"/>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="!isPreview">
|
||||
<ApprovalAction :status="status" :approval-records="[]" :task-id="taskId"
|
||||
:process-instance-id="projectId" />
|
||||
<ApprovalAction :status="status" :approval-records="[]" :task-id="taskId" :process-instance-id="projectId"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
</el-row>
|
||||
|
||||
<el-row class="mb10">
|
||||
<el-form :model="headerForm" :rules="headerFormRules" ref="headerFormRef" label-width="80px"
|
||||
class="w-full">
|
||||
<el-form-item :label="t('projectExitFeedback.headerForm.title')" prop="title" required>
|
||||
<el-form :model="headerForm" label-width="80px" class="w-full">
|
||||
<el-form-item :label="t('projectExitFeedback.headerForm.title')">
|
||||
<el-input v-model="headerForm.title"
|
||||
:placeholder="t('projectExitFeedback.headerForm.titlePlaceholder')" />
|
||||
</el-form-item>
|
||||
@@ -37,8 +36,7 @@
|
||||
:placeholder="t('projectExitFeedback.headerForm.descriptionPlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('projectExitFeedback.headerForm.attachments')">
|
||||
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20"
|
||||
type="simple" :limit="10" />
|
||||
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" type="simple" :limit="10" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
@@ -49,25 +47,20 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import ProjectExitFeedbackForm from '/@/components/investment/common/ProjectExitFeedbackForm.vue';
|
||||
import { ProjectExitFeedback } from '/@/views/invMid/projectExitFeedback/interface/type';
|
||||
import { addProjectExitPlanFeedback } from "/@/api/investment/projectExitPlan";
|
||||
import { ProjectTask } from "/@/views/invMid/projectExitPlan/interface/type";
|
||||
import {addProjectExitPlanFeedback} from "/@/api/investment/projectExitPlan";
|
||||
import UploadFile from "/@/components/Upload/index.vue";
|
||||
import { flowFn } from "/@/utils/flowFn";
|
||||
import { addFlowForm } from "/@/api/flow/flow";
|
||||
import { flowNameOptions } from "/@/hooks/enums";
|
||||
import {flowFn} from "/@/utils/flowFn";
|
||||
import {addFlowForm} from "/@/api/flow/flow";
|
||||
import {flowNameOptions} from "/@/hooks/enums";
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
|
||||
const headerFormRef = ref<any>();
|
||||
const headerFormRules = {
|
||||
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }]
|
||||
};
|
||||
const headerForm = reactive<{ title: string, description: string, attachments: any[] | string }>({
|
||||
const headerForm = reactive<{ title: string, description: string, attachments: any[] | string}>({
|
||||
title: '',
|
||||
description: '',
|
||||
attachments: [] as any[],
|
||||
@@ -75,57 +68,47 @@ const headerForm = reactive<{ title: string, description: string, attachments: a
|
||||
const formData = ref<ProjectExitFeedback>({
|
||||
exitTime: '',
|
||||
exitExecutor: '',
|
||||
exitRemark: '',
|
||||
exitAttachment: '',
|
||||
deptId: '',
|
||||
exitRemark: '',
|
||||
exitAttachment: '',
|
||||
});
|
||||
const submitLoading = ref(false);
|
||||
const handleInitiateApproval = async () => {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
if (!formData.value.projectId) {
|
||||
message.error('项目名称必填');
|
||||
return
|
||||
}
|
||||
submitLoading.value = true;
|
||||
const attachments = JSON.stringify(headerForm.attachments);
|
||||
const flowResult = await flowFn('VITE_FLOWID_36', {
|
||||
paramMap: {
|
||||
// miu0ilc1tfa61_assignee_select: [
|
||||
// {
|
||||
// "type": "user",
|
||||
// "id": "1",
|
||||
// "name": "admin",
|
||||
// "avatar": "/admin/sys-file/local/2a14ae08150e483c93e12ac8934173e2.png"
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
})
|
||||
if (flowResult instanceof Error) {
|
||||
submitLoading.value = false;
|
||||
throw flowResult;
|
||||
}
|
||||
const { processInstanceId } = flowResult;
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitFeedback')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments,
|
||||
processInstanceId,
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
formData.value.processInstanceId = processInstanceId;
|
||||
const exitAttachment = JSON.stringify(formData.value.exitAttachment);
|
||||
const params = { ...formData.value, exitAttachment } as ProjectTask;
|
||||
addProjectExitPlanFeedback(params).then(() => {
|
||||
message.success(t('common.success'));
|
||||
}).catch((err: any) => {
|
||||
message.error(err.msg);
|
||||
}).finally(() => {
|
||||
submitLoading.value = false;
|
||||
});
|
||||
if (!formData.value.projectId){
|
||||
message.error('项目名称必填');
|
||||
return
|
||||
}
|
||||
submitLoading.value = true;
|
||||
const attachments = JSON.stringify(headerForm.attachments);
|
||||
const {processInstanceId} = await flowFn('VITE_FLOWID_36',{
|
||||
paramMap:{
|
||||
// miu0ilc1tfa61_assignee_select: [
|
||||
// {
|
||||
// "type": "user",
|
||||
// "id": "1",
|
||||
// "name": "admin",
|
||||
// "avatar": "/admin/sys-file/local/2a14ae08150e483c93e12ac8934173e2.png"
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
})
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitFeedback')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments,
|
||||
processInstanceId,
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
formData.value.processInstanceId = processInstanceId;
|
||||
const exitAttachment = JSON.stringify(formData.value.exitAttachment);
|
||||
const params = { ...formData.value, exitAttachment }
|
||||
addProjectExitPlanFeedback(params).then(()=>{
|
||||
message.success(t('common.success'));
|
||||
}).catch((err: any) => {
|
||||
message.error(err.msg);
|
||||
}).finally(() => {
|
||||
submitLoading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const handleSaveDraft = () => {
|
||||
@@ -143,17 +126,17 @@ const handleSaveTemplate = () => {
|
||||
const handleViewWorkflow = () => {
|
||||
message.info(t('projectExitFeedback.messages.viewWorkflow'));
|
||||
};
|
||||
const uploadChange = (_: any, data: any[]) => {
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) {
|
||||
headerForm.attachments = [];
|
||||
return;
|
||||
}
|
||||
headerForm.attachments = data.map((item: any) => {
|
||||
return {
|
||||
name: item.name,
|
||||
url: item.url
|
||||
}
|
||||
})
|
||||
const uploadChange = (_:any,data:any[]) =>{
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
|
||||
headerForm.attachments = [];
|
||||
return;
|
||||
}
|
||||
headerForm.attachments = data.map((item:any) => {
|
||||
return {
|
||||
name: item.name,
|
||||
url: item.url
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -34,12 +34,10 @@ export interface ProjectExitFeedback {
|
||||
|
||||
/** 状态 */
|
||||
status?: string;
|
||||
/** 项目id */
|
||||
projectId?: number;
|
||||
/** 项目名称*/
|
||||
projectName?: string;
|
||||
/** 部门id */
|
||||
deptId: string;
|
||||
/** 项目id */
|
||||
projectId?:number;
|
||||
/** 项目名称*/
|
||||
projectName?:string;
|
||||
}
|
||||
|
||||
export interface paramsDataProjectExitPlanFeedback {
|
||||
@@ -50,31 +48,31 @@ export interface paramsDataProjectExitPlanFeedback {
|
||||
exitRemark: string
|
||||
}
|
||||
export interface projectExitPlanFeedbackItem {
|
||||
id?: number,
|
||||
projectName?: string,
|
||||
projectId?: number,
|
||||
exitRecommendation?: string,
|
||||
exitMethod?: string,
|
||||
executionTask?: string,
|
||||
taskDescription?: string,
|
||||
executor?: string,
|
||||
taskStartDate?: string,
|
||||
taskEndDate?: string,
|
||||
createBy?: string,
|
||||
createTime?: string,
|
||||
updateBy?: string,
|
||||
updateTime?: string,
|
||||
delFlag?: string,
|
||||
processInstanceId?: string,
|
||||
status?: string,
|
||||
reviewNotes?: string,
|
||||
applicationDept?: string
|
||||
id?: number,
|
||||
projectName?: string,
|
||||
projectId?: number,
|
||||
exitRecommendation?: string,
|
||||
exitMethod?: string,
|
||||
executionTask?: string,
|
||||
taskDescription?: string,
|
||||
executor?: string,
|
||||
taskStartDate?: string,
|
||||
taskEndDate?: string,
|
||||
createBy?: string,
|
||||
createTime?: string,
|
||||
updateBy?: string,
|
||||
updateTime?: string,
|
||||
delFlag?: string,
|
||||
processInstanceId?: string,
|
||||
status?: string,
|
||||
reviewNotes?: string,
|
||||
applicationDept?: string
|
||||
}
|
||||
|
||||
export interface feedbackResponseData {
|
||||
total: number,
|
||||
records: projectExitPlanFeedbackItem[];
|
||||
current: number,
|
||||
size: number,
|
||||
pages: number,
|
||||
total: number,
|
||||
records: projectExitPlanFeedbackItem[];
|
||||
current: number,
|
||||
size: number,
|
||||
pages: number,
|
||||
}
|
||||
|
||||
@@ -1,55 +1,53 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row class="mb10">
|
||||
<div class="form-header-actions" style="width: 100%;">
|
||||
<div>
|
||||
<el-button type="primary" icon="Check" :loading="submitLoading" @click="handleInitiateApproval">
|
||||
{{ t('projectExitPlan.actions.initiateApproval') }}
|
||||
</el-button>
|
||||
<el-button icon="Document" @click="handleSaveDraft">
|
||||
{{ t('projectExitPlan.actions.saveDraft') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate">
|
||||
{{ t('projectExitPlan.actions.loadTemplate') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate">
|
||||
{{ t('projectExitPlan.actions.saveTemplate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="margin-left:auto;">
|
||||
<el-button icon="View" @click="handleViewWorkflow">
|
||||
{{ t('projectExitPlan.actions.viewWorkflow') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row class="mb10">
|
||||
<div class="form-header-actions" style="width: 100%;">
|
||||
<div>
|
||||
<el-button type="primary" icon="Check" :loading="submitLoading" @click="handleInitiateApproval">
|
||||
{{ t('projectExitPlan.actions.initiateApproval') }}
|
||||
</el-button>
|
||||
<el-button icon="Document" @click="handleSaveDraft">
|
||||
{{ t('projectExitPlan.actions.saveDraft') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate">
|
||||
{{ t('projectExitPlan.actions.loadTemplate') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate">
|
||||
{{ t('projectExitPlan.actions.saveTemplate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="margin-left:auto;">
|
||||
<el-button icon="View" @click="handleViewWorkflow">
|
||||
{{ t('projectExitPlan.actions.viewWorkflow') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mb10">
|
||||
<el-form :model="headerForm" :rules="headerFormRules" ref="headerFormRef" label-width="80px"
|
||||
class="w-full">
|
||||
<el-form-item :label="t('projectExitPlan.headerForm.title')" prop="title" required>
|
||||
<el-input v-model="headerForm.title"
|
||||
:placeholder="t('projectExitPlan.headerForm.titlePlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('projectExitPlan.headerForm.description')">
|
||||
<el-input v-model="headerForm.description"
|
||||
:placeholder="t('projectExitPlan.headerForm.descriptionPlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('projectExitPlan.headerForm.attachments')">
|
||||
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20"
|
||||
type="simple" :limit="10" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row class="mb10">
|
||||
<el-form :model="headerForm" label-width="80px" class="w-full">
|
||||
<el-form-item :label="t('projectExitPlan.headerForm.title')">
|
||||
<el-input v-model="headerForm.title"
|
||||
:placeholder="t('projectExitPlan.headerForm.titlePlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('projectExitPlan.headerForm.description')">
|
||||
<el-input v-model="headerForm.description"
|
||||
:placeholder="t('projectExitPlan.headerForm.descriptionPlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('projectExitPlan.headerForm.attachments')">
|
||||
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" type="simple" :limit="10" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<ProjectExitPlanForm v-model="formData" :rules="rules" ref="formDataRef" />
|
||||
</div>
|
||||
</div>
|
||||
<ProjectExitPlanForm v-model="formData" :rules="rules" ref="formDataRef"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
|
||||
@@ -58,33 +56,28 @@ import ProjectExitPlanForm from '/@/components/investment/common/ProjectExitPlan
|
||||
import { FormRules } from 'element-plus';
|
||||
import { addProjectExitPlan } from '/@/api/investment/projectExitPlan';
|
||||
import UploadFile from "/@/components/Upload/index.vue";
|
||||
import { flowFn } from "/@/utils/flowFn";
|
||||
import { addFlowForm } from "/@/api/flow/flow";
|
||||
import { flowNameOptions } from "/@/hooks/enums";
|
||||
import {flowFn} from "/@/utils/flowFn";
|
||||
import {addFlowForm} from "/@/api/flow/flow";
|
||||
import {flowNameOptions} from "/@/hooks/enums";
|
||||
const formDataRef = ref<HTMLFormElement | null>()
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
|
||||
const headerFormRef = ref<any>();
|
||||
const headerFormRules = {
|
||||
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }]
|
||||
};
|
||||
const headerForm = reactive<{ title: string, description: string, attachments: any[] | string }>({
|
||||
title: '',
|
||||
description: '',
|
||||
attachments: [] as any[],
|
||||
const headerForm = reactive<{ title: string, description: string, attachments: any[] | string}>({
|
||||
title: '',
|
||||
description: '',
|
||||
attachments: [] as any[],
|
||||
});
|
||||
|
||||
const formData = ref<ProjectTask>({
|
||||
id: undefined,
|
||||
projectName: '',
|
||||
exitRecommendation: '',
|
||||
executionTask: '',
|
||||
taskDescription: '',
|
||||
executor: '',
|
||||
taskStartDate: new Date().toISOString().substring(0, 10),
|
||||
taskEndDate: new Date().toISOString().substring(0, 10),
|
||||
deptId: ''
|
||||
executionTask:'',
|
||||
taskDescription:'',
|
||||
executor:'',
|
||||
taskStartDate:new Date().toISOString().substring(0,10),
|
||||
taskEndDate:new Date().toISOString().substring(0,10),
|
||||
});
|
||||
const requiredRule = [{ required: true, message: `${t('该字段必填')}` }]
|
||||
const rules = reactive<FormRules<ProjectTask>>({
|
||||
@@ -94,17 +87,13 @@ const rules = reactive<FormRules<ProjectTask>>({
|
||||
const submitLoading = ref<boolean>(false);
|
||||
const handleInitiateApproval = async () => {
|
||||
try {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
const valid = await formDataRef?.value?.validateRef();
|
||||
const valid = await formDataRef?.value?.validateRef();
|
||||
if (!valid) return;
|
||||
submitLoading.value = true;
|
||||
const folowIdKey = 'VITE_FLOWID_35'
|
||||
const attachments = JSON.stringify(headerForm.attachments);
|
||||
const flowResult = await flowFn(folowIdKey, {
|
||||
paramMap: {
|
||||
const {processInstanceId} = await flowFn(folowIdKey,{
|
||||
paramMap:{
|
||||
// miu0ilc1tfa61_assignee_select: [
|
||||
// {
|
||||
// "type": "user",
|
||||
@@ -115,11 +104,6 @@ const handleInitiateApproval = async () => {
|
||||
// ]
|
||||
}
|
||||
})
|
||||
if (flowResult instanceof Error) {
|
||||
submitLoading.value = false;
|
||||
throw flowResult;
|
||||
}
|
||||
const { processInstanceId } = flowResult;
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitPlan')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
@@ -129,14 +113,14 @@ const handleInitiateApproval = async () => {
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
formData.value.processInstanceId = processInstanceId;
|
||||
addProjectExitPlan(formData.value).then((res: any) => {
|
||||
addProjectExitPlan(formData.value).then((res:any) => {
|
||||
useMessage().success(t('common.success'));
|
||||
}).catch((err: any) => {
|
||||
}).catch((err:any) => {
|
||||
useMessage().error(err.msg);
|
||||
}).finally(() => {
|
||||
submitLoading.value = false;
|
||||
});
|
||||
} catch (e) {
|
||||
}catch (e) {
|
||||
console.log(e);
|
||||
submitLoading.value = false;
|
||||
}
|
||||
@@ -144,26 +128,26 @@ const handleInitiateApproval = async () => {
|
||||
};
|
||||
|
||||
const handleSaveDraft = () => {
|
||||
message.info(t('projectExitPlan.messages.saveDraft'));
|
||||
message.info(t('projectExitPlan.messages.saveDraft'));
|
||||
};
|
||||
|
||||
const handleLoadTemplate = () => {
|
||||
message.info(t('projectExitPlan.messages.loadTemplate'));
|
||||
message.info(t('projectExitPlan.messages.loadTemplate'));
|
||||
};
|
||||
|
||||
const handleSaveTemplate = () => {
|
||||
message.info(t('projectExitPlan.messages.saveTemplate'));
|
||||
message.info(t('projectExitPlan.messages.saveTemplate'));
|
||||
};
|
||||
|
||||
const handleViewWorkflow = () => {
|
||||
message.info(t('projectExitPlan.messages.viewWorkflow'));
|
||||
message.info(t('projectExitPlan.messages.viewWorkflow'));
|
||||
};
|
||||
const uploadChange = (_: any, data: any[]) => {
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) {
|
||||
const uploadChange = (_:any,data:any[]) =>{
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
|
||||
headerForm.attachments = [];
|
||||
return;
|
||||
}
|
||||
headerForm.attachments = data.map((item: any) => {
|
||||
headerForm.attachments = data.map((item:any) => {
|
||||
return {
|
||||
name: item.name,
|
||||
url: item.url
|
||||
@@ -174,13 +158,13 @@ const uploadChange = (_: any, data: any[]) => {
|
||||
|
||||
<style scoped>
|
||||
.layout-container .layout-padding {
|
||||
height: auto;
|
||||
overflow: auto;
|
||||
height: auto;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.form-header-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -774,7 +774,7 @@ onMounted(() => {
|
||||
const projectMainEntityOptions = ref([]);
|
||||
const getDeptTree = async () => {
|
||||
const res = await selectTreeCompanyTree();
|
||||
projectMainEntityOptions.value = res.data || [];
|
||||
projectMainEntityOptions.value = res.data?.filter((item:any) => item.id !== '-7283586818552608318');
|
||||
};
|
||||
getDeptTree()
|
||||
watch(editId, (id) => {
|
||||
|
||||
@@ -149,16 +149,6 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="isUpdate" prop="expertStatus" min-width="120" :label="t('expertApply.table.expertStatus')">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.expertStatus" :placeholder="t('expertApply.table.selectPlaceholder')"
|
||||
style="width: 100%;">
|
||||
<el-option :label="t('expertApply.expertStatusOptions.normal')" value="normal" />
|
||||
<el-option :label="t('expertApply.expertStatusOptions.invalid')" value="invalid" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 选择专家弹窗 -->
|
||||
<SelectExpertDialog v-model:visible="expertDialogVisible" @confirm="onExpertSelected" />
|
||||
@@ -230,7 +220,6 @@ const createEmptyExpert = () => ({
|
||||
attachments: '',
|
||||
evidences: '',
|
||||
level: '',
|
||||
expertStatus: 'normal',
|
||||
externalStatus: '',
|
||||
attachmentUrl: '',
|
||||
testimonyMaterials: '',
|
||||
@@ -267,7 +256,6 @@ const onExpertSelected = (row: any) => {
|
||||
target.professionalTitle = row?.professionalTitle ?? target.professionalTitle;
|
||||
target.workUnit = row?.workUnit ?? target.workUnit;
|
||||
target.level = row?.level ?? target.level;
|
||||
target.expertStatus = row?.expertStatus ?? target.expertStatus;
|
||||
target.attachments = row?.attachmentUrl ? JSON.parse(row.attachmentUrl) : []
|
||||
target.evidences = row?.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : []
|
||||
};
|
||||
@@ -312,7 +300,6 @@ const toSubmitExpert = (expert: ReturnType<typeof createEmptyExpert>) => ({
|
||||
attachmentUrl: JSON.stringify(expert.attachments),
|
||||
testimonyMaterials: JSON.stringify(expert.evidences),
|
||||
level: expert.level || '',
|
||||
expertStatus: expert.expertStatus || 'normal',
|
||||
externalStatus: expert.externalStatus || '',
|
||||
createBy: expert.createBy || '',
|
||||
createTime: expert.createTime || '',
|
||||
@@ -460,7 +447,6 @@ watch(()=>tempId.value,()=>{
|
||||
professionalTitle: item.professionalTitle,
|
||||
workUnit: item.workUnit,
|
||||
level: item.level,
|
||||
expertStatus: item.expertStatus || 'normal',
|
||||
attachments: item.attachmentUrl ? JSON.parse(item.attachmentUrl) : [],
|
||||
evidences: item.testimonyMaterials ? JSON.parse(item.testimonyMaterials) : []
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<el-table-column :label="t('expertLibrary.table.level')" prop="level" min-width="100"
|
||||
show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span>{{ levelLabel(row.level) }}</span>
|
||||
<span>{{ level.find((item:any) => item.value === row.level)?.label || '--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('expertLibrary.table.status')" prop="externalStatus" min-width="120"
|
||||
@@ -60,6 +60,7 @@ import ExpertDetailDialog from '/@/components/investment/ExpertDetailDialog.vue'
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { dayjs } from 'element-plus';
|
||||
import FlowFormView from '/@/components/workbench/common/FlowFormView.vue';
|
||||
import {level} from "/@/hooks/enums";
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute()
|
||||
|
||||
@@ -179,46 +179,16 @@ const detailMeta = reactive({
|
||||
date: new Date().toISOString().slice(0, 10),
|
||||
});
|
||||
const handleView = (row: any) => {
|
||||
// 解析附件,支持对象数组和字符串数组两种格式
|
||||
let attachmentUrl: any[] = [];
|
||||
try {
|
||||
attachmentUrl = row.attachmentUrl ? JSON.parse(row.attachmentUrl) : [];
|
||||
} catch {
|
||||
attachmentUrl = [];
|
||||
}
|
||||
const attachments = attachmentUrl.map((item: any) => {
|
||||
// 如果已经是对象格式 { name, url },直接使用
|
||||
if (typeof item === 'object' && item !== null) {
|
||||
return { url: item.url || '', name: item.name || '' };
|
||||
}
|
||||
// 如果是字符串格式,尝试从 URL 中提取文件名
|
||||
if (typeof item === 'string') {
|
||||
const fileName = item.split('fileName=')[1] || item.split('/').pop() || '附件';
|
||||
return { url: item, name: fileName };
|
||||
}
|
||||
return { url: '', name: '' };
|
||||
});
|
||||
|
||||
// 解析佐证材料,支持对象数组和字符串数组两种格式
|
||||
let testimonyMaterials: any[] = [];
|
||||
try {
|
||||
testimonyMaterials = row.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : [];
|
||||
} catch {
|
||||
testimonyMaterials = [];
|
||||
}
|
||||
const evidences = testimonyMaterials.map((item: any) => {
|
||||
// 如果已经是对象格式 { name, url },直接使用
|
||||
if (typeof item === 'object' && item !== null) {
|
||||
return { url: item.url || '', name: item.name || '' };
|
||||
}
|
||||
// 如果是字符串格式,尝试从 URL 中提取文件名
|
||||
if (typeof item === 'string') {
|
||||
const fileName = item.split('fileName=')[1] || item.split('/').pop() || '佐证材料';
|
||||
return { url: item, name: fileName };
|
||||
}
|
||||
return { url: '', name: '' };
|
||||
});
|
||||
|
||||
// 转换为详情组件需要的格式
|
||||
const attachmentUrl = row.attachmentUrl ? JSON.parse(row.attachmentUrl) : []
|
||||
const attachments = attachmentUrl.map((url: string) => {
|
||||
return { url, name: url.split('fileName=')[1] }
|
||||
})
|
||||
// 转换为详情组件需要的格式
|
||||
const testimonyMaterials = row.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : []
|
||||
const evidences = testimonyMaterials.map((url: string) => {
|
||||
return { url, name: url.split('fileName=')[1] }
|
||||
})
|
||||
currentDetail.value = { ...row,
|
||||
attachments,
|
||||
evidences,
|
||||
|
||||
@@ -109,14 +109,9 @@ export default {
|
||||
attachments: 'Attachments',
|
||||
evidences: 'Supporting Materials',
|
||||
level: 'Level',
|
||||
expertStatus: 'Expert Status',
|
||||
inputPlaceholder: 'Please enter',
|
||||
selectPlaceholder: 'Please select',
|
||||
},
|
||||
expertStatusOptions: {
|
||||
normal: 'Normal',
|
||||
invalid: 'Invalid',
|
||||
},
|
||||
},
|
||||
expertLibrary: {
|
||||
title: 'Expert Repository',
|
||||
|
||||
@@ -109,14 +109,9 @@ export default {
|
||||
attachments: '附件',
|
||||
evidences: '佐证材料',
|
||||
level: '级别',
|
||||
expertStatus: '专家状态',
|
||||
inputPlaceholder: '请输入',
|
||||
selectPlaceholder: '请选择',
|
||||
},
|
||||
expertStatusOptions: {
|
||||
normal: '正常',
|
||||
invalid: '作废',
|
||||
},
|
||||
},
|
||||
expertLibrary: {
|
||||
title: '专家智库',
|
||||
|
||||
@@ -138,7 +138,7 @@ const instructionFields = computed<Array<{ key: InstructionFieldKey; label: stri
|
||||
|
||||
const basicInfoFields = computed<Array<{ key: BasicFieldKey; label: string }>>(() => [
|
||||
{key: 'groupBelonging', label: t('mixedRegister.basicFields.groupName')},
|
||||
{key: 'projectYear', label: t('mixedRegister.basicFields.year')},
|
||||
{key: 'projectYear', label: t('mixedRegister.basicFields.year'),type:'number',length:4},
|
||||
{key: 'projectName', label: t('mixedRegister.basicFields.projectName')},
|
||||
{key: 'implementEnterprise', label: t('mixedRegister.basicFields.companyFullName')},
|
||||
{key: 'enterpriseCreditCode', label: t('mixedRegister.basicFields.creditCode')},
|
||||
|
||||
@@ -57,11 +57,11 @@
|
||||
min-width="180" />
|
||||
<el-table-column prop="status" :label="t('workbenchPage.pending.table.status')" min-width="140">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.status == 1" type="primary">待审批</el-tag>
|
||||
<el-tag v-if="scope.row.status == 1" type="primary">进行中</el-tag>
|
||||
<el-tag v-else type="success">已结束</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('workbenchPage.pending.table.actions')" width="120" fixed="right">
|
||||
<el-table-column label="查看" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="handleView(row)">
|
||||
{{ t('workbenchPage.pending.actions.view') }}
|
||||
@@ -75,6 +75,27 @@
|
||||
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
<!-- <el-dialog v-model="visible" width="80%" title="流程节点">-->
|
||||
<!-- <flow-node-format :selectUserNodeId="flowUserData.root.map(item => item.id)" :flow-id="flowIdCon" ref="flowNodeFormatRef"></flow-node-format>-->
|
||||
<!-- </el-dialog>-->
|
||||
<!-- v-if="visible" 确保关闭时销毁组件 -->
|
||||
<el-drawer v-model="visible" v-if="visible" direction="rtl" size="600px">
|
||||
<template #header>
|
||||
<h3>{{ currentData?.name }}</h3>
|
||||
</template>
|
||||
<template #default>
|
||||
<el-card class="box-card">
|
||||
<FormCreate :rule="rule" v-model="formData" v-model:api="fApi" />
|
||||
</el-card>
|
||||
<flow-node-format
|
||||
:disableSelect="true"
|
||||
:processInstanceId="currentData.processInstanceId"
|
||||
:flow-id="currentData.flowId"
|
||||
ref="flowNodeFormatRef"
|
||||
:disabled="true"
|
||||
></flow-node-format>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -86,13 +107,15 @@ import { queryMineStarted } from '/@/api/flow/task';
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { flowNameOptions } from '/@/hooks/enums';
|
||||
import { getProcessInfoByIdAPI } from '/@/api/workbench/miOwLibr/ownershipCreate';
|
||||
import FlowNodeFormat from "/@/views/flow/form/tools/FlowNodeFormatData.vue";
|
||||
import FormCreate from "/@/views/flow/workflow/components/FormCreate.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
const loading = ref(false);
|
||||
const stores = useUserInfo();
|
||||
const { userInfos } = storeToRefs(stores);
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
pageList: queryMineStarted,
|
||||
queryForm: {
|
||||
@@ -117,9 +140,18 @@ const handleSearch = () => {
|
||||
state.queryForm.title = keyword.value
|
||||
getDataList(true)
|
||||
};
|
||||
|
||||
const currentData = ref<any>(null);
|
||||
const visible = ref(false);
|
||||
/**查看流程*/
|
||||
const handleView = (row: any) => {
|
||||
message.info(`${row.title} ${t('workbenchPage.pending.messages.viewPlaceholder')}`);
|
||||
getProcessInfoByIdAPI(row.id).then(res =>{
|
||||
currentData.value = {
|
||||
name: res.data.name,
|
||||
processInstanceId: res.data.processInstanceId,
|
||||
flowId: res.data.flowId
|
||||
}
|
||||
visible.value = true
|
||||
})
|
||||
};
|
||||
|
||||
const handleReview = (row: any) => {
|
||||
|
||||
Reference in New Issue
Block a user