Browse Source

完善划扣申请增加重推功能

master
yunuo970428 7 months ago
parent
commit
fd35b5b4ce
  1. 7
      anrui-riskcenter-ui/src/api/deduct/deduct.js
  2. 51
      anrui-riskcenter-ui/src/views/deduct/deduct.vue

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

@ -57,6 +57,13 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
buckleVoucherRePush: function(data) {
return request({
url: '/riskcenter/v1/loanbuckleapply/buckleVoucherRePush',
method: 'post',
params: data
})
},
// 提交流程
submit: function(params) {
return request({

51
anrui-riskcenter-ui/src/views/deduct/deduct.vue

@ -122,6 +122,7 @@ import req from '@/api/deduct/deduct'
import { getStorage } from '@/utils/auth'
import deductAdd from './deductAdd'
import deductInfo from './deductInfo'
import { getButtonPermissions } from '@/api/Common/dictcommons'
export default {
name: 'Deduct',
@ -139,6 +140,13 @@ export default {
centerDialogVisible: false,
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toPush',
btnLabel: '重推'
},
{
type: 'danger',
size: 'small',
@ -165,7 +173,7 @@ export default {
//
listQuery: {
current: 1,
size: 10,
size: 5,
total: 0,
params: {
applyName: '',
@ -189,7 +197,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) {
@ -232,6 +251,9 @@ export default {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toPush':
this.toPush()
break
case 'doDel':
this.doDel()
break
@ -282,7 +304,7 @@ export default {
handleReset() {
this.listQuery = {
current: 1,
size: 10,
size: 5,
total: 0,
params: {
applyName: '',
@ -307,6 +329,29 @@ export default {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
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.buckleVoucherRePush({ 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: '请选择一条记录进行重推操作' })
}
},
//
doDel() {
if (this.sids.length === 0) {

Loading…
Cancel
Save