提交 130c9e8b authored 作者: lidongxu's avatar lidongxu

Merge branch 'release' into dev

...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<script setup> <script setup>
import Display from './tabs/display.vue' import Display from './tabs/display.vue'
import Schedule from './tabs/schedule.vue' import Schedule from './tabs/schedule.vue'
const activeName = ref('档期计划'); const activeName = ref('陈列计划');
const handleClickTabs = (tab) => { const handleClickTabs = (tab) => {
activeName.value = tab.name; activeName.value = tab.name;
} }
......
<template> <template>
<el-row> <el-row>
<el-form-item label="操作类型"> <el-form-item>
<el-radio-group v-model="operation" <el-radio-group v-model="operation"
@change="checkTableColumns"> @change="checkTableColumns">
<el-radio-button label="全部列" <el-radio-button label="平铺模式"
value="全部列" /> value="平铺模式" />
<el-radio-button label="填报" <el-radio-button label="填报模式"
value="填报" /> value="填报模式" />
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<right-toolbar v-model:showSearch="showSearch" <right-toolbar v-model:showSearch="showSearch"
@queryTable="getTableList()" @queryTable="getTableList()"
:columns="chooseColumns" :columns="chooseColumns"
:showColumnsType="operation === '全部列' ? 'tree' : 'checkbox'" :showColumnsType="operation === '平铺模式' ? 'tree' : 'checkbox'"
:defaultCheckedKeys="visibleProps"> :defaultCheckedKeys="visibleProps">
</right-toolbar> </right-toolbar>
</el-row> </el-row>
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
align="center" align="center"
:show-overflow-tooltip="col.type === 'string'" :show-overflow-tooltip="col.type === 'string'"
class-name="column-style" class-name="column-style"
:width="getColumnMinWidth(col)"> :width="getColumnMinWidth(col)"
:fixed="operation === '填报模式' && col.fixed">
<template #header="{ column }"> <template #header="{ column }">
<!-- 只为特定列添加问号图标 --> <!-- 只为特定列添加问号图标 -->
<span class="formula-column"> <span class="formula-column">
...@@ -46,10 +47,10 @@ ...@@ -46,10 +47,10 @@
class="cell-style"> class="cell-style">
<!-- 实际主货架-数量(要根据实际主货架-形式不为空时才可以选择否则为 0) --> <!-- 实际主货架-数量(要根据实际主货架-形式不为空时才可以选择否则为 0) -->
<div v-if="col.prop === 'actualMainShelfQty'"> <div v-if="col.prop === 'actualMainShelfQty'">
<span>{{ row[col.referenceKey] }}</span> <span>{{ row[col.referenceKey] || '-' }}</span>
<el-select :disabled="!row.actualMainShelfType" <el-select :disabled="!row.actualMainShelfType"
v-model="row[col.prop]" v-model="row[col.prop]"
placeholder="请选择" placeholder=""
clearable clearable
@change="submitChange(row, col)"> @change="submitChange(row, col)">
<el-option v-for="item in col.options" <el-option v-for="item in col.options"
...@@ -59,9 +60,9 @@ ...@@ -59,9 +60,9 @@
</el-select> </el-select>
</div> </div>
<div v-else> <div v-else>
<span>{{ row[col.referenceKey] }}</span> <span>{{ row[col.referenceKey] || '-' }}</span>
<el-select v-model="row[col.prop]" <el-select v-model="row[col.prop]"
placeholder="请选择" placeholder=""
clearable clearable
@change="submitChange(row, col)"> @change="submitChange(row, col)">
<el-option v-for="item in col.options" <el-option v-for="item in col.options"
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
<!-- 输入框 --> <!-- 输入框 -->
<div v-else-if="col.type === 'input'"> <div v-else-if="col.type === 'input'">
<el-input v-model="row[col.prop]" <el-input v-model="row[col.prop]"
placeholder="请输入" placeholder=""
@input="submitChange(row, col)" /> @input="submitChange(row, col)" />
</div> </div>
<!-- 为其他类型或未定义类型提供默认显示 --> <!-- 为其他类型或未定义类型提供默认显示 -->
...@@ -105,9 +106,9 @@ import { parseTime } from '@/utils' ...@@ -105,9 +106,9 @@ import { parseTime } from '@/utils'
import { onMounted } from 'vue'; import { onMounted } from 'vue';
/*************** 操作类型 ***************/ /*************** 操作类型 ***************/
const operation = ref('全部列'); const operation = ref('平铺模式');
const tableRef = ref(null) const tableRef = ref(null)
// 全部列 // 平铺模式
const baseColumns = ref([ const baseColumns = ref([
{ {
label: "基础信息", label: "基础信息",
...@@ -117,19 +118,20 @@ const baseColumns = ref([ ...@@ -117,19 +118,20 @@ const baseColumns = ref([
{ label: "经销商-省份", prop: "dealerProvince", visible: true, type: 'string', fill: false }, { label: "经销商-省份", prop: "dealerProvince", visible: true, type: 'string', fill: false },
{ label: "经销商-城市", prop: "dealerCity", visible: true, type: 'string', fill: false }, { label: "经销商-城市", prop: "dealerCity", visible: true, type: 'string', fill: false },
{ label: "经销商-代码", prop: "dealerCode", visible: true, type: 'string', fill: false }, { label: "经销商-代码", prop: "dealerCode", visible: true, type: 'string', fill: false },
{ label: "经销商名称", prop: "dealerName", visible: true, type: 'string', fill: false },
{ label: "经销商-类型", prop: "dealerType", visible: true, type: 'string', fill: false }, { label: "经销商-类型", prop: "dealerType", visible: true, type: 'string', fill: false },
{ label: "开户日期", prop: "openingDate", visible: true, type: 'string', fill: false }, { label: "开户日期", prop: "openingDate", visible: true, type: 'string', fill: false },
{ label: "闭户日期", prop: "closingDate", visible: true, type: 'string', fill: false }, { label: "闭户日期", prop: "closingDate", visible: true, type: 'string', fill: false },
{ label: "大区总监", prop: "regionManager", visible: true, type: 'string', fill: false }, { label: "大区总监", prop: "regionManager", visible: true, type: 'string', fill: false },
{ label: "战区经理", prop: "districtManager", visible: true, type: 'string', fill: false }, { label: "战区经理", prop: "districtManager", visible: true, type: 'string', fill: false },
{ label: "城市经理", prop: "cityManager", visible: true, type: 'string', fill: false }, { label: "城市经理", prop: "cityManager", visible: true, type: 'string', fill: false },
{ label: "门店编码", prop: "storeCode", visible: true, type: 'string', fill: true }, { label: "门店名称", prop: "storeName", visible: true, type: 'string', fill: true, fixed: 'left' },
{ label: "门店名称", prop: "storeName", visible: true, type: 'string', fill: true }, { label: "门店编码", prop: "storeCode", visible: true, type: 'string', fill: true, fixed: 'left' },
{ label: "经销商名称", prop: "dealerName", visible: true, type: 'string', fill: true, fixed: 'left' },
{ label: "系统类型", prop: "lineType", visible: true, type: 'string', fill: true, fixed: 'left' },
{ label: "门店-省份", prop: "storeProvince", visible: true, type: 'string', fill: false }, { label: "门店-省份", prop: "storeProvince", visible: true, type: 'string', fill: false },
{ label: "门店-城市", prop: "storeCity", visible: true, type: 'string', fill: false }, { label: "门店-城市", prop: "storeCity", visible: true, type: 'string', fill: false },
{ label: "系统名称", prop: "lineName", visible: true, type: 'string', fill: true }, { label: "系统名称", prop: "lineName", visible: true, type: 'string', fill: true },
{ label: "系统类型", prop: "lineType", visible: true, type: 'string', fill: false },
{ label: "渠道大类", prop: "channelDl", visible: true, type: 'string', fill: false }, { label: "渠道大类", prop: "channelDl", visible: true, type: 'string', fill: false },
{ label: "渠道小类", prop: "channelXl", visible: true, type: 'string', fill: false }, { label: "渠道小类", prop: "channelXl", visible: true, type: 'string', fill: false },
{ label: "门店类型", prop: "storeType", visible: true, type: 'string', fill: false }, { label: "门店类型", prop: "storeType", visible: true, type: 'string', fill: false },
...@@ -391,7 +393,7 @@ const tableColumns = ref([]) ...@@ -391,7 +393,7 @@ const tableColumns = ref([])
const chooseColumns = ref([]) const chooseColumns = ref([])
// 计算列具体数据 // 计算列具体数据
const checkTableColumns = () => { const checkTableColumns = () => {
if (operation.value === '全部列') { if (operation.value === '平铺模式') {
chooseColumns.value = baseColumns.value chooseColumns.value = baseColumns.value
tableColumns.value = baseColumns.value.flatMap(item => { tableColumns.value = baseColumns.value.flatMap(item => {
if (item.children) { if (item.children) {
...@@ -399,7 +401,7 @@ const checkTableColumns = () => { ...@@ -399,7 +401,7 @@ const checkTableColumns = () => {
} }
return []; return [];
}); });
} else if (operation.value === '填报') { } else if (operation.value === '填报模式') {
chooseColumns.value = baseColumns.value.flatMap(item => { chooseColumns.value = baseColumns.value.flatMap(item => {
if (item.children) { if (item.children) {
return item.children return item.children
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
<el-form-item label="操作类型"> <el-form-item label="操作类型">
<el-radio-group v-model="operation" <el-radio-group v-model="operation"
@change="checkTableColumns"> @change="checkTableColumns">
<el-radio-button label="全部列" <el-radio-button label="平铺模式"
value="全部列" /> value="平铺模式" />
<el-radio-button label="填报" <el-radio-button label="填报模式"
value="填报" /> value="填报模式" />
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<right-toolbar v-model:showSearch="showSearch" <right-toolbar v-model:showSearch="showSearch"
@queryTable="getTableList()" @queryTable="getTableList()"
:columns="chooseColumns" :columns="chooseColumns"
:showColumnsType="operation === '全部列' ? 'tree' : 'checkbox'" :showColumnsType="operation === '平铺模式' ? 'tree' : 'checkbox'"
:defaultCheckedKeys="visibleProps"> :defaultCheckedKeys="visibleProps">
</right-toolbar> </right-toolbar>
</el-row> </el-row>
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
align="center" align="center"
:show-overflow-tooltip="col.type === 'string'" :show-overflow-tooltip="col.type === 'string'"
class-name="column-style" class-name="column-style"
:width="getColumnMinWidth(col)"> :width="getColumnMinWidth(col)"
:fixed="operation === '填报模式' && col.fixed">
<template #header="{ column }"> <template #header="{ column }">
<!-- 只为特定列添加问号图标 --> <!-- 只为特定列添加问号图标 -->
<span class="formula-column"> <span class="formula-column">
...@@ -49,10 +50,10 @@ ...@@ -49,10 +50,10 @@
:content="row[col.referenceKey]" :content="row[col.referenceKey]"
placement="top-start" placement="top-start"
:disabled="!isContentOverflow(col.referenceKey, row[col.referenceKey])"> :disabled="!isContentOverflow(col.referenceKey, row[col.referenceKey])">
<span class="ellipsis-tooltip">{{ row[col.referenceKey] }}</span> <span class="ellipsis-tooltip">{{ row[col.referenceKey] || '-' }}</span>
</el-tooltip> </el-tooltip>
<el-select v-model="row[col.prop]" <el-select v-model="row[col.prop]"
placeholder="请选择" placeholder=""
clearable clearable
@change="submitChange(row, col)"> @change="submitChange(row, col)">
<el-option v-for="item in col.options" <el-option v-for="item in col.options"
...@@ -74,10 +75,10 @@ ...@@ -74,10 +75,10 @@
:content="row[col.referenceKey]" :content="row[col.referenceKey]"
placement="top-start" placement="top-start"
:disabled="!isContentOverflow(col.referenceKey, row[col.referenceKey])"> :disabled="!isContentOverflow(col.referenceKey, row[col.referenceKey])">
<span class="ellipsis-tooltip">{{ row[col.referenceKey] }}</span> <span class="ellipsis-tooltip">{{ row[col.referenceKey] || '-' }}</span>
</el-tooltip> </el-tooltip>
<el-input v-model="row[col.prop]" <el-input v-model="row[col.prop]"
placeholder="请输入" placeholder=""
:type="col.format === 'number' ? 'number' : 'text'" :type="col.format === 'number' ? 'number' : 'text'"
@input="submitChange(row, col)" /> @input="submitChange(row, col)" />
</div> </div>
...@@ -86,19 +87,13 @@ ...@@ -86,19 +87,13 @@
<div v-else-if="col.type === 'date'" <div v-else-if="col.type === 'date'"
class="cell-style"> class="cell-style">
<div> <div>
<el-tooltip effect="dark" <span class="ellipsis-tooltip">{{ row[col.referenceKey] || '-' }}</span>
:content="row[col.referenceKey]"
placement="top-start"
:disabled="!isContentOverflow(col.referenceKey, row[col.referenceKey])">
<span class="ellipsis-tooltip">{{ row[col.referenceKey] }}</span>
</el-tooltip>
<div class="date-picker"> <div class="date-picker">
<el-date-picker v-model="row[col.prop]" <el-date-picker v-model="row[col.prop]"
type="date" type="date"
:format="col.format" :format="col.format"
placeholder="请选择日期" placeholder=""
@change="submitChange(row, col)" @change="submitChange(row, col)" />
/>
</div> </div>
</div> </div>
...@@ -126,9 +121,9 @@ import { getDisplayScheduleList, submitDisplaySchedulePlan } from '@/api' ...@@ -126,9 +121,9 @@ import { getDisplayScheduleList, submitDisplaySchedulePlan } from '@/api'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
/*************** 操作类型 ***************/ /*************** 操作类型 ***************/
const operation = ref('全部列'); const operation = ref('平铺模式');
const tableRef = ref(null) const tableRef = ref(null)
// 全部列 // 平铺模式
const baseColumns = ref([ const baseColumns = ref([
{ {
label: "基础信息", label: "基础信息",
...@@ -138,14 +133,14 @@ const baseColumns = ref([ ...@@ -138,14 +133,14 @@ const baseColumns = ref([
{ "label": "经销商-省份", "prop": "dealerProvince", visible: true, type: "string", fill: false }, { "label": "经销商-省份", "prop": "dealerProvince", visible: true, type: "string", fill: false },
{ "label": "经销商-城市", "prop": "dealerCity", visible: true, type: "string", fill: false }, { "label": "经销商-城市", "prop": "dealerCity", visible: true, type: "string", fill: false },
{ "label": "经销商-代码", "prop": "dealerCode", visible: true, type: "string", fill: false }, { "label": "经销商-代码", "prop": "dealerCode", visible: true, type: "string", fill: false },
{ "label": "经销商名称", "prop": "dealerName", visible: true, type: "string", fill: false }, { "label": "经销商名称", "prop": "dealerName", visible: true, type: "string", fill: true, fixed: 'left' },
{ "label": "经销商类型", "prop": "dealerType", visible: true, type: "string", fill: false }, { "label": "经销商类型", "prop": "dealerType", visible: true, type: "string", fill: false },
{ "label": "开户日期", "prop": "openingDate", visible: true, type: "string", fill: false }, { "label": "开户日期", "prop": "openingDate", visible: true, type: "string", fill: false },
{ "label": "闭户日期", "prop": "closingDate", visible: true, type: "string", fill: false }, { "label": "闭户日期", "prop": "closingDate", visible: true, type: "string", fill: false },
{ "label": "大区总监", "prop": "regionManager", visible: true, type: "string", fill: false }, { "label": "大区总监", "prop": "regionManager", visible: true, type: "string", fill: false },
{ "label": "战区经理", "prop": "districtManager", visible: true, type: "string", fill: false }, { "label": "战区经理", "prop": "districtManager", visible: true, type: "string", fill: false },
{ "label": "城市经理", "prop": "cityManager", visible: true, type: "string", fill: false }, { "label": "城市经理", "prop": "cityManager", visible: true, type: "string", fill: false },
{ "label": "系统名称", "prop": "lineName", visible: true, type: "string", fill: true }, { "label": "系统名称", "prop": "lineName", visible: true, type: "string", fill: true, fixed: 'left' },
{ "label": "系统类型", "prop": "lineType", visible: true, type: "string", fill: false }, { "label": "系统类型", "prop": "lineType", visible: true, type: "string", fill: false },
{ "label": "渠道大类", "prop": "channelDl", visible: true, type: "string", fill: false }, { "label": "渠道大类", "prop": "channelDl", visible: true, type: "string", fill: false },
{ "label": "渠道小类", "prop": "channelXl", visible: true, type: "string", fill: false }, { "label": "渠道小类", "prop": "channelXl", visible: true, type: "string", fill: false },
...@@ -396,7 +391,7 @@ const tableColumns = ref([]) ...@@ -396,7 +391,7 @@ const tableColumns = ref([])
const chooseColumns = ref([]) const chooseColumns = ref([])
// 计算列具体数据 // 计算列具体数据
const checkTableColumns = () => { const checkTableColumns = () => {
if (operation.value === '全部列') { if (operation.value === '平铺模式') {
chooseColumns.value = baseColumns.value chooseColumns.value = baseColumns.value
tableColumns.value = baseColumns.value.flatMap(item => { tableColumns.value = baseColumns.value.flatMap(item => {
if (item.children) { if (item.children) {
...@@ -404,7 +399,7 @@ const checkTableColumns = () => { ...@@ -404,7 +399,7 @@ const checkTableColumns = () => {
} }
return []; return [];
}); });
} else if (operation.value === '填报') { } else if (operation.value === '填报模式') {
chooseColumns.value = baseColumns.value.flatMap(item => { chooseColumns.value = baseColumns.value.flatMap(item => {
if (item.children) { if (item.children) {
return item.children return item.children
...@@ -720,7 +715,8 @@ const isContentOverflow = (key, content) => { ...@@ -720,7 +715,8 @@ const isContentOverflow = (key, content) => {
.date-picker { .date-picker {
padding: 10px; padding: 10px;
.el-input{
.el-input {
padding: 0; padding: 0;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论