Commit c6f3f3d1 by zhangquan

列表积分显示

1 parent ef2418f8
...@@ -36,6 +36,24 @@ ...@@ -36,6 +36,24 @@
<span v-else>{{ filterData(scope.scope).join('、') }}</span> <span v-else>{{ filterData(scope.scope).join('、') }}</span>
</template> </template>
</div> </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"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="4"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="4"></GLTableButton>
</div> </div>
...@@ -221,8 +239,8 @@ ...@@ -221,8 +239,8 @@
}, },
{ {
label: '赠送积分', label: '赠送积分',
width: 120, width: 200,
prop: 'giveIntegral' addHtml: 'giveIntegralSlot'
}, },
{ {
label: '商品分类', label: '商品分类',
...@@ -316,11 +334,17 @@ ...@@ -316,11 +334,17 @@
} }
}) })
}, },
filterData({saleMerchantList: list}){ filterData({saleMerchantList: list},notFormat){
if(notFormat){
return list?.map(item => {
return `${item.merchantName || '--'}:${item.giveIntegral || '0'}`
}) || []
}else{
return list?.map(item => { return list?.map(item => {
let activityPrice = item.activityPrice ? Number((Number(item.activityPrice)/100).toFixed(2)) : 0 let activityPrice = item.activityPrice ? Number((Number(item.activityPrice)/100).toFixed(2)) : 0
return `${item.merchantName || '--'}:${activityPrice || '0'}` return `${item.merchantName || '--'}:${activityPrice || '0'}`
}) || [] }) || []
}
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm)) 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!