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
0274e53d
Commit
0274e53d
authored
Sep 13, 2022
by
huaying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/8月-奥莱定制' into test
parents
c54585a4
715dd24a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
25 deletions
+28
-25
form.js
src/views/card/form.js
+26
-24
prize-config.vue
src/views/game/cmh/prize-config.vue
+2
-1
No files found.
src/views/card/form.js
View file @
0274e53d
...
...
@@ -152,6 +152,7 @@ export default {
const
that
=
this
;
return
{
storeUuid
:
''
,
storeUuidCache
:
''
,
// 商场抵金券适用门店-部分门店列表数据
originStoreList
:
[],
// 商场抵金券适用门店-门店选择器选中的数据
...
...
@@ -459,48 +460,45 @@ export default {
this
.
storeMode
=
value
==
0
?
0
:
1
;
this
.
originStoreList
=
[];
if
(
this
.
isEdit
)
{
this
.
selectedStoreList
=
[];
this
.
originStoreList
=
[...
this
.
form
.
costStoreList
];
}
if
(
this
.
isEdit
||
this
.
isCopy
)
{
this
.
storeUuid
=
this
.
storeUuidCache
;
}
},
onStoreChange
(
id
)
{
if
(
this
.
storeMode
==
0
)
{
getStoreByCode
({
key
:
this
.
storeUuid
,
isClique
:
0
,
pageSize
:
99999
,
currentPage
:
1
}).
then
(
res
=>
{
const
{
result
,
errorCode
}
=
res
||
{};
if
(
errorCode
==
0
&&
Array
.
isArray
(
result
.
result
))
{
this
.
selectedStoreList
=
result
.
result
.
map
(
el
=>
{
const
{
storeId
,
storeCode
,
storeName
}
=
el
;
return
{
storeId
,
storeCode
,
storeName
,
costValueProportion
:
undefined
,
costValue
:
0
};
});
if
(
this
.
isEdit
)
{
// 编辑卡券通过门店选择器添加门店时,需要先过滤掉已经选中的门店,再与form.costStoreList合并
this
.
selectedStoreList
=
this
.
selectedStoreList
.
filter
(
el
=>
this
.
form
.
costStoreList
.
every
(
item
=>
item
.
storeId
!=
el
.
storeId
));
this
.
originStoreList
=
[...
this
.
selectedStoreList
,
...
this
.
form
.
costStoreList
];
}
else
if
(
this
.
isAdd
||
this
.
isCopy
)
{
// 新建卡券时直接覆盖
this
.
originStoreList
=
this
.
selectedStoreList
;
}
this
.
setStoreList
(
result
.
result
);
}
});
}
else
{
getStoreWidgetStore
({
key
:
id
,
pageSize
:
99999
,
currentPage
:
1
}).
then
(
res
=>
{
const
{
result
,
errorCode
}
=
res
||
{};
if
(
errorCode
==
0
&&
Array
.
isArray
(
result
.
result
))
{
this
.
selectedStoreList
=
result
.
result
.
map
(
el
=>
{
const
{
storeId
,
storeCode
,
storeName
}
=
el
;
return
{
storeId
,
storeCode
,
storeName
,
costValueProportion
:
undefined
,
costValue
:
0
};
});
if
(
this
.
isEdit
)
{
// 编辑卡券通过门店选择器添加门店时,需要先过滤掉已经选中的门店,再与form.costStoreList合并
this
.
selectedStoreList
=
this
.
selectedStoreList
.
filter
(
el
=>
this
.
form
.
costStoreList
.
every
(
item
=>
item
.
storeId
!=
el
.
storeId
));
this
.
originStoreList
=
[...
this
.
selectedStoreList
,
...
this
.
form
.
costStoreList
];
}
else
if
(
this
.
isAdd
||
this
.
isCopy
)
{
// 新建卡券时直接覆盖
this
.
originStoreList
=
this
.
selectedStoreList
;
}
this
.
setStoreList
(
result
.
result
);
}
});
}
},
setStoreList
(
storeList
)
{
this
.
selectedStoreList
=
storeList
.
map
(
el
=>
{
const
index
=
this
.
originStoreList
.
findIndex
(
item
=>
item
.
storeId
==
el
.
storeId
);
const
{
storeId
,
storeCode
,
storeName
}
=
el
;
return
{
storeId
,
storeCode
,
storeName
,
costValueProportion
:
index
>=
0
?
this
.
originStoreList
[
index
].
costValueProportion
:
undefined
,
costValue
:
0
};
});
if
(
this
.
isEdit
)
{
// 编辑卡券通过门店选择器添加门店时,需要先过滤掉已经选中的门店,再与form.costStoreList合并
this
.
selectedStoreList
=
this
.
selectedStoreList
.
filter
(
el
=>
this
.
form
.
costStoreList
.
every
(
item
=>
item
.
storeId
!=
el
.
storeId
));
this
.
originStoreList
=
[...
this
.
selectedStoreList
,
...
this
.
form
.
costStoreList
];
}
else
if
(
this
.
isAdd
||
this
.
isCopy
)
{
// 新建卡券时直接覆盖
this
.
originStoreList
=
this
.
selectedStoreList
;
}
},
onSortStore
(
sortType
)
{
this
.
sortType
=
sortType
;
if
(
sortType
==
0
)
{
...
...
@@ -868,6 +866,9 @@ export default {
this
.
form
.
costValueProportion
=
card
.
costValueProportion
;
//成本比例
this
.
form
.
costStoreList
=
(
this
.
isEdit
||
this
.
isInfo
||
this
.
isCopy
)
&&
Array
.
isArray
(
card
.
costStoreList
)
?
card
.
costStoreList
:
[];
this
.
originStoreList
=
this
.
form
.
costStoreList
;
if
(
this
.
isCopy
)
{
this
.
onStoreChange
(
card
.
storeWidgetKey
);
}
}
// 线下适用商品
...
...
@@ -980,6 +981,7 @@ export default {
}
if
(
this
.
form
.
cardType
==
3
)
{
this
.
storeUuid
=
card
.
storeWidgetKey
||
''
;
this
.
storeUuidCache
=
card
.
storeWidgetKey
||
''
;
}
else
{
this
.
uuid
=
card
.
storeWidgetKey
||
''
;
this
.
$nextTick
(
_
=>
{
...
...
src/views/game/cmh/prize-config.vue
View file @
0274e53d
...
...
@@ -177,7 +177,8 @@ export default {
0
:
'https://pic01-10001430.image.myqcloud.com/522b7c1e-dea4-4068-b0a3-0e07bc229b0d'
,
1
:
'https://pic01-10001430.image.myqcloud.com/32fa9132-5aed-4f7f-8be1-a3f81f2e58f7'
,
2
:
'https://pic01-10001430.image.myqcloud.com/029abce4-660c-4115-a70f-55ba8f626832'
,
3
:
'https://pic01-10001430.image.myqcloud.com/7fbc9e9b-4115-4795-aea3-cd2c1ec8da63'
// 3: 'https://pic01-10001430.image.myqcloud.com/7fbc9e9b-4115-4795-aea3-cd2c1ec8da63'
3
:
'https://pic01-10001430.image.myqcloud.com/522b7c1e-dea4-4068-b0a3-0e07bc229b0d'
},
show
:
false
,
prizeForm
:
{
...
...
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