Browse Source

完善放款差额确认--增加重推功能

master
yunuo970428 1 year ago
parent
commit
5753b41862
  1. 7
      anrui-riskcenter-ui/src/api/loanbalancerecognition/loanbalancerecognition.js
  2. 44
      anrui-riskcenter-ui/src/views/loanbalancerecognition/loanbalancerecognition.vue

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

@ -10,6 +10,13 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
ctDiff: function(data) {
return request({
url: '/riskcenter/v1/LoanDiff/ctDiff',
method: 'post',
params: data
})
},
saveOrUpdate: function(data) {
return request({
url: '/riskcenter/v1/LoanDiff/update',

44
anrui-riskcenter-ui/src/views/loanbalancerecognition/loanbalancerecognition.vue

@ -110,6 +110,7 @@ import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/loanbalancerecognition/loanbalancerecognition'
import { getStorage } from '@/utils/auth'
import { getButtonPermissions } from '@/api/Common/dictcommons'
import loanbalancerecognitionAdd from './loanbalancerecognitionAdd'
import loanbalancerecognitionInfo from './loanbalancerecognitionInfo'
@ -129,6 +130,13 @@ export default {
centerDialogVisible: false,
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toPush',
btnLabel: '重推'
},
{
type: 'info',
size: 'small',
@ -170,7 +178,18 @@ export default {
mounted() {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
this.$refs['btnbar'].setButtonList(this.btnList)
getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => {
if (res.success) {
for (var i = 0; i < res.data.length; i++) {
for (var k = 0; k < this.btnList.length; k++) {
if (res.data[i].buttonId === this.btnList[k].btnKey) {
this.btnList.splice(k, 1)
}
}
}
this.$refs['btnbar'].setButtonList(this.btnList)
}
})
},
methods: {
async handleMessage(event) {
@ -275,6 +294,29 @@ export default {
}
this.getList()
},
toPush() {
if (this.sids.length === 1) {
const loading = this.$loading({
lock: true,
text: '数据推送中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.ctDiff({ 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 = 2
this.$refs['divAdd'].showEdit(row)

Loading…
Cancel
Save