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
ec4c8039
Commit
ec4c8039
authored
Aug 03, 2022
by
曾经
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量导入统一
parent
b8639ca3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
246 deletions
+32
-246
allCustomersList.vue
src/components/allCustomers/allCustomersList.vue
+2
-1
importDialog.vue
src/components/allCustomers/components/importDialog.vue
+0
-0
index.js
src/components/allCustomers/index.js
+27
-1
importDialog.vue
...s/wechatmembers/frozen-member/components/importDialog.vue
+0
-241
frozen-list.vue
...s/wechatmembers/frozen-member/frozen-list/frozen-list.vue
+1
-1
frozen-member.js
...echatmembers/frozen-member/frozen-member/frozen-member.js
+1
-1
white-list.js
...ents/wechatmembers/frozen-member/white-list/white-list.js
+1
-1
No files found.
src/components/allCustomers/allCustomersList.vue
View file @
ec4c8039
...
...
@@ -304,7 +304,8 @@
@
successImport
=
"successImport"
/>
<!--
批量导入
-->
<
import
-
dialog
:
dialogVisible
.
sync
=
"dialogImportVisible"
@
successImport
=
"taskId => successImport(taskId, true)"
/>
<
import
-
dialog
:
dialogVisible
.
sync
=
"dialogImportVisible"
:
importList
=
"importList"
@
successImport
=
"taskId => successImport(taskId, true)"
/>
<
/div
>
<
/template
>
<
script
>
...
...
src/components/allCustomers/components/importDialog.vue
View file @
ec4c8039
This diff is collapsed.
Click to expand it.
src/components/allCustomers/index.js
View file @
ec4c8039
...
...
@@ -5,7 +5,7 @@ import gradeDailog from "./components/batchgradeDialog.vue";
import
mainstoreDailog
from
"./components/mainstoreDialog.vue"
;
import
substoreDailog
from
"./components/substoreDialog.vue"
;
import
batchList
from
"./components/batchList.vue"
;
import
importDialog
from
"
.
/components/importDialog.vue"
;
import
importDialog
from
"
@/components/allCustomers
/components/importDialog.vue"
;
import
{
doFetch
}
from
"../../components/axios/api"
;
import
url
from
"../../components/axios/url"
;
import
{
mapState
}
from
"vuex"
;
...
...
@@ -21,6 +21,32 @@ export default {
name
:
"allCustomersList"
,
data
()
{
return
{
importList
:[
{
importType
:
11
,
importValue
:
"积分增加"
,
},
{
importType
:
12
,
importValue
:
"积分扣除"
,
},
{
importType
:
13
,
importValue
:
"等级调整"
,
},
{
importType
:
14
,
importValue
:
"服务门店/专属导购调整"
,
},
{
importType
:
15
,
importValue
:
"批量冻结会员"
,
},
{
importType
:
16
,
importValue
:
"批量解冻会员"
,
},
],
sceneValue
:
"member"
,
// 人群筛选器场景值
navpath
:
[
{
name
:
"首页"
,
path
:
""
},
...
...
src/components/wechatmembers/frozen-member/components/importDialog.vue
deleted
100644 → 0
View file @
b8639ca3
<
template
>
<!-- 新建导入 -->
<el-dialog
title=
"新建导入"
custom-class=
"customer-dialog"
:visible
.
sync=
"dialogImport"
width=
"600px"
@
closed=
"onDialogImportClosed"
>
<el-form
ref=
"formByImport"
:rules=
"rules"
:model=
"formByImport"
label-width=
"100px"
label-suffix=
":"
style=
"margin-bottom: 36px"
>
<el-form-item
label=
"导入类型"
prop=
"importValue"
>
<el-select
v-model=
"formByImport.importValue"
placeholder=
"请选择导入类型"
@
change=
"handleChangeType"
:disabled=
"importList.length
<
2
"
>
<el-option
:label=
"item.importValue"
:value=
"item.importType"
v-for=
"item in importList"
:key=
"item"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"选择文件"
prop=
"file"
required
>
<dm-import-file
:visible
.
sync=
"dialogVisible"
:options=
"options"
ref=
"importFile"
@
change=
"fileChange"
></dm-import-file>
</el-form-item>
</el-form>
<div
class=
"dialogTips"
>
<h3>
导入规则
</h3>
<p>
1. 通过导入Excel表格的形式变更GIC已存在的会员信息;不支持导入新会员数据
</p>
<p>
2. 仅支持.xlsx 文件的导入;每次导入数据量最多为10000条;文件大小不超过1M
</p>
<p>
3.
导入类型不同,文件模板也不同,请严格按照模板内容填入会员数据,否则将会报错
</p>
<p>
4. 请仔细核对需要变更的会员数据是否准确,否则GIC校验不通过将无法执行成功
</p>
<p>
5.
超管账号支持导入变更全部会员信息,已分权商户的子管理员账号仅可修改管辖范围内的会员信息
</p>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"onDialogImportClosed"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"importTable"
:disable=
"load"
>
确 定
</el-button
>
</span>
</el-dialog>
</
template
>
<
script
>
import
url
from
"@/components/axios/url"
;
import
{
checkFalse
,
checkSuccess
}
from
"../../../../../static/js/checkStatus"
;
import
{
doFetch
,
doFetchGet
}
from
"@/components/axios/api"
;
export
default
{
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
,
},
importList
:
{
type
:
Array
,
default
:
[
{
importType
:
15
,
importValue
:
"批量冻结会员"
,
},
{
importType
:
16
,
importValue
:
"批量解冻会员"
,
},
],
},
},
filters
:
{
// 模板下载文字过滤
},
data
()
{
return
{
visible
:
true
,
options
:
{
desc
:
'下载模板并完善信息后,点击此处上传文件,支持格式:.XLSX'
,
downloadTemplate
:
[],
optType
:
0
,
//required
accept
:
[
'.xlsx'
],
// 默认 ['.xlsx', '.xls', '.csv']
maxSize
:
100000
,
// 传递byte required
maxSizeDesc
:
'10M'
,
multiple
:
false
,
// 默认false
hiddleFile
:
false
,
},
actionUrl
:
url
.
uploadExecl
,
// 搜索选项值
importType
:
""
,
// 新建dialog
dialogImport
:
false
,
// 表单
formByImport
:
{
importValue
:
""
,
fileList
:
[],
},
rules
:
{
importValue
:
[
{
required
:
true
,
message
:
"请选择导入类型"
,
trigger
:
"change"
},
],
},
rows
:
0
,
// excel数据数量
// 上传验证加载
load
:
false
,
};
},
watch
:
{
importList
:{
handler
(
n
){
let
value
=
''
;
if
(
n
&&
n
.
length
){
value
=
n
[
0
].
importType
;
}
else
{
value
=
''
}
this
.
formByImport
.
importValue
=
value
;
this
.
handleChangeType
(
value
);
},
deep
:
true
,
immediate
:
true
},
dialogVisible
(
n
,
o
)
{
this
.
dialogImport
=
n
;
},
},
methods
:
{
fileChange
(
res
){
this
.
formByImport
.
fileList
=
res
.
files
||
[];
},
// batchType
// 表单清除
onDialogImportClosed
()
{
this
.
$refs
.
formByImport
.
resetFields
();
this
.
$emit
(
"update:dialogVisible"
,
false
);
},
handleChangeType
(
value
){
let
selectedImportItem
=
this
.
importList
.
find
(
item
=>
{
return
item
.
importType
==
value
;
})
this
.
options
.
downloadTemplate
=
selectedImportItem
?[{
name
:
`下载
${
selectedImportItem
.
importValue
}
模板`
,
url
:
`
${
url
.
downLoadExcelTemplate
}
?requestProject=member&batchType=
${
selectedImportItem
.
importType
}
`
}]:[]
},
// 确认导入
importTable
()
{
this
.
$refs
.
formByImport
.
validateField
(
"importValue"
,
(
err
)
=>
{
if
(
!
err
)
{
// console.log(this.formByImport.fileList);
let
{
fileList
,
importValue
}
=
this
.
formByImport
;
if
(
fileList
.
length
)
{
this
.
load
=
true
;
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
fileList
[
0
]);
formData
.
append
(
'requestProject'
,
'member'
);
formData
.
append
(
'batchType'
,
importValue
);
doFetch
(
url
.
uploadExecl
,
formData
).
then
((
res
)
=>
{
let
{
errorCode
}
=
res
.
data
;
if
(
errorCode
==
0
){
checkSuccess
(
'上传成功'
)
this
.
onDialogImportClosed
();
}
}).
finally
(()
=>
{
this
.
load
=
false
;
})
}
else
{
checkFalse
(
"请上传文件"
);
}
}
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.el-dialog__footer
{
border
:
none
;
}
.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
;
}
}
.success_icon
{
text-align
:
center
;
color
:
#52c41a
;
font-size
:
47px
;
}
.successHeader
{
text-align
:
center
;
color
:
#303133
;
font-size
:
16px
;
line-height
:
39px
;
}
.successCon
{
text-align
:
center
;
color
:
#606266
;
font-size
:
12px
;
}
.member-wechat-timer
{
width
:
20px
;
height
:
20px
;
font-size
:
10px
;
line-height
:
20px
;
padding
:
0
;
}
.dialogSuccess
/
deep
/
.el-dialog__footer
{
text-align
:
center
;
padding-bottom
:
22px
;
}
</
style
>
src/components/wechatmembers/frozen-member/frozen-list/frozen-list.vue
View file @
ec4c8039
...
...
@@ -38,7 +38,7 @@
>
<el-button
plain
@
click=
"toWhiteList"
v-if=
"getCodeAuth('memberFrozenWhiteList')"
v-if=
"getCodeAuth('memberFrozenWhiteList')"
:limit-code=
"getCode('memberFrozenWhiteList')"
>
白名单
</el-button>
<el-button
...
...
src/components/wechatmembers/frozen-member/frozen-member/frozen-member.js
View file @
ec4c8039
...
...
@@ -6,7 +6,7 @@ import {
}
from
"../../../../../static/js/checkStatus"
;
import
authMethods
from
"@/mixins/auth"
;
import
defaultImg
from
"../../../../../static/img/default.png"
;
import
ImportDialog
from
'../components/importDialog.vue'
;
import
ImportDialog
from
"@/components/allCustomers/components/importDialog.vue"
;
import
{
formatLongTime
}
from
"@/utils/utils"
;
export
default
{
name
:
"frozen-member"
,
...
...
src/components/wechatmembers/frozen-member/white-list/white-list.js
View file @
ec4c8039
...
...
@@ -6,7 +6,7 @@ import {
}
from
"../../../../../static/js/checkStatus"
;
import
authMethods
from
"@/mixins/auth"
;
import
defaultImg
from
"../../../../../static/img/default.png"
;
import
ImportDialog
from
'../components/importDialog.vue'
;
import
ImportDialog
from
"@/components/allCustomers/components/importDialog.vue"
;
import
{
formatLongTime
}
from
"@/utils/utils"
;
import
FreezeDialog
from
'../../components/dialog/freeze.vue'
;
export
default
{
...
...
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