[update] 联调年度制修订计划

This commit is contained in:
lideqin
2023-10-31 11:02:29 +08:00
parent 51156d3f3b
commit 39bb7afd20
6 changed files with 165 additions and 69 deletions
+9 -9
View File
@@ -31,25 +31,25 @@ const getProcessDataById = (taskId, params) => getAction(`/process/es/initChange
// 发起
const activelyReportApproval = (params) => postAction('/process/es/annualReport/start', params)
// 保存
const activelyReportSave = (params) => postAction('', params)
const activelyReportSave = (params) => postAction('/process/es/annualReport/save', params)
// 转办
const activelyReportTurnTo = (params) => postAction('', params)
const activelyReportTurnTo = (params) => postAction('/process/es/annualReport/transfer', params)
// 同意
const activelyReportAgree = (params) => postAction('', params)
const activelyReportAgree = (params) => postAction('/process/es/annualReport/agree', params)
// 拒绝
const activelyReportReject = (params) => postAction('', params)
const activelyReportReject = (params) => postAction('/process/es/annualReport/reject', params)
// 年度制修订计划(标准化发起)
// 发起
const standardizationInitApproval = (params) => postAction('', params)
const standardizationInitApproval = (params) => postAction('/process/es/annualInit/start', params)
// 保存
const standardizationInitSave = (params) => postAction('', params)
const standardizationInitSave = (params) => postAction('/process/es/annualInit/save', params)
// 转办
const standardizationInitTurnTo = (params) => postAction('', params)
const standardizationInitTurnTo = (params) => postAction('/process/es/annualInit/transfer', params)
// 同意
const standardizationInitAgree = (params) => postAction('', params)
const standardizationInitAgree = (params) => postAction('/process/es/annualInit/agree', params)
// 拒绝
const standardizationInitReject = (params) => postAction('', params)
const standardizationInitReject = (params) => postAction('/process/es/annualInit/reject', params)
// 企标更改流程
// 保存
@@ -26,7 +26,7 @@
@change="event => event.target.value = event.target.value.trim()"
:disabled="disabled || processInfoDisabled"
:maxLength="50"
v-decorator="['processName', validatorRules.processName]" />
v-decorator="['prcName', validatorRules.prcName]" />
</a-form-item>
</a-col>
<a-col :span="12">
@@ -36,7 +36,7 @@
style="width: 100%"
:disabled="disabled || processInfoDisabled"
value-format="YYYY-MM-DD"
v-decorator="['expirationDate']" />
v-decorator="['dueTime']" />
</a-form-item>
</a-col>
<a-col :span="24">
@@ -46,7 +46,7 @@
:maxLength="500"
:rows="4"
:disabled="disabled || processInfoDisabled"
v-decorator="['processExplain']" />
v-decorator="['prcMes']" />
</a-form-item>
</a-col>
<a-col :span="24" v-if="[2, 3, 4, 5].includes(currentNode)">
@@ -56,7 +56,7 @@
:maxLength="500"
:rows="4"
disabled
v-decorator="['revisionPlanDesc']" />
v-decorator="['processDescription']" />
</a-form-item>
</a-col>
</a-row>
@@ -87,11 +87,11 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['remarks', validatorRules.remarks]" />
v-decorator="['commitText', validatorRules.commitText]" />
</a-form-item>
<!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
<j-upload v-decorator="['file']" return-id />
<j-upload v-decorator="['commitFile']" return-id />
</a-form-item>
</a-form>
</div>
@@ -158,20 +158,25 @@ import {
activelyReportAgree,
activelyReportReject
} from '@/api/workCenter'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
const personData = [
{
id: 1,
nodeName: '标准化工程师发起',
nodeRoleName: '发起人',
canChoose: false
canChoose: false,
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')',
fieldName: 'standardEngineer'
},
{
id: 2,
nodeName: '各部门联络人填写/下发任务',
nodeRoleName: '各部门联络人',
canChoose: true,
chooseType: 'checkbox'
chooseType: 'checkbox',
fieldName: 'contactUserList'
},
{
id: 3,
@@ -269,7 +274,7 @@ export default {
onlyLook: false,
validatorRules: {
// 流程名称
processName: {
prcName: {
rules: [
{
required: true,
@@ -279,7 +284,7 @@ export default {
validateTrigger: 'blur'
},
// 备注
remarks: {
commitText: {
rules: [
{
required: false,
@@ -318,15 +323,43 @@ export default {
}
// 需要传给后端的
let param = {}
param.common = { ...processInfoForm, ...approvalInfoForm }
param.flowUser = personnelObj
// 业务基本信息
if (this.$refs.baseInfoFormRef) {
// 业务基本信息
let ruleForm = this.$refs.baseInfoFormRef.getData()
if ([1, 2, 3].includes(this.currentNode)) {
// 业务基本信息中有表单
}
if ([2, 3, 5].includes(this.currentNode)) {
// 业务基础信息中有可编辑表格 todo: 看后端要什么格式
const ruleForm = this.$refs.baseInfoFormRef.getData()
if (this.currentNode === 1) {
// 只有表单
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
param.dataList = [ruleForm.formInline]
} else if ([2, 3].includes(this.currentNode)) {
// 业务基本信息有表单也有表格
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag || ruleForm.dataSource.length <= 0) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
param.dataList = ruleForm.dataSource.map(item => {
return { ...item, ...ruleForm.formInline }
})
} else if (this.currentNode === 5) {
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag || ruleForm.dataSource.length <= 0) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
// 业务基础信息中只有表格
param.dataList = ruleForm.dataSource
}
} else {
// 需要外层信息至少填了一项
@@ -361,6 +394,8 @@ export default {
personnelObj[item.fieldName] = item.user
}
}
// 发起人,标准化工程师设置为当前登录人
personnelObj.standardEngineer = Vue.ls.get(USER_INFO).id
// 校验是否填了所有能填的人员信息
if (!Object.values(personnelObj).every(v => !!v)) {
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
@@ -375,6 +410,8 @@ export default {
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)
@@ -422,8 +459,28 @@ export default {
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
this.$refs.baseInfoFormRef.getDataValidate(data => {
if (approvalErr && data) {
this.loading = true
const param = {} // 传给后端的参数
// 节点2,3有表单和表格,节点4只有表格
// param =
if ([2, 3].includes(this.currentNode)) {
// 业务基本信息有表单也有表格
param.common = approvalValues
param.dataList = data.dataSource.map(item => {
return { ...item, ...data.formInline }
})
} else if (this.currentNode === 5) {
param.common = approvalValues
param.dataList = data.dataSource
}
activelyReportAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
})
@@ -11,19 +11,19 @@
{{ $t('workCenter.revisionPlanActivelyReport.whetherToSendAContact') }}
</span>
</div>
<a-form-model-item class="item-model" prop="whetherToSendAContact">
<a-radio-group v-model="formInline.whetherToSendAContact">
<a-radio :value="1">
<a-form-model-item class="item-model" prop="distributeFlag">
<a-radio-group v-model="formInline.distributeFlag">
<a-radio value="1">
{{ $t('yes') }}
</a-radio>
<a-radio :value="2">
<a-radio value="0">
{{ $t('not') }}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
<!-- 是否下发联络人选了是不显示表格只显示完整表单 -->
<template v-if="formInline.whetherToSendAContact === 1">
<template v-if="formInline.distributeFlag === '1'">
<!-- 工作组/所联络人 -->
<div class="box-title-text form-flex-item flex-item-long">
<div class="title-text title-text-middle">
@@ -32,13 +32,13 @@
{{ $t('workCenter.revisionPlanActivelyReport.workingGroupContactPerson') }}
</span>
</div>
<a-form-model-item class="item-model" prop="workingGroupContactPerson">
<a-form-model-item class="item-model" prop="workGroupUser">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.revisionPlanActivelyReport.workingGroupContactPerson')"
v-model="formInline.revisionPlanActivelyReport"
v-model="formInline.workGroupUser"
:disabled="disabled"
filedName="revisionPlanActivelyReport"
filedName="workGroupUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.revisionPlanActivelyReport_dictText"
:nameStr="formInline.workGroupUser_dictText"
type="checkbox" />
</a-form-model-item>
</div>
@@ -50,13 +50,13 @@
{{ $t('workCenter.revisionPlanActivelyReport.contactSupervisorSuperiorLeader') }}
</span>
</div>
<a-form-model-item class="item-model" prop="contactSupervisorSuperiorLeader">
<a-form-model-item class="item-model" prop="contactUserLeaderLeader">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.revisionPlanActivelyReport.contactSupervisorSuperiorLeader')"
v-model="formInline.contactSupervisorSuperiorLeader"
v-model="formInline.contactUserLeaderLeader"
:disabled="disabled"
filedName="contactSupervisorSuperiorLeader"
filedName="contactUserLeaderLeader"
@nameChange="userSelectNameChange"
:nameStr="formInline.contactSupervisorSuperiorLeader_dictText"
:nameStr="formInline.contactUserLeaderLeader_dictText"
type="radio" />
</a-form-model-item>
</div>
@@ -65,7 +65,7 @@
</div>
</a-form-model>
<!-- 是否下发联络人选了否不显示完整表单显示表格 -->
<div v-if="formInline.whetherToSendAContact === 2" class="change-base-info-wrapper">
<div v-if="formInline.distributeFlag === '0'" class="change-base-info-wrapper">
<only-table-form ref="tableRef"></only-table-form>
</div>
</div>
@@ -96,7 +96,7 @@ export default {
formInline: {},
rules: {
// 是否下发联络人
whetherToSendAContact: [
distributeFlag: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
@@ -104,7 +104,7 @@ export default {
}
],
// 工作组/所联络人
workingGroupContactPerson: [
workGroupUser: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.workingGroupContactPerson') + this.$t('cannotEmpty'),
@@ -112,7 +112,7 @@ export default {
}
],
// 联络人主管级上一级领导
contactSupervisorSuperiorLeader: [
contactUserLeaderLeader: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.contactSupervisorSuperiorLeader') + this.$t('cannotEmpty'),
@@ -10,11 +10,11 @@
{{ $t('workCenter.revisionPlanActivelyReport.revisionPlanDesc') }}
</span>
</div>
<a-form-model-item class="item-model" prop="revisionPlanDesc">
<a-form-model-item class="item-model" prop="processDescription">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.revisionPlanActivelyReport.revisionPlanDesc')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.revisionPlanDesc" :rows="4" />
v-model="formInline.processDescription" :rows="4" />
</a-form-model-item>
</div>
</div>
@@ -37,7 +37,7 @@ export default {
formInline: {},
rules: {
// 制修订计划说明
revisionPlanDesc: [
processDescription: [
{
required: true,
message: this.$t('workCenter.revisionPlanActivelyReport.revisionPlanDesc') + this.$t('cannotEmpty'),
@@ -14,7 +14,7 @@
</div>
</template>
<!-- 基础信息 -->
<div v-if="switchValue === 'base'" class="detail-page-scroll-content">
<div v-show="switchValue === 'base'" class="detail-page-scroll-content">
<!-- 流程信息 -->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<a-form :form="processInfoForm">
@@ -26,7 +26,7 @@
@change="event => event.target.value = event.target.value.trim()"
:disabled="disabled || processInfoDisabled"
:maxLength="50"
v-decorator="['processName', validatorRules.processName]" />
v-decorator="['prcName', validatorRules.prcName]" />
</a-form-item>
</a-col>
<a-col :span="12">
@@ -36,7 +36,7 @@
style="width: 100%"
:disabled="disabled || processInfoDisabled"
value-format="YYYY-MM-DD"
v-decorator="['expirationDate']" />
v-decorator="['dueTime']" />
</a-form-item>
</a-col>
<a-col :span="24">
@@ -46,7 +46,7 @@
:maxLength="500"
:rows="4"
:disabled="disabled || processInfoDisabled"
v-decorator="['processExplain']" />
v-decorator="['prcMes']" />
</a-form-item>
</a-col>
</a-row>
@@ -74,19 +74,19 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['remarks', validatorRules.remarks]" />
v-decorator="['commitText', validatorRules.commitText]" />
</a-form-item>
<!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
<j-upload v-decorator="['file']" return-id />
<j-upload v-decorator="['commitFile']" return-id />
</a-form-item>
</a-form>
</div>
<!-- 人员信息 -->
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
</process-detail-list>
</div>
@@ -145,13 +145,17 @@ import {
standardizationInitAgree,
standardizationInitReject
} from '@/api/workCenter'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
const personData = [
{
id: 1,
nodeName: '标准化工程师发起',
nodeRoleName: '发起人',
canChoose: false
canChoose: false,
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')',
fieldName: 'standardEngineer'
},
{
id: 2,
@@ -251,7 +255,7 @@ export default {
onlyLook: false,
validatorRules: {
// 流程名称
processName: {
prcName: {
rules: [
{
required: true,
@@ -261,7 +265,7 @@ export default {
validateTrigger: 'blur'
},
// 备注
remarks: {
commitText: {
rules: [
{
required: false,
@@ -299,16 +303,25 @@ export default {
}
}
// 需要传给后端的
let param = {}
const param = {}
param.common = { ...processInfoForm, ...approvalInfoForm }
param.flowUser = personnelObj
// 业务基本信息
if (this.$refs.basicInfoFormRef) {
let ruleForm = this.$refs.baseInfoRef.getData()
const ruleForm = this.$refs.baseInfoRef.getData()
const form = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(form).some(v => !!v || v === 0)
if (!flag || ruleForm.dataSource.length <= 0) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
// 该流程中业务基本信息只有表格
// ruleForm.dataSource
param.dataList = ruleForm.dataSource
} else {
// 需要外层信息至少填了一项
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0)
const form = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(form).some(v => !!v || v === 0)
if (!flag) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
@@ -338,6 +351,8 @@ export default {
personnelObj[item.fieldName] = item.user
}
}
// 发起人,标准化工程师设置为当前登录人
personnelObj.standardEngineer = Vue.ls.get(USER_INFO).id
// 校验是否填了所有能填的人员信息
if (!Object.values(personnelObj).every(v => !!v)) {
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
@@ -348,6 +363,9 @@ export default {
this.$refs.baseInfoRef.getDataValidate((data) => {
if (!err && !approvalErr && data) {
const param = {} // 传给后端的数据
param.common = { ...values, ...approvalValues }
param.dataList = data.dataSource
param.flowUser = personnelObj
standardizationInitApproval(param).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -396,7 +414,18 @@ export default {
this.$refs.baseInfoFormRef.getDataValidate(data => {
if (approvalErr && data) {
// 只有表格
// param =
const param = {}
param.common = approvalValues
param.dataList = data.dataSource
standardizationInitAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
})
@@ -407,7 +436,8 @@ export default {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
const param = {}
param.common = Object.assign({}, values)
param.taskId = this.$route.query.taskId
standardizationInitAgree(param).then(res => {
if (res.success) {
@@ -427,7 +457,8 @@ export default {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
const param = {}
param.commom = Object.assign({}, values)
param.taskId = this.$route.query.taskId
standardizationInitReject(param).then(res => {
if (res.success) {
@@ -278,7 +278,11 @@ export default {
* 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人,
* 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程 ??
*/
// this.isRejectedTodo = false
if (this.$route.query.taskId) {
this.isRejectedTodo = true
} else {
this.isRejectedTodo = false
}
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
@@ -291,7 +295,9 @@ export default {
getData () {
// 把数据抛出
const data = {}
data.dataSource = this.dataSource
data.dataSource = this.dataSource.map(item => {
return { ...item, enStandardSystem: item.enStandardSystem ? item.enStandardSystem.join(',') : ''}
})
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -299,7 +305,9 @@ export default {
// 校验表格是否每行都有数据,每行的联络人是否都有
if (this.dataSource && this.dataSource.length > 0) {
const data = {}
data.dataSource = this.dataSource
data.dataSource = this.dataSource.map(item => {
return { ...item, enStandardSystem: item.enStandardSystem ? item.enStandardSystem.join(',') : ''}
})
let hasErr = false
for (const item of this.dataSource) {
if (!item.contactUser) {