Browse Source

完善单车返利核对、专项返利核对 -- 待核对列表增加合计功能

master
yunuo970428 4 months ago
parent
commit
f8326cb750
  1. 9
      anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatecheck.js
  2. 11
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js
  3. 41
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatetobechecked.vue
  4. 41
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatetobechecked.vue

9
anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatecheck.js

@ -10,6 +10,15 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
// 单车返利核对(待核对)查询不分页数据
checkApplyGetVehRebateAll: function(data) {
return request({
url: '/scm/v1/scmvehrebate/checkApplyGetVehRebateAll',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 一次导出
excelListOne: function(data) {
return request({

11
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js

@ -1,7 +1,7 @@
import request from '@/utils/request'
export default {
// 单车返利核对(待核对)查询分页列表
// 专项返利核对(待核对)查询分页列表
listPage: function(data) {
return request({
url: '/scm/v1/scmspecialrebate/checkApplyGetSpecialRebate',
@ -10,6 +10,15 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
// 专项返利核对(待核对)查询不分页
checkApplyGetSpecialRebateAll: function(data) {
return request({
url: '/scm/v1/scmspecialrebate/checkApplyGetSpecialRebateAll',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 一次导出
excelListOne: function(data) {
return request({

41
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatetobechecked.vue

@ -57,8 +57,8 @@
</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange" show-summary :summary-method="getSummaries">
<el-table-column fixed type="selection" align="center" width="60"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80"/>
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
@ -84,8 +84,8 @@
<el-table-column prop="manufactorSettlementPrice" label="车辆入库价" align="center" width="140" />
<el-table-column prop="freight" label="其中运费" align="center" width="120" />
<el-table-column prop="createTime" label="创建日期" align="center" width="120" />
<el-table-column prop="rebateName" label="返利名称" align="center" min-width="150" />
<el-table-column prop="rebateTypeValue" label="返利类型" align="center" width="120" />
<el-table-column prop="rebateName" label="返利名称" align="center" min-width="150" />
<el-table-column prop="estimateRebate" label="预计返利" align="center" width="120" />
<el-table-column prop="withholdCost" label="其中预提费用" align="center" width="140" />
<el-table-column prop="palceGenDate" label="所属年月" align="center" width="120" />
@ -410,6 +410,7 @@ export default {
// -----------
tableKey: 0,
list: [],
listAll: [],
sids: [],
FormLoading: false,
state_list: [
@ -549,6 +550,13 @@ export default {
this.listQuery.total = 0
}
})
req.checkApplyGetVehRebateAll(this.listQuery.params).then((res) => {
if (res.success) {
this.listAll = res.data
} else {
this.listAll = []
}
})
},
//
handleFilter() {
@ -783,6 +791,33 @@ export default {
this.uploadData.orgPath = ''
this.getList()
}
},
//
getSummaries(param) {
param.data = this.listAll
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 === 'manufactorSettlementPrice' || column.property === 'freight' || column.property === 'estimateRebate' || column.property === 'expectCost' || column.property === 'uploadMoney' || column.property === 'secondaryUploadMoney' || column.property === 'stayDetermineMoney' || column.property === 'money' || column.property === 'diffAmount' || column.property === 'adjustmentMoney') {
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
}
}
}

41
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatetobechecked.vue

@ -56,8 +56,8 @@
</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange" show-summary :summary-method="getSummaries">
<el-table-column fixed type="selection" align="center" width="60"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80"/>
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
@ -79,8 +79,8 @@
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="120" />
<el-table-column prop="createTime" label="创建日期" align="center" width="120" />
<el-table-column prop="rebateName" label="返利名称" align="center" min-width="150" />
<el-table-column prop="rebateTypeValue" label="返利类型" align="center" width="120" />
<el-table-column prop="rebateName" label="返利名称" align="center" min-width="150" />
<el-table-column prop="estimateRebate" label="预计返利" align="center" width="120" />
<el-table-column prop="withholdCost" label="其中预提费用" align="center" width="140" />
<el-table-column prop="palceGenDate" label="所属年月" align="center" width="120" />
@ -395,6 +395,7 @@ export default {
// -----------
tableKey: 0,
list: [],
listAll: [],
sids: [],
FormLoading: false,
rebateType_list: [],
@ -546,6 +547,13 @@ export default {
this.listQuery.total = 0
}
})
req.checkApplyGetSpecialRebateAll(this.listQuery.params).then((res) => {
if (res.success) {
this.listAll = res.data
} else {
this.listAll = []
}
})
},
//
handleFilter() {
@ -779,6 +787,33 @@ export default {
this.uploadData.orgPath = ''
this.getList()
}
},
//
getSummaries(param) {
param.data = this.listAll
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 === 'estimateRebate' || column.property === 'expectCost' || column.property === 'uploadMoney' || column.property === 'secondaryUploadMoney' || column.property === 'stayDetermineMoney' || column.property === 'money' || column.property === 'diffAmount' || column.property === 'adjustmentMoney') {
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
}
}
}

Loading…
Cancel
Save