fix【客户反馈】征求意见流程无意见时无法提交流程
This commit is contained in:
@@ -260,7 +260,9 @@ module.exports = {
|
||||
chapterName: '章节名称',
|
||||
pleaseSelectCriteriaFirst: '请先选择标准',
|
||||
reasonForRevision: '修改意见理由(包括理由或依据)',
|
||||
processExpiration: '该征求意见流程已结束,不能办理'
|
||||
processExpiration: '该征求意见流程已结束,不能办理',
|
||||
isThereNoOpinion: '是否没有意见?',
|
||||
noOpinion: '无意见'
|
||||
},
|
||||
// 企标稽查计划
|
||||
esInspectionPlan: {
|
||||
|
||||
@@ -215,6 +215,8 @@
|
||||
bordered
|
||||
form-is-depend="isAdopt"
|
||||
:pagination="false"
|
||||
:locale="tableLocale"
|
||||
:class="{'empty-no-opinion': tableEmptyShowNoOpinion}"
|
||||
:extra-form="collectExtraForm"
|
||||
:all-disabled="disabledConsultationList"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
||||
@@ -331,6 +333,7 @@ import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||
import { getFileInfo } from '../../../api/api'
|
||||
import TextContentModal from '../../businessSupport/askForAdvice/modules/TextContentModal'
|
||||
import moment from 'moment'
|
||||
import { Empty } from 'ant-design-vue'
|
||||
|
||||
export default {
|
||||
name: 'StandardConsultationProcess',
|
||||
@@ -742,7 +745,11 @@ export default {
|
||||
],
|
||||
businessId: null,
|
||||
currentNodePrefix: null, // 当前节点的固定前缀,用于人员信息组件处理
|
||||
disabledBtnClick: false
|
||||
disabledBtnClick: false,
|
||||
tableEmptyShowNoOpinion: false, // 表格暂无数据文本在汇总节点显示无意见
|
||||
tableLocale: {
|
||||
emptyText: <a-empty image={Empty.PRESENTED_IMAGE_SIMPLE}><span slot="description"> {this.$t('noData')} </span></a-empty>
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -787,6 +794,11 @@ export default {
|
||||
const nodes = [ConsultationProcess.leaderApproval.value, ConsultationProcess.regulatoryEngineerApproval.value]
|
||||
return nodes.some(tt => this.currentNode.indexOf(tt) === 0)
|
||||
},
|
||||
// 没有意见可以直接提交的节点
|
||||
isNoOpinionSubmitNode () {
|
||||
const nodes = [ConsultationProcess.moduleOwnerSummary.value, ConsultationProcess.leaderApproval.value, ConsultationProcess.leaderSummary.value, ConsultationProcess.leaderSummary.value, ConsultationProcess.regulatoryEngineerApproval.value]
|
||||
return nodes.some(tt => this.currentNode.indexOf(tt) === 0)
|
||||
},
|
||||
columns () {
|
||||
// 设计工程师填写征求意见表头
|
||||
if (this.currentNode.indexOf(ConsultationProcess.designEngineerFillIn.value) === 0) {
|
||||
@@ -805,6 +817,13 @@ export default {
|
||||
return []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableEmptyShowNoOpinion () {
|
||||
this.tableLocale.emptyText = <a-empty image={Empty.PRESENTED_IMAGE_SIMPLE}>
|
||||
<span slot="description"> {this.tableEmptyShowNoOpinion ? this.$t('workCenter.standardConsultationProcess.noOpinion') : this.$t('noData')} </span>
|
||||
</a-empty>
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// 获取人员信息数据
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
@@ -861,6 +880,8 @@ export default {
|
||||
}
|
||||
// 征求意见列表
|
||||
this.dataSource = result.businessInfoDTO.processFbConsultationLists || []
|
||||
// 如果是设计工程师后面的节点,没有征求意见table emptyText显示“无意见”,否则显示“暂无数据”
|
||||
this.tableEmptyShowNoOpinion = (!this.dataSource || this.dataSource.length === 0) && this.isNoOpinionSubmitNode
|
||||
// 统一处理表单回显
|
||||
this.$nextTick(() => {
|
||||
this.processInfoForm.setFieldsValue(this.processInfo)
|
||||
@@ -965,7 +986,6 @@ export default {
|
||||
})
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
console.log(selectedRowKeys)
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
handleEdit (record, index) {
|
||||
@@ -973,10 +993,24 @@ export default {
|
||||
const pdfId = this.basicServiceInfo.standardTextFileId
|
||||
this.$refs.consultationModal.edit(pdfId, record)
|
||||
},
|
||||
asyncConfirmData () {
|
||||
return new Promise(resolve => {
|
||||
this.$confirm({
|
||||
title: this.$t('tips'),
|
||||
content: this.$t('workCenter.standardConsultationProcess.isThereNoOpinion'),
|
||||
onOk: () => {
|
||||
resolve(true)
|
||||
},
|
||||
onCancel: () => {
|
||||
resolve(false)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 处理页面数据
|
||||
*/
|
||||
dealFormData (isSave) {
|
||||
async dealFormData (isSave) {
|
||||
// 提交的表单数据,流程信息,流程审批信息,征求意见列表,业务分派信息,业务基本信息
|
||||
let formData = {}, processInfo = {}, approvalInfo = {}, consultationListData = [], dispatchInfo = {}, basicServiceInfo = {},
|
||||
userInfoMap = {}, flag = true, baseFlag
|
||||
@@ -1048,10 +1082,12 @@ export default {
|
||||
this.$message.warning(this.$t('workCenter.checkTableRequired'))
|
||||
flag = false
|
||||
}
|
||||
// 征求意见列表, 至少一行数据
|
||||
if (this.showConsultationList && (!this.dataSource || this.dataSource.length === 0)) {
|
||||
flag = false
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
// 征求意见列表且当前节点不是汇总节点, 至少一行数据
|
||||
if (this.showConsultationList && (!this.dataSource || this.dataSource.length === 0) && !this.isNoOpinionSubmitNode) {
|
||||
const listAsyncConfirmResult = await this.asyncConfirmData()
|
||||
if (!listAsyncConfirmResult) {
|
||||
flag = false
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
this.switchValue = 'base'
|
||||
@@ -1121,12 +1157,12 @@ export default {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
handleSave () {
|
||||
async handleSave () {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
const formData = this.dealFormData(true)
|
||||
const formData = await this.dealFormData(true)
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
@@ -1154,12 +1190,12 @@ export default {
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
handleSubmit () {
|
||||
async handleSubmit () {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
const formData = this.dealFormData()
|
||||
const formData = await this.dealFormData()
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
@@ -1168,7 +1204,7 @@ export default {
|
||||
let func
|
||||
if (!this.currentNode || (this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0 && (!this.$route.query.processInstanceId || this.$route.query.draftId))) {
|
||||
func = initiateConsultationProcess
|
||||
const saveForm = this.dealFormData(true)
|
||||
const saveForm = await this.dealFormData(true)
|
||||
if (saveForm) {
|
||||
formData.infoJsonStr = JSON.stringify(saveForm)
|
||||
}
|
||||
@@ -1190,7 +1226,7 @@ export default {
|
||||
/**
|
||||
* 同意
|
||||
*/
|
||||
handleAgree () {
|
||||
async handleAgree () {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
@@ -1199,7 +1235,7 @@ export default {
|
||||
if (!this.approvalInfoForm.getFieldValue('handleText')) {
|
||||
this.approvalInfoForm.setFieldsValue({ handleText: '同意' })
|
||||
}
|
||||
const formData = this.dealFormData()
|
||||
const formData = await this.dealFormData()
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
@@ -1221,13 +1257,13 @@ export default {
|
||||
/**
|
||||
* 驳回
|
||||
*/
|
||||
handleReject () {
|
||||
async handleReject () {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
this.validatorRules.handleText.rules[0].required = true
|
||||
const formData = this.dealFormData()
|
||||
const formData = await this.dealFormData()
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
@@ -1361,4 +1397,10 @@ export default {
|
||||
.can-click {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.empty-no-opinion {
|
||||
/deep/ .ant-empty-description {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user