Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
1f6ed3ae
Commit
1f6ed3ae
authored
Mar 08, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 3.0年后需求-卡券调整
parent
0113c4de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
17 deletions
+56
-17
card-item.vue
src/views/card/partials/card-item.vue
+33
-0
status-render.js
src/views/card/partials/status-render.js
+23
-17
No files found.
src/views/card/partials/card-item.vue
View file @
1f6ed3ae
<
template
>
<li
class=
"card-item inline-block"
:style=
"'border:1px solid ' + item.cardColor"
>
<div
class=
"card-item_head"
:style=
"'background:' + item.cardColor"
>
<!-- gic定义的卡券类型(0:普通卡券, 1:e待洗, 2:好办卡券, 3:微盟外部券, 4:通用外部券 -->
<el-tooltip
placement=
"top"
v-if=
"item.gicCouponType == 3 || item.gicCouponType == 4"
>
<div
style=
"max-width: 300px"
slot=
"content"
>
{{
item
.
gicCouponType
|
getTipText
}}
</div>
<span
class=
"card-item_head-tip"
>
外部券
<i
class=
"iconfont icon-xinxixianshi card-item_head-icon"
></i></span>
</el-tooltip>
<h4>
{{
item
.
cardName
}}
</h4>
<p>
{{
item
.
subName
}}
</p>
</div>
...
...
@@ -146,6 +151,15 @@ export default {
}
},
filters
:
{
getTipText
(
type
)
{
let
result
=
'--'
;
if
(
type
==
3
)
{
result
=
'当前卡券由微盟侧创建,由微盟侧进行卡券控制。在GIC侧只能用于卡券直投和只能营销。'
;
}
else
if
(
type
==
4
)
{
result
=
'当前卡券由外部创建,由外部进行卡券控制,无法在GIC侧进行发放。'
;
}
return
result
;
},
filterUseCondition
(
val
)
{
var
_useCondition
=
JSON
.
parse
(
val
);
return
(
typeof
_useCondition
.
sale_limit
===
'undefined'
?
''
:
(
typeof
_useCondition
.
sale_limit
.
fee
===
'undefined'
?
''
:
(
_useCondition
.
sale_limit
.
fee
?
'最低消费满'
+
_useCondition
.
sale_limit
.
fee
:
'无最低消费要求'
)
+
';'
)
+
(
typeof
_useCondition
.
sale_limit
.
goods
===
'undefined'
?
''
:
'消费指定商品'
+
_useCondition
.
sale_limit
.
goods
+
';'
))
+
(
typeof
_useCondition
[
'goods'
]
===
'undefined'
?
''
:
(
typeof
_useCondition
.
goods
.
ok
===
'undefined'
?
''
:
'适用商品('
+
(
_useCondition
.
goods
.
ok
||
'无'
)
+
');'
)
+
(
typeof
_useCondition
.
goods
.
no
===
'undefined'
?
''
:
'不适用商品('
+
(
_useCondition
.
goods
.
no
||
'无'
)
+
');'
))
+
(
typeof
_useCondition
.
only
===
'undefined'
||
_useCondition
.
only
==
0
?
''
:
'不可与其他优惠共享'
);
...
...
@@ -163,11 +177,30 @@ export default {
vertical-align
:
middle
;
min-height
:
376px
;
&_head
{
position
:
relative
;
width
:
100%
;
text-align
:
center
;
color
:
#fff
;
background
:
#63b359
;
padding
:
10px
0
;
.card-item_head-tip
{
position
:
absolute
;
top
:
-1px
;
left
:
-1px
;
width
:
76px
;
height
:
24px
;
line-height
:
24px
;
background
:
#d9e9f8
;
border-radius
:
3px
0px
16px
0px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#1890ff
;
cursor
:
default
;
.card-item_head-icon
{
margin-left
:
5px
;
font-size
:
12px
;
}
}
h4
{
font-size
:
16px
;
font-weight
:
500
;
...
...
src/views/card/partials/status-render.js
View file @
1f6ed3ae
...
...
@@ -14,8 +14,12 @@ export default Vue.component('render-temp', {
// 当前卡券是否 是长期有效||在投放有效期内
// putEffectiveMode 0:固定日期,1:长期
const
canGroupSend
=
this
.
item
.
putEffectiveMode
==
1
?
true
:
new
Date
()
>
new
Date
(
this
.
item
.
putBeginDate
)
&&
new
Date
()
<
new
Date
(
this
.
item
.
putEndDate
);
const
isWeimo
=
this
.
item
.
gicCouponType
==
3
;
const
isCommon
=
this
.
item
.
gicCouponType
==
4
;
// 微盟外部券:领取记录、复制、投放、报表
// 通用外部券:领取记录、复制、报表
const
bind1
=
canEdit
&&
!
isApiCreate
&&
canGroupSend
?
(
(
canEdit
&&
!
isApiCreate
&&
canGroupSend
&&
!
isCommon
)
||
isWeimo
?
(
<
a
title
=
"投放"
onClick
=
{
this
.
handler
.
bind
(
null
,
1
)}
>
<
i
class
=
"iconfont icon-daohang-"
/>
<
/a
>
...
...
@@ -27,27 +31,29 @@ export default Vue.component('render-temp', {
<
i
class
=
"el-icon-tickets"
/>
<
/a
>
);
const
bind3
=
!
isApiCreate
?
(
<
a
title
=
"编辑"
onClick
=
{
this
.
handler
.
bind
(
null
,
3
)}
>
<
i
class
=
"el-icon-edit"
/>
<
/a
>
)
:
(
''
);
const
bind4
=
canEdit
?
(
<
a
title
=
"删除"
onClick
=
{
this
.
handler
.
bind
(
null
,
4
)}
>
<
i
class
=
"el-icon-delete"
/>
<
/a
>
)
:
(
''
);
const
bind3
=
!
isApiCreate
&&
!
isWeimo
&&
!
isCommon
?
(
<
a
title
=
"编辑"
onClick
=
{
this
.
handler
.
bind
(
null
,
3
)}
>
<
i
class
=
"el-icon-edit"
/>
<
/a
>
)
:
(
''
);
const
bind4
=
canEdit
&&
!
isWeimo
&&
!
isCommon
?
(
<
a
title
=
"删除"
onClick
=
{
this
.
handler
.
bind
(
null
,
4
)}
>
<
i
class
=
"el-icon-delete"
/>
<
/a
>
)
:
(
''
);
const
bind5
=
(
<
a
title
=
"详情"
onClick
=
{
this
.
handler
.
bind
(
null
,
5
)}
>
<
i
class
=
"el-icon-document"
/>
<
/a
>
);
const
bind6
=
canEdit
&&
!
isApiCreate
?
(
(
canEdit
&&
!
isApiCreate
)
||
isWeimo
||
isCommon
?
(
<
a
title
=
"复制"
onClick
=
{
this
.
handler
.
bind
(
null
,
6
)}
>
<
i
class
=
"iconfont icon-wxcard-copy"
/>
<
/a
>
...
...
@@ -56,7 +62,7 @@ export default Vue.component('render-temp', {
);
const
bind7
=
canEdit
&&
!
isApiCreate
?
(
(
canEdit
&&
!
isApiCreate
)
||
isWeimo
||
isCommon
?
(
<
a
style
=
"position:relative;top:1px"
title
=
"领取记录"
onClick
=
{
this
.
handler
.
bind
(
null
,
7
)}
>
<
i
class
=
"iconfont icon-tubiaozhizuomoban-"
/>
<
/a
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment