diff --git a/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue b/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue index 5d7245b260..5d0db76d11 100644 --- a/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue +++ b/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagement.vue @@ -83,9 +83,8 @@ - + @@ -171,6 +170,13 @@ export default { btnKey: 'toAdd', btnLabel: '新增' }, + { + type: 'primary', + size: 'small', + icon: 'edit', + btnKey: 'toEdit', + btnLabel: '编辑' + }, { type: 'danger', size: 'small', @@ -330,6 +336,9 @@ export default { case 'toAdd': this.toAdd() break + case 'toEdit': + this.toEdit() + break case 'doDel': this.doDel() break @@ -448,9 +457,17 @@ export default { this.viewState = 2 this.$refs['divAdd'].showAdd() }, - toEdit(row) { - this.viewState = 3 - this.$refs['divAdd'].showEdit(row) + toEdit() { + if (this.multipleSelection.length === 1) { + if (!this.multipleSelection[0].updateBtn) { + this.viewState = 3 + this.$refs['divAdd'].showEdit(this.multipleSelection) + } else { + this.$message({ showClose: true, type: 'error', message: '该记录已报备且仍在有效期内,无法再次编辑' }) + } + } else { + this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) + } }, toInfo(row) { this.viewState = 4