Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
memberTag-web
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
memberTag
memberTag-web
Commits
28c105c9
Commit
28c105c9
authored
Oct 13, 2020
by
Kyle_Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 新增单笔消费商品数量的标签种类
parent
5f57228e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
1 deletions
+98
-1
tag-config-options.vue
src/components/tag/tag-config-options.vue
+54
-1
index.js
src/components/tagDetail/mixin/index.js
+44
-0
No files found.
src/components/tag/tag-config-options.vue
View file @
28c105c9
...
...
@@ -686,6 +686,33 @@
<!-- <vue-gic-selector ref="selector" @changelist="changelist"></vue-gic-selector> -->
</div>
<div
v-if=
"parent.templateCode == 'com025'"
>
<div
class=
"m-b-20"
:key=
"'tag2' + pindex"
>
商品数量
<el-select
v-model=
"parent.symbol"
placeholder=
"请选择"
style=
"width: 100px;margin:0 10px"
>
<el-option
v-for=
"item in parent.options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<div
style=
"display: inline-block"
v-if=
"parent.symbol == '区间'"
>
<el-input
:value=
"parent.numRange[0]"
@
input=
"v => $set(parent.numRange, 0, onInputNum(v))"
@
keyup
.
native=
"handleNumRangeEnd($event)"
class=
"select-wrap-input"
style=
"width: 100px;margin-right: 0;"
placeholder=
"请输入数字"
></el-input>
<label>
-
</label>
<el-input
:value=
"parent.numRange[1]"
@
input=
"v => $set(parent.numRange, 1, onInputNum(v))"
@
keyup
.
native=
"handleNumRangeEnd($event)"
class=
"select-wrap-input"
style=
"width: 100px;margin-right: 10px;"
placeholder=
"请输入数字"
></el-input>
</div>
<div
style=
"display: inline-block"
v-if=
"parent.symbol != '区间'"
>
<el-input
:value=
"parent.num"
@
input=
"v => $set(parent, 'num', onInputNum(v))"
@
keyup
.
native=
"handleNumRangeEnd($event)"
class=
"select-wrap-input"
style=
"width: 100px;margin-right: 10px;"
placeholder=
"请输入数字"
></el-input>
</div>
件
</div>
<p
style=
"margin-bottom:15px"
>
已选商品
</p>
<vue-gic-goods-selector
ref=
"selector"
@
changelist=
"changelist"
></vue-gic-goods-selector>
</div>
<!-- 标签值 / 固定时间 / 之后时间 tag024 -->
<
template
v-if=
"parent.templateCode == 'tag024'"
>
<div
class=
"m-b-20"
:key=
"'tag24' + pindex"
>
...
...
@@ -1023,6 +1050,7 @@ export default {
},
cardListData
:
[],
com024
:
{},
com025
:
{},
expiration
:
'1'
,
cardParams
:
{
startTime
:
''
,
...
...
@@ -1215,8 +1243,12 @@ export default {
for
(
let
key
in
data
)
{
if
(
data
.
templateCode
==
'com023'
)
{
this
[
data
.
templateCode
][
key
]
=
data
[
key
];
}
else
if
(
data
.
templateCode
==
'com025'
)
{
this
.
com001
[
key
]
=
data
[
key
];
this
.
com022
[
key
]
=
data
[
key
];
}
else
{
this
[
data
.
templateCode
][
key
]
=
data
[
key
];
}
this
[
data
.
templateCode
][
key
]
=
data
[
key
];
}
// 如果是城市
if
(
data
.
templateCode
===
'tag010'
)
{
...
...
@@ -1252,6 +1284,8 @@ export default {
setTimeout
(
_
=>
{
this
.
templateData
.
push
(
this
[
data
.
templateCode
]);
},
200
);
}
else
if
(
data
.
templateCode
==
'com025'
)
{
this
.
templateData
.
push
({
...
this
.
com001
,
...
this
.
com022
});
}
else
{
this
.
templateData
.
push
(
this
[
data
.
templateCode
]);
}
...
...
@@ -1493,6 +1527,7 @@ export default {
// 回显数据
let
tagValue
=
JSON
.
parse
(
this
.
templateDataList
.
tagValue
);
let
tagParams
=
JSON
.
parse
(
this
.
templateDataList
.
tagParams
);
console
.
log
(
tagParams
,
tagValue
)
let
value
=
null
;
let
selectVal
=
null
;
let
checkedCount
=
null
;
...
...
@@ -1835,6 +1870,24 @@ export default {
}
break
;
case
'com025'
:
if
(
tagParams
.
selectedVal
[
0
].
indexOf
(
'区间'
)
!=
-
1
)
{
// 存在区间
this
.
templateData
[
0
].
symbol
=
'区间'
;
this
.
templateData
[
0
].
numRange
=
tagValue
.
val
[
0
].
data
.
value
.
split
(
','
);
}
else
if
(
tagParams
.
template
[
0
].
symbol
==
void
0
)
{
this
.
templateData
[
0
].
symbol
=
'区间'
;
this
.
templateData
[
0
].
numRange
=
tagParams
.
template
[
0
].
numRange
;
}
else
{
this
.
templateData
[
0
].
symbol
=
tagParams
.
template
[
0
].
symbol
;
this
.
templateData
[
0
].
num
=
tagValue
.
val
[
0
].
data
.
value
;
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
selector
[
0
].
conditions
=
JSON
.
parse
(
JSON
.
stringify
(
tagParams
.
conditionList
));
})
break
;
// case 'tag021':
// value = tagValue.val[0].data.value.split(' ');
// for (let i = 0; i
<
this
.
templateData
.
length
;
i
++
)
{
...
...
src/components/tagDetail/mixin/index.js
View file @
28c105c9
...
...
@@ -787,6 +787,50 @@ export default {
}
}
/* com025 单笔消费商品数量 */
if
(
code
===
'com025'
)
{
const
{
symbol
,
num
,
numRange
}
=
that
.
templateData
[
0
];
tagValue
.
val
[
0
].
data
.
compute
=
symbol
==
'区间'
?
'between'
:
symbol
;
if
(
symbol
!=
'区间'
)
{
if
(
!
num
)
{
this
.
$message
.
warning
({
message
:
'请完善区间值!'
});
return
false
;
}
tagValue
.
val
[
0
].
data
.
value
=
num
;
}
else
{
if
(
!
numRange
[
0
]
||
!
numRange
[
1
])
{
this
.
$message
.
warning
({
message
:
'请完善区间值!'
});
return
false
;
}
tagValue
.
val
[
0
].
data
.
value
=
`
${
numRange
[
0
]}
,
${
numRange
[
1
]}
`
;
}
let
computeSymbol
=
tagValue
.
val
[
0
].
data
.
compute
==
'between'
?
'区间'
:
tagValue
.
val
[
0
].
data
.
compute
;
this
.
postTemplateData
.
selectedVal
.
push
(
`
${
computeSymbol
}${
tagValue
.
val
[
0
].
data
.
value
}
`
);
await
this
.
confirmSelector
();
if
(
!
this
.
com022
.
selectList
||
!
this
.
com022
.
selectList
.
length
)
{
this
.
$message
.
warning
(
'商品选择器未选择条件!'
)
return
false
;
}
console
.
log
(
this
.
com022
.
conditionsList
);
tagValue
.
val
.
push
({
type
:
'data'
,
//类型
data
:
{
key
:
this
.
currentKey
,
compute
:
this
[
code
].
postCompute
,
value
:
this
.
com022
.
finalId
,
dealKey
:
'goodsSeletor'
}
})
let
abbr
=
this
.
translateAbbrinfo
(
this
.
com022
.
abbrInfo
);
this
.
postTemplateData
.
selectedVal
.
push
(
abbr
.
join
(
' '
));
this
.
postTemplateData
.
conditionList
=
this
.
com022
.
conditionsList
;
}
/* 属于/不属于+ 选项 */
if
(
that
.
templateData
.
length
==
2
)
{
...
...
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