diff --git a/src/api/workCenter.js b/src/api/workCenter.js index 93354b8d..7dc2e04b 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -16,8 +16,6 @@ const enterprisePlanApprovalTurnTo = (params) => postAction('/process/es/initCha const enterprisePlanApprovalAgree = (params) => postAction('/process/es/initChange/agree', params) // 驳回 const enterprisePlanApprovalReject = (params) => postAction('/process/es/initChange/reject', params) -// 确定 -const enterprisePlanApprovalDetermine = (params) => postAction('', params) // 节点一的提交————发起流程 const enterprisePlanApproval = (params) => postAction('/process/es/initChange/start', params) // 保存 @@ -52,6 +50,8 @@ const standardizationInitTurnTo = (params) => postAction('/process/es/annualInit const standardizationInitAgree = (params) => postAction('/process/es/annualInit/agree', params) // 拒绝 const standardizationInitReject = (params) => postAction('/process/es/annualInit/reject', params) +// 根据流程id获取流程信息 +const standardizationInitGetDataById = (taskId, params) => getAction(`/process/es/annualInit/handle/${taskId}`, params) // 企标更改流程 // 保存 @@ -139,7 +139,6 @@ export { enterprisePlanApprovalTurnTo, enterprisePlanApprovalAgree, enterprisePlanApprovalReject, - enterprisePlanApprovalDetermine, enterprisePlanApproval, enterprisePlanApprovalSave, getEnStandardNo, @@ -157,6 +156,7 @@ export { standardizationInitTurnTo, standardizationInitAgree, standardizationInitReject, + standardizationInitGetDataById, enStandardChangeSave, enStandardChangeApproval, diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue index a4f68f7b..84043ec4 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue @@ -98,7 +98,7 @@
- +
@@ -184,35 +184,40 @@ const personData = [ id: 3, nodeName: '工作组/所联络人填写企标', nodeRoleName: '工作组/所联络人', - canChoose: false + canChoose: false, + fieldName: 'workGroupUserList' }, { id: 4, nodeName: '收集联络人主管级领导审批', nodeRoleName: '联络人主管级领导', canChoose: false, - chooseType: 'checkbox' + chooseType: 'checkbox', + fieldName: 'collectUserLeader' }, { id: 5, nodeName: '各部门联络人汇总', nodeRoleName: '各部门联络人', canChoose: false, - chooseType: 'checkbox' + chooseType: 'checkbox', + fieldName: 'contactUserList' }, { id: 6, nodeName: '联络人主管级上一级领导审批', nodeRoleName: '联络人主管级上一级领导', canChoose: false, - chooseType: 'checkbox' + chooseType: 'checkbox', + fieldName: 'contactUserLeaderLeader' }, { id: 7, nodeName: '标准化工程师归档', nodeRoleName: '标准化工程师', canChoose: false, - chooseType: 'radio' + chooseType: 'radio', + fieldName: 'standardEngineer' } ] @@ -245,6 +250,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 @@ -311,37 +335,52 @@ export default { if (res.success) { this.model = res.result this.$nextTick(() => { - // 初始化流程信息 - this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes')) + // 初始化流程信息,节点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')) + } // 初始化流程审批信息,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 + this.personnelInfoData = personData.map(item => { + if (item.fieldName) { + return { + ...item, + user: this.model.flowUser[item.fieldName], + user_dictText: this.model.flowUser[item.fieldName + '_dictText'] + } + } else { + return item + } + }) } else { this.personnelInfoData = personData.map(item => { - return { ...item, canChoose: false, fieldName: undefined } + if (item.fieldName) { + return { ...item, user: this.model.flowUser[item.fieldName], userList: this.model.flowUser[item.fieldName + '_dictText'], canChoose: false } + } else { + return item + } }) } - this.$refs.baseInfoFormRef.initData(this.model.dataList) + // 初始化业务基本信息 + if (this.currentNode === 1) { + // 节点1需要回显数据 + this.$refs.baseInfoFormRef.initData(this.model) + } else if (this.currentNode === 2) { + // 节点2草稿情况下需要回显数据 todo + } else if (this.currentNode === 3) { + // 节点3草稿回显所有 todo ,待办进来回显表格数据 + this.$refs.baseInfoFormRef.initTableData() + } else if ([4, 5, 6, 7].includes(this.currentNode)) { + // 节点4,5,6,7回显数据 + this.$refs.baseInfoFormRef.initData(this.model) + } + } else { + this.$message.warning(res.message) } }) }, @@ -418,6 +457,7 @@ export default { activelyReportSave(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -432,7 +472,7 @@ export default { const personnelInfo = this.$refs.personnelInfo.stepsData const personnelObj = {} for (const item of personnelInfo) { - if (item.fieldName) { + if (item.fieldName && item.canChoose) { personnelObj[item.fieldName] = item.user } } @@ -457,6 +497,7 @@ export default { activelyReportApproval(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -485,6 +526,7 @@ export default { activelyReportTurnTo(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -517,6 +559,7 @@ export default { activelyReportAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -538,6 +581,7 @@ export default { activelyReportAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -558,6 +602,7 @@ export default { activelyReportReject(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -566,6 +611,9 @@ export default { }) } }) + }, + goBack () { + this.$router.go(-1) } } } diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue index d881197a..1b1194b6 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskForm.vue @@ -133,11 +133,21 @@ export default { initData (data) { this.data = data // 给表单赋值 - // this.formInline = - // 给表格赋值 - // this.$nextTick(() => { - // this.$refs.tableRef.dataSource = - // }) + if (data.dataList[0].distributeFlag + '' === '0') { + // 不下发联络人 + this.formInline = { distributeFlag: data.dataList[0].distributeFlag } + // 给表格赋值 + this.$nextTick(() => { + this.$refs.tableRef.initData(data) + }) + } else { + // 下发联络人,没有表格 + this.formInline = { + distributeFlag: data.dataList[0].distributeFlag, + workGroupUserList: data.flowUser.workGroupUserList, + contactUserLeaderLeader: data.flowUser.contactUserLeaderLeader + } + } }, // 外层要获取数据 getData () { diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterStandardForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterStandardForm.vue index e5059086..278cb2b3 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterStandardForm.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterStandardForm.vue @@ -11,13 +11,13 @@ {{ $t('workCenter.revisionPlanActivelyReport.contactsSupervisorLevelLeaders') }} - + @@ -55,7 +55,7 @@ export default { formInline: {}, rules: { // 收集联络人主管级领导 - contactsSupervisorLevelLeaders: [ + collectUserLeader: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.contactsSupervisorLevelLeaders') + this.$t('cannotEmpty'), @@ -76,11 +76,16 @@ export default { initData (data) { this.data = data // 给表单赋值 - // this.formInline = + this.formInline = { collectUserLeader: data.flowUser.collectUserLeader } // 给表格赋值 - // this.$nextTick(() => { - // this.$refs.tableRef.dataSource = - // }) + this.$nextTick(() => { + this.$refs.tableRef.initData(data) + }) + }, + initTableData (data) { + this.$nextTick(() => { + this.$refs.tableRef.initData(data) + }) }, // 外层要获取数据 getData () { diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/EngineerInitForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/EngineerInitForm.vue index af297fcd..29cfa31f 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/EngineerInitForm.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/EngineerInitForm.vue @@ -53,7 +53,9 @@ export default { initData (data) { this.data = data // 给表单赋值 - // this.formInline = + this.formInline = { + processDescription: data.common.processDescription + } }, // 外层要获取数据 getData () { diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue index 29b85789..ba7774a8 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue @@ -277,6 +277,13 @@ export default { } }, methods: { + initData (data) { + this.data = data + // 给表格赋值 + this.$nextTick(() => { + this.dataSource = data.dataList + }) + }, // 企标编号,企标名称跳转详情,原企标 handleGoDetailOld (record) { this.$openPageNewSheet({ diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue index 89de080d..9cd61316 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue @@ -143,10 +143,12 @@ import { standardizationInitSave, standardizationInitTurnTo, standardizationInitAgree, - standardizationInitReject + standardizationInitReject, + standardizationInitGetDataById } from '@/api/workCenter' import Vue from 'vue' import { USER_INFO } from '@/store/mutation-types' +import pick from 'lodash.pick' const personData = [ { @@ -161,37 +163,43 @@ const personData = [ id: 2, nodeName: '部所联络人选取审批人', nodeRoleName: '部所联络人', - canChoose: false + canChoose: false, + fieldName: 'contactUser' }, { id: 3, nodeName: '主起草单位主管级领导审批下发', nodeRoleName: '主起草单位主管级领导', - canChoose: false + canChoose: false, + fieldName: 'approvalUser' }, { id: 4, nodeName: '主起草人填写信息', nodeRoleName: '主起草人', - canChoose: false + canChoose: false, + fieldName: 'mainDraftUser' }, { id: 5, nodeName: '部所联络人汇总', nodeRoleName: '部所联络人', - canChoose: false + canChoose: false, + fieldName: 'contactUser' }, { id: 6, nodeName: '主起草单位主管级领导批准', nodeRoleName: '主起草单位主管级领导', - canChoose: false + canChoose: false, + fieldName: 'approvalUser' }, { id: 7, nodeName: '标准化归档', nodeRoleName: '标准化工程师', - canChoose: false + canChoose: false, + fieldName: 'standardEngineer' } ] @@ -217,12 +225,12 @@ export default { } }, mounted () { - if (this.currentNode === 1) { - this.personnelInfoData = personData + if (this.$route.query.taskId) { + // 有流程id说明是从流程中心来的,需要初始化数据 + this.getProcessData(this.$route.query.taskId) } else { - this.personnelInfoData = personData.map(item => { - return { ...item, canChoose: false, fieldName: undefined } - }) + // 没有taskId说明是新建进来的,初始化人员信息 + this.personnelInfoData = personData } // 如果是查看进入的,不可编辑,不可操作 if (this.$route.query.onlyLook) { @@ -284,6 +292,61 @@ export default { } }, methods: { + getProcessData (taskId) { + standardizationInitGetDataById(taskId).then(res => { + if (res.success) { + this.model = res.result + this.$nextTick(() => { + // 初始化流程信息 + this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes')) + // 初始化流程审批信息,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) { + return { + ...item, + user: this.model.flowUser[item.fieldName], + user_dictText: this.model.flowUser[item.fieldName + '_dictText'] + } + } else { + return item + } + }) + } else { + this.personnelInfoData = personData.map(item => { + if (item.fieldName) { + return { ...item, user: this.model.flowUser[item.fieldName], userList: this.model.flowUser[item.fieldName + '_dictText'], canChoose: false } + } else { + return item + } + }) + } + this.$refs.baseInfoRef.initData(this.model.dataList) + } else { + this.$message.warning(res.message) + } + }) + }, switchChange (value) { this.switchValue = value }, @@ -333,6 +396,7 @@ export default { standardizationInitSave(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -347,7 +411,7 @@ export default { const personnelInfo = this.$refs.personnelInfo.stepsData const personnelObj = {} for (const item of personnelInfo) { - if (item.fieldName) { + if (item.fieldName && item.canChoose) { personnelObj[item.fieldName] = item.user } } @@ -369,6 +433,7 @@ export default { standardizationInitApproval(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -397,6 +462,7 @@ export default { standardizationInitTurnTo(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -420,6 +486,7 @@ export default { standardizationInitAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -442,6 +509,7 @@ export default { standardizationInitAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -463,6 +531,7 @@ export default { standardizationInitReject(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -471,6 +540,9 @@ export default { }) } }) + }, + goBack () { + this.$router.go(-1) } } } diff --git a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue index 96c0bcfc..48eadc8a 100644 --- a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue @@ -24,7 +24,7 @@ @change="event => event.target.value = event.target.value.trim()" disabled :maxLength="50" - v-decorator="['processName', validatorRules.processName]" /> + v-decorator="['prcName', validatorRules.prcName]" /> @@ -34,7 +34,7 @@ style="width: 100%" :disabled="disabled" value-format="YYYY-MM-DD" - v-decorator="['deadlineDate']" /> + v-decorator="['dueTime']" /> @@ -44,7 +44,7 @@ :maxLength="500" :rows="4" :disabled="disabled" - v-decorator="['processDescription']" /> + v-decorator="['prcMes']" /> @@ -68,11 +68,11 @@ + v-decorator="['commitText', validatorRules.commitText]" /> - + @@ -134,7 +134,8 @@ const personalInfo = [ // 人员信息的数据 nodeName: '主起草人发起', nodeRoleName: '发起人', canChoose: false, - userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' + userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')', + fieldName: 'mainDraftUser' }, { id: 2, @@ -142,7 +143,7 @@ const personalInfo = [ // 人员信息的数据 nodeRoleName: '相关人员', canChoose: true, chooseType: 'checkbox', - fieldName: '' + fieldName: 'relatedUser' }, { id: 3, @@ -150,7 +151,7 @@ const personalInfo = [ // 人员信息的数据 nodeRoleName: '起草人主管级领导', canChoose: true, chooseType: 'radio', - fieldName: '' + fieldName: 'mainDraftUserLeader' }, { id: 4, @@ -158,7 +159,7 @@ const personalInfo = [ // 人员信息的数据 nodeRoleName: '标准化', canChoose: true, chooseType: 'radio', - fieldName: '' + fieldName: 'standardizationUser' }, { id: 5, @@ -166,7 +167,7 @@ const personalInfo = [ // 人员信息的数据 nodeRoleName: '起草人主管级上一级领导', canChoose: true, chooseType: 'radio', - fieldName: '' + fieldName: 'mainDraftUserLeaderLeader' } ] @@ -233,13 +234,13 @@ export default { }, validatorRules: { // 流程名称 - processName: { + prcName: { rules: [ { required: true, message: this.$t('pleaseEnter') + this.$t('processName') } ], validateTrigger: 'blur' }, - remarks: { + commitText: { rules: [ { required: false, message: this.$t('pleaseEnter') + this.$t('remarks') } ], @@ -262,9 +263,9 @@ export default { this.model = res.result this.$nextTick(() => { // 初始化流程信息 - this.processInfoForm.setFieldsValue(pick(this.model[0], 'processName', 'deadlineDate', 'processDescription')) + this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes')) // 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息 - // this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'remarks', 'attachment')) + // this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile')) }) // 初始化业务基本信息的申请类型和项目类别 this.formInline.applicationCategory = this.model[0].applicationCategory @@ -289,9 +290,9 @@ export default { }, // 业务基本信息组件中获取到流程名称改变后的值 processNameChange (value) { - const param = { processName: value } + const param = { prcName: value } this.$nextTick(() => { - this.processInfoForm.setFieldsValue(pick(param, 'processName')) + this.processInfoForm.setFieldsValue(pick(param, 'prcName')) }) }, // 保存 @@ -332,6 +333,7 @@ export default { enStandardChangeSave(arr).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -346,7 +348,7 @@ export default { const personnelInfo = this.$refs.personnelInfo.stepsData const personnelObj = {} for (const item of personnelInfo) { - if (item.fieldName) { + if (item.fieldName && item.canChoose) { personnelObj[item.fieldName] = item.user } } @@ -365,6 +367,7 @@ export default { enStandardChangeApproval(arr).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -393,6 +396,7 @@ export default { enStandardChangeTurnTo(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -413,6 +417,7 @@ export default { enStandardChangeAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -425,8 +430,8 @@ export default { // 驳回 handleReject () { if (this.loading) return - this.validatorRules.remarks.rules[0].required = true - if (!this.approvalInfoForm.getFieldValue('remarks')) { + this.validatorRules.commitText.rules[0].required = true + if (!this.approvalInfoForm.getFieldValue('commitText')) { this.$message.warning(this.$t('pleaseEnterRemarks')) } this.$nextTick(() => { @@ -438,16 +443,20 @@ export default { enStandardChangeReject(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } }).finally(() => { this.loading = false - this.validatorRules.remarks.rules[0].required = false + this.validatorRules.commitText.rules[0].required = false }) } }) }) + }, + goBack () { + this.$router.go(-1) } } } diff --git a/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue index 4e43504f..7d62a94e 100644 --- a/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue @@ -7,7 +7,7 @@ :can-drag="true" :scroll="{x: '100%'}" ref="table" - rowKey="enterpriseStandardPlanId" + :rowKey="(index) => {return index}" :columns="columns" :dataSource="dataSource" :pagination="false" diff --git a/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue b/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue index 258fd99d..17f380e4 100644 --- a/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue +++ b/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue @@ -27,12 +27,12 @@ {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }} - + @@ -43,9 +43,9 @@ {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }} - + @@ -59,10 +59,10 @@ {{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }} - + - + - + @@ -130,9 +130,9 @@ {{ $t('workCenter.enStandardChange.materialDate') }} - + @@ -146,10 +146,10 @@ {{ $t('workCenter.enStandardChange.isTry') }} - + - - + - + + v-model="formInline.standardScope" :rows="4" /> @@ -349,12 +349,12 @@ export default { }, watch: { // 企标编号监视 - 'formInline.enStandardNo' (value) { - this.$emit('processNameChange', (value || '') + '-' + (this.formInline.enStandardName || '') + '-' + '企标更改') + 'formInline.standardNumber' (value) { + this.$emit('processNameChange', (value || '') + '-' + (this.formInline.standardName || '') + '-' + '企标更改') }, // 企标名称监视 - 'formInline.enStandardName' (value) { - this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (value || '') + '-' + '企标更改') + 'formInline.standardName' (value) { + this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (value || '') + '-' + '企标更改') } }, data () { @@ -365,7 +365,7 @@ export default { formInline: {}, rules: { // 企标编号 - enStandardNo: [ + standardNumber: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'), @@ -373,7 +373,7 @@ export default { } ], // 标准等级分类 - enStandardClassification: [ + gradeClassification: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'), @@ -381,7 +381,7 @@ export default { } ], // 标准体系 - enStandardSystem: [ + standardSystem: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + this.$t('cannotEmpty'), @@ -397,7 +397,7 @@ export default { } ], // 实施日期 - materialDate: [ + implementationDate: [ { required: true, message: this.$t('workCenter.enStandardChange.materialDate') + this.$t('cannotEmpty'), @@ -405,7 +405,7 @@ export default { } ], // 零部件名称 - componentName: [ + partName: [ { required: true, message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'), @@ -442,9 +442,9 @@ export default { listChange (value) { console.log(value) // 企标名称 - this.formInline.enStandardName = value[0].standardName + this.formInline.standardName = value[0].standardName // 标准等级分类 - // this.formInline.enStandardClassification = value[0]. + // this.formInline.gradeClassification = value[0]. // 标准体系 // 标准英文名称 // 发布日期 diff --git a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue index 7b26b5d0..c6dca2a4 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue @@ -256,7 +256,6 @@ import { enterprisePlanApprovalTurnTo, enterprisePlanApprovalAgree, enterprisePlanApprovalReject, - enterprisePlanApprovalDetermine, enterprisePlanApprovalSave, enterprisePlanApproval, getProcessDataById @@ -374,28 +373,32 @@ const changePersonalInfo = [ nodeName: '新起草部门主管级上一级领导下发', nodeRoleName: '新起草部门主管级上一级领导', canChoose: false, - chooseType: 'radio' + chooseType: 'radio', + fieldName: 'newMainDraftUserLeaderLeader' }, { id: 7, nodeName: '新起草部门主管级领导确认', nodeRoleName: '新起草部门主管级领导', canChoose: false, - chooseType: 'radio' + chooseType: 'radio', + fieldName: 'newMainDraftUserLeader' }, { id: 8, nodeName: '相关人员会签', nodeRoleName: '相关人员', canChoose: false, - chooseType: 'checkbox' + chooseType: 'checkbox', + fieldName: 'relatedUser' }, { id: 9, nodeName: '抄送主起草人', nodeRoleName: '主起草人', canChoose: false, - chooseType: 'checkbox' + chooseType: 'checkbox', + fieldName: 'createUser' } ] @@ -811,6 +814,7 @@ export default { enterprisePlanApprovalSave(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -825,7 +829,7 @@ export default { const personnelInfo = this.$refs.personnelInfo.stepsData const personnelObj = {} for (const item of personnelInfo) { - if (item.fieldName) { + if (item.fieldName && item.canChoose) { personnelObj[item.fieldName] = item.user } } @@ -940,6 +944,7 @@ export default { func(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -964,6 +969,7 @@ export default { enterprisePlanApprovalAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -991,6 +997,7 @@ export default { enterprisePlanApprovalTurnTo(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -1026,6 +1033,7 @@ export default { enterprisePlanApprovalAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -1052,6 +1060,7 @@ export default { enterprisePlanApprovalReject(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -1069,11 +1078,13 @@ export default { this.approvalInfoForm.validateFields((err, values) => { if (!err) { this.loading = true - const param = Object.assign({}, values) - param.taskId = this.$route.query.taskId - enterprisePlanApprovalDetermine(param).then(res => { + const param = {} + param.common = Object.assign({}, values) + param.common.taskId = this.$route.query.taskId + enterprisePlanApprovalAgree(param).then(res => { if (res.success) { this.$message.success(res.message) + this.goBack() } else { this.$message.warning(res.message) } @@ -1082,6 +1093,9 @@ export default { }) } }) + }, + goBack () { + this.$router.go(-1) } } } diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue index 13cb2842..cb1ac098 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/DutyDepartChangeBaseInfo.vue @@ -16,7 +16,6 @@ :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')" v-model="formInline.espId" :standard-number="formInline.originEnStandardNo" - @standardNumberChange="standardNumberChange" :searchParam="{ projectType: projectType }" :disabled="disabled" @listChange="listChange"/> @@ -251,25 +250,24 @@ export default { } }, methods: { - // 企标计划选择完成的企标编号回调 - standardNumberChange (value) { - this.formInline.originEnStandardNo = value - }, // 企标选编号选择完成的回调 listChange (value) { console.log(value) if (value && value.length > 0) { - this.formInline.originEnStandardName = value[0].originEnStandardName - this.formInline.mainDraftingUser = value[0].mainDraftingUser - this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser_dictText - this.formInline.mainDraftingUnit = value[0].mainDraftingUnit - this.formInline.newMainDraftingUser = value[0].mainDraftingUser - this.formInline.newMainDraftingUser_dictText = value[0].mainDraftingUser_dictText - this.formInline.newMainDraftingUnit = value[0].mainDraftingUnit - this.formInline.mainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson - this.formInline.mainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText - this.formInline.newMainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson - this.formInline.newMainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText + const formInline = {} + formInline.originEnStandardNo = value[0].originEnStandardNo + formInline.originEnStandardName = value[0].originEnStandardName + formInline.mainDraftingUser = value[0].mainDraftingUser + formInline.mainDraftingUser_dictText = value[0].mainDraftingUser_dictText + formInline.mainDraftingUnit = value[0].mainDraftingUnit + formInline.newMainDraftingUser = value[0].mainDraftingUser + formInline.newMainDraftingUser_dictText = value[0].mainDraftingUser_dictText + formInline.newMainDraftingUnit = value[0].mainDraftingUnit + formInline.mainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson + formInline.mainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText + formInline.newMainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson + formInline.newMainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText + this.formInline = Object.assign({}, this.formInline, formInline) } }, // 选择用户得到用户名