提交 5a695695 authored 作者: lidongxu's avatar lidongxu

feat(promotion/display_schedule/): 新增:AP 计划上报_增加搜索功能

上级 c60735d9
......@@ -117,7 +117,7 @@ const props = defineProps({
})
}
})
const emit = defineEmits(['updateColumns', 'getTableList'])
const emit = defineEmits(['updateColumns', 'getTableList', 'updateShowSearch'])
// 右上角工具
const showSearch = ref(true)
......@@ -143,6 +143,10 @@ const getTableList = () => {
emit('getTableList')
}
watch(showSearch, (newVal) => {
emit('updateShowSearch', newVal)
})
</script>
<style scoped
......@@ -208,8 +212,6 @@ const getTableList = () => {
}
}
::v-deep(.column-style) {
.cell {
......
<template>
<div class="search" v-show="showSearch">
<el-form :inline="true"
:model="queryParams"
class="demo-form-inline">
<el-form-item label="计划月份">
<el-date-picker v-model="queryParams.salesMonth"
type="month"
placeholder="选择计划月份"
@change="handleChange"
clearable />
</el-form-item>
<el-form-item label="大区/战区">
<el-input v-model="queryParams.deptName"
placeholder="请输入大区/战区"
@input="handleChange"
clearable />
</el-form-item>
<el-form-item label="经销商编码/名称">
<el-input v-model="queryParams.dealerCN"
placeholder="请输入经销商编码/名称"
@input="handleChange"
clearable />
</el-form-item>
<el-form-item label="系统名称">
<el-input v-model="queryParams.lineNameLike"
placeholder="请输入系统名称"
@input="handleChange"
clearable />
</el-form-item>
<el-form-item label="门店编码/名称">
<el-input v-model="queryParams.storeCN"
placeholder="请输入门店编码/名称"
@input="handleChange"
clearable />
</el-form-item>
</el-form>
</div>
</template>
<script setup>
const props = defineProps({
showSearch: {
type: Boolean,
default: true
}
})
const queryParams = reactive({
salesMonth: '',
deptName: '',
dealerCN: '',
lineNameLike: '',
storeCN: ''
})
const emits = defineEmits(['change'])
const handleChange = () => {
emits('change', queryParams)
}
</script>
<style scoped
lang="scss"></style>
\ No newline at end of file
<template>
<!-- 常规陈列 -->
<SearchList :showSearch="showSearch"
@change="searchChange" />
<CommonPlan :tableData="tableData"
:isLoading="isLoading"
:total="total"
......@@ -8,12 +10,14 @@
:visibleProps="visibleProps"
:params="params"
@updateColumns="updateColumns"
@getTableList="getTableList" />
@getTableList="getTableList"
@updateShowSearch="updateShowSearch" />
</template>
<script setup
lang="jsx">
import CommonPlan from '@/views/promotion/components/CommonPlan'
import SearchList from '@/views/promotion/components/SearchList'
import { getDisplayList, submitDisplayPlan } from '@/api'
import { parseTime } from '@/utils'
import { onMounted } from 'vue';
......@@ -557,7 +561,7 @@
{
label: "计划主题地堆-是否",
prop: "plannedThemedFloorStack",
visible: false,
visible: true,
type: 'string',
fill: true,
width: 140
......@@ -980,7 +984,7 @@
// 表格数据
const tableData = ref([])
const isLoading = ref(true)
const params = reactive({
let params = reactive({
pageNum: 1,
pageSize: 20,
})
......@@ -1001,7 +1005,7 @@
item.closingDate = parseTime(item.closingDate, '{y}-{m}-{d}')
// 修改时间
item.updateTime = parseTime(item.updateTime, '{y}-{m}-{d} {h}:{i}:{s}')
// 动态新增列:门店名称+门店编码+经销山名称(填报模式下,合并到一起)
item.storeNameCodeDealerName = item.storeName + '\n(' + item.storeCode + ')' + '\n(' + item.dealerName + ')'
})
......@@ -1010,6 +1014,20 @@
isLoading.value = false
}
getTableList()
const showSearch = ref(true)
const updateShowSearch = (newVal) => {
showSearch.value = newVal
}
const searchChange = (newVal) => {
// 计划月份
if (newVal.salesMonth) {
newVal.salesMonth = parseTime(newVal.salesMonth, '{y}-{m}-{d}')
}
params = { ...params, ...newVal }
getTableList()
}
</script>
<style scoped
......
<template>
<!-- 档期计划 -->
<SearchList :showSearch="showSearch" @change="searchChange"/>
<CommonPlan :tableData="tableData"
:isLoading="isLoading"
:total="total"
......@@ -8,12 +9,14 @@
:visibleProps="visibleProps"
:params="params"
@updateColumns="updateColumns"
@getTableList="getTableList" />
@getTableList="getTableList"
@updateShowSearch="updateShowSearch" />
</template>
<script setup
lang="jsx">
import CommonPlan from '@/views/promotion/components/CommonPlan'
import SearchList from '@/views/promotion/components/SearchList'
import { getDisplayScheduleList, submitDisplaySchedulePlan } from '@/api'
import { parseTime } from '@/utils'
......@@ -1071,7 +1074,7 @@
// 表格数据
const tableData = ref([])
const isLoading = ref(true)
const params = reactive({
let params = reactive({
pageNum: 1,
pageSize: 20,
})
......@@ -1130,6 +1133,20 @@
// 当内容宽度大于元素宽度时,表示内容溢出
return width > col.width;
};
const showSearch = ref(true)
const updateShowSearch = (newVal) => {
showSearch.value = newVal
}
const searchChange = (newVal) => {
// 计划月份
if (newVal.salesMonth) {
newVal.salesMonth = parseTime(newVal.salesMonth, '{y}-{m}-{d}')
}
params = { ...params, ...newVal }
getTableList()
}
</script>
<style scoped
......
<template>
<!-- 档期陈列 -->
<SearchList :showSearch="showSearch" @change="searchChange"/>
<CommonPlan :tableData="tableData"
:isLoading="isLoading"
:total="total"
......@@ -8,12 +9,14 @@
:visibleProps="visibleProps"
:params="params"
@updateColumns="updateColumns"
@getTableList="getTableList" />
@getTableList="getTableList"
@updateShowSearch="updateShowSearch" />
</template>
<script setup
lang="jsx">
import CommonPlan from '@/views/promotion/components/CommonPlan'
import SearchList from '@/views/promotion/components/SearchList'
import { getDisplayScheduleDetail, submitDisplayScheduleDetail } from '@/api'
import { parseTime } from '@/utils'
import { onMounted } from 'vue';
......@@ -775,7 +778,7 @@
// 表格数据
const tableData = ref([])
const isLoading = ref(true)
const params = reactive({
let params = reactive({
pageNum: 1,
pageSize: 20,
})
......@@ -814,6 +817,20 @@
isLoading.value = false
}
getTableList()
const showSearch = ref(true)
const updateShowSearch = (newVal) => {
showSearch.value = newVal
}
const searchChange = (newVal) => {
// 计划月份
if (newVal.salesMonth) {
newVal.salesMonth = parseTime(newVal.salesMonth, '{y}-{m}-{d}')
}
params = { ...params, ...newVal }
getTableList()
}
</script>
<style scoped
......
<template>
<!-- 零食陈列 -->
<SearchList :showSearch="showSearch" @change="searchChange"/>
<CommonPlan :tableData="tableData"
:isLoading="isLoading"
:total="total"
......@@ -8,12 +9,14 @@
:visibleProps="visibleProps"
:params="params"
@updateColumns="updateColumns"
@getTableList="getTableList" />
@getTableList="getTableList"
@updateShowSearch="updateShowSearch" />
</template>
<script setup
lang="jsx">
import CommonPlan from '@/views/promotion/components/CommonPlan'
import SearchList from '@/views/promotion/components/SearchList'
import { getSnackPlanList, submitSnackPlan } from '@/api'
import { parseTime } from '@/utils'
import { onMounted } from 'vue';
......@@ -548,7 +551,7 @@
// 表格数据
const tableData = ref([])
const isLoading = ref(true)
const params = reactive({
let params = reactive({
pageNum: 1,
pageSize: 20,
})
......@@ -597,6 +600,20 @@
// 当内容宽度大于元素宽度时,表示内容溢出
return width > col.width;
};
const showSearch = ref(true)
const updateShowSearch = (newVal) => {
showSearch.value = newVal
}
const searchChange = (newVal) => {
// 计划月份
if (newVal.salesMonth) {
newVal.salesMonth = parseTime(newVal.salesMonth, '{y}-{m}-{d}')
}
params = { ...params, ...newVal }
getTableList()
}
</script>
<style scoped
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论