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
e774e4e3
Commit
e774e4e3
authored
Apr 28, 2021
by
黑潮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 商品选择器
parent
c06449a8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
16 deletions
+28
-16
selector.js
src/mixins/selector.js
+13
-0
form.js
src/views/card/form.js
+12
-14
form.vue
src/views/card/form.vue
+1
-1
form.js
src/views/ecm/form.js
+1
-0
form.vue
src/views/ecm/form.vue
+1
-1
No files found.
src/mixins/selector.js
View file @
e774e4e3
...
...
@@ -7,11 +7,18 @@
*/
// 商品选择器方法
const
mapFilter
=
{
union
:
'或者'
,
intersect
:
'并且'
,
diff
:
'剔除'
};
export
default
{
data
()
{
return
{
// ----线下适用商品开始----
xxSysp
:
{
filterLogicalOperator
:
[],
max
:
5
,
isExpand
:
false
,
visible
:
false
,
// 适用商品选择器dialog
...
...
@@ -27,6 +34,10 @@ export default {
},
methods
:
{
// ------线下适用商品开始-------
getXxSysFilterText
(
i
)
{
console
.
log
(
this
.
xxSysp
.
filterLogicalOperator
);
return
mapFilter
[
this
.
xxSysp
.
filterLogicalOperator
[
i
]
||
'union'
];
},
// 清空线下适用商品 ,重置商品选择器
handleXxSyspReset
()
{
this
.
$refs
.
selector
.
conditions
=
this
.
$refs
.
selector
.
conditions
.
slice
(
0
,
1
);
...
...
@@ -36,6 +47,7 @@ export default {
this
.
xxSysp
.
filterAbbrInfo
=
[];
this
.
xxSysp
.
conditionList
=
null
;
this
.
xxSysp
.
goodsFilterId
=
null
;
this
.
xxSysp
.
filterLogicalOperator
=
[];
},
// 编辑查看btn点击
handleXxSyspClick
(
visible
=
true
)
{
...
...
@@ -84,6 +96,7 @@ export default {
this.xxSysp.goodsFilterId = res.id; // 保存id
this.xxSysp.conditionList = res.conditionList; // 保存回显list
this.xxSysp.filterAbbrInfo = this.xxSyspLabel(res.filterAbbrInfo);
this.xxSysp.filterLogicalOperator = res.filterLogicalOperator || [];
this.handleXxSyspClick(false); // 强制展开
this.xxSysp.visible = false;
}
...
...
src/views/card/form.js
View file @
e774e4e3
...
...
@@ -631,6 +631,7 @@ export default {
this
.
xxSysp
.
conditionList
=
this
.
xxSysp
.
conditionList_copy
=
goodsSearchDetail
.
conditionList
;
// ref selector此时放在modal里并没有渲染,之后赋值
this
.
xxSysp
.
conditionList
=
goodsSearchDetail
.
conditionList
;
// ref selector此时放在modal里并没有渲染,之后赋值
this
.
xxSysp
.
conditionList_copy
=
deepClone
(
goodsSearchDetail
.
conditionList
||
{});
// 备份数据
this
.
xxSysp
.
filterLogicalOperator
=
goodsSearchDetail
.
filterLogicalOperator
||
[];
if
(
card
.
gicCouponType
==
3
||
card
.
gicCouponType
==
4
)
{
const
filterAbbrInfo
=
(
goodsSearchDetail
.
filterAbbrInfo
||
[]).
map
(
el
=>
{
return
el
.
map
((
item
,
index
)
=>
{
...
...
@@ -638,20 +639,17 @@ export default {
item
.
optName
=
null
;
}
// intersect 或者,union 并且,diff 剔除
// switch (item.optName) {
// case 'intersect':
// item.optName = '或者';
// break;
// case 'union':
// item.optName = '并且';
// break;
// case 'diff':
// item.optName = '剔除';
// break;
// default:
// item.optName = null;
// break;
// }
switch
(
item
.
optName
)
{
case
'union'
:
item
.
optName
=
'或者'
;
break
;
case
'intersect'
:
item
.
optName
=
'并且'
;
break
;
case
'diff'
:
item
.
optName
=
'剔除'
;
break
;
}
return
item
;
});
});
...
...
src/views/card/form.vue
View file @
e774e4e3
...
...
@@ -115,7 +115,7 @@
<div
class=
"sysp__content clearfix inline-block"
>
<div
class=
"fl"
v-if=
"xxSysp.filterAbbrInfo.length"
>
<div
v-for=
"(item, idx) in xxSysp.filterAbbrInfo"
:key=
"idx"
>
<div
class=
"complex-and"
v-if=
"idx > 0 && (idx < xxSysp.max || xxSysp.isExpand)"
>
【
或者
】
</div>
<div
class=
"complex-and"
v-if=
"idx > 0 && (idx < xxSysp.max || xxSysp.isExpand)"
>
【
{{ getXxSysFilterText(idx - 1) }}
】
</div>
<
template
v-for=
"(el, i) in item"
>
<span
:key=
"i"
v-show=
"idx
<
xxSysp
.
max
||
xxSysp
.
isExpand
"
>
{{
el
.
optName
}}
...
...
src/views/ecm/form.js
View file @
e774e4e3
...
...
@@ -370,6 +370,7 @@ export default {
this
.
xxSysp
.
conditionList
=
goodsSearchDetail
.
conditionList
;
// ref selector此时放在modal里并没有渲染,之后赋值
this
.
xxSysp
.
conditionList_copy
=
deepClone
(
goodsSearchDetail
.
conditionList
);
// 备份数据
this
.
xxSysp
.
filterAbbrInfo
=
goodsSearchDetail
.
filterAbbrInfo
||
[];
this
.
xxSysp
.
filterLogicalOperator
=
goodsSearchDetail
.
filterLogicalOperator
||
[];
}
}
...
...
src/views/ecm/form.vue
View file @
e774e4e3
...
...
@@ -123,7 +123,7 @@
</div> -->
<div
class=
"fl"
v-if=
"xxSysp.filterAbbrInfo.length"
>
<div
v-for=
"(item, idx) in xxSysp.filterAbbrInfo"
:key=
"idx"
>
<div
class=
"complex-and"
v-if=
"idx > 0 && (idx < xxSysp.max || xxSysp.isExpand)"
>
【
或者
】
</div>
<div
class=
"complex-and"
v-if=
"idx > 0 && (idx < xxSysp.max || xxSysp.isExpand)"
>
【
{{ getXxSysFilterText(idx - 1) }}
】
</div>
<
template
v-for=
"(el, i) in item"
>
<span
:key=
"i"
v-show=
"idx
<
xxSysp
.
max
||
xxSysp
.
isExpand
"
>
{{
el
.
optName
}}
...
...
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