|
@@ -42,7 +42,8 @@
|
|
|
<el-table-column prop="saleWeight" label="销量(吨)"></el-table-column>
|
|
|
<el-table-column prop="salesVolume" label="销售额(万元)"></el-table-column>
|
|
|
<el-table-column prop="cost" label="成本(万元)"></el-table-column>
|
|
|
- <el-table-column prop="profit" label="利润(万元)"></el-table-column>
|
|
|
+ <el-table-column prop="profit" label="利润(万元)">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="address" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="inventory(scope.row)" type="primary">库存</el-button>
|
|
@@ -143,6 +144,9 @@
|
|
|
.toPromise()
|
|
|
.then(response => {
|
|
|
this.tableData = response.records
|
|
|
+ for (let q = 0; q < this.tableData.length; q++) {
|
|
|
+ this.tableData[q].profit=this.tableData[q].salesVolume-this.tableData[q].cost
|
|
|
+ }
|
|
|
this.deptBudgetTotal = response.total
|
|
|
})
|
|
|
},
|