[update] 修改年度制修订标准化发起流程批量驳回

This commit is contained in:
lideqin
2023-12-15 19:23:58 +08:00
parent 712dfc58cc
commit 38c81dfaae
3 changed files with 40 additions and 4 deletions
+3
View File
@@ -61,6 +61,8 @@ const standardizationInitReject = (params) => postAction('/process/es/annualInit
const standardizationInitGetDataById = (taskId, params) => getAction(`/process/es/annualInit/handle/${taskId}`, params)
// 草稿的办理回显数据
const standardizationInitGetDataDraft = (params) => getAction('', params)
// 批量驳回
const standardizationInitBatchReject = (params) => postAction('/process/es/annualInit/batchReject', params)
// 企标制修订流程
// 保存
@@ -404,6 +406,7 @@ export {
standardizationInitReject,
standardizationInitGetDataById,
standardizationInitGetDataDraft,
standardizationInitBatchReject,
enStandardEditSave,
enStandardEditApproval,
@@ -57,7 +57,7 @@
<!-- 节点1标准工程师发起的基本信息表单 -->
<engineer-init-base-info v-if="[1, 3].includes(currentNode)" ref="baseInfoRef" :currentNode="currentNode"></engineer-init-base-info>
<!-- 节点2部所联络人选取审批人 -->
<contact-select-approver-base-info v-else-if="[2, 5].includes(currentNode)" ref="baseInfoRef" :currentNode="currentNode"></contact-select-approver-base-info>
<contact-select-approver-base-info v-else-if="[2, 5].includes(currentNode)" ref="baseInfoRef" :currentNode="currentNode" @batchReject="handleBatchReject"></contact-select-approver-base-info>
<!-- 节点3主起草单位主管级领导审批下发 -->
<leader-approve-sent-base-info v-else-if="currentNode === 4" ref="baseInfoRef"></leader-approve-sent-base-info>
<!-- 节点4主起草人填写信息 -->
@@ -145,7 +145,8 @@ import {
standardizationInitAgree,
standardizationInitReject,
standardizationInitGetDataById,
standardizationInitGetDataDraft
standardizationInitGetDataDraft,
standardizationInitBatchReject
} from '@/api/workCenter'
import pick from 'lodash.pick'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
@@ -526,6 +527,37 @@ export default {
}
})
})
},
// 批量驳回
handleBatchReject (ids) {
if (this.loading) return
this.validatorRules.commitText.rules[0].required = true
if (!this.approvalInfoForm.getFieldValue('commitText')) {
this.$message.warning(this.$t('pleaseEnterRemarks'))
return
}
this.$nextTick(() => {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = {}
param.common = Object.assign({}, values)
param.common.taskId = this.$route.query.taskId
param.batchRejectIds = ids
console.log(param, this.$route.query.taskId)
standardizationInitBatchReject(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
})
}
}
}
@@ -17,7 +17,7 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => {return index}"
:rowKey="(record, index) => {return record.id || index}"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
@@ -273,9 +273,10 @@ export default {
batchReject () {
if (this.selectedRowKeys.length <= 0) {
// 请选择至少一条记录
this.$message.warning(this.$t('atLeastSelectARecord'))
this.$message.warning(this.$t('depart.atLeastSelectARecord'))
return
}
this.$emit('batchReject', this.selectedRowKeys.join(','))
console.log(this.selectedRowKeys)
},
// 批量设置审批人