|
|
@ -59,8 +59,8 @@ |
|
|
|
<el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" /> |
|
|
|
<el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" /> |
|
|
|
<el-table-column label="明细" align="center" min-width="100"> |
|
|
|
<template> |
|
|
|
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -79,8 +79,8 @@ |
|
|
|
<el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" /> |
|
|
|
<el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" /> |
|
|
|
<el-table-column label="明细" align="center" min-width="100"> |
|
|
|
<template> |
|
|
|
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -298,24 +298,27 @@ export default { |
|
|
|
dataDelete(index) { |
|
|
|
this.formobj.baseVehinstallModpricedetails.splice(index, 1) |
|
|
|
}, |
|
|
|
handleLook() { |
|
|
|
handleLook(row) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divAdd'].showInfo(this.formobj.sid, this.formobj.scmSpecialrebateCheckapplydetailDetails) |
|
|
|
this.$refs['divAdd'].showInfo(row.specialRebateSids) |
|
|
|
}, |
|
|
|
backAdd(val) { |
|
|
|
this.viewState = 1 |
|
|
|
// 先将数据清空 |
|
|
|
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = [] |
|
|
|
this.formobj.scmLastSpecialrebateCheckapplydetailDetails = [] |
|
|
|
this.formobj.scmSpecialrebateCheckapplydetailDetails = [] |
|
|
|
var list = JSON.parse(JSON.stringify(val)) |
|
|
|
// 同一数据源 |
|
|
|
list.forEach((e) => { |
|
|
|
this.formobj.scmSpecialrebateCheckapplydetailDetails.push(e) |
|
|
|
}) |
|
|
|
for (var n = 0; n < list.length; n++) { |
|
|
|
for (var m = 0; m < this.formobj.scmSpecialrebateCheckapplydetailDetails.length; m++) { |
|
|
|
if (list[n] === this.formobj.scmSpecialrebateCheckapplydetailDetails[m].sid) { |
|
|
|
this.formobj.scmSpecialrebateCheckapplydetailDetails.splice(this.formobj.scmSpecialrebateCheckapplydetailDetails[m], 1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 将同一数据源进行拆分(1.按照返利类型统计 2.按照预提年月统计) |
|
|
|
// 按照返利类型统计 |
|
|
|
list.forEach((e) => { |
|
|
|
this.formobj.scmSpecialrebateCheckapplydetailDetails.forEach((e) => { |
|
|
|
let v = 0 |
|
|
|
for (var i in this.formobj.scmWhenSpecialrebateCheckapplydetailDetails) { |
|
|
|
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].rebateTypeValue === e.rebateTypeValue && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].purchaseSystemName === e.purchaseSystemName && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].brandName === e.brandName) { |
|
|
@ -357,7 +360,7 @@ export default { |
|
|
|
}) |
|
|
|
let k = 0 |
|
|
|
// 按照预提年月统计 |
|
|
|
list.forEach((s) => { |
|
|
|
this.formobj.scmSpecialrebateCheckapplydetailDetails.forEach((s) => { |
|
|
|
for (var l in this.formobj.scmLastSpecialrebateCheckapplydetailDetails) { |
|
|
|
if (this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingDate === s.withholdingDate && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].purchaseSystemName === s.purchaseSystemName && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].brandName === s.brandName) { |
|
|
|
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num = parseFloat(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num) + parseFloat(1) |
|
|
@ -445,7 +448,7 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
const values = data.map(item => Number(item[column.property])) |
|
|
|
if (!values.every(value => isNaN(value))) { |
|
|
|
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) { |
|
|
|
sums[index] = values.reduce((prev, curr) => { |
|
|
|
const value = Number(curr) |
|
|
|
if (!isNaN(value)) { |
|
|
@ -455,8 +458,6 @@ export default { |
|
|
|
} |
|
|
|
}, 0) |
|
|
|
sums[index] += '' |
|
|
|
} else { |
|
|
|
sums[index] = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
return sums |
|
|
|