|
@@ -89,7 +89,6 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import XLSX from 'xlsx-js-style'
|
|
import XLSX from 'xlsx-js-style'
|
|
// 组件
|
|
// 组件
|
|
-import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
import table0 from './table0'
|
|
import table0 from './table0'
|
|
import table1 from './table1'
|
|
import table1 from './table1'
|
|
@@ -100,7 +99,7 @@ import { salesReportDailyList } from '@/api/reportData.js'
|
|
export default {
|
|
export default {
|
|
name: 'RegionTypeSalesReportList',
|
|
name: 'RegionTypeSalesReportList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { rangeDate, table0, table1, table2, table3 },
|
|
|
|
|
|
+ components: { table0, table1, table2, table3 },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -155,8 +154,6 @@ export default {
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
- this.queryParam.time = []
|
|
|
|
- this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
|
|
this.tableData = []
|
|
this.tableData = []
|
|
},
|
|
},
|
|
exportTable (dom, title) {
|
|
exportTable (dom, title) {
|
|
@@ -176,11 +173,10 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// 表格1
|
|
// 表格1
|
|
- if (this.activeKey == 1) {
|
|
|
|
|
|
+ if (this.activeKey == 1 || this.activeKey == 2) {
|
|
const cols = zim[this.columns.length - 1]
|
|
const cols = zim[this.columns.length - 1]
|
|
Array(this.totalNums).fill().forEach((item, i) => {
|
|
Array(this.totalNums).fill().forEach((item, i) => {
|
|
const a = ws[cols + (i + 2)]
|
|
const a = ws[cols + (i + 2)]
|
|
- console.log(cols + (i + 2))
|
|
|
|
if (a) {
|
|
if (a) {
|
|
a.z = (a.v * 100) + '%' // 设置单元格格式为百分比
|
|
a.z = (a.v * 100) + '%' // 设置单元格格式为百分比
|
|
}
|
|
}
|
|
@@ -209,14 +205,19 @@ export default {
|
|
// 获取表格数据
|
|
// 获取表格数据
|
|
async getTableData () {
|
|
async getTableData () {
|
|
const url = [salesReportDailyList, salesReportDailyList, salesReportDailyList, salesReportDailyList]
|
|
const url = [salesReportDailyList, salesReportDailyList, salesReportDailyList, salesReportDailyList]
|
|
- const reportType = ['DailyPL', 'DailyPL', 'DailyPL', 'DailyPL'][this.activeKey]
|
|
|
|
|
|
+ const reportType = ['DailyPL', 'DailyPL', 'DailyPLJL', 'DailyPL'][this.activeKey]
|
|
const reportDate = this.queryParam.month + '-01 00:00:00'
|
|
const reportDate = this.queryParam.month + '-01 00:00:00'
|
|
this.nowDate = moment().format('DD日HH点mm分')
|
|
this.nowDate = moment().format('DD日HH点mm分')
|
|
this.spinning = true
|
|
this.spinning = true
|
|
const data = await url[this.activeKey]({ reportType, reportDate }).then(res => res.data)
|
|
const data = await url[this.activeKey]({ reportType, reportDate }).then(res => res.data)
|
|
if (data) {
|
|
if (data) {
|
|
this.tableData = data
|
|
this.tableData = data
|
|
- this.columns = this.getColumns()
|
|
|
|
|
|
+ if (this.activeKey == 1) {
|
|
|
|
+ this.columns = this.getColumns()
|
|
|
|
+ }
|
|
|
|
+ if (this.activeKey == 2) {
|
|
|
|
+ this.columns = [1, 2, 3, 4, 5]
|
|
|
|
+ }
|
|
this.spinning = false
|
|
this.spinning = false
|
|
}
|
|
}
|
|
},
|
|
},
|