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

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

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