Browse Source

完善资方划扣还款明细

master
yunuo970428 1 year ago
parent
commit
04ef26453a
  1. 7
      anrui-riskcenter-ui/src/views/monthlypayment/adjust.vue
  2. 24
      anrui-riskcenter-ui/src/views/monthlypayment/monthlypayment.vue

7
anrui-riskcenter-ui/src/views/monthlypayment/adjust.vue

@ -121,8 +121,11 @@ export default {
})
},
UpNumber(e) {
e.target.value = e.target.value.replace(/[^0-9]/g, '') // .
e.target.value = e.target.value.replace(/^00/, '0') // 0
e.target.value = e.target.value.replace(/[^0-9.]/g, '') // .
e.target.value = e.target.value.replace(/^00/, '0.') // 0
e.target.value = e.target.value.replace(/\.{2,}/g, '.') // .
e.target.value = e.target.value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
e.target.value = e.target.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') //
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
e.target.value = parseFloat(e.target.value)

24
anrui-riskcenter-ui/src/views/monthlypayment/monthlypayment.vue

@ -107,7 +107,7 @@
<!-- 导入 -->
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false">
<div>
<el-button size="small" type="text" style="font-weight: bold" @click="downLoad">下载当月还款记录模板</el-button>
<el-button size="small" type="text" style="font-weight: bold" @click="downLoad">下载还款记录模板</el-button>
</div>
<el-card class="box-card">
<div>
@ -195,15 +195,15 @@ export default {
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toDeduct',
btnLabel: '划扣'
btnKey: 'toUpdate',
btnLabel: '更新'
},
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toUpdate',
btnLabel: '更新'
btnKey: 'toDeduct',
btnLabel: '划扣'
},
{
type: 'danger',
@ -226,6 +226,7 @@ export default {
tableKey: 0,
list: [],
sids: [], // SIDs
multipleSelection: [],
returnWay_list: [],
buckle_list: [
{
@ -327,6 +328,7 @@ export default {
// sid
handleSelectionChange(row) {
const aa = []
this.multipleSelection = row
row.forEach(element => {
aa.push(element.sid)
})
@ -408,7 +410,7 @@ export default {
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '当月还款记录模板' + '.xls'
const fileName = '还款记录模板' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
@ -436,7 +438,7 @@ export default {
},
handleConfirm() {
if (this.upload_list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请先上传当月还款记录' })
this.$message({ showClose: true, type: 'error', message: '请先上传还款记录' })
return
}
req.saveRecords(this.upload_list).then((res) => {
@ -501,8 +503,12 @@ export default {
//
toEdit(row) {
if (this.sids.length === 1) {
this.viewState = 2
this.$refs['divAdd'].showEdit(this.sids[0])
if (this.multipleSelection[0].updateTime === '') {
this.viewState = 2
this.$refs['divAdd'].showEdit(this.sids[0])
} else {
this.$message({ showClose: true, type: 'error', message: '该记录已生成更新日期,无需进行调整操作' })
}
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' })
}

Loading…
Cancel
Save