update 标准法规入库/变更流程

This commit is contained in:
赵霄
2023-11-09 14:14:12 +08:00
parent e3b899e5ca
commit 2992c66b61
6 changed files with 154 additions and 19 deletions
+13 -1
View File
@@ -139,6 +139,14 @@ const compulsoryWithdrawal = (params) => postAction('', params)
const initiateStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/startProcess', params) const initiateStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/startProcess', params)
// 保存 // 保存
const saveStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/saveToDraft', params) const saveStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/saveToDraft', 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 { export {
getProcessNodeList, getProcessNodeList,
@@ -210,5 +218,9 @@ export {
compulsoryWithdrawal, compulsoryWithdrawal,
initiateStandardECProcess, initiateStandardECProcess,
saveStandardECProcess saveStandardECProcess,
queryStandardECProcessData,
turnToStandardECProcess,
agreeStandardECProcess,
rejectStandardECProcess
} }
+1
View File
@@ -7,6 +7,7 @@
:dropdownClassName="'j-multiple-date-picker ' + fieldName + '-drop'" :dropdownClassName="'j-multiple-date-picker ' + fieldName + '-drop'"
@openChange="handleOpenChange" @openChange="handleOpenChange"
style="width: 100%" style="width: 100%"
v-bind="$attrs"
> >
<template slot="dateRender" slot-scope="current"> <template slot="dateRender" slot-scope="current">
<div class="ant-calendar-date" @click.stop="clickCalendarDate(current)" :class="{'blue': getCurrentStyle(current)}"> <div class="ant-calendar-date" @click.stop="clickCalendarDate(current)" :class="{'blue': getCurrentStyle(current)}">
+16
View File
@@ -100,4 +100,20 @@ export default class EsEnum {
} }
return '--' return '--'
} }
/**
* 根据value获取按钮
*/
btnOfValue (value) {
if (!value && value!== 0) {
return []
}
for (const i in this){
const e = this[i]
if (e.value !== undefined && e.value !== null && e.value.toString() === value.toString()) {
return e.btn || []
}
}
return []
}
} }
+3 -3
View File
@@ -187,7 +187,7 @@ export const IsReadOnlyEnums = {
} }
// 标准法规入库/变更流程 // 标准法规入库/变更流程
export const FGEntryChangeProcessNode = { export const FGEntryChangeProcessNode = new EsEnums({
initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'submit'] }, initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'submit'] },
approve: { text: '审批', value: '2', btn: ['return', 'save', 'agree', 'reject'] } approve: { text: '审批', value: '审批', btn: ['return', 'save', 'agree', 'reject'] }
} })
@@ -141,6 +141,10 @@ export default {
let path = '' let path = ''
// 跳转到对应流程页面 // 跳转到对应流程页面
switch (record.prcType + '') { switch (record.prcType + '') {
// 标准法规入库/变更流程
case '1':
path = '/workCenter/StandardEntryOrChangeProcess'
break
// 企标立项、变更计划 // 企标立项、变更计划
case '7': case '7':
path = '/workCenter/enterpriseStandardInitChange/planApprovalChangeFlow' path = '/workCenter/enterpriseStandardInitChange/planApprovalChangeFlow'
@@ -38,6 +38,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="disabled"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -48,6 +49,7 @@
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="disabled"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
</a-form> </a-form>
@@ -156,6 +158,7 @@
<!-- 3, 单选组织机构 --> <!-- 3, 单选组织机构 -->
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value" <j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
:backDepart="true" /> :backDepart="true" />
<!-- 4, 日期多选 --> <!-- 4, 日期多选 -->
<j-multiple-date-picker v-else-if="item.fieldShowType === FieldType.DATE_MORE.value" <j-multiple-date-picker v-else-if="item.fieldShowType === FieldType.DATE_MORE.value"
@@ -305,19 +308,19 @@
{{ $t('submit') }} {{ $t('submit') }}
</a-button> </a-button>
<!--同意 审批节点存在--> <!--同意 审批节点存在-->
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleSubmit"> <a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleAgree">
{{ $t('agree') }} {{ $t('agree') }}
</a-button> </a-button>
<!--驳回 审批节点存在--> <!--驳回 审批节点存在-->
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleSubmit"> <a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleReject">
{{ $t('reject') }} {{ $t('reject') }}
</a-button> </a-button>
</div> </div>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file> <upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled" />
<!--转办选人--> <!--转办选人-->
<user-select-modal ref="userSelectModal" @change="continueTurnTo" /> <user-select-modal ref="userSelectModal" check-required @change="continueTurnTo" />
</internal-detail-page> </internal-detail-page>
</template> </template>
@@ -347,7 +350,13 @@ import PersonnelInfo from '../../../components/PersonnelInfo.vue'
import ProcessDetailList from '../../../components/ProcessDetailList.vue' import ProcessDetailList from '../../../components/ProcessDetailList.vue'
import UserSelectModal from '../../../components/selection/UserSelectModal.vue' import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
import TreeSelection from '../../../components/selection/TreeSelection' import TreeSelection from '../../../components/selection/TreeSelection'
import { initiateStandardECProcess, saveStandardECProcess } from '../../../api/workCenter' import {
initiateStandardECProcess,
saveStandardECProcess,
queryStandardECProcessData,
turnToStandardECProcess,
agreeStandardECProcess, rejectStandardECProcess
} from '../../../api/workCenter'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin' import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
export default { export default {
@@ -422,7 +431,7 @@ export default {
}, },
computed: { computed: {
pageTitle () { pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}(法规工程师发起)` return `${this.$t('flowCenter')}${this.$route.meta.title}`
}, },
// 不可编辑的字段 // 不可编辑的字段
disabledFieldList () { disabledFieldList () {
@@ -448,18 +457,51 @@ export default {
} }
}, },
created () { created () {
if (this.$route.query.id) { if (this.$route.query.processInstanceId) {
this.disabled = true this.disabled = true
this.initProcessData()
} else { } else {
this.currentNode = FGEntryChangeProcessNode.initiate.value this.currentNode = FGEntryChangeProcessNode.initiate.value
this.btnList = FGEntryChangeProcessNode.initiate.btn this.btnList = FGEntryChangeProcessNode.initiate.btn
// 默认选中国内
this.initDomesticStandardForm()
} }
this.getSourceOptions() // 获取人员信息
// 默认选中国内
this.initDomesticStandardForm()
this.getPersonInfoStructure(ProcessKey.FB_ENTRY_CHANGE.value) this.getPersonInfoStructure(ProcessKey.FB_ENTRY_CHANGE.value)
this.getSourceOptions()
}, },
methods: { methods: {
/**
* 获取流程详情数据
*/
initProcessData () {
this.loading = true
const { processInstanceId, draftId } = this.$route.query
queryStandardECProcessData({ processInstanceId, draftId }).then(res => {
if (res.success) {
const businessData = Object.assign({}, { ...res.result.businessInfoDTO.businessMap })
this.formInline.source = businessData.source
this.loading = false
// 获取对应类型的表单
this.handleSourceChange()
// 处理流程信息回显
this.processInfo = Object.assign({}, res.result.basicProcessInfoDTO || {})
// 处理流程审批信息
this.approvalInfo = Object.assign({}, res.result.basicTaskInfoDTO || {})
this.$nextTick(() => {
// 处理表单数据回显
this.formInline = Object.assign({ ...this.formInline }, { ...businessData })
this.formInline.standard_number_temp = this.formInline.standard_number
this.processInfoForm.setFieldsValue(this.processInfo)
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
})
// 获取按钮清单
this.btnList = FGEntryChangeProcessNode.btnOfValue(this.$route.query.taskName)
}
}).finally(() => {
})
},
/** /**
* 数据字典值获取 * 数据字典值获取
*/ */
@@ -486,6 +528,7 @@ export default {
this.formListArr = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), []) this.formListArr = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
this.formPartList = Object.keys(this.formList) this.formPartList = Object.keys(this.formList)
this.formInline.source = StandardSource.DOMESTIC.value this.formInline.source = StandardSource.DOMESTIC.value
this.$forceUpdate()
this.getOptionsData() // 处理通过接口获取的下拉数据 this.getOptionsData() // 处理通过接口获取的下拉数据
this.integrateData() // 处理表单验证 this.integrateData() // 处理表单验证
this.initRetractableFlag() // 处理面板展开 this.initRetractableFlag() // 处理面板展开
@@ -675,7 +718,9 @@ export default {
// 处理业务信息 // 处理业务信息
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
formData.businessInfoDTO = this.dealBusinessData({ ...this.formInline }) formData.businessInfoDTO = {
businessMap: { ...this.formInline }
}
} else { } else {
flag = false flag = false
} }
@@ -684,6 +729,7 @@ export default {
this.approvalInfoForm.validateFields((errors, values) => { this.approvalInfoForm.validateFields((errors, values) => {
if (!errors) { if (!errors) {
formData.basicTaskInfoDTO = Object.assign(this.approvalInfo, values) formData.basicTaskInfoDTO = Object.assign(this.approvalInfo, values)
formData.basicTaskInfoDTO.taskId = this.$route.query.taskId
} else { } else {
flag = false flag = false
} }
@@ -720,11 +766,13 @@ export default {
handleSave () { handleSave () {
const formData = { const formData = {
basicProcessInfoDTO: Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()), // 流程信息 basicProcessInfoDTO: Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()), // 流程信息
businessInfoDTO: this.dealBusinessData({ ...this.formInline }), // 业务信息 businessInfoDTO: {
businessMap: { ...this.formInline }
}, // 业务信息
basicTaskInfoDTO: Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()), // 流程审批信息 basicTaskInfoDTO: Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()), // 流程审批信息
userInfoMap: this.$refs.personnelInfo.getDataObj() // 用户信息 userInfoMap: this.$refs.personnelInfo.getDataObj() // 用户信息
} }
const params = { ...formData.basicProcessInfoDTO, ...formData.businessInfoDTO, ...formData.basicTaskInfoDTO } const params = { ...formData.basicProcessInfoDTO, ...this.formInline, ...formData.basicTaskInfoDTO }
if (!Object.values(params).some(tt => !!tt || tt === 0)) { if (!Object.values(params).some(tt => !!tt || tt === 0)) {
// 提示至少填写一项 // 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
@@ -762,14 +810,68 @@ export default {
this.loading = false this.loading = false
}) })
}, },
/**
* 同意
*/
handleAgree () {
const formData = this.dealFormData()
if (!formData) {
return
}
this.loading = true
agreeStandardECProcess(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 驳回
*/
handleReject () {
const formData = this.dealFormData()
if (!formData) {
return
}
this.loading = true
rejectStandardECProcess(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
/** /**
* 转办 * 转办
*/ */
handleTurnTo () { handleTurnTo () {
this.$refs.userSelectModal.open() this.$refs.userSelectModal.open()
}, },
continueTurnTo () { continueTurnTo (userId) {
const params = {
taskId: this.$route.query.taskId,
userId
}
this.loading = true
turnToStandardECProcess(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}, },
treeSelectNameChange (value, fieldName) { treeSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value this.formInline[fieldName + '_dictText'] = value