Browse Source

完善回款返利管理

master
yunuo970428 5 months ago
parent
commit
62b845dc52
  1. 26
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanguanli/collectionrebatemanagementAdd.vue
  2. 26
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanguanli/collectionrebatemanagementInfo.vue
  3. 26
      anrui-scm/anrui-scm-ui/src/views/workFlow/huikuanfanliyutiFlow/relation/huikuanfanliguanliInfo.vue

26
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanguanli/collectionrebatemanagementAdd.vue

@ -118,7 +118,7 @@
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="handleRebate()">明细计算</el-button>
</div>
</div>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :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="vinNo" label="车架号" align="center" />
<el-table-column prop="freight" label="运费" align="center" />
@ -302,6 +302,30 @@ 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 !== 'vinNo') {
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] += ''
}
})
return sums
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')

26
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanguanli/collectionrebatemanagementInfo.vue

@ -117,7 +117,7 @@
</el-col>
</el-row>
<div class="title">车辆回款返利列表</div>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :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="vinNo" label="车架号" align="center" />
<el-table-column prop="freight" label="运费" align="center" />
@ -157,6 +157,30 @@ 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 !== 'vinNo') {
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] += ''
}
})
return sums
},
// ===
handleReturn() {
this.formobj = {}

26
anrui-scm/anrui-scm-ui/src/views/workFlow/huikuanfanliyutiFlow/relation/huikuanfanliguanliInfo.vue

@ -117,7 +117,7 @@
</el-col>
</el-row>
<div class="title">车辆回款返利列表</div>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%">
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :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="vinNo" label="车架号" align="center" />
<el-table-column prop="freight" label="运费" align="center" />
@ -158,6 +158,30 @@ 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 !== 'vinNo') {
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] += ''
}
})
return sums
},
// ===
handleReturn() {
this.$emit('doback')

Loading…
Cancel
Save