Browse Source

完善划扣申请 -- 新增、编辑、详情页面列表增加合计功能

master
yunuo970428 2 months ago
parent
commit
ac5089a32d
  1. 28
      anrui-riskcenter-ui/src/views/deduct/deductAdd.vue
  2. 28
      anrui-riskcenter-ui/src/views/deduct/deductInfo.vue
  3. 28
      anrui-riskcenter-ui/src/views/workFlow/huakouFlow/deductDaiBan.vue
  4. 28
      anrui-riskcenter-ui/src/views/workFlow/huakouFlow/deductEdit.vue
  5. 28
      anrui-riskcenter-ui/src/views/workFlow/huakouFlow/deductYiBan.vue

28
anrui-riskcenter-ui/src/views/deduct/deductAdd.vue

@ -47,7 +47,7 @@
<div class="title">
<div>当月还款记录</div>
</div>
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120"/>
@ -168,6 +168,32 @@ export default {
}
})
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {

28
anrui-riskcenter-ui/src/views/deduct/deductInfo.vue

@ -46,7 +46,7 @@
<div class="title">
<div>当月还款记录</div>
</div>
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120"/>
@ -143,6 +143,32 @@ export default {
}
}).catch(() => {})
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {

28
anrui-riskcenter-ui/src/views/workFlow/huakouFlow/deductDaiBan.vue

@ -48,7 +48,7 @@
<div class="title">
<div>当月还款记录</div>
</div>
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120"/>
@ -226,6 +226,32 @@ export default {
}
})
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
//
openCountersign(val) {
this.operation = val

28
anrui-riskcenter-ui/src/views/workFlow/huakouFlow/deductEdit.vue

@ -46,7 +46,7 @@
<div class="title">
<div>当月还款记录</div>
</div>
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120"/>
@ -181,6 +181,32 @@ export default {
})
}
})
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
}
}
}

28
anrui-riskcenter-ui/src/views/workFlow/huakouFlow/deductYiBan.vue

@ -46,7 +46,7 @@
<div class="title">
<div>当月还款记录</div>
</div>
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120"/>
@ -151,6 +151,32 @@ export default {
}
})
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {

Loading…
Cancel
Save