|
|
@ -41,8 +41,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="当月产线品类汇总" >
|
|
|
|
<el-tab-pane label="当月产线品类汇总" >
|
|
|
|
<el-button @click="exportExcel2">导出</el-button>
|
|
|
|
<el-button @click="exportExcel2">导出</el-button>
|
|
|
|
<el-table :data="tableDatas" id="exportTable2" border style="width: 100%" :header-cell-style="getHeaderCellStyle" :summary-method="getSummaries" show-summary>
|
|
|
|
<el-row>
|
|
|
|
<el-table-column prop="category" label="类别" fixed="left" width="150"></el-table-column>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery" :columns="columns"></right-toolbar>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-table :data="tableDatas" id="exportTable2" border style="width: 100%" :header-cell-style="getHeaderCellStyle" :summary-method="getSummaries" show-summary>
|
|
|
|
|
|
|
|
<el-table-column prop="category" v-if="columns[0].visible" label="类别" fixed="left" width="150"></el-table-column>
|
|
|
|
<el-table-column prop="total_monthly_summarys" label="当月汇总" fixed="left" width="150"></el-table-column>
|
|
|
|
<el-table-column prop="total_monthly_summarys" label="当月汇总" fixed="left" width="150"></el-table-column>
|
|
|
|
<el-table-column v-for="day in days" :key="day" :prop="day" :label="`${day.replace('day', '')}`" :width="150" align="center" :formatter="formatNullToZero">
|
|
|
|
<el-table-column v-for="day in days" :key="day" :prop="day" :label="`${day.replace('day', '')}`" :width="150" align="center" :formatter="formatNullToZero">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
@ -79,20 +82,32 @@ export default {
|
|
|
|
legendData: [],
|
|
|
|
legendData: [],
|
|
|
|
seriesData: [],
|
|
|
|
seriesData: [],
|
|
|
|
legendDatas: [],
|
|
|
|
legendDatas: [],
|
|
|
|
seriesDatas: []
|
|
|
|
seriesDatas: [],
|
|
|
|
|
|
|
|
columns: [
|
|
|
|
|
|
|
|
{ key: 0, label: `类别`, visible: false },
|
|
|
|
|
|
|
|
],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
'columns[0].visible'(newVal) {
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
this.$refs.table?.doLayout()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
// Set current month initially
|
|
|
|
// Set current month initially
|
|
|
|
const currentMonth = new Date().toISOString().substr(0, 7);
|
|
|
|
const currentMonth = new Date().toISOString().substr(0, 7);
|
|
|
|
this.queryParams.monthValue = currentMonth;
|
|
|
|
this.queryParams.monthValue = currentMonth;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
|
|
pad(number) {
|
|
|
|
pad(number) {
|
|
|
|
return number.toString().padStart(2, '0');
|
|
|
|
return number.toString().padStart(2, '0');
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -375,6 +390,7 @@ export default {
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
|
|
|
|
.app-container {
|
|
|
|
.app-container {
|
|
|
|
padding: 20px;
|
|
|
|
padding: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|