Browse Source

2025.02.19 绩效&送货计划 功能优化

master
yuejiayang 11 months ago
parent
commit
3bd8593976
  1. 28
      src/views/modules/deliverySchedule/externalSupplierDeliverySchedule.vue
  2. 28
      src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue

28
src/views/modules/deliverySchedule/externalSupplierDeliverySchedule.vue

@ -99,10 +99,13 @@
</el-form>
<el-table
:key="dataList.length"
:height="height - 280"
:data="dataList"
border
style="width: 100%;"
:summary-method="getSummaries"
show-summary
class="custom-table"
>
<el-table-column
@ -1025,6 +1028,31 @@ export default {
this.materialIssueDataList = []
},
//
//
getSummaries({ columns, data }) {
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
// ""
sums[index] = '汇总';
return;
}
const columnProp = column.property; // columnProp
if (['notifyQty', 'pendingQty', 'actualOntimeDelQty', 'actualTotalDelQty'].includes(columnProp)) {
//
const total = data.reduce((sum, row) => {
const value = Number(row[columnProp]) || 0;
return sum + value;
}, 0);
sums[index] = total; //
} else {
sums[index] = ''; //
}
});
return sums;
},
//
sizeChangeHandle (val) {
this.pageSize = val

28
src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue

@ -100,11 +100,14 @@
</el-form>
<el-table
:key="dataList.length"
:height="height"
:data="dataList"
border
style="width: 100%;"
class="custom-table"
:summary-method="getSummaries"
show-summary
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column>
@ -1063,6 +1066,31 @@ export default {
this.materialIssueDataList = []
},
//
//
getSummaries({ columns, data }) {
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
// ""
sums[index] = '汇总';
return;
}
const columnProp = column.property; // columnProp
if (['notifyQty', 'pendingQty', 'actualOntimeDelQty', 'actualTotalDelQty'].includes(columnProp)) {
//
const total = data.reduce((sum, row) => {
const value = Number(row[columnProp]) || 0;
return sum + value;
}, 0);
sums[index] = total; //
} else {
sums[index] = ''; //
}
});
return sums;
},
//
sizeChangeHandle (val) {
this.pageSize = val

Loading…
Cancel
Save