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

Merge branch 'ap'

......@@ -34,14 +34,14 @@
"lib-flexible": "^0.3.2",
"mitt": "^3.0.1",
"nprogress": "0.2.0",
"pinia": "2.1.7",
"pinia": "^3.0.4",
"splitpanes": "3.1.5",
"uuid": "^11.0.5",
"vant": "^4.9.18",
"vue": "^3.5.13",
"vue": "^3.5.25",
"vue-count-to": "^1.0.13",
"vue-cropper": "1.1.1",
"vue-router": "4.4.0",
"vue-router": "^4.6.3",
"vue3-count-to": "^1.1.2",
"vuedraggable": "^4.1.0"
},
......
......@@ -27,6 +27,7 @@ export * from './monitor/jobLog'
export * from './monitor/online'
export * from './monitor/server'
export * from './promotion/display_schedule'
export * from './promotion/display_schedule_dashboard'
export * from './promotion/plan'
export * from './promotion/task'
export * from './scm/logistics_receipt'
......
import request from '@/utils/request'
// 查询,店内执行上报-看板
export const getDisplayScheduleDashboardList = (params) => {
return request({
url: '/operation/sales/ap_report/query/dept_cm',
params
})
}
\ No newline at end of file
<template>
<el-scrollbar
ref="scrollContainer"
<el-scrollbar ref="scrollContainer"
:vertical="false"
class="scroll-container"
@wheel.prevent="handleScroll"
>
@wheel.prevent="handleScroll">
<slot />
</el-scrollbar>
</template>
......@@ -91,17 +89,37 @@ defineExpose({
})
</script>
<style lang='scss' scoped>
.scroll-container {
white-space: nowrap;
position: relative;
overflow: hidden;
width: 100%;
:deep(.el-scrollbar__bar) {
bottom: 0px;
}
:deep(.el-scrollbar__wrap) {
height: 39px;
<style lang='scss'
scoped>
.scroll-container {
white-space: nowrap;
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
:deep(.el-scrollbar__bar.is-vertical) {
display: none !important;
/* 完全隐藏垂直滚动条 */
}
:deep(.el-scrollbar__wrap) {
height: 34px !important;
/* 与tags-view-container高度保持一致 */
overflow-y: hidden !important;
/* 明确禁用垂直滚动 */
}
:deep(.el-scrollbar__bar.is-horizontal) {
bottom: 0px;
}
:deep(.el-scrollbar__bar) {
bottom: 0px;
}
:deep(.el-scrollbar__wrap) {
height: 39px;
}
}
}
</style>
\ No newline at end of file
<template>
<!-- 操作类型 -->
<el-row>
<el-form-item>
<el-radio-group v-model="operation"
@change="checkTableColumns">
<el-radio-button label="展示模式"
value="展示模式" />
<el-radio-button label="填报模式"
value="填报模式"
v-if="showFill" />
</el-radio-group>
<!-- 提示文字 -->
<span class="tip-title">请真实,及时,准确填写!</span>
</el-form-item>
<right-toolbar v-model:showSearch="showSearch"
@queryTable="getTableList()"
:columns="chooseColumns"
:showColumnsType="operation === '展示模式' ? 'tree' : 'checkbox'"
:defaultCheckedKeys="visibleProps">
</right-toolbar>
</el-row>
<!-- 数据表格 -->
<el-table :data="tableData"
border
ref="tableRef"
class="auto-fit-header-table"
v-loading="isLoading"
show-overflow-tooltip
:class="{ 'cell-no-padding': operation === '填报模式' }">
<template v-for="col in tableColumns">
<el-table-column v-if="col.visible"
:label="col.label"
:prop="col.prop"
:key="col.prop"
align="center"
class-name="column-style"
:width="col.width"
:fixed="operation === '填报模式' && col.fixed">
<template #header="{ column }">
<!-- 只为特定公式列添加问号图标 -->
<span class="formula-column">
{{ column.label }}
<el-tooltip v-if="col.type === 'formula'"
:content="col.formulaStr"
placement="top">
<el-icon><question-filled /></el-icon>
</el-tooltip>
</span>
</template>
<template #default="{ row }">
<!-- 填报模式 -->
<div v-if="operation === '填报模式'">
<!-- 自定义渲染内容单元格 -->
<div v-if="col.render"
class="cell-style">
<component :is="col.render(h, row, col)" />
</div>
<!-- 公式计算 -->
<div v-else-if="col.type === 'formula'">
{{ col.func(row) }}
</div>
<!-- 其他类型内容 -->
<div v-else>
<!-- 正常显示 -->
<span>{{ row[col.prop] || '-' }}</span>
</div>
</div>
<!-- 展示模式 -->
<div class="show-cell-style"
v-else>{{ formatter(row, col, row[col.prop] || '-') }}</div>
</template>
</el-table-column>
</template>
</el-table>
<!-- 分页 -->
<pagination :total="total"
v-model:page="params.pageNum"
v-model:limit="params.pageSize"
@pagination="getTableList" />
</template>
<script setup>
import { h } from 'vue'
const props = defineProps({
tableColumns: { // 表格列
type: Array,
default: () => []
},
chooseColumns: { // 显隐列数据结构
type: Array,
default: () => []
},
visibleProps: { // 显隐列数据,默认勾选的列
type: Array,
default: () => []
},
tableData: { // 数据源
type: Array,
default: () => []
},
isLoading: { // 表格加载状态
type: Boolean,
default: false
},
total: { // 总条数
type: Number,
default: 0
},
params: { // 分页参数
type: Object,
default: () => ({
pageNum: 1,
pageSize: 10,
})
},
showFill: { // 是否显示填报模式
type: Boolean,
default: false
},
formatter: { // 格式化函数
type: Function,
default: (row, col, cellValue) => cellValue
}
})
const emit = defineEmits(['updateColumns', 'getTableList', 'updateShowSearch'])
/*************** 工具栏 ***************/
// 切换平铺/填报模式
const operation = ref('展示模式');
const tableRef = ref(null)
const checkTableColumns = async () => {
// 通知外面传入 tableColumns / chooseColumns 数据源
await emit('updateColumns', operation.value)
// 强制表格立即应用所有宽度设置,避免先自适应再调整
nextTick(() => {
if (tableRef.value) {
tableRef.value.doLayout()
}
})
}
onMounted(() => {
checkTableColumns()
})
// 控制搜索框显隐
const showSearch = ref(true)
watch(showSearch, (newVal) => {
emit('updateShowSearch', newVal)
})
// 刷新数据
const getTableList = () => {
emit('getTableList')
}
</script>
<style scoped
lang="scss">
/* 工具栏 */
.el-row {
.el-form-item {
.tip-title {
font-size: 32px;
color: red;
margin-left: 50px;
font-weight: 900;
margin-top: -5px;
}
}
}
/* 表格样式 */
.auto-fit-header-table {
height: 100%;
/* 列样式 */
.column-style {
/* 列头样式 */
.formula-column {
display: flex;
justify-content: center;
align-items: center;
.el-icon {
margin-left: 2px;
}
}
/* 单元格样式 */
/* 展示模式单元格(仅展示模式生效) */
.show-cell-style {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cell-style {
>div {
display: flex;
flex-direction: column;
align-items: flex-start;
>span {
text-align: left;
text-indent: 5px;
display: inline-block;
width: 100%;
background-color: #e1e2e6;
border-bottom: 1px solid #ebeef5;
}
}
/* 表格内下拉框 */
.el-select {
width: 100% !important;
padding: 10px;
/* 非 disabled 状态下的背景颜色 */
&.no-disabled {
background-color: var(--el-background-editor-cell);
}
}
.el-input {
padding: 10px;
&.no-disabled {
background-color: var(--el-background-editor-cell);
}
}
.date-picker {
width: 100%;
padding: 10px;
&.no-disabled {
background-color: var(--el-background-editor-cell);
}
::v-deep(.el-input) {
width: 100%;
padding: 0;
}
}
}
}
/* 填报模式-单元格 */
&.cell-no-padding {
/* 无上下内边距 */
::v-deep(.el-table__row) {
.el-table__cell {
padding: 0;
.cell{
padding: 0 !important;
}
}
}
}
}
/* 分页器 */
.pagination-container {
margin: 10px;
}
</style>
\ No newline at end of file
<template>
<div class="search" v-show="showSearch">
<div class="search"
v-show="showSearch">
<el-form :inline="true"
:model="queryParams"
class="demo-form-inline">
......@@ -28,12 +29,24 @@
@input="handleChange"
clearable />
</el-form-item>
<el-form-item label="门店编码/名称" v-if="showStoreSearch">
<el-form-item label="门店编码/名称"
v-if="showStoreSearch">
<el-input v-model="queryParams.storeCN"
placeholder="请输入门店编码/名称"
@input="handleChange"
clearable />
</el-form-item>
<el-form-item label="数据筛选">
<el-select v-model="queryParams.rqStatus"
placeholder="请选择筛选状态"
@change="handleChange"
clearable>
<el-option label="全部"
value="" />
<el-option label="未执行"
value="未执行" />
</el-select>
</el-form-item>
</el-form>
</div>
</template>
......@@ -47,19 +60,17 @@ const props = defineProps({
showStoreSearch: {
type: Boolean,
default: true
},
queryParams: {
type: Object,
default: () => ({})
}
})
const queryParams = reactive({
salesMonth: '',
deptName: '',
dealerCN: '',
lineNameLike: '',
storeCN: ''
})
const emits = defineEmits(['change'])
const handleChange = () => {
emits('change', queryParams)
emits('change')
}
</script>
......
......@@ -45,6 +45,7 @@ const activeName = ref('常规陈列');
const handleClickTabs = (tab) => {
activeName.value = tab.name;
}
</script>
<style scoped
......@@ -70,24 +71,8 @@ const handleClickTabs = (tab) => {
display: flex;
flex-direction: column;
}
.formula-column {
display: flex;
justify-content: center;
align-items: center;
.el-icon {
margin-left: 2px;
}
}
}
}
.el-form-item {
align-items: center;
}
}
}
</style>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论