|
|
|
@ -141,8 +141,13 @@ |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
<template v-if="item.columnProp === 'ttlAmount' || item.columnProp === 'sumPrice'"> |
|
|
|
<span>{{!!scope.row[item.columnProp]?scope.row[item.columnProp].toFixed(2):''}}</span> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -1650,10 +1655,7 @@ |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList2 = data.rows |
|
|
|
this.dataList2.forEach(o => { |
|
|
|
o.ttlAmount = o.ttlAmount.toFixed(2); |
|
|
|
o.sumPrice = o.sumPrice.toFixed(2); |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dataList2 = []; |
|
|
|
} |
|
|
|
@ -2019,7 +2021,8 @@ |
|
|
|
sums[index] = '合计'; |
|
|
|
return; |
|
|
|
} |
|
|
|
const values = this.dataList2.map(item => Number(item[column.property])); |
|
|
|
let sumDataList = this.dataList2.filter(item => item.qty>0); |
|
|
|
const values = sumDataList.map(item => Number(item[column.property])); |
|
|
|
if (!values.every(value => isNaN(value))) { |
|
|
|
switch(column.property) { |
|
|
|
case 'qty': |
|
|
|
|