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

refactor(promotion/display_schedule): 修复:店内执行上报_部分填写组件背景颜色有问题

上级 98734928
......@@ -76,7 +76,7 @@ const getLogoTextColor = computed(() => {
& .sidebar-logo {
// width: 32px;
// height: 32px;
width: 90px;
width: 120px;
height: 60px;
vertical-align: middle;
// margin-right: 12px;
......
......@@ -25,14 +25,15 @@
border
ref="tableRef"
class="auto-fit-header-table"
:class="{ 'cell-no-padding': operation === '填报模式' }"
v-loading="isLoading">
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"
:show-overflow-tooltip="col.showOverflowTooltip"
class-name="column-style"
:width="col.width"
:fixed="operation === '填报模式' && col.fixed">
......@@ -49,8 +50,7 @@
</template>
<template #default="{ row }">
<!-- 填报模式 -->
<div v-if="operation === '填报模式'"
style="overflow: visible !important;">
<div v-if="operation === '填报模式'">
<!-- 自定义渲染内容单元格 -->
<div v-if="col.render"
class="cell-style">
......@@ -67,7 +67,8 @@
</div>
</div>
<!-- 展示模式 -->
<div v-else>{{ formatter(row, col, row[col.prop] || '-') }}</div>
<div class="show-cell-style"
v-else>{{ formatter(row, col, row[col.prop] || '-') }}</div>
</template>
</el-table-column>
</template>
......@@ -190,10 +191,16 @@ const getTableList = () => {
}
/* 单元格样式 */
/* 自定义渲染内容 */
.cell-style {
margin: 0 -12px;
/* 展示模式单元格(仅展示模式生效) */
.show-cell-style {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cell-style {
>div {
display: flex;
flex-direction: column;
......@@ -213,18 +220,29 @@ const getTableList = () => {
.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%;
......@@ -236,11 +254,13 @@ const getTableList = () => {
/* 填报模式-单元格 */
&.cell-no-padding {
/* 无上下内边距 */
::v-deep(.el-table__row) {
.el-table__cell {
padding: 0;
.cell{
padding: 0 !important;
}
}
}
}
......
......@@ -41,7 +41,8 @@ import Snack from './tabs/snack.vue'
import ThreeTwoSeconds from './tabs/three_two_seconds.vue'
import SixLittleDiamonds from './tabs/six_little_diamonds.vue'
const activeName = ref('常规陈列');
// const activeName = ref('常规陈列');
const activeName = ref('档期陈列');
const handleClickTabs = (tab) => {
activeName.value = tab.name;
}
......
......@@ -156,7 +156,7 @@
visible: true,
type: 'string',
fill: true,
showOverflowTooltip: true,
// showOverflowTooltip: true,
onlyFill: true,// 仅仅在填报模式下生效
fixed: 'left',
width: 225,
......@@ -394,6 +394,7 @@
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable>
{col.options.map(item => (
......@@ -429,17 +430,15 @@
<span>{row[col.referenceKey] || '-'}</span>
<el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (value === '') {
value = 0
}
row[col.prop] = value;
const numValue = value === '' ? 0 : Number(value);
row[col.prop] = numValue;
submitChange(row, col);
}}
min="0"
type="number"
placeholder=""
disabled={!row[col.referenceKey]}
class={{ 'no-disabled': row[col.referenceKey] }}
clearable>
</el-input>
</div>
......@@ -463,7 +462,7 @@
row.actualMainShelfExecuted = '未执行'
} else if (!row.actualMainShelfQty) {
row.actualMainShelfExecuted = '未执行'
} else if (parseInt(row.actualMainShelfQty) < parseInt(row.plannedMainShelfQty) ){
} else if (parseInt(row.actualMainShelfQty) < parseInt(row.plannedMainShelfQty)) {
// 实际主货架数量 < 计划主货架数量
row.actualMainShelfExecuted = '部分执行'
} else {
......@@ -520,11 +519,17 @@
<span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (!value) {
value = 0
}
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
placeholder="">
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable>
{col.options.map(item => (
<el-option
key={item.value}
......@@ -622,11 +627,17 @@
<span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (!value) {
value = 0
}
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
placeholder="">
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable>
{col.options.map(item => (
<el-option
key={item.value}
......@@ -662,11 +673,17 @@
<span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (!value) {
value = 0
}
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row.actualFloorStackArea || !row[col.referenceKey]}
placeholder="">
class={{ 'no-disabled': row.actualFloorStackArea && row[col.referenceKey] }}
placeholder=""
clearable>
{col.options.map(item => (
<el-option
key={item.value}
......@@ -773,6 +790,7 @@
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable>
{col.options.map(item => (
......@@ -838,6 +856,7 @@
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable>
{col.options.map(item => (
......@@ -1040,7 +1059,7 @@
const isLoading = ref(true)
let params = reactive({
pageNum: 1,
pageSize: 20,
pageSize: 10,
})
const total = ref(0)
......@@ -1142,23 +1161,7 @@
::v-deep(.column-style) {
.cell-style {
margin: 0 -12px;
>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;
}
}
// margin: 0 -12px;
/* 表格内下拉框 */
.el-select {
......@@ -1210,6 +1213,4 @@
margin: 0;
}
}
</style>
\ No newline at end of file
......@@ -340,6 +340,7 @@
col.checkFn(row)
}}
disabled={!row[col.referenceKey]}
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable
>
......@@ -398,12 +399,12 @@
<div>
{
row.actualPromotionSpec !== '其他' ? (<div style="width: 100%; text-align: center;">-</div>) : (
<el-input modelValue={row[col.prop]}
<el-input style="margin-top:24px;" modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class='no-disabled'
placeholder="">
</el-input>
)
......@@ -484,6 +485,7 @@
col.checkFn(row)
}}
disabled={!row[col.referenceKey]}
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable
multiple={!isFullFlavor}
......@@ -497,7 +499,7 @@
/>
))}
</el-select>
</div>
</div >
)
},
checkFn(row) {
......@@ -543,16 +545,16 @@
return (
<div>
{
row.actualPromotionFlavor[0] !== '其他' ? (<div style="width: 100%; text-align: center;">-</div>) : (
<el-input modelValue={row[col.prop]}
row.actualPromotionFlavor.includes('其他') ? (
<el-input style="margin-top: 24px;" modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class='no-disabled'
placeholder="">
</el-input>
)
) : (<div style="width: 100%; text-align: center;">-</div>)
}
</div>
)
......@@ -699,7 +701,7 @@
return (
<div>
<span>{row[col.referenceKey] || '-'}</span>
<div class="date-picker">
<div class={['date-picker', { 'no-disabled': row[col.referenceKey] }]}>
<el-date-picker modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
......@@ -744,7 +746,7 @@
return (
<div>
<span>{row[col.referenceKey] || '-'}</span>
<div class="date-picker">
<div class={['date-picker', { 'no-disabled': row[col.referenceKey] }]}>
<el-date-picker modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
......@@ -835,6 +837,7 @@
col.checkFn(row)
}}
disabled={!row[col.referenceKey]}
class={{ 'no-disabled': row[col.referenceKey] }}
placeholder=""
clearable
>
......@@ -888,12 +891,12 @@
<div>
{
row.actualPromotionMechanism !== '执行与计划不一致' ? (<div style="width: 100%; text-align: center;">-</div>) : (
<el-input modelValue={row[col.prop]}
<el-input style="margin-top: 24px;" modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class='no-disabled'
placeholder="">
</el-input>
)
......@@ -1186,6 +1189,7 @@
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
placeholder=""
clearable
>
......@@ -1339,7 +1343,7 @@
const isLoading = ref(true)
let params = reactive({
pageNum: 1,
pageSize: 20,
pageSize: 10,
})
const total = ref(0)
......@@ -1349,7 +1353,6 @@
const res = await getDisplayScheduleList({
...params
})
console.log(1, res)
// 处理日期格式
res.data.rows.forEach(item => {
item.salesMonth = parseTime(item.salesMonth, '{y}-{m}')
......@@ -1473,7 +1476,7 @@
}
.cell-style {
margin: 0 -12px;
// margin: 0 -12px;
>div {
display: flex;
......@@ -1497,23 +1500,23 @@
}
/* 表格内下拉框 */
.el-select {
width: 100% !important;
padding: 10px;
}
// .el-select {
// width: 100% !important;
// padding: 10px;
// }
.el-input {
padding: 10px;
}
// .el-input {
// padding: 10px;
// }
.date-picker {
padding: 10px;
// .date-picker {
// padding: 10px;
.el-input {
padding: 0;
}
}
// .el-input {
// padding: 0;
// }
// }
}
}
......
......@@ -417,11 +417,16 @@
<span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
if (!value) {
value = 0;
}
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
placeholder="">
class={{'no-disabled': row[col.referenceKey]}}
placeholder=""
clearable>
{col.options.map(item => (
<el-option
key={item.value}
......@@ -528,14 +533,13 @@
<el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (value === '') {
value = 0
}
row[col.prop] = value;
const numValue = value === '' ? 0 : Number(value);
row[col.prop] = numValue;
submitChange(row, col);
}}
min="0"
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
type="number"
placeholder=""
clearable>
......@@ -582,14 +586,12 @@
<span>{row[col.referenceKey] || '-'}</span>
<el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (value === '') {
value = 0
}
row[col.prop] = value;
const numValue = value === '' ? 0 : Number(value);
row[col.prop] = numValue;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
min="0"
type="number"
placeholder=""
......@@ -656,6 +658,7 @@
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
placeholder=""
clearable
>
......@@ -825,7 +828,7 @@
const isLoading = ref(true)
let params = reactive({
pageNum: 1,
pageSize: 20,
pageSize: 10,
})
const total = ref(0)
......@@ -936,7 +939,7 @@
::v-deep(.column-style) {
.cell-style {
margin: 0 -12px;
/* margin: 0 -12px; */
>div {
......
......@@ -251,10 +251,12 @@
<span>{row[col.referenceKey] || '-'}</span>
<el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
const numValue = value === '' ? 0 : Number(value);
row[col.prop] = numValue;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
min="0"
type="number"
placeholder=""
......@@ -353,7 +355,10 @@
const isLoading = ref(false)
const total = ref(0)
const params = ref({})
const params = ref({
pageNum: 1,
pageSize: 10,
})
const showFill = ref(true)
const getTableList = () => {
isLoading.value = true
......
......@@ -284,6 +284,7 @@
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
placeholder=""
clearable
>
......@@ -398,10 +399,12 @@
<div>
<el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
const numValue = value === '' ? 0 : Number(value);
row[col.prop] = numValue;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
min="0"
type="number"
placeholder=""
......@@ -618,7 +621,7 @@
const isLoading = ref(true)
let params = reactive({
pageNum: 1,
pageSize: 20,
pageSize: 10,
})
const total = ref(0)
......@@ -739,7 +742,7 @@
::v-deep(.column-style) {
.cell-style {
margin: 0 -12px;
/* margin: 0 -12px; */
>div {
......
......@@ -259,17 +259,14 @@
<el-input
modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
{/* 小于 0 */}
if (value < 0) {
row[col.prop] = 0;
return;
}
row[col.prop] = value;
const numValue = value === '' ? 0 : Number(value);
row[col.prop] = numValue;
submitChange(row, col);
}}
min="0"
type="number"
disabled={!row[col.referenceKey]}
class={{'no-disabled': row[col.referenceKey]}}
placeholder=""
clearable
/>
......@@ -361,7 +358,7 @@
const params = ref({
pageNum: 1,
pageSize: 20,
pageSize: 10,
})
const showFill = ref(true)
const getTableList = () => {
......
......@@ -427,11 +427,11 @@ const lookPhoto = async (row) => { // 查看照片
.container .el-table ::v-deep(.cell) {
white-space: pre-line;
/* 强制显示 2 行,超出的省略号 */
/* overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical; */
-webkit-box-orient: vertical;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论