diff --git a/src/api/enterpriseStandardLibraryApi.js b/src/api/enterpriseStandardLibraryApi.js index 94f5e933..5cc95348 100644 --- a/src/api/enterpriseStandardLibraryApi.js +++ b/src/api/enterpriseStandardLibraryApi.js @@ -54,7 +54,7 @@ const initReview = (params) => getAction('', params) // 企标计划-根据id获取计划详情 const getEnterpriseStandardPlanInfoById = (params) => getAction('/enterprise/plan/detail', params) // 企标计划-分页获取(选择企标计划组件中用) -const getEnterpriseStandardPlanPage = (params) => getAction('/enterprise/plan/page', params) +const getEnterpriseStandardPlanPage = (params) => getAction('/process/es/initChange/getESPList', params) export { getEnterpriseStandardTableHeader, diff --git a/src/api/workCenter.js b/src/api/workCenter.js index 88584cc5..7908b513 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -24,6 +24,8 @@ const enterprisePlanApproval = (params) => postAction('/process/es/initChange/st const enterprisePlanApprovalSave = (params) => postAction('/process/es/initChange/save', params) // 根据三个编号和年代号获取企标编号 const getEnStandardNo = (params) => postAction('/process/es/initChange/getStandardNo', params) +// 根据流程id获取流程信息 +const getProcessDataById = (params) => getAction('/process/center/handle', params) // 流程中心 // 待办-转办 @@ -43,6 +45,7 @@ export { enterprisePlanApproval, enterprisePlanApprovalSave, getEnStandardNo, + getProcessDataById, toDoTurnTo, compulsoryWithdrawal diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js index 0baa411a..2e49c87b 100644 --- a/src/common/lang/en-us.js +++ b/src/common/lang/en-us.js @@ -155,6 +155,7 @@ module.exports = { projectStatement: 'Project Statement', pleaseFillInAtLeastOneItem: 'Please Fill In At Least One Item', addAtLeastOneRowOfData: 'Please Add At Least One Row Of Data', + mergeStandardInformation: '合并标准信息', // 树右键 treeRight: { addFolder: 'Create New Folder', diff --git a/src/common/lang/workCenter/en.js b/src/common/lang/workCenter/en.js index b3b82401..8f0e4323 100644 --- a/src/common/lang/workCenter/en.js +++ b/src/common/lang/workCenter/en.js @@ -76,7 +76,13 @@ module.exports = { originalPlanSubmissionDate: '原计划报批日期', changeReason: '变更原因', superintendent: '所长', - relatedPersonnel: '相关人员' + relatedPersonnel: '相关人员', + originPrincipalDrafter: '原主起草人', + originMainDraftUnit: '原主起草单位', + originHeadOfMainDraftingUnit: '原起草单位负责人', + typeOfRevision: '制修订类型', + scopeOfApplication: '标准适用范围', + pleaseSelectTwoSameProjectTypePlan: '请选择两个制修订类型一样的企标计划' }, // 年度制修订计划(各部门主动上报) revisionPlanActivelyReport: { diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js index be578da8..160bd499 100644 --- a/src/common/lang/workCenter/zh.js +++ b/src/common/lang/workCenter/zh.js @@ -81,7 +81,8 @@ module.exports = { originMainDraftUnit: '原主起草单位', originHeadOfMainDraftingUnit: '原起草单位负责人', typeOfRevision: '制修订类型', - scopeOfApplication: '标准适用范围' + scopeOfApplication: '标准适用范围', + pleaseSelectTwoSameProjectTypePlan: '请选择两个制修订类型一样的企标计划' }, // 年度制修订计划(各部门主动上报) revisionPlanActivelyReport: { diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index 32a8afab..b9d6d7d4 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -158,6 +158,7 @@ module.exports = { projectStatement: '立项说明', pleaseFillInAtLeastOneItem: '请至少填写一项', addAtLeastOneRowOfData: '请至少添加一行数据', + mergeStandardInformation: '合并标准信息', // 树右键 treeRight: { addFolder: '新增文件夹', diff --git a/src/components/PersonnelInfo.vue b/src/components/PersonnelInfo.vue index c484c136..87a7a62c 100644 --- a/src/components/PersonnelInfo.vue +++ b/src/components/PersonnelInfo.vue @@ -29,9 +29,9 @@
{{ step.userList }}
diff --git a/src/components/selection/EnterprisePlanSelectionModal.vue b/src/components/selection/EnterprisePlanSelectionModal.vue index 4e012565..71b15e3e 100644 --- a/src/components/selection/EnterprisePlanSelectionModal.vue +++ b/src/components/selection/EnterprisePlanSelectionModal.vue @@ -57,8 +57,8 @@ + dict-code="esp_revision_type" + v-model="queryParam.revisionType"> @@ -106,7 +106,7 @@ export default { required: false, default: 'checkbox' }, - searchParam: { + searchParam: { // 根据不同模块传入固定的查询参数 type: Object, required: false, default () { diff --git a/src/components/selection/UserSelectByContact.vue b/src/components/selection/UserSelectByContact.vue index 18a9777c..9e11bcbe 100644 --- a/src/components/selection/UserSelectByContact.vue +++ b/src/components/selection/UserSelectByContact.vue @@ -17,7 +17,7 @@ {{ $t('userSelect.select') }} - + @@ -78,6 +78,9 @@ export default { selectChange (ids) { this.$emit('change', ids) }, + listChange (value) { + this.$emit('listChange', value) + }, nameChange (value) { this.checkedValue = value this.$emit('nameChange', value, this.filedName) diff --git a/src/components/selection/UserSelectByContactModal.vue b/src/components/selection/UserSelectByContactModal.vue index 5a4dae01..9763a199 100644 --- a/src/components/selection/UserSelectByContactModal.vue +++ b/src/components/selection/UserSelectByContactModal.vue @@ -12,7 +12,7 @@ - + @@ -25,7 +25,7 @@ - - {{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }} - {{ $t('workCenter.enterpriseInitChangePlan.change') }} - + + + + + + + @@ -85,6 +91,7 @@ {{ $t('workCenter.enterpriseInitChangePlan.formulate') }} {{ $t('workCenter.enterpriseInitChangePlan.revise') }} @@ -105,7 +112,7 @@ @@ -125,6 +133,7 @@ ref="changeBaseInfo" :disabled="disabled" :currentNode="currentNode" + :projectType="formInline.projectType" > @@ -132,6 +141,7 @@ v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value" ref="changeBaseInfo" :disabled="disabled" + :projectType="formInline.projectType" > @@ -139,6 +149,7 @@ v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.MERGE.value" ref="changeBaseInfo" :disabled="disabled" + :projectType="formInline.projectType" > @@ -238,7 +249,8 @@ import { enterprisePlanApprovalReject, enterprisePlanApprovalDetermine, enterprisePlanApprovalSave, - enterprisePlanApproval + enterprisePlanApproval, + getProcessDataById } from '@/api/workCenter' import ApprovalBaseInfo from './modules/ApprovalBaseInfo' import FinishTimeChangeBaseInfo from './modules/FinishTimeChangeBaseInfo' @@ -263,7 +275,7 @@ const approvalPersonalInfo = [ // 人员信息的数据 canChoose: true, chooseType: 'radio', // todo: 还没有联络人管理模块,暂时用选用户 - // chooseSource: 'contactManage', + chooseSource: 'contactManage', fieldName: 'contactUser' }, { @@ -314,60 +326,65 @@ const changePersonalInfo = [ nodeRoleName: '部所联络人', canChoose: true, chooseType: 'radio', - chooseSource: 'contactManage' + // todo: 还没有联络人管理模块,暂时用选用户 + chooseSource: 'contactManage', + fieldName: 'contactUser' }, { id: 3, nodeName: '主起草人主管级领导审批', nodeRoleName: '主起草人主管级领导', canChoose: true, - chooseType: 'radio' + chooseType: 'radio', + fieldName: 'mainDraftUserLeader' }, { id: 4, nodeName: '主起草人主管级上一级领导审批', nodeRoleName: '主起草人主管级上一级领导', canChoose: true, - chooseType: 'radio' + chooseType: 'radio', + fieldName: 'mainDraftUserLeaderLeader' }, { id: 5, nodeName: '标准化审批', nodeRoleName: '标准化', canChoose: true, - chooseType: 'radio' + chooseType: 'radio', + fieldName: 'standardizationApprovalUser' }, { id: 6, nodeName: '新起草部门主管级上一级领导下发', nodeRoleName: '新起草部门主管级上一级领导', - canChoose: true, + canChoose: false, chooseType: 'radio', - disabled: true + fieldName: 'newMainDraftUserLeaderLeader' }, { id: 7, nodeName: '新起草部门主管级领导确认', nodeRoleName: '新起草部门主管级领导', - canChoose: true, + canChoose: false, chooseType: 'radio', - disabled: true + fieldName: 'newMainDraftUserLeader' }, { id: 8, nodeName: '相关人员会签', nodeRoleName: '相关人员', - canChoose: true, + canChoose: false, chooseType: 'checkbox', - disabled: true + fieldName: 'relatedUser' }, { id: 9, nodeName: '抄送主起草人', nodeRoleName: '主起草人', - canChoose: true, + canChoose: false, chooseType: 'checkbox', - disabled: true + fieldName: 'copyUser' } ] @@ -417,6 +434,10 @@ export default { } }, mounted () { + if (this.$route.query.processId) { + // 有流程id说明是从流程中心来的,需要初始化数据 + this.getProcessData(this.$route.query.processId) + } if (this.currentNode === 1) { this.personnelInfoData = approvalPersonalInfo } else { @@ -424,7 +445,7 @@ export default { return { ...item, canChoose: false } }) } - // 如果是查看进入的,不可编辑 + // 如果是查看进入的,不可编辑,不可操作 if (this.$route.query.onlyLook) { this.onlyLook = this.$route.query.onlyLook this.disabled = this.$route.query.onlyLook @@ -514,6 +535,16 @@ export default { } }, methods: { + // 根据流程id获取数据 + getProcessData (processId) { + getProcessDataById({ processInstanceId: processId }).then(res => { + if (res.success) { + console.log(res.result) + } else { + this.$message.warning(res.message) + } + }) + }, // 头部tab改变 switchChange (value) { this.switchValue = value @@ -550,22 +581,70 @@ export default { const flag = Object.values(param).some(v => !!v || v === 0) if (!flag) { // 提示至少填写一项 - this.$message.error(this.$t('pleaseFillInAtLeastOneItem')) + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) return } arr.push(param) } else if (this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value) { // 业务基本信息-变更-完成时间变更 const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm } + const flag = Object.values(param).some(v => !!v || v === 0) + if (!flag && this.$refs.changeBaseInfo.dataSource.length <= 0) { + // 提示至少填写一项 + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) + return + } arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } }) } else if (this.formInline.projectType === ProjectType.WORK_TERMINATE.value) { // 业务基本信息-变更-工作终止 const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm } + const flag = Object.values(param).some(v => !!v || v === 0) + if (!flag && this.$refs.changeBaseInfo.dataSource.length <= 0) { + // 提示至少填写一项 + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) + return + } arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } }) + } else if (this.formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) { + // 业务基本信息-变更-责任部门变更 + let dutyDepartChangeForm = {} + if (this.$refs.changeBaseInfo) { + dutyDepartChangeForm = this.$refs.changeBaseInfo.formInline + } + const param = { ...processInfoForm, ...ruleForm, ...dutyDepartChangeForm, ...approvalInfoForm } + const flag = Object.values(param).some(v => !!v || v === 0) + if (!flag) { + // 提示至少填写一项 + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) + return + } + arr.push(param) + } else if (this.formInline.projectType === ProjectType.MERGE.value) { + // 业务基本信息-变更-合并 + let mergeForm = {} + if (this.$refs.changeBaseInfo) { + mergeForm = this.$refs.changeBaseInfo.formInline + } + const param = { ...processInfoForm, ...ruleForm, ...mergeForm, ...approvalInfoForm } + const flag = Object.values(param).some(v => !!v || v === 0) + if (!flag) { + // 提示至少填写一项 + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) + return + } + arr.push(param) + } else { + // 还没有选择申请类型和项目类别,需要外层信息至少填了一项 + const param = { ...processInfoForm, ...ruleForm, ...approvalBaseInfo, ...approvalInfoForm } + const flag = Object.values(param).some(v => !!v || v === 0) + if (!flag) { + // 提示至少填写一项 + this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) + return + } } // 是节点一的保存,保存到草稿 if (this.currentNode === 1) { - console.log(arr) enterprisePlanApprovalSave(arr).then(res => { if (res.success) { this.$message.success(res.message) @@ -581,7 +660,8 @@ export default { this.processInfoForm.validateFields((err, values) => { this.$refs.ruleForm.validate(valid => { this.approvalInfoForm.validateFields((approvalErr, approvalValues) => { - let arr = [] + let arr = [] // 需要传给后端的数据 + let haveErr = false // 是否有错误,有错,则不能提交,false没有错 // 立项和变更的数据不一样,分开判断 if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) { // 是立项 @@ -600,28 +680,87 @@ export default { // 企标体系处理成逗号分隔 param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',') arr.push(param) + } else { + haveErr = true } }) } 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) { + if (valid && !err && !approvalErr && this.$refs.changeBaseInfo && this.$refs.changeBaseInfo.dataSource.length > 0) { this.loading = true - const param = { ...values, ...this.formInline, ...approvalValues } + // 人员信息的数据, 处理成对象 + const personnelInfo = this.$refs.personnelInfo.stepsData + const personnelObj = {} + for (const item of personnelInfo) { + if (item.fieldName) { + personnelObj[item.fieldName] = item.user + } + } + const param = { ...values, ...this.formInline, ...approvalValues, ...personnelObj } arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } }) } else { - this.$message.warning(this.$t('addAtLeastOneRowOfData')) - return + haveErr = true + if (this.$refs.changeBaseInfo.dataSource.length <= 0) { + this.$message.warning(this.$t('addAtLeastOneRowOfData')) + } } - } else { - // 校验特定节点需要填写人的必填 - this.userForm.validateFields((userErr, userValues) => { - if (valid && !err && !approvalErr && !userErr) { + } else if (this.formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) { + // 是变更-责任部门变更 + this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => { + if (valid && changeBaseValid && !err && !approvalErr) { this.loading = true - const param = this.$refs.changeBaseInfo.dataSource - console.log(param) + // 人员信息的数据, 处理成对象 + 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.changeBaseInfo.formInline, personnelObj) + arr.push(param) + } else { + haveErr = true } }) + } else if (this.formInline.projectType === ProjectType.MERGE.value) { + // 是变更-合并 + this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => { + if (valid && changeBaseValid && !err && !approvalErr) { + const changeBaseInfo = this.$refs.changeBaseInfo.formInline + if (changeBaseInfo.projectTypeOne !== changeBaseInfo.projectTypeTwo) { + // 合并时候的两个计划需要限定修订+修订,或者制定+制定 + this.$message.warning(this.$t('workCenter.enterpriseInitChangePlan.pleaseSelectTwoSameProjectTypePlan')) + return + } + 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.changeBaseInfo.formInline, personnelObj) + arr.push(param) + } else { + haveErr = true + } + }) + } else { + // 校验特定节点需要填写人的必填 + // this.userForm.validateFields((userErr, userValues) => { + // if (valid && !err && !approvalErr && !userErr) { + // this.loading = true + // const param = this.$refs.changeBaseInfo.dataSource + // console.log(param) + // } + // }) + } + if (haveErr) { + return } enterprisePlanApproval(arr).then(res => { if (res.success) { diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue index 7e087eab..ddf6b4c7 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue @@ -626,14 +626,9 @@ export default { default: false } }, - // computed: { - // yearNumberDefaultValue () { - // return new Date().getFullYear() + '' - // } - // }, watch: { projectType () { - console.log('projectType改变了————————————————————————---') + this.$refs.ruleForm.resetFields() this.formInline.decadeCode = new Date().getFullYear() + '' }, // 企业标准代号 @@ -874,9 +869,12 @@ export default { } }) } else { - const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode - this.$set(this.formInline, 'newEnStandardNo', standardNo) - this.$forceUpdate() + // 是修订,通过选中的企标编号和年代号拼接新企标编号 + if (this.formInline.originEnStandardNo && this.formInline.decadeCode) { + const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode + this.$set(this.formInline, 'newEnStandardNo', standardNo) + this.$forceUpdate() + } } }, // 获取零部件名称下拉框数据 diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue index b2332627..a527bd38 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue @@ -11,12 +11,13 @@ {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }} - + @@ -28,10 +29,10 @@ {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }} - + @@ -39,31 +40,29 @@
- * {{ $t('workCenter.enterpriseInitChangePlan.originPrincipalDrafter') }}
- +
- * {{ $t('workCenter.enterpriseInitChangePlan.originMainDraftUnit') }}
- - + @@ -71,49 +70,46 @@
- * {{ $t('workCenter.enterpriseInitChangePlan.originHeadOfMainDraftingUnit') }}
- +
- * {{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
- +
- * {{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
- - + @@ -121,18 +117,17 @@
- * {{ $t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') }}
- +
@@ -167,44 +162,25 @@ export default { type: Boolean, required: false, default: false + }, + projectType: { + type: [Number, String], + required: false, + default: 1 } }, data () { return { formInline: {}, rules: { - // 企标编号 - enterpriseStandardPlanId: [ + // 企标计划id + espId: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'), trigger: 'change' } ], - // 草稿计划完成日期 - draftPlanFinishDate: [ - { - required: true, - message: this.$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') + this.$t('cannotEmpty'), - trigger: ['change', 'blur'] - } - ], - // 征求意见稿计划完成日期 - exposureDraftPlanFinishDate: [ - { - required: true, - message: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') + this.$t('cannotEmpty'), - trigger: ['change', 'blur'] - } - ], - // 计划报批日期 - planSubmissionDate: [ - { - required: true, - message: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate') + this.$t('cannotEmpty'), - trigger: ['change', 'blur'] - } - ], // 变更原因 changeReason: [ { @@ -219,17 +195,17 @@ export default { methods: { // 企标计划选择完成的企标编号回调 standardNumberChange (value) { - this.formInline.standardNo = value + this.formInline.originEnStandardNo = value }, // 企标选编号选择完成的回调 listChange (value) { console.log(value) if (value && value.length > 0) { - this.formInline.standardName = value[0].originEnStandardName - this.formInline.principalDrafter_dictText = value[0].mainDraftingUser - this.formInline.mainDraftUnit = value[0].mainDraftingUnit - this.formInline.originPrincipalDrafter_dictText = value[0].mainDraftingUser - this.formInline.originMainDraftUnit = value[0].mainDraftingUnit + this.formInline.originEnStandardName = value[0].originEnStandardName + this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser + this.formInline.mainDraftingUnit = value[0].mainDraftingUnit + this.formInline.newMainDraftingUser_dictText = value[0].mainDraftingUser + this.formInline.newMainDraftingUnit = value[0].mainDraftingUnit } }, // 选择用户得到用户名 diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfo.vue index 834e9901..dca473cd 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfo.vue @@ -42,7 +42,7 @@
- +
diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue index d844c01b..fc8a0f1c 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue @@ -23,11 +23,11 @@ - @@ -204,6 +204,13 @@ import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelect export default { name: 'FinishTimeChangeBaseInfoDrawer', components: { EnterprisePlanSelection, UserSelection }, + props: { + projectType: { + type: [Number, String], + required: false, + default: 1 + } + }, data () { return { visible: false, diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfo.vue index 4e8f1a8e..bce121ad 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfo.vue @@ -42,7 +42,7 @@ - + diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfoDrawer.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfoDrawer.vue index 5e81e8dc..2b8c9009 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfoDrawer.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/JobEndBaseInfoDrawer.vue @@ -27,6 +27,7 @@ v-model="formInline.espId" :standard-number="formInline.originEnStandardNo" @standardNumberChange="standardNumberChange" + :searchParam="{ projectType: projectType }" @listChange="listChange"/>
@@ -108,6 +109,13 @@ import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelect export default { name: 'JobEndBaseInfoDrawer', components: { EnterprisePlanSelection, UserSelection }, + props: { + projectType: { + type: [Number, String], + required: false, + default: 1 + } + }, data () { return { visible: false, diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/MergeBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/MergeBaseInfo.vue index e1cc9861..0b6e4140 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/MergeBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/MergeBaseInfo.vue @@ -3,448 +3,444 @@
- 合并标准信息 + {{ $t('mergeStandardInformation') }}
- {{ retractableFlag.baseInfo ? '收起' : '展开' }} + {{ retractableFlag.baseInfo ? $t('putAway') : $t('open') }}
-
-
- -
-
- * - +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' }} -
- - -
- -
-
- - {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '1' }} - -
- - - + + + +
+ +
+
+ + {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '1' }} +
- -
-
- - {{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1' }} - -
- - - + + + +
+ +
+
+ + {{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1' }} +
- -
-
- * - - {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '2' }} - -
- - - + + + {{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }} + {{ $t('workCenter.enterpriseInitChangePlan.change') }} + + +
+ +
+
+ * + + {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '2' }} +
- -
-
+ + + +
+ +
+
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '2' }} -
- - -
- -
-
- - {{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1' }} - -
- - - + + + +
+ +
+
+ + {{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '2' }} +
- -
-
- * - + + + {{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }} + {{ $t('workCenter.enterpriseInitChangePlan.change') }} + + +
+ +
+
+ {{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') }} -
- - -
- -
-
+ + + +
+ +
+
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }} -
- - -
- -
-
- - {{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }} - -
- - - + + + +
+ +
+
+ * + + {{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }} +
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.standardCategoryCode') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }} -
- - -
- -
-
+ + + +
+ +
+
{{ $t('workCenter.enterpriseInitChangePlan.compilationIllustration') }} -
- - - {{ - (formInline.compilationIllustration === 'null' || formInline.compilationIllustration === '' - || formInline.compilationIllustration === null || formInline.compilationIllustration === undefined) - ? $t('uploadFile.clickUpload') - : $t('uploadFile.viewUploadedFiles') - }} - -
- -
-
- - {{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }} - -
- - - + + + {{ + (formInline.compilationDescription === 'null' || formInline.compilationDescription === '' + || formInline.compilationDescription === null || formInline.compilationDescription === undefined) + ? $t('uploadFile.clickUpload') + : $t('uploadFile.viewUploadedFiles') + }} + + +
+ +
+
+ * + + {{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }} +
+ + +
- -
-
- 完成日期 -
- - {{ retractableFlag.finishDate ? '收起' : '展开' }} -
+
+ +
+
+ {{ $t('finishDate') }} +
+ + {{ retractableFlag.finishDate ? $t('putAway') : $t('open') }}
-
- -
-
- * - +
+
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') }} -
- - - -
- -
-
- * - + + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') }} -
- - - -
- -
-
- * - + + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.planSubmissionDate') }} -
- - - -
+ + + +
- -
-
- 适用范围 -
- - {{ retractableFlag.rangeOfApplication ? '收起' : '展开' }} -
+
+ +
+
+ {{ $t('rangeOfApplication') }} +
+ + {{ retractableFlag.rangeOfApplication ? $t('putAway') : $t('open') }}
-
- -
-
- * - +
+
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.partName') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') }} -
- - -
- -
-
- * - - {{ $t('workCenter.enterpriseInitChangePlan.scopeOfApplication') }} - -
- - - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.changeReason') }} -
- - -
+ + +
@@ -456,6 +452,10 @@ import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelection' import UserSelection from '@/components/selection/UserSelection' import UploadFile from '@/components/UploadFile' +import { getTreeList } from '@/api/enterpriseStandardLibraryApi' +import { ApplicationCategory } from '@/enums/commonEnums' +import { getFormDictTreeList } from '@/api/api' + export default { name: 'MergeBaseInfo', components: { EnterprisePlanSelection, UserSelection, UploadFile }, @@ -464,10 +464,18 @@ export default { type: Boolean, required: false, default: false + }, + projectType: { + type: [Number, String], + required: false, + default: 1 } }, data () { return { + ApplicationCategory, + standardSystemOptions: [], // 标准体系下拉数据 + partNameOptions: [], // 零部件名称下拉框数据 formInline: {}, // 各模块的收齐和展开状态 retractableFlag: { @@ -476,16 +484,16 @@ export default { rangeOfApplication: true // 适用范围部分 }, rules: { - // 企标编号1 - enterpriseStandardPlanIdOne: [ + // 企标计划id1 + standardIdOne: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' + this.$t('cannotEmpty'), trigger: 'change' } ], - // 企标编号2 - enterpriseStandardPlanIdTwo: [ + // 企标计划id2 + standardIdTwo: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' + this.$t('cannotEmpty'), @@ -493,7 +501,7 @@ export default { } ], // 新企标名称 - newEnterpriseStandardName: [ + newEnStandardName: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') + this.$t('cannotEmpty'), @@ -501,7 +509,7 @@ export default { } ], // 标准体系 - standardSystem: [ + enStandardSystem: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + this.$t('cannotEmpty'), @@ -509,7 +517,7 @@ export default { } ], // 企业标准代号 - enterpriseStandardCode: [ + enStandardCode: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') + this.$t('cannotEmpty'), @@ -517,7 +525,7 @@ export default { } ], // 企业名称代号 - enterpriseNameCode: [ + enNameCode: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') + this.$t('cannotEmpty'), @@ -533,7 +541,7 @@ export default { } ], // 年代号 - yearNumber: [ + decadeCode: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.yearNumber') + this.$t('cannotEmpty'), @@ -541,7 +549,7 @@ export default { } ], // 标准等级分类 - standardGradeClassification: [ + enStandardClassification: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'), @@ -549,7 +557,7 @@ export default { } ], // 草稿计划完成日期 - draftPlanFinishDate: [ + draftPlannedCompleteDate: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') + this.$t('cannotEmpty'), @@ -557,7 +565,7 @@ export default { } ], // 征求意见稿计划完成日期 - exposureDraftPlanFinishDate: [ + solicitationDraftPlanCompleteDate: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') + this.$t('cannotEmpty'), @@ -565,7 +573,7 @@ export default { } ], // 计划报批日期 - planSubmissionDate: [ + planApprovalDate: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate') + this.$t('cannotEmpty'), @@ -573,7 +581,7 @@ export default { } ], // 零部件名称 - partName: [ + componentName: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'), @@ -581,7 +589,7 @@ export default { } ], // 主起草人 - principalDrafter: [ + mainDraftingUser: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter') + this.$t('cannotEmpty'), @@ -589,7 +597,7 @@ export default { } ], // 主起草单位 - mainDraftUnit: [ + mainDraftingUnit: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit') + this.$t('cannotEmpty'), @@ -597,7 +605,7 @@ export default { } ], // 起草单位负责人 - headOfMainDraftingUnit: [ + mainDraftingUnitResponsiblePerson: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') + this.$t('cannotEmpty'), @@ -615,7 +623,29 @@ export default { } } }, + mounted () { + // 获取标准体系下拉框数据 + this.initStandardSystemOptions() + // 获取零部件名称下拉框数据 + this.initPartNameOptions() + }, methods: { + // 获取标准体系下拉框数据 + initStandardSystemOptions () { + getTreeList({ option: 1 }).then(res => { + if (res.success) { + this.standardSystemOptions = res.result + } + }) + }, + // 获取零部件名称下拉框数据 + initPartNameOptions () { + getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => { + if (res.success) { + this.partNameOptions = res.result + } + }) + }, // 改变内容区域收起和展开 handleChangeRetractable (module) { this.$set(this.retractableFlag, module, !this.retractableFlag[module]) @@ -636,48 +666,56 @@ export default { // 企标名称1 this.formInline.standardNameOne = value[0].originEnStandardName // 制修订类型1 - this.formInline.typeOfRevisionOne = value[0].typeOfRevision + this.formInline.projectTypeOne = value[0].revisionType // 新企标名称 - this.formInline.newEnterpriseStandardName = value[0].originEnStandardName + this.formInline.newEnStandardName = value[0].originEnStandardName // 标准英文名称 - this.formInline.standardEnglishName = value[0].originEnStandardName + this.formInline.enStandardEnglishName = value[0].originEnStandardName // 标准体系 - this.formInline.standardSystem = value[0].originEnStandardName + this.formInline.enStandardSystem = value[0].originEnStandardName // 企业标准代号 - this.formInline.enterpriseStandardCode = value[0].originEnStandardName + this.formInline.enStandardCode = value[0].originEnStandardName // 企业名称代号 - this.formInline.enterpriseNameCode = value[0].originEnStandardName + this.formInline.enNameCode = value[0].originEnStandardName // 标准类别代号 this.formInline.standardCategoryCode = value[0].originEnStandardName // 年代号 - this.formInline.yearNumber = value[0].originEnStandardName + this.formInline.decadeCode = value[0].originEnStandardName // 编制说明 - this.formInline.compilationIllustration = value[0].originEnStandardName + this.formInline.compilationDescription = value[0].originEnStandardName // 标准等级分类 - this.formInline.standardGradeClassification = value[0].originEnStandardName + this.formInline.enStandardClassification = value[0].originEnStandardName // 草稿计划完成日期 - this.formInline.draftPlanFinishDate = value[0].originEnStandardName + this.formInline.draftPlannedCompleteDate = value[0].originEnStandardName // 征求意见稿计划完成日期 - this.formInline.exposureDraftPlanFinishDate = value[0].originEnStandardName + this.formInline.solicitationDraftPlanCompleteDate = value[0].originEnStandardName // 计划报批日期 - this.formInline.planSubmissionDate = value[0].originEnStandardName + this.formInline.planApprovalDate = value[0].originEnStandardName // 零部件名称 - this.formInline.partName = value[0].originEnStandardName + this.formInline.componentName = value[0].originEnStandardName // 主起草人 - this.formInline.principalDrafter_dictText = value[0].mainDraftingUser + this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser // 主起草单位 - this.formInline.mainDraftUnit = value[0].mainDraftingUnit + this.formInline.mainDraftingUnit = value[0].mainDraftingUnit // 起草单位负责人 - this.formInline.headOfMainDraftingUnit = value[0].mainDraftingUnit - // 标准适用范围 - this.formInline.scopeOfApplication = value[0].mainDraftingUnit - // 变更原因 - this.formInline.changeReason = value[0].mainDraftingUnit + this.formInline.mainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnit } }, // 选择用户得到用户名 userSelectNameChange (value, fieldName) { this.formInline[fieldName + '_dictText'] = value + }, + // 文件上传改变后的回调 + uploadFileChange (data) { + const attIdList = [] + if (data && data.length > 0) { + data.map(item => { + attIdList.push(item.id) + }) + } + /** 赋值给当前对应的表单文件 */ + this.formInline[this.uploadName] = attIdList.join(',') + this.formInline = { ...this.formInline } } } } diff --git a/src/views/workCenter/processCenter/table/DoneList.vue b/src/views/workCenter/processCenter/table/DoneList.vue index 7835242d..fde48cf5 100644 --- a/src/views/workCenter/processCenter/table/DoneList.vue +++ b/src/views/workCenter/processCenter/table/DoneList.vue @@ -7,22 +7,22 @@ - + - + - + + v-model="queryParam.prcType"> @@ -142,7 +142,7 @@ export default { } ], url: { - list: '' + list: '/process/center/doneTaskList' } } }, diff --git a/src/views/workCenter/processCenter/table/DraftList.vue b/src/views/workCenter/processCenter/table/DraftList.vue index 9bc0e423..59499173 100644 --- a/src/views/workCenter/processCenter/table/DraftList.vue +++ b/src/views/workCenter/processCenter/table/DraftList.vue @@ -4,13 +4,13 @@
- + + v-model="queryParam.prcType"> @@ -103,7 +103,7 @@ export default { } ], url: { - list: '' + list: '/process/center/draftList' } } }, diff --git a/src/views/workCenter/processCenter/table/MonitorList.vue b/src/views/workCenter/processCenter/table/MonitorList.vue index b63635c9..cd7e3cc9 100644 --- a/src/views/workCenter/processCenter/table/MonitorList.vue +++ b/src/views/workCenter/processCenter/table/MonitorList.vue @@ -7,22 +7,22 @@ - + - + - + + v-model="queryParam.prcType"> @@ -153,7 +153,7 @@ export default { } ], url: { - list: '' + list: '/process/center/monitorTaskList' } } }, diff --git a/src/views/workCenter/processCenter/table/SentList.vue b/src/views/workCenter/processCenter/table/SentList.vue index 1638e033..9fb3ef55 100644 --- a/src/views/workCenter/processCenter/table/SentList.vue +++ b/src/views/workCenter/processCenter/table/SentList.vue @@ -7,33 +7,33 @@ - + - + - + + v-model="queryParam.prcType">