From 41adfa6baf729dc53231862a72852cac51f3e292 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Tue, 17 Oct 2023 18:04:50 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E8=81=94=E8=B0=83=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=AB=8B=E9=A1=B9=E3=80=81=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=EF=BC=8C=E7=94=BB=E5=B9=B4=E5=BA=A6=E5=88=B6?= =?UTF-8?q?=E4=BF=AE=E8=AE=A2=E8=AE=A1=E5=88=92-=E5=90=84=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E4=B8=BB=E5=8A=A8=E4=B8=8A=E6=8A=A5=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workCenter.js | 7 +- src/common/lang/en-us.js | 1 + src/common/lang/workCenter/en.js | 3 +- src/common/lang/workCenter/zh.js | 3 +- src/common/lang/zh-cn.js | 3 +- .../RevisionPlanActivelyReportFlow.vue | 209 ++++++++-- .../modules/ContactEnterSendTaskForm.vue | 46 ++- .../modules/ContactEnterSendTaskModal.vue | 40 +- .../modules/ContactEnterStandardForm.vue | 341 ++++++++++++++++- .../modules/OnlyTableForm.vue | 358 ++++++++++++++++++ .../PlanApprovalChangeFlow.vue | 215 +++++------ .../modules/ApprovalBaseInfo.vue | 1 + .../modules/DutyDepartChangeBaseInfo.vue | 50 +-- .../FinishTimeChangeBaseInfoDrawer.vue | 41 +- 14 files changed, 1078 insertions(+), 240 deletions(-) create mode 100644 src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue diff --git a/src/api/workCenter.js b/src/api/workCenter.js index 93868a77..389feb8d 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -13,13 +13,15 @@ const deleteFlowNode = (params) => postAction('/activitiModel/deleteTask', param // 转办 const enterprisePlanApprovalTurnTo = (params) => postAction('/process/es/initChange/transfer', params) // 同意 -const enterprisePlanApprovalAgree = (params) => postAction('', params) +const enterprisePlanApprovalAgree = (params) => postAction('/process/es/initChange/agree', params) // 驳回 -const enterprisePlanApprovalReject = (params) => postAction('', params) +const enterprisePlanApprovalReject = (params) => postAction('/process/es/initChange/reject', params) // 确定 const enterprisePlanApprovalDetermine = (params) => postAction('', params) // 节点一的提交————发起流程 const enterprisePlanApproval = (params) => postAction('/process/es/initChange/start', params) +// 其他节点的提交 +const enterprisePlanApprovalSubmit = (params) => postAction('', params) // 保存 const enterprisePlanApprovalSave = (params) => postAction('/process/es/initChange/save', params) // 根据三个编号和年代号获取企标编号 @@ -43,6 +45,7 @@ export { enterprisePlanApprovalReject, enterprisePlanApprovalDetermine, enterprisePlanApproval, + enterprisePlanApprovalSubmit, enterprisePlanApprovalSave, getEnStandardNo, getProcessDataById, diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js index 36351c02..c5cd3d98 100644 --- a/src/common/lang/en-us.js +++ b/src/common/lang/en-us.js @@ -157,6 +157,7 @@ module.exports = { addAtLeastOneRowOfData: 'Please Add At Least One Row Of Data', mergeStandardInformation: '合并标准信息', pleaseEnterPersonnelInfo: '请完整填写人员信息', + pleaseEnterRemarks: '请填写备注', // 树右键 treeRight: { addFolder: 'Create New Folder', diff --git a/src/common/lang/workCenter/en.js b/src/common/lang/workCenter/en.js index 8f0e4323..2ce35fe6 100644 --- a/src/common/lang/workCenter/en.js +++ b/src/common/lang/workCenter/en.js @@ -90,7 +90,8 @@ module.exports = { whetherToSendAContact: '是否下发联络人', workingGroupContactPerson: '工作组/所联络人', contactSupervisorSuperiorLeader: '联络人主管级上一级领导', - affiliatedWorkingGroup: '隶属工作组' + affiliatedWorkingGroup: '隶属工作组', + contactsSupervisorLevelLeaders: '收集联络人主管级领导' }, // 流程配置 processConfig: { diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js index 160bd499..1b664914 100644 --- a/src/common/lang/workCenter/zh.js +++ b/src/common/lang/workCenter/zh.js @@ -90,7 +90,8 @@ module.exports = { whetherToSendAContact: '是否下发联络人', workingGroupContactPerson: '工作组/所联络人', contactSupervisorSuperiorLeader: '联络人主管级上一级领导', - affiliatedWorkingGroup: '隶属工作组' + affiliatedWorkingGroup: '隶属工作组', + contactsSupervisorLevelLeaders: '收集联络人主管级领导' }, // 流程配置 processConfig: { diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index f93a2b1c..95d61dc8 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -160,6 +160,7 @@ module.exports = { addAtLeastOneRowOfData: '请至少添加一行数据', mergeStandardInformation: '合并标准信息', pleaseEnterPersonnelInfo: '请完整填写人员信息', + pleaseEnterRemarks: '请填写备注', // 树右键 treeRight: { addFolder: '新增文件夹', @@ -419,7 +420,7 @@ module.exports = { changePermissions: '更改权限', pleaseSelectUser: '请选择一个用户', longTermEffectiveness: '是否长期有效', - + selectFileType: '请选择文件类型', onlyWord: '只能导入word文件', fileType: '文件类型', diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue index 7a836c2a..23bf1d0f 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue @@ -3,16 +3,18 @@ -
+
{{ $t('processInformation') }}
@@ -47,6 +49,16 @@ v-decorator="['processExplain']" /> + + + + + + @@ -56,6 +68,12 @@ + + + + + +
{{ $t('processApprovalInformation') }}
@@ -75,11 +93,48 @@
-
+
+ + +
+ + + + + + +
+ + + @@ -89,6 +144,9 @@ import InternalDetailPage from '@/components/InternalDetailPage' import PersonnelInfo from '@/components/PersonnelInfo' import ContactEnterSendTaskForm from './modules/ContactEnterSendTaskForm' import ProcessDetailList from '../../../components/ProcessDetailList' +import ContactEnterStandardForm from './modules/ContactEnterStandardForm' +import OnlyTableForm from './modules/OnlyTableForm' +import UserSelectModal from '@/components/selection/UserSelectModal' const personData = [ { @@ -143,7 +201,16 @@ const personData = [ export default { name: 'RevisionPlanActivelyReportFlow', - components: { ProcessDetailList, ContactEnterSendTaskForm, EngineerInitForm, InternalDetailPage, PersonnelInfo }, + components: { + OnlyTableForm, + ContactEnterStandardForm, + ProcessDetailList, + ContactEnterSendTaskForm, + EngineerInitForm, + InternalDetailPage, + PersonnelInfo, + UserSelectModal + }, computed: { pageTitle () { return this.$t('flowCenter') + this.$route.meta.title @@ -157,6 +224,11 @@ export default { return { ...item, canChoose: false } }) } + // 如果是查看进入的,不可编辑,不可操作 + if (this.$route.query.onlyLook) { + this.onlyLook = this.$route.query.onlyLook + this.disabled = this.$route.query.onlyLook + } }, data () { return { @@ -200,7 +272,7 @@ export default { validateTrigger: 'blur' } }, - currentNode: 2, + currentNode: 1, approvalInfoForm: this.$form.createForm(this), // 审批信息表单 personnelInfoData: [], // 人员信息数据 url: { @@ -212,32 +284,123 @@ export default { methods: { switchChange (value) { this.switchValue = value + }, + // 保存 + handleSave () { + // 有任意一项填了即可 + // 流程信息表单 + const processInfoForm = this.processInfoForm.getFieldsValue() + // 业务基本信息 + let ruleForm = {} + if ([1, 2, 3].includes(this.currentNode)) { + // 业务基本信息中有表单 + ruleForm = this.$refs.basicInfoFormRef.formInline + } + if ([2, 3, 5].includes(this.currentNode)) { + // 业务基础信息中有可编辑表格 todo: 看后端要什么格式 + } + // 流程审批信息 + const approvalInfoForm = this.approvalInfoForm.getFieldsValue() + // 人员信息的数据, 处理成对象 + const personnelInfo = this.$refs.personnelInfo.stepsData + const personnelObj = {} + for (const item of personnelInfo) { + if (item.fieldName) { + personnelObj[item.fieldName] = item.user + } + } + // 需要传给后端的 + // 业务基本信息 + if (this.$refs.basicInfoFormRef) { + + } else { + // 需要外层信息至少填了一项 + const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm, ...personnelObj } + const flag = Object.values(param).some(v => !!v || v === 0) + if (!flag) { + // 提示至少填写一项 + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) + return + } + } + // 保存到草稿 + // enterprisePlanApprovalSave(arr).then(res => { + // if (res.success) { + // this.$message.success(res.message) + // } else { + // this.$message.warning(res.message) + // } + // }) + }, + // 节点一时候的提交,发起变更 + handleStart () { + if (this.loading) return + // 人员信息的数据, 处理成对象 + const personnelInfo = this.$refs.personnelInfo.stepsData + const personnelObj = {} + for (const item of personnelInfo) { + if (item.fieldName) { + personnelObj[item.fieldName] = item.user + } + } + // 校验是否填了所有能填的人员信息 + if (!Object.values(personnelObj).every(v => !!v)) { + this.$message.warning(this.$t('pleaseEnterPersonnelInfo')) + return + } + this.processInfoForm.validateFields((err, values) => { + this.approvalInfoForm.validateFields((approvalErr, approvalValues) => { + + }) + }) + }, + // 转办 + handleTurnTo () { + if (this.loading) return + // 点击显示选人组件 + this.$refs.userSelectModal.open() + }, + // 转办选完人的回调 + userSelectModalChange (userIds) { + this.approvalInfoForm.validateFields((err, values) => { + if (!err) { + this.loading = true + const param = Object.assign({}, values) + param.userId = userIds + param.taskId = this.$route.query.taskId + // enterprisePlanApprovalTurnTo(param).then(res => { + // if (res.success) { + // this.$message.success(res.message) + // } else { + // this.$message.warning(res.message) + // } + // }).finally(() => { + // this.loading = false + // }) + } + }) + }, + // 提交 + handleSubmit () { + + }, + // 同意 + handleAgree () { + + }, + // 驳回 + handleReject () { + } } } diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue index e4df4925..726df9a1 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue @@ -4,7 +4,7 @@
-
+
* @@ -25,8 +25,8 @@ - diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue new file mode 100644 index 00000000..474a893a --- /dev/null +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue @@ -0,0 +1,358 @@ + + + + + diff --git a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue index 19fb2b27..497434d0 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue @@ -12,7 +12,7 @@
-
+
{{ $t('processInformation') }}
@@ -201,13 +201,13 @@
-
+
-
+