Prechádzať zdrojové kódy

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 2 rokov pred
rodič
commit
2edbadbc66

+ 1 - 1
src/views/home/index.vue

@@ -129,7 +129,7 @@ export default {
   methods: {
     //中国地图
     china_map() {
-      debugger
+      // debugger
       let mapChart = this.$echarts.init(document.getElementById('china-map')); //图表初始化,china-map是绑定的元素
       window.onresize = mapChart.resize; //如果容器变大小,自适应从新构图
       let series = []; //存放循环配置项

+ 5 - 1
src/views/profitable/warehouseprofitsdetails.vue

@@ -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
           })
       },