Commit c6f3f3d1 by zhangquan

列表积分显示

1 parent ef2418f8
......@@ -36,6 +36,24 @@
<span v-else>{{ filterData(scope.scope).join('、') }}</span>
</template>
</div>
<div slot="giveIntegralSlot" slot-scope="scope">
<template v-if="scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1">
<span>{{ filterData(scope.scope,1).slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
width="400"
trigger="hover">
<div v-for="(item,index) in filterData(scope.scope,1)" :key="index">
{{item}}
</div>
<span class="more-info" slot="reference">...[{{ scope.scope.saleMerchantList.length }}]</span>
</el-popover>
</template>
<template v-else>
<span v-if="!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length">--</span>
<span v-else>{{ filterData(scope.scope,1).join('、') }}</span>
</template>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="4"></GLTableButton>
</div>
......@@ -221,8 +239,8 @@
},
{
label: '赠送积分',
width: 120,
prop: 'giveIntegral'
width: 200,
addHtml: 'giveIntegralSlot'
},
{
label: '商品分类',
......@@ -316,11 +334,17 @@
}
})
},
filterData({saleMerchantList: list}){
return list?.map(item => {
let activityPrice = item.activityPrice ? Number((Number(item.activityPrice)/100).toFixed(2)) : 0
return `${item.merchantName || '--'}:${activityPrice || '0'}`
}) || []
filterData({saleMerchantList: list},notFormat){
if(notFormat){
return list?.map(item => {
return `${item.merchantName || '--'}:${item.giveIntegral || '0'}`
}) || []
}else{
return list?.map(item => {
let activityPrice = item.activityPrice ? Number((Number(item.activityPrice)/100).toFixed(2)) : 0
return `${item.merchantName || '--'}:${activityPrice || '0'}`
}) || []
}
},
getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!