提交 17bde5e6 authored 作者: lidongxu's avatar lidongxu

Merge branch 'ap' into dev

...@@ -158,3 +158,13 @@ export function submitSixLittleDiamondsPlan(data) { ...@@ -158,3 +158,13 @@ export function submitSixLittleDiamondsPlan(data) {
} }
}); });
} }
// 下载表格
export function downloadDisplayScheduleTable(params) {
return request({
url: '/operation/sales/export/download',
params,
responseType: 'blob'
})
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<van-nav-bar fixed <van-nav-bar fixed
left-arrow left-arrow
@click-left="router.back()" @click-left="router.back()"
title="店内执行上报浏览" /> title="店内执行上报看板" />
<el-tabs v-model="activeName" <el-tabs v-model="activeName"
class="demo-tabs" class="demo-tabs"
@tab-click="handleClickTabs"> @tab-click="handleClickTabs">
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
:class="{ 'cell-no-padding': operation === '填报模式' }" :class="{ 'cell-no-padding': operation === '填报模式' }"
:row-style="tableRowStyle"> :row-style="tableRowStyle">
<template v-for="col in tableColumns"> <template v-for="col in tableColumns">
<el-table-column v-if="col.visible" <el-table-column v-if="col.fill"
:label="col.label" :label="col.label"
:prop="col.prop" :prop="col.prop"
:key="col.prop" :key="col.prop"
......
...@@ -64,7 +64,7 @@ const handleClickRight = () => { ...@@ -64,7 +64,7 @@ const handleClickRight = () => {
const params = ref({ const params = ref({
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 20,
salesMonth: new Date(), salesMonth: new Date(),
deptName: '', deptName: '',
dealerCN: '', dealerCN: '',
......
...@@ -29,6 +29,22 @@ ...@@ -29,6 +29,22 @@
icon="Rank" icon="Rank"
@click="openTableDialog" /> @click="openTableDialog" />
</el-tooltip> </el-tooltip>
<el-tooltip class="item"
effect="dark"
content="下载表格"
placement="top">
<el-button @click="downloadTable" type="primary">
下载表格
</el-button>
</el-tooltip>
<el-tooltip class="item"
effect="dark"
content="上传表格"
placement="top">
<el-button @click="openTableDialog" type="success">
上传表格
</el-button>
</el-tooltip>
</template> </template>
</right-toolbar> </right-toolbar>
</el-row> </el-row>
...@@ -114,6 +130,8 @@ ...@@ -114,6 +130,8 @@
<script setup> <script setup>
import { h } from 'vue' import { h } from 'vue'
import userStore from '@/store/modules/user' import userStore from '@/store/modules/user'
const props = defineProps({ const props = defineProps({
tableData: { // 数据源 tableData: { // 数据源
type: Array, type: Array,
...@@ -143,7 +161,7 @@ const props = defineProps({ ...@@ -143,7 +161,7 @@ const props = defineProps({
default: (row, col, cellValue) => cellValue default: (row, col, cellValue) => cellValue
} }
}) })
const emit = defineEmits(['getTableList', 'updateShowSearch']) const emit = defineEmits(['getTableList', 'updateShowSearch', 'downloadTable'])
/*************** 工具栏 ***************/ /*************** 工具栏 ***************/
const showFill = userStore().hasQcMarketEmpInfo // 是否启用填报模式 const showFill = userStore().hasQcMarketEmpInfo // 是否启用填报模式
...@@ -208,6 +226,11 @@ const getTableList = () => { ...@@ -208,6 +226,11 @@ const getTableList = () => {
emit('getTableList') emit('getTableList')
} }
// 下载表格
const downloadTable = () => {
emit('downloadTable')
}
/************** 弹框控制 ***************/ /************** 弹框控制 ***************/
// 控制表格弹框显隐 // 控制表格弹框显隐
const tableContainer = ref(null) // 原始表格容器引用 const tableContainer = ref(null) // 原始表格容器引用
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
:params="params" :params="params"
:isLoading="isLoading" :isLoading="isLoading"
@getTableList="getTableList" @getTableList="getTableList"
@downloadTable="downloadTable"
@updateShowSearch="v => showSearch.value = v" /> @updateShowSearch="v => showSearch.value = v" />
</template> </template>
...@@ -16,9 +17,10 @@ ...@@ -16,9 +17,10 @@
lang="jsx"> lang="jsx">
import CustomTable from '../components/Table' import CustomTable from '../components/Table'
import SearchList from '../components/SearchList' import SearchList from '../components/SearchList'
import { getDisplayList, submitDisplayPlan } from '@/api' import { getDisplayList, submitDisplayPlan, downloadDisplayScheduleTable } from '@/api'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { getDisplayConfig } from './data.jsx' import { getDisplayConfig } from './data.jsx'
import { saveAs } from 'file-saver'
/*************** 表格操作相关 ***************/ /*************** 表格操作相关 ***************/
...@@ -111,6 +113,15 @@ ...@@ -111,6 +113,15 @@
/*************** 筛选 ***************/ /*************** 筛选 ***************/
const showSearch = ref(true) const showSearch = ref(true)
/*************** 下载表格 ***************/
const downloadTable = async () => {
const res = await downloadDisplayScheduleTable({
...params.value,
pageType: 'NORMAL_DISPLAY_EXPORT'
})
saveAs(res, '陈列计划.xlsx')
}
</script> </script>
<style lang="scss"> <style lang="scss">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论