Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 fed29fb0
authored
Apr 18, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
折扣券,优惠内容,使用限制添加验证
1 parent
f33e4390
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
View file @
fed29fb
...
...
@@ -162,6 +162,9 @@ export default {
editRule
:
{
anticipatedCost
:
[{
required
:
true
,
message
:
'请输入预估成本'
,
trigger
:
'change'
}],
couponName
:
[{
required
:
true
,
message
:
'请输入优惠券名称'
,
trigger
:
'change'
}],
discountIntensity
:
[{
required
:
true
,
message
:
'请输入优惠内容'
,
trigger
:
'change'
}],
useBarriers
:
[{
required
:
true
,
message
:
'请选择使用限制'
,
trigger
:
'change'
}],
full
:
[{
required
:
true
,
message
:
'请输入金额'
,
trigger
:
'blur'
}],
effectiveType
:
[{
required
:
true
,
message
:
'请选择有效期'
,
trigger
:
'change'
}],
effectiveTime
:
[{
required
:
true
,
message
:
'有效期不能为空'
,
trigger
:
'change'
}],
effectiveDays
:
[{
required
:
true
,
message
:
'有效天数不能为空'
,
trigger
:
'blur'
}],
...
...
@@ -373,6 +376,12 @@ export default {
}
else
{
this
.
editRule
.
effectiveDays
[
0
].
required
=
false
}
if
(
form
.
useBarriers
==
'2'
)
{
//判断 使用限制-订单满多少可用是否验证
this
.
editRule
.
full
[
0
].
required
=
true
}
else
{
this
.
editRule
.
full
[
0
].
required
=
false
}
if
(
this
.
editForm
.
discountIntensity
==
0
)
{
this
.
editForm
.
discountIntensity
=
''
}
...
...
@@ -413,7 +422,7 @@ export default {
//库存
obj
.
stock
=
form
.
stock
//折扣
obj
.
discountIntensity
=
form
.
discountIntensity
*
100
obj
.
discountIntensity
=
(
form
.
discountIntensity
*
100
).
toFixed
(
0
)
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
obj
.
useType
=
1
//有效期或者间隔天数使用次数
...
...
@@ -424,7 +433,7 @@ export default {
//是否定制礼包专用
obj
.
directionalFlag
=
form
.
directionalFlag
//预估成本
obj
.
anticipatedCost
=
form
.
anticipatedCost
*
100
obj
.
anticipatedCost
=
(
form
.
anticipatedCost
*
100
).
toFixed
(
0
)
return
obj
},
...
...
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