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
1407dd69
Commit
1407dd69
authored
Mar 19, 2021
by
黑潮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 卡券库调整
parent
a79bc9ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
form.js
src/views/card/form.js
+13
-6
form.vue
src/views/card/form.vue
+7
-7
status-render.js
src/views/card/partials/status-render.js
+2
-1
No files found.
src/views/card/form.js
View file @
1407dd69
...
...
@@ -248,7 +248,8 @@ export default {
// 转赠页面首图
code
:
'015f1e5a-3b2f-42f5-b638-6a29c17e8f7e'
,
imgUrl
:
'https://pic01-10001430.image.myqcloud.com/015f1e5a-3b2f-42f5-b638-6a29c17e8f7e'
}
},
showWeimobDemoSelector
:
false
};
},
watch
:
{
...
...
@@ -404,6 +405,7 @@ export default {
},
// 改变用户使用有效期类型
changeCardEffectiveMode
(
val
,
cover
=
true
)
{
this
.
form
.
sendDateTime
=
[];
this
.
reCheckSendDateTime
();
const
{
dateTime
,
sendDateTime
}
=
this
.
form
;
if
(
!
cover
&&
sendDateTime
&&
sendDateTime
[
0
])
{
...
...
@@ -428,8 +430,8 @@ export default {
if
(
val
==
0
)
{
// 想要设置为自动领取
this
.
$confirm
(
`<div class="fz16 mb10">是否关闭用户手动领取?</div><div class="regular-font-color fz13">用户在领取卡券后需要<b class="bold">同步至ERP</b>,如果关闭用户<b class="bold">手动领取</b>,卡券在<b class="bold">批量投放</b>时会需要将卡券信息批量同步至ERP。
该过程可能需要持续一段时间(具体同步时间和同步卡券张数以及ERP性能有关,参考同步时间为1万张卡券1个小时)。
`<div class="fz16 mb10">是否关闭用户手动领取?</div><div class="regular-font-color fz13">用户在领取卡券后需要<b class="bold">同步至ERP</b>,如果关闭用户<b class="bold">手动领取</b>,卡券在<b class="bold">批量投放</b>时会需要将卡券信息批量同步至ERP。
该过程可能需要持续一段时间(具体同步时间和同步卡券张数以及ERP性能有关,参考同步时间为1万张卡券1个小时)。
当前支持不需要用户手动领取的卡券库存最大值为<b class="bold">
${
this
.
couponAutoGetStock
}
</b>张。</div>`
,
'提示'
,
{
...
...
@@ -562,7 +564,9 @@ export default {
this
.
only
=
Boolean
(
useCondition
.
only
);
this
.
form
.
proNoList
=
useCondition
.
proNo
?
[{
name
:
useCondition
.
proNo
,
id
:
useCondition
.
proNo
}]
:
[];
}
if
(
card
.
weimobDemoCode
&&
JSON
.
parse
(
card
.
weimobDemoCode
).
length
>
0
)
{
this
.
showWeimobDemoSelector
=
true
;
}
// 微盟券号 -- 复制不赋值
if
(
card
.
cardApplyChannel
.
indexOf
(
'WMmicroMall'
)
!==
-
1
&&
card
.
weimobDemoCode
&&
(
this
.
isAdd
||
this
.
isInfo
||
this
.
isEdit
))
{
this
.
weimobDemoCodeList
=
JSON
.
parse
(
card
.
weimobDemoCode
).
map
(
v
=>
{
...
...
@@ -998,7 +1002,7 @@ export default {
card
.
startDay
=
this
.
form
.
startDay
||
0
;
card
.
limitDay
=
this
.
form
.
limitDay
||
0
;
}
// 卡券模板投放期限 putEffectiveMode(0:固定日期,1:长期)
const
{
cardEffectiveMode
,
putEffectiveMode
,
sendDateTime
}
=
this
.
form
;
card
.
putEffectiveMode
=
cardEffectiveMode
==
0
||
(
cardEffectiveMode
==
1
&&
putEffectiveMode
==
0
)
?
0
:
1
;
...
...
@@ -1007,7 +1011,7 @@ export default {
card
.
putBeginDate
=
formatDateTimeByType
(
sendDateTime
[
0
],
'yyyy-MM-dd'
);
card
.
putEndDate
=
formatDateTimeByType
(
sendDateTime
[
1
],
'yyyy-MM-dd'
);
}
card
.
jumpFlag
=
this
.
form
.
jumpFlag
;
card
.
jumpLink
=
card
.
jumpFlag
?
this
.
form
.
jumpLink
:
{};
...
...
@@ -1150,6 +1154,9 @@ export default {
if
(
now
.
expireDateType
==
1
)
{
this
.
form
.
cardEffectiveMode
=
0
;
this
.
form
.
dateTime
=
[
now
.
startDate
,
now
.
expireDate
];
this
.
$nextTick
(()
=>
{
this
.
$refs
.
effectDate
.
$emit
(
'change'
,
0
,
false
);
})
}
if
(
now
.
expireDateType
==
2
)
{
if
(
now
.
expDayCount
>
1200
)
{
...
...
src/views/card/form.vue
View file @
1407dd69
...
...
@@ -30,7 +30,7 @@
</el-form-item>
<!-- 微盟微商城 微盟券号 -->
<template
v-if=
"
form.cardApplyChannel.indexOf('WMmicroMall') !== -1 && countFlag
"
>
<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>
...
...
@@ -59,7 +59,7 @@
</el-form-item>
<!-- 抵金券 -->
<el-form-item
prop=
"cardDenomination"
label=
"减免金额"
v-if=
"form.cardType === 0"
>
<el-input-number
controls-position=
"right"
:disabled=
"isEdit || isInfo"
v-model=
"form.cardDenomination"
class=
"200"
:precison=
"0"
:min=
"0"
></el-input-number>
元
<span
class=
"fz12 gray"
>
请输入大于0的整数
</span>
</el-form-item>
<el-form-item
prop=
"cardDenomination"
label=
"减免金额"
v-if=
"form.cardType === 0"
>
<el-input-number
controls-position=
"right"
:disabled=
"isEdit || isInfo"
v-model=
"form.cardDenomination"
class=
"200"
:precison=
"0"
:min=
"0"
:max=
"10000000"
></el-input-number>
元
<span
class=
"fz12 gray"
>
请输入大于0的整数
</span>
</el-form-item>
<!-- 折扣券 -->
<el-form-item
prop=
"cardDenomination"
label=
"折扣额度"
v-if=
"form.cardType === 1"
>
<el-input-number
controls-position=
"right"
:disabled=
"isEdit || isInfo"
v-model=
"form.cardDenomination"
class=
"200"
:precision=
"1"
:step=
"0.1"
:max=
"9.9"
:min=
"0"
></el-input-number>
折
<span
class=
"fz12 gray"
>
请填写1-9.9之间的数字
</span></el-form-item>
...
...
@@ -232,7 +232,7 @@
</el-tooltip>
<div>
<el-radio
@
change=
"changeCardEffectiveMode"
v-model=
"form.cardEffectiveMode"
:disabled=
"isEdit || isInfo || cardValidity"
:label=
"0"
>
固定日期
</el-radio>
<el-date-picker
@
change=
"changeCardEffectiveMode(0, false)"
v-model=
"form.dateTime"
@
focus=
"form.cardEffectiveMode = 0"
:disabled=
"isEdit || isInfo || cardValidity"
:picker-options=
"pickerOptions"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
<el-date-picker
ref=
"effectDate"
@
change=
"changeCardEffectiveMode(0, false)"
v-model=
"form.dateTime"
@
focus=
"form.cardEffectiveMode = 0"
:disabled=
"isEdit || isInfo || cardValidity"
:picker-options=
"pickerOptions"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</div>
<div
class=
"pt20"
>
<el-radio
@
change=
"changeCardEffectiveMode"
v-model=
"form.cardEffectiveMode"
:label=
"1"
:disabled=
"isEdit || isInfo || cardValidity"
>
领取后,
</el-radio>
...
...
@@ -249,13 +249,13 @@
<span
class=
"tooltip-icon cursor"
>
卡券模板投放期限
</span>
</el-tooltip>
<div
v-if=
"form.cardEffectiveMode == 0"
>
<el-date-picker
v-model=
"form.sendDateTime"
:disabled=
"isEdit || isInfo"
:picker-options=
"pickerOptions2"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
<el-date-picker
v-model=
"form.sendDateTime"
:disabled=
"isEdit || isInfo
|| form.cardApplyChannel.indexOf('WMmicroMall') !== -1
"
:picker-options=
"pickerOptions2"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
<span
class=
"gray fz13"
>
* 卡券模板投放期限结束日期不能超过卡券使用有效期固定日期结束日期
</span>
</div>
<div
v-if=
"form.cardEffectiveMode == 1"
style=
"height:35px;"
>
<el-radio
@
change=
"resetSendDateTime"
v-model=
"form.putEffectiveMode"
:disabled=
"isEdit || isInfo"
:label=
"1"
>
长期有效
</el-radio>
<el-radio
@
change=
"resetSendDateTime"
v-model=
"form.putEffectiveMode"
:disabled=
"isEdit || isInfo"
:label=
"0"
>
固定日期
</el-radio>
<el-date-picker
v-if=
"form.putEffectiveMode == 0"
v-model=
"form.sendDateTime"
@
focus=
"form.putEffectiveMode = 0"
:disabled=
"isEdit || isInfo"
:picker-options=
"pickerOptions"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
<el-radio
@
change=
"resetSendDateTime"
v-model=
"form.putEffectiveMode"
:disabled=
"isEdit || isInfo
|| form.cardApplyChannel.indexOf('WMmicroMall') !== -1
"
:label=
"1"
>
长期有效
</el-radio>
<el-radio
@
change=
"resetSendDateTime"
v-model=
"form.putEffectiveMode"
:disabled=
"isEdit || isInfo
|| form.cardApplyChannel.indexOf('WMmicroMall') !== -1
"
:label=
"0"
>
固定日期
</el-radio>
<el-date-picker
v-if=
"form.putEffectiveMode == 0"
v-model=
"form.sendDateTime"
@
focus=
"form.putEffectiveMode = 0"
:disabled=
"isEdit || isInfo
|| form.cardApplyChannel.indexOf('WMmicroMall') !== -1
"
:picker-options=
"pickerOptions"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</div>
</el-form-item>
...
...
src/views/card/partials/status-render.js
View file @
1407dd69
...
...
@@ -11,11 +11,12 @@ export default Vue.component('render-temp', {
render
(
h
)
{
const
canEdit
=
this
.
item
.
canEdit
!==
false
;
// 只有canEdit === false 才证明不能使用 没有权限仅可以详情/报表
const
isApiCreate
=
this
.
item
.
isApiCreate
||
false
;
// 由外部api创建 仅展示详情、删除、报表按钮
const
showPutonBtn
=
this
.
item
.
showPutonBtn
||
false
;
// 当前卡券是否 是长期有效||在投放有效期内
// 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
bind1
=
canEdit
&&
!
isApiCreate
&&
canGroupSend
?
(
canEdit
&&
!
isApiCreate
&&
canGroupSend
&&
showPutonBtn
?
(
<
a
title
=
"投放"
onClick
=
{
this
.
handler
.
bind
(
null
,
1
)}
>
<
i
class
=
"iconfont icon-daohang-"
/>
<
/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