政策入库流程修改

This commit is contained in:
zyn
2023-10-13 11:41:25 +08:00
parent 72f3c3b372
commit 9e3365762b
7 changed files with 159 additions and 104 deletions
@@ -1,4 +1,5 @@
<template>
<!--政策入库手动查找代替文件-->
<div>
<el-form-item
:label="label"
@@ -44,16 +45,16 @@
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="政策号" class="search-item input-width">
<el-form-item label="政策号" class="search-item input-width">
<el-input
v-model="replaceLawsNumForm.lawsNumber"
placeholder="根据政策号查找"
v-model="replaceLawsNumForm.lawsNo"
placeholder="根据政策号查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="政策名称" class="search-item input-width">
<el-input
v-model="replaceLawsNumForm.numberName"
v-model="replaceLawsNumForm.lawsName"
placeholder="根据政策名称查找"
clearable
:maxlength="100"></el-input>
@@ -92,28 +93,22 @@
width="55"
align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="standSortShow"-->
<!-- label="企标类别"-->
<!-- min-width="130"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
label="政策号"
label="政策号"
min-width="130">
<template slot-scope="scope">
<span>
<a v-if="scope.row.lawsNumber" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.lawsNumber }}</a>
<a v-if="scope.row.lawsNo" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.lawsNo }}</a>
</span>
</template>
</el-table-column>
<el-table-column
prop="lawsName"
label="中文名称"
label="政策名称"
min-width="130">
</el-table-column>
<el-table-column
prop="lawsName"
prop="lawsEnName"
label="英文名称"
min-width="130">
</el-table-column>
@@ -176,20 +171,14 @@ export default {
data () {
return {
replaceLawsNumModel: false,
sarBussionessLawsEO: {
replaceLawsNum: ''
},
// 代替标准号
replaceLawsNumForm: {
dataSource: 'BUSINESS', // 数据来源
lawsNumber: '', // 政策编号
numberName: '', // 政策名称
// dataSource: 'BUSINESS', // 数据来源
lawsNo: '',
lawsName: '', // 政策名称
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
quoteIdList: '',
menuId: '',
validFlag: 0
},
replaceLawsNumRow: [], // 代替政策号 数组内容
replaceTotal: 0,
@@ -226,21 +215,11 @@ export default {
this.$emit('input', value)
},
selectLaws () {
// if (this.standNumFlag === 1) {
// this.$refs.selections.selectAll(false)
// }
// this.sarBussionessLawsEO.replaceLawsNum = ''
this.replaceLawsNumModel = true
this.getReplaceLawsNumRow()
},
// 代替政策号 请求数据
getReplaceLawsNumRow () {
if (this.sarBussionessLawsEO.replaceLawsNum !== null && this.sarBussionessLawsEO.replaceLawsNum !== '') {
this.replaceLawsNumForm.quoteIdList = this.quoteIdList1.toString() === '' ? '' : this.quoteIdList1
} else {
this.quoteIdList1 = []
this.replaceLawsNumForm.quoteIdList = ''
}
const formData = {
...this.replaceLawsNumForm
}
@@ -265,7 +244,6 @@ export default {
},
// 代替政策编号-取消
replaceLawsNumModelCancel () {
// this.replaceLawsNumModel = false
this.$refs.selections.clearSelection()
},
// 代替政策号 table选择事件
@@ -287,11 +265,6 @@ export default {
replaceLawsNumModelBt () {
let textArr = []
if (typeof this.value === 'string') {
if (this.value) {
textArr = this.value.split(',')
}
}
if (this.selectedListRep.length === 0) {
return this.$message({
message: '请先选择数据',
@@ -308,13 +281,12 @@ export default {
let texts = ''
// 判断数据是国内外法规标准还是企业标准
if (this.dataSource === 'LAWS_STAND') {
texts = item.lawsNumber
texts = item.lawsNo
}
textArr.push(texts)
textArr = [...new Set(textArr)]
this.replaceLawsNumModel = false
})
// this.SarLawsInfoEO.replaceLawsNum = textArr.join(',')
this.$emit('input', textArr.join(','))
this.$refs.selections.clearSelection()
},
@@ -352,12 +324,11 @@ export default {
},
getResetLawsNumRow () {
this.replaceLawsNumForm = {
lawsNumber: '', // 政策编号
numberName: '', // 政策名称
lawsNo: '',
lawsName: '', // 政策名称
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
validFlag: '0'
}
this.getReplaceLawsNumRow()
}
@@ -18,6 +18,7 @@
title="政策业务经理"
:id.sync="roleForm.jlUserId"
:name.sync="roleForm.jlUserName"
:disabled="disabled"
/>
</el-form>
</el-timeline>
@@ -36,6 +37,10 @@ export default {
},
roleRules: {
type: Object
},
disabled: {
type: Object,
default: false
}
},
}
@@ -10,9 +10,9 @@
<div class="content">
<div class="standard-table-search">
<el-form :model="SearchForm" inline class="label-input-form search-area">
<el-form-item label="政策号" style="margin-right:-20px" prop="lawsNumber" class="search-item" >
<el-form-item label="政策号" style="margin-right:-20px" prop="lawsNo" class="search-item" >
<el-input :disabled="disabled"
v-model="SearchForm.lawsNumber"
v-model="SearchForm.lawsNo"
clearable placeholder="根据编号查找"
:maxlength="100"
@keyup.enter.native="getData"/>
@@ -82,11 +82,11 @@
align="center"
></el-table-column>
<el-table-column
label="政策号"
label="政策号"
align="center"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)">{{ scope.row.lawsNumber }}</a>
<a @click="handlePreview(scope.row)">{{ scope.row.lawsNo }}</a>
</template>
</el-table-column>
<el-table-column
@@ -2,7 +2,7 @@
<div class="wrapper">
<ProcessHeader toggle>
<template slot="proName">政策入库流程</template>
<template slot="proNode">起草</template>
<template slot="proNode">{{ title }}</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
@@ -17,15 +17,15 @@
label-width="210px"
>
<div v-show="active === '1'">
<Basic :form="form" :dict="dict" @dragIn="dragIn"></Basic>
<EffectiveDate :form="form" :dict="dict"></EffectiveDate>
<TextInfo :form="form" :dict="dict"></TextInfo>
<Range :form="form" :dict="dict"></Range>
<RelatesInfo :form="form" :dict="dict"></RelatesInfo>
<ReceiptDescription v-model="form.commentText" title="回执说明"></ReceiptDescription>
<Basic :form="form" :dict="dict" @dragIn="dragIn" :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" title="回执说明" :disabled="disabled"></ReceiptDescription>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '2'">
<PersonInfo ref="roleForm" :roleForm="roleForm" :roleRules="roleRules"></PersonInfo>
<PersonInfo ref="roleForm" :roleForm="roleForm" :roleRules="roleRules" :disabled="disabled"></PersonInfo>
</div>
</el-form>
</div>
@@ -54,7 +54,8 @@ import RelatesInfo from "./components/RelatesInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import PersonInfo from "./components/PersonInfo";
import {saveTaskFirst, queryTaskFirst, taskDel} from "api/process";
import {saveTaskFirst, queryTaskFirst, taskDel, inboundLiaisonDetail} from "api/process";
export default {
name: "zrckStep1",
components: {
@@ -147,12 +148,11 @@ export default {
{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'},
{required: true, type: 'string', message: '政策文号不能为空', trigger: 'change'},
{type: 'string', max: 100, message: '政策文号不能超过100个字符', trigger: 'change'}
],
issueTime: [
@@ -200,6 +200,23 @@ export default {
{type: 'string', max: 500, message: '政策名称不能超过500个字符', trigger: 'change'},
{validator: this.verify.checkSpecialCharacterOftags, trigger: 'change'}
],
lawsEnName: [
{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'}
],
issueCompany: [
{type: 'string', max: 100, message: '发文单位不能超过100个字符', trigger: 'change'}
],
lawsNotisyncNum: [
{type: 'string', max: 500, message: '福田转发通知文号不能超过500个字符', trigger: 'change'}
],
lawsRemark: [
{type: 'string', max: 500, message: '备注不能超过500个字符', trigger: 'change'}
],
isRelateAccess: [
{required: true, message: '是否纳入认证清单不能为空', trigger: 'change'}
],
@@ -213,6 +230,7 @@ export default {
]
}
return {
title: '起草',
active: '1',
dict: {},
form,
@@ -230,7 +248,7 @@ export default {
created() {
this.getDicTypeListCode()
this.resolveRules()
this.getTaskId()
this.getData()
},
watch: {
'form.isRelateAccess' () {
@@ -257,7 +275,10 @@ export default {
this.reloadForm = true
})
},
getTaskId () {
getData () {
const {taskInfo, taskIds, prcId, disabledXX } = this.$route.query
// 1. 根据草稿查询流程详情 2.已办、已发、监控:查看流程数据
if(this.$route.query.bpnId){
queryTaskFirst({
bpnId: this.$route.query.bpnId
@@ -271,6 +292,34 @@ export default {
})
})
}
if (disabledXX) {
this.disabled = disabledXX
}
// 重新起草
if (taskInfo === '重新发起入库流程') {
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 = {
jlUserId: processForm.jlUserId,
jlUserName: processForm.jlUserName,
prcCreateUser: processForm.prcCreateUser,
prcCreateUserName: processForm.prcCreateUserName,
}
// this.form.commentText = '' // 置空意见
this.$nextTick(() => {
this.reloadForm = true
})
}
}).catch(e => {
})
}
},
// 带入流程
dragIn (form) {
@@ -294,55 +343,63 @@ export default {
form: this.form,
roleForm: this.roleForm,
}))
// 保存草稿
saveTaskFirst(_formData).then(res => {
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 => {
this.footerLoading = false
})
},
async submit () {
this.footerLoading = true
const startProcessRollBackQuery = {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: 'laws1',
json: JSON.stringify({
form: this.form,
roleForm: this.roleForm
})
}
const res = await this.$http._post('lawss/activiti/startProcessRollBack', startProcessRollBackQuery)
if(!res.ok) return;
const json = Object.assign(this.form, this.roleForm);
const 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.footerLoading = true
const json = Object.assign(this.form, this.roleForm);
this.$http.post('lawss/activiti/startProcessRollBack', {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: 'laws1',
json: JSON.stringify({
form: this.form,
roleForm: this.roleForm
})
}, {}, res => {
if (res.ok) {
this.$http.post('lawss/activiti/completeTask', {
taskIds: res.data,
userId : this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message)
this.footerLoading = false
// 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'})
}
})
}
})
this.submit()
}else {
this.$message.warning('请检查人员信息表单是否填写完整')
}
@@ -159,12 +159,11 @@ export default {
{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'},
{required: true, type: 'string', message: '政策文号不能为空', trigger: 'change'},
{type: 'string', max: 100, message: '政策文号不能超过100个字符', trigger: 'change'}
],
issueTime: [
@@ -212,6 +211,23 @@ export default {
{type: 'string', max: 500, message: '政策名称不能超过500个字符', trigger: 'change'},
{validator: this.verify.checkSpecialCharacterOftags, trigger: 'change'}
],
lawsEnName: [
{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'}
],
issueCompany: [
{type: 'string', max: 100, message: '发文单位不能超过100个字符', trigger: 'change'}
],
lawsNotisyncNum: [
{type: 'string', max: 500, message: '福田转发通知文号不能超过500个字符', trigger: 'change'}
],
lawsRemark: [
{type: 'string', max: 500, message: '备注不能超过500个字符', trigger: 'change'}
],
isRelateAccess: [
{required: true, message: '是否纳入认证清单不能为空', trigger: 'change'}
],
@@ -276,7 +292,7 @@ export default {
this.reloadForm = false
const processForm = JSON.parse(res.mesg)
this.form = JSON.parse(JSON.stringify(processForm))
this.form.commentText = ''
this.form.commentText = '' // 置空意见
this.$nextTick(() => {
this.reloadForm = true
})
@@ -285,6 +301,7 @@ export default {
})
})
},
// 审批历史
processTable () {
this.processLoading = true
this.$http.get('lawss/activiti/get_list_by_instance', {
@@ -328,8 +345,6 @@ export default {
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)
@@ -384,6 +399,8 @@ export default {
}
}
})
} else {
this.$message.warning('请检查基础信息表单是否填写完整')
}})
},
// 流程入库
@@ -315,7 +315,8 @@ export default {
this.toProcessDetail('bzrkStep1',row)
}else if(prcType === 'laws1'){
//政策入库
this.toProcessDetail('zcrkStep1',row)
// this.toProcessDetail('zcrkStep1',row)
this.toProcessDetail('zcrk1',row)
}else if(prcType === 'laws2'){
//政策征求意见流程
this.toProcessDetail('zczqyjStep1',row)
@@ -496,6 +496,9 @@ export default {
case '政策入库审批':
routeName = 'zcrk2'
break
case '重新发起入库流程':
routeName = 'zcrk1'
break
}
this.$router.push({
name: routeName,
@@ -504,7 +507,8 @@ export default {
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
prcType: row.prcType,
taskInfo: row.taskInfo
}
})
// if (row.taskInfo === '政策入库审批') {