From 64bf3e05daff4b1e73cbdbad8e3447f3660432bf Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Thu, 12 Oct 2023 18:54:39 +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/=E5=8F=98=E6=9B=B4?=
=?UTF-8?q?=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/workCenter.js | 9 +
src/assets/less/common.less | 6 +
src/common/lang/en-us.js | 4 +
src/common/lang/zh-cn.js | 4 +
.../EnterprisePlanSelectionModal.vue | 12 +-
src/enums/commonEnums.js | 15 +
src/views/dashboard/Analysis.vue | 263 +--------------
.../PlanApprovalChangeFlow.vue | 233 +++++++++----
.../modules/ApprovalBaseInfo.vue | 307 +++++++++++-------
.../modules/FinishTimeChangeBaseInfo.vue | 17 +-
.../FinishTimeChangeBaseInfoDrawer.vue | 78 ++---
.../modules/JobEndBaseInfo.vue | 13 +-
.../modules/JobEndBaseInfoDrawer.vue | 34 +-
13 files changed, 483 insertions(+), 512 deletions(-)
diff --git a/src/api/workCenter.js b/src/api/workCenter.js
index 997e056f..88584cc5 100644
--- a/src/api/workCenter.js
+++ b/src/api/workCenter.js
@@ -18,6 +18,12 @@ const enterprisePlanApprovalAgree = (params) => postAction('', params)
const enterprisePlanApprovalReject = (params) => postAction('', params)
// 确定
const enterprisePlanApprovalDetermine = (params) => postAction('', params)
+// 节点一的提交————发起流程
+const enterprisePlanApproval = (params) => postAction('/process/es/initChange/start', params)
+// 保存
+const enterprisePlanApprovalSave = (params) => postAction('/process/es/initChange/save', params)
+// 根据三个编号和年代号获取企标编号
+const getEnStandardNo = (params) => postAction('/process/es/initChange/getStandardNo', params)
// 流程中心
// 待办-转办
@@ -34,6 +40,9 @@ export {
enterprisePlanApprovalAgree,
enterprisePlanApprovalReject,
enterprisePlanApprovalDetermine,
+ enterprisePlanApproval,
+ enterprisePlanApprovalSave,
+ getEnStandardNo,
toDoTurnTo,
compulsoryWithdrawal
diff --git a/src/assets/less/common.less b/src/assets/less/common.less
index 4e6fb11f..b872c4c9 100644
--- a/src/assets/less/common.less
+++ b/src/assets/less/common.less
@@ -821,6 +821,12 @@
}
}
+/deep/ .ant-btn-loading {
+ .iconfont {
+ display: none;
+ }
+}
+
/* 按钮中发那个自定义图标的样式 end */
.detail-page-bottom-operate-box {
diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js
index 0786d7b8..0baa411a 100644
--- a/src/common/lang/en-us.js
+++ b/src/common/lang/en-us.js
@@ -151,6 +151,10 @@ module.exports = {
reject: 'Reject',
basicInformation: 'Basic Information',
personalInformation: 'Personnel Information',
+ finishDate: 'Finish Date',
+ projectStatement: 'Project Statement',
+ pleaseFillInAtLeastOneItem: 'Please Fill In At Least One Item',
+ addAtLeastOneRowOfData: 'Please Add At Least One Row Of Data',
// 树右键
treeRight: {
addFolder: 'Create New Folder',
diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js
index 2bd10bef..32a8afab 100644
--- a/src/common/lang/zh-cn.js
+++ b/src/common/lang/zh-cn.js
@@ -154,6 +154,10 @@ module.exports = {
rangeOfApplication: '适用范围',
transact: '办理',
compulsoryWithdrawal: '强制撤回',
+ finishDate: '完成日期',
+ projectStatement: '立项说明',
+ pleaseFillInAtLeastOneItem: '请至少填写一项',
+ addAtLeastOneRowOfData: '请至少添加一行数据',
// 树右键
treeRight: {
addFolder: '新增文件夹',
diff --git a/src/components/selection/EnterprisePlanSelectionModal.vue b/src/components/selection/EnterprisePlanSelectionModal.vue
index fb63b070..4e012565 100644
--- a/src/components/selection/EnterprisePlanSelectionModal.vue
+++ b/src/components/selection/EnterprisePlanSelectionModal.vue
@@ -105,6 +105,13 @@ export default {
type: String,
required: false,
default: 'checkbox'
+ },
+ searchParam: {
+ type: Object,
+ required: false,
+ default () {
+ return {}
+ }
}
},
data () {
@@ -262,10 +269,9 @@ export default {
replacePage () {
const query = {
...this.queryParam,
+ ...this.searchParam,
pageNo: this.ipagination.current,
- pageSize: this.ipagination.pageSize,
- // 搜索项目状态为未开始和进行中的数据
- projectStatus: '1,2'
+ pageSize: this.ipagination.pageSize
}
this.selectedRowKeys = []
this.loading = true
diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index fbec5008..bcd22b3e 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -76,6 +76,21 @@ export const OperationType = {
CHANGE: { text: '标准法规变更', value: '2' }
}
+// 企标计划立项/变更流程-申请类型
+export const ApplicationCategory = {
+ INITIATION: { text: '立项', value: '1' },
+ CHANGE: { text: '变更', value: '2' }
+}
+// 企标计划立项/变更流程-项目类别
+export const ProjectType = {
+ ENACT: { text: '制定', value: '5' },
+ MODIFY: { text: '修订', value: '6' },
+ COMPLETE_TIME_CHANGE: { text: '完成时间变更', value: '1' },
+ WORK_TERMINATE: { text: '工作中止', value: '2' },
+ RESPONSIBLE_DEPT_CHANGE: { text: '责任部门变更', value: '3' },
+ MERGE: { text: '合并', value: '4' }
+}
+
// 文档拆分-拆分状态
export const SplitStatus = {
EDITING: { text: '编辑中', value: '1' },
diff --git a/src/views/dashboard/Analysis.vue b/src/views/dashboard/Analysis.vue
index de5e1265..9629f32d 100644
--- a/src/views/dashboard/Analysis.vue
+++ b/src/views/dashboard/Analysis.vue
@@ -1,277 +1,20 @@
-
-
跳转一般检索
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
提交
-
+
diff --git a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue
index c0e30bca..84ee50db 100644
--- a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue
+++ b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue
@@ -12,7 +12,7 @@
-
+
{{ $t('processInformation') }}
@@ -34,7 +34,7 @@
style="width: 100%"
:disabled="disabled"
value-format="YYYY-MM-DD"
- v-decorator="['expirationDate']" />
+ v-decorator="['deadlineDate']" />
@@ -44,7 +44,7 @@
:maxLength="500"
:rows="4"
:disabled="disabled"
- v-decorator="['processExplain']" />
+ v-decorator="['processDescription']" />
@@ -64,12 +64,12 @@
{{ $t('workCenter.enterpriseInitChangePlan.applicationType') }}
-
-
+
- {{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}
- {{ $t('workCenter.enterpriseInitChangePlan.change') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.change') }}
@@ -81,23 +81,22 @@
{{ $t('workCenter.enterpriseInitChangePlan.itemCategory') }}
-
-
+
- {{ $t('workCenter.enterpriseInitChangePlan.formulate') }}
- {{ $t('workCenter.enterpriseInitChangePlan.revise') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.formulate') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.revise') }}
- {{ $t('workCenter.enterpriseInitChangePlan.completionTimeChange') }}
- {{ $t('workCenter.enterpriseInitChangePlan.terminationOfWork') }}
- {{ $t('workCenter.enterpriseInitChangePlan.dutyDepartChange') }}
- {{ $t('workCenter.enterpriseInitChangePlan.merge') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.completionTimeChange') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.terminationOfWork') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.dutyDepartChange') }}
+ {{ $t('workCenter.enterpriseInitChangePlan.merge') }}
@@ -106,15 +105,15 @@
+ :projectType="formInline.projectType">
-
+
@@ -179,14 +178,14 @@
-
+
-
+
@@ -196,18 +195,18 @@
{{ $t('preservation') }}
-
{{ $t('agree') }}
+
{{ $t('submit') }}
-
+
{{ $t('turnTo') }}
- {{ $t('preservation') }}
+ {{ $t('save') }}
- {{ $t('agree') }}
+ {{ $t('submit') }}
-
+
{{ $t('determine') }}
@@ -215,7 +214,7 @@
{{ $t('turnTo') }}
- {{ $t('preservation') }}
+ {{ $t('save') }}
{{ $t('agree') }}
@@ -237,14 +236,17 @@ import {
enterprisePlanApprovalTurnTo,
enterprisePlanApprovalAgree,
enterprisePlanApprovalReject,
- enterprisePlanApprovalDetermine
+ enterprisePlanApprovalDetermine,
+ enterprisePlanApprovalSave,
+ enterprisePlanApproval
} from '@/api/workCenter'
import ApprovalBaseInfo from './modules/ApprovalBaseInfo'
import FinishTimeChangeBaseInfo from './modules/FinishTimeChangeBaseInfo'
-import ProcessDetailList from '../../../components/ProcessDetailList'
+import ProcessDetailList from '@/components/ProcessDetailList'
import JobEndBaseInfo from './modules/JobEndBaseInfo'
import DutyDepartChangeBaseInfo from './modules/DutyDepartChangeBaseInfo'
import MergeBaseInfo from './modules/MergeBaseInfo'
+import { ProjectType, ApplicationCategory } from '@/enums/commonEnums'
// 标准立项的人员信息
const approvalPersonalInfo = [ // 人员信息的数据
@@ -260,7 +262,9 @@ const approvalPersonalInfo = [ // 人员信息的数据
nodeRoleName: '部所联络人',
canChoose: true,
chooseType: 'radio',
- chooseSource: 'contactManage'
+ // todo: 还没有联络人管理模块,暂时用选用户
+ // chooseSource: 'contactManage',
+ fieldName: 'contactUser'
},
{
id: 3,
@@ -268,28 +272,32 @@ const approvalPersonalInfo = [ // 人员信息的数据
nodeRoleName: '专家',
canChoose: true,
chooseType: 'checkbox',
- chooseSource: 'workGroup'
+ chooseSource: 'workGroup',
+ fieldName: 'standardExpert'
},
{
id: 4,
nodeName: '发起人主管级领导审批',
nodeRoleName: '发起人主管级领导',
canChoose: true,
- chooseType: 'radio'
+ chooseType: 'radio',
+ fieldName: 'mainDraftUserLeader'
},
{
id: 5,
nodeName: '发起人主管级上级领导审批',
nodeRoleName: '发起人主管级上级领导',
canChoose: true,
- chooseType: 'radio'
+ chooseType: 'radio',
+ fieldName: 'mainDraftUserLeaderLeader'
},
{
id: 6,
nodeName: '标准化审批',
nodeRoleName: '标准化',
canChoose: true,
- chooseType: 'radio'
+ chooseType: 'radio',
+ fieldName: 'standardizationApprovalUser'
}
]
// 变更的人员信息
@@ -383,9 +391,9 @@ export default {
}
},
watch: {
- 'formInline.applicationType' (value) {
+ 'formInline.applicationCategory' (value) {
if (value) {
- if (this.formInline.applicationType === 1) {
+ if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
if (this.currentNode === 1) {
this.personnelInfoData = approvalPersonalInfo
} else {
@@ -403,8 +411,8 @@ export default {
}
}
}
- if (this.formInline.itemCategory) {
- this.formInline.itemCategory = undefined
+ if (this.formInline.projectType) {
+ this.formInline.projectType = undefined
}
}
},
@@ -424,11 +432,13 @@ export default {
},
data () {
return {
+ ProjectType,
+ ApplicationCategory,
loading: false,
switchValue: 'base', // 头部tab选中值
disabled: false,
onlyLook: false, // 是否仅查看
- currentNode: 2, // 当前节点
+ currentNode: 1, // 当前节点
model: {},
processInfoForm: this.$form.createForm(this),
labelCol: {
@@ -479,7 +489,7 @@ export default {
formInline: {},
rules: {
// 申请类型
- applicationType: [
+ applicationCategory: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.applicationType') + this.$t('cannotEmpty'),
@@ -487,7 +497,7 @@ export default {
}
],
// 项目类别
- itemCategory: [
+ projectType: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.itemCategory') + this.$t('cannotEmpty'),
@@ -508,18 +518,123 @@ export default {
switchChange (value) {
this.switchValue = value
},
- // 项目类别改变
- itemCategoryChange (value) {
- console.log(value)
- if (value === 1) {
- this.$refs.approvalBaseInfo.rules.enterpriseStandardName[0].required = true
- } else {
- this.$refs.approvalBaseInfo.rules.enterpriseStandardName[0].required = false
+ // 保存(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据)
+ handleSave () {
+ // 有任意一项填了即可
+ // 流程信息表单
+ const processInfoForm = this.processInfoForm.getFieldsValue()
+ // 业务基本信息-申请类型和项目类别
+ const ruleForm = this.formInline
+ // 流程审批信息
+ 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
+ }
+ }
+ // 需要传给后端的数组
+ let arr = []
+ // 业务基本信息-立项表单
+ let approvalBaseInfo = {}
+ if (this.$refs.approvalBaseInfo) {
+ approvalBaseInfo = this.$refs.approvalBaseInfo.formInline
+ console.log(approvalBaseInfo.enStandardSystem)
+ // 企标体系处理成逗号分隔
+ if (approvalBaseInfo.enStandardSystem && approvalBaseInfo.enStandardSystem.length > 0) {
+ approvalBaseInfo.enStandardSystem = approvalBaseInfo.enStandardSystem.map(item => item.value).join(',')
+ }
+ const param = { ...processInfoForm, ...ruleForm, ...approvalBaseInfo, ...approvalInfoForm }
+ const flag = Object.values(param).some(v => !!v || v === 0)
+ if (!flag) {
+ // 提示至少填写一项
+ this.$message.error(this.$t('pleaseFillInAtLeastOneItem'))
+ return
+ }
+ arr.push(param)
+ } else if (this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value) {
+ // 业务基本信息-变更-完成时间变更
+ const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm }
+ arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } })
+ } else if (this.formInline.projectType === ProjectType.WORK_TERMINATE.value) {
+ // 业务基本信息-变更-工作终止
+ const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm }
+ arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } })
+ }
+ // 是节点一的保存,保存到草稿
+ if (this.currentNode === 1) {
+ console.log(arr)
+ enterprisePlanApprovalSave(arr).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ } else {
+ this.$message.warning(res.message)
+ }
+ })
}
},
- // 保存
- handleSave () {
-
+ // 节点一时候的提交,发起立项变更申请(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据)
+ handleStart () {
+ if (this.loading) return
+ this.processInfoForm.validateFields((err, values) => {
+ this.$refs.ruleForm.validate(valid => {
+ this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
+ let arr = []
+ // 立项和变更的数据不一样,分开判断
+ if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
+ // 是立项
+ this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => {
+ if (valid && approvalBaseValid && !err && !approvalErr) {
+ this.loading = true
+ // 人员信息的数据, 处理成对象
+ const personnelInfo = this.$refs.personnelInfo.stepsData
+ const personnelObj = {}
+ for (const item of personnelInfo) {
+ if (item.fieldName) {
+ personnelObj[item.fieldName] = item.user
+ }
+ }
+ const param = Object.assign({}, values, this.formInline, approvalValues, this.$refs.approvalBaseInfo.formInline, personnelObj)
+ // 企标体系处理成逗号分隔
+ param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',')
+ arr.push(param)
+ }
+ })
+ } else if (this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value ||
+ this.formInline.projectType === ProjectType.WORK_TERMINATE.value) {
+ // 是变更-完成时间 或者 变更-工作终止变更
+ if (valid && !err && !approvalErr && this.$refs.changeBaseInfo && this.$refs.changeBaseInfo.dataSource.length >= 0) {
+ this.loading = true
+ const param = { ...values, ...this.formInline, ...approvalValues }
+ arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } })
+ } else {
+ this.$message.warning(this.$t('addAtLeastOneRowOfData'))
+ return
+ }
+ } else {
+ // 校验特定节点需要填写人的必填
+ this.userForm.validateFields((userErr, userValues) => {
+ if (valid && !err && !approvalErr && !userErr) {
+ this.loading = true
+ const param = this.$refs.changeBaseInfo.dataSource
+ console.log(param)
+ }
+ })
+ }
+ enterprisePlanApproval(arr).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ } else {
+ this.$message.warning(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
+ })
+ })
+ })
},
// 提交
handleSubmit () {
@@ -528,7 +643,7 @@ export default {
this.$refs.ruleForm.validate(valid => {
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
// 立项和变更的数据不一样,分开判断
- if (this.formInline.applicationType === 1) {
+ if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
// 是立项
this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => {
if (valid && approvalBaseValid && !err && !approvalErr) {
diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue
index 32198826..7e087eab 100644
--- a/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue
@@ -3,15 +3,16 @@
-
+
-
+
-
+
@@ -126,12 +127,12 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
-
+
@@ -142,9 +143,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
-
+
@@ -158,9 +159,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') }}
-
+
@@ -174,10 +175,10 @@
{{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') }}
-
+
@@ -190,12 +191,12 @@
{{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }}
-
+
@@ -207,10 +208,10 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
-
+
@@ -222,14 +223,15 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }}
-
-
+
+
@@ -256,10 +258,10 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }}
-
+
-
-
+
+
{{
- (formInline.compilationIllustration === 'null' || formInline.compilationIllustration === ''
- || formInline.compilationIllustration === null || formInline.compilationIllustration === undefined)
+ (formInline.compilationDescription === 'null' || formInline.compilationDescription === ''
+ || formInline.compilationDescription === null || formInline.compilationDescription === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
@@ -289,10 +291,11 @@
-
+
@@ -338,9 +341,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.planSubmissionDate') }}
-
+
@@ -352,10 +355,11 @@
-
-
+
@@ -399,13 +403,13 @@
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
-
+
@@ -417,8 +421,8 @@
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
-
-
+
@@ -431,13 +435,13 @@
{{ $t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') }}
-
+
@@ -449,13 +453,13 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardPusher') }}
-
+
@@ -467,8 +471,8 @@
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
-
-
+
@@ -478,10 +482,11 @@
@@ -520,11 +525,11 @@
{{ $t('workCenter.enterpriseInitChangePlan.homogeneousStandardAnalysis') }}
-
+
+ v-model="formInline.similarNaStandardsAnalysis" :rows="4" />
@@ -534,11 +539,11 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardContrastiveAnalysis') }}
-
+
+ v-model="formInline.similarEnStandardsAnalysis" :rows="4" />
@@ -548,11 +553,11 @@
{{ $t('workCenter.enterpriseInitChangePlan.leadershipAndNecessity') }}
-
+
+ v-model="formInline.standardLeadingNecessity" :rows="4" />
@@ -562,11 +567,11 @@
{{ $t('workCenter.enterpriseInitChangePlan.initiatedProject') }}
-
+
+ v-model="formInline.projectExpectedEffects" :rows="4" />
@@ -598,20 +603,22 @@