|
@@ -15,8 +15,7 @@
|
|
|
</Form>
|
|
|
<date-select v-model="params" @change="selectTime"></date-select>
|
|
|
</div>
|
|
|
- <div style="background:#fff;padding:10px;margin-bottom:10px">
|
|
|
-
|
|
|
+ <div style="background:#fff;padding:10px;margin-bottom:10px; position: relative">
|
|
|
<Tabs v-model="salesVolumeCompanyTotalType" @on-click="tabsChange">
|
|
|
<TabPane label="全部" name="1"></TabPane>
|
|
|
<TabPane :label="(h) => {
|
|
@@ -50,6 +49,10 @@
|
|
|
h('span', ')')])
|
|
|
}" name="6"></TabPane>
|
|
|
</Tabs>
|
|
|
+ <span style="position: absolute; top: 10px; line-height: 37px; right: 20px;">
|
|
|
+ 合计:
|
|
|
+ <span style="color: red">{{ getACombined() }}</span>
|
|
|
+ </span>
|
|
|
<div>
|
|
|
<Button style="margin:0 10px 5px 0" :type="params.supplierId == null || params.supplierId =='' ? 'primary' : 'default'" @click="changeCompany(null,0,'')" >全部</Button>
|
|
|
<Button
|
|
@@ -473,6 +476,19 @@ export default {
|
|
|
})
|
|
|
|
|
|
|
|
|
+ },
|
|
|
+ getACombined() {
|
|
|
+ let total = 0
|
|
|
+ if (this.statisticsData && this.statisticsData.length > 0) {
|
|
|
+ for (let i = 0; i < this.statisticsData.length; i++) {
|
|
|
+ if (this.salesVolumeCompanyTotalType == '1' && this.statisticsData[i].total) {
|
|
|
+ total = parseFloat(Number(total) + Number(this.statisticsData[i].total)).toFixed(2)
|
|
|
+ } else if (this.statisticsData[i].type == this.salesVolumeCompanyTotalType && this.statisticsData[i].total) {
|
|
|
+ total = parseFloat(Number(total) + Number(this.statisticsData[i].total)).toFixed(2)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return total
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|