Browse Source

完善月还计提申请 -- 增加重推功能

master
yunuo970428 3 months ago
parent
commit
cfcd1f8684
  1. 7
      anrui-riskcenter-ui/src/api/monthlyallowance/monthlyallowance.js
  2. 39
      anrui-riskcenter-ui/src/views/monthlyallowance/monthlyallowance.vue

7
anrui-riskcenter-ui/src/api/monthlyallowance/monthlyallowance.js

@ -25,6 +25,13 @@ export default {
headers: { 'Content-Type': 'application/json' } headers: { 'Content-Type': 'application/json' }
}) })
}, },
rePushVoucher: function(data) {
return request({
url: '/riskcenter/v1/loanmonthlyaccrualapply/rePushVoucher',
method: 'post',
params: data
})
},
deleteBySids: function(data) { deleteBySids: function(data) {
return request({ return request({
url: '/riskcenter/v1/loanmonthlyaccrualapply/deleteBySids', url: '/riskcenter/v1/loanmonthlyaccrualapply/deleteBySids',

39
anrui-riskcenter-ui/src/views/monthlyallowance/monthlyallowance.vue

@ -146,6 +146,13 @@ export default {
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '新增' btnLabel: '新增'
}, },
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toPush',
btnLabel: '重推'
},
{ {
type: 'danger', type: 'danger',
size: 'small', size: 'small',
@ -167,6 +174,7 @@ export default {
tableKey: 0, tableKey: 0,
list: [], list: [],
sids: [], // SIDs sids: [], // SIDs
multipleSelection: [],
FormLoading: false, FormLoading: false,
listLoading: false, listLoading: false,
// //
@ -242,6 +250,9 @@ export default {
case 'toAdd': case 'toAdd':
this.toAdd() this.toAdd()
break break
case 'toPush':
this.toPush()
break
case 'doDel': case 'doDel':
this.doDel() this.doDel()
break break
@ -255,6 +266,7 @@ export default {
// sid // sid
handleSelectionChange(row) { handleSelectionChange(row) {
const aa = [] const aa = []
this.multipleSelection = row
row.forEach(element => { row.forEach(element => {
aa.push(element.sid) 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) { toEdit(row) {
this.viewState = 3 this.viewState = 3
this.$refs['divAdd'].showEdit(row) this.$refs['divAdd'].showEdit(row)

Loading…
Cancel
Save