diff --git a/anrui-riskcenter-ui/src/api/monthlyallowance/monthlyallowance.js b/anrui-riskcenter-ui/src/api/monthlyallowance/monthlyallowance.js index 95738888fe..2c77109fd2 100644 --- a/anrui-riskcenter-ui/src/api/monthlyallowance/monthlyallowance.js +++ b/anrui-riskcenter-ui/src/api/monthlyallowance/monthlyallowance.js @@ -25,6 +25,13 @@ export default { headers: { 'Content-Type': 'application/json' } }) }, + rePushVoucher: function(data) { + return request({ + url: '/riskcenter/v1/loanmonthlyaccrualapply/rePushVoucher', + method: 'post', + params: data + }) + }, deleteBySids: function(data) { return request({ url: '/riskcenter/v1/loanmonthlyaccrualapply/deleteBySids', diff --git a/anrui-riskcenter-ui/src/views/monthlyallowance/monthlyallowance.vue b/anrui-riskcenter-ui/src/views/monthlyallowance/monthlyallowance.vue index 549bfaf8ce..4c834a46ae 100644 --- a/anrui-riskcenter-ui/src/views/monthlyallowance/monthlyallowance.vue +++ b/anrui-riskcenter-ui/src/views/monthlyallowance/monthlyallowance.vue @@ -146,6 +146,13 @@ export default { btnKey: 'toAdd', btnLabel: '新增' }, + { + type: 'primary', + size: 'small', + icon: '', + btnKey: 'toPush', + btnLabel: '重推' + }, { type: 'danger', size: 'small', @@ -167,6 +174,7 @@ export default { tableKey: 0, list: [], sids: [], // 用于导出的时候保存已选择的SIDs + multipleSelection: [], FormLoading: false, listLoading: false, // 翻页 @@ -242,6 +250,9 @@ export default { case 'toAdd': this.toAdd() break + case 'toPush': + this.toPush() + break case 'doDel': this.doDel() break @@ -255,6 +266,7 @@ export default { // 信息条数 获取点击时当前的sid handleSelectionChange(row) { const aa = [] + this.multipleSelection = row row.forEach(element => { aa.push(element.sid) }) @@ -317,6 +329,33 @@ export default { } }) }, + toPush() { + if (this.sids.length === 1) { + if (this.multipleSelection[0].nodeState !== '已办结') { + this.$message({ showClose: true, type: 'error', message: '请选择状态为已办结的记录进行重推操作' }) + return + } + const loading = this.$loading({ + lock: true, + text: '数据推送中', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + req.rePushVoucher({ sid: this.sids[0] }).then((resp) => { + if (resp.success) { + loading.close() + this.$message({ showClose: true, type: 'success', message: '重推成功' }) + this.getList() + } else { + loading.close() + } + }).catch(() => { + loading.close() + }) + } else { + this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行重推操作' }) + } + }, toEdit(row) { this.viewState = 3 this.$refs['divAdd'].showEdit(row)