Browse Source

查看表格合计问题

master
qb 1 year ago
parent
commit
ce983a86cb
  1. 7
      src/components/tablecmt/tablecmt.vue
  2. 18
      src/views/distribution/reservation/reservationAddFrom.vue

7
src/components/tablecmt/tablecmt.vue

@ -171,7 +171,7 @@
</el-table-column>
</el-table>
<!-- 勾选合计行 -->
<div class="selection-total-row" v-if="shownm && isHaveSelection">
<div class="selection-total-row" v-show="shownm && isHaveSelection">
<span>勾选合计:</span>
<span v-for="item in selectCount">
<span style="margin: 0 5px">{{ item.label + ':' }}</span>
@ -502,7 +502,7 @@ function timeclear(value, column: TableColumnType) {
}
function handleDelete(index: number, row: TableDataType) {}
const getSummaries = (param: any) => {
selectCount.value = [];
const _arr = [];
const { columns, data } = param;
let newarr = [];
let tji = 0;
@ -518,7 +518,7 @@ const getSummaries = (param: any) => {
tji = computeNumber(tji, '+', Number(ite[props.columnList[index]?.prop] || 0)).result;
}
newarr[index] = tji;
selectCount.value.push({
_arr.push({
label: props.columnList[index]?.label,
value: 0,
prop: props.columnList[index]?.prop,
@ -528,6 +528,7 @@ const getSummaries = (param: any) => {
newarr[index] = null;
}
});
selectCount.value = _arr;
// console.log(columns)
return newarr;
};

18
src/views/distribution/reservation/reservationAddFrom.vue

@ -715,6 +715,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
{
@ -726,6 +727,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
{
@ -737,6 +739,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
{
@ -935,6 +938,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
@ -945,6 +949,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
/* {
@ -975,6 +980,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
@ -1017,6 +1023,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
{
@ -1037,6 +1044,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
@ -1077,7 +1085,7 @@ export default {
label: '序号',
type: 0,
values: '',
width: '50',
width: '55',
checkarr: [],
fixed: false,
sortable: true,
@ -1235,6 +1243,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
{
@ -1246,6 +1255,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
{
@ -1497,6 +1507,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
@ -1507,6 +1518,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
/* {
@ -1537,6 +1549,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
@ -1548,6 +1561,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
@ -1599,6 +1613,7 @@ export default {
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
@ -1808,6 +1823,7 @@ export default {
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: true,
head: false,
},
{

Loading…
Cancel
Save