提交 d8059dd8 authored 作者: lidongxu's avatar lidongxu

Merge branch 'ap' into dev

import request from '@/utils/request'
// 查询,店内执行上报-看板
// 查询,店内执行上报-看板(大区战区)
export const getDisplayScheduleDashboardList = (params) => {
return request({
url: '/operation/sales/ap_report/query/dept_cm',
params
})
}
// 查询,店内执行上报-看板(城市经理)
export const getDisplayScheduleDashboardListArea = (params) => {
return request({
url: '/operation/sales/ap_report/query/store_cm',
params
})
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<!-- 操作类型 -->
<el-row>
<el-form-item>
<el-radio-group v-model="operation">
<el-radio-group v-model="operation" @change="handleChange">
<el-radio-button label="大区战区-分析"
value="大区战区-分析"
v-hasPermi="['promotion:dashboard:list-show']" />
......@@ -69,6 +69,8 @@ const props = defineProps({
}
})
const emit = defineEmits(['getTableList'])
/*************** 工具栏 ***************/
const operation = ref(''); // 切换平铺/填报模式
const tableRef = ref(null)
......@@ -113,6 +115,10 @@ watch(operation, (newVal) => {
immediate: true
})
// 切换操作类型时触发的函数
const handleChange = (newVal) => {
emit('getTableList', newVal)
}
</script>
......
......@@ -21,7 +21,7 @@
<script setup
lang="jsx">
import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api'
import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { getDisplayConfig } from './data.jsx'
import { parseTime } from '@/utils'
......@@ -41,15 +41,20 @@
const total = ref(0)
// 筛选列表数据
const getTableList = async () => {
const getTableList = async (operation) => {
isLoading.value = true
const res = await getDisplayScheduleDashboardList({
const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
})
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false
}
getTableList()
......
......@@ -22,7 +22,7 @@
<script setup
lang="jsx">
import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api'
import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { parseTime } from '@/utils'
import { getSchedulePlanConfig } from './data.jsx'
......@@ -74,15 +74,20 @@
const total = ref(0)
// 筛选列表数据
const getTableList = async () => {
const getTableList = async (operation) => {
isLoading.value = true
const res = await getDisplayScheduleDashboardList({
const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
})
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false
}
getTableList()
......
......@@ -21,7 +21,7 @@
<script setup
lang="jsx">
import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api'
import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { parseTime } from '@/utils'
import { getScheduleDisConfig } from './data'
......@@ -70,15 +70,20 @@
const total = ref(0)
// 筛选列表数据
const getTableList = async () => {
const getTableList = async (operation) => {
isLoading.value = true
const res = await getDisplayScheduleDashboardList({
const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
})
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false
}
getTableList()
......
......@@ -21,7 +21,7 @@
<script setup
lang="jsx">
import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api'
import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { getSixLittleDiamondsConfig } from './data.jsx'
import { parseTime } from '@/utils'
......@@ -70,15 +70,20 @@
const total = ref(0)
// 筛选列表数据
const getTableList = async () => {
const getTableList = async (operation) => {
isLoading.value = true
const res = await getDisplayScheduleDashboardList({
const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
})
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false
}
getTableList()
......
......@@ -21,7 +21,7 @@
<script setup
lang="jsx">
import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api'
import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { parseTime } from '@/utils'
import { getSnackCofing } from './data.jsx';
......@@ -66,15 +66,20 @@
const total = ref(0)
// 筛选列表数据
const getTableList = async () => {
const getTableList = async (operation) => {
isLoading.value = true
const res = await getDisplayScheduleDashboardList({
const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
})
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false
}
getTableList()
......
......@@ -21,7 +21,7 @@
<script setup
lang="jsx">
import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api'
import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { getThreeTwoSecondsConfig } from './data.jsx'
import { parseTime } from '@/utils'
......@@ -72,15 +72,20 @@
const total = ref(0)
// 筛选列表数据
const getTableList = async () => {
const getTableList = async (operation) => {
isLoading.value = true
const res = await getDisplayScheduleDashboardList({
const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
})
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化
const { zq, dq } = res.data
tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false
}
getTableList()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论