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
580d0404
Commit
580d0404
authored
Aug 23, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 奥莱抵金券
parent
407b9a93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
form.js
src/views/card/form.js
+24
-1
form.vue
src/views/card/form.vue
+3
-3
No files found.
src/views/card/form.js
View file @
580d0404
...
...
@@ -207,7 +207,7 @@ export default {
// giveImage: { required: true, message: '请上传转赠封面', trigger: 'change' },
// bannerImage: { required: true, message: '请上传转赠页面首图', trigger: 'change' },
bannerJumpUrl
:
{
validator
:
validBannerJumpUrl
,
trigger
:
'change'
},
costValueProportion
:
{
required
:
true
,
message
:
'请输入成本比例'
,
trigger
:
'blur'
},
costValueProportion
:
{
required
:
true
,
message
:
'请输入
门店
成本比例'
,
trigger
:
'blur'
},
cardCodePrefix
:
{
validator
:
validCardCodePrefix
,
trigger
:
'change'
}
},
startDayOptions
:
[],
...
...
@@ -950,6 +950,12 @@ export default {
},
//提交保存
submitForm
:
_debounce
(
async
function
(
formName
)
{
function
toTop
(
container
,
target
)
{
if
(
container
.
scrollTop
>
target
)
{
container
.
scrollTop
=
container
.
scrollTop
-
26
;
setTimeout
(()
=>
toTop
(
container
,
target
),
10
);
}
}
if
(
!
this
.
$store
.
state
.
marketing
.
appletEnable
)
{
return
;
}
...
...
@@ -1016,6 +1022,23 @@ export default {
}
}
if
(
this
.
form
.
cardType
==
3
)
{
if
(
this
.
form
.
costValueProportionFlag
==
1
&&
this
.
form
.
costValueType
==
1
)
{
if
(
!
Array
.
isArray
(
this
.
originStoreList
)
||
this
.
originStoreList
.
length
==
0
)
{
this
.
$tips
({
type
:
'warning'
,
message
:
'请添加卡券适用部分门店'
});
const
body
=
document
.
getElementsByClassName
(
'dm-layout-page'
)[
0
];
toTop
(
body
,
this
.
$refs
.
costValueProportionFlag
.
$el
.
offsetTop
-
body
.
offsetTop
);
return
;
}
if
(
this
.
originStoreList
.
some
(
el
=>
el
.
costValueProportion
==
undefined
||
el
.
costValueProportion
==
null
))
{
this
.
$tips
({
type
:
'warning'
,
message
:
'请输入门店成本比例'
});
const
body
=
document
.
getElementsByClassName
(
'dm-layout-page'
)[
0
];
toTop
(
body
,
this
.
$refs
.
costValueProportionFlag
.
$el
.
offsetTop
-
body
.
offsetTop
);
return
;
}
}
}
// 验证号段 不能为空 起始号段和结尾号段必须位数一致
if
(
this
.
form
.
useCustomCode
)
{
if
(
!
this
.
form
.
customCodeBegin
||
!
this
.
form
.
customCodeEnd
)
{
...
...
src/views/card/form.vue
View file @
580d0404
...
...
@@ -78,7 +78,7 @@
<!-- 抵金券 -->
<el-form-item
prop=
"cardDenomination"
label=
"减免金额"
v-if=
"form.cardType === 0 || form.cardType == 3"
>
<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
v-if=
"form.cardType == 3"
label=
"卡券成本比例"
>
<el-form-item
v-if=
"form.cardType == 3"
label=
"卡券成本比例"
ref=
"costValueProportionFlag"
>
<el-switch
v-model=
"form.costValueProportionFlag"
:active-value=
"1"
:inactive-value=
"0"
:disabled=
"isEdit || isInfo"
></el-switch>
<div
class=
"cost-box"
v-if=
"form.costValueProportionFlag == 1"
>
<div
class=
"cost-box-type"
>
...
...
@@ -100,7 +100,7 @@
<el-tooltip
placement=
"top"
content=
"仅支持选择账号管理门店权限内门店"
>
<i
class=
"iconfont icon-QuestionCircleOutlined"
style=
"margin-right: 10px"
></i>
</el-tooltip>
<dm-store-selector
:options=
"[5]"
scenes=
""
scenesVal=
""
@
store-change=
"onStoreChange"
></dm-store-selector>
<dm-store-selector
:options=
"[5]"
@
store-change=
"onStoreChange"
></dm-store-selector>
</div>
</div>
<div
class=
"store-cost-search"
>
...
...
@@ -146,7 +146,7 @@
<el-form-item
prop=
""
label=
"使用条件"
>
<div
v-show=
"form.cardType === 0 || form.cardType == 3"
class=
"mb10"
>
<el-checkbox
:disabled=
"isEdit || isInfo"
v-model=
"sale_limit.flag"
>
最低消费满
</el-checkbox>
<el-input-number
controls-position=
"right"
:min=
"0"
@
focus=
"sale_limit.flag = true"
:disabled=
"isEdit || isInfo"
v-model=
"sale_limit.fee"
class=
"w200"
></el-input-number>
元可使用
<el-input-number
controls-position=
"right"
:min=
"0"
:max=
"10000000"
@
focus=
"sale_limit.flag = true"
:disabled=
"isEdit || isInfo"
v-model=
"sale_limit.fee"
class=
"w200"
></el-input-number>
元可使用
</div>
<div
v-show=
"form.cardType !== 2 && form.cardType != 3"
><el-checkbox
:disabled=
"isEdit || isInfo"
v-model=
"goods.flag"
>
适用商品
</el-checkbox>
<span
class=
"fz12 gray"
>
(至少填写一项)
</span></div>
<div
class=
"mb10"
v-show=
"form.cardType !== 2 && form.cardType != 3"
><span
class=
"inline-block w100 pr10 text-right"
>
适用商品
</span>
<dm-input
@
focus=
"goods.flag = true"
v-model=
"goods.ok"
:disabled=
"isEdit || isInfo"
class=
"w300"
placeholder=
"限制18个汉字内"
:maxlength=
"18"
></dm-input></div>
...
...
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