1643eb8a by lxs

入表功能调整

1 parent fc6d7f7f
......@@ -743,6 +743,7 @@ const setTableFields = (info) => {
const date = new Date(info.baseDate);
const currDay = date.toLocaleDateString('zh-CN', { year: 'numeric', month: 'long' });
tableField.value.at(-1).visible = true;
tableField.value = tableField.value.filter(item => item.field.indexOf('name') > -1 || item.field == 'total');
tableField.value.splice(-1, 0, ...fields, { label: currDay, field: 'baseNum', type: 'input', width: 120, columClass: 'edit_cell' });
// 设置table数据
let datas: any = [];
......@@ -1364,7 +1365,7 @@ onUpdated(() => {
<div class="table_panel">
<el-table id="cost-table" v-show="step == 0" ref="costTableRef" :data="tableData"
:span-method="tableSpanMethod" :show-summary="besure" :summary-method="tableSummaryMethod"
:cell-class-name="isMergedCell" border>
:cell-class-name="isMergedCell" stripe border>
<template v-for="(item, i) in tableField" :key="'tField' + i">
<el-table-column v-if="item.visible ?? true" :label="item.label" :width="item.width"
:min-width="item.minWidth" :fixed="item.fixed" :align="item.align"
......@@ -1372,7 +1373,7 @@ onUpdated(() => {
show-overflow-tooltip>
<template #default="scope">
<div class="input_cell" v-if="item.type == 'input'">
<el-input v-model.trim="scope.row[item.field]" placeholder="请输入"
<el-input v-model.trim="scope.row[item.field]" placeholder="--" size="small"
:maxlength="item.maxlength ?? ''" @change="(val) => inputChange(val, scope, item.field)"
@input="(val) => inputEventChange(val, scope, item.field)"
:disabled="scope.row.edit ? false : true" clearable></el-input>
......@@ -1803,9 +1804,14 @@ onUpdated(() => {
.cell_text_group {
display: flex;
.el-checkbox {
height: 24px;
line-height: 24px;
}
.cell_text {
margin-left: 4px;
line-height: 32px;
line-height: 24px;
}
}
......@@ -1822,6 +1828,10 @@ onUpdated(() => {
.input_cell {
position: relative;
.el-input .el-input__inner {
text-align: right;
height: 24px;
}
>span {
position: absolute;
......@@ -1845,6 +1855,10 @@ onUpdated(() => {
text-align: right;
}
}
.el-table__footer-wrapper tfoot td.el-table__cell {
background: #FFF1D4;
}
}
:deep(.el-popper) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!