[update] 企标流程联调
This commit is contained in:
+46
-48
@@ -49,7 +49,7 @@
|
||||
v-decorator="['prcMes']" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="[2, 3, 4, 5].includes(currentNode)">
|
||||
<a-col :span="24" v-show="[2, 3, 4, 5].includes(currentNode)">
|
||||
<!-- 制修订计划说明 -->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('workCenter.revisionPlanActivelyReport.revisionPlanDesc')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.revisionPlanActivelyReport.revisionPlanDesc')"
|
||||
@@ -336,11 +336,7 @@ export default {
|
||||
this.model = res.result
|
||||
this.$nextTick(() => {
|
||||
// 初始化流程信息,节点1没有制修订计划说明,其余节点都有制修订计划说明
|
||||
if (this.currentNode === 1) {
|
||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
||||
} else {
|
||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes', 'processDescription'))
|
||||
}
|
||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes', 'processDescription'))
|
||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
||||
})
|
||||
@@ -486,26 +482,25 @@ export default {
|
||||
// 流程信息校验
|
||||
this.processInfoForm.validateFields((err, values) => {
|
||||
// 流程审批信息校验
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||
// 需要校验业务基本信息中的表单
|
||||
this.$refs.baseInfoFormRef.getDataValidate(data => {
|
||||
if (!err && !approvalErr && data) {
|
||||
this.loading = true
|
||||
const param = {} // 需要给后端的参数
|
||||
param.common = { ...values, ...approvalValues, ...data.formInline }
|
||||
param.flowUser = personnelObj
|
||||
activelyReportApproval(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
const data = await this.$refs.baseInfoFormRef.getDataValidate()
|
||||
if (!err && !approvalErr && data) {
|
||||
this.loading = true
|
||||
const param = {} // 需要给后端的参数
|
||||
param.common = { ...values, ...approvalValues, ...data.formInline }
|
||||
param.flowUser = personnelObj
|
||||
activelyReportApproval(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -540,34 +535,37 @@ export default {
|
||||
handleSubmit () {
|
||||
if (this.loading) return
|
||||
// 流程审批信息校验
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
this.$refs.baseInfoFormRef.getDataValidate(data => {
|
||||
if (approvalErr && data) {
|
||||
this.loading = true
|
||||
const param = {} // 传给后端的参数
|
||||
// 节点2,3有表单和表格,节点4只有表格
|
||||
if ([2, 3].includes(this.currentNode)) {
|
||||
// 业务基本信息有表单也有表格
|
||||
param.common = approvalValues
|
||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||
const data = await this.$refs.baseInfoFormRef.getDataValidate()
|
||||
const param = {} // 传给后端的参数
|
||||
if (!approvalErr && data) {
|
||||
this.loading = true
|
||||
// 节点2可能是表单和表格也可能只有表单,节点3有表单和表格,节点4只有表格
|
||||
if ([2, 3].includes(this.currentNode)) {
|
||||
// 业务基本信息有表单也有表格
|
||||
if (data.dataSource) {
|
||||
param.dataList = data.dataSource.map(item => {
|
||||
return { ...item, ...data.formInline }
|
||||
})
|
||||
} else if (this.currentNode === 5) {
|
||||
param.common = approvalValues
|
||||
param.dataList = data.dataSource
|
||||
} else {
|
||||
param.dataList = [data.formInline]
|
||||
}
|
||||
activelyReportAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else if (this.currentNode === 5) {
|
||||
param.dataList = data.dataSource
|
||||
}
|
||||
})
|
||||
param.common = approvalValues
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
activelyReportAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 同意(节点4,6有同意)
|
||||
|
||||
+20
-15
@@ -99,7 +99,7 @@ export default {
|
||||
distributeFlag: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
|
||||
message: this.$t('workCenter.revisionPlanActivelyReport.whetherToSendAContact') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
workGroupUser: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.workingGroupContactPerson') + this.$t('cannotEmpty'),
|
||||
message: this.$t('workCenter.revisionPlanActivelyReport.workingGroupContactPerson') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
contactUserLeaderLeader: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.contactSupervisorSuperiorLeader') + this.$t('cannotEmpty'),
|
||||
message: this.$t('workCenter.revisionPlanActivelyReport.contactSupervisorSuperiorLeader') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
@@ -158,25 +158,30 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
async getDataValidate () {
|
||||
console.log('------getDataValidate------')
|
||||
// 可能是表单,也可能是表格,表单校验一定要填,有是否下发联络人
|
||||
this.$refs.ruleForm.validate(result => {
|
||||
let data = {}// 返回的数据
|
||||
await this.$refs.ruleForm.validate(async result => {
|
||||
if (result) {
|
||||
if (this.$refs.tableRef.dataSource && this.$refs.tableRef.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
data.dataSource = this.$refs.tableRef.dataSource
|
||||
callback(data)
|
||||
if (this.$refs.tableRef) {
|
||||
// 存在表格说明是否下发联络人选择了否
|
||||
if (this.$refs.tableRef.dataSource && this.$refs.tableRef.dataSource.length > 0) {
|
||||
data.formInline = this.formInline
|
||||
data.dataSource = this.$refs.tableRef.dataSource
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
data = false
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
const data = false
|
||||
callback(data)
|
||||
// 是否下发联络人选择了是
|
||||
data.formInline = this.formInline
|
||||
}
|
||||
} else {
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
})
|
||||
return data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-19
@@ -85,7 +85,7 @@
|
||||
|
||||
<!-- 人员信息 -->
|
||||
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<process-detail-list :url="url">
|
||||
<process-detail-list>
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
|
||||
</process-detail-list>
|
||||
</div>
|
||||
@@ -232,6 +232,25 @@ export default {
|
||||
// 没有taskId说明是新建进来的,初始化人员信息
|
||||
this.personnelInfoData = personData
|
||||
}
|
||||
// 初始化节点
|
||||
const taskName = this.$route.query.taskName
|
||||
if (taskName) {
|
||||
if (taskName === '标准化工程师发起') {
|
||||
this.currentNode = 1
|
||||
} else if (taskName === '各部所联络人 填写/下发任务') {
|
||||
this.currentNode = 2
|
||||
} else if (taskName === '主起草单位主管级领导审批下发') {
|
||||
this.currentNode = 3
|
||||
} else if (taskName === '主起草人填写信息') {
|
||||
this.currentNode = 4
|
||||
} else if (taskName === '部所联络人汇总') {
|
||||
this.currentNode = 5
|
||||
} else if (taskName === '主起草单位主管级领导批准') {
|
||||
this.currentNode = 6
|
||||
} else {
|
||||
this.currentNode = 7
|
||||
}
|
||||
}
|
||||
// 如果是查看进入的,不可编辑,不可操作
|
||||
if (this.$route.query.onlyLook) {
|
||||
this.onlyLook = this.$route.query.onlyLook
|
||||
@@ -302,24 +321,6 @@ export default {
|
||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
||||
})
|
||||
const taskName = this.$route.query.taskName
|
||||
if (taskName) {
|
||||
if (taskName === '标准化工程师发起') {
|
||||
this.currentNode = 1
|
||||
} else if (taskName === '部所联络人选取审批人') {
|
||||
this.currentNode = 2
|
||||
} else if (taskName === '主起草单位主管级领导审批下发') {
|
||||
this.currentNode = 3
|
||||
} else if (taskName === '主起草人填写信息') {
|
||||
this.currentNode = 4
|
||||
} else if (taskName === '部所联络人汇总') {
|
||||
this.currentNode = 5
|
||||
} else if (taskName === '主起草单位主管级领导批准') {
|
||||
this.currentNode = 6
|
||||
} else {
|
||||
this.currentNode = 7
|
||||
}
|
||||
}
|
||||
if (this.currentNode === 1) {
|
||||
this.personnelInfoData = personData.map(item => {
|
||||
if (item.fieldName) {
|
||||
|
||||
Reference in New Issue
Block a user