|
@@ -84,7 +84,7 @@
|
|
|
</ws-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table class="wenzi" :ref="'multipleTable'+index" :data="item.warehousingOrderList" style="width: 100%" @selection-change="handleSelectionChange($event,item,index)" >
|
|
|
+ <el-table show-summary :summary-method="getSummaries" class="wenzi" :ref="'multipleTable'+index" :data="item.warehousingOrderList" style="width: 100%" @selection-change="handleSelectionChange($event,item,index)" >
|
|
|
<el-table-column
|
|
|
:selectable='selectInit'
|
|
|
type="selection"
|
|
@@ -486,6 +486,9 @@
|
|
|
getenabledinfo,
|
|
|
setenabledinfo
|
|
|
} from '@/model/warehouse/index'
|
|
|
+import {
|
|
|
+ selectWarehouseSelf,
|
|
|
+} from '@/model/houseSelfCollect/index'
|
|
|
import {getpayeeinfo,getbuypayeeinfo} from '@/model/profitable/index'
|
|
|
import {
|
|
|
downloadFile
|
|
@@ -665,7 +668,35 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
|
- warehousechange(e){
|
|
|
+ getSummaries(param) {
|
|
|
+ const { columns, data } = param;
|
|
|
+ const sums = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = '合计';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
+ if (!values.every(value => isNaN(value))) {
|
|
|
+ if(index==8||index==9||index==10||index==11||index==12||index==13||index==14||index==15){
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0).toFixed(2)
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ sums[index] = '';
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return sums;
|
|
|
+ },
|
|
|
+ warehouseNameChange(e){
|
|
|
if(e=='全部仓库'){
|
|
|
this.warehouseName=''
|
|
|
}
|
|
@@ -1581,6 +1612,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
|
endDate:this.endDate,
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
+ baseId:this.warehouseName,
|
|
|
searchType: this.searchType,
|
|
|
searchKeyWord: this.searchKeyWord,
|
|
|
})
|