From 00bee9d4e0bd2abbf911ebe1142b907fbe613b22 Mon Sep 17 00:00:00 2001 From: yujt Date: Thu, 21 May 2020 17:46:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=97=BB=E7=B1=BB=E5=88=AB=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=8B=AC=E7=AB=8B=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=A0=87=E8=AE=B0=E5=AD=97=E6=AE=B5=EF=BC=9B=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../news/newscategory-add-or-update.vue | 22 +++++++++++++---- .../points/volunteerinfo-points-adjust.vue | 24 +++++++++---------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/views/modules/news/newscategory-add-or-update.vue b/src/views/modules/news/newscategory-add-or-update.vue index 61ae84b..d76c557 100644 --- a/src/views/modules/news/newscategory-add-or-update.vue +++ b/src/views/modules/news/newscategory-add-or-update.vue @@ -13,10 +13,13 @@ - - + + + + + + + @@ -50,8 +53,11 @@ export default { categoryName: '', categoryCode: '', description: '', + independentFlag: '', sort: 0 - } + }, + yesOrNoContains: [{ id: '0', name: '否' }, { id: '1', name: '是' }], + codeReadOnly: false } }, computed: { @@ -65,6 +71,9 @@ export default { ], sort: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } + ], + independentFlag: [ + { required: true, message: this.$t('validate.required'), trigger: 'blur' } ] } } @@ -89,6 +98,9 @@ export default { ...this.dataForm, ...res.data } + if (res.data.independentFlag === '1') { + this.codeReadOnly = true + } }).catch(() => { }) }, // 表单提交 diff --git a/src/views/modules/points/volunteerinfo-points-adjust.vue b/src/views/modules/points/volunteerinfo-points-adjust.vue index 5559f14..47dae9e 100644 --- a/src/views/modules/points/volunteerinfo-points-adjust.vue +++ b/src/views/modules/points/volunteerinfo-points-adjust.vue @@ -167,19 +167,19 @@ export default { } this.$http['post']( '/points/pointslogs/confirmAdjustPoint', this.dataForm).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') } - this.$message({ - message: this.$t('prompt.success'), - type: 'success', - duration: 500, - onClose: () => { - this.visible = false - this.$emit('refreshDataList') - } - }) - }).catch(() => { }) + }) + }).catch(() => { }) }, 1000, { 'leading': true, 'trailing': false }) }), getBehaviorTypeList () {