政策入库流程-批准

This commit is contained in:
zyn
2023-09-26 17:09:23 +08:00
parent 8be6696f63
commit 313ba1cd0c
6 changed files with 587 additions and 64 deletions
@@ -67,7 +67,8 @@
<el-col :span="12">
<DatePickerFormItem label="发文日期"
prop="issueTime"
v-model="form.issueTime" >
v-model="form.issueTime"
:disabled="disabled">
</DatePickerFormItem>
</el-col>
<el-col :span="12">
@@ -81,7 +82,8 @@
<DataRangePickerFormItem label="征集意见周期"
prop="commentCycleDate"
:startTime.sync="form.commentCycleStart"
:endTime.sync="form.commentCycleEnd">
:endTime.sync="form.commentCycleEnd"
:disabled="disabled">
</DataRangePickerFormItem>
</el-col>
<el-col :span="12">
@@ -2,7 +2,7 @@
<div class="wrapper">
<ProcessHeader toggle>
<template slot="proName">政策入库流程</template>
<template slot="proNode">发起流程</template>
<template slot="proNode">起草</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
@@ -22,7 +22,7 @@
<TextInfo :form="form" :dict="dict"></TextInfo>
<Range :form="form" :dict="dict"></Range>
<RelatesInfo :form="form" :dict="dict"></RelatesInfo>
<ReceiptDescription v-model="form.commentText"></ReceiptDescription>
<ReceiptDescription v-model="form.commentText" title="回执说明"></ReceiptDescription>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '2'">
<PersonInfo ref="roleForm" :roleForm="roleForm" :roleRules="roleRules"></PersonInfo>
@@ -56,7 +56,7 @@ import PersonInfo from "./components/PersonInfo";
import {saveTaskFirst, queryTaskFirst, taskDel} from "api/process";
export default {
name: "ZrckStep1",
name: "zrckStep1",
components: {
ProcessHeader,
ProcessFooter,
@@ -290,7 +290,7 @@ export default {
_formData.append('prcType', 'laws1')
_formData.append('prcName', '政策入库流程')
_formData.append('json', JSON.stringify({
taskInfo: '申请人发起',
taskInfo: '起',
form: this.form,
roleForm: this.roleForm,
}))
@@ -329,14 +329,14 @@ export default {
if (res.success) {
this.$message.success(res.message)
this.footerLoading = false
if (this.$route.query.bpnId !== '') {
let taskId = {
id: this.$route.query.bpnId
}
// if (this.$route.query.bpnId !== '') {
// let taskId = {
// id: this.$route.query.bpnId
// }
// taskDel(taskId).then(res=>{
// return res
// })
}
// }
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}
@@ -0,0 +1,475 @@
<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'">
<Basic :form="form" :dict="dict" :disabled="disabled"></Basic>
<EffectiveDate :form="form" :dict="dict" :disabled="disabled"></EffectiveDate>
<TextInfo :form="form" :dict="dict" :disabled="disabled"></TextInfo>
<Range :form="form" :dict="dict" :disabled="disabled"></Range>
<RelatesInfo :form="form" :dict="dict" :disabled="disabled"></RelatesInfo>
<ReceiptDescription v-model="form.commentText" prop="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
:submitLoading="footerLoading"
:saveLoading="footerLoading"
@transfer="handleTransfer"
@submit="handleApprove"
@over2="handleOver"
>
</ProcessFooter>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessHeader from '@/pages/processCenter/pages/components//ProcessHeader'
import ProcessFooter from '@/pages/processCenter/pages/components//ProcessFooter'
import Basic from "./components/Basic";
import EffectiveDate from "./components/EffectiveDate";
import TextInfo from "./components/TextInfo";
import Range from "./components/Range";
import RelatesInfo from "./components/RelatesInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import PersonInfo from "./components/PersonInfo";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import {inboundLiaisonDetail,processCreateLaws,changeAssigneeNew} from 'api/process'
import {saveTaskFirst, queryTaskFirst, taskDel} from "api/process";
export default {
name: "zrckStep2",
components: {
ProcessHeader,
ProcessFooter,
Basic,
EffectiveDate,
TextInfo,
Range,
RelatesInfo,
ReceiptDescription,
PersonInfo,
ApprovalHistory
},
data () {
const form = {
// 基础信息
lawsTypeFirstLevel: '',
lawsTypeSecondLevel: '',
lawsTypeThirdLevel: '',
lawsTypeFourthLevel: '',
lawsName: '',
lawsEnName: '',
lawsNo: '',
issueTime: '',
issueCompany: '',
commentCycleStart: '',// 征集意见周期
commentCycleEnd: '',// 征集意见周期
lawsTextState: '',
lawsSycx: '',
isRelateAccess: '2',
lawsYear: '',
lawsNotisyncNum: '',
NotisyncNumLink: '',
lawsBulletin: '',
lawsLabel: '',
lawsRemark: '',
// 实施日期
SSRQLAWS: '',
XRZSSRQLAWS: '',
ZCXSSRQLAWS: '',
XCXSSRQLAWS: '',
SXRQLAWS: '',
// 文本信息
ZCWBLAWS: '',
ZCWBLAWSName: '',
JDWJLAWS: '',
JDWJLAWSName: '',
GCWBLAWS: '',
GCWBLAWSName: '',
// 适用范围
CYSDLAWS: '',
TGDWLAWS: '',
TGDWLAWSID: '',
ZRBMLAWS: '',
ZRBMLAWSID: '',
TGRLAWS: '',
SYRZLAWS: '',
ZRGCSLAWS: '',
// 关联信息
DTWJHLAWS: '',
GLWJLAWS: '',
GLWJLAWSName: '',
YYBZZCLAWS: '',
// 回执说明
commentText:''
}
const roleForm = {
jlUserId: '',
jlUserName: '',
prcCreateUser: this.$store.getters.userInfo.userId,
prcCreateUserName: this.$store.getters.userInfo.userName,
}
// 完整校验
const moreSarLawsStandRules = {
lawsTypeFirstLevel: [
{required: true, message: '1级政策分类不能为空', trigger: 'change'}
],
lawsTypeSecondLevel: [
{required: true, message: '2级政策分类不能为空', trigger: 'change'}
],
lawsTypeThirdLevel: [
{required: true, message: '3级政策分类不能为空', trigger: 'change'}
],
lawsTypeFourthLevel: [
{required: true, message: '4级政策分类不能为空', trigger: 'change'}
],
lawsName: [
{required: true, message: '政策名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '政策名称不能超过500个字符', trigger: 'change'},
{validator: this.verify.checkSpecialCharacterOftags, trigger: 'change'}
],
lawsEnName: [
// {required: false, message: '英文名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '英文名称不能超过500个字符', trigger: 'change'},
{validator: this.verify.valiateEnName, trigger: 'change'}
],
lawsNo: [
// {required: true, type: 'string', message: '政策文号不能为空', trigger: 'change'},
{type: 'string', max: 100, message: '政策文号不能超过100个字符', trigger: 'change'}
],
issueTime: [
{required: true, message: '发文日期不能为空', trigger: 'change'},
],
issueCompany: [
{required: true, type: 'string', message: '发文单位不能为空', trigger: 'change'},
{type: 'string', max: 100, message: '发文单位不能超过100个字符', trigger: 'change'}
],
lawsTextState: [
{required: true, message: '文本状态不能为空', trigger: 'change'}
],
isRelateAccess: [
{required: true, message: '是否纳入认证清单不能为空', trigger: 'change'}
],
lawsYear: [
{required: true, message: '年度不能为空', trigger: 'change'}
],
lawsNotisyncNum: [
{type: 'string', max: 500, message: '福田转发通知文号不能超过500个字符', trigger: 'change'}
],
lawsRemark: [
{type: 'string', max: 500, message: '备注不能超过500个字符', trigger: 'change'}
],
SSRQLAWS: [
{required: true, message: '实施日期不能为空', trigger: 'change'}
]
}
// 认证清单为否 的校验
const littleSarLawsStandRules = {
lawsTypeFirstLevel: [
{required: true, message: '1级政策分类不能为空', trigger: 'change'}
],
lawsTypeSecondLevel: [
{required: true, message: '2级政策分类不能为空', trigger: 'change'}
],
lawsTypeThirdLevel: [
{required: true, message: '3级政策分类不能为空', trigger: 'change'}
],
lawsTypeFourthLevel: [
{required: true, message: '4级政策分类不能为空', trigger: 'change'}
],
lawsName: [
{required: true, message: '政策名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '政策名称不能超过500个字符', trigger: 'change'},
{validator: this.verify.checkSpecialCharacterOftags, trigger: 'change'}
],
isRelateAccess: [
{required: true, message: '是否纳入认证清单不能为空', trigger: 'change'}
],
}
const roleRules = {
prcCreateUserName: [
{required: true, message: '政策业务经理不能为空', trigger: ['blur', 'change']}
],
jlUserName: [
{required: true, message: '政策业务经理不能为空', trigger: ['blur', 'change']}
]
}
return {
active: '1',
dict: {},
form,
roleForm,
moreSarLawsStandRules,
littleSarLawsStandRules,
rules: {},
roleRules,
disabled: true,
footerLoading: false,
reloadForm: true, // 重新渲染表单
userId:this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
processData: [], // 审批历史
processLoading: false,
// 选人抽屉
drawerModal: false,
drawerTitle: '',
nodeList: [],
}
},
created() {
this.getDicTypeListCode()
this.getData()
this.processTable()
this.resolveRules()
},
watch: {
'form.isRelateAccess' () {
// 移除校验结果重新生成校验
this.resolveRules()
}
},
methods: {
handleTabs(tab) {
this.active = tab
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res) {
this.reloadForm = false
const processForm = JSON.parse(res.mesg)
this.form = JSON.parse(JSON.stringify(processForm))
this.$nextTick(() => {
this.reloadForm = true
})
}
}).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.processData = res
this.processLoading = false
}, e => {})
},
resolveRules () {
this.reloadForm = false
let rules = {}
if (this.form.isRelateAccess === '1') {
// 认证清单为是
rules = this.moreSarLawsStandRules
} else if (this.form.isRelateAccess === '2') {
// 认证清单为否
rules = this.littleSarLawsStandRules
}
this.rules = { ...rules }
this.$nextTick(() => {
this.reloadForm = true
})
},
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.processNum()
// this.queryProcess()
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
} else {
this.$message.warning(res.message)
}
})
},
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);
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.taskIds,
userId : this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
if(this.form.approvalOpinion === 1){
this.$message.warning("驳回成功")
this.footerLoading = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else{
this.processCreateLaws(json)
}
}
})
}})
},
// 流程入库
processCreateLaws(json) {
const _formData = new FormData()
_formData.append('infoJson', json)
processCreateLaws(_formData).then(res => {
if (res.result === '操作成功' || res.data === '入库成功') {
this.$message.success(res.data)
setTimeout(() => {
this.$router.push({
name: 'ProcessCenter'
})
}, 100)
this.footerLoading = false
} else {
this.$message.warning(res.message)
this.footerLoading = false
}
})
},
getDicTypeListCode () {
// 查询各下拉框数据
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.dict.lawsTypeFirstLevelOptions = res.data.lawsTypeFirstLevel
this.dict.lawsTypeSecondLevelOptions = res.data.lawsTypeSecondLevel
this.dict.lawsTypeThirdLevelOptions = res.data.lawsTypeThirdLevel
this.dict.lawsTypeFourthLevelOptions = res.data.lawsTypeFourthLevel
this.dict.lawsTextStateOptions = res.data.lawsTextState
this.dict.lawsSycxOptions = res.data.lawsSycx
this.dict.lawsYearOptions = res.data.lawsYear
this.dict.lawsLabelOptions = res.data.lawsLabel
this.dict.CYSDLAWSOptions = res.data.CYSDLAWS
this.dict.syrzOptions = res.data.YYRZLAWS
this.dict = { ...this.dict }
}, e => {
})
},
}
}
</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;
.tableTitle {
margin-bottom: 10px;
height: 30px;
line-height: 30px;
position: relative;
font-size: 13px;
font-weight: bold;
.tableButton {
position: absolute;
right: 0;
top: 0;
}
}
}
</style>
@@ -491,29 +491,45 @@ export default {
}
break
case 'laws1':
if (row.taskInfo === '政策入库审批') {
this.$router.push({
name: 'zcrkStep2',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}else if (row.taskInfo === '重新发起入库流程'){
this.$router.push({
name: 'zcrkStep3',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
let routeName = ''
switch (row.taskInfo) {
case '政策入库审批':
routeName = 'zcrk2'
break
}
this.$router.push({
name: routeName,
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
// if (row.taskInfo === '政策入库审批') {
// this.$router.push({
// name: 'zcrkStep2',
// query: {
// taskIds: row.taskIds,
// prcId: row.prcId,
// prcNum: row.prcNum,
// prcName: row.prcName,
// prcType: row.prcType
// }
// })
// }else if (row.taskInfo === '重新发起入库流程'){
// this.$router.push({
// name: 'zcrkStep3',
// query: {
// taskIds: row.taskIds,
// prcId: row.prcId,
// prcNum: row.prcNum,
// prcName: row.prcName,
// prcType: row.prcType
// }
// })
// }
break
case 'buss2':
if (row.taskInfo === '企标编写') {
@@ -820,39 +820,60 @@ export default {
break
// 政策入库、
case 'laws1':
if(mes !== null && mes.taskInfo !== null && mes.taskInfo !== undefined) {
if (mes.taskInfo === '申请人发起') {
this.$router.push({
name: 'zcrkStep1',
query: {
type: '1',
processName: '申请人发起流程',
bpnId: id,
verifySarStandard: true,
}
})
}else if(mes.taskInfo === '申请人重新发起'){
this.$router.push({
name: 'zcrkStep3',
query: {
type: '1',
processName: '申请人发起流程',
bpnId: id,
verifySarStandard: true,
}
})
let routeName = ''
let processName=''
if (mes && mes.taskInfo) {
switch (mes.taskInfo) {
case '起草':
routeName = 'zcrk1'
processName = '申请人发起流程'
break
}
}else {
this.$router.push({
name: 'zcrkStep1',
query: {
type: '1',
processName: '申请人发起流程',
bpnId: id,
verifySarStandard: true,
}
})
} else {
routeName = 'zcrk1'
processName = '申请人发起流程'
}
this.$router.push({
name: routeName,
query: {
type: 'laws1',
processName,
bpnId: id,
}
})
// if(mes !== null && mes.taskInfo !== null && mes.taskInfo !== undefined) {
// if (mes.taskInfo === '申请人发起') {
// this.$router.push({
// name: 'zcrkStep1',
// query: {
// type: '1',
// processName: '申请人发起流程',
// bpnId: id,
// verifySarStandard: true,
// }
// })
// }else if(mes.taskInfo === '申请人重新发起'){
// this.$router.push({
// name: 'zcrkStep3',
// query: {
// type: '1',
// processName: '申请人发起流程',
// bpnId: id,
// verifySarStandard: true,
// }
// })
// }
// }else {
// this.$router.push({
// name: 'zcrkStep1',
// query: {
// type: '1',
// processName: '申请人发起流程',
// bpnId: id,
// verifySarStandard: true,
// }
// })
// }
break
case '21':
this.$router.push({
+9
View File
@@ -1151,6 +1151,15 @@ const routes = [
title: '政策入库流程'
}
},
{
path: '/zcrk2',
name: 'zcrk2',
component: () => import('@/pages/processCenter/pages/creatProcess/hzwl-zcrk/step2.vue'),
meta: {
requireAuth: true,
title: '政策入库流程'
}
},
{
path: '/zcrkStep1',
name: 'zcrkStep1',