...
|
...
|
@@ -347,6 +347,8 @@ |
|
|
@selection-change="trnSelectionChange"
|
|
|
:cell-style="{textAlign:'center'}"
|
|
|
style="border-radius: 10px 10px 0px 0px;line-height: 25px"
|
|
|
show-summary
|
|
|
:summary-method="getSummaries"
|
|
|
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}"
|
|
|
>
|
|
|
<el-table-column
|
...
|
...
|
@@ -399,6 +401,11 @@ |
|
|
label="尺寸"
|
|
|
width="60">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="goodsvol"
|
|
|
label="入库体积"
|
|
|
width="60">
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column-->
|
|
|
<!-- prop="area"-->
|
|
|
<!-- label="库区"-->
|
...
|
...
|
@@ -624,8 +631,6 @@ |
|
|
<script>
|
|
|
import {
|
|
|
selectInventroyrecords,
|
|
|
delInventoryrecord,
|
|
|
addInventoryrecord,
|
|
|
batchImpNewinventroyrecord,
|
|
|
ediInventroyrecord,
|
|
|
selectAreas,
|
...
|
...
|
@@ -1220,6 +1225,38 @@ |
|
|
}else{
|
|
|
this.$message.error("合并体积录入数据出错")
|
|
|
}
|
|
|
},
|
|
|
getSummaries(param) {
|
|
|
const { columns, data } = param;
|
|
|
const sums = [];
|
|
|
columns.forEach((column, index) => {
|
|
|
if (index === 0) {
|
|
|
sums[index] = '合计';
|
|
|
return;
|
|
|
}
|
|
|
const values = data.map(item => {
|
|
|
if (column.property==='billweight' || column.property==='feeweight' || column.property==='pcs' || column.property==='goodsvol'){
|
|
|
return Number(item[column.property])
|
|
|
}else {
|
|
|
return undefined
|
|
|
}
|
|
|
});
|
|
|
if (!values.every(value => isNaN(value))) {
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
const value = Number(curr);
|
|
|
if (!isNaN(value)) {
|
|
|
return prev + curr;
|
|
|
} else {
|
|
|
return prev;
|
|
|
}
|
|
|
}, 0);
|
|
|
sums[index] += '';
|
|
|
} else {
|
|
|
sums[index] = '';
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return sums;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
...
|
...
|
|