[update] 企标流程联调
This commit is contained in:
@@ -148,6 +148,7 @@
|
||||
ref="changeBaseInfo"
|
||||
:disabled="disabled"
|
||||
@processNameChange="processNameChange"
|
||||
:currentNode="currentNode"
|
||||
:projectType="formInline.projectType"
|
||||
>
|
||||
</duty-depart-change-base-info>
|
||||
@@ -164,18 +165,18 @@
|
||||
<!-- 部分节点需要选人 -->
|
||||
<a-form v-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && [6, 7].includes(currentNode)" class="user-form" :form="userForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<!-- 所长,节点6需要选所长 -->
|
||||
<a-form-item v-if="currentNode === 6" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.superintendent')">
|
||||
<!-- 所长,节点6需要选所长 -->
|
||||
<a-col :span="12" v-if="currentNode === 6">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.superintendent')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.superintendent')"
|
||||
type="radio"
|
||||
v-decorator="['newMainDraftUserLeaderLeader', validatorRules.newMainDraftUserLeaderLeader]"
|
||||
v-decorator="['newMainDraftUserLeader', validatorRules.newMainDraftUserLeader]"
|
||||
input-type="textarea" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<!-- 相关人员,节点7需要选相关人员 -->
|
||||
<a-form-item v-if="currentNode === 7" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.relatedPersonnel')">
|
||||
<!-- 相关人员,节点7需要选相关人员 -->
|
||||
<a-col :span="12" v-if="currentNode === 7">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.relatedPersonnel')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.relatedPersonnel')"
|
||||
type="checkbox"
|
||||
v-decorator="['relatedUser', validatorRules.relatedUser]"
|
||||
@@ -502,13 +503,20 @@ export default {
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 所长
|
||||
// 新起草部门主管级上级领导
|
||||
newMainDraftUserLeaderLeader: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enterpriseInitChangePlan.superintendent') }
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 所长
|
||||
newMainDraftUserLeader: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enterpriseInitChangePlan.superintendent') }
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 相关人员
|
||||
relatedUser: {
|
||||
rules: [
|
||||
@@ -556,6 +564,12 @@ export default {
|
||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
||||
})
|
||||
// 初始化业务基本信息的申请类型和项目类别,分开赋值是因为项目类别会没有下拉数据无法回显
|
||||
const baseInfoForm = {}
|
||||
baseInfoForm.applicationCategory = this.model.dataList[0].applicationCategory
|
||||
this.formInline = Object.assign({}, baseInfoForm)
|
||||
baseInfoForm.projectType = this.model.dataList[0].projectType
|
||||
this.formInline = Object.assign({}, baseInfoForm)
|
||||
// 初始化流程节点,此流程因为节点名称有重复,需要在此处根据applicationCatsegory做一些判断
|
||||
const taskName = this.$route.query.taskName
|
||||
if (taskName) {
|
||||
@@ -565,11 +579,11 @@ export default {
|
||||
this.currentNode = 2
|
||||
} else if (taskName === '专家审批' || taskName === '主起草人主管级领导审批') {
|
||||
this.currentNode = 3
|
||||
} else if (taskName === '发起人主管级领导审批' || taskName === '主起草人主管级上一级领导审批') {
|
||||
} else if (taskName === '发起人主管级领导审批' || taskName === '主起草人主管级上级领导审批') {
|
||||
this.currentNode = 4
|
||||
} else if (taskName === '发起人主管级上级领导审批' || (taskName === '标准化审批' && this.formInline.applicationCategory === this.ApplicationCategory.CHANGE.value)) {
|
||||
this.currentNode = 5
|
||||
} else if ((taskName === '标准化审批' && this.formInline.applicationCategory === this.ApplicationCategory.INITIATION.value) || taskName === '新起草部门主管级上一级领导下发') {
|
||||
} else if ((taskName === '标准化审批' && this.formInline.applicationCategory === this.ApplicationCategory.INITIATION.value) || taskName === '新起草部门主管级上一级领导下发主管级领导') {
|
||||
this.currentNode = 6
|
||||
} else if (taskName === '新起草部门主管级领导确认') {
|
||||
this.currentNode = 7
|
||||
@@ -579,18 +593,13 @@ export default {
|
||||
this.currentNode = 9
|
||||
}
|
||||
}
|
||||
console.log(this.currentNode)
|
||||
// 根据流程节点初始化是否可以编辑
|
||||
if (this.currentNode === 1) {
|
||||
this.disabled = false
|
||||
} else {
|
||||
this.disabled = true
|
||||
}
|
||||
// 初始化业务基本信息的申请类型和项目类别,分开赋值是因为项目类别会没有下拉数据无法回显
|
||||
const baseInfoForm = {}
|
||||
baseInfoForm.applicationCategory = this.model.dataList[0].applicationCategory
|
||||
this.formInline = Object.assign({}, baseInfoForm)
|
||||
baseInfoForm.projectType = this.model.dataList[0].projectType
|
||||
this.formInline = Object.assign({}, baseInfoForm)
|
||||
// 初始化人员信息
|
||||
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value && this.currentNode === 1) {
|
||||
// 立项的节点1
|
||||
@@ -824,6 +833,7 @@ export default {
|
||||
personnelObj.createUser = Vue.ls.get(USER_INFO).id
|
||||
// 后端需要单独传主起草人
|
||||
personnelObj.mainDraftUser = Vue.ls.get(USER_INFO).id
|
||||
console.log(personnelObj)
|
||||
// 校验是否填了所有能填的人员信息
|
||||
if (!Object.values(personnelObj).every(v => !!v)) {
|
||||
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
|
||||
@@ -947,8 +957,10 @@ export default {
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
if (!err && !approvalErr) {
|
||||
this.loading = true
|
||||
const param = Object.assign({}, values, approvalValues)
|
||||
param.taskId = this.$route.query.taskId
|
||||
const param = {}
|
||||
param.common = Object.assign({}, approvalValues)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.flowUser = Object.assign({}, values)
|
||||
enterprisePlanApprovalAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -991,22 +1003,35 @@ export default {
|
||||
// 同意
|
||||
handleAgree () {
|
||||
if (this.loading) return
|
||||
const param = {} // 需要传给后端的数据
|
||||
this.approvalInfoForm.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
enterprisePlanApprovalAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
if (this.formInline.projectType === this.ProjectType.RESPONSIBLE_DEPT_CHANGE.value && this.currentNode === 5) {
|
||||
// 责任部门变更,节点5需要校验业务基本信息的必填,新起草单位负责人就是新起草部门主管级上一级领导
|
||||
this.$refs.changeBaseInfo.$refs.ruleForm.validate(valid => {
|
||||
if (!err && valid) {
|
||||
// 校验完成
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.dataList = [this.$refs.changeBaseInfo.formInline]
|
||||
param.flowUser = { newMainDraftUserLeaderLeader: this.$refs.changeBaseInfo.formInline.newMainDraftingUnitResponsiblePerson }
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
if (!err) {
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
}
|
||||
}
|
||||
this.loading = true
|
||||
enterprisePlanApprovalAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 驳回
|
||||
|
||||
Reference in New Issue
Block a user