Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
member
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
member
member
Commits
fd381df3
Commit
fd381df3
authored
Jul 19, 2019
by
Kyle_Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量积分导入
parent
483c9924
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
244 additions
and
0 deletions
+244
-0
bulkIntegral.vue
src/components/wechatmembers/bulkIntegral.vue
+228
-0
total.js
src/components/wechatmembers/total.js
+3
-0
wechat-total.vue
src/components/wechatmembers/wechat-total.vue
+5
-0
index.js
src/router/index.js
+8
-0
No files found.
src/components/wechatmembers/bulkIntegral.vue
0 → 100644
View file @
fd381df3
<
template
>
<div
id=
"bulkIntegral"
>
<nav-path
:navpath=
"navpath"
></nav-path>
<div
class=
"content"
>
<div
class=
"contentInfo"
>
<div
class=
"flex"
>
<div>
<el-date-picker
v-model=
"value1"
type=
"daterange"
range-separator=
"—"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
style=
"width: 400px"
>
</el-date-picker>
<el-select
v-model=
"importType"
placeholder=
"所有导入类型"
style=
"width: 130px;margin-left: 8px;"
>
<el-option
label=
"基础信息"
value=
"1"
></el-option>
<el-option
label=
"资产信息"
value=
"2"
></el-option>
<el-option
label=
"家庭信息"
value=
"3"
></el-option>
<el-option
label=
"购物偏好"
value=
"4"
></el-option>
<el-option
label=
"其他"
value=
"5"
></el-option>
</el-select>
</div>
<el-button
type=
"primary"
@
click=
"dialogImport = true;"
>
新建导入
</el-button>
</div>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
prop=
"date"
label=
"导入时间"
>
<template
slot-scope=
"
{ row }">
<div>
{{
row
.
date
?
row
.
date
.
split
(
" "
)[
0
]
:
'--'
}}
</div>
<div>
{{
row
.
date
?
row
.
date
.
split
(
" "
)[
1
]
:
'--'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"层预计导入数量"
>
</el-table-column>
<el-table-column
prop=
"province"
label=
"成功数"
>
</el-table-column>
<el-table-column
prop=
"city"
label=
"失败数"
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"导入类型"
>
</el-table-column>
<el-table-column
prop=
"zip"
label=
"操作人员"
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"logDetails(scope.row)"
type=
"text"
>
日志详情
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
v-if=
"tableData.length > 0"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"page.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"page.totalCount"
>
</el-pagination>
</div>
<vue-gic-footer></vue-gic-footer>
</div>
<el-dialog
title=
"新建导入"
:visible
.
sync=
"dialogImport"
width=
"600px"
@
closed=
"onDialogImportClosed"
>
<el-form
ref=
"formByImport"
:model=
"formByImport"
label-width=
"90px"
label-suffix=
":"
style=
"margin-bottom: 36px;"
>
<el-form-item
label=
"导入类型"
prop=
"type"
:rules=
"[
{ required: true, message: '请选择导入类型', trigger: 'blur' }
]"
>
<el-select
v-model=
"formByImport.importValue"
placeholder=
"请选择导入类型"
>
<el-option
label=
"积分增加"
value=
"积分增加"
></el-option>
<el-option
label=
"积分扣除"
value=
"积分扣除"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"选择文件"
prop=
"file"
:rules=
"[
{ required: true, message: '请选择导入类型', trigger: 'blur' }
]"
>
<el-upload
class=
"upload-demo"
action=
"https://jsonplaceholder.typicode.com/posts/"
multiple
>
<div
slot=
"trigger"
>
<div
class=
"importBox"
>
<i
class=
"iconfont icon-shangchuan"
></i>
点击上传
</div>
</div>
<el-button
type=
"text"
style=
"font-size: 12px; margin-left: 12px;"
v-if=
"formByImport.importValue"
@
click=
"downloadTemplate"
>
点击下载{{ formByImport.importValue }}模板
</el-button>
</el-upload>
</el-form-item>
</el-form>
<div
class=
"dialogTips"
>
<h3>
导入规则
</h3>
<p>
1. 通过导入Excel表格的形式变更GIC已存在会员的积分;不支持导入新会员数据
</p>
<p>
2. 仅支持.xlsx 文件的导入;每次导入数据量最多为10000条
</p>
<p>
3. 导入类型不同,文件模板也不同,请严格按照模板内容填入会员数据,否则将会报错
</p>
<p>
4. 请仔细核对需要变更的会员数据是否准确,否则GIC校验不通过将无法执行成功
</p>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogImport = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"importTable"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
doFetch
,
doFetchqs
}
from
"../../components/axios/api"
;
import
NavPath
from
"@/common/navbar/navbar.vue"
;
import
url
from
"../../components/axios/url"
;
export
default
{
data
()
{
return
{
navpath
:
[{
name
:
"首页"
,
path
:
""
},
{
name
:
"微信会员"
,
path
:
""
},
{
name
:
"批量导入"
,
path
:
""
}],
tableData
:
[],
importType
:
''
,
dialogImport
:
false
,
formByImport
:
{
importValue
:
''
,
}
}
},
methods
:
{
handleSizeChange
(
val
)
{
},
handleCurrentChange
(
val
)
{},
logDetails
()
{},
onDialogImportClosed
()
{
this
.
$refs
.
formByImport
.
resetFields
();
},
downloadTemplate
()
{
if
(
this
.
formByImport
.
importValue
==
'积分增加'
)
{
}
else
{
}
},
importTable
()
{
this
.
dialogImport
=
false
}
},
created
()
{
console
.
log
(
this
.
$route
.
query
.
ids
)
},
components
:
{
NavPath
}
}
</
script
>
<
style
lang=
"stylus"
scoped
>
#bulkIntegral
{
//
height
:
100%
;
.content
{
padding
:
22px
24px
;
.contentInfo
{
padding
:
24px
;
background-color
#fff;
.flex
{
padding-bottom
:
22px
;
}
/
deep
/
.el-table
th
>
.cell
{
font-weight
:
700
;
color
:
#303133
;
}
}
}
>>>
.el-dialog__footer
{
border
:
none
;
}
.importBox
{
width
:
174px
;
border
:
1px
dashed
#C0C4CC
;
border-radius
:
6px
;
}
.dialogTips
{
padding-bottom
:
8px
;
padding-top
:
22px
;
border-top
:
1px
solid
#E4E7ED
;
color
:
#909399
;
h3
{
font-weight
normal;
font-size
:
14px
;
margin-bottom
:
10px
;
}
p
{
font-size
:
12px
;
}
}
}
.flex
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
</
style
>
src/components/wechatmembers/total.js
View file @
fd381df3
...
...
@@ -824,6 +824,9 @@ export default {
}
this
.
getSubStoreList
();
}
if
(
this
.
batchValue
==
"bulkIntegral"
)
{
this
.
$router
.
push
({
path
:
'/bulkIntegral'
,
query
:
{
ids
:
123
}
});
}
}
},
handleFocusBatch
()
{
...
...
src/components/wechatmembers/wechat-total.vue
View file @
fd381df3
...
...
@@ -85,6 +85,11 @@
value=
"integral"
></el-option>
<el-option
key=
"bulkIntegral"
label=
"批量调整积分"
value=
"bulkIntegral"
></el-option>
<el-option
key=
"grade"
label=
"调整会员等级"
value=
"grade"
...
...
src/router/index.js
View file @
fd381df3
...
...
@@ -220,6 +220,14 @@ export const constantRouterMap = [
meta
:
{
title
:
"微信会员-会员门店消费"
}
},
{
path
:
"/bulkIntegral"
,
name
:
"/bulkIntegral"
,
component
:
_import
(
"wechatmembers"
,
"bulkIntegral"
),
meta
:
{
title
:
"批量导入"
}
}
]
}
...
...
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