Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
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
达摩4.0重构
welfare
Commits
9ce6b662
Commit
9ce6b662
authored
Feb 23, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 自提点组件
parent
a71e6622
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
select-pickup-store.vue
src/views/gift-manage/module/select-pickup-store.vue
+21
-11
No files found.
src/views/gift-manage/module/select-pickup-store.vue
View file @
9ce6b662
...
...
@@ -51,7 +51,7 @@
<el-popover
trigger=
"click"
placement=
"right"
popper-class=
"upload-popper"
>
<el-button
slot=
"reference"
type=
"text"
>
查看导入规则
</el-button>
<div
class=
"upload-tip-text"
>
<p>
1. 自提点code请至自提设置中导出;
<el-button
type=
"text"
@
click=
"
$router.push('/setting/pickup-list')
"
>
前去设置
</el-button></p>
<p>
1. 自提点code请至自提设置中导出;
<el-button
type=
"text"
@
click=
"
toSetting
"
>
前去设置
</el-button></p>
<p>
2. 重新导入后将会覆盖原有全部门店;
</p>
<p>
3. 上传完整仅支持.xlsx .xls文件的导入,填充数据不超过“5000”条。
</p>
</div>
...
...
@@ -165,24 +165,30 @@ export default {
},
mounted
()
{
document
.
addEventListener
(
'click'
,
this
.
onClosePopover
,
true
);
document
.
addEventListener
(
'visibilitychange'
,
this
.
init
);
},
beforeDestroy
()
{
document
.
removeEventListener
(
'click'
,
this
.
onClosePopover
,
true
);
document
.
removeEventListener
(
'visibilitychange'
,
this
.
init
);
},
methods
:
{
init
()
{
if
(
document
.
visibilityState
!=
'visible'
)
return
;
// 获取所有自提点
// TODO 考虑分页加载
this
.
pickupList
=
[];
getPickupList
({
currentPage
:
1
,
pageSize
:
20
}).
then
(
res
=>
{
const
{
result
}
=
res
.
result
||
{};
if
(
Array
.
isArray
(
result
)
&&
result
.
length
>
0
)
{
this
.
pickupList
=
this
.
pickupList
.
concat
(
result
.
map
(
el
=>
{
el
.
nameIsOverflow
=
this
.
getOffsetWidth
(
el
.
name
)
>
129
;
return
el
;
}));
}
});
const
getList
=
(
currentPage
)
=>
{
getPickupList
({
currentPage
,
pageSize
:
20
}).
then
(
res
=>
{
const
{
result
}
=
res
.
result
||
{};
if
(
Array
.
isArray
(
result
)
&&
result
.
length
>
0
)
{
this
.
pickupList
=
this
.
pickupList
.
concat
(
result
.
map
(
el
=>
{
el
.
nameIsOverflow
=
this
.
getOffsetWidth
(
el
.
name
)
>
129
;
return
el
;
}));
getList
(
currentPage
+
1
);
}
});
};
getList
(
1
);
},
// 获取字符串的offsetWidth宽度
getOffsetWidth
(
str
)
{
...
...
@@ -218,6 +224,10 @@ export default {
this
.
isFocus
=
false
;
}
},
// 去设置自提点code
toSetting
()
{
window
.
open
(
`
${
origin
}
/welfare/setting/pickup-list`
);
},
// 自提点上传-模板下载
onDownloadTemplate
()
{
window
.
location
.
href
=
`
${
origin
}${
this
.
api
.
downloadGiftTemplate
}
`
;
...
...
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