Commit 73eba552 by 李伟康

提交

1 parent 8f58bfc8
...@@ -126,16 +126,23 @@ ...@@ -126,16 +126,23 @@
> >
<template v-if="scope.scope.oilList && scope.scope.oilList.length"> <template v-if="scope.scope.oilList && scope.scope.oilList.length">
<div class="flex"> <div class="flex">
<div class="list"> <span>{{ filterData(scope.scope.oilList,'oilList').slice(0, 1).join('、') }}</span>
<template v-for="(i, index) in scope.scope.oilList"> <el-popover
<template> placement="top"
width="fit-content"
trigger="hover"
>
<div <div
v-for="(item,index) in filterData(scope.scope.oilList,'oilList')"
:key="index" :key="index"
class="item flex" >
>{{ i.aliasName }}*{{ i.amount }} ({{ NP.times(i.amount, i.faceValue) }}积分)</div> {{item}}
</template>
</template>
</div> </div>
<span
class="more-info"
slot="reference"
>...({{ scope.scope.oilList.length }})</span>
</el-popover>
<template v-if="!pageObject.disabled"> <template v-if="!pageObject.disabled">
<el-button <el-button
type="text" type="text"
...@@ -162,16 +169,23 @@ ...@@ -162,16 +169,23 @@
> >
<template v-if="scope.scope.couponList && scope.scope.couponList.length"> <template v-if="scope.scope.couponList && scope.scope.couponList.length">
<div class="flex"> <div class="flex">
<div class="list"> <span>{{ filterData(scope.scope.couponList,'couponList').slice(0, 1).join('、') }}</span>
<template v-for="(i, index) in scope.scope.couponList"> <el-popover
<template> placement="top"
width="fit-content"
trigger="hover"
>
<div <div
v-for="(item,index) in filterData(scope.scope.couponList,'couponList')"
:key="index" :key="index"
class="item flex" >
>{{ i.couponName }}*{{ i.amount }}</div> {{item}}
</template>
</template>
</div> </div>
<span
class="more-info"
slot="reference"
>...({{ scope.scope.couponList.length }})</span>
</el-popover>
<template v-if="!pageObject.disabled"> <template v-if="!pageObject.disabled">
<el-button <el-button
type="text" type="text"
...@@ -584,10 +598,12 @@ export default { ...@@ -584,10 +598,12 @@ export default {
} }
}, },
setTableHeight (detailList = []) { setTableHeight (detailList = []) {
const { listRef } = this.$refs const { listRef } = this.$refs,
{ id } = this.pageObject,
height = id ? 56 : 67.39
if (listRef) { if (listRef) {
let length = detailList.length let length = detailList.length
listRef.tableHeightValues = `${(length > 10 ? 10 : length) * 56 + 48}px` listRef.tableHeightValues = `${(length > 10 ? 10 : length) * height + 56}px`
} else setTimeout(() => { } else setTimeout(() => {
this.setTableHeight(detailList) this.setTableHeight(detailList)
}, 100) }, 100)
...@@ -693,7 +709,12 @@ export default { ...@@ -693,7 +709,12 @@ export default {
} }
} }
}) })
} },
filterData (list, name) {
return list?.map(i => {
return name == 'oilList' ? `${i.aliasName}*${i.amount} (${NP.times(i.amount, i.faceValue)}积分)` : `${i.couponName}*${i.amount}`
}) || []
},
} }
} }
...@@ -840,4 +861,9 @@ export default { ...@@ -840,4 +861,9 @@ export default {
} }
} }
} }
.more-info {
white-space: nowrap;
color: #5850ff;
cursor: pointer;
}
</style> </style>
...@@ -23,18 +23,23 @@ ...@@ -23,18 +23,23 @@
<template v-if="scope.scope.oilList && scope.scope.oilList.length"> <template v-if="scope.scope.oilList && scope.scope.oilList.length">
<div class="flex"> <div class="flex">
<div class="list"> <span>{{ filterData(scope.scope.oilList,'oilList').slice(0, 1).join('、') }}</span>
<template v-for="(i,index) in scope.scope.oilList"> <el-popover
<template> placement="top"
width="fit-content"
trigger="hover"
>
<div <div
v-for="(item,index) in filterData(scope.scope.oilList,'oilList')"
:key="index" :key="index"
class="item flex"
> >
{{i.aliasName}}*{{i.amount}} ({{NP.times(i.amount, i.faceValue)}}积分) {{item}}
</div>
</template>
</template>
</div> </div>
<span
class="more-info"
slot="reference"
>...({{ scope.scope.oilList.length }})</span>
</el-popover>
</div> </div>
</template> </template>
<template v-else> <template v-else>
...@@ -47,18 +52,23 @@ ...@@ -47,18 +52,23 @@
> >
<template v-if="scope.scope.couponList && scope.scope.couponList.length"> <template v-if="scope.scope.couponList && scope.scope.couponList.length">
<div class="flex"> <div class="flex">
<div class="list"> <span>{{ filterData(scope.scope.couponList,'couponList').slice(0, 1).join('、') }}</span>
<template v-for="(i,index) in scope.scope.couponList"> <el-popover
<template> placement="top"
width="fit-content"
trigger="hover"
>
<div <div
v-for="(item,index) in filterData(scope.scope.couponList,'couponList')"
:key="index" :key="index"
class="item flex"
> >
{{i.couponName}}*{{i.amount}} {{item}}
</div>
</template>
</template>
</div> </div>
<span
class="more-info"
slot="reference"
>...({{ scope.scope.couponList.length }})</span>
</el-popover>
</div> </div>
</template> </template>
<template v-else> <template v-else>
...@@ -157,10 +167,20 @@ export default { ...@@ -157,10 +167,20 @@ export default {
}, },
handleClose () { handleClose () {
this.$emit('update:detailObj', {}) this.$emit('update:detailObj', {})
} },
filterData (list, name) {
return list?.map(i => {
return name == 'oilList' ? `${i.aliasName}*${i.amount} (${NP.times(i.amount, i.faceValue)}积分)` : `${i.couponName}*${i.amount}`
}) || []
},
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.more-info {
white-space: nowrap;
color: #5850ff;
cursor: pointer;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!