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
d66459d7
Commit
d66459d7
authored
Jan 20, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1月迭代'
parents
5af0adad
8935344d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
164 additions
and
54 deletions
+164
-54
index.scss
src/assets/style/components/index.scss
+5
-0
card.js
src/router/modules/card.js
+2
-1
index.js
src/service/api/index.js
+0
-1
index.js
src/utils/index.js
+1
-1
form.js
src/views/card/form.js
+49
-15
form.vue
src/views/card/form.vue
+48
-12
index.vue
src/views/card/index.vue
+4
-1
list.vue
src/views/card/list.vue
+41
-14
card-item.vue
src/views/card/partials/card-item.vue
+4
-1
send-preview.vue
src/views/card/partials/send-preview.vue
+3
-3
form.js
src/views/ecm/form.js
+7
-5
No files found.
src/assets/style/components/index.scss
View file @
d66459d7
...
...
@@ -265,3 +265,7 @@
border
:
1px
solid
rgba
(
255
,
213
,
145
,
1
);
}
}
/*tooltip宽度*/
.el-tooltip__popper
{
max-width
:
400px
!
important
;
}
\ No newline at end of file
src/router/modules/card.js
View file @
d66459d7
...
...
@@ -10,7 +10,8 @@ export default {
name
:
'卡券库'
,
component
:
()
=>
import
(
/* webpackChunkName: "card" */
'../../views/card/list.vue'
),
meta
:
{
path
:
'/card/list'
path
:
'/card/list'
,
keepAlive
:
true
}
},
{
...
...
src/service/api/index.js
View file @
d66459d7
...
...
@@ -21,7 +21,6 @@ let _requests = [];
axios
.
defaults
.
baseURL
=
_apiHost
;
console
.
log
(
axios
.
defaults
);
// 创建一个请求实例
/**
* 添加请求,显示loading
...
...
src/utils/index.js
View file @
d66459d7
...
...
@@ -10,7 +10,7 @@ import Vue from 'vue';
*/
export
const
log
=
msg
=>
{
if
(
_isDev
&&
console
&&
console
.
log
)
{
console
.
log
(
msg
);
//
console.log(msg);
}
};
...
...
src/views/card/form.js
View file @
d66459d7
...
...
@@ -70,7 +70,10 @@ const initForm = {
bannerJumpUrl
:
{},
giveRule
:
'1.卡券新老用户同享。
\
n2.用户使用卡券下单,订单取消后,卡券将自动失效'
,
wmCouponJson
:
{},
wmCouponFlag
:
0
wmCouponFlag
:
0
,
useCardCodePrefix
:
0
,
//code类型随机生时 前缀复选框的值
cardCodePrefix
:
''
,
// code类型随机生成 前缀值
only
:
true
// 默认优惠不共享 true
};
const
sale_limit
=
{
fee
:
0
,
goods
:
''
,
flag
:
false
,
type
:
0
};
//最低消费
const
goods
=
{
ok
:
''
,
no
:
''
,
flag
:
false
};
...
...
@@ -135,6 +138,12 @@ export default {
}
callback
();
};
const
validCardCodePrefix
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
form
.
useCardCodePrefix
&&
!
value
)
{
callback
(
new
Error
(
'请输入卡券code前缀'
));
}
callback
();
};
const
that
=
this
;
return
{
isEffective
:
false
,
...
...
@@ -149,7 +158,6 @@ export default {
form
:
JSON
.
parse
(
JSON
.
stringify
(
initForm
)),
sale_limit
:
JSON
.
parse
(
JSON
.
stringify
(
sale_limit
)),
goods
:
JSON
.
parse
(
JSON
.
stringify
(
goods
)),
only
:
true
,
// 默认优惠共享 true
cardLimitRadio
:
1
,
rules
:
{
cardApplyChannel
:
{
required
:
true
,
type
:
'array'
,
message
:
'请选择卡券渠道'
,
trigger
:
'change'
},
...
...
@@ -169,7 +177,8 @@ export default {
// giveRule: { required: true, message: '请输入卡券转赠规则', trigger: 'blur' },
// giveImage: { required: true, message: '请上传转赠封面', trigger: 'change' },
// bannerImage: { required: true, message: '请上传转赠页面首图', trigger: 'change' },
bannerJumpUrl
:
{
validator
:
validBannerJumpUrl
,
trigger
:
'change'
}
bannerJumpUrl
:
{
validator
:
validBannerJumpUrl
,
trigger
:
'change'
},
cardCodePrefix
:
{
validator
:
validCardCodePrefix
,
trigger
:
'change'
}
},
startDayOptions
:
[],
cardApplyChannelOptions
:
[],
...
...
@@ -226,6 +235,7 @@ export default {
}
],
coupGoodsWeimobList
:
[],
cardCodePrefixFlag
:
0
,
// 是否 code类型随机生成时 展示 前缀
// ----微盟适用商品结束----
wmShopAddDisabled
:
true
,
// 添加店铺是否可用
wmShopIds
:
[],
// 保存过的店铺id不能重复选择
...
...
@@ -505,6 +515,9 @@ export default {
},
//切换卡券类型 表单置为默认值
reset
(
e
)
{
initForm
.
useCardCodePrefix
=
this
.
form
.
useCardCodePrefix
;
initForm
.
cardCodePrefix
=
this
.
form
.
cardCodePrefix
;
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
initForm
));
this
.
sale_limit
=
JSON
.
parse
(
JSON
.
stringify
(
sale_limit
));
this
.
goods
=
JSON
.
parse
(
JSON
.
stringify
(
goods
));
...
...
@@ -517,6 +530,7 @@ export default {
if
(
this
.
isAdd
&&
this
.
cardApplyChannelOptions
.
some
(
v
=>
v
.
value
===
'offlineStore'
))
{
this
.
form
.
cardApplyChannel
=
[
'offlineStore'
];
}
this
.
$refs
.
form
.
clearValidate
();
},
//卡券营销--卡券库--新建/编辑卡券/卡券记录-领取记录-点击卡券查看详情
async
getCardDetail
()
{
...
...
@@ -526,6 +540,12 @@ export default {
this
.
couponAutoGetStock
=
manualGetFlagSettingRes
.
result
.
couponAutoGetStock
;
this
.
wmCouponJson
=
JSON
.
parse
(
manualGetFlagSettingRes
.
result
.
wmCouponJson
||
'{}'
);
this
.
wmCouponFlag
=
manualGetFlagSettingRes
.
result
.
wmCouponFlag
;
this
.
cardCodePrefixFlag
=
manualGetFlagSettingRes
.
result
.
cardCodePrefixFlag
;
if
(
this
.
isAdd
&&
manualGetFlagSettingRes
.
result
.
cardCodePrefixDefault
)
{
this
.
form
.
cardCodePrefix
=
manualGetFlagSettingRes
.
result
.
cardCodePrefixDefault
;
this
.
form
.
useCardCodePrefix
=
1
;
}
let
res
=
null
;
if
(
this
.
isCopy
)
{
res
=
await
copyCardDetailService
({
coupCardId
:
this
.
$route
.
params
.
id
});
...
...
@@ -566,7 +586,6 @@ export default {
const
dicMap
=
res
.
result
.
dicMap
;
this
.
startDayOptions
=
Object
.
keys
(
dicMap
).
map
(
key
=>
({
label
:
dicMap
[
key
].
dictName
==
'0'
?
'当天'
:
'第'
+
dicMap
[
key
].
dictName
+
'天'
,
value
:
parseInt
(
dicMap
[
key
].
dictName
)
}));
this
.
form
.
onlyFlag
=
res
.
result
.
onlyFlag
;
if
(
res
.
result
.
card
)
{
const
card
=
res
.
result
.
card
;
// 3、4为外部券,不显示保存按钮
...
...
@@ -585,7 +604,10 @@ export default {
this
.
form
.
erpDemoCode
=
card
.
erpDemoCode
||
''
;
this
.
form
.
cardColor
=
card
.
cardColor
;
this
.
form
.
cardDenomination
=
card
.
cardDenomination
||
0
;
if
(
!
this
.
isAdd
)
{
this
.
form
.
cardCodePrefix
=
card
.
cardCodePrefix
;
this
.
form
.
useCardCodePrefix
=
card
.
useCardCodePrefix
;
}
if
(
this
.
isCopy
&&
!
res
.
result
.
giveEnable
)
{
this
.
form
.
giveFlag
=
0
;
}
...
...
@@ -618,8 +640,7 @@ export default {
if
(
this
.
goods
.
ok
||
this
.
goods
.
no
)
{
this
.
goods
.
flag
=
true
;
}
this
.
only
=
Boolean
(
useCondition
.
only
);
this
.
form
.
only
=
Boolean
(
useCondition
.
only
);
this
.
form
.
proNoList
=
useCondition
.
proNo
?
[{
name
:
useCondition
.
proNo
,
id
:
useCondition
.
proNo
}]
:
[];
}
if
((
this
.
isInfo
||
this
.
isEdit
)
&&
card
.
weimobDemoCode
&&
JSON
.
parse
(
card
.
weimobDemoCode
).
length
>
0
)
{
...
...
@@ -931,6 +952,10 @@ export default {
if
(
valid
)
{
this
.
saveUpdateCard
();
}
else
{
if
(
!
this
.
form
.
useCustomCode
&&
this
.
cardCodePrefixFlag
&&
this
.
form
.
useCardCodePrefix
&&
!
this
.
form
.
cardCodePrefix
)
{
this
.
$tips
({
type
:
'warning'
,
message
:
'卡券code前缀不能为空'
});
return
false
;
}
this
.
$tips
({
type
:
'warning'
,
message
:
'表单提交错误,请检查表单是否填写完整'
});
return
false
;
}
...
...
@@ -971,8 +996,8 @@ export default {
no
:
this
.
goods
.
no
}
};
if
(
this
.
only
)
{
card
.
useCondition
.
only
=
Number
(
this
.
only
);
if
(
this
.
form
.
only
)
{
card
.
useCondition
.
only
=
Number
(
this
.
form
.
only
);
}
//[折扣券]: goods.ok 适用商品, goods.no 不适应商品, only: 1 不与其他优惠共享(不勾选only不传)
}
else
if
(
this
.
form
.
cardType
===
1
)
{
...
...
@@ -981,11 +1006,11 @@ export default {
ok
:
this
.
goods
.
ok
,
no
:
this
.
goods
.
no
},
only
:
Number
(
this
.
only
),
only
:
Number
(
this
.
form
.
only
),
discount_amount_upper_limit
:
this
.
form
.
discount_amount_upper_limit
};
if
(
this
.
only
)
{
card
.
useCondition
.
only
=
Number
(
this
.
only
);
if
(
this
.
form
.
only
)
{
card
.
useCondition
.
only
=
Number
(
this
.
form
.
only
);
}
// sale_limit.fee 消费金额满,sale_limit.goods 消费指定商品; goods.ok 适用商品, goods.no 不适应商品, only: 1 不与其他优惠共享(不勾选only不传)
}
else
if
(
this
.
form
.
cardType
===
2
)
{
...
...
@@ -995,7 +1020,7 @@ export default {
ok
:
this
.
goods
.
ok
,
no
:
this
.
goods
.
no
},
only
:
Number
(
this
.
only
),
only
:
Number
(
this
.
form
.
only
),
proNo
:
this
.
form
.
proNoList
.
length
?
this
.
form
.
proNoList
[
0
].
id
:
''
,
products_exchange_number
:
this
.
form
.
proNoList
.
length
?
this
.
form
.
products_exchange_number
:
0
};
...
...
@@ -1005,8 +1030,8 @@ export default {
}
else
if
(
this
.
sale_limit
.
type
==
2
)
{
card
.
useCondition
.
sale_limit
=
{
goods
:
this
.
sale_limit
.
goods
};
}
if
(
this
.
only
)
{
card
.
useCondition
.
only
=
Number
(
this
.
only
);
if
(
this
.
form
.
only
)
{
card
.
useCondition
.
only
=
Number
(
this
.
form
.
only
);
}
}
...
...
@@ -1075,6 +1100,10 @@ export default {
}
card
.
cardCodeCount
=
this
.
form
.
customCodeEnd
-
this
.
form
.
customCodeBegin
+
1
;
}
else
{
if
(
this
.
form
.
useCardCodePrefix
){
card
.
cardCodePrefix
=
this
.
form
.
cardCodePrefix
}
card
.
useCardCodePrefix
=
this
.
form
.
useCardCodePrefix
card
.
cardCodeCount
=
this
.
form
.
cardCodeCount
;
}
// 用户使用有效期
...
...
@@ -1174,7 +1203,9 @@ export default {
this
.
getCardDetail
();
});
}
else
{
console
.
log
(
this
.
$route
.
meta
.
refresh
)
this
.
$tips
({
type
:
'success'
,
message
:
'新建卡券成功'
});
this
.
$route
.
meta
.
refresh
=
true
;
this
.
$router
.
push
(
'/card/list'
);
}
}
else
{
...
...
@@ -1540,6 +1571,9 @@ export default {
if
(
this
.
isAdd
)
{
this
.
$refs
.
storeCard
.
init
();
}
if
(
this
.
isAdd
||
this
.
isCopy
){
this
.
$route
.
meta
.
refresh
=
false
;
}
},
created
()
{
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
,
path
:
''
},
{
name
:
'卡券营销'
,
path
:
''
},
{
name
:
'卡券库'
,
path
:
'/card/list'
},
{
name
:
'卡券详情'
,
path
:
''
}]);
// eslint-disable-line
...
...
src/views/card/form.vue
View file @
d66459d7
...
...
@@ -36,17 +36,26 @@
<el-input
v-model=
"form.erpDemoCode"
class=
"w400"
placeholder=
"请输入demo券号"
:disabled=
"isEdit || isInfo"
@
blur=
"checkErpDemoCode"
></el-input>
</el-form-item>
<!-- 微盟微商城 微盟
券号
-->
<!-- 微盟微商城 微盟
卡券
-->
<template
v-if=
"showWeimobDemoSelector || (form.cardApplyChannel.indexOf('WMmicroMall') !== -1 && countFlag)"
>
<el-alert
type=
"warning"
show-icon
:closable=
"false"
class=
"f-alert"
style=
"margin-bottom: 10px;margin-left:130px;"
>
<span
slot=
"title"
>
选择设置微盟微商城-微盟券号时,卡券信息将以微盟侧为准,本页填写信息将视为无效。
</span>
<el-alert
type=
"warning"
:closable=
"false"
class=
"f-alert"
style=
"margin-bottom: 10px;margin-left:130px;"
>
<span
slot=
"title"
>
<div
class=
"info-line"
>
<div
class=
"dot"
></div>
<p
style=
"margin-left: 8px;"
>
1、若需创建在微盟微商城与线下都可用的卡券,请在下方选择对应的微盟卡券。GIC卡券的相关信息应与对应的微盟卡券保持一致,避免核销客诉!
</p>
</div>
<div
class=
"info-line"
>
<div
class=
"dot"
style=
"top: 6px;"
></div>
<p
style=
"margin-left: 8px;"
>
2、若需创建在微盟微商城与线下都可用的卡券,请确保微盟侧【设置-订单设置-售后流程设置】中的“售后退券设置”为“支付前整单取消,退优惠券”,而不是其他设置,否则会导致微盟订单自动取消!
</p>
</div>
</span>
</el-alert>
<el-form-item
label=
"微盟
券号
"
>
<el-form-item
label=
"微盟
卡券
"
>
<div
class=
"mb10"
v-for=
"(saveItem, idx) in weimobDemoCodeList"
:key=
"idx"
>
<el-select
class=
"w200"
:disabled=
"saveItem.save || isEdit || isInfo"
v-model=
"saveItem.pid"
filterable
placeholder=
"请选择店铺"
clearable
@
change=
"handleShopChange($event, idx)"
>
<el-option
:disabled=
"wmShopIds.includes(item.wmPid)"
v-for=
"item in weimobShopList"
:key=
"item.wmPid"
:label=
"item.wmPidName"
:value=
"item.wmPid"
></el-option>
</el-select>
<el-select
:disabled=
"!saveItem.pid || saveItem.save || isEdit || isInfo"
:loading=
"saveItem.loading"
class=
"w200"
v-model=
"saveItem.card"
filterable
placeholder=
"请选择微盟
券号
"
clearable
>
<el-select
:disabled=
"!saveItem.pid || saveItem.save || isEdit || isInfo"
:loading=
"saveItem.loading"
class=
"w200"
v-model=
"saveItem.card"
filterable
placeholder=
"请选择微盟
卡券
"
clearable
>
<el-option
v-for=
"item in saveItem.cardList"
:key=
"item.cardTemplateId"
:label=
"item.name"
:value=
"item.cardTemplateId"
></el-option>
</el-select>
<template
v-if=
"isAdd || isCopy"
>
...
...
@@ -110,8 +119,10 @@
</div>
<el-alert
type=
"warning"
show-icon
:closable=
"false"
class=
"f-alert"
>
<span
slot=
"title"
>
微盟适用商品数据来源于微盟侧商品及商品参数,请确保填写正确。
<b
v-if=
"latestReptileTime"
>
最近同步时间 {{ latestReptileTime }}
</b>
<div
class=
"info-line"
>
微盟适用商品数据来源于微盟侧商品及商品参数,请确保填写正确。
<b
v-if=
"latestReptileTime"
>
最近同步时间 {{ latestReptileTime }}
</b>
</div>
</span>
</el-alert>
</div>
...
...
@@ -205,7 +216,7 @@
<!-- <el-checkbox v-model="only" :disabled="isEdit || isInfo">不与其它优惠共享</el-checkbox>
<span class="fz12 gray ml5">* 无实际业务,仅用于ERP或第三方接口回传</span> -->
<span
style=
"position:relative"
>
与其它优惠共享
<b
style=
"text-align:right;font-style:normal;font-size:12px;position:absolute;bottom:-28px;display:block;width: 150px;right: 0;"
class=
"gray"
>
(卡券叠加、门店活动等)
</b></span>
<el-switch
v-model=
"only"
:disabled=
"isEdit || isInfo"
:active-value=
"false"
:inactive-value=
"true"
class=
"ml5"
@
change=
"changeOnly"
></el-switch>
<el-switch
v-model=
"
form.
only"
:disabled=
"isEdit || isInfo"
:active-value=
"false"
:inactive-value=
"true"
class=
"ml5"
@
change=
"changeOnly"
></el-switch>
<ul
class=
"fz12 gray ml5"
style=
"width: 350ox;display:inline-block;vertical-align: top;"
>
<li>
用于ERP或第三方的卡券适用判定
</li>
<li>
开启后可与其它卡券叠加或在门店活动中使用(需要单独对接)
</li>
...
...
@@ -226,7 +237,14 @@
<el-radio
v-model=
"form.useCustomCode"
:label=
"0"
:disabled=
"isEdit || isInfo"
>
随机生成
</el-radio>
<el-radio
v-model=
"form.useCustomCode"
:label=
"1"
:disabled=
"isEdit || isInfo"
>
自定义号段
</el-radio>
</el-form-item>
<el-form-item
prop=
"cardCodePrefix"
label=
"code号段"
v-if=
"cardCodePrefixFlag && form.useCustomCode === 0"
>
<span
class=
"fz13 gray"
>
卡券code格式:随机编码
</span>
<div
class=
"pt20"
>
<el-checkbox
v-model=
"form.useCardCodePrefix"
:true-label=
"1"
:false-label=
"0"
:disabled=
"isEdit || isInfo"
>
前缀
</el-checkbox>
<el-input
class=
"w140"
:disabled=
"isEdit || isInfo"
placeholder=
"3位以内字母/数字"
@
focus=
"form.useCardCodePrefix = 1"
v-model=
"form.cardCodePrefix"
:maxlength=
"3"
@
blur=
"checkInputString(form.cardCodePrefix, 'cardCodePrefix')"
></el-input>
<span
class=
"fz13 gray"
>
请确保ERP支持添加前缀后的code
</span>
</div>
</el-form-item>
<el-form-item
prop=
"customCodeBegin"
label=
"code号段"
v-show=
"form.useCustomCode === 1"
>
<el-input
:disabled=
"isEdit || isInfo"
:min=
"0"
:maxlength=
"16"
class=
"w250"
v-model=
"form.customCodeBegin"
@
blur=
"checkInputNumber(form.customCodeBegin, 'customCodeBegin')"
></el-input>
—
<el-input
:disabled=
"isEdit || isInfo"
:min=
"0"
:maxlength=
"16"
class=
"w250"
v-model=
"form.customCodeEnd"
@
blur=
"checkInputNumber(form.customCodeEnd, 'customCodeEnd')"
></el-input>
...
...
@@ -349,7 +367,11 @@
<
el
-
form
-
item
label
=
"适用门店"
>
<
el
-
radio
:
disabled
=
"isEdit"
v
-
model
=
"storeMode"
:
label
=
"0"
>
所有门店
<
/el-radio
>
<
el
-
radio
:
disabled
=
"isEdit"
v
-
model
=
"storeMode"
:
label
=
"1"
>
部分门店
<
/el-radio
>
<
span
v
-
if
=
"isEdit"
class
=
"fz12 gray ml20"
>
编辑适用门店前会员领取该卡券不包含新增的适用门店;编辑适用门店后会员领取该卡券包含新增的适用门店。
<
/span
>
<
div
v
-
if
=
"isEdit"
class
=
"fz12 gray"
>
*
修改适用门店前客户领取的卡券以修改前为准,修改后客户领取的卡券适用门店以修改后为准;
<
br
/>
*
仅支持选择创建人管辖门店范围内的门店
<
/div
>
<
div
class
=
"fz12 gray "
v
-
else
>*
仅支持选择账号管辖门店范围内的门店;
<
/div
>
<!--
:
readonly
=
"isEdit"
-->
<
vue
-
gic
-
store
-
card
class
=
"pt10"
:
readonly
=
"isInfo"
v
-
bind
=
"storeParams"
v
-
show
=
"storeMode"
ref
=
"storeCard"
:
uuid
.
sync
=
"uuid"
><
/vue-gic-store-card
>
<
el
-
alert
v
-
show
=
"storeMode && form.cardApplyChannel.indexOf('WMmicroMall') !== -1"
title
=
"选择的门店必须保持与微盟侧门店一致,请确认选择无误"
type
=
"warning"
show
-
icon
:
closable
=
"false"
class
=
"mt20 width80"
><
/el-alert
>
...
...
@@ -406,11 +428,25 @@ export default cardForm;
margin
-
bottom
:
80
px
!
important
;
}
.
f
-
alert
{
width
:
9
0
0
px
!
important
;
width
:
9
2
0
px
!
important
;
/deep/
.
el
-
alert__content
{
height
:
18
px
;
line
-
height
:
18
px
;
}
.
info
-
line
{
align
-
items
:
center
;
display
:
flex
;
color
:
#
303133
;
position
:
relative
;
}
.
dot
{
width
:
5
px
;
height
:
5
px
;
background
:
#
faad14
;
border
-
radius
:
2.5
px
;
left
:
-
5
px
;
position
:
absolute
;
margin
-
right
:
8
px
;
}
}
.
complex
-
and
{
color
:
#
535353
;
...
...
src/views/card/index.vue
View file @
d66459d7
<
template
>
<div>
<router-view
/>
<keep-alive>
<router-view
v-if=
"$route.meta.keepAlive"
/>
</keep-alive>
<router-view
v-if=
"!this.$route.meta.keepAlive"
/>
</div>
</
template
>
<
script
>
...
...
src/views/card/list.vue
View file @
d66459d7
...
...
@@ -65,24 +65,48 @@ export default {
'adjust-stock'
:
adjustStock
,
'card-item'
:
cardItem
},
created
()
{
window
.
scrollTo
(
0
,
0
);
this
.
getTableList
();
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
,
path
:
''
},
{
name
:
'卡券营销'
,
path
:
''
},
{
name
:
'卡券库'
,
path
:
''
}]);
// eslint-disable-line
},
mounted
()
{
// this.$store.commit(
// 'mutations_layoutTips',
// `
<
div
class
=
"layout--tips"
>
//
<
i
class
=
"el-icon-info"
><
/i
>
// 由于微信侧对卡券业务的调整,2021年1月5日0点起,达摩GIC将从原先的微信卡券切换至GIC卡券,主体功能保持不变。届时与微信相关的微信卡包将不再支持,敬请谅解。
//
<
/div
>
// `
// );
console
.
log
(
'mounted'
);
// window.scrollTo(0, 0);
// this.getTableList();
// this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '' }]); // eslint-disable-line
},
beforeDestroy
()
{
this
.
$store
.
commit
(
'mutations_layoutTips'
,
''
);
},
beforeRouteEnter
(
to
,
from
,
next
)
{
const
{
meta
:
{
type
,
path
,
refresh
}
}
=
from
;
if
(
path
!==
to
.
meta
.
path
)
{
to
.
meta
.
refresh
=
true
;
}
else
{
if
((
type
===
'add'
||
type
===
'copy'
)
&&
refresh
)
{
to
.
meta
.
refresh
=
true
;
}
else
{
to
.
meta
.
refresh
=
false
;
}
}
next
();
},
activated
()
{
console
.
log
(
'activated'
);
window
.
scrollTo
(
0
,
0
);
if
(
this
.
$route
.
meta
.
refresh
)
{
this
.
listParams
=
{
shelfId
:
''
,
sortBy
:
''
,
searchParam
:
''
,
currentPage
:
1
,
pageSize
:
20
,
cardType
:
''
,
showSelfFlag
:
''
,
effectiveFlag
:
0
// 1有效 0全部
};
}
this
.
getTableList
();
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
,
path
:
''
},
{
name
:
'卡券营销'
,
path
:
''
},
{
name
:
'卡券库'
,
path
:
''
}]);
// eslint-disable-line
},
methods
:
{
//编辑库存 前置
preAdjustStock
(
val
)
{
...
...
@@ -113,7 +137,10 @@ export default {
})
||
[];
this
.
total
=
res
.
result
.
totalCount
;
}
catch
(
err
)
{
this
.
$tips
({
type
:
'error'
,
message
:
'加载列表失败'
});
if
(
err
)
{
console
.
log
(
err
);
this
.
$tips
({
type
:
'error'
,
message
:
'加载列表失败'
});
}
}
this
.
loading
=
false
;
},
...
...
src/views/card/partials/card-item.vue
View file @
d66459d7
...
...
@@ -28,7 +28,10 @@
<p>
销售额
</p>
</div>
<el-tooltip
class=
"item"
effect=
"dark"
open-delay=
"300"
>
<div
slot=
"content"
>
{{
item
.
isApiCreate
?
'该卡券为外部接口创建卡券无法用于营销'
:
'卡券的领取数量
\
使用数量
\
核销率
\
销售额统计数据每隔3小时更新一次'
}}
</div>
<div
slot=
"content"
>
<span
v-if=
"item.isApiCreate"
>
该卡券为外部接口创建卡券无法用于营销
</span>
<span
v-else
>
1.卡券的领取数量\使用数量\核销率\销售额统计数据每隔3小时更新一次;
<br
/>
2.销售额:此卡券参与核销的订单应收总金额(若订单发生退款则金额扣除)。一笔订单若使用多张相同卡券,只计一笔订单的金额
</span>
</div>
<i
style=
"position:absolute;right:10px;top:10px;cursor:pointer;color:#c0c4cc;font-size:18px;"
class=
"el-icon-question"
></i>
</el-tooltip>
</div>
...
...
src/views/card/partials/send-preview.vue
View file @
d66459d7
...
...
@@ -31,8 +31,8 @@
</div>
<div
class=
"card-d"
>
<p
class=
"card-d-title ellipsis"
>
<
span
:style=
"`background:$
{data.cardColor}`">
{{
data
.
cardType
|
dct
}}
</span
>
{{
data
.
cardName
}}
<
!--
<span
:style=
"`background:$
{data.cardColor}`">
{{
data
.
cardType
|
dct
}}
</span>
-->
{{
data
.
cardName
}}
</p>
<p
class=
"card-d-time"
v-if=
"data.cardEffectiveMode == 0"
>
{{
time
}}
</p>
<p
class=
"card-d-time ellipsis"
v-if=
"data.cardEffectiveMode == 1"
>
领取后
{{
(
data
.
startDay
===
0
?
'当'
:
'第'
+
data
.
startDay
)
+
'天,有效天数'
+
data
.
limitDay
}}
天
</p>
...
...
@@ -352,7 +352,7 @@ export default {
margin-bottom
:
11px
;
position
:
relative
;
margin-top
:
2px
;
padding-left
:
48px
;
//
padding-left
:
48px
;
span
{
position
:
absolute
;
left
:
-20px
;
...
...
src/views/ecm/form.js
View file @
d66459d7
...
...
@@ -367,7 +367,7 @@ export default {
async
listTemplateVariables
()
{
this
.
loading
=
true
;
try
{
let
res
=
await
listTemplateVariables
();
let
res
=
await
listTemplateVariables
()
.
finally
(()
=>
(
this
.
loading
=
false
))
;
if
(
res
.
errorCode
===
0
)
{
const
result
=
res
.
result
;
this
.
options
=
Object
.
keys
(
result
).
map
(
v
=>
({
label
:
result
[
v
],
value
:
v
}));
...
...
@@ -402,10 +402,12 @@ export default {
},
// 获取商户卡券自动领取配置
getCardManualSetting
()
{
getCardManualSetting
().
then
(
res
=>
{
this
.
couponAutoGetFlag
=
res
.
result
.
couponAutoGetFlag
||
0
;
this
.
couponAutoGetStock
=
res
.
result
.
couponAutoGetStock
;
});
getCardManualSetting
()
.
then
(
res
=>
{
this
.
couponAutoGetFlag
=
res
.
result
.
couponAutoGetFlag
||
0
;
this
.
couponAutoGetStock
=
res
.
result
.
couponAutoGetStock
;
})
.
finally
(()
=>
(
this
.
loading
=
false
));
},
// 获取ecm信息
async
getEcmInfo
(
isResetTemplate
=
false
)
{
...
...
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