From cf8d225ffd53a028015cca301fc7a41b88de6e4c Mon Sep 17 00:00:00 2001 From: quyixiao <2621048238@qq.com> Date: Thu, 20 Aug 2020 19:24:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/result/record/lzresultrecord.vue | 17 +++++++++- .../result/record/lzresultrecordapp.vue | 33 +++++++++++++++---- .../record/recorddetail-add-or-update.vue | 4 +-- .../modules/result/record/recorddetail.vue | 9 ++--- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/src/views/modules/result/record/lzresultrecord.vue b/src/views/modules/result/record/lzresultrecord.vue index 66511bc..f2b1906 100644 --- a/src/views/modules/result/record/lzresultrecord.vue +++ b/src/views/modules/result/record/lzresultrecord.vue @@ -73,6 +73,13 @@ + + + @@ -114,7 +121,7 @@ export default { var date = new Date(val) var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() - return date.getFullYear() + '-' + month + '-' + day + return date.getFullYear() + '-' + month }, getStatusStr (status) { if (status === 0) { @@ -127,6 +134,14 @@ export default { return '审批通过' } return '' + }, + getType (value) { + if (value === 1) { + return '本月目标' + } else if (value === 2) { + return '结果' + } + return '' } }, data () { diff --git a/src/views/modules/result/record/lzresultrecordapp.vue b/src/views/modules/result/record/lzresultrecordapp.vue index babf45a..ff1d24a 100644 --- a/src/views/modules/result/record/lzresultrecordapp.vue +++ b/src/views/modules/result/record/lzresultrecordapp.vue @@ -118,8 +118,7 @@ width="150" label="操作"> @@ -142,7 +141,6 @@ import AddOrUpdate from './lzresultrecord-add-or-update' import {apiGetResultRecordList, departmentQuery} from '@/api/api_result' import {getDataForMonth} from '@/utils' -import {isURL} from '@/utils/validate' export default { filters: { @@ -150,7 +148,7 @@ export default { var date = new Date(val) var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() - return date.getFullYear() + '-' + month + '-' + day + return date.getFullYear() + '-' + month }, getStatusStr (status) { if (status === 0) { @@ -163,6 +161,14 @@ export default { return '审批通过' } return '' + }, + getType (value) { + if (value === 1) { + return '本月目标' + } else if (value === 2) { + return '结果' + } + return '' } }, data () { @@ -259,7 +265,8 @@ export default { 'department2': this.dataForm.department2, 'department3': this.dataForm.department3, 'name': this.dataForm.name, - 'remark': this.dataForm.remark + 'remark': this.dataForm.remark, + 'isSelf': 2 }).then(data => { if (data && data.code === 0) { this.dataList = data.page.list @@ -296,8 +303,8 @@ export default { this.dataListSelections = val }, // - addOrUpdateHandle (id) { - this.$router.push({name: 'recorddetail',query: {id}}, () => { + addOrUpdateHandle (id, recordType) { + this.$router.push({name: 'recorddetail', query: {id: id, recordType: recordType}}, () => { this.mainTabsActiveName = this.$route.name }) }, @@ -334,3 +341,15 @@ export default { } } + + + + diff --git a/src/views/modules/result/record/recorddetail-add-or-update.vue b/src/views/modules/result/record/recorddetail-add-or-update.vue index 4c3ad27..11d6945 100644 --- a/src/views/modules/result/record/recorddetail-add-or-update.vue +++ b/src/views/modules/result/record/recorddetail-add-or-update.vue @@ -247,7 +247,7 @@ export default { this.checkResultEditor.txt.html(this.dataForm.checkResult || '') } if (this.scoreCommentEditor !== null) { - this.scoreCommentEditor.txt.html(this.dataForm.checkResult || '') + this.scoreCommentEditor.txt.html(this.dataForm.scoreComment || '') } } } @@ -314,7 +314,7 @@ export default { } if (this.auth.scoreComment === 2) { if (this.dataForm.acquireScore !== 3.5 || this.dataForm.acquireScore !== 3.75) { - if (this.stringIsNull(this.dataForm.scoreComment)) { + if (this.stringIsNull(this.scoreCommentEditor.txt.html())) { this.alertInfo('评分说明不能为空') return } diff --git a/src/views/modules/result/record/recorddetail.vue b/src/views/modules/result/record/recorddetail.vue index 5af0b44..658f011 100644 --- a/src/views/modules/result/record/recorddetail.vue +++ b/src/views/modules/result/record/recorddetail.vue @@ -30,11 +30,11 @@
-

审批通过

+

审批通过

-

确认得分

+

确认得分

@@ -210,8 +210,8 @@ export default { return '' } }, - commitApproval () { - this.$confirm(`确定要提交审批吗?`, '提示', { + commitApproval (msg = '确定要提交审批吗?') { + this.$confirm(msg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' @@ -220,6 +220,7 @@ export default { 'recordResultId': this.recordResultId }).then(data => { if (data && data.code === 0) { + this.getDataList() this.$message({ message: data.msg, type: 'success',