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
d2d7bf90
Commit
d2d7bf90
authored
Aug 25, 2022
by
黄冷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
71fb80a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
15 deletions
+80
-15
index.js
src/directives/index.js
+3
-2
loadMore.js
src/directives/loadMore.js
+16
-0
form.js
src/views/card/form.js
+60
-12
form.vue
src/views/card/form.vue
+1
-1
No files found.
src/directives/index.js
View file @
d2d7bf90
import
clipboard
from
'./clipboard'
;
import
upload
from
'./upload'
;
import
imglibupload
from
'./img-lib.js'
;
import
loadmore
from
'./loadMore'
;
export
default
{
clipboard
,
upload
,
imglibupload
imglibupload
,
loadmore
};
src/directives/loadMore.js
0 → 100644
View file @
d2d7bf90
/**
* v-loadmore el-select加载更多
*/
// import Vue from 'vue';
export
default
{
bind
(
el
,
binding
,
vnode
,
oldVnode
)
{
const
SELECTDOWN_DOM
=
el
.
querySelector
(
'.el-select-dropdown .el-select-dropdown__wrap'
);
SELECTDOWN_DOM
.
addEventListener
(
'scroll'
,
function
()
{
const
CONDITION
=
this
.
scrollHeight
-
this
.
scrollTop
<=
this
.
clientHeight
;
console
.
log
(
this
.
scrollHeight
,
this
.
scrollTop
,
this
.
clientHeight
);
if
(
CONDITION
)
{
binding
.
value
();
}
});
}
};
src/views/card/form.js
View file @
d2d7bf90
...
...
@@ -151,6 +151,11 @@ export default {
gicCouponType
:
''
,
// gic定义的卡券类型(0:普通卡券, 1:e待洗, 2:好办卡券, 3:微盟外部券, 4:通用外部券
creatorId
:
''
,
uuid
:
''
,
currentPage
:
1
,
pageSize
:
50
,
wmPid
:
''
,
idx
:
''
,
totalPage
:
0
,
canEdit
:
false
,
loading
:
false
,
submitLoading
:
false
,
...
...
@@ -269,6 +274,19 @@ export default {
statusText
:
''
};
},
// directives: {
// loadmore: {
// inserted(el, binding) {
// const SELECTDOWN_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap');
// SELECTDOWN_DOM.addEventListener('scroll', function() {
// const CONDITION = this.scrollHeight - this.scrollTop <= this.clientHeight;
// if (CONDITION) {
// binding.value();
// }
// });
// }
// }
// },
watch
:
{
'form.giveFlag'
(
val
)
{
if
(
val
)
{
...
...
@@ -1332,18 +1350,48 @@ export default {
handleShopChange
(
wmPid
,
idx
)
{
this
.
weimobDemoCodeList
[
idx
].
cardList
=
[];
this
.
weimobDemoCodeList
[
idx
].
card
=
''
;
this
.
weimobDemoCodeList
[
idx
].
loading
=
true
;
listEntepriseWeimobCoupon
({
wmPid
})
.
then
(
res
=>
{
this
.
weimobDemoCodeList
[
idx
].
cardList
=
res
.
result
||
[];
this
.
weimobDemoCodeList
[
idx
].
loading
=
false
;
if
(
this
.
weimobDemoCodeList
[
idx
].
cardList
.
length
===
0
)
{
this
.
$message
({
message
:
'该店铺没有对应微盟券号'
,
type
:
'warning'
});
}
})
.
catch
(()
=>
{
this
.
weimobDemoCodeList
[
idx
].
loading
=
false
;
});
this
.
wmPid
=
wmPid
;
this
.
idx
=
idx
;
this
.
weimobDemoCodeList
[
this
.
idx
].
loading
=
true
;
this
.
listEntepriseWeimobCoupon
();
},
listEntepriseWeimobCoupon
(
search
){
listEntepriseWeimobCoupon
({
search
,
wmPid
:
this
.
wmPid
,
pageSize
:
this
.
pageSize
,
currentPage
:
this
.
currentPage
})
.
then
(
res
=>
{
console
.
log
(
res
.
result
)
const
{
result
,
totalPage
,
currentPage
}
=
res
.
result
;
this
.
totalPage
=
totalPage
;
this
.
currentPage
=
currentPage
;
this
.
weimobDemoCodeList
[
this
.
idx
].
cardList
=
this
.
weimobDemoCodeList
[
this
.
idx
].
cardList
.
concat
(
result
||
[])
;
this
.
weimobDemoCodeList
[
this
.
idx
].
loading
=
false
;
if
(
this
.
weimobDemoCodeList
[
this
.
idx
].
cardList
.
length
===
0
)
{
this
.
$message
({
message
:
'该店铺没有对应微盟券号'
,
type
:
'warning'
});
}
})
.
finally
(()
=>
{
this
.
weimobDemoCodeList
[
this
.
idx
].
loading
=
false
;
});
},
remoteMethod
(
val
){
console
.
log
(
val
);
this
.
currentPage
=
1
;
this
.
weimobDemoCodeList
[
this
.
idx
].
cardList
=
[];
this
.
weimobDemoCodeList
[
this
.
idx
].
loading
=
true
;
this
.
listEntepriseWeimobCoupon
(
val
);
},
handleClear
(){
this
.
currentPage
=
1
;
this
.
weimobDemoCodeList
[
this
.
idx
].
cardList
=
[];
this
.
weimobDemoCodeList
[
this
.
idx
].
loading
=
true
;
this
.
listEntepriseWeimobCoupon
();
},
getMore
(){
if
(
this
.
currentPage
<
this
.
totalPage
){
this
.
currentPage
++
this
.
listEntepriseWeimobCoupon
();
}
},
// ---------微盟店铺结束--------
// ------微盟适用商品开始-------
...
...
src/views/card/form.vue
View file @
d2d7bf90
...
...
@@ -55,7 +55,7 @@
<el-select
class=
"w200"
:disabled=
"saveItem.save || isEdit || isInfo"
v-model=
"saveItem.pid"
filterable
placeholder=
"请选择店铺"
clearable
@
change=
"handleShopChange($event, idx)"
>
<el-option
:disabled=
"wmShopIds.includes(item.wmPid)"
v-for=
"item in weimobShopList"
:key=
"item.wmPid"
:label=
"item.wmPidName"
:value=
"item.wmPid"
></el-option>
</el-select>
<el-select
:disabled=
"!saveItem.pid || saveItem.save || isEdit || isInfo"
:loading=
"saveItem.loading"
class=
"w200"
v-model=
"saveItem.card"
filterable
placeholder=
"请选择微盟卡券
"
clearable
>
<el-select
v-loadmore=
"getMore"
:disabled=
"!saveItem.pid || saveItem.save || isEdit || isInfo"
:loading=
"saveItem.loading"
class=
"w200"
v-model=
"saveItem.card"
remote
filterable
placeholder=
"请选择微盟卡券"
:remote-method=
"remoteMethod"
@
clear=
"handleClear
"
clearable
>
<el-option
v-for=
"item in saveItem.cardList"
:key=
"item.cardTemplateId"
:label=
"item.name"
:value=
"item.cardTemplateId"
></el-option>
</el-select>
<template
v-if=
"isAdd || isCopy"
>
...
...
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