修改政策入库、内外部会议流程

This commit is contained in:
zyn
2023-10-19 11:33:14 +08:00
parent 21606aa5d3
commit 4e1b75d9b7
8 changed files with 181 additions and 125 deletions
@@ -7,7 +7,7 @@
<el-input <el-input
:disabled="disabled" :disabled="disabled"
:value="name" :value="name"
:placeholder="title" :placeholder="`选择${title}`"
readonly readonly
@click.native="choice(id)"></el-input> @click.native="choice(id)"></el-input>
</div> </div>
@@ -80,7 +80,7 @@ export default {
}, },
accept: { accept: {
type: String, type: String,
default: '.pdf, .PDF, .ppt, .PPT, .pptx, .PPTX, .doc, .DOC, .docx, .DOCX, .xls, .xlsx' default: '.pdf, .PDF, .doc, .DOC, .docx, .DOCX, .ppt, .PPT, .pptx, .PPTX, .xls, .XLS, .xlsx, .XLSX, .pdg, .PDG'
}, },
size: { size: {
type: Number, type: Number,
@@ -118,8 +118,12 @@ export default {
}, },
{ {
label: "内外部会议入库流程", label: "内外部会议入库流程",
value: "28" value: "29"
} },
// {
// label: "政策课题入会流程",
// value: "30"
// },
], ],
formDisableFlag: false, formDisableFlag: false,
pickerOptions: { pickerOptions: {
@@ -6,7 +6,7 @@
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div v-if="title === '起草'" class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</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 v-else class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div> </div>
<div class="content"> <div class="content">
@@ -72,7 +72,7 @@ import PersonInfo from "./components/PersonInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription"; import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory"; import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import { getDicTypeListCode, saveTaskFirst, queryTaskFirst, inboundLiaisonDetail, taskDel } from 'api/process' import { getDicTypeListCode, saveTaskFirst, queryTaskFirst, inboundLiaisonDetail, taskDel, saveTaskForPub } from 'api/process'
export default { export default {
name: "policyMeetings1", name: "policyMeetings1",
@@ -186,6 +186,7 @@ export default {
// 审批历史 // 审批历史
processData: [], processData: [],
processLoading: false, processLoading: false,
showProcess: false,
} }
}, },
created() { created() {
@@ -218,25 +219,18 @@ export default {
this.form.meetingTopicList = [ ...res ] this.form.meetingTopicList = [ ...res ]
}, },
getData () { getData () {
const { bpnId, taskIds, prcId, disabledXX } = this.$route.query const { bpnId, taskIds, prcId, disabledXX, verifySarStandard } = this.$route.query
// 1. 根据草稿查询流程详情 2.已办、已发、监控:查看流程数据
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
})
})
}
if (disabledXX) { if (disabledXX) {
this.disabled = disabledXX this.disabled = disabledXX
} }
// 重新起草 // 重新起草
if (taskIds) { if (taskIds) {
this.title = '重新起草' this.title = '重新起草'
if (verifySarStandard) {
this.title = '起草'
}
this.showProcess = true
inboundLiaisonDetail({ inboundLiaisonDetail({
taskIds, taskIds,
pId: prcId pId: prcId
@@ -256,6 +250,20 @@ export default {
}) })
} }
}) })
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
})
})
} }
}, },
// 审批历史 // 审批历史
@@ -275,31 +283,41 @@ export default {
handleSave() { handleSave() {
this.footerLoading = true this.footerLoading = true
let _formData = new FormData() let _formData = new FormData()
_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('prcType', '29') _formData.append('prcType', '29')
_formData.append('prcName', '内外部会议入库流程')
_formData.append('json', JSON.stringify({ if (this.$route.query.taskIds) {
taskInfo: '起草', // 重新起草保存
form: this.form, _formData.append('taskIds', this.$route.query.taskIds)
roleForm: this.roleForm, _formData.append('json', JSON.stringify(this.form))
})) saveTaskForPub(_formData).then(res => {
// 保存草稿 this.$message.success('保存成功')
saveTaskFirst(_formData).then(res => { }).finally(e => {
this.$message.success('保存成功') this.footerLoading = false
this.bpnId = res.result
this.$router.replace({
path: this.$route.path,
query: {
prcType: '29',
processName: '申请人发起流程',
bpnId: res.result
}
}) })
}).finally(e => { } else {
this.footerLoading = false _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.$router.replace({
path: this.$route.path,
query: {
prcType: '29',
bpnId: res.result
}
})
}).finally(e => {
this.footerLoading = false
})
}
}, },
async submit () { async submit () {
this.footerLoading = true this.footerLoading = true
@@ -322,7 +340,10 @@ export default {
json: JSON.stringify(json) json: JSON.stringify(json)
} }
const res = await this.$http._post('lawss/activiti/startProcessRollBack', startProcessRollBackQuery) const res = await this.$http._post('lawss/activiti/startProcessRollBack', startProcessRollBackQuery)
if(!res.ok) return; if(!res.ok) {
this.footerLoading = false
return this.$message.error(res.message)
}
completeTaskQuery = { completeTaskQuery = {
taskIds: res.data, taskIds: res.data,
@@ -331,12 +352,15 @@ export default {
} }
} }
const completeTaskRef = await this.$http._post('lawss/activiti/completeTask', completeTaskQuery) const completeTaskRef = await this.$http._post('lawss/activiti/completeTask', completeTaskQuery)
if (!completeTaskRef.success) return; if (!completeTaskRef.success) {
this.$message.success(completeTaskRef.message) this.footerLoading = false
return this.$message.error(completeTaskRef.message)
}
this.$message.success(completeTaskRef.message)
this.footerLoading = false this.footerLoading = false
if (this.$route.query.bpnId !== '') { if (this.$route.query.bpnId && this.$route.query.bpnId !== '') {
// 删除草稿 // 删除草稿
taskDel({ id: this.$route.query.bpnId }) taskDel({ id: this.$route.query.bpnId })
} }
@@ -1,7 +1,7 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<ProcessHeader toggle> <ProcessHeader toggle>
<template slot="proName">政策入库流程</template> <template slot="proName">内外部会议入库流程</template>
<template slot="proNode">批准</template> <template slot="proNode">批准</template>
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
@@ -76,7 +76,7 @@ import PersonInfo from "./components/PersonInfo";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory"; import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription"; import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import { getDicTypeListCode, inboundLiaisonDetail, changeAssigneeNew, processCreateMeeting } from 'api/process' import { getDicTypeListCode, inboundLiaisonDetail, changeAssigneeNew, processCreateMeeting, completeTask } from 'api/process'
export default { export default {
name: "policyMeetings2", name: "policyMeetings2",
components: { components: {
@@ -228,8 +228,8 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
inboundLiaisonDetail({ inboundLiaisonDetail({
taskIds: this.taskIds, taskIds: this.$route.query.taskIds,
pId: this.pId pId: this.$route.query.prcId
}).then(res => { }).then(res => {
if (res) { if (res) {
this.reloadForm = false this.reloadForm = false
@@ -306,13 +306,12 @@ export default {
if (valid) { if (valid) {
this.footerLoading = true this.footerLoading = true
const json = JSON.stringify(this.form); const json = JSON.stringify(this.form);
this.$http.post('lawss/activiti/completeTask', { const query = {
userId:this.$store.getters.userInfo.userId, taskIds: this.taskIds,
taskIds: this.$route.query.taskIds, userId : this.userId,
json json: json
}, { }
_this: this completeTask(query).then(res => {
}, res => {
if (res.success) { if (res.success) {
if(this.form.approvalOpinion === 1){ if(this.form.approvalOpinion === 1){
this.$message.warning("驳回成功") this.$message.warning("驳回成功")
@@ -322,6 +321,9 @@ export default {
}else{ }else{
this.processCreate(json) this.processCreate(json)
} }
} else {
this.footerLoading = false
this.$message.error(res.message)
} }
}) })
} else { } else {
@@ -6,7 +6,7 @@
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div v-if="title === '起草'" class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</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 v-else class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div> </div>
<div class="content"> <div class="content">
@@ -58,7 +58,7 @@ import RelatesInfo from "./components/RelatesInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription"; import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import PersonInfo from "./components/PersonInfo"; import PersonInfo from "./components/PersonInfo";
import {saveTaskFirst, queryTaskFirst, taskDel, inboundLiaisonDetail} from "api/process"; import {saveTaskFirst, queryTaskFirst, taskDel, inboundLiaisonDetail, saveTaskForPub} from "api/process";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory"; import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
export default { export default {
@@ -248,10 +248,11 @@ export default {
rules: {}, rules: {},
roleRules, roleRules,
reloadForm: true, // 重新渲染表单 reloadForm: true, // 重新渲染表单
bpnId: this.$route.query.bpnId || '', // bpnId: this.$route.query.bpnId || '',
// 审批历史 // 审批历史
processData: [], processData: [],
processLoading: false, processLoading: false,
showProcess: false
} }
}, },
created() { created() {
@@ -286,28 +287,18 @@ export default {
}) })
}, },
getData () { getData () {
const { taskIds, prcId, disabledXX } = this.$route.query const { taskIds, prcId, disabledXX, verifySarStandard } = this.$route.query
// 1. 根据草稿查询流程详情 2.已办、已发、监控:查看流程数据
if(this.$route.query.bpnId){
queryTaskFirst({
bpnId: this.$route.query.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
})
})
}
if (disabledXX) { if (disabledXX) {
this.disabled = disabledXX this.disabled = disabledXX
} }
// 重新起草 // 重新起草
if (taskIds) { if (taskIds) {
this.title = '重新起草' this.title = '重新起草'
if (verifySarStandard) {
this.title = '起草'
}
this.showProcess = true
inboundLiaisonDetail({ inboundLiaisonDetail({
taskIds, taskIds,
pId: prcId pId: prcId
@@ -329,6 +320,22 @@ export default {
} }
}).catch(e => { }).catch(e => {
}) })
return;
}
// 根据草稿查询流程详情
if(this.$route.query.bpnId){
queryTaskFirst({
bpnId: this.$route.query.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
})
})
} }
}, },
// 审批历史 // 审批历史
@@ -356,32 +363,41 @@ export default {
handleSave() { handleSave() {
this.footerLoading = true this.footerLoading = true
let _formData = new FormData() let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.uName)
_formData.append('prcType', 'laws1') _formData.append('prcType', 'laws1')
_formData.append('prcName', '政策入库流程') if (this.$route.query.taskIds) {
_formData.append('json', JSON.stringify({ // 重新起草保存
taskInfo: '起草', _formData.append('taskIds', this.$route.query.taskIds)
form: this.form, _formData.append('json', JSON.stringify(this.form))
roleForm: this.roleForm, saveTaskForPub(_formData).then(res => {
})) this.$message.success('保存成功')
// 保存草稿 }).finally(e => {
saveTaskFirst(_formData).then(res => { this.footerLoading = false
this.footerLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
this.$router.replace({
path: this.$route.path,
query: {
type: 'laws1',
processName: '申请人发起流程',
bpnId: res.result
}
}) })
}).catch(e => { } else {
this.footerLoading = false _formData.append('id', this.$route.query.bpnId || '')
}) _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: {
type: 'laws1',
bpnId: res.result
}
})
}).finally(e => {
this.footerLoading = false
})
}
}, },
async submit () { async submit () {
this.footerLoading = true this.footerLoading = true
@@ -403,8 +419,12 @@ export default {
type: 'laws1', type: 'laws1',
json: JSON.stringify(json) json: JSON.stringify(json)
} }
// 发起流程
const res = await this.$http._post('lawss/activiti/startProcessRollBack', startProcessRollBackQuery) const res = await this.$http._post('lawss/activiti/startProcessRollBack', startProcessRollBackQuery)
if(!res.ok) return; if(!res.ok) {
this.footerLoading = false
return this.$message.error(res.message)
}
completeTaskQuery = { completeTaskQuery = {
taskIds: res.data, taskIds: res.data,
@@ -413,12 +433,15 @@ export default {
} }
} }
const completeTaskRef = await this.$http._post('lawss/activiti/completeTask', completeTaskQuery) const completeTaskRef = await this.$http._post('lawss/activiti/completeTask', completeTaskQuery)
if (!completeTaskRef.success) return; if (!completeTaskRef.success) {
this.$message.success(completeTaskRef.message) this.footerLoading = false
return this.$message.error(completeTaskRef.message)
}
this.$message.success(completeTaskRef.message)
this.footerLoading = false this.footerLoading = false
if (this.$route.query.bpnId !== '') { if (this.$route.query.bpnId && this.$route.query.bpnId !== '') {
// 删除草稿 // 删除草稿
taskDel({ id: this.$route.query.bpnId }) taskDel({ id: this.$route.query.bpnId })
} }
@@ -64,8 +64,8 @@ import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import PersonInfo from "./components/PersonInfo"; import PersonInfo from "./components/PersonInfo";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory"; import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import {inboundLiaisonDetail,processCreateLaws,changeAssigneeNew} from 'api/process' import {inboundLiaisonDetail, processCreateLaws, changeAssigneeNew, completeTask} from 'api/process'
import {saveTaskFirst, queryTaskFirst, taskDel} from "api/process";
export default { export default {
name: "zrckStep2", name: "zrckStep2",
components: { components: {
@@ -381,13 +381,12 @@ export default {
if (valid) { if (valid) {
this.footerLoading = true this.footerLoading = true
const json = JSON.stringify(this.form); const json = JSON.stringify(this.form);
this.$http.post('lawss/activiti/completeTask', { const query = {
taskIds: this.taskIds, taskIds: this.taskIds,
userId : this.userId, userId : this.userId,
json: json json: json
}, { }
_this: this this.$http._post('lawss/activiti/completeTask', query).then(res => {
}, res => {
if (res.success) { if (res.success) {
if(this.form.approvalOpinion === 1){ if(this.form.approvalOpinion === 1){
this.$message.warning("驳回成功") this.$message.warning("驳回成功")
@@ -397,6 +396,9 @@ export default {
}else{ }else{
this.processCreateLaws(json) this.processCreateLaws(json)
} }
} else {
this.footerLoading = false
this.$message.error(res.message)
} }
}) })
} else { } else {
@@ -820,24 +820,11 @@ export default {
break break
// 政策入库、 // 政策入库、
case 'laws1': case 'laws1':
let routeName = ''
let processName=''
if (mes && mes.taskInfo) {
switch (mes.taskInfo) {
case '起草':
routeName = 'policyWarehousing1'
processName = '申请人发起流程'
break
}
} else {
routeName = 'policyWarehousing1'
processName = '申请人发起流程'
}
this.$router.push({ this.$router.push({
name: routeName, name: 'policyWarehousing1',
query: { query: {
type: 'laws1', type: 'laws1',
processName, processName: '政策入库流程',
bpnId: id, bpnId: id,
} }
}) })
@@ -963,15 +950,29 @@ export default {
} }
}) })
break break
// 内外部会议入库流程
case '29': case '29':
this.$router.push({ this.$router.push({
name: 'policyMeetings1', name: 'policyMeetings1',
query: { query: {
prcType: '29', prcType: '29',
processName: '申请人发起流程', processName: '内外部会议入库流程',
bpnId: id bpnId: id
} }
}) })
break
// 政策课题入会流程
// case '30': {
// this.$router.push({
// name: 'policyTopicEnrollmentStep1',
// query: {
// prcType: '30',
// processName: '政策课题入会流程',
// bpnId: id,
// }
// })
// break
// }
} }
}, },
...mapMutations(['setProcess', 'setHandleInfo']), ...mapMutations(['setProcess', 'setHandleInfo']),