Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/project-demand/requirement/add.vue
This commit is contained in:
clay
2024-05-30 22:32:41 +08:00
21 changed files with 963 additions and 502 deletions

View File

@@ -55,13 +55,18 @@ export const getProjectCheckProcess = (projectId) => {
method: "get" method: "get"
}); });
}; };
export const getImplementationAttachment = (projectId) => { export const getImplementationAttachment = (params) => {
return request({ return request({
url: '/workflow/mosr/project/implementation/tags', url: '/workflow/mosr/project/implementation/attachments',
method: "get", method: "get",
params:{ params:params
projectId:projectId });
} };
export const uploadAttachment= (data) => {
return request({
url: '/workflow/mosr/project/implementation/upload',
method: "post",
data: data
}); });
}; };
export const addLedger = (data) => { export const addLedger = (data) => {
@@ -71,6 +76,16 @@ export const addLedger = (data) => {
data: data data: data
}); });
}; };
export const getTags = (projectId) => {
return request({
url: '/workflow/mosr/project/implementation/tags',
method: "get",
params:{
projectId:projectId
}
});
};
//项目归档 //项目归档
export const getConclusionDetail = (ProjectId) => { export const getConclusionDetail = (ProjectId) => {
return request({ return request({
@@ -99,15 +114,3 @@ export const getProjectConclusionProcess = () => {
method: "get" method: "get"
}); });
}; };
//文件查询
export const searchFile = (targetId,tag) => {
return request({
url: '/workflow/process/file/query',
method: "get",
params:{
targetId:targetId,
tag:tag
}
});
};

View File

@@ -14,37 +14,37 @@
{{ btn.name }} {{ btn.name }}
</el-button> </el-button>
</div> </div>
<!-- 列显示配置 --> </div>
<div v-if="isSettingCol"> <!-- 列显示配置 -->
<el-tooltip effect="dark" content="列配置" placement="bottom"> <div v-if="isSettingCol" style="float: right">
<el-button ref="buttonRef" link> <el-tooltip effect="dark" content="列配置" placement="bottom">
<el-icon size="18"><Setting /></el-icon> <el-button ref="buttonRef" link>
</el-button> <el-icon size="18"><Setting /></el-icon>
</el-tooltip> </el-button>
<el-popover </el-tooltip>
<el-popover
placement="bottom" placement="bottom"
:width="200" :width="200"
ref="popoverRef" ref="popoverRef"
:virtual-ref="buttonRef" :virtual-ref="buttonRef"
virtual-triggering virtual-triggering
trigger="click"> trigger="click">
<div class="col-setting-checkall"> <div class="col-setting-checkall">
<el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate" @change="changeIsShowAll"></el-checkbox> <el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate" @change="changeIsShowAll"></el-checkbox>
</div> </div>
<div class="col-setting-list"> <div class="col-setting-list">
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow"> <el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
<el-space direction="vertical" alignment="flex-start" :size="0"> <el-space direction="vertical" alignment="flex-start" :size="0">
<el-checkbox <el-checkbox
v-for="item in tableConfig.columns" v-for="item in tableConfig.columns"
:key="item.prop" :key="item.prop"
:label="item.label" :label="item.label"
:value="item.prop" :value="item.prop"
/> />
</el-space> </el-space>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</el-popover> </el-popover>
</div>
</div> </div>
<!-- 表格部分 --> <!-- 表格部分 -->
<div class="fv-table"> <div class="fv-table">

View File

@@ -8,39 +8,75 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '项目名称',
prop: 'requirementName', prop: 'projectName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入项目名称查询',
clearable: true,
filterable: true,
checkStrictly: true
}
}, {
label: '项目费用',
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入项目费用查询',
clearable: true, clearable: true,
filterable: true, filterable: true,
checkStrictly: true checkStrictly: true
} }
}, },
{ {
label: '起始时间', label: '时间',
prop: 'time', prop: 'time',
component: 'el-date-picker', component: 'el-date-picker',
props: { props: {
placeholder: '请选择起始时间', placeholder: '请选择时间',
clearable: true, clearable: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, },
colProps: {} colProps: {}
}, {
label: '项目费用',
prop: 'requirementName',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目费用查询',
clearable: true,
filterable: true,
cacheKey: 'project_cost',
}
}, {
label: '研发阶段',
prop: 'researchStage',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发阶段查询',
clearable: true,
filterable: true,
checkStrictly: true,
cacheKey: 'research_stage',
}
},
{
label: '税后余额',
prop: 'afterTax',
component: 'el-input',
props: {
placeholder: '请输入税后余额查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '摘要',
prop: 'digest',
component: 'el-input',
props: {
placeholder: '请输入摘要查询',
clearable: true,
filterable: true,
checkStrictly: true
}
}, },
]) ])
const tableIns = ref() const tableIns = ref()

View File

@@ -8,45 +8,65 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
const router = useRouter(); const router = useRouter();
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '分摊名称',
prop: 'projectName', prop: 'shareName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入分摊名称查询',
clearable: true, clearable: true,
filterable: true, filterable: true,
checkStrictly: true checkStrictly: true
} }
}, },{
{ label: '分摊月份',
label: '起始时间', prop: 'apportionmentMonth',
prop: 'time',
component: 'el-date-picker', component: 'el-date-picker',
props: { props: {
placeholder: '请选择起始时间', placeholder: '请选择分摊月份',
clearable: true, clearable: true,
}, },
colProps: {} colProps: {}
}, },
{
label: '生成时间',
prop: 'generationTime',
component: 'el-date-picker',
props: {
placeholder: '请选择生成时间',
clearable: true,
},
colProps: {}
}, {
label: '状态',
prop: 'state',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择状态',
clearable: true,
cacheKey: 'special_fund'
}
},
]) ])
const tableIns = ref() const tableIns = ref()
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
prop: 'requirementName', prop: 'shareName',
label: '分摊名称', label: '分摊名称',
align: 'center' align: 'center'
}, },
{ {
prop: 'collectType', prop: 'apportionmentMonth',
label: '分摊月份', label: '分摊月份',
align: 'center' align: 'center'
}, },
{ {
prop: 'deadline', prop: 'generationTime',
label: '生成时间', label: '生成时间',
align: 'center' align: 'center'
}, },
@@ -54,9 +74,8 @@ const tableConfig = reactive({
prop: 'state', prop: 'state',
label: '状态', label: '状态',
align: 'center', align: 'center',
width: 200,
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>) currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
}, },
{ {
prop: 'oper', prop: 'oper',
@@ -65,22 +84,25 @@ const tableConfig = reactive({
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons
if (buttons.has("details")) { if(row.buttons){
buttons = new Set(Array.from(row.buttons))
}
// if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
} // }
if (buttons.has("edit")) { // if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
} // }
// if (buttons.has("delete")) { // if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// } // }
if (buttons.has("report")) { // if (buttons.has("report")) {
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
} // }
if (buttons.has("report")) { // if (buttons.has("report")) {
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
} // }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
{ {
@@ -96,17 +118,18 @@ const tableConfig = reactive({
)) ))
} }
{ {
buttons.has("delete") ? // buttons.has("delete") ?
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'} <popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
perm={['mosr:requirement:del']} perm={['mosr:requirement:del']}
onDelete={() => handleDelete(row)}/> : '' onDelete={() => handleDelete(row)}/>
// : ''
} }
</div> </div>
) )
} }
} }
], ],
api: '', api: '/workflow/mosr/cost/allocation',
btns: [ btns: [
{name: '添加分摊', key: 'add', color: '#DED0B2'} {name: '添加分摊', key: 'add', color: '#DED0B2'}
], ],

View File

@@ -50,8 +50,8 @@
<!-- </div>--> <!-- </div>-->
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(demandForm)">提交</el-button> <el-button color="#DED0B2" v-if="routerName==='Requirement/add'" @click="handleSubmit(demandForm)">提交</el-button>
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button> <el-button @click="handleBack">返回</el-button>
</div> </div>
</div> </div>
@@ -90,6 +90,7 @@ const formData = ref({
fileList: [] fileList: []
}) })
const showTinymce = ref(true) const showTinymce = ref(true)
const routerName = ref(router.currentRoute.value.name)
const processDiagramViewer = ref(false) const processDiagramViewer = ref(false)
const typeOption = ref([ const typeOption = ref([
{ {
@@ -106,7 +107,7 @@ const processStore = useProcessStore()
const processInstanceData = ref() const processInstanceData = ref()
const formPermMap = ref(new Map()); const formPermMap = ref(new Map());
const rules = reactive({ const rules = reactive({
requirementName: [{required: true, message: '请输入名称', trigger: 'blur'}], requirementName: [{required: true, message: '请输入需求名称', trigger: 'blur'}],
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}], companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}], collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}], deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
@@ -174,11 +175,10 @@ const handleDownload = (row) => {
}) })
} }
const compositeParam = (item) => { const compositeParam = (item) => {
let name=router.currentRoute.value.name
let tag = '' let tag = ''
if (!formData.value.collectType && name === 'Requirement/add') { if (!formData.value.collectType && routerName.value === 'Requirement/add') {
tag = '需求征集' tag = '需求征集'
}else if(name === 'Requirement/edit'){ }else if(routerName.value === 'Requirement/edit'){
tag = '需求征集' tag = '需求征集'
} }
return { return {

View File

@@ -22,7 +22,7 @@ const searchConfig = reactive([
prop: 'requirementName', prop: 'requirementName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入需求名称查询',
clearable: true, clearable: true,
filterable: true, filterable: true,
checkStrictly: true checkStrictly: true
@@ -38,7 +38,17 @@ const searchConfig = reactive([
filterable: true, filterable: true,
cacheKey: 'todo_type' cacheKey: 'todo_type'
} }
} },
{
label: '状态',
prop: 'state',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择状态',
clearable: true,
cacheKey: 'demand_collection'
}
},
]) ])
const tableIns = ref() const tableIns = ref()
const userInfo = ref(authStore.userinfo) const userInfo = ref(authStore.userinfo)

View File

@@ -4,8 +4,8 @@
<el-form :model="formData" ref="summaryForm" :rules="rules"> <el-form :model="formData" ref="summaryForm" :rules="rules">
<el-row gutter="50"> <el-row gutter="50">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="名称" prop="projectName"> <el-form-item label="项目名称" prop="projectName">
<el-input v-model="formData.projectName" placeholder="请输入名称" clearable></el-input> <el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -139,16 +139,18 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="产学研联合" prop="industryUniversityResearch"> <el-form-item label="产学研联合" prop="industryUniversityResearch">
<el-radio-group v-model="formData.industryUniversityResearch"> <el-radio-group v-model="formData.industryUniversityResearch">
<el-radio :label="0"></el-radio> <el-radio v-for="item in cacheStore.getDict('industry_university')"
<el-radio :label="1"></el-radio> :key="item.value"
:label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开展政府申报" prop="governmentDeclaration"> <el-form-item label="开展政府申报" prop="governmentDeclaration">
<el-radio-group v-model="formData.governmentDeclaration"> <el-radio-group v-model="formData.governmentDeclaration">
<el-radio :label="0"></el-radio> <el-radio v-for="item in cacheStore.getDict('government_declaration')"
<el-radio :label="1"></el-radio> :key="item.value"
:label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -227,9 +229,9 @@
<!-- </div>--> <!-- </div>-->
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button type="primary" @click="staging">存为草稿</el-button> <el-button type="info" @click="staging">存为草稿</el-button>
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button> <el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
<el-button color="#DED0B2" @click="handleResubmit">重新发布</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
</div> </div>
</div> </div>
</template> </template>
@@ -259,11 +261,11 @@ const showTable = ref(true)
const otherFileList = ref([]) const otherFileList = ref([])
const file = ref({}) const file = ref({})
const formData = ref({ const formData = ref({
industryUniversityResearch:0, industryUniversityResearch:'0',
governmentDeclaration:0, governmentDeclaration:'0',
}) })
const rules = reactive({ const rules = reactive({
projectName: [{required: true, message: '请输入名称', trigger: 'blur'}], projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}], specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}], startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}], rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],

View File

@@ -7,7 +7,6 @@
import {reactive, ref, shallowRef} from 'vue'; import {reactive, ref, shallowRef} from 'vue';
import fvSelect from '@/fvcomponents/fvSelect/index.vue' import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {useRouter} from 'vue-router'; import {useRouter} from 'vue-router';
const localData = reactive({}) const localData = reactive({})
const tableIns = ref() const tableIns = ref()
@@ -16,10 +15,12 @@ const router = useRouter()
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '需求名称',
prop: 'requirementName', prop: 'requirementName',
props: { props: {
placeholder: '请输入' placeholder: '请输入需求名称',
clearable: true,
checkStrictly: true
}, },
component: 'el-input', component: 'el-input',
colProps: {} colProps: {}
@@ -28,42 +29,52 @@ const searchConfig = reactive([
label: '项目类型', label: '项目类型',
prop: 'projectType', prop: 'projectType',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: {}, props: {
placeholder: '请选择项目类型',
cacheKey: 'project_type',
clearable: true,
filterable: true,
},
colProps: {} colProps: {}
}, },
{ {
label: '研发主体', label: '研发主体',
prop: 'productMainBody', prop: 'productMainBody',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: {}, props: {
colProps: {} placeholder: '请选择研发主体',
}, cacheKey: 'rd_subject',
{ clearable: true,
label: '项目影响', filterable: true
prop: 'projectEffect', },
component: shallowRef(fvSelect),
props: {},
colProps: {}
},
{
label: '起止时间',
prop: 'startTime',
component: 'el-date-picker',
props: {},
colProps: {}
},
{
label: '最小金额',
prop: 'minMoney',
component: 'el-input',
colProps: {}
},
{
label: '最大金额',
prop: 'maxMoney',
component: 'el-input',
colProps: {} colProps: {}
}, },
// {
// label: '项目影响',
// prop: 'projectEffect',
// component: shallowRef(fvSelect),
// props: {},
// colProps: {}
// },
// {
// label: '起止时间',
// prop: 'startTime',
// component: 'el-date-picker',
// props: {},
// colProps: {}
// },
// {
// label: '最小金额',
// prop: 'minMoney',
// component: 'el-input',
// colProps: {}
// },
// {
// label: '最大金额',
// prop: 'maxMoney',
// component: 'el-input',
// colProps: {}
// },
]) ])
const tableConfig = reactive({ const tableConfig = reactive({
@@ -100,7 +111,10 @@ const tableConfig = reactive({
{ {
prop: 'startTime', prop: 'startTime',
label: '起止时间', label: '起止时间',
align: 'center' align: 'center',
currentRender: ({row}) => {
return row.startTime + ' 至 ' + row.endTime
}
}, },
{ {
prop: 'state', prop: 'state',
@@ -108,7 +122,7 @@ const tableConfig = reactive({
align: 'center', align: 'center',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
if (row.state !== null&&row.state != 0) { if (row.state !== null && row.state != 0) {
return (<Tag dictType={'demand_summary'} value={row.state}/>) return (<Tag dictType={'demand_summary'} value={row.state}/>)
} else { } else {
return '--' return '--'
@@ -127,13 +141,13 @@ const tableConfig = reactive({
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
} }
if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑',prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
} }
// if (buttons.has("delete")) { // if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'}) // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
// } // }
if (buttons.has("report")) { if (buttons.has("report")) {
btn.push({label: '上报',prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'}) btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
} }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
@@ -175,26 +189,26 @@ const search = (val) => {
const handleAdd = (row) => { const handleAdd = (row) => {
router.push({ router.push({
name:'Summary/add', name: 'Summary/add',
query: { query: {
id:row.requirementId id: row.requirementId
} }
}) })
} }
const handleEdit = (row) => { const handleEdit = (row) => {
router.push({ router.push({
name:'Summary/edit', name: 'Summary/edit',
query: { query: {
id:row.requirementId, id: row.requirementId,
projectId:row.projectId projectId: row.projectId
} }
}) })
} }
const handleDetail = (row) => { const handleDetail = (row) => {
router.push({ router.push({
name:'Summary/detail', name: 'Summary/detail',
query: { query: {
id:row.requirementId, id: row.requirementId,
projectId: row.projectId, projectId: row.projectId,
state: row.state state: row.state
} }

View File

@@ -1,18 +1,17 @@
<template> <template>
<div class="apply-block"> <div class="apply-block">
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules"> <baseTitle title="项目结项"></baseTitle>
<baseTitle title="项目结项"></baseTitle> <AttachmentUpload ref="attachment" label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList"
<AttachmentUpload ref="attachment" label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList" @getAttachment="getAttachment"
@getAttachment="getAttachment" @getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Filing/edit'"/> :preview="name === 'Filing/edit'"/>
<div class="approval-record"> <div class="approval-record">
<baseTitle title="流程"></baseTitle> <baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
</div> </div>
</el-form>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button> <el-button color="#DED0B2" v-if="name==='Filing/conclusion'" @click="handleSubmit">提交</el-button>
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
</div> </div>
</div> </div>
</template> </template>
@@ -23,19 +22,22 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
import {downloadFile} from "@/api/project-demand"; import {downloadFile} from "@/api/project-demand";
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getProjectConclusionProcess, projectConclusion,getConclusionDetail, resubmitConclusion} from "@/api/project-manage"; import {
getProjectConclusionProcess,
projectConclusion,
getConclusionDetail,
resubmitConclusion
} from "@/api/project-manage";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const formData = ref({}) const formData = ref({})
const rules = reactive({
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
})
const attachment = ref() const attachment = ref()
const name=ref(router.currentRoute.value.name) const name = ref(router.currentRoute.value.name)
const loading = ref(false) const loading = ref(false)
const file = ref({}) const file = ref({})
const applyForm = ref()
const deploymentId = ref() const deploymentId = ref()
const showTable = ref(true) const showTable = ref(true)
const otherFileList = ref([]) const otherFileList = ref([])
@@ -93,7 +95,7 @@ const handleDownload = (row) => {
} }
const compositeParam = (item) => { const compositeParam = (item) => {
let tag = '' let tag = ''
if (name.value === 'Filing/conclusion'||name.value === 'Filing/edit') { if (name.value === 'Filing/conclusion' || name.value === 'Filing/edit') {
tag = '项目结项' tag = '项目结项'
} }
return { return {
@@ -107,7 +109,7 @@ const compositeParam = (item) => {
} }
const getAttachment = (val) => { const getAttachment = (val) => {
console.log('上传文件getAttachment', val) console.log('上传文件getAttachment', val)
file.value=compositeParam(val) file.value = compositeParam(val)
} }
const getOtherFile = (val) => { const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val) console.log('上传文件getOtherFile', val)
@@ -125,82 +127,77 @@ const getFileParam = (item) => {
tag: item.tag tag: item.tag
} }
} }
const handleSubmit = (instance) => { const handleSubmit = async () => {
if (!instance) return if (JSON.stringify(file.value) === "{}") {
instance.validate(async (valid) => { attachment.value.validate()
if (!valid) return } else {
if(JSON.stringify(file.value) === "{}"){ attachment.value.clearValidate()
attachment.value.validate() }
} else { let files = []
attachment.value.clearValidate() let singleFile = {}
} if (file.value.fileId !== undefined) {
if (!valid) return singleFile = {
let files = [] fileId: file.value.fileId
let singleFile={}
if(file.value.fileId!==undefined){
singleFile = {
fileId: file.value.fileId
}
}
otherFileList.value.forEach(item => {
files.push(getFileParam(item))
})
let params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: files,
singleFile: singleFile,
projectId:route.query.projectId,
}
console.log('params', params)
let res = await projectConclusion(params)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
await router.push({
name: 'Filing'
})
} }
}
otherFileList.value.forEach(item => {
files.push(getFileParam(item))
}) })
let params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: files,
singleFile: singleFile,
projectId: route.query.projectId,
}
console.log('params', params)
let res = await projectConclusion(params)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
await router.push({
name: 'Filing'
})
}
} }
const handleResubmit = () => { const handleResubmit = () => {
let singleFile = {} let singleFile = {}
let otherFiles = [] let otherFiles = []
let fileArray let fileArray
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) { if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
attachment.value.validate() attachment.value.validate()
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
if(attachment.value.singleFile!==null&&name.value === 'Filing/edit'){ if (attachment.value.singleFile !== null && name.value === 'Filing/edit') {
singleFile = { singleFile = {
fileId: attachment.value.singleFile.fileId fileId: attachment.value.singleFile.fileId
} }
fileArray=attachment.value.allFileList fileArray = attachment.value.allFileList
}else { } else {
if (file.value.fileId !== undefined) { if (file.value.fileId !== undefined) {
singleFile = { singleFile = {
fileId: file.value.fileId fileId: file.value.fileId
} }
} }
fileArray=otherFileList.value fileArray = otherFileList.value
} }
fileArray.forEach(item => { fileArray.forEach(item => {
otherFiles.push(getFileParam(item)) otherFiles.push(getFileParam(item))
}) })
//todo requirementId //todo requirementId
let params={ let params = {
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
requirementId: route.query.id, requirementId: route.query.id,
fileList: otherFiles, fileList: otherFiles,
singleFile: singleFile, singleFile: singleFile,
projectId:route.query.projectId, projectId: route.query.projectId,
} }
console.log('重新提交params',params) console.log('重新提交params', params)
resubmitConclusion(params).then(res => { resubmitConclusion(params).then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -224,11 +221,11 @@ const getDetailInfo = async () => {
}) })
if (res.code === 1000) { if (res.code === 1000) {
formData.value = res.data.formData formData.value = res.data.formData
loading.value=false loading.value = false
} }
}) })
} }
const init = () => { const init = () => {
getProjectConclusionProcess().then(res => { getProjectConclusionProcess().then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -238,7 +235,7 @@ const init = () => {
processDiagramViewer.value = false processDiagramViewer.value = false
if (res.code === 1000) { if (res.code === 1000) {
let data = res.data let data = res.data
deploymentId.value=data.deploymentId deploymentId.value = data.deploymentId
processInstanceData.value = data processInstanceData.value = data
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;
@@ -255,7 +252,7 @@ const init = () => {
onMounted(async () => { onMounted(async () => {
await init() await init()
if (name.value === 'Filing/edit') { if (name.value === 'Filing/edit') {
loading.value=true loading.value = true
await getDetailInfo() await getDetailInfo()
} }
}) })

View File

@@ -12,33 +12,63 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {reactive, shallowRef} from "vue"; import {reactive, shallowRef} from "vue";
const router = useRouter() const router = useRouter()
const shortcuts = [
{
text: '上周',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
return [start, end]
},
},
{
text: '上月',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
return [start, end]
},
},
{
text: '三月前',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
return [start, end]
},
},
]
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '项目名称',
prop: 'requirementName', prop: 'projectName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入项目名称查询',
clearable: true, clearable: true,
filterable: true,
checkStrictly: true checkStrictly: true
} }
}, },
{ {
label: '项目类型', label: '项目类型',
prop: 'collectType', prop: 'projectType',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择项目类型', placeholder: '请选择项目类型',
cacheKey: 'project_type',
clearable: true, clearable: true,
filterable: true, filterable: true,
} }
}, },
{ {
label: '项目影响', label: '项目影响',
prop: 'projectEffect', prop: 'projectImpact',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
cacheKey: 'project_impact',
placeholder: '请选择项目影响', placeholder: '请选择项目影响',
clearable: true, clearable: true,
filterable: true, filterable: true,
@@ -47,47 +77,60 @@ const searchConfig = reactive([
}, },
{ {
label: '研发主体', label: '研发主体',
prop: 'collectType', prop: 'rdSubject',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择研发主体', placeholder: '请选择研发主体',
cacheKey: 'rd_subject',
clearable: true, clearable: true,
filterable: true, filterable: true,
} }
}, },
{ {
label: '起时间', label: '起时间',
prop: 'time', prop: 'dateValue',
component: 'el-date-picker', component: 'el-date-picker',
props: { props: {
placeholder: '请选择起止时间',
clearable: true, clearable: true,
}, type: 'datetimerange',
colProps: {} startPlaceholder: '开始日期',
}, endPlaceholder: '结束日期',
{ valueFormat: 'YYYY-MM-DD HH:mm:ss',
label: '最小金额', shortcuts: shortcuts
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入金额查询',
clearable: true,
filterable: true,
checkStrictly: true
} }
}, },
{ {
label: '最大金额', label: '状态',
prop: 'requirementName', prop: 'state',
component: 'el-input', component: shallowRef(fvSelect),
props: { props: {
placeholder: '请输入金额查询', placeholder: '请选择状态',
clearable: true, clearable: true,
filterable: true, cacheKey: 'project_initiation'
checkStrictly: true
} }
}, },
// {
// label: '最小金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
// {
// label: '最大金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
]) ])
const tableIns = ref() const tableIns = ref()
const tableConfig = reactive({ const tableConfig = reactive({
@@ -130,7 +173,10 @@ const tableConfig = reactive({
{ {
prop: 'startTime', prop: 'startTime',
label: '起止时间', label: '起止时间',
align: 'center' align: 'center',
currentRender: ({row}) => {
return row.startTime + ' 至 ' + row.endTime
}
}, },
{ {
prop: 'taskNode', prop: 'taskNode',
@@ -142,7 +188,7 @@ const tableConfig = reactive({
label: '状态', label: '状态',
align: 'center', align: 'center',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) =>{ currentRender: ({row, index}) => {
if (row.state !== null) { if (row.state !== null) {
return (<Tag dictType={'project_initiation'} value={row.state}/>) return (<Tag dictType={'project_initiation'} value={row.state}/>)
} else { } else {
@@ -162,13 +208,18 @@ const tableConfig = reactive({
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
} }
if (buttons.has("attachments")) { if (buttons.has("attachments")) {
btn.push({label: '附件',prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'}) btn.push({
label: '附件',
prem: ['mosr:requirement:resubmit'],
func: () => handleAttachment(row),
type: 'primary'
})
} }
if (buttons.has("entry")) { if (buttons.has("entry")) {
btn.push({label: '结项',prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'}) btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
} }
if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑',prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
} }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
@@ -194,13 +245,19 @@ const tableConfig = reactive({
}) })
const search = (val) => { const search = (val) => {
tableConfig.params = {...val} let obj = {...val}
if (obj.dateValue) {
obj.startTime = obj.dateValue[0]
obj.endTime = obj.dateValue[1]
delete obj.dateValue
}
tableConfig.params = obj
tableIns.value.refresh() tableIns.value.refresh()
} }
const handleDetail = (row) => { const handleDetail = (row) => {
router.push({ router.push({
name:'Implementation/detail', name: 'Implementation/detail',
query: { query: {
id: row.requirementId, id: row.requirementId,
projectId: row.projectId, projectId: row.projectId,
@@ -211,7 +268,7 @@ const handleDetail = (row) => {
} }
const handleAttachment = (row) => { const handleAttachment = (row) => {
router.push({ router.push({
name:'Filing/attachment', name: 'Filing/attachment',
query: { query: {
id: row.requirementId, id: row.requirementId,
projectId: row.projectId projectId: row.projectId
@@ -220,7 +277,7 @@ const handleAttachment = (row) => {
} }
const handleConclusion = (row) => { const handleConclusion = (row) => {
router.push({ router.push({
name:'Filing/conclusion', name: 'Filing/conclusion',
query: { query: {
id: row.requirementId, id: row.requirementId,
projectId: row.projectId projectId: row.projectId
@@ -229,7 +286,7 @@ const handleConclusion = (row) => {
} }
const handleEdit = (row) => { const handleEdit = (row) => {
router.push({ router.push({
name:'Filing/edit', name: 'Filing/edit',
query: { query: {
id: row.requirementId, id: row.requirementId,
projectId: row.projectId projectId: row.projectId

View File

@@ -8,39 +8,76 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
const router = useRouter()
const route = useRoute()
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '项目名称',
prop: 'projectName', prop: 'projectName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入项目名称查询',
clearable: true, clearable: true,
filterable: true, filterable: true,
checkStrictly: true checkStrictly: true
} }
}, },
{ {
label: '项目费用', label: '时间',
prop: 'projectCost',
component: 'el-input',
props: {
placeholder: '请输入项目费用查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '起始时间',
prop: 'time', prop: 'time',
component: 'el-date-picker', component: 'el-date-picker',
props: { props: {
placeholder: '请选择起始时间', placeholder: '请选择时间',
clearable: true, clearable: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, },
colProps: {} colProps: {}
} }, {
label: '项目费用',
prop: 'requirementName',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目费用查询',
clearable: true,
filterable: true,
cacheKey: 'project_cost',
}
}, {
label: '研发阶段',
prop: 'researchStage',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发阶段查询',
clearable: true,
filterable: true,
checkStrictly: true,
cacheKey: 'research_stage',
}
},
{
label: '税后余额',
prop: 'afterTax',
component: 'el-input',
props: {
placeholder: '请输入税后余额查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '摘要',
prop: 'digest',
component: 'el-input',
props: {
placeholder: '请输入摘要查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
]) ])
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
@@ -82,13 +119,13 @@ const tableConfig = reactive({
} }
], ],
api: '/workflow/mosr/expense/ledger', api: '/workflow/mosr/expense/ledger',
params: {}, params: {
projectId:route.query.id
},
btns: [ btns: [
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''} {name: '上传费用', key: 'add', color: '#DED0B2',auth: ''}
] ]
}) })
const router = useRouter()
const route = useRoute()
const tableIns=ref() const tableIns=ref()
const headBtnClick = (key) => { const headBtnClick = (key) => {
switch (key) { switch (key) {

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-form :model="attachment" inline class="query-form" ref="queryForm" rules="rules"> <el-form :model="attachment" inline class="query-form">
<el-form-item label="标签" prop="tag"> <el-form-item label="标签" prop="tag">
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px"> <el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
<el-option <el-option
@@ -11,10 +11,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="handleSearch(queryForm)" color="#DED0B2">搜索</el-button> <el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button color="#DED0B2" :disabled="!attachment.tag" style="padding: 0" title="请先选择标签再上传附件!"> <el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>
<file-upload @getFile="getFile" :disabled="!attachment.tag"/>
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-card style="width: 100%"> <el-card style="width: 100%">
@@ -29,7 +27,7 @@
<script setup lang="jsx"> <script setup lang="jsx">
import {downloadFile} from "@/api/project-demand"; import {downloadFile} from "@/api/project-demand";
import {getImplementationAttachment,searchFile} from "@/api/project-manage"; import {getImplementationAttachment,getTags} from "@/api/project-manage";
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
const route = useRoute() const route = useRoute()
@@ -37,10 +35,6 @@ const router = useRouter()
const attachment = reactive({ const attachment = reactive({
tag: '' tag: ''
}) })
const rules = reactive({
tag: [{required: true, message: '请选择标签', trigger: 'blur'}]
})
const queryForm = ref()
const tagsOption = ref([]) const tagsOption = ref([])
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
@@ -71,6 +65,7 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
return ( return (
<div> <div>
@@ -83,29 +78,9 @@ const tableConfig = reactive({
}) })
const showTable = ref(true) const showTable = ref(true)
const otherFileList = ref([]) const otherFileList = ref([])
const getTagsOption = () => {
const compositeParam = (item) => {
return {
fileId: item.id,
size: item.size,
originalFileName: item.originalFilename,
fileType: item.fileType,
url: item.url,
tag: attachment.tag,
}
}
const getFile = (val) => {
console.log('上传文件', val)
showTable.value = false
let fileObj = compositeParam(val)
otherFileList.value.push(fileObj)
nextTick(() => {
showTable.value = true
})
}
const getTagsOption = (id = route.query.id) => {
if (!route.query.id) return if (!route.query.id) return
getImplementationAttachment(id).then(res => { getTags(route.query.id).then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: res.msg, message: res.msg,
@@ -116,26 +91,39 @@ const getTagsOption = (id = route.query.id) => {
} }
}) })
} }
const handleSearch = () => {
const handleSearch = (instance) => { let params
if (!instance) return if (attachment.tag) {
instance.validate(async (valid) => { params = {
if (!valid) return projectId: route.query.id,
let tagName = '' tag: attachment.tag
tagsOption.value.forEach(item => { }
if (item.label === attachment.tag) { } else {
tagName = item.value params = {
} projectId: route.query.id
}) }
searchFile(route.query.id, tagName).then(res => { }
showTable.value = false getImplementationAttachment(params).then(res => {
if (res.code === 1000) { ElNotification({
otherFileList.value = res.data title: '提示',
nextTick(() => { message: res.msg,
showTable.value = true type: res.code === 1000 ? 'success' : 'error'
})
}
}) })
showTable.value = false
if (res.code === 1000) {
otherFileList.value = res.data
nextTick(() => {
showTable.value = true
})
}
})
}
const handleUpload = () => {
router.push({
name: 'Implementation/upload',
query: {
id: route.query.id
}
}) })
} }
const handleDownload = (row) => { const handleDownload = (row) => {
@@ -147,7 +135,8 @@ const handleDownload = (row) => {
a.click() a.click()
}) })
} }
getTagsOption() // getTagsOption()
handleSearch()
</script> </script>
<style scoped> <style scoped>

View File

@@ -18,8 +18,8 @@
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button> <el-button color="#DED0B2" v-if="name==='Implementation/check'" @click="handleSubmit(applyForm)">提交</el-button>
<el-button color="#DED0B2" @click="handleResubmit(applyForm)">重新提交</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit(applyForm)">重新提交</el-button>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -12,13 +12,42 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {reactive, shallowRef} from "vue"; import {reactive, shallowRef} from "vue";
const router = useRouter() const router = useRouter()
const shortcuts = [
{
text: '上周',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
return [start, end]
},
},
{
text: '上月',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
return [start, end]
},
},
{
text: '三月前',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
return [start, end]
},
},
]
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '项目名称',
prop: 'projectName', prop: 'projectName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入项目名称查询',
clearable: true, clearable: true,
filterable: true, filterable: true,
checkStrictly: true checkStrictly: true
@@ -30,6 +59,7 @@ const searchConfig = reactive([
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择项目类型', placeholder: '请选择项目类型',
cacheKey: 'project_type',
clearable: true, clearable: true,
filterable: true, filterable: true,
} }
@@ -40,6 +70,7 @@ const searchConfig = reactive([
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择项目影响', placeholder: '请选择项目影响',
cacheKey: 'project_impact',
clearable: true, clearable: true,
filterable: true, filterable: true,
}, },
@@ -51,43 +82,56 @@ const searchConfig = reactive([
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择研发主体', placeholder: '请选择研发主体',
cacheKey: 'rd_subject',
clearable: true, clearable: true,
filterable: true, filterable: true,
} }
}, },
{ {
label: '起止时间', label: '起止时间',
prop: 'startTime', prop: 'dateValue',
component: 'el-date-picker', component: 'el-date-picker',
props: { props: {
placeholder: '请选择起止时间',
clearable: true, clearable: true,
}, type: 'datetimerange',
colProps: {} startPlaceholder: '开始日期',
}, endPlaceholder: '结束日期',
{ valueFormat: 'YYYY-MM-DD HH:mm:ss',
label: '最小金额', shortcuts: shortcuts
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入金额查询',
clearable: true,
filterable: true,
checkStrictly: true
} }
}, },
{ {
label: '最大金额', label: '状态',
prop: 'requirementName', prop: 'state',
component: 'el-input', component: shallowRef(fvSelect),
props: { props: {
placeholder: '请输入金额查询', placeholder: '请选择状态',
clearable: true, clearable: true,
filterable: true, cacheKey: 'project_initiation'
checkStrictly: true
} }
}, },
// {
// label: '最小金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
// {
// label: '最大金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
]) ])
const tableIns = ref() const tableIns = ref()
const tableConfig = reactive({ const tableConfig = reactive({
@@ -134,7 +178,10 @@ const tableConfig = reactive({
{ {
prop: 'startTime', prop: 'startTime',
label: '起止时间', label: '起止时间',
align: 'center' align: 'center',
currentRender: ({row}) => {
return row.startTime + ' 至 ' + row.endTime
}
}, },
{ {
prop: 'taskNode', prop: 'taskNode',
@@ -210,7 +257,13 @@ const tableConfig = reactive({
}) })
const search = (val) => { const search = (val) => {
tableConfig.params = {...val} let obj = {...val}
if(obj.dateValue) {
obj.startTime = obj.dateValue[0]
obj.endTime = obj.dateValue[1]
delete obj.dateValue
}
tableConfig.params = obj
tableIns.value.refresh() tableIns.value.refresh()
} }

View File

@@ -12,11 +12,11 @@ import {reactive} from "vue";
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '需求名称',
prop: 'requirementName', prop: 'requirementName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入需求名称查询',
clearable: true, clearable: true,
filterable: true, filterable: true,
checkStrictly: true checkStrictly: true

View File

@@ -1,22 +1,56 @@
<template> <template>
<baseTitle title="标签名称"></baseTitle> <baseTitle title="标签名称"></baseTitle>
<el-input v-model="tagName" placeholder="请输入标签名称"/> <el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
<el-form-item label="标签名称" prop="tagName">
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 400px" v-if="showInput"/>
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 200px" v-else>
<el-option
v-for="item in tagsOption"
:key="item.label"
:label="item.value"
:value="item.label"
/>
</el-select>
</el-form-item>
</el-form>
<baseTitle title="其他文件"></baseTitle>
<el-card style="width: 100%;margin: 15px 0"> <el-card style="width: 100%;margin: 15px 0">
<file-upload @getFile="getOtherFile"/> <file-upload @getFile="getFile"/>
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig" <fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
:data="otherFileList" :isSettingCol="false" :pagination="false"> :data="fileList" :isSettingCol="false" :pagination="false">
<template #empty> <template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/> <el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template> </template>
</fvTable> </fvTable>
</el-card> </el-card>
<div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
</div>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
const tagName = ref('') import {uploadAttachment} from "@/api/project-manage";
const otherFileList = ref([]) import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js'
const tagsViewStore = useTagsView()
const route = useRoute()
const router = useRouter()
const fileList = ref([])
const showInput = ref(false)
const tagsOption = ref([])
const formData = ref({
tagName:''
})
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{
prop: 'index',
type: 'index',
label: '序号',
align: 'center',
width: '80',
},
{ {
prop: 'originalFileName', prop: 'originalFileName',
label: '附件名称', label: '附件名称',
@@ -47,9 +81,82 @@ const tableConfig = reactive({
] ]
}) })
const showTable = ref(true) const showTable = ref(true)
const getOtherFile = () => { const tagForm = ref()
const name = ref(router.currentRoute.value.name)
const rules = reactive({
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
})
const getTagsOption = () => {
if (!route.query.id) return
getTags(route.query.id).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
showInput.value = res.data.length === 0;
tagsOption.value = res.data
}
})
} }
const compositeParam = (item) => {
return {
fileId: item.id,
size: item.size,
originalFileName: item.originalFilename,
fileType: item.fileType,
url: item.url,
tag: formData.value.tagName,
}
}
const getFile = (val) => {
console.log('上传文件', val)
showTable.value = false
let fileObj = compositeParam(val)
fileList.value.push(fileObj)
nextTick(() => {
showTable.value = true
})
}
const getFileParam = (item) => {
return {
fileId: item.fileId
}
}
const handleSubmit = async (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
let files = []
fileList.value.forEach(item => {
files.push(getFileParam(item))
})
let params = {
fileList: files,
projectId: route.query.id,
tag: formData.value.tagName
}
console.log('params', params)
let res = await uploadAttachment(params)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
await router.push({
name: 'Implementation/attachment',
query:{
id: route.query.id
}
})
}
})
}
// getTagsOption()
</script> </script>
<style scoped> <style scoped>

View File

@@ -1,59 +1,85 @@
<template> <template>
<baseTitle title="上传费用"></baseTitle> <baseTitle title="上传费用"></baseTitle>
<el-table :data="tableData" style="width: 100%"> <el-form :model="tableForm" ref="form">
<el-table-column prop="projectName" label="项目名称"> <el-table :data="tableForm.tableData" style="width: 100%">
<template #default="scope"> <el-table-column prop="projectName" label="项目名称">
<el-input v-model="scope.row.projectName" placeholder="请输入项目名称" clearable> <template #default="scope">
</el-input> <el-form-item prop="projectName" :rules="scope.row.projectName?'1':rules.projectName">
</template> <el-input v-model="scope.row.projectName" placeholder="请输入项目名称" clearable>
</el-table-column> </el-input>
<el-table-column prop="time" label="时间" width="250"> </el-form-item>
<template #default="scope"> </template>
<el-date-picker </el-table-column>
v-model="scope.row.time" <el-table-column prop="time" label="时间">
type="date" <template #default="scope">
format="YYYY-MM-DD" <el-form-item prop="time" :rules="scope.row.time?'1':rules.time">
value-format="YYYY-MM-DD" <el-date-picker
placeholder="选择时间" v-model="scope.row.time"
> type="date"
</el-date-picker> format="YYYY-MM-DD"
</template> value-format="YYYY-MM-DD"
</el-table-column> placeholder="选择时间"
<el-table-column prop="projectCost" label="项目费用"> >
<template #default="scope"> </el-date-picker>
<el-input v-model="scope.row.projectCost" placeholder="请输入项目费用" clearable> </el-form-item>
</el-input> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="projectCost" label="项目费用">
<el-table-column prop="researchStage" label="研发阶段"> <template #default="scope">
<template #default="scope"> <el-form-item prop="projectCost" :rules="scope.row.projectCost?'1':rules.projectCost">
<el-input v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable> <el-select v-model="scope.row.projectCost" placeholder="请选择费用性质" clearable filterable>
</el-input> <el-option
</template> v-for="item in cacheStore.getDict('project_cost')"
</el-table-column> :key="item.value"
<el-table-column prop="digest" label="摘要"> :label="item.label"
<template #default="scope"> :value="item.value"
<el-input v-model="scope.row.digest" placeholder="请输入摘要" clearable> />
</el-input> </el-select>
</template> </el-form-item>
</el-table-column> </template>
<el-table-column prop="afterTax" label="税后余额(元)"> </el-table-column>
<template #default="scope"> <el-table-column prop="researchStage" label="研发阶段">
<el-input v-model="scope.row.afterTax" placeholder="请输入税后余额" clearable> <template #default="scope">
</el-input> <el-form-item prop="researchStage" :rules="scope.row.researchStage?'1':rules.researchStage">
</template> <el-select v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable filterable>
</el-table-column> <el-option
<el-table-column prop="oper" label="操作"> v-for="item in cacheStore.getDict('research_stage')"
<template #default="scope"> :key="item.value"
<el-button type="primary" @click="handleDelete(scope.$index)" link style="font-size: 18px">删除</el-button> :label="item.label"
</template> :value="item.value"
</el-table-column> />
</el-table> </el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="digest" label="摘要">
<template #default="scope">
<el-form-item prop="digest" :rules="scope.row.digest?'1':rules.digest">
<el-input v-model="scope.row.digest" placeholder="请输入摘要" clearable>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="afterTax" label="税后余额(元)">
<template #default="scope">
<el-form-item prop="afterTax" :rules="scope.row.afterTax?'1':rules.afterTax">
<el-input v-model="scope.row.afterTax" placeholder="请输入税后余额" clearable>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="oper" label="操作">
<template #default="scope">
<el-button type="primary" @click="handleDelete(scope.$index)" link style="font-size: 18px">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<div style="width:100%;text-align: center;padding: 10px"> <div style="width:100%;text-align: center;padding: 10px">
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button> <el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button> <el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
<el-button @click="handleBack">返回</el-button> <el-button @click="handleBack">返回</el-button>
</div> </div>
</template> </template>
@@ -63,11 +89,22 @@ import {ElNotification} from "element-plus";
import {addLedger} from "@/api/project-manage"; import {addLedger} from "@/api/project-manage";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import {useCacheStore} from '@/stores/cache.js'
const cacheStore = useCacheStore()
const route = useRoute() const route = useRoute()
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const formData = ref({}) const formData = ref({})
const tableData = ref([ const form = ref()
const rules = reactive({
projectName: [{required: true, message: '请输入项目名称', trigger:"blur"}],
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
researchStage: [{required: true, message: '请输入研发阶段', trigger: 'blur'}],
digest: [{required: true, message: '请输入摘要', trigger: 'blur'}],
afterTax: [{required: true, message: '请输入税后余额', trigger: 'blur'}]
})
const tableData=ref([
{ {
projectId: route.query.id, projectId: route.query.id,
projectName: '', projectName: '',
@@ -78,6 +115,19 @@ const tableData = ref([
afterTax: '' afterTax: ''
} }
]) ])
const tableForm = reactive({
tableData: [
{
projectId: route.query.id,
projectName: '',
time: '',
projectCost: '',
researchStage: '',
digest: '',
afterTax: ''
}
]
})
const handleAdd = () => { const handleAdd = () => {
let row = { let row = {
projectId: route.query.id, projectId: route.query.id,
@@ -94,24 +144,24 @@ const handleDelete = (index) => {
tableData.value.splice(index, 1) tableData.value.splice(index, 1)
} }
const handleSubmit = (instance) => { const handleSubmit = (instance) => {
// if (!instance) return if (!instance) return
// instance.validate(async (valid) => { instance.validate(async (valid) => {
// if (!valid) return if (!valid) return
let params = {} instance.clearValidate()
console.log('params', tableData.value) console.log('params', tableData.value)
const res = addLedger(tableData.value) // const res = addLedger(tableData.value)
ElNotification({ // ElNotification({
title: '提示', // title: '提示',
message: res.msg, // message: res.msg,
type: res.code === 1000 ? 'success' : 'error' // type: res.code === 1000 ? 'success' : 'error'
// })
// if (res.code === 1000) {
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
// router.push({
// name: 'Implementation'
// })
// }
}) })
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
name: 'Implementation'
})
}
// })
} }
const handleBack = () => { const handleBack = () => {
history.back() history.back()

View File

@@ -12,14 +12,15 @@
</el-form> </el-form>
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList" <AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment" @getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Initiation/edit'"/> @getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
:preview="name === 'Initiation/edit'"/>
<div class="approval-record"> <div class="approval-record">
<baseTitle title="流程"></baseTitle> <baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button> <el-button color="#DED0B2" v-if="name==='Initiation/apply'" @click="handleSubmit(applyForm)">提交</el-button>
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
</div> </div>
</div> </div>
</template> </template>
@@ -28,7 +29,7 @@
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {ElMessage, ElNotification} from "element-plus"; import {ElMessage, ElNotification} from "element-plus";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'; import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {getApplyProcess, projectApply,resubmitApply,getApplyDetail} from "@/api/project-manage"; import {getApplyProcess, projectApply, resubmitApply, getApplyDetail} from "@/api/project-manage";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
@@ -88,10 +89,10 @@ const tableConfig = reactive({
const loading = ref(false) const loading = ref(false)
const processInstanceData = ref() const processInstanceData = ref()
const processDiagramViewer = ref(true) const processDiagramViewer = ref(true)
const name=ref(router.currentRoute.value.name) const name = ref(router.currentRoute.value.name)
const compositeParam = (item) => { const compositeParam = (item) => {
let tag = '' let tag = ''
if (name.value === 'Initiation/apply'||name.value === 'Initiation/edit') { if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
tag = '项目立项申请' tag = '项目立项申请'
} }
return { return {
@@ -100,12 +101,12 @@ const compositeParam = (item) => {
originalFileName: item.originalFilename, originalFileName: item.originalFilename,
fileType: item.fileType, fileType: item.fileType,
url: item.url, url: item.url,
tag:tag tag: tag
} }
} }
const getAttachment = (val) => { const getAttachment = (val) => {
console.log('上传文件getAttachment', val) console.log('上传文件getAttachment', val)
file.value=compositeParam(val) file.value = compositeParam(val)
} }
const getOtherFile = (val) => { const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val) console.log('上传文件getOtherFile', val)
@@ -125,15 +126,15 @@ const getFileParam = (item) => {
const handleSubmit = (instance) => { const handleSubmit = (instance) => {
if (!instance) return if (!instance) return
instance.validate(async (valid) => { instance.validate(async (valid) => {
if(JSON.stringify(file.value) === "{}"){ if (JSON.stringify(file.value) === "{}") {
attachment.value.validate() attachment.value.validate()
}else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
if (!valid) return if (!valid) return
let files = [] let files = []
let singleFile={} let singleFile = {}
if(file.value.fileId!==undefined){ if (file.value.fileId !== undefined) {
singleFile = { singleFile = {
fileId: file.value.fileId fileId: file.value.fileId
} }
@@ -146,9 +147,9 @@ const handleSubmit = (instance) => {
requirementId: route.query.id, requirementId: route.query.id,
fileList: files, fileList: files,
singleFile: singleFile, singleFile: singleFile,
projectId:route.query.projectId, projectId: route.query.projectId,
} }
console.log('params',params) console.log('params', params)
let res = await projectApply(params) let res = await projectApply(params)
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -163,27 +164,27 @@ const handleSubmit = (instance) => {
} }
}) })
} }
const handleResubmit =async () => { const handleResubmit = async () => {
let files = [] let files = []
let singleFile={} let singleFile = {}
let fileArray let fileArray
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) { if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
attachment.value.validate() attachment.value.validate()
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
if(attachment.value.singleFile!==null&&name.value === 'Initiation/edit'){ if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
singleFile = { singleFile = {
fileId: attachment.value.singleFile.fileId fileId: attachment.value.singleFile.fileId
} }
fileArray=attachment.value.allFileList fileArray = attachment.value.allFileList
}else { } else {
if (file.value.fileId !== undefined) { if (file.value.fileId !== undefined) {
singleFile = { singleFile = {
fileId: file.value.fileId fileId: file.value.fileId
} }
} }
fileArray=otherFileList.value fileArray = otherFileList.value
} }
fileArray.forEach(item => { fileArray.forEach(item => {
files.push(getFileParam(item)) files.push(getFileParam(item))
@@ -193,9 +194,9 @@ const handleResubmit =async () => {
requirementId: route.query.id, requirementId: route.query.id,
fileList: files, fileList: files,
singleFile: singleFile, singleFile: singleFile,
projectId:route.query.projectId, projectId: route.query.projectId,
} }
console.log('params',params) console.log('params', params)
let res = await resubmitApply(params) let res = await resubmitApply(params)
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -218,11 +219,11 @@ const getDetailInfo = async () => {
}) })
if (res.code === 1000) { if (res.code === 1000) {
formData.value = res.data.formData formData.value = res.data.formData
loading.value=false loading.value = false
} }
}) })
} }
const init = () => { const init = () => {
getApplyProcess(route.query.projectId).then(res => { getApplyProcess(route.query.projectId).then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -232,7 +233,7 @@ const init = () => {
processDiagramViewer.value = false processDiagramViewer.value = false
if (res.code === 1000) { if (res.code === 1000) {
let data = res.data let data = res.data
deploymentId.value=data.deploymentId deploymentId.value = data.deploymentId
processInstanceData.value = data processInstanceData.value = data
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;
@@ -250,7 +251,7 @@ init()
onMounted(async () => { onMounted(async () => {
await init() await init()
if (name.value === 'Initiation/edit') { if (name.value === 'Initiation/edit') {
loading.value=true loading.value = true
await getDetailInfo() await getDetailInfo()
} }
}) })

View File

@@ -9,36 +9,65 @@
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue' import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {reactive, shallowRef} from "vue";
const router = useRouter() const router = useRouter()
const shortcuts = [
{
text: '上周',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
return [start, end]
},
},
{
text: '上月',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
return [start, end]
},
},
{
text: '三月前',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
return [start, end]
},
},
]
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '名称', label: '项目名称',
prop: 'requirementName', prop: 'projectName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入项目名称查询',
clearable: true, clearable: true,
filterable: true,
checkStrictly: true checkStrictly: true
} }
}, },
{ {
label: '项目类型', label: '项目类型',
prop: 'collectType', prop: 'projectType',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择项目类型', placeholder: '请选择项目类型',
cacheKey: 'project_type',
clearable: true, clearable: true,
filterable: true, filterable: true,
} }
}, },
{ {
label: '项目影响', label: '项目影响',
prop: 'projectEffect', prop: 'projectImpact',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
cacheKey: 'project_impact',
placeholder: '请选择项目影响', placeholder: '请选择项目影响',
clearable: true, clearable: true,
filterable: true, filterable: true,
@@ -47,47 +76,60 @@ const searchConfig = reactive([
}, },
{ {
label: '研发主体', label: '研发主体',
prop: 'collectType', prop: 'rdSubject',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择研发主体', placeholder: '请选择研发主体',
cacheKey: 'rd_subject',
clearable: true, clearable: true,
filterable: true, filterable: true,
} }
}, },
{ {
label: '起止时间', label: '起止时间',
prop: 'time', prop: 'dateValue',
component: 'el-date-picker', component: 'el-date-picker',
props: { props: {
placeholder: '请选择起止时间',
clearable: true, clearable: true,
}, type: 'datetimerange',
colProps: {} startPlaceholder: '开始日期',
}, endPlaceholder: '结束日期',
{ valueFormat: 'YYYY-MM-DD HH:mm:ss',
label: '最小金额', shortcuts: shortcuts
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入金额查询',
clearable: true,
filterable: true,
checkStrictly: true
} }
}, },
{ {
label: '最大金额', label: '状态',
prop: 'requirementName', prop: 'state',
component: 'el-input', component: shallowRef(fvSelect),
props: { props: {
placeholder: '请输入金额查询', placeholder: '请选择状态',
clearable: true, clearable: true,
filterable: true, cacheKey: 'project_initiation'
checkStrictly: true
} }
}, },
// {
// label: '最小金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
// {
// label: '最大金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
]) ])
const tableIns = ref() const tableIns = ref()
const tableConfig = reactive({ const tableConfig = reactive({
@@ -130,7 +172,10 @@ const tableConfig = reactive({
{ {
prop: 'startTime', prop: 'startTime',
label: '起止时间', label: '起止时间',
align: 'center' align: 'center',
currentRender: ({row}) => {
return row.startTime + ' 至 ' + row.endTime
}
}, },
{ {
prop: 'taskNode', prop: 'taskNode',
@@ -194,7 +239,13 @@ const tableConfig = reactive({
}) })
const search = (val) => { const search = (val) => {
tableConfig.params = {...val} let obj = {...val}
if(obj.dateValue) {
obj.startTime = obj.dateValue[0]
obj.endTime = obj.dateValue[1]
delete obj.dateValue
}
tableConfig.params = obj
tableIns.value.refresh() tableIns.value.refresh()
} }

View File

@@ -2,8 +2,8 @@
<div v-loading="loading" class="add-block"> <div v-loading="loading" class="add-block">
<baseTitle title="专项资金信息录入"></baseTitle> <baseTitle title="专项资金信息录入"></baseTitle>
<el-form :model="formData" inline class="query-form" ref="fundForm" :rules="rules"> <el-form :model="formData" inline class="query-form" ref="fundForm" :rules="rules">
<el-form-item label="名称" prop="name"> <el-form-item label="专项资金名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable></el-input> <el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="金额" prop="fundAmount"> <el-form-item label="金额" prop="fundAmount">
<el-input v-model="formData.fundAmount" placeholder="请输入金额" clearable></el-input> <el-input v-model="formData.fundAmount" placeholder="请输入金额" clearable></el-input>
@@ -21,13 +21,13 @@
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/> <el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template> </template>
</fvTable> </fvTable>
<div class="approval-record"> <div class="approval-record">
<baseTitle title="流程"></baseTitle> <baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(fundForm)">提交</el-button> <el-button color="#DED0B2" v-if="routerName === 'Fund/add'" @click="handleSubmit(fundForm)">提交</el-button>
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button> <el-button @click="handleBack">返回</el-button>
</div> </div>
</div> </div>
@@ -35,11 +35,12 @@
<script setup lang="jsx"> <script setup lang="jsx">
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {addFund, resubmitFund,getFundDetail} from "@/api/special-fund"; import {addFund, resubmitFund, getFundDetail} from "@/api/special-fund";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
@@ -96,17 +97,16 @@ const tableConfig = reactive({
} }
] ]
}) })
const routerName = ref(router.currentRoute.value.name)
const rules = reactive({ const rules = reactive({
name: [{required: true, message: '请输入名称', trigger: 'blur'}], name: [{required: true, message: '请输入专项资金名称', trigger: 'blur'}],
fundAmount: [{required: true, message: '请输入金额', trigger: 'blur'}], fundAmount: [{required: true, message: '请输入金额', trigger: 'blur'}],
introduce: [{required: true, message: '请输入介绍', trigger: 'blur'}], introduce: [{required: true, message: '请输入介绍', trigger: 'blur'}],
}) })
const compositeParam = (item) => { const compositeParam = (item) => {
let name=router.currentRoute.value.name
let tag = '' let tag = ''
if (name === 'Fund/add'||name === 'Fund/edit') { if (routerName.value === 'Fund/add' || routerName.value === 'Fund/edit') {
tag = '专项资金' tag = '专项资金'
} }
return { return {
@@ -152,7 +152,7 @@ const handleSubmit = async (instance) => {
if (!instance) return if (!instance) return
instance.validate(async (valid) => { instance.validate(async (valid) => {
if (!valid) return if (!valid) return
const {msg,code} = await addFund(submitParam(formData.value)) const {msg, code} = await addFund(submitParam(formData.value))
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: msg,
@@ -167,9 +167,9 @@ const handleSubmit = async (instance) => {
}) })
} }
const handleResubmit = () => { const handleResubmit = () => {
if(!route.query.id)return if (!route.query.id) return
let params={ let params = {
id:route.query.id, id: route.query.id,
...submitParam(formData.value) ...submitParam(formData.value)
} }
resubmitFund(params).then(res => { resubmitFund(params).then(res => {

View File

@@ -18,7 +18,8 @@ const searchConfig = reactive([
prop: 'name', prop: 'name',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询' clearable: true,
placeholder: '请输入专项资金名称查询'
} }
}, },
{ {
@@ -31,6 +32,31 @@ const searchConfig = reactive([
cacheKey: 'special_fund' cacheKey: 'special_fund'
} }
}, },
{
label: '资金金额',
prop: 'fundAmount',
component: 'el-input',
props: {
clearable: true,
placeholder: '请输入资金金额查询'
}
}, {
label: '剩余金额',
prop: 'residualAmount',
component: 'el-input',
props: {
clearable: true,
placeholder: '请输入剩余金额查询'
}
}, {
label: '项目数量',
prop: 'projectNumber',
component: 'el-input',
props: {
clearable: true,
placeholder: '请输入项目数量查询'
}
}
]) ])
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
@@ -41,7 +67,7 @@ const tableConfig = reactive({
}, },
{ {
prop: 'fundAmount', prop: 'fundAmount',
label: '专项资金金额', label: '资金金额',
align: 'center' align: 'center'
}, },
{ {
@@ -49,6 +75,11 @@ const tableConfig = reactive({
label: '剩余金额', label: '剩余金额',
align: 'center' align: 'center'
}, },
{
prop: 'projectNumber',
label: '项目数量',
align: 'center'
},
{ {
prop: 'state', prop: 'state',
label: '状态', label: '状态',