add 法规入库/变更流程
This commit is contained in:
+13
-1
@@ -35,8 +35,16 @@ const getTreeList = (params) => getAction('/laws/standard/lawsTreeNode/enterpris
|
||||
// 标准入库/变更流程------------
|
||||
// 国内法规标准-获取表单模型
|
||||
const getDomesticStandardFormModal = (params) => getAction('/laws/standard/domestic/getFormModel', params)
|
||||
// 海外标准-获取表单
|
||||
const getOverseasStandardForm = (params) => getAction('/laws/standard/overseas/getFormModel', params)
|
||||
// 获取流程详情数据
|
||||
const queryStandardECProcessData = (params) => getAction('/process/fb/processFbEntryChange/queryProcessInfoVO', params)
|
||||
// 转办
|
||||
const turnToStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/transfer', params)
|
||||
// 同意
|
||||
const agreeStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/agree', params)
|
||||
// 驳回
|
||||
const rejectStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/reject', params)
|
||||
|
||||
export {
|
||||
queryPermissionsByUser,
|
||||
@@ -51,5 +59,9 @@ export {
|
||||
getTreeList,
|
||||
|
||||
getDomesticStandardFormModal,
|
||||
queryStandardECProcessData
|
||||
getOverseasStandardForm,
|
||||
queryStandardECProcessData,
|
||||
turnToStandardECProcess,
|
||||
agreeStandardECProcess,
|
||||
rejectStandardECProcess
|
||||
}
|
||||
|
||||
@@ -73,13 +73,14 @@
|
||||
}
|
||||
.van-field__value {
|
||||
margin-top: 0.24rem;
|
||||
border: 0.02rem solid #C9CDD4;
|
||||
border-radius: 0.04rem;
|
||||
|
||||
.van-field__control {
|
||||
background: #F2F3F5;
|
||||
padding: 0.24rem;
|
||||
box-sizing: border-box;
|
||||
border: 0.02rem solid #C9CDD4;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.van-field__control:disabled {
|
||||
|
||||
@@ -28,6 +28,9 @@ module.exports = {
|
||||
selectUser: '选择人员',
|
||||
finishDate: '完成日期',
|
||||
rangeOfApplication: '适用范围',
|
||||
standardNumber: '标准编号',
|
||||
standardName: '标准名称',
|
||||
// 标准法规入库/变更流程
|
||||
standardEntryOrChange: {
|
||||
source: '来源',
|
||||
operationType: '操作类型'
|
||||
@@ -74,5 +77,11 @@ module.exports = {
|
||||
leadershipAndNecessity: '立项标准的领先性与必要性',
|
||||
initiatedProject: '立项目的及预期效果等',
|
||||
uploadAttachment: '上传附件'
|
||||
},
|
||||
// 标准征求意见流程
|
||||
standardConsultation: {
|
||||
standardText: '标准文本',
|
||||
relevantDocument: '相关文件',
|
||||
closingDateForComments: '征求意见结束日期'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
<div class="operate-box">
|
||||
<slot name="operation"></slot>
|
||||
</div>
|
||||
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -27,16 +27,6 @@ const routes = [
|
||||
hasBack: false
|
||||
}
|
||||
},
|
||||
// 标准法规入库/变更流程
|
||||
{
|
||||
path: '/standardEntryOrChangeProcess',
|
||||
name: 'StandardEntryOrChangeProcess',
|
||||
meta: {
|
||||
hasNavBar: true,
|
||||
hasBack: true
|
||||
},
|
||||
component: () => import('@/views/standardEntryOrChangeProcess/StandardEntryOrChangeProcess')
|
||||
},
|
||||
{ // 流程中节点不支持的页面
|
||||
path: '/noMobile',
|
||||
name: 'NoMobile',
|
||||
|
||||
@@ -9,5 +9,26 @@ export default [
|
||||
hasNavBar: true, // 这个属性控制页面是否显示上面的导航栏
|
||||
leftArrow: true // 这个属性控制页面上面的导航栏 是否有返回按钮
|
||||
}
|
||||
},
|
||||
// 标准法规入库/变更流程
|
||||
{
|
||||
path: '/workCenter/standardEntryOrChangeProcess',
|
||||
name: 'StandardEntryOrChangeProcess',
|
||||
meta: {
|
||||
hasNavBar: true,
|
||||
hasBack: true
|
||||
},
|
||||
component: () => import('@/views/workCenter/standardEntryOrChangeProcess/StandardEntryOrChangeProcess')
|
||||
},
|
||||
|
||||
// 征求意见流程
|
||||
{
|
||||
path: '/workCenter/standardConsultationProcess',
|
||||
name: 'StandardConsultationProcess',
|
||||
meta: {
|
||||
hasNavBar: true,
|
||||
hasBack: true
|
||||
},
|
||||
component: () => import('@/views/workCenter/standardConsultation/StandardConsultationProcess')
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<process-common-layout class="page-box" :loading="loading">
|
||||
<template v-slot:process>
|
||||
<!--流程信息-->
|
||||
<div class="process-part">
|
||||
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||
<van-form input-align="right">
|
||||
<!--流程名称-->
|
||||
<van-field v-model="processInfo.processName"
|
||||
:label="$t('processName')"
|
||||
type="textarea"
|
||||
autosize
|
||||
readonly
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('processName')"
|
||||
:border="false" />
|
||||
<!--截止日期-->
|
||||
<van-field v-model="processInfo.processDueDate"
|
||||
:label="$t('expirationDate')"
|
||||
type="textarea"
|
||||
autosize
|
||||
readonly
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseSelect')+$t('expirationDate')"
|
||||
:border="false" />
|
||||
<!--流程说明-->
|
||||
<van-field v-model="processInfo.processDescription"
|
||||
:label="$t('processExplain')"
|
||||
type="textarea"
|
||||
autosize
|
||||
disabled
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('processExplain')"
|
||||
:border="false"
|
||||
input-align="left"
|
||||
class="vertical-form-item">
|
||||
</van-field>
|
||||
</van-form>
|
||||
</div>
|
||||
<!--业务基本信息-->
|
||||
<div class="process-part">
|
||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||
<van-form input-align="right">
|
||||
<!--标准编号-->
|
||||
<van-field v-model="basicInfo.standardNumber"
|
||||
:label="$t('standardNumber')"
|
||||
type="textarea"
|
||||
autosize
|
||||
readonly
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('standardNumber')"
|
||||
:border="false" />
|
||||
<!--标准名称-->
|
||||
<van-field v-model="basicInfo.standardName"
|
||||
:label="$t('standardName')"
|
||||
type="textarea"
|
||||
autosize
|
||||
readonly
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('standardName')"
|
||||
:border="false" />
|
||||
<!--标准文本-->
|
||||
<van-field v-model="basicInfo.standardTextFileId"
|
||||
:label="$t('standardConsultation.standardText')"
|
||||
type="textarea"
|
||||
autosize
|
||||
readonly
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('standardConsultation.standardText')"
|
||||
:border="false">
|
||||
<file-display :file-ids="basicInfo.standardTextFileId"/>
|
||||
</van-field>
|
||||
<!--相关文件-->
|
||||
<van-field v-model="basicInfo.relatedFile"
|
||||
:label="$t('standardConsultation.relevantDocument')"
|
||||
type="textarea"
|
||||
autosize
|
||||
readonly
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('standardConsultation.relevantDocument')"
|
||||
:border="false">
|
||||
<file-display :file-ids="basicInfo.relatedFile"/>
|
||||
</van-field>
|
||||
<!--征求意见结束日期-->
|
||||
<van-field v-model="basicInfo.consultationDueDate"
|
||||
:label="$t('standardConsultation.closingDateForComments')"
|
||||
type="textarea"
|
||||
autosize
|
||||
readonly
|
||||
rows="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('standardConsultation.closingDateForComments')"
|
||||
:border="false" />
|
||||
</van-form>
|
||||
</div>
|
||||
</template>
|
||||
</process-common-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ProcessCommonLayout from '../../../components/ProcessCommonLayout'
|
||||
import FileDisplay from '../../../components/FileDisplay'
|
||||
|
||||
export default {
|
||||
name: 'StandardConsultationProcess',
|
||||
components: { ProcessCommonLayout, FileDisplay },
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
processInfo: {}, // 流程信息数据
|
||||
businessId: null,
|
||||
basicInfo: {}, // 业务基本信息数据
|
||||
dispatchInfo: {}, // 业务分派信息数据
|
||||
approvalInfo: {} // 流程审批信息数据
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~../../../assets/less/common.less';
|
||||
|
||||
</style>
|
||||
+166
-14
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<process-common-layout class="page-box" :loading="loading">
|
||||
<process-common-layout class="page-box" :loading="loading" :process-key="ProcessKey.FB_ENTRY_CHANGE.value" ref="personInfo">
|
||||
<template v-slot:process>
|
||||
<!--流程信息-->
|
||||
<div class="process-part">
|
||||
@@ -79,9 +79,9 @@
|
||||
<!--流程审批信息-->
|
||||
<div class="process-part">
|
||||
<div class="process-part-title">{{ $t('processApprovalInfo') }}</div>
|
||||
<van-form input-align="right">
|
||||
<van-form input-align="right" ref="approvalForm">
|
||||
<!--备注-->
|
||||
<van-field v-model="processInfo.processDescription"
|
||||
<van-field v-model="approvalInfo.handleText"
|
||||
:label="$t('remark')"
|
||||
type="textarea"
|
||||
autosize
|
||||
@@ -89,6 +89,7 @@
|
||||
:placeholder="$t('pleaseEnter')+$t('remark')"
|
||||
:border="false"
|
||||
input-align="left"
|
||||
:rules="rules.handleText"
|
||||
class="vertical-form-item">
|
||||
</van-field>
|
||||
</van-form>
|
||||
@@ -96,24 +97,35 @@
|
||||
</template>
|
||||
|
||||
<template v-slot:operation>
|
||||
<van-button icon="revoke" class="operation-common-btn">{{ $t('turnTo') }}</van-button>
|
||||
<van-button icon="revoke" class="operation-common-btn" type="primary">{{ $t('agree') }}</van-button>
|
||||
<van-button icon="revoke" class="operation-common-btn light-color-button">{{ $t('reject') }}</van-button>
|
||||
<van-button icon="revoke" class="operation-common-btn" @click="handleTurnTo">{{ $t('turnTo') }}</van-button>
|
||||
<van-button icon="revoke" class="operation-common-btn" type="primary" @click="handleAgree">{{ $t('agree') }}</van-button>
|
||||
<van-button icon="revoke" class="operation-common-btn light-color-button" @click="handleReject">{{ $t('reject') }}</van-button>
|
||||
</template>
|
||||
|
||||
<select-user ref="selectUser" @selected-change="continueTurnTo" />
|
||||
</process-common-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ProcessCommonLayout from '../../components/ProcessCommonLayout'
|
||||
import { queryStandardECProcessData, getDomesticStandardFormModal } from '../../api/api'
|
||||
import { FieldType, StandardSource } from '../../enums/commonEnums'
|
||||
import FileDisplay from '../../components/FileDisplay'
|
||||
import ProcessCommonLayout from '../../../components/ProcessCommonLayout'
|
||||
import {
|
||||
queryStandardECProcessData,
|
||||
getDomesticStandardFormModal,
|
||||
getOverseasStandardForm,
|
||||
turnToStandardECProcess,
|
||||
agreeStandardECProcess,
|
||||
rejectStandardECProcess
|
||||
} from '../../../api/api'
|
||||
import { FieldType, StandardSource, ProcessKey } from '../../../enums/commonEnums'
|
||||
import FileDisplay from '../../../components/FileDisplay'
|
||||
import SelectUser from '../../../components/SelectUser'
|
||||
|
||||
export default {
|
||||
name: 'StandardEntryOrChangeProcess',
|
||||
components: { ProcessCommonLayout, FileDisplay },
|
||||
components: { ProcessCommonLayout, FileDisplay, SelectUser },
|
||||
data () {
|
||||
return {
|
||||
ProcessKey,
|
||||
loading: false,
|
||||
processInfo: {}, // 流程信息数据
|
||||
businessId: null,
|
||||
@@ -121,7 +133,11 @@ export default {
|
||||
formList: [], // 表单
|
||||
dictField: [], // 需要翻译的字段
|
||||
fileField: [], // 文件字段
|
||||
formPartList: [] // 展示区域信息
|
||||
formPartList: [], // 展示区域信息
|
||||
approvalInfo: {}, // 流程审批信息
|
||||
rules: {
|
||||
handleText: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remark'), trigger: 'onBlur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -180,7 +196,21 @@ export default {
|
||||
* 获取海外表单
|
||||
*/
|
||||
getOverseasFormItem () {
|
||||
return new Promise()
|
||||
return new Promise(resolve => {
|
||||
getOverseasStandardForm({
|
||||
module: StandardSource.OVERSEAS.value,
|
||||
type: 2 // 2是新增;1是详情
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.formList = res.result
|
||||
this.dealFileAndDict()
|
||||
} else {
|
||||
this.$message(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
dealFileAndDict () {
|
||||
this.formPartList = Object.keys(this.formList)
|
||||
@@ -197,12 +227,134 @@ export default {
|
||||
this.dictField.push(item.dbFieldName)
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 处理提交的表单数据
|
||||
* @returns {{}|boolean}
|
||||
*/
|
||||
dealFormData () {
|
||||
const formData = {}
|
||||
let flag = true
|
||||
// 流程信息
|
||||
formData.basicProcessInfoDTO = { ...this.processInfo }
|
||||
// 业务信息
|
||||
const formInline = { ...this.formInline }
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
if (formInline[res][0] instanceof Object) {
|
||||
// 说明是树选择
|
||||
formInline[res] = formInline[res].map(item => item.value).join(',')
|
||||
} else {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
}
|
||||
})
|
||||
formData.businessInfoDTO = {
|
||||
businessMap: formInline,
|
||||
id: this.businessId
|
||||
}
|
||||
// 流程审批信息,需要进行表单校验
|
||||
formData.basicTaskInfoDTO = { ...this.approvalInfo }
|
||||
formData.basicTaskInfoDTO.taskId = this.$route.query.taskId
|
||||
// 处理人员信息
|
||||
const userInfo = this.$refs.personInfo.getDataObjVerify()
|
||||
if (!userInfo) {
|
||||
flag = false
|
||||
} else {
|
||||
formData.userInfoMap = userInfo
|
||||
}
|
||||
if (flag) {
|
||||
return formData
|
||||
}
|
||||
return flag
|
||||
},
|
||||
validateForm () {
|
||||
let flag = true
|
||||
return new Promise(resolve => {
|
||||
this.$refs.approvalForm.validate().then(() => {
|
||||
}).catch(() => {
|
||||
flag = false
|
||||
}).finally(() => {
|
||||
resolve(flag)
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 转办
|
||||
*/
|
||||
handleTurnTo () {
|
||||
this.$refs.selectUser.open()
|
||||
},
|
||||
continueTurnTo (value) {
|
||||
const params = {
|
||||
taskId: this.$route.query.taskId,
|
||||
userId: value
|
||||
}
|
||||
this.loading = true
|
||||
turnToStandardECProcess(params).then(res => {
|
||||
this.$message(res.message)
|
||||
if (res.success) {
|
||||
this.goBack()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 同意
|
||||
*/
|
||||
handleAgree () {
|
||||
this.rules.handleText[0].required = false
|
||||
this.approvalInfo.handleText = '同意'
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
agreeStandardECProcess(formData).then(res => {
|
||||
this.$message(res.message)
|
||||
if (res.success) {
|
||||
this.goBack()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 驳回
|
||||
*/
|
||||
async handleReject () {
|
||||
this.rules.handleText[0].required = true
|
||||
const validateResult = await this.validateForm()
|
||||
if (!validateResult) {
|
||||
return
|
||||
}
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
rejectStandardECProcess(formData).then(res => {
|
||||
this.$message(res.message)
|
||||
if (res.success) {
|
||||
this.goBack()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
goBack () {
|
||||
let timer = setTimeout(() => {
|
||||
clearTimeout(timer)
|
||||
timer = null
|
||||
this.$router.go(-1)
|
||||
}, 700)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
@import '~../../../assets/less/common.less';
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user