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
319568d4
Commit
319568d4
authored
Jan 13, 2021
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 转赠 回车
parent
3115fdd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletions
+28
-1
form.js
src/views/card/form.js
+28
-1
No files found.
src/views/card/form.js
View file @
319568d4
...
...
@@ -70,6 +70,19 @@ const initForm = {
};
const
sale_limit
=
{
fee
:
0
,
goods
:
''
,
flag
:
false
,
type
:
0
};
//最低消费
const
goods
=
{
ok
:
''
,
no
:
''
,
flag
:
false
};
// 禁止回车
const
preventEnter
=
function
(
e
)
{
let
et
=
e
||
window
.
event
;
let
keycode
=
et
.
charCode
||
et
.
keyCode
;
if
(
keycode
==
13
)
{
if
(
window
.
event
)
{
window
.
event
.
returnValue
=
false
;
}
else
{
e
.
preventDefault
();
// for firefox
}
}
};
export
default
{
mixins
:
[
xxSysp_mix
],
data
()
{
...
...
@@ -229,6 +242,16 @@ export default {
};
},
watch
:
{
'form.giveFlag'
(
val
)
{
if
(
val
)
{
this
.
$nextTick
(
_
=>
{
// 禁止卡券转赠规则textare回车
this
.
$refs
.
ruleTextarea
.
$el
.
querySelector
(
'textarea'
).
addEventListener
(
'keydown'
,
preventEnter
);
});
}
else
{
this
.
$refs
.
ruleTextarea
.
$el
.
querySelector
(
'textarea'
).
removeEventListener
(
'keydown'
,
preventEnter
);
}
},
giveImg1
:
{
handler
(
val
)
{
this
.
form
.
giveImage
=
val
.
imgUrl
;
...
...
@@ -451,7 +474,7 @@ export default {
this
.
storeMode
=
card
.
storeMode
===
0
?
0
:
1
;
this
.
form
.
cardApplyChannel
=
card
.
cardApplyChannel
?
card
.
cardApplyChannel
.
split
(
','
)
:
[];
this
.
form
.
auditingStatus
=
card
.
auditingStatus
||
''
;
this
.
form
.
giveFlag
=
res
.
result
.
giveEnable
?
card
.
giveFlag
:
0
;
this
.
form
.
giveFlag
=
card
.
giveFlag
;
this
.
form
.
refundFlag
=
card
.
refundFlag
||
0
;
this
.
form
.
coupCardId
=
this
.
isCopy
?
''
:
card
.
coupCardId
;
this
.
form
.
cardType
=
card
.
cardType
;
...
...
@@ -462,6 +485,10 @@ export default {
this
.
form
.
cardColor
=
card
.
cardColor
;
this
.
form
.
cardDenomination
=
card
.
cardDenomination
||
0
;
if
(
this
.
isCopy
&&
!
res
.
result
.
giveEnable
)
{
this
.
form
.
giveFlag
=
0
;
}
if
(
card
.
useCondition
)
{
const
useCondition
=
(
this
.
form
.
useCondition
=
JSON
.
parse
(
card
.
useCondition
));
this
.
sale_limit
.
fee
=
useCondition
.
sale_limit
?
useCondition
.
sale_limit
.
fee
||
0
:
0
;
...
...
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