政策课题入会流程

This commit is contained in:
zyn
2023-10-19 14:50:19 +08:00
parent 4e1b75d9b7
commit 98b7d903f3
17 changed files with 2479 additions and 24 deletions
@@ -0,0 +1,101 @@
<template>
<div>
<div class="action-bar">
<el-button :disabled="disabled" type="primary" class="common-button-primary add-button" size="mini" @click="onAdd">
添加
</el-button>
<el-button :disabled="disabled || selectedList.length <= 0" type="primary" class="common-button-primary add-button" size="mini" @click="onDelete">
批量删除
</el-button>
</div>
<el-table border
class="table"
ref="selection"
:data="tableData"
tooltip-effect="dark"
style="width: 100%;"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<template v-for="item in options">
<el-table-column
:prop="item.prop"
:label="item.label"
align="center">
<template slot-scope="{ row, column, $index }">
<!--<el-form-item :prop="'meetingList.' + $index + '.meetingName'" :rules="rules.meetingName" label-width="0">-->
<!-- <el-input :disabled="disabled" style="margin: 10px 0;" v-model="row.meetingName"></el-input>-->
<!--</el-form-item>-->
<el-form-item :prop="parentProp + '.' + $index + '.' + item.prop" :rules="rules[item.prop]" label-width="0">
<el-input v-if="!disabled" :disabled="disabled" v-model="row[item.prop]"></el-input>
<span v-else>{{ row[item.prop] }}</span>
</el-form-item>
</template>
</el-table-column>
</template>
</el-table>
</div>
</template>
<script>
export default {
name: "TableFormItem",
props: {
data: {
type: Array,
required: true
},
// [ { label: '会议名称', prop: 'meetingName' } ]
options: {
type: Array,
required: true
},
parentProp: {
type: String,
required: true
},
disabled: {
type: Boolean,
default: () => false
},
rules: {
type: Object
}
},
computed: {
tableData () {
return this.data.map((item, index) => {
item.index = index
return item
})
}
},
data () {
return {
selectedList: [],
}
},
methods: {
handleSelectionChange (selection) {
this.selectedList = []
selection.forEach(item => {
this.selectedList.push(item.index)
})
},
onAdd () {
this.$emit('add')
},
onDelete () {
this.$emit('delete', this.selectedList)
}
}
}
</script>
<style scoped lang="less">
.table {
/deep/ .el-form-item {
margin-bottom: 0 !important;
}
}
</style>
@@ -120,10 +120,10 @@ export default {
label: "内外部会议入库流程",
value: "29"
},
// {
// label: "政策课题入会流程",
// value: "30"
// },
{
label: "政策课题入会流程",
value: "30"
},
],
formDisableFlag: false,
pickerOptions: {
@@ -307,8 +307,8 @@ export default {
this.footerLoading = true
const json = JSON.stringify(this.form);
const query = {
taskIds: this.taskIds,
userId : this.userId,
taskId: this.$route.query.taskIds,
userId:this.$store.getters.userInfo.userId,
json: json
}
completeTask(query).then(res => {
@@ -0,0 +1,103 @@
<template>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<InputFormItem label="课题名称"
prop="topicName"
v-model="form.topicName"
:disabled="disabled">
</InputFormItem>
<InputFormItem label="课题指导单位"
prop="guidanceUnit"
v-model="form.guidanceUnit"
:disabled="disabled">
</InputFormItem>
<DatePickerFormItem label="启动时间"
prop="startTime"
v-model="form.startTime"
:disabled="disabled">
</DatePickerFormItem>
<SelectFormItem label="课题状态"
prop="topicStatus"
v-model="form.topicStatus"
:disabled="true"
:options="topicStatusOptions"
></SelectFormItem>
<UploadFormItem
label="协议"
prop="agreement"
:ids.sync="form.agreement"
:names.sync="form.agreementName"
:disabled="disabled">
</UploadFormItem>
</el-col>
<el-col :span="12">
<InputFormItem label="课题承办单位"
prop="organizer"
v-model="form.organizer"
:disabled="disabled">
</InputFormItem>
<InputFormItem label="课题参与单位"
prop="participatingUnit"
v-model="form.participatingUnit"
:disabled="disabled">
</InputFormItem>
<DatePickerFormItem label="结题时间"
prop="closeTime"
v-model="form.closeTime"
:disabled="disabled">
</DatePickerFormItem>
<InputFormItem label="课题费用(万元)"
prop="topicCost"
v-model="form.topicCost"
:disabled="disabled">
</InputFormItem>
</el-col>
</el-row>
</div>
</template>
<script>
import InputFormItem from '@/components/hzwlComponents/InputFormItem'
import DatePickerFormItem from '@/components/hzwlComponents/DatePickerFormItem'
import UploadFormItem from "@/components/hzwlComponents/UploadFormItem";
import SelectFormItem from "@/components/hzwlComponents/SelectFormItem";
export default {
name: "Basic",
components: {
InputFormItem,
DatePickerFormItem,
UploadFormItem,
SelectFormItem
},
props: {
form: {
type: Object,
required: true
},
disabled: {
type: Boolean,
default: () => false
},
},
data () {
const topicStatusOptions = [
{
label: '进行中',
value: '进行中'
},
{
label: '已结题',
value: '已结题'
},
]
return {
topicStatusOptions
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,69 @@
<template>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<UploadFormItem
label="立项报告"
prop="insideProjectProposalReport"
:ids.sync="form.insideProjectProposalReport"
:names.sync="form.insideProjectProposalReportName"
:disabled="disabled">
</UploadFormItem>
<UploadFormItem
label="会议资料"
prop="insideConferenceMaterials"
:ids.sync="form.insideConferenceMaterials"
:names.sync="form.insideConferenceMaterialsName"
:disabled="disabled">
</UploadFormItem>
<UploadFormItem
label="其他"
prop="insideOther"
:ids.sync="form.insideOther"
:names.sync="form.insideOtherName"
:disabled="disabled">
</UploadFormItem>
</el-col>
<el-col :span="12">
<UploadFormItem
label="研究方案"
prop="other"
:ids.sync="form.insideResearchPlan"
:names.sync="form.insideResearchPlanName"
:disabled="disabled">
</UploadFormItem>
<UploadFormItem
label="研究成果"
prop="insideResearchFindings"
:ids.sync="form.insideResearchFindings"
:names.sync="form.insideResearchFindingsName"
:disabled="disabled">
</UploadFormItem>
</el-col>
</el-row>
</div>
</template>
<script>
import UploadFormItem from "@/components/hzwlComponents/UploadFormItem";
export default {
name: "ResearchGroupMaterials",
components: {
UploadFormItem,
},
props: {
form: {
type: Object,
required: true
},
disabled: {
type: Boolean,
default: () => false
},
},
}
</script>
<style scoped>
</style>
@@ -0,0 +1,69 @@
<template>
<el-timeline>
<el-form
ref="userForm"
:model="roleForm"
:rules="roleRules"
class="label-input-form">
<TimeLineFormItem
prop="applyUserName"
timestamp="发起流程"
title="流程发起人"
:id.sync="roleForm.applyUserId"
:name.sync="roleForm.applyUserName"
disabled />
<TimeLineFormItem
prop="ministerIdName"
timestamp="审核"
title="法规认证部部长"
multiple
:id.sync="roleForm.ministerId"
:name.sync="roleForm.ministerIdName"
:disabled="disabled"
/>
<TimeLineFormItem
prop="inspectorIdName"
timestamp="审定"
title="法规认证部副总监"
multiple
:id.sync="roleForm.inspectorId"
:name.sync="roleForm.inspectorIdName"
:disabled="disabled"
/>
<TimeLineFormItem
prop="presidentIdName"
timestamp="批准"
title="公司副总"
:id.sync="roleForm.presidentId"
:name.sync="roleForm.presidentIdName"
:disabled="disabled"
/>
</el-form>
</el-timeline>
</template>
<script>
import TimeLineFormItem from '@/components/hzwlComponents/TimeLineFormItem'
export default {
name: "PersonInfo",
components: {
TimeLineFormItem
},
props: {
roleForm: {
type: Object
},
roleRules: {
type: Object
},
disabled: {
type: Boolean,
default: false
}
},
}
</script>
<style scoped>
</style>
@@ -0,0 +1,64 @@
<template>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<UploadFormItem
label="研究方案"
prop="researchPlan"
:ids.sync="form.researchPlan"
:names.sync="form.researchPlanName"
:disabled="disabled">
</UploadFormItem>
<UploadFormItem
label="研究成果"
prop="researchFindings"
:ids.sync="form.researchFindings"
:names.sync="form.researchFindingsName"
:disabled="disabled">
</UploadFormItem>
</el-col>
<el-col :span="12">
<UploadFormItem
label="其他"
prop="other"
:ids.sync="form.other"
:names.sync="form.otherName"
:disabled="disabled">
</UploadFormItem>
<UploadFormItem
label="会议资料"
prop="conferenceMaterials"
:ids.sync="form.conferenceMaterials"
:names.sync="form.conferenceMaterialsName"
accept=".pdf, .PDF, .doc, .DOC, .docx, .DOCX, .ppt, .PPT, .pptx, .PPTX, .xls, .XLS, .xlsx, .XLSX, .pdg, .PDG, .mp3, .MP3, .Ogg, .Wav, .mp4, .MP4, .WebM"
:size="2048"
:disabled="disabled">
</UploadFormItem>
</el-col>
</el-row>
</div>
</template>
<script>
import UploadFormItem from "@/components/hzwlComponents/UploadFormItem";
export default {
name: "ResearchGroupMaterials",
components: {
UploadFormItem,
},
props: {
form: {
type: Object,
required: true
},
disabled: {
type: Boolean,
default: () => false
},
},
}
</script>
<style scoped>
</style>
@@ -0,0 +1,100 @@
<template>
<div>
<div class="action-bar">
<el-button :disabled="disabled" type="primary" class="common-button-primary add-button" size="mini" @click="onAdd">
添加
</el-button>
<el-button :disabled="disabled || selectedList.length <= 0" type="primary" class="common-button-primary add-button" size="mini" @click="onDelete">
批量删除
</el-button>
</div>
<el-table border
class="table"
ref="selection"
:data="tableData"
tooltip-effect="dark"
style="width: 100%;"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<template v-for="item in options">
<el-table-column
:prop="item.prop"
:label="item.label"
align="center">
<template slot-scope="{ row, column, $index }">
<!--<el-form-item :prop="'meetingList.' + $index + '.meetingName'" :rules="rules.meetingName" label-width="0">-->
<!-- <el-input :disabled="disabled" style="margin: 10px 0;" v-model="row.meetingName"></el-input>-->
<!--</el-form-item>-->
<el-form-item :prop="parentProp + '.' + $index + '.' + item.prop" :rules="rules[item.prop]" label-width="0">
<el-input :disabled="disabled" v-model="row[item.prop]"></el-input>
</el-form-item>
</template>
</el-table-column>
</template>
</el-table>
</div>
</template>
<script>
export default {
name: "TableFormItem",
props: {
data: {
type: Array,
required: true
},
// [ { label: '会议名称', prop: 'meetingName' } ]
options: {
type: Array,
required: true
},
parentProp: {
type: String,
required: true
},
disabled: {
type: Boolean,
default: () => false
},
rules: {
type: Object
}
},
computed: {
tableData () {
return this.data.map((item, index) => {
item.index = index
return item
})
}
},
data () {
return {
selectedList: [],
}
},
methods: {
handleSelectionChange (selection) {
this.selectedList = []
selection.forEach(item => {
this.selectedList.push(item.index)
})
},
onAdd () {
this.$emit('add')
},
onDelete () {
this.$emit('delete', this.selectedList)
}
}
}
</script>
<style scoped lang="less">
.table {
/deep/ .el-form-item {
margin-bottom: 0 !important;
}
}
</style>
@@ -0,0 +1,552 @@
<template>
<div class="wrapper">
<ProcessHeader toggle>
<template slot="proName">政策课题入会流程</template>
<template slot="proNode">{{ title }}</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div v-if="!showProcess" class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</div>
<div v-else class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content">
<el-form v-if="reloadForm"
ref="form"
:model="form"
:rules="rules"
class="label-input-form"
label-width="210px"
>
<div v-show="active === '1'">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<Basic :form="form" :disabled="disabled"></Basic>
<ProcessTitle>
<template slot="title">课题组会议</template>
</ProcessTitle>
<TableFormItem
:data="form.meetingList"
:options="options.meetingList"
parentProp="meetingList"
:rules="rules"
:disabled="disabled"
@add="add('meetingList')"
@delete="onDelete('meetingList', $event)"
></TableFormItem>
<ProcessTitle>
<template slot="title">课题组资料</template>
</ProcessTitle>
<ResearchGroupMaterials :form="form" :disabled="disabled"></ResearchGroupMaterials>
<ProcessTitle>
<template slot="title">课题组联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.topicContactInformationList"
:options="options.topicContactInformationList"
parentProp="topicContactInformationList"
:rules="rules"
:disabled="disabled"
@add="add('topicContactInformationList')"
@delete="onDelete('topicContactInformationList', $event)"
></TableFormItem>
<ProcessTitle>
<template slot="title">内部资料</template>
</ProcessTitle>
<InsideMaterials :form="form" :disabled="disabled"></InsideMaterials>
<ProcessTitle>
<template slot="title">内部联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.insideContactInformationList"
:options="options.insideContactInformationList"
parentProp="insideContactInformationList"
:rules="rules"
:disabled="disabled"
@add="add('insideContactInformationList')"
@delete="onDelete('insideContactInformationList', $event)"
></TableFormItem>
<ReceiptDescription v-model="form.commentText" title="回执说明" :disabled="disabled"></ReceiptDescription>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '2'">
<PersonInfo ref="roleForm" :roleForm="roleForm" :roleRules="roleRules" :disabled="disabled"></PersonInfo>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '3'">
<ApprovalHistory :data="processData" :loading="processLoading"></ApprovalHistory>
</div>
</el-form>
</div>
<ProcessFooter
v-show="!disabled"
show-save
show-submit
:submitLoading="footerLoading"
:saveLoading="footerLoading"
@save="handleSave"
@submit="handleSubmit"
>
</ProcessFooter>
</div>
</template>
<script>
import ProcessTitle from '@/pages/processCenter/pages/components/ProcessTitle'
import ProcessHeader from '@/pages/processCenter/pages/components/ProcessHeader'
import ProcessFooter from '@/pages/processCenter/pages/components/ProcessFooter'
import Basic from "./components/Basic";
import TableFormItem from "@/components/hzwlComponents/TableFormItem";
import ResearchGroupMaterials from "./components/ResearchGroupMaterials";
import InsideMaterials from "./components/InsideMaterials";
import PersonInfo from "./components/PersonInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import { saveTaskFirst, queryTaskFirst, inboundLiaisonDetail, taskDel, saveTaskForPub } from 'api/process'
export default {
name: "policyTopicEnrollmentStep1",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter,
Basic,
TableFormItem,
ResearchGroupMaterials,
InsideMaterials,
PersonInfo,
ReceiptDescription,
ApprovalHistory
},
data () {
const form = {
// 基础信息
topicName: '',
organizer: '',
guidanceUnit: '',
participatingUnit: '',
startTime: '',
closeTime: '',
topicStatus: '',
topicCost: '',
agreement: '',
agreementName: '',
// 课题组会议
meetingList: [
{
meetingName: '',
meetingTime: '',
meetingAddress: '',
participants: '',
meetingContent: '',
}
],
// 课题组资料
researchPlan: '',
researchPlanName: '',
researchFindings: '',
researchFindingsName: '',
other: '',
otherName: '',
conferenceMaterials: '',
conferenceMaterialsName: '',
// 课题组联系方式
topicContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
// 内部资料
insideProjectProposalReport: '',
insideProjectProposalReportName: '',
insideResearchPlan: '',
insideResearchPlanName: '',
insideConferenceMaterials: '',
insideConferenceMaterialsName: '',
insideResearchFindings: '',
insideResearchFindingsName: '',
insideOther: '',
insideOtherName: '',
// 内部联系方式
insideContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
commentText: ''
}
const rules = {
topicName: [
{required: true, type: 'string', message: '课题名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题名称不能超过500个字符', trigger: 'change'}
],
organizer: [
{required: true, type: 'string', message: '课题承办单位不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题承办单位不能超过500个字符', trigger: 'change'}
],
guidanceUnit: [
{type: 'string', max: 500, message: '课题指导单位不能超过500个字符', trigger: 'change'}
],
participatingUnit: [
{type: 'string', max: 500, message: '课题参与单位不能超过500个字符', trigger: 'change'}
],
startTime: [
{required: true, message: '启动时间不能为空', trigger: 'change'}
],
topicStatus: [
{required: true, type: 'string', message: '课题状态不能为空', trigger: 'change'},
],
topicCost: [
{type: 'string', max: 500, message: '课题费用(万元)不能超过500个字符', trigger: 'change'}
],
meetingName: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
],
meetingTime: [
{type: 'string', max: 500, message: '会议时间不能超过500个字符', trigger: 'change'}
],
meetingAddress: [
{type: 'string', max: 500, message: '会议地点不能超过500个字符', trigger: 'change'}
],
participants: [
{type: 'string', max: 500, message: '参会人员(内部)不能超过500个字符', trigger: 'change'}
],
meetingContent: [
{type: 'string', max: 500, message: '会议主要内容不能超过500个字符', trigger: 'change'}
],
name: [
{type: 'string', max: 500, message: '姓名不能超过500个字符', trigger: 'change'}
],
department: [
{type: 'string', max: 500, message: '单位不能超过500个字符', trigger: 'change'}
],
phone: [
{type: 'string', max: 500, message: '电话不能超过500个字符', trigger: 'change'}
],
email: [
{type: 'string', max: 500, message: '邮箱不能超过500个字符', trigger: 'change'}
],
identity: [
{type: 'string', max: 500, message: '身份不能超过500个字符', trigger: 'change'}
],
}
const roleForm ={
applyUserId: this.$store.getters.userInfo.userId,
applyUserName: this.$store.getters.userInfo.userName,
ministerId: '',
ministerIdName: '',
inspectorId: '',
inspectorIdName: '',
presidentId: '',
presidentIdName: '',
}
const roleRules = {
ministerIdName: [
{required: true, message: '请选择法规认证部部长', trigger: 'change'},
],
inspectorIdName: [
{required: true, message: '请选择法规认证部总监', trigger: 'change'},
],
presidentIdName: [
{required: true, message: '请选择公司副总', trigger: 'change'},
]
}
const options = {
meetingList: [
{ label: '会议名称', prop: 'meetingName' },
{ label: '会议时间', prop: 'meetingTime' },
{ label: '会议地点', prop: 'meetingAddress' },
{ label: '参会人员(内部)', prop: 'participants' },
{ label: '会议主要内容', prop: 'meetingContent' },
],
topicContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
insideContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
}
return {
title: '起草',
active: '1',
disabled: false,
footerLoading: false,
reloadForm: true,
form,
rules,
roleForm,
roleRules,
options,
// 审批历史
processData: [],
processLoading: false,
showProcess: false
}
},
watch: {
'form.startTime' () {
this.setTopicStatus()
},
'form.closeTime' () {
this.setTopicStatus()
},
},
created() {
this.getData()
this.processTable()
},
methods: {
handleTabs(tab) {
this.active = tab
},
setTopicStatus () {
if (!this.form.startTime) {
this.form.topicStatus = ''
}
if (this.form.startTime && !this.form.closeTime) {
this.form.topicStatus = '进行中'
}
if (this.form.startTime && this.form.closeTime) {
this.form.topicStatus = '已结题'
}
},
add (type) {
let item = {}
switch (type) {
case 'meetingList':
item = {
meetingName: '',
meetingTime: '',
meetingAddress: '',
participants: '',
meetingContent: '',
}
break
case 'topicContactInformationList':
case 'insideContactInformationList':
item = {
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
break
}
this.form[type] = [...this.form[type], item]
},
getData () {
const { bpnId, taskIds, prcId, disabledXX, verifySarStandard } = this.$route.query
if (disabledXX) {
this.disabled = disabledXX
}
// 重新起草
if (taskIds) {
this.title = '重新起草'
// 监控
if (verifySarStandard) {
this.title = '起草'
}
inboundLiaisonDetail({
taskIds,
pId: prcId
}).then(res => {
if (res) {
this.reloadForm = false
const processForm = JSON.parse(res.mesg)
this.form = JSON.parse(JSON.stringify(processForm))
this.roleForm = {
applyUserId: processForm.applyUserId,
applyUserName: processForm.applyUserName,
jlUserId: processForm.jlUserId,
jlUserName: processForm.jlUserName,
}
this.$nextTick(() => {
this.reloadForm = true
})
}
})
return;
}
// 根据草稿查询流程详情
if(bpnId) {
queryTaskFirst({ bpnId }).then(res => {
this.reloadForm = false
let mes = JSON.parse(res.mes)
this.$set(this, 'form', mes.form)
this.roleForm = mes.roleForm
this.$nextTick(() => {
this.reloadForm = true
})
})
}
},
// 审批历史
processTable () {
if (this.$route.query.prcNum) {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum
}, {
loading: 'processLoading',
_this: this
}, res => {
this.$set(this, 'processData', res)
}, e => {})
}
},
onDelete (type, keys) {
const list = this.form[type].filter((meeting, index) => !keys.includes(index))
this.form[type] = [...list]
},
//保存
handleSave() {
this.footerLoading = true
let _formData = new FormData()
_formData.append('prcType', '30')
if (this.$route.query.taskIds) {
// 流程保存
_formData.append('taskIds', this.$route.query.taskIds)
_formData.append('json', JSON.stringify(this.form))
saveTaskForPub(_formData).then(res => {
this.$message.success('保存成功')
}).finally(e => {
this.footerLoading = false
})
} else {
_formData.append('id', this.$route.query.bpnId || '') // 草稿id
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.uName)
_formData.append('prcName', '政策课题入会流程')
_formData.append('json', JSON.stringify({
taskInfo: '起草',
form: this.form,
roleForm: this.roleForm,
}))
// 保存草稿
saveTaskFirst(_formData).then(res => {
this.$message.success('保存成功')
this.bpnId = res.result
this.$router.replace({
path: this.$route.path,
query: {
prcType: '30',
bpnId: res.result
}
})
}).finally(e => {
this.footerLoading = false
})
}
},
async submit () {
this.footerLoading = true
const json = Object.assign(this.form, this.roleForm);
let completeTaskQuery = {}
if (this.$route.query.taskIds) {
// 重新起草
completeTaskQuery = {
taskIds: this.$route.query.taskIds,
userId : this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}
} else {
// 起草
const startProcessRollBackQuery = {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '30',
json: JSON.stringify(json)
}
const res = await this.$http._post('lawss/activiti/startProcessRollBack', startProcessRollBackQuery)
if(!res.ok) return;
completeTaskQuery = {
taskIds: res.data,
userId : this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}
}
const completeTaskRef = await this.$http._post('lawss/activiti/completeTask', completeTaskQuery)
if (!completeTaskRef.success) return;
this.$message.success(completeTaskRef.message)
this.footerLoading = false
if (this.$route.query.bpnId !== '') {
// 删除草稿
taskDel({ id: this.$route.query.bpnId })
}
// 流程提交之后,应该流转至待办任务页面
await this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
},
handleSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$refs['roleForm'].$refs['userForm'].validate((valid) => {
if (valid) {
this.submit()
}else {
this.$message.warning('请检查人员信息表单是否填写完整')
}
})
} else {
this.$message.warning('请检查基础信息表单是否填写完整')
}
})
},
}
}
</script>
<style scoped lang="less">
.wrapper{
position: relative;
height: 100%;
}
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
</style>
@@ -0,0 +1,436 @@
<template>
<div class="wrapper">
<ProcessHeader toggle>
<template slot="proName">政策课题入会流程</template>
<template slot="proNode">审核</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content">
<el-form v-if="reloadForm"
ref="form"
:model="form"
:rules="rules"
class="label-input-form"
label-width="210px"
>
<div v-show="active === '1'">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<Basic :form="form" :disabled="disabled"></Basic>
<ProcessTitle>
<template slot="title">课题组会议</template>
</ProcessTitle>
<TableFormItem
:data="form.meetingList"
:options="options.meetingList"
parentProp="meetingList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ProcessTitle>
<template slot="title">课题组资料</template>
</ProcessTitle>
<ResearchGroupMaterials :form="form" :disabled="disabled"></ResearchGroupMaterials>
<ProcessTitle>
<template slot="title">课题组联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.topicContactInformationList"
:options="options.topicContactInformationList"
parentProp="topicContactInformationList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ProcessTitle>
<template slot="title">内部资料</template>
</ProcessTitle>
<InsideMaterials :form="form" :disabled="disabled"></InsideMaterials>
<ProcessTitle>
<template slot="title">内部联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.insideContactInformationList"
:options="options.insideContactInformationList"
parentProp="insideContactInformationList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ReceiptDescription v-model="form.commentText" title="回执说明"></ReceiptDescription>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '3'">
<ApprovalHistory :data="processData" :loading="processLoading"></ApprovalHistory>
</div>
</el-form>
</div>
<ProcessFooter
show-submit
show-over2
show-transfer
approval
:submitLoading="footerLoading"
:saveLoading="footerLoading"
@submit="handleApprove"
@over2="handleOver"
@transfer="handleTransfer"
>
</ProcessFooter>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessTitle from '@/pages/processCenter/pages/components/ProcessTitle'
import ProcessHeader from '@/pages/processCenter/pages/components/ProcessHeader'
import ProcessFooter from '@/pages/processCenter/pages/components/ProcessFooter'
import Basic from "./components/Basic";
import TableFormItem from "@/components/hzwlComponents/TableFormItem";
import ResearchGroupMaterials from "./components/ResearchGroupMaterials";
import InsideMaterials from "./components/InsideMaterials";
import PersonInfo from "./components/PersonInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import { inboundLiaisonDetail, changeAssigneeNew } from 'api/process'
export default {
name: "policyTopicEnrollmentStep2",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter,
Basic,
TableFormItem,
ResearchGroupMaterials,
InsideMaterials,
PersonInfo,
ReceiptDescription,
ApprovalHistory
},
data () {
const form = {
// 基础信息
topicName: '',
organizer: '',
guidanceUnit: '',
participatingUnit: '',
startTime: '',
closeTime: '',
topicStatus: '',
topicCost: '',
agreement: '',
agreementName: '',
// 课题组会议
meetingList: [
{
meetingName: '',
meetingTime: '',
meetingAddress: '',
participants: '',
meetingContent: '',
}
],
// 课题组资料
researchPlan: '',
researchPlanName: '',
researchFindings: '',
researchFindingsName: '',
other: '',
otherName: '',
conferenceMaterials: '',
conferenceMaterialsName: '',
// 课题组联系方式
topicContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
// 内部资料
insideProjectProposalReport: '',
insideProjectProposalReportName: '',
insideResearchPlan: '',
insideResearchPlanName: '',
insideConferenceMaterials: '',
insideConferenceMaterialsName: '',
insideResearchFindings: '',
insideResearchFindingsName: '',
insideOther: '',
insideOtherName: '',
// 内部联系方式
insideContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
commentText: ''
}
const rules = {
topicName: [
{required: true, type: 'string', message: '课题名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题名称不能超过500个字符', trigger: 'change'}
],
organizer: [
{required: true, type: 'string', message: '课题承办单位不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题承办单位不能超过500个字符', trigger: 'change'}
],
guidanceUnit: [
{type: 'string', max: 500, message: '课题指导单位不能超过500个字符', trigger: 'change'}
],
participatingUnit: [
{type: 'string', max: 500, message: '课题参与单位不能超过500个字符', trigger: 'change'}
],
startTime: [
{required: true, message: '启动时间不能为空', trigger: 'change'}
],
topicStatus: [
{required: true, type: 'string', message: '课题状态不能为空', trigger: 'change'},
],
topicCost: [
{type: 'string', max: 500, message: '课题费用(万元)不能超过500个字符', trigger: 'change'}
],
meetingName: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
],
meetingTime: [
{type: 'string', max: 500, message: '会议时间不能超过500个字符', trigger: 'change'}
],
meetingAddress: [
{type: 'string', max: 500, message: '会议地点不能超过500个字符', trigger: 'change'}
],
participants: [
{type: 'string', max: 500, message: '参会人员(内部)不能超过500个字符', trigger: 'change'}
],
meetingContent: [
{type: 'string', max: 500, message: '会议主要内容不能超过500个字符', trigger: 'change'}
],
name: [
{type: 'string', max: 500, message: '姓名不能超过500个字符', trigger: 'change'}
],
department: [
{type: 'string', max: 500, message: '单位不能超过500个字符', trigger: 'change'}
],
phone: [
{type: 'string', max: 500, message: '电话不能超过500个字符', trigger: 'change'}
],
email: [
{type: 'string', max: 500, message: '邮箱不能超过500个字符', trigger: 'change'}
],
identity: [
{type: 'string', max: 500, message: '身份不能超过500个字符', trigger: 'change'}
],
}
const options = {
meetingList: [
{ label: '会议名称', prop: 'meetingName' },
{ label: '会议时间', prop: 'meetingTime' },
{ label: '会议地点', prop: 'meetingAddress' },
{ label: '参会人员(内部)', prop: 'participants' },
{ label: '会议主要内容', prop: 'meetingContent' },
],
topicContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
insideContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
}
return {
active: '1',
disabled: true,
footerLoading: false,
reloadForm: true,
form,
rules,
options,
// 审批历史
processData: [],
processLoading: false,
// 选人
drawerModal: false,
drawerTitle: '',
nodeList: [],
}
},
created() {
this.getData()
this.processTable()
},
methods: {
handleTabs(tab) {
this.active = tab
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res.ok) {
this.reloadForm = false
const processForm = JSON.parse(res.mesg)
this.form = JSON.parse(JSON.stringify(processForm))
this.form.commentText = '' // 置空意见
this.$nextTick(() => {
this.reloadForm = true
})
} else {
this.$message.warning(res.message)
}
}).catch(e => {
})
})
},
// 审批历史
processTable () {
this.processLoading = true
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum
}, {
loading: 'processLoading',
_this: this
}, res => {
this.$set(this, 'processData', res)
this.processLoading = false
}, e => {})
},
handleOver(){
// 驳回
this.form.approvalOpinion = 1
this.handleSubmit()
},
handleApprove(){
// 通过
this.form.approvalOpinion = 0
this.handleSubmit()
},
addRule () {
if (this.form.approvalOpinion === 0) {
this.rules.commentText = [
{ required: false }
]
this.$refs.form.clearValidate('commentText')
}else {
this.rules.commentText = [
{ required: true, message: '审批意见不能为空' }
]
}
this.rules = { ...this.rules }
},
// 提交
handleSubmit() {
this.addRule()
this.$refs['form'].validate((valid) => {
if (valid) {
this.footerLoading = true
const json = JSON.stringify(this.form);
const query = {
taskIds: this.taskIds,
userId : this.userId,
json: json
}
this.$http._post('lawss/activiti/completeTask', query).then(res => {
if (res.success) {
if(this.form.approvalOpinion === 1){
this.$message.warning("驳回成功")
}else{
this.$message.success('操作成功')
}
this.footerLoading = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
} else {
this.footerLoading = false
this.$message.error(res.message)
}
})
} else {
this.$message.warning('请检查基础信息表单是否填写完整')
}})
},
handleTransfer() {
this.drawerModal = true
this.drawerTitle = '转办处理人'
},
// 转办
checkedRole (data) {
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId: this.$store.getters.userInfo.userId, // 委托人
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
} else {
this.$message.warning(res.message)
}
})
}
}
}
</script>
<style scoped lang="less">
.wrapper{
position: relative;
height: 100%;
}
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
</style>
@@ -0,0 +1,436 @@
<template>
<div class="wrapper">
<ProcessHeader toggle>
<template slot="proName">政策课题入会流程</template>
<template slot="proNode">审定</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content">
<el-form v-if="reloadForm"
ref="form"
:model="form"
:rules="rules"
class="label-input-form"
label-width="210px"
>
<div v-show="active === '1'">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<Basic :form="form" :disabled="disabled"></Basic>
<ProcessTitle>
<template slot="title">课题组会议</template>
</ProcessTitle>
<TableFormItem
:data="form.meetingList"
:options="options.meetingList"
parentProp="meetingList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ProcessTitle>
<template slot="title">课题组资料</template>
</ProcessTitle>
<ResearchGroupMaterials :form="form" :disabled="disabled"></ResearchGroupMaterials>
<ProcessTitle>
<template slot="title">课题组联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.topicContactInformationList"
:options="options.topicContactInformationList"
parentProp="topicContactInformationList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ProcessTitle>
<template slot="title">内部资料</template>
</ProcessTitle>
<InsideMaterials :form="form" :disabled="disabled"></InsideMaterials>
<ProcessTitle>
<template slot="title">内部联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.insideContactInformationList"
:options="options.insideContactInformationList"
parentProp="insideContactInformationList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ReceiptDescription v-model="form.commentText" title="回执说明"></ReceiptDescription>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '3'">
<ApprovalHistory :data="processData" :loading="processLoading"></ApprovalHistory>
</div>
</el-form>
</div>
<ProcessFooter
show-submit
show-over2
show-transfer
approval
:submitLoading="footerLoading"
:saveLoading="footerLoading"
@submit="handleApprove"
@over2="handleOver"
@transfer="handleTransfer"
>
</ProcessFooter>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessTitle from '@/pages/processCenter/pages/components/ProcessTitle'
import ProcessHeader from '@/pages/processCenter/pages/components/ProcessHeader'
import ProcessFooter from '@/pages/processCenter/pages/components/ProcessFooter'
import Basic from "./components/Basic";
import TableFormItem from "@/components/hzwlComponents/TableFormItem";
import ResearchGroupMaterials from "./components/ResearchGroupMaterials";
import InsideMaterials from "./components/InsideMaterials";
import PersonInfo from "./components/PersonInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import { inboundLiaisonDetail, changeAssigneeNew } from 'api/process'
export default {
name: "policyTopicEnrollmentStep2",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter,
Basic,
TableFormItem,
ResearchGroupMaterials,
InsideMaterials,
PersonInfo,
ReceiptDescription,
ApprovalHistory
},
data () {
const form = {
// 基础信息
topicName: '',
organizer: '',
guidanceUnit: '',
participatingUnit: '',
startTime: '',
closeTime: '',
topicStatus: '',
topicCost: '',
agreement: '',
agreementName: '',
// 课题组会议
meetingList: [
{
meetingName: '',
meetingTime: '',
meetingAddress: '',
participants: '',
meetingContent: '',
}
],
// 课题组资料
researchPlan: '',
researchPlanName: '',
researchFindings: '',
researchFindingsName: '',
other: '',
otherName: '',
conferenceMaterials: '',
conferenceMaterialsName: '',
// 课题组联系方式
topicContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
// 内部资料
insideProjectProposalReport: '',
insideProjectProposalReportName: '',
insideResearchPlan: '',
insideResearchPlanName: '',
insideConferenceMaterials: '',
insideConferenceMaterialsName: '',
insideResearchFindings: '',
insideResearchFindingsName: '',
insideOther: '',
insideOtherName: '',
// 内部联系方式
insideContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
commentText: ''
}
const rules = {
topicName: [
{required: true, type: 'string', message: '课题名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题名称不能超过500个字符', trigger: 'change'}
],
organizer: [
{required: true, type: 'string', message: '课题承办单位不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题承办单位不能超过500个字符', trigger: 'change'}
],
guidanceUnit: [
{type: 'string', max: 500, message: '课题指导单位不能超过500个字符', trigger: 'change'}
],
participatingUnit: [
{type: 'string', max: 500, message: '课题参与单位不能超过500个字符', trigger: 'change'}
],
startTime: [
{required: true, message: '启动时间不能为空', trigger: 'change'}
],
topicStatus: [
{required: true, type: 'string', message: '课题状态不能为空', trigger: 'change'},
],
topicCost: [
{type: 'string', max: 500, message: '课题费用(万元)不能超过500个字符', trigger: 'change'}
],
meetingName: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
],
meetingTime: [
{type: 'string', max: 500, message: '会议时间不能超过500个字符', trigger: 'change'}
],
meetingAddress: [
{type: 'string', max: 500, message: '会议地点不能超过500个字符', trigger: 'change'}
],
participants: [
{type: 'string', max: 500, message: '参会人员(内部)不能超过500个字符', trigger: 'change'}
],
meetingContent: [
{type: 'string', max: 500, message: '会议主要内容不能超过500个字符', trigger: 'change'}
],
name: [
{type: 'string', max: 500, message: '姓名不能超过500个字符', trigger: 'change'}
],
department: [
{type: 'string', max: 500, message: '单位不能超过500个字符', trigger: 'change'}
],
phone: [
{type: 'string', max: 500, message: '电话不能超过500个字符', trigger: 'change'}
],
email: [
{type: 'string', max: 500, message: '邮箱不能超过500个字符', trigger: 'change'}
],
identity: [
{type: 'string', max: 500, message: '身份不能超过500个字符', trigger: 'change'}
],
}
const options = {
meetingList: [
{ label: '会议名称', prop: 'meetingName' },
{ label: '会议时间', prop: 'meetingTime' },
{ label: '会议地点', prop: 'meetingAddress' },
{ label: '参会人员(内部)', prop: 'participants' },
{ label: '会议主要内容', prop: 'meetingContent' },
],
topicContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
insideContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
}
return {
active: '1',
disabled: true,
footerLoading: false,
reloadForm: true,
form,
rules,
options,
// 审批历史
processData: [],
processLoading: false,
// 选人
drawerModal: false,
drawerTitle: '',
nodeList: [],
}
},
created() {
this.getData()
this.processTable()
},
methods: {
handleTabs(tab) {
this.active = tab
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res.ok) {
this.reloadForm = false
const processForm = JSON.parse(res.mesg)
this.form = JSON.parse(JSON.stringify(processForm))
this.form.commentText = '' // 置空意见
this.$nextTick(() => {
this.reloadForm = true
})
} else {
this.$message.warning(res.message)
}
}).catch(e => {
})
})
},
// 审批历史
processTable () {
this.processLoading = true
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum
}, {
loading: 'processLoading',
_this: this
}, res => {
this.$set(this, 'processData', res)
this.processLoading = false
}, e => {})
},
handleOver(){
// 驳回
this.form.approvalOpinion = 1
this.handleSubmit()
},
handleApprove(){
// 通过
this.form.approvalOpinion = 0
this.handleSubmit()
},
addRule () {
if (this.form.approvalOpinion === 0) {
this.rules.commentText = [
{ required: false }
]
this.$refs.form.clearValidate('commentText')
}else {
this.rules.commentText = [
{ required: true, message: '审批意见不能为空' }
]
}
this.rules = { ...this.rules }
},
// 提交
handleSubmit() {
this.addRule()
this.$refs['form'].validate((valid) => {
if (valid) {
this.footerLoading = true
const json = JSON.stringify(this.form);
const query = {
taskIds: this.taskIds,
userId : this.userId,
json: json
}
this.$http._post('lawss/activiti/completeTask', query).then(res => {
if (res.success) {
if(this.form.approvalOpinion === 1){
this.$message.warning("驳回成功")
}else{
this.$message.success('操作成功')
}
this.footerLoading = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
} else {
this.footerLoading = false
this.$message.error(res.message)
}
})
} else {
this.$message.warning('请检查基础信息表单是否填写完整')
}})
},
handleTransfer() {
this.drawerModal = true
this.drawerTitle = '转办处理人'
},
// 转办
checkedRole (data) {
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId: this.$store.getters.userInfo.userId, // 委托人
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
} else {
this.$message.warning(res.message)
}
})
},
}
}
</script>
<style scoped lang="less">
.wrapper{
position: relative;
height: 100%;
}
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
</style>
@@ -0,0 +1,456 @@
<template>
<div class="wrapper">
<ProcessHeader toggle>
<template slot="proName">政策课题入会流程</template>
<template slot="proNode">批准</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content">
<el-form v-if="reloadForm"
ref="form"
:model="form"
:rules="rules"
class="label-input-form"
label-width="210px"
>
<div v-show="active === '1'">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<Basic :form="form" :disabled="disabled"></Basic>
<ProcessTitle>
<template slot="title">课题组会议</template>
</ProcessTitle>
<TableFormItem
:data="form.meetingList"
:options="options.meetingList"
parentProp="meetingList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ProcessTitle>
<template slot="title">课题组资料</template>
</ProcessTitle>
<ResearchGroupMaterials :form="form" :disabled="disabled"></ResearchGroupMaterials>
<ProcessTitle>
<template slot="title">课题组联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.topicContactInformationList"
:options="options.topicContactInformationList"
parentProp="topicContactInformationList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ProcessTitle>
<template slot="title">内部资料</template>
</ProcessTitle>
<InsideMaterials :form="form" :disabled="disabled"></InsideMaterials>
<ProcessTitle>
<template slot="title">内部联系方式</template>
</ProcessTitle>
<TableFormItem
:data="form.insideContactInformationList"
:options="options.insideContactInformationList"
parentProp="insideContactInformationList"
:rules="rules"
:disabled="disabled"
></TableFormItem>
<ReceiptDescription v-model="form.commentText" title="回执说明"></ReceiptDescription>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '3'">
<ApprovalHistory :data="processData" :loading="processLoading"></ApprovalHistory>
</div>
</el-form>
</div>
<ProcessFooter
show-submit
show-over2
show-transfer
approval
:submitLoading="footerLoading"
:saveLoading="footerLoading"
@submit="handleApprove"
@over2="handleOver"
@transfer="handleTransfer"
>
</ProcessFooter>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessTitle from '@/pages/processCenter/pages/components/ProcessTitle'
import ProcessHeader from '@/pages/processCenter/pages/components/ProcessHeader'
import ProcessFooter from '@/pages/processCenter/pages/components/ProcessFooter'
import Basic from "./components/Basic";
import TableFormItem from "@/components/hzwlComponents/TableFormItem";
import ResearchGroupMaterials from "./components/ResearchGroupMaterials";
import InsideMaterials from "./components/InsideMaterials";
import PersonInfo from "./components/PersonInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import { saveTaskFirst, queryTaskFirst, inboundLiaisonDetail, taskDel, saveTaskForPub, changeAssigneeNew } from 'api/process'
export default {
name: "policyTopicEnrollmentStep2",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter,
Basic,
TableFormItem,
ResearchGroupMaterials,
InsideMaterials,
PersonInfo,
ReceiptDescription,
ApprovalHistory
},
data () {
const form = {
// 基础信息
topicName: '',
organizer: '',
guidanceUnit: '',
participatingUnit: '',
startTime: '',
closeTime: '',
topicStatus: '',
topicCost: '',
agreement: '',
agreementName: '',
// 课题组会议
meetingList: [
{
meetingName: '',
meetingTime: '',
meetingAddress: '',
participants: '',
meetingContent: '',
}
],
// 课题组资料
researchPlan: '',
researchPlanName: '',
researchFindings: '',
researchFindingsName: '',
other: '',
otherName: '',
conferenceMaterials: '',
conferenceMaterialsName: '',
// 课题组联系方式
topicContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
// 内部资料
insideProjectProposalReport: '',
insideProjectProposalReportName: '',
insideResearchPlan: '',
insideResearchPlanName: '',
insideConferenceMaterials: '',
insideConferenceMaterialsName: '',
insideResearchFindings: '',
insideResearchFindingsName: '',
insideOther: '',
insideOtherName: '',
// 内部联系方式
insideContactInformationList: [
{
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
],
commentText: ''
}
const rules = {
topicName: [
{required: true, type: 'string', message: '课题名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题名称不能超过500个字符', trigger: 'change'}
],
organizer: [
{required: true, type: 'string', message: '课题承办单位不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题承办单位不能超过500个字符', trigger: 'change'}
],
guidanceUnit: [
{type: 'string', max: 500, message: '课题指导单位不能超过500个字符', trigger: 'change'}
],
participatingUnit: [
{type: 'string', max: 500, message: '课题参与单位不能超过500个字符', trigger: 'change'}
],
startTime: [
{required: true, message: '启动时间不能为空', trigger: 'change'}
],
topicStatus: [
{required: true, type: 'string', message: '课题状态不能为空', trigger: 'change'},
],
topicCost: [
{type: 'string', max: 500, message: '课题费用(万元)不能超过500个字符', trigger: 'change'}
],
meetingName: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
],
meetingTime: [
{type: 'string', max: 500, message: '会议时间不能超过500个字符', trigger: 'change'}
],
meetingAddress: [
{type: 'string', max: 500, message: '会议地点不能超过500个字符', trigger: 'change'}
],
participants: [
{type: 'string', max: 500, message: '参会人员(内部)不能超过500个字符', trigger: 'change'}
],
meetingContent: [
{type: 'string', max: 500, message: '会议主要内容不能超过500个字符', trigger: 'change'}
],
name: [
{type: 'string', max: 500, message: '姓名不能超过500个字符', trigger: 'change'}
],
department: [
{type: 'string', max: 500, message: '单位不能超过500个字符', trigger: 'change'}
],
phone: [
{type: 'string', max: 500, message: '电话不能超过500个字符', trigger: 'change'}
],
email: [
{type: 'string', max: 500, message: '邮箱不能超过500个字符', trigger: 'change'}
],
identity: [
{type: 'string', max: 500, message: '身份不能超过500个字符', trigger: 'change'}
],
}
const options = {
meetingList: [
{ label: '会议名称', prop: 'meetingName' },
{ label: '会议时间', prop: 'meetingTime' },
{ label: '会议地点', prop: 'meetingAddress' },
{ label: '参会人员(内部)', prop: 'participants' },
{ label: '会议主要内容', prop: 'meetingContent' },
],
topicContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
insideContactInformationList: [
{ label: '姓名', prop: 'name' },
{ label: '单位', prop: 'department' },
{ label: '电话', prop: 'phone' },
{ label: '邮箱', prop: 'email' },
{ label: '身份', prop: 'identity' },
],
}
return {
active: '1',
disabled: true,
footerLoading: false,
reloadForm: true,
form,
rules,
options,
// 审批历史
processData: [],
processLoading: false,
// 选人
drawerModal: false,
drawerTitle: '',
nodeList: [],
}
},
created() {
this.getData()
this.processTable()
},
methods: {
handleTabs(tab) {
this.active = tab
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res.ok) {
this.reloadForm = false
const processForm = JSON.parse(res.mesg)
this.form = JSON.parse(JSON.stringify(processForm))
this.form.commentText = '' // 置空意见
this.$nextTick(() => {
this.reloadForm = true
})
} else {
this.$message.warning(res.message)
}
}).catch(e => {
})
})
},
// 审批历史
processTable () {
this.processLoading = true
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum
}, {
loading: 'processLoading',
_this: this
}, res => {
this.$set(this, 'processData', res)
this.processLoading = false
}, e => {})
},
handleOver(){
// 驳回
this.form.approvalOpinion = 1
this.handleSubmit()
},
handleApprove(){
// 通过
this.form.approvalOpinion = 0
this.handleSubmit()
},
addRule () {
if (this.form.approvalOpinion === 0) {
this.rules.commentText = [
{ required: false }
]
this.$refs.form.clearValidate('commentText')
}else {
this.rules.commentText = [
{ required: true, message: '审批意见不能为空' }
]
}
this.rules = { ...this.rules }
},
// 提交
handleSubmit() {
this.addRule()
this.$refs['form'].validate((valid) => {
if (valid) {
this.footerLoading = true
const json = JSON.stringify(this.form);
const query = {
taskIds: this.taskIds,
userId : this.userId,
json: json
}
this.$http._post('lawss/activiti/completeTask', query).then(res => {
if (res.success) {
if(this.form.approvalOpinion === 1){
this.$message.warning("驳回成功")
}else{
this.processCreate()
}
this.footerLoading = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
} else {
this.footerLoading = false
this.$message.error(res.message)
}
})
} else {
this.$message.warning('请检查基础信息表单是否填写完整')
}})
},
// 流程入库
processCreate (json) {
const _formData = new FormData()
_formData.append('infoJson', json)
alert('入库')
// processCreateMeeting(_formData).then(res => {
// if (res.result === '操作成功' || res.data === '入库成功') {
// this.$message.success(res.data)
// setTimeout(() => {
// this.$router.push({
// name: 'ProcessCenter'
// })
// }, 100)
// } else {
// this.$message.warning(res.message)
// }
// }).finally(() => {
// this.footerLoading = false
// })
},
handleTransfer() {
this.drawerModal = true
this.drawerTitle = '转办处理人'
},
// 转办
checkedRole (data) {
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId: this.$store.getters.userInfo.userId, // 委托人
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
} else {
this.$message.warning(res.message)
}
})
},
}
}
</script>
<style scoped lang="less">
.wrapper{
position: relative;
height: 100%;
}
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
</style>
@@ -285,8 +285,8 @@ export default {
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId
}).then(res => {
if (res) {
this.reloadForm = false
@@ -338,7 +338,7 @@ export default {
checkedRole (data) {
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
userId: this.$store.getters.userInfo.userId, // 委托人
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
@@ -382,8 +382,8 @@ export default {
this.footerLoading = true
const json = JSON.stringify(this.form);
const query = {
taskIds: this.taskIds,
userId : this.userId,
taskIds: this.$route.query.taskIds,
userId : this.$store.getters.userInfo.userId,
json: json
}
this.$http._post('lawss/activiti/completeTask', query).then(res => {
@@ -301,7 +301,7 @@
<div class="process-box">
<div class="process-name">
<el-card shadow="hover" v-btn-permission="'b196ef0253cebd1adfc3a8432a28e377'">
<div class="card-box" @click="handleCreateProcess('17')">
<div class="card-box" @click="handleCreateProcess('30')">
<div class="card-top">
<div class="card-top-left">
<img :src="getImg(Math.floor(Math.random() * 6))">
@@ -619,6 +619,12 @@ export default {
name: 'policyMeetings1'
})
break
case '30':
// 政策课题入会流程
this.$router.push({
name: 'policyTopicEnrollmentStep1'
})
break
}
},
checkPermission(permissionIdArray) {
@@ -2282,7 +2282,34 @@ export default {
})
}
break
case '30': {
let routeName = ''
switch (row.taskInfo) {
case '审核':
routeName = 'policyTopicEnrollmentStep2'
break
case '审定':
routeName = 'policyTopicEnrollmentStep3'
break
case '批准':
routeName = 'policyTopicEnrollmentStep4'
break
case '重新起草':
routeName = 'policyTopicEnrollmentStep1'
break
}
this.$router.push({
name: routeName,
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}
break
}
},
...mapMutations(['setProcess', 'setHandleInfo']),
@@ -962,17 +962,17 @@ export default {
})
break
// 政策课题入会流程
// case '30': {
// this.$router.push({
// name: 'policyTopicEnrollmentStep1',
// query: {
// prcType: '30',
// processName: '政策课题入会流程',
// bpnId: id,
// }
// })
// break
// }
case '30': {
this.$router.push({
name: 'policyTopicEnrollmentStep1',
query: {
prcType: '30',
processName: '政策课题入会流程',
bpnId: id,
}
})
break
}
}
},
...mapMutations(['setProcess', 'setHandleInfo']),
+36
View File
@@ -2036,6 +2036,42 @@ const routes = [
title: '政策课题入会流程'
}
},
{
path: '/policyTopicEnrollmentStep1',
name: 'policyTopicEnrollmentStep1',
component: () => import('@/pages/processCenter/pages/creatProcess/policyTopicEnrollment/step1.vue'),
meta: {
requireAuth: true,
title: '政策课题入会流程'
}
},
{
path: '/policyTopicEnrollmentStep2',
name: 'policyTopicEnrollmentStep2',
component: () => import('@/pages/processCenter/pages/creatProcess/policyTopicEnrollment/step2.vue'),
meta: {
requireAuth: true,
title: '政策课题入会流程'
}
},
{
path: '/policyTopicEnrollmentStep3',
name: 'policyTopicEnrollmentStep3',
component: () => import('@/pages/processCenter/pages/creatProcess/policyTopicEnrollment/step3.vue'),
meta: {
requireAuth: true,
title: '政策课题入会流程'
}
},
{
path: '/policyTopicEnrollmentStep4',
name: 'policyTopicEnrollmentStep4',
component: () => import('@/pages/processCenter/pages/creatProcess/policyTopicEnrollment/step4.vue'),
meta: {
requireAuth: true,
title: '政策课题入会流程'
}
},
{
path: '/zcchStep1',
name: 'zcchStep1',