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

Merge branch 'ap' into dev

......@@ -42,7 +42,8 @@
class="auto-fit-header-table"
v-loading="isLoading"
show-overflow-tooltip
:class="{ 'cell-no-padding': operation === '填报模式' }">
:class="{ 'cell-no-padding': operation === '填报模式' }"
:row-style="tableRowStyle">
<template v-for="col in tableColumns">
<el-table-column v-if="col.visible"
:label="col.label"
......@@ -72,7 +73,7 @@
<!-- 自定义渲染内容单元格 -->
<div v-if="col.render"
class="cell-style">
<component :is="col.render(h, row, col)" />
<component :is="col.render(h, row, col, !isCurrentMonth(row.salesMonth))" />
</div>
<!-- 公式计算 -->
<div v-else-if="col.type === 'formula'">
......@@ -270,6 +271,28 @@ const handleDialogClose = () => {
// 然后关闭弹窗
showTableInDialog.value = false
}
/*************** 非当月置灰行 ***************/
// 获取当前月份的函数
const getCurrentMonth = () => {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
return `${year}-${month}`;
};
// 检查是否为当前月的函数
const isCurrentMonth = (salesMonth) => {
return salesMonth === getCurrentMonth();
};
// 行样式函数
const tableRowStyle = ({ row }) => {
if (!isCurrentMonth(row.salesMonth)) {
return { backgroundColor: '#f5f7fa' }; // 灰色背景
}
return {};
};
</script>
<style scoped
......
......@@ -3791,7 +3791,8 @@ export const getSixLittleDiamondsConfig = (submitChange) => {
)
},
fill: true,
width: 210
width: 210,
requestKey: ['gwExecuted6']
},
{
label: '六小金刚批发挂网陈列费',
......@@ -3803,15 +3804,13 @@ export const getSixLittleDiamondsConfig = (submitChange) => {
},
{
label: '六小金刚批发挂网是否',
subLabel: '按实际执行',
subLabel: '按计划执行',
prop: 'gwExecuted6',
visible: true,
type: 'formula',
func: (row) => {
// 判断区间,未执行,部分执行,执行
if (!row.actualGw6 || row.actualGw6 == 0) {
row.gwExecuted6 = '未执行'
} else if (row.actualGw6 !== row.plannedGw6) {
// 实际不等于计划的都是未执行
if (row.actualGw6 !== row.plannedGw6) {
row.gwExecuted6 = '未执行'
} else {
row.gwExecuted6 = '执行'
......
......@@ -101,9 +101,7 @@ const getTableList = () => {
display: flex;
flex-direction: column;
overflow: hidden;
}
/* 因为表格会被挪走,所以必须独立样式无法嵌套在别人内 */
/* 表格样式 */
.table-container {
flex: 1;
......@@ -242,65 +240,18 @@ const getTableList = () => {
margin: 10px;
}
}
}
</style>
<style lang="scss">
/* 表格弹窗 */
.table-dialog-modal {
padding: 0;
/* 关键:覆盖Element Plus对话框的默认最大宽度 */
.el-dialog {
width: 100% !important;
max-width: none !important;
margin: 0 !important;
height: 100vh;
display: flex;
flex-direction: column;
.el-dialog__body {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden !important;
padding-bottom: 5px;
.dialog-table-container {
flex: 1;
height: 100%;
.table-container {
flex: 1;
display: flex;
flex-direction: column;
height: 100%;
.pagination-container {
margin-left: auto;
}
}
/* 加深表头背景颜色 */
::v-deep(.el-table__header-wrapper) {
.el-table__header {
th {
background-color: #dcdfe6 !important;
color: #303133 !important;
font-weight: bold;
}
}
}
}
// 不显示数字输入框的 spinner
.no-spinner input::-webkit-inner-spin-button,
.no-spinner input::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.no-spinner {
-moz-appearance: textfield;
}
// 填入数字超过计划值时,红色文字提示
.red-text {
input {
color: red !important;
}
}
</style>
......@@ -46,6 +46,7 @@ const handleClickTabs = (tab) => {
}
</script>
<style scoped
lang="scss">
.app-container {
......@@ -53,6 +54,24 @@ const handleClickTabs = (tab) => {
.container {
padding: 10px;
.el-tabs {
height: 100%;
display: flex;
flex-direction: column-reverse;
.el-tabs__content {
display: flex;
flex-direction: column;
height: 100%;
.el-tab-pane {
height: 100%;
display: flex;
flex-direction: column;
}
}
}
}
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论