diff --git a/src/components/selection/UserSelectByContactModal.vue b/src/components/selection/UserSelectByContactModal.vue index 8e26cf2f..f8b09b29 100644 --- a/src/components/selection/UserSelectByContactModal.vue +++ b/src/components/selection/UserSelectByContactModal.vue @@ -149,10 +149,10 @@ export default { methods: { open (value) { this.visible = true + this.loadData() if (value) { this.selectedRowKeys = value.split(',') this.getUserListByIds(value) - this.loadData() } }, searchReset () { diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/BaseInfoTableModal.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/BaseInfoTableModal.vue index 04ac8f13..90b8cc7f 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/BaseInfoTableModal.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/BaseInfoTableModal.vue @@ -196,7 +196,7 @@
- * + * {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }} @@ -332,7 +332,7 @@ @@ -349,7 +349,7 @@ @@ -366,7 +366,7 @@ @@ -785,20 +785,23 @@ export default { this.model = Object.assign({}, record) this.formInline = Object.assign({}, record) // 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填 + // 找出最初的这条表格数据 + const dItem = this.initDataSource.find(item => item.id === this.formInline.id) + console.log(dItem) if ([6].includes(this.currentNode)) { // 是主起草人的编辑 // 草稿计划完成日期的处理 - if (this.formInline.draftPlannedCompleteDate) { + if (dItem.draftPlannedCompleteDate) { // 草稿计划完成日期已经填写了, 主起草人不能修改 this.draftPlanFinishDateDisabled = true } // 征求意见稿计划完成日期 - if (this.formInline.solicitationDraftPlanCompleteDate) { + if (dItem.solicitationDraftPlanCompleteDate) { // 征求意见稿计划完成日期已经填写了, 主起草人不能修改 this.exposureDraftPlanFinishDateDisabled = true } // 计划报批日期 - if (this.formInline.planApprovalDate) { + if (dItem.planApprovalDate) { // 计划报批日期已经填写了, 主起草人不能修改 this.planSubmissionDateDisabled = true } @@ -810,7 +813,7 @@ export default { // 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填 this.disabled = true // 草稿计划完成日期的处理 - if (!this.formInline.draftPlannedCompleteDate) { + if (!dItem.draftPlannedCompleteDate) { // 草稿计划完成日期没有填写, 联络人必填 this.rules.draftPlannedCompleteDate[0].required = true } else { @@ -818,7 +821,7 @@ export default { this.draftPlanFinishDateDisabled = true } // 征求意见稿计划完成日期 - if (!this.formInline.solicitationDraftPlanCompleteDate) { + if (!dItem.solicitationDraftPlanCompleteDate) { // 征求意见稿计划完成日期没有填写, 联络人必填 this.rules.solicitationDraftPlanCompleteDate[0].required = true } else { @@ -826,7 +829,7 @@ export default { this.exposureDraftPlanFinishDateDisabled = true } // 计划报批日期 - if (!this.formInline.planApprovalDate) { + if (!dItem.planApprovalDate) { // 计划报批日期没有填写, 联络人必填 this.rules.planApprovalDate[0].required = true } else { @@ -947,6 +950,9 @@ export default { this.formInline = {} this.visible = false this.$refs.ruleForm.clearValidate() + this.draftPlanFinishDateDisabled = false + this.exposureDraftPlanFinishDateDisabled = false + this.planSubmissionDateDisabled = false }, // 提交 handleSubmit () { diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue index 082f7b47..a7ea19c6 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue @@ -246,7 +246,7 @@ export default { width: 300, dataIndex: 'contactUser', customRender: (value, row, index) => { - if (this.isRejectedTodo) { + if (this.isRejectedTodo && row.id) { // 是被驳回的待办 return this.dataSource[index].contactUser_dictText } else { @@ -278,15 +278,20 @@ export default { selectNames: '' // 选完人的名字,批量设置人需要用 } }, - mounted () { - /** - * 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人, - * 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程 ?? - */ - if (this.$route.query.currentNode && this.$route.query.currentNode === 3) { - this.isRejectedTodo = true - } else { - this.isRejectedTodo = false + watch: { + currentNode: { + immediate: true, + handler (val) { + /** + * 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人, + * 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程 ?? + */ + if (val && ([3, 10].includes(val))) { + this.isRejectedTodo = true + } else { + this.isRejectedTodo = false + } + } } }, methods: { diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/TableBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/TableBaseInfo.vue index 92649e19..527c02f3 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/TableBaseInfo.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/TableBaseInfo.vue @@ -216,10 +216,8 @@ export default { console.log('------执行initData了--------') // 给表格赋值 this.dataSource = data - if (this.currentNode === 6) { - // 是主起草人填写信息节点 - this.initDataSource = JSON.parse(JSON.stringify(data)) - } + // 记录最开始的表格数据,方便编辑对比是否 + this.initDataSource = JSON.parse(JSON.stringify(data)) }, // 外层要获取数据 getData () {