提交 5544a086 authored 作者: lidongxu's avatar lidongxu

refactor(display_schedule): 修改:链路中心_AP 计划上报效果

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