Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-points
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 73eba552
authored
Dec 18, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
8f58bfc8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
34 deletions
src/views/storeCredit/add.vue
src/views/storeCredit/components/detailDialog.vue
src/views/storeCredit/add.vue
View file @
73eba55
...
@@ -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
:
#
5850
ff
;
cursor
:
pointer
;
}
<
/style
>
<
/style
>
src/views/storeCredit/components/detailDialog.vue
View file @
73eba55
...
@@ -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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment