Merge pull request 'master' (#248) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/248
This commit is contained in:
15
src/api/expense-manage/index.js
Normal file
15
src/api/expense-manage/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
export const addAllocation = (data) => {
|
||||
return request({
|
||||
url:'/workflow/mosr/cost/allocation',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
};
|
||||
export const getAllocationDetail = (allocationId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/cost/allocation/info/${allocationId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
@@ -55,7 +55,37 @@ export const getProjectCheckProcess = (projectId) => {
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getImplementationAttachment = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/attachments',
|
||||
method: "get",
|
||||
params:params
|
||||
});
|
||||
};
|
||||
export const uploadAttachment= (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/upload',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const addLedger = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/expense/ledger',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const getTags = (projectId) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/tags',
|
||||
method: "get",
|
||||
params:{
|
||||
projectId:projectId
|
||||
}
|
||||
});
|
||||
};
|
||||
//项目归档
|
||||
export const getConclusionDetail = (ProjectId) => {
|
||||
return request({
|
||||
|
||||
22
src/api/special-fund/index.js
Normal file
22
src/api/special-fund/index.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
export const getFundDetail = (specialFundId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/special/fund/info/${specialFundId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const addFund= (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/special/fund',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
};
|
||||
export const resubmitFund= (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/special/fund/resubmit',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
};
|
||||
@@ -146,7 +146,7 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const getDataSourceOptionItem = (val) => {
|
||||
const getCompanyOptionItem = (val) => {
|
||||
if (val instanceof Array) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, props.companyOption, item)
|
||||
@@ -165,7 +165,7 @@ watch(() => props.companyOption, (newVal) => {
|
||||
}, {deep: true})
|
||||
watch(() => props.formData, (newVal) => {
|
||||
if(newVal!=null){
|
||||
props.formData.companyIds = getDataSourceOptionItem(newVal.companyIds)
|
||||
props.formData.companyIds = getCompanyOptionItem(newVal.companyIds)
|
||||
}
|
||||
}, {deep: true})
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
|
||||
130
src/components/DetailComponent/ExpenseDetail.vue
Normal file
130
src/components/DetailComponent/ExpenseDetail.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分摊名称">
|
||||
<span>{{ formData.shareName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分摊月份">
|
||||
<span>{{ formData.apportionmentMonth }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-table :data="formData.usrAllocationList" style="width: 100%">
|
||||
<el-table-column prop="projectId" label="项目名称" width="180"/>
|
||||
<el-table-column prop="researchPersonnel" label="研发人员" width="180"/>
|
||||
<el-table-column prop="wagesPayable" label="应发工资"/>
|
||||
<el-table-column prop="performance" label="绩效"/>
|
||||
<el-table-column prop="reserveFund" label="公积金"/>
|
||||
<el-table-column prop="socialSecurity" label="社保"/>
|
||||
<el-table-column prop="annuity" label="年金"/>
|
||||
<el-table-column prop="workday" label="工作日(天)"/>
|
||||
<el-table-column prop="researchDuration" label="研发时长(天)"/>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="formData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="approval-record">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer" id-name="collectionProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<opinion v-if="data.taskId" :formData="data.formData" :taskId="data.taskId"></opinion>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '姓名',
|
||||
prop: 'researchPersonnel',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入姓名查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '起始时间',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择起始时间',
|
||||
clearable: true,
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableData = ref([])
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
// tableIns.value.refresh()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
206
src/components/DetailComponent/SpecialFundDetail.vue
Normal file
206
src/components/DetailComponent/SpecialFundDetail.vue
Normal file
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<baseTitle title="专项资金详情"></baseTitle>
|
||||
<el-form :model="formData" ref="form" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项名称">
|
||||
<span>{{ formData.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="金额">
|
||||
<span>{{ formData.fundAmount }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="剩余金额">
|
||||
<span>{{ formData.residualAmount }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="介绍"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.introduce">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="关联项目"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="projectTable"
|
||||
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="fileTable"
|
||||
:data="formData.files" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="formData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer" id-name="fundProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<opinion v-if="data.taskId" :formData="data.formData" :taskId="data.taskId"></opinion>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['getInfo',"update:formData"])
|
||||
const form = ref()
|
||||
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}, showTable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const projectTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'specialFundAmount',
|
||||
label: '项目金额',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '项目时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<el-button type="primary" link onClick={() => handleView(row)}>查看</el-button>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const fileTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
watch(() => props.showTable, (newVal) => {
|
||||
props.showTable = newVal
|
||||
}, {deep: true})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -14,7 +14,7 @@
|
||||
:before-remove="beforeRemove"
|
||||
:on-remove="handleRemove"
|
||||
>
|
||||
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
||||
<el-button color="#DED0B2" :loading="loading" :disabled="disabled">上传文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
@@ -26,7 +26,6 @@ const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
||||
const headers = reactive({
|
||||
authorization: getToken()
|
||||
})
|
||||
const disabled = ref(false)
|
||||
const loading = ref(false)
|
||||
const showTable = ref(false)
|
||||
const uploadParams = ref({})
|
||||
@@ -44,6 +43,9 @@ const props = defineProps({
|
||||
showFileList: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
97
src/views/expense-management/ledger/index.vue
Normal file
97
src/views/expense-management/ledger/index.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
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
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '起始时间',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择起始时间',
|
||||
clearable: true,
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
width:'80',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center'
|
||||
},{
|
||||
prop: 'time',
|
||||
label: '时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectCost',
|
||||
label: '项目费用',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'researchStage',
|
||||
label: '研发阶段',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'digest',
|
||||
label: '摘要',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'afterTax',
|
||||
label: '税后余额(元)',
|
||||
align: 'center'
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/expense/ledger',
|
||||
params: {}
|
||||
})
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
232
src/views/expense-management/share/add.vue
Normal file
232
src/views/expense-management/share/add.vue
Normal file
@@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData" ref="form" class="query-form" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分摊名称" prop="shareName">
|
||||
<el-input v-model="formData.shareName" placeholder="请输入分摊名称" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分摊月份" prop="apportionmentMonth">
|
||||
<el-date-picker
|
||||
v-model="formData.apportionmentMonth"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="选择月"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="projectId" label="项目名称" width="180">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.projectId" placeholder="请选择项目名称" clearable>
|
||||
<el-option
|
||||
v-for="item in nameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchPersonnel" label="研发人员" width="180">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.researchPersonnel" placeholder="请选择研发人员" clearable>
|
||||
<el-option
|
||||
v-for="item in researchOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="wagesPayable" label="应发工资">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.wagesPayable" placeholder="请输入应发工资" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="performance" label="绩效">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.performance" placeholder="请输入绩效" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reserveFund" label="公积金">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.reserveFund" placeholder="请输入公积金" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="socialSecurity" label="社保">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.socialSecurity" placeholder="请输入社保" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="annuity" label="年金">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.annuity" placeholder="请输入年金" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workday" label="工作日(天)">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.workday" placeholder="请输入工作日" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchDuration" label="研发时长(天)">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.researchDuration" placeholder="请输入研发时长" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="time" label="时间">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.time" placeholder="请输入时间" clearable>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="subtotal" label="小计">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.subtotal" placeholder="请输入小计" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="oper" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="handleCopy(scope.row)" link style="font-size: 18px">复制</el-button>
|
||||
<el-button type="primary" @click="handleDelete(scope.$index)" link style="font-size: 18px">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="width:100%;text-align: center;padding: 10px">
|
||||
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {addAllocation, getAllocationDetail} from "@/api/expense-manage";
|
||||
|
||||
const rules = reactive({
|
||||
shareName: [{required: true, message: '请输入分摊名称', trigger: 'blur'}],
|
||||
apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}]
|
||||
})
|
||||
const loading = ref(false)
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const tagsViewStore = useTagsView()
|
||||
const formData = ref({})
|
||||
const form = ref()
|
||||
const nameOptions = ref([
|
||||
{
|
||||
label: "某项目",
|
||||
value: '2'
|
||||
}
|
||||
])
|
||||
const researchOptions = ref([
|
||||
{
|
||||
label: "某人员",
|
||||
value: '1'
|
||||
}
|
||||
])
|
||||
const tableData = ref([
|
||||
{
|
||||
projectId: '',
|
||||
projectName: '',
|
||||
researchPersonnel: '',
|
||||
wagesPayable: '',
|
||||
performance: '',
|
||||
reserveFund: '',
|
||||
socialSecurity: '',
|
||||
annuity: '',
|
||||
workday: '',
|
||||
researchDuration: '',
|
||||
subtotal: '',
|
||||
}
|
||||
])
|
||||
const handleAdd = () => {
|
||||
let row = {
|
||||
projectId: '',
|
||||
projectName: '',
|
||||
researchPersonnel: '',
|
||||
wagesPayable: '',
|
||||
performance: '',
|
||||
reserveFund: '',
|
||||
socialSecurity: '',
|
||||
annuity: '',
|
||||
workday: '',
|
||||
researchDuration: '',
|
||||
subtotal: '',
|
||||
}
|
||||
tableData.value.push(row)
|
||||
}
|
||||
const handleCopy = (row) => {
|
||||
tableData.value.push(row)
|
||||
}
|
||||
const handleDelete = (index) => {
|
||||
tableData.value.splice(index, 1)
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let params = {
|
||||
...formData.value,
|
||||
usrAllocations: tableData.value
|
||||
}
|
||||
const {code, msg} = await addAllocation(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Expense/share'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getAllocationDetail(12).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
onMounted(async () => {
|
||||
// await init()
|
||||
if (route.query.id) {
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
48
src/views/expense-management/share/detail.vue
Normal file
48
src/views/expense-management/share/detail.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<expense-detail :formData="shareData.formData" :data="shareData" :showTable="showTable" :processViewer="shareProcessViewer"
|
||||
:loading="loading"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getAllocationDetail} from "@/api/expense-manage";
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const shareData = ref({})
|
||||
const shareProcessViewer = ref(true)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const getDetail = async () => {
|
||||
// const specialFundId = route.query.id
|
||||
showTable.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getAllocationDetail(12)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (code === 1000) {
|
||||
shareData.value = data
|
||||
loading.value = false
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
// if(data.operationList==null)return;
|
||||
// processStore.setDesign(data)
|
||||
// processStore.runningList.value = data.runningList;
|
||||
// processStore.endList.value = data.endList;
|
||||
// processStore.noTakeList.value = data.noTakeList;
|
||||
// processStore.refuseList.value = data.refuseList;
|
||||
// processStore.passList.value = data.passList;
|
||||
|
||||
}else {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
156
src/views/expense-management/share/index.vue
Normal file
156
src/views/expense-management/share/index.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
const router = useRouter();
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '起始时间',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择起始时间',
|
||||
clearable: true,
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'shareName',
|
||||
label: '分摊名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'apportionmentMonth',
|
||||
label: '分摊月份',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'generationTime',
|
||||
label: '生成时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
let buttons
|
||||
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'})
|
||||
// }
|
||||
// if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("report")) {
|
||||
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("report")) {
|
||||
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
{
|
||||
// buttons.has("delete") ?
|
||||
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
// : ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/cost/allocation',
|
||||
btns: [
|
||||
{name: '添加分摊', key: 'add', color: '#DED0B2'}
|
||||
],
|
||||
params: {}
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
name: 'Share/add',
|
||||
query: {}
|
||||
})
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Share/detail',
|
||||
query: {
|
||||
id:row.id
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Share/edit',
|
||||
query: {
|
||||
id:row.id
|
||||
}
|
||||
})
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -165,41 +165,13 @@ const handleView = (row) => {
|
||||
id: row.targetId
|
||||
}
|
||||
})
|
||||
}
|
||||
else if(row.targetState=='10'&&row.targetId){
|
||||
router.push({
|
||||
name: 'Summary/detail',
|
||||
query: {
|
||||
id: row.targetId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
}
|
||||
})
|
||||
}else if(row.targetState=='20'&&row.targetId){
|
||||
router.push({
|
||||
name: 'Initiation/detail',
|
||||
query: {
|
||||
id: row.targetId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
}
|
||||
})
|
||||
}else if(row.targetState=='40'&&row.targetId){
|
||||
} else{
|
||||
router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.targetId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
}
|
||||
})
|
||||
}else if(row.targetState=='50'&&row.targetId){
|
||||
router.push({
|
||||
name: 'Filing/detail',
|
||||
query: {
|
||||
id: row.targetId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
projectId: row.targetId,
|
||||
state: row.state,
|
||||
step: row.targetState
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
<div v-loading="loading" class="add-block">
|
||||
<baseTitle title="需求征集信息录入"></baseTitle>
|
||||
<el-form :model="formData" inline class="query-form" ref="demandForm" :rules="rules">
|
||||
<div class="left-info">
|
||||
<el-form-item v-if="checkFormPrem('requirementName')" label="名称" prop="requirementName">
|
||||
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
|
||||
<el-form-item v-if="checkFormPrem('requirementName')" label="需求名称" prop="requirementName">
|
||||
<el-input v-model="formData.requirementName" placeholder="请输入需求名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="checkFormPrem('companyIds')" label="所属公司" prop="companyIds">
|
||||
<el-tree-select v-model="formData.companyIds" :data="companyOption" style="width: 100%;"
|
||||
@@ -30,7 +29,6 @@
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<Tinymce v-if="checkFormPrem('collectExplain') && showTinymce" image-url="/notice/file" file-url="/notice/file"
|
||||
@@ -52,8 +50,8 @@
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(demandForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'" @click="handleSubmit(demandForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,6 +90,7 @@ const formData = ref({
|
||||
fileList: []
|
||||
})
|
||||
const showTinymce = ref(true)
|
||||
const routerName = ref(router.currentRoute.value.name)
|
||||
const processDiagramViewer = ref(false)
|
||||
const typeOption = ref([
|
||||
{
|
||||
@@ -108,7 +107,7 @@ const processStore = useProcessStore()
|
||||
const processInstanceData = ref()
|
||||
const formPermMap = ref(new Map());
|
||||
const rules = reactive({
|
||||
requirementName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
requirementName: [{required: true, message: '请输入需求名称', trigger: 'blur'}],
|
||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||
@@ -148,10 +147,10 @@ const tableConfig = reactive({
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
<el-button type="primary" size="large" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
// <el-button type="primary" size="large" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||
}
|
||||
]
|
||||
})
|
||||
@@ -176,11 +175,12 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
console.log('router.currentRoute.value.path',router.currentRoute.value.path)
|
||||
let tag = ''
|
||||
// if (!formData.value.collectType && router.currentRoute.value.path === 'Requirement/add') {
|
||||
// tag = '需求征集'
|
||||
// }
|
||||
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
|
||||
tag = '需求征集'
|
||||
}else if(routerName.value === 'Requirement/edit'){
|
||||
tag = '需求征集'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
@@ -235,6 +235,7 @@ const submitParam = (item) => {
|
||||
item.fileList.forEach(item => {
|
||||
let obj = {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
@@ -253,28 +254,32 @@ const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let res = await addRequirement(submitParam(formData.value))
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
const {msg,code} = await addRequirement(submitParam(formData.value))
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Requirement'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
resubmit(submitParam(formData.value)).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Requirement'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import Tag from '@/components/Tag.vue'
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage} from "element-plus";
|
||||
import {ElMessage, ElNotification} from "element-plus";
|
||||
import {deleteDemand} from "@/api/project-demand";
|
||||
|
||||
const authStore = useAuthStore()
|
||||
@@ -22,7 +22,7 @@ const searchConfig = reactive([
|
||||
prop: 'requirementName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
placeholder: '请输入需求名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
@@ -140,20 +140,23 @@ const tableConfig = reactive({
|
||||
params: {}
|
||||
})
|
||||
|
||||
console.log('userInfo', userInfo.value.userName)
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const handleAdd = () => {
|
||||
//新增
|
||||
router.push({
|
||||
name:'Requirement/add',
|
||||
query: {
|
||||
isAdd: 1
|
||||
}
|
||||
})
|
||||
try{
|
||||
router.push({
|
||||
name:'Requirement/add',
|
||||
query:{}
|
||||
})
|
||||
}catch (err){
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '该用户无新增权限',
|
||||
// type: 'warning'
|
||||
// })
|
||||
}
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<el-form :model="formData" ref="summaryForm" :rules="rules">
|
||||
<el-row gutter="50">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入名称" clearable></el-input>
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -56,7 +56,7 @@
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in cacheStore.getDict('project_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -66,15 +66,21 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="研发主体" prop="rdSubject">
|
||||
<el-input v-model="formData.rdSubject" placeholder="请输入研发主体" clearable></el-input>
|
||||
<el-select v-model="formData.rdSubject" placeholder="请选择研发主体" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('rd_subject')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in cacheStore.getDict('invest_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -86,7 +92,7 @@
|
||||
<el-form-item label="项目影响" prop="projectImpact">
|
||||
<el-select v-model="formData.projectImpact" placeholder="请选择项目影响" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in cacheStore.getDict('project_impact')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -98,7 +104,7 @@
|
||||
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in cacheStore.getDict('business_segment')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -110,7 +116,7 @@
|
||||
<el-form-item label="预期成果形式" prop="resultForm">
|
||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in cacheStore.getDict('result_form')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -122,7 +128,7 @@
|
||||
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in cacheStore.getDict('technical_standard')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -132,33 +138,27 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<el-select v-model="formData.industryUniversityResearch" placeholder="请选择产学研联合" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-radio-group v-model="formData.industryUniversityResearch">
|
||||
<el-radio v-for="item in cacheStore.getDict('industry_university')"
|
||||
:key="item.value"
|
||||
:label="item.value">{{item.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<el-select v-model="formData.governmentDeclaration" placeholder="请选择开展政府申报" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-radio-group v-model="formData.governmentDeclaration">
|
||||
<el-radio v-for="item in cacheStore.getDict('government_declaration')"
|
||||
:key="item.value"
|
||||
:label="item.value">{{item.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in cacheStore.getDict('intellectual_property')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -166,6 +166,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<baseTitle title="预期知识产权"></baseTitle>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||
<el-input v-model="formData.inventionPatent" clearable></el-input>
|
||||
@@ -226,9 +229,9 @@
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="primary" @click="staging">存为草稿</el-button>
|
||||
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新发布</el-button>
|
||||
<el-button type="info" @click="staging">存为草稿</el-button>
|
||||
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -257,9 +260,12 @@ const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const file = ref({})
|
||||
const formData = ref({})
|
||||
const formData = ref({
|
||||
industryUniversityResearch:'0',
|
||||
governmentDeclaration:'0',
|
||||
})
|
||||
const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||
@@ -316,7 +322,8 @@ const getOtherFile = (val) => {
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
@@ -338,43 +345,43 @@ const handleSubmit = async (instance) => {
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
"specialFund": "2",
|
||||
"projectName": "重新提交全流程测试2024520",
|
||||
"startTime": "2024-05-24 00:00:00",
|
||||
"endTime": "2024-05-29 00:00:00",
|
||||
"projectType": "3",
|
||||
"investmentType": "3",
|
||||
"businessSegment": "2",
|
||||
"technicalStandard": "2",
|
||||
"governmentDeclaration": "2",
|
||||
"inventionPatent": "3",
|
||||
"newPatent": "3",
|
||||
"economicEstimate": "3",
|
||||
"other": "3",
|
||||
"copyright": "3",
|
||||
"softwareCopyright": "3",
|
||||
"industryUniversityResearch": "2",
|
||||
"intellectualProperty": "00",
|
||||
"resultForm": "3",
|
||||
"projectImpact": "3",
|
||||
"rdSubject": "3",
|
||||
// "affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||
"serviceDescription": "3",
|
||||
"contentDescription": "3",
|
||||
"specialFundAmount": "3",
|
||||
deploymentId: deploymentId.value,
|
||||
"singleFile": singleFile,
|
||||
"fileList": otherFiles,
|
||||
"requirementId":route.query.id
|
||||
}
|
||||
// let params = {
|
||||
// ...formData.value,
|
||||
// "specialFund": "2",
|
||||
// "projectName": "重新提交全流程测试2024520",
|
||||
// "startTime": "2024-05-24 00:00:00",
|
||||
// "endTime": "2024-05-29 00:00:00",
|
||||
// "projectType": "3",
|
||||
// "investmentType": "3",
|
||||
// "businessSegment": "2",
|
||||
// "technicalStandard": "2",
|
||||
// "governmentDeclaration": 0,
|
||||
// "inventionPatent": "3",
|
||||
// "newPatent": "3",
|
||||
// "economicEstimate": "3",
|
||||
// "other": "3",
|
||||
// "copyright": "3",
|
||||
// "softwareCopyright": "3",
|
||||
// "industryUniversityResearch": 0,
|
||||
// "intellectualProperty": "00",
|
||||
// "resultForm": "3",
|
||||
// "projectImpact": "3",
|
||||
// "rdSubject": "3",
|
||||
// // "affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||
// "serviceDescription": "3",
|
||||
// "contentDescription": "3",
|
||||
// "specialFundAmount": "3",
|
||||
// deploymentId: deploymentId.value,
|
||||
// fileList: otherFiles,
|
||||
// singleFile: singleFile,
|
||||
// requirementId: route.query.id
|
||||
// "singleFile": singleFile,
|
||||
// "fileList": otherFiles,
|
||||
// "requirementId":route.query.id
|
||||
// }
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
import {reactive, ref, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {useRouter} from 'vue-router';
|
||||
|
||||
const localData = reactive({})
|
||||
|
||||
const tableIns = ref()
|
||||
@@ -16,10 +15,12 @@ const router = useRouter()
|
||||
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
label: '需求名称',
|
||||
prop: 'requirementName',
|
||||
props: {
|
||||
placeholder: '请输入'
|
||||
placeholder: '请输入需求名称',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
colProps: {}
|
||||
@@ -28,42 +29,52 @@ const searchConfig = reactive([
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {},
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
cacheKey: 'project_type',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'productMainBody',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {},
|
||||
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',
|
||||
props: {
|
||||
placeholder: '请选择研发主体',
|
||||
cacheKey: 'rd_subject',
|
||||
clearable: true,
|
||||
filterable: true
|
||||
},
|
||||
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({
|
||||
@@ -100,7 +111,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender: ({row}) => {
|
||||
return row.startTime + ' 至 ' + row.endTime
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
@@ -108,7 +122,7 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
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}/>)
|
||||
} else {
|
||||
return '--'
|
||||
@@ -127,13 +141,13 @@ const tableConfig = reactive({
|
||||
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
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")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
||||
// }
|
||||
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 (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -175,26 +189,26 @@ const search = (val) => {
|
||||
|
||||
const handleAdd = (row) => {
|
||||
router.push({
|
||||
name:'Summary/add',
|
||||
name: 'Summary/add',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name:'Summary/edit',
|
||||
name: 'Summary/edit',
|
||||
query: {
|
||||
id:row.requirementId,
|
||||
projectId:row.projectId
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Summary/detail',
|
||||
name: 'Summary/detail',
|
||||
query: {
|
||||
id:row.requirementId,
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<baseTitle title="项目结项"></baseTitle>
|
||||
<AttachmentUpload ref="attachment" label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Filing/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
</el-form>
|
||||
<baseTitle title="项目结项"></baseTitle>
|
||||
<AttachmentUpload ref="attachment" label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="name === 'Filing/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
<el-button color="#DED0B2" v-if="name==='Filing/conclusion'" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,19 +22,22 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
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 route = useRoute()
|
||||
const tagsViewStore = useTagsView()
|
||||
const formData = ref({})
|
||||
const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
const attachment = ref()
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
@@ -93,7 +95,7 @@ const handleDownload = (row) => {
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Filing/conclusion'||name.value === 'Filing/edit') {
|
||||
if (name.value === 'Filing/conclusion' || name.value === 'Filing/edit') {
|
||||
tag = '项目结项'
|
||||
}
|
||||
return {
|
||||
@@ -107,7 +109,7 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value=compositeParam(val)
|
||||
file.value = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
@@ -121,85 +123,81 @@ const getOtherFile = (val) => {
|
||||
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
if(JSON.stringify(file.value) === "{}"){
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
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'
|
||||
})
|
||||
const handleSubmit = async () => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let files = []
|
||||
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'
|
||||
})
|
||||
}
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if(attachment.value.singleFile!==null&&name.value === 'Filing/edit'){
|
||||
if (attachment.value.singleFile !== null && name.value === 'Filing/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
fileArray = attachment.value.allFileList
|
||||
} else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
fileArray = otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params={
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
console.log('重新提交params', params)
|
||||
resubmitConclusion(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -223,11 +221,11 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value=false
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
const init = () => {
|
||||
getProjectConclusionProcess().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -237,7 +235,7 @@ const init = () => {
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value=data.deploymentId
|
||||
deploymentId.value = data.deploymentId
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
@@ -254,7 +252,7 @@ const init = () => {
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (name.value === 'Filing/edit') {
|
||||
loading.value=true
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -14,11 +14,11 @@ import {reactive, shallowRef} from "vue";
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
label: '需求名称',
|
||||
prop: 'requirementName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
placeholder: '请输入需求名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
|
||||
@@ -8,13 +8,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'requirementName',
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
@@ -22,7 +25,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '项目费用',
|
||||
prop: 'requirementName',
|
||||
prop: 'projectCost',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入项目费用查询',
|
||||
@@ -33,7 +36,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '起始时间',
|
||||
prop: 'datetime',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择起始时间',
|
||||
@@ -48,41 +51,48 @@ const tableConfig = reactive({
|
||||
prop: 'name',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
width:'80'
|
||||
width:'80',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center'
|
||||
},{
|
||||
prop: 'time',
|
||||
label: '时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
prop: 'projectCost',
|
||||
label: '项目费用',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'productMainBody',
|
||||
prop: 'researchStage',
|
||||
label: '研发阶段',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectEffect',
|
||||
prop: 'digest',
|
||||
label: '摘要',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'survey',
|
||||
prop: 'afterTax',
|
||||
label: '税后余额(元)',
|
||||
align: 'center'
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
params: {},
|
||||
api: '/workflow/mosr/expense/ledger',
|
||||
params: {
|
||||
projectId:route.query.id
|
||||
},
|
||||
btns: [
|
||||
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''}
|
||||
]
|
||||
})
|
||||
const router = useRouter()
|
||||
const tableIns=ref()
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
@@ -93,9 +103,17 @@ const headBtnClick = (key) => {
|
||||
const handleUploadFee = () => {
|
||||
router.push({
|
||||
name: 'Implementation/uploadFee',
|
||||
query: {}
|
||||
query: {
|
||||
id:route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const search = (val) => {
|
||||
console.log('val',val)
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<el-form :model="attachment" inline class="query-form">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||
<el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card style="width: 100%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
@@ -12,22 +26,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {shallowRef} from "vue";
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {getImplementationAttachment,getTags} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '标签',
|
||||
prop: 'collectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择标签',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
}
|
||||
}
|
||||
])
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
const tagsOption = ref([])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -57,31 +65,78 @@ const tableConfig = reactive({
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable=ref(true)
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const getOtherFile = () => {
|
||||
|
||||
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) {
|
||||
tagsOption.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSearch = () => {
|
||||
let params
|
||||
if (attachment.tag) {
|
||||
params = {
|
||||
projectId: route.query.id,
|
||||
tag: attachment.tag
|
||||
}
|
||||
} else {
|
||||
params = {
|
||||
projectId: route.query.id
|
||||
}
|
||||
}
|
||||
getImplementationAttachment(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
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) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
// getTagsOption()
|
||||
handleSearch()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit(applyForm)">重新提交</el-button>
|
||||
<el-button color="#DED0B2" v-if="name==='Implementation/check'" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit(applyForm)">重新提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -75,7 +75,8 @@ const getOtherFile = (val) => {
|
||||
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
|
||||
@@ -50,6 +50,7 @@ const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const cuurentStep = ref()
|
||||
route.query.step == '10' && (cuurentStep.value = 1)
|
||||
route.query.step == '20' && (cuurentStep.value = 2)
|
||||
route.query.step == '40' && (cuurentStep.value = 3)
|
||||
route.query.step == '50' && (cuurentStep.value = 4)
|
||||
|
||||
@@ -14,11 +14,11 @@ import {reactive, shallowRef} from "vue";
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
@@ -146,7 +146,7 @@ const tableConfig = reactive({
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) =>{
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
} else {
|
||||
@@ -166,22 +166,22 @@ const tableConfig = reactive({
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("check")) {
|
||||
btn.push({label: '验收',prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
|
||||
btn.push({label: '验收', prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("standing")) {
|
||||
btn.push({label: '台账',prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件',prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("standing")) {
|
||||
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("viewAllocation")) {
|
||||
btn.push({label: '查看分摊',prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("phaseChange")) {
|
||||
btn.push({label: '阶段变更',prem: ['mosr:requirement:info'], func: () => handleChange(row), type: 'primary'})
|
||||
btn.push({label: '阶段变更', prem: ['mosr:requirement:info'], func: () => handlePhaseChange(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -216,7 +216,7 @@ const search = (val) => {
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Implementation/detail',
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
@@ -247,7 +247,7 @@ const handleStandingBook = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/account',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
id: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -267,4 +267,12 @@ const handleShare = (row) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handlePhaseChange = (row) => {
|
||||
router.push({
|
||||
name: 'Phase/change',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
151
src/views/project-management/implementation/phase.vue
Normal file
151
src/views/project-management/implementation/phase.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<AttachmentUpload ref="attachment" label="阶段变更附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="name === 'Implementation/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getProjectCheckProcess, projectCheck, getCheckDetail, resubmitCheck} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const attachment = ref()
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const formData = ref({})
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Phase/change') {
|
||||
tag = '阶段变更'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
let fileArray
|
||||
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray = otherFileList.value
|
||||
|
||||
fileArray.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 projectCheck(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'
|
||||
// })
|
||||
// }
|
||||
})
|
||||
}
|
||||
|
||||
const init = async () => {
|
||||
const {msg, code,data} = await getProjectCheckProcess(route.query.projectId)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (code === 1000) {
|
||||
deploymentId.value = data.deploymentId
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
onMounted(async () => {
|
||||
// await init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.apply-block{
|
||||
margin: 15px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -12,11 +12,11 @@ import {reactive} from "vue";
|
||||
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
label: '需求名称',
|
||||
prop: 'requirementName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
placeholder: '请输入需求名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
|
||||
164
src/views/project-management/implementation/upload.vue
Normal file
164
src/views/project-management/implementation/upload.vue
Normal file
@@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<baseTitle title="标签名称"></baseTitle>
|
||||
<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">
|
||||
<file-upload @getFile="getFile"/>
|
||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {uploadAttachment} from "@/api/project-manage";
|
||||
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({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '文件大小',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable = ref(true)
|
||||
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>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,84 +1,170 @@
|
||||
<template>
|
||||
<el-form :model="formData" ref="demandForm" label-width="auto">
|
||||
<baseTitle title="上传费用"></baseTitle>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目负责人">
|
||||
<span>{{ formData.companyIds }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目开始时间">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目预计持续时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目开展方式">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目预算">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<baseTitle title="上传费用"></baseTitle>
|
||||
<el-form :model="tableForm" ref="form">
|
||||
<el-table :data="tableForm.tableData" style="width: 100%">
|
||||
<el-table-column prop="projectName" label="项目名称">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="projectName" :rules="scope.row.projectName?'1':rules.projectName">
|
||||
<el-input v-model="scope.row.projectName" placeholder="请输入项目名称" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="time" label="时间">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="time" :rules="scope.row.time?'1':rules.time">
|
||||
<el-date-picker
|
||||
v-model="scope.row.time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectCost" label="项目费用">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="projectCost" :rules="scope.row.projectCost?'1':rules.projectCost">
|
||||
<el-select v-model="scope.row.projectCost" placeholder="请选择费用性质" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('project_cost')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="研发阶段">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="researchStage" :rules="scope.row.researchStage?'1':rules.researchStage">
|
||||
<el-select v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('research_stage')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="date" label="时间" width="180" >
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.uqName" placeholder="请输入时间" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="项目费用" width="180" />
|
||||
<el-table-column prop="address" label="研发阶段" />
|
||||
<el-table-column prop="address" label="摘要" />
|
||||
<el-table-column prop="address" label="税后余额(元)" />
|
||||
<el-table-column prop="address" label="操作" >
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="mini" @click="handleDelete(scope.row)" link>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="width:100%;text-align: center;padding: 10px">
|
||||
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {addLedger} from "@/api/project-manage";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {useRoute} from "vue-router";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const tagsViewStore = useTagsView()
|
||||
const formData = ref({})
|
||||
const tableData = [
|
||||
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([
|
||||
{
|
||||
date: '2016-05-03',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
{
|
||||
date: '2016-05-02',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
{
|
||||
date: '2016-05-04',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
{
|
||||
date: '2016-05-01',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
]
|
||||
projectId: route.query.id,
|
||||
projectName: '',
|
||||
time: '',
|
||||
projectCost: '',
|
||||
researchStage: '',
|
||||
digest: '',
|
||||
afterTax: ''
|
||||
}
|
||||
])
|
||||
const tableForm = reactive({
|
||||
tableData: [
|
||||
{
|
||||
projectId: route.query.id,
|
||||
projectName: '',
|
||||
time: '',
|
||||
projectCost: '',
|
||||
researchStage: '',
|
||||
digest: '',
|
||||
afterTax: ''
|
||||
}
|
||||
]
|
||||
})
|
||||
const handleAdd = () => {
|
||||
let row = {
|
||||
projectId: route.query.id,
|
||||
projectName: '',
|
||||
time: '',
|
||||
projectCost: '',
|
||||
researchStage: '',
|
||||
digest: '',
|
||||
afterTax: ''
|
||||
}
|
||||
tableData.value.push(row)
|
||||
}
|
||||
const handleDelete = (index) => {
|
||||
tableData.value.splice(index, 1)
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
instance.clearValidate()
|
||||
console.log('params', tableData.value)
|
||||
// const res = addLedger(tableData.value)
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// router.push({
|
||||
// name: 'Implementation'
|
||||
// })
|
||||
// }
|
||||
})
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -12,14 +12,15 @@
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@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">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
<el-button color="#DED0B2" v-if="name==='Initiation/apply'" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -28,7 +29,7 @@
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {ElMessage, ElNotification} from "element-plus";
|
||||
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';
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -88,10 +89,10 @@ const tableConfig = reactive({
|
||||
const loading = ref(false)
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Initiation/apply'||name.value === 'Initiation/edit') {
|
||||
if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
|
||||
tag = '项目立项申请'
|
||||
}
|
||||
return {
|
||||
@@ -100,12 +101,12 @@ const compositeParam = (item) => {
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag:tag
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value=compositeParam(val)
|
||||
file.value = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
@@ -118,21 +119,22 @@ const getOtherFile = (val) => {
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if(JSON.stringify(file.value) === "{}"){
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
}else {
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
if(file.value.fileId!==undefined){
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
@@ -145,9 +147,9 @@ const handleSubmit = (instance) => {
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('params',params)
|
||||
console.log('params', params)
|
||||
let res = await projectApply(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -162,27 +164,27 @@ const handleSubmit = (instance) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit =async () => {
|
||||
const handleResubmit = async () => {
|
||||
let files = []
|
||||
let singleFile={}
|
||||
let singleFile = {}
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if(attachment.value.singleFile!==null&&name.value === 'Initiation/edit'){
|
||||
if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
fileArray = attachment.value.allFileList
|
||||
} else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
fileArray = otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
@@ -192,9 +194,9 @@ const handleResubmit =async () => {
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('params',params)
|
||||
console.log('params', params)
|
||||
let res = await resubmitApply(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -217,11 +219,11 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value=false
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
const init = () => {
|
||||
getApplyProcess(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -231,7 +233,7 @@ const init = () => {
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value=data.deploymentId
|
||||
deploymentId.value = data.deploymentId
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
@@ -249,7 +251,7 @@ init()
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (name.value === 'Initiation/edit') {
|
||||
loading.value=true
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -14,13 +14,12 @@ import {reactive, shallowRef} from "vue";
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
label: '需求名称',
|
||||
prop: 'requirementName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
placeholder: '请输入需求名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
}
|
||||
},
|
||||
@@ -30,6 +29,7 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
cacheKey: 'project_type',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
}
|
||||
@@ -39,6 +39,7 @@ const searchConfig = reactive([
|
||||
prop: 'projectEffect',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
cacheKey: 'project_impact',
|
||||
placeholder: '请选择项目影响',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
@@ -51,6 +52,7 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择研发主体',
|
||||
cacheKey: 'rd_subject',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
}
|
||||
@@ -130,7 +132,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender: ({row}) => {
|
||||
return row.startTime + ' 至 ' + row.endTime
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'taskNode',
|
||||
|
||||
241
src/views/special-fund/add.vue
Normal file
241
src/views/special-fund/add.vue
Normal file
@@ -0,0 +1,241 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="add-block">
|
||||
<baseTitle title="专项资金信息录入"></baseTitle>
|
||||
<el-form :model="formData" inline class="query-form" ref="fundForm" :rules="rules">
|
||||
<el-form-item label="专项资金名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="fundAmount">
|
||||
<el-input v-model="formData.fundAmount" placeholder="请输入金额" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="介绍"></baseTitle>
|
||||
<Tinymce image-url="/notice/file" file-url="/notice/file" v-if="showTinymce"
|
||||
v-model:value="formData.introduce" height="300"/>
|
||||
<baseTitle title="申请文件"></baseTitle>
|
||||
<file-upload @getFile="getFile"/>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable"
|
||||
:tableConfig="tableConfig" :data="formData.files"
|
||||
:isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="routerName === 'Fund/add'" @click="handleSubmit(fundForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {addFund, resubmitFund, getFundDetail} from "@/api/special-fund";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const showTinymce = ref(true)
|
||||
const showTable = ref(true)
|
||||
const processInstanceData = ref()
|
||||
const fundForm = ref()
|
||||
const processDiagramViewer = ref(false)
|
||||
const formData = ref({
|
||||
name: '',
|
||||
fundAmount: '',
|
||||
introduce: '',
|
||||
files: []
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const routerName = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
name: [{required: true, message: '请输入专项资金名称', trigger: 'blur'}],
|
||||
fundAmount: [{required: true, message: '请输入金额', trigger: 'blur'}],
|
||||
introduce: [{required: true, message: '请输入介绍', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (routerName.value === 'Fund/add' || routerName.value === 'Fund/edit') {
|
||||
tag = '专项资金'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
console.log('上传文件', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
formData.value.files.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
|
||||
const submitParam = (item) => {
|
||||
let files = []
|
||||
item.files.forEach(item => {
|
||||
let obj = {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
return {
|
||||
fundAmount: item.fundAmount,
|
||||
introduce: item.introduce,
|
||||
name: item.name,
|
||||
files: files,
|
||||
// deploymentId: processInstanceData.value.deploymentId
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
const {msg, code} = await addFund(submitParam(formData.value))
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Fund'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
if (!route.query.id) return
|
||||
let params = {
|
||||
id: route.query.id,
|
||||
...submitParam(formData.value)
|
||||
}
|
||||
resubmitFund(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Fund'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
getWorkflowInfo().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getFundDetail(route.query.id).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
showTinymce.value = false
|
||||
showTable.value = false
|
||||
nextTick(() => {
|
||||
showTinymce.value = true
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
loading.value = true
|
||||
// await init()
|
||||
if (route.query.id) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
48
src/views/special-fund/detail.vue
Normal file
48
src/views/special-fund/detail.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<special-fund-detail :formData="fundData.formData" :data="fundData" :showTable="showTable" :processViewer="fundProcessViewer"
|
||||
:loading="loading"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getFundDetail} from "@/api/special-fund";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const fundData = ref({})
|
||||
const fundProcessViewer = ref(true)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const getDetail = async () => {
|
||||
const specialFundId = route.query.id
|
||||
showTable.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getFundDetail(specialFundId)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (code === 1000) {
|
||||
fundData.value = data
|
||||
loading.value = false
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
// if(data.operationList==null)return;
|
||||
// processStore.setDesign(data)
|
||||
// processStore.runningList.value = data.runningList;
|
||||
// processStore.endList.value = data.endList;
|
||||
// processStore.noTakeList.value = data.noTakeList;
|
||||
// processStore.refuseList.value = data.refuseList;
|
||||
// processStore.passList.value = data.passList;
|
||||
|
||||
}else {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
149
src/views/special-fund/index.vue
Normal file
149
src/views/special-fund/index.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '专项资金名称',
|
||||
prop: 'name',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入专项资金名称查询'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
cacheKey: 'special_fund'
|
||||
}
|
||||
},
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '专项资金名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'fundAmount',
|
||||
label: '专项资金金额',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'residualAmount',
|
||||
label: '剩余金额',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state == undefined) {
|
||||
return '--'
|
||||
} else {
|
||||
return (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
// let buttons = new Set(Array.from(row.buttons))
|
||||
// if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/special/fund',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add', color: '#DED0B2', auth: ''},
|
||||
{name: '导出', key: '_export', color: '#DED0B2', auth: ''},
|
||||
]
|
||||
})
|
||||
const tableIns = ref()
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Fund/detail',
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
name: 'Fund/add',
|
||||
query: {}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Fund/edit',
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
})
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
case 'export':
|
||||
handleExport()
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -385,7 +385,7 @@ const restDataForm = () => {
|
||||
state: "1",
|
||||
// isDefault:0,
|
||||
isType: true,
|
||||
theme: 'dark',
|
||||
theme: 'plain',
|
||||
listClass: 'primary',
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user