入表功能调整
Showing
1 changed file
with
17 additions
and
3 deletions
| ... | @@ -743,6 +743,7 @@ const setTableFields = (info) => { | ... | @@ -743,6 +743,7 @@ const setTableFields = (info) => { |
| 743 | const date = new Date(info.baseDate); | 743 | const date = new Date(info.baseDate); |
| 744 | const currDay = date.toLocaleDateString('zh-CN', { year: 'numeric', month: 'long' }); | 744 | const currDay = date.toLocaleDateString('zh-CN', { year: 'numeric', month: 'long' }); |
| 745 | tableField.value.at(-1).visible = true; | 745 | tableField.value.at(-1).visible = true; |
| 746 | tableField.value = tableField.value.filter(item => item.field.indexOf('name') > -1 || item.field == 'total'); | ||
| 746 | tableField.value.splice(-1, 0, ...fields, { label: currDay, field: 'baseNum', type: 'input', width: 120, columClass: 'edit_cell' }); | 747 | tableField.value.splice(-1, 0, ...fields, { label: currDay, field: 'baseNum', type: 'input', width: 120, columClass: 'edit_cell' }); |
| 747 | // 设置table数据 | 748 | // 设置table数据 |
| 748 | let datas: any = []; | 749 | let datas: any = []; |
| ... | @@ -1364,7 +1365,7 @@ onUpdated(() => { | ... | @@ -1364,7 +1365,7 @@ onUpdated(() => { |
| 1364 | <div class="table_panel"> | 1365 | <div class="table_panel"> |
| 1365 | <el-table id="cost-table" v-show="step == 0" ref="costTableRef" :data="tableData" | 1366 | <el-table id="cost-table" v-show="step == 0" ref="costTableRef" :data="tableData" |
| 1366 | :span-method="tableSpanMethod" :show-summary="besure" :summary-method="tableSummaryMethod" | 1367 | :span-method="tableSpanMethod" :show-summary="besure" :summary-method="tableSummaryMethod" |
| 1367 | :cell-class-name="isMergedCell" border> | 1368 | :cell-class-name="isMergedCell" stripe border> |
| 1368 | <template v-for="(item, i) in tableField" :key="'tField' + i"> | 1369 | <template v-for="(item, i) in tableField" :key="'tField' + i"> |
| 1369 | <el-table-column v-if="item.visible ?? true" :label="item.label" :width="item.width" | 1370 | <el-table-column v-if="item.visible ?? true" :label="item.label" :width="item.width" |
| 1370 | :min-width="item.minWidth" :fixed="item.fixed" :align="item.align" | 1371 | :min-width="item.minWidth" :fixed="item.fixed" :align="item.align" |
| ... | @@ -1372,7 +1373,7 @@ onUpdated(() => { | ... | @@ -1372,7 +1373,7 @@ onUpdated(() => { |
| 1372 | show-overflow-tooltip> | 1373 | show-overflow-tooltip> |
| 1373 | <template #default="scope"> | 1374 | <template #default="scope"> |
| 1374 | <div class="input_cell" v-if="item.type == 'input'"> | 1375 | <div class="input_cell" v-if="item.type == 'input'"> |
| 1375 | <el-input v-model.trim="scope.row[item.field]" placeholder="请输入" | 1376 | <el-input v-model.trim="scope.row[item.field]" placeholder="--" size="small" |
| 1376 | :maxlength="item.maxlength ?? ''" @change="(val) => inputChange(val, scope, item.field)" | 1377 | :maxlength="item.maxlength ?? ''" @change="(val) => inputChange(val, scope, item.field)" |
| 1377 | @input="(val) => inputEventChange(val, scope, item.field)" | 1378 | @input="(val) => inputEventChange(val, scope, item.field)" |
| 1378 | :disabled="scope.row.edit ? false : true" clearable></el-input> | 1379 | :disabled="scope.row.edit ? false : true" clearable></el-input> |
| ... | @@ -1803,9 +1804,14 @@ onUpdated(() => { | ... | @@ -1803,9 +1804,14 @@ onUpdated(() => { |
| 1803 | .cell_text_group { | 1804 | .cell_text_group { |
| 1804 | display: flex; | 1805 | display: flex; |
| 1805 | 1806 | ||
| 1807 | .el-checkbox { | ||
| 1808 | height: 24px; | ||
| 1809 | line-height: 24px; | ||
| 1810 | } | ||
| 1811 | |||
| 1806 | .cell_text { | 1812 | .cell_text { |
| 1807 | margin-left: 4px; | 1813 | margin-left: 4px; |
| 1808 | line-height: 32px; | 1814 | line-height: 24px; |
| 1809 | } | 1815 | } |
| 1810 | } | 1816 | } |
| 1811 | 1817 | ||
| ... | @@ -1822,6 +1828,10 @@ onUpdated(() => { | ... | @@ -1822,6 +1828,10 @@ onUpdated(() => { |
| 1822 | 1828 | ||
| 1823 | .input_cell { | 1829 | .input_cell { |
| 1824 | position: relative; | 1830 | position: relative; |
| 1831 | .el-input .el-input__inner { | ||
| 1832 | text-align: right; | ||
| 1833 | height: 24px; | ||
| 1834 | } | ||
| 1825 | 1835 | ||
| 1826 | >span { | 1836 | >span { |
| 1827 | position: absolute; | 1837 | position: absolute; |
| ... | @@ -1845,6 +1855,10 @@ onUpdated(() => { | ... | @@ -1845,6 +1855,10 @@ onUpdated(() => { |
| 1845 | text-align: right; | 1855 | text-align: right; |
| 1846 | } | 1856 | } |
| 1847 | } | 1857 | } |
| 1858 | |||
| 1859 | .el-table__footer-wrapper tfoot td.el-table__cell { | ||
| 1860 | background: #FFF1D4; | ||
| 1861 | } | ||
| 1848 | } | 1862 | } |
| 1849 | 1863 | ||
| 1850 | :deep(.el-popper) { | 1864 | :deep(.el-popper) { | ... | ... |
-
Please register or sign in to post a comment