Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ca85262f
authored
Mar 30, 2023
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop'
2 parents
ba442995
632dcb68
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
106 deletions
linkwe-pc/src/api/drainageCode/store.js
linkwe-pc/src/views/customerManage/lossRemind.vue
linkwe-pc/src/views/drainageCode/components/ImportStore.vue
linkwe-pc/src/api/drainageCode/store.js
View file @
ca85262
...
@@ -4,7 +4,7 @@ const service = window.lwConfig.services.system + window.lwConfig.services.wecom
...
@@ -4,7 +4,7 @@ const service = window.lwConfig.services.system + window.lwConfig.services.wecom
// 门店活码类型 storeCodeType 1:门店导购码 2:门店群活码
// 门店活码类型 storeCodeType 1:门店导购码 2:门店群活码
export
function
getCode
(
type
)
{
export
function
getCode
(
type
)
{
return
request
({
return
request
({
url
:
service
+
'/config/'
+
type
,
url
:
service
+
'/config/'
+
type
})
})
}
}
...
@@ -12,7 +12,7 @@ export function getCode(type) {
...
@@ -12,7 +12,7 @@ export function getCode(type) {
export
function
getTableList
(
params
)
{
export
function
getTableList
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/storeCodes'
,
url
:
service
+
'/storeCodes'
,
params
,
params
})
})
}
}
...
@@ -20,7 +20,7 @@ export function getTableList(params) {
...
@@ -20,7 +20,7 @@ export function getTableList(params) {
export
function
deleteStore
(
ids
)
{
export
function
deleteStore
(
ids
)
{
return
request
({
return
request
({
url
:
service
+
'/'
+
ids
,
url
:
service
+
'/'
+
ids
,
method
:
'delete'
,
method
:
'delete'
})
})
}
}
...
@@ -29,7 +29,7 @@ export function updateState(ids, params) {
...
@@ -29,7 +29,7 @@ export function updateState(ids, params) {
return
request
({
return
request
({
url
:
service
+
'/batchStartOrStop/'
+
ids
,
url
:
service
+
'/batchStartOrStop/'
+
ids
,
method
:
'put'
,
method
:
'put'
,
data
:
params
,
data
:
params
})
})
}
}
...
@@ -37,6 +37,7 @@ export function updateState(ids, params) {
...
@@ -37,6 +37,7 @@ export function updateState(ids, params) {
export
function
downloadTemplate
()
{
export
function
downloadTemplate
()
{
return
request
({
return
request
({
url
:
service
+
'/importTemplate'
,
url
:
service
+
'/importTemplate'
,
responseType
:
'blob'
})
})
}
}
...
@@ -46,7 +47,7 @@ export function uploadStore(params) {
...
@@ -46,7 +47,7 @@ export function uploadStore(params) {
return
request
({
return
request
({
url
:
service
+
'/importData'
,
url
:
service
+
'/importData'
,
method
:
'post'
,
method
:
'post'
,
data
:
params
,
data
:
params
})
})
}
}
...
@@ -55,14 +56,14 @@ export function addOrUpdateStore(params) {
...
@@ -55,14 +56,14 @@ export function addOrUpdateStore(params) {
return
request
({
return
request
({
url
:
service
+
'/code/createOrUpdateStoreCode'
,
url
:
service
+
'/code/createOrUpdateStoreCode'
,
method
:
'post'
,
method
:
'post'
,
data
:
params
,
data
:
params
})
})
}
}
// 门店详情
// 门店详情
export
function
storeDetail
(
id
)
{
export
function
storeDetail
(
id
)
{
return
request
({
return
request
({
url
:
service
+
'/getWeStoreCodeById/'
+
id
,
url
:
service
+
'/getWeStoreCodeById/'
+
id
})
})
}
}
...
@@ -71,14 +72,14 @@ export function addOrUpdateCodeInStore(params) {
...
@@ -71,14 +72,14 @@ export function addOrUpdateCodeInStore(params) {
return
request
({
return
request
({
url
:
service
+
'/config/createOrUpdate'
,
url
:
service
+
'/config/createOrUpdate'
,
method
:
'post'
,
method
:
'post'
,
data
:
params
,
data
:
params
})
})
}
}
// 门店详情统计 头部
// 门店详情统计 头部
export
function
getTabTotalInStore
(
id
)
{
export
function
getTabTotalInStore
(
id
)
{
return
request
({
return
request
({
url
:
service
+
'/countWeStoreTab/'
+
id
,
url
:
service
+
'/countWeStoreTab/'
+
id
})
})
}
}
...
@@ -86,7 +87,7 @@ export function getTabTotalInStore(id) {
...
@@ -86,7 +87,7 @@ export function getTabTotalInStore(id) {
export
function
getLineDataGuideCode
(
params
)
{
export
function
getLineDataGuideCode
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countStoreShopGuideTrend'
,
url
:
service
+
'/countStoreShopGuideTrend'
,
params
,
params
})
})
}
}
...
@@ -94,7 +95,7 @@ export function getLineDataGuideCode(params) {
...
@@ -94,7 +95,7 @@ export function getLineDataGuideCode(params) {
export
function
getLineDataStoreCode
(
params
)
{
export
function
getLineDataStoreCode
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countStoreGroupTrend'
,
url
:
service
+
'/countStoreGroupTrend'
,
params
,
params
})
})
}
}
...
@@ -103,7 +104,7 @@ export function downloadUrl(params) {
...
@@ -103,7 +104,7 @@ export function downloadUrl(params) {
return
request
({
return
request
({
url
:
service
+
'/downloadStoreCodeConfigUrl'
,
url
:
service
+
'/downloadStoreCodeConfigUrl'
,
params
,
params
,
responseType
:
'blob'
,
responseType
:
'blob'
})
})
}
}
...
@@ -111,7 +112,7 @@ export function downloadUrl(params) {
...
@@ -111,7 +112,7 @@ export function downloadUrl(params) {
export
function
getGuideCodeTab
(
params
)
{
export
function
getGuideCodeTab
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countWeStoreShopGuideTab'
,
url
:
service
+
'/countWeStoreShopGuideTab'
,
params
,
params
})
})
}
}
...
@@ -119,7 +120,7 @@ export function getGuideCodeTab(params) {
...
@@ -119,7 +120,7 @@ export function getGuideCodeTab(params) {
export
function
getStoreCodeTab
(
params
)
{
export
function
getStoreCodeTab
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countWeStoreGroupTab'
,
url
:
service
+
'/countWeStoreGroupTab'
,
params
,
params
})
})
}
}
...
@@ -127,7 +128,7 @@ export function getStoreCodeTab(params) {
...
@@ -127,7 +128,7 @@ export function getStoreCodeTab(params) {
export
function
getBarTop10GuideCode
(
params
)
{
export
function
getBarTop10GuideCode
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countStoreShopGuideDrum'
,
url
:
service
+
'/countStoreShopGuideDrum'
,
params
,
params
})
})
}
}
...
@@ -135,7 +136,7 @@ export function getBarTop10GuideCode(params) {
...
@@ -135,7 +136,7 @@ export function getBarTop10GuideCode(params) {
export
function
getBarTop10StoreCode
(
params
)
{
export
function
getBarTop10StoreCode
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countStoreShopGroupDrum'
,
url
:
service
+
'/countStoreShopGroupDrum'
,
params
,
params
})
})
}
}
...
@@ -143,7 +144,7 @@ export function getBarTop10StoreCode(params) {
...
@@ -143,7 +144,7 @@ export function getBarTop10StoreCode(params) {
export
function
getTableInGuideCode
(
params
)
{
export
function
getTableInGuideCode
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countShopGuideReport'
,
url
:
service
+
'/countShopGuideReport'
,
params
,
params
})
})
}
}
...
@@ -151,7 +152,7 @@ export function getTableInGuideCode(params) {
...
@@ -151,7 +152,7 @@ export function getTableInGuideCode(params) {
export
function
getTableGuideCodeExport
(
params
)
{
export
function
getTableGuideCodeExport
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/exportCountShopGuideReport'
,
url
:
service
+
'/exportCountShopGuideReport'
,
params
,
params
})
})
}
}
...
@@ -159,7 +160,7 @@ export function getTableGuideCodeExport(params) {
...
@@ -159,7 +160,7 @@ export function getTableGuideCodeExport(params) {
export
function
getTableInStoreCode
(
params
)
{
export
function
getTableInStoreCode
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/countStoreGroupReport'
,
url
:
service
+
'/countStoreGroupReport'
,
params
,
params
})
})
}
}
...
@@ -167,6 +168,6 @@ export function getTableInStoreCode(params) {
...
@@ -167,6 +168,6 @@ export function getTableInStoreCode(params) {
export
function
getTableStoreCodeExport
(
params
)
{
export
function
getTableStoreCodeExport
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/exportCountStoreGroupReport'
,
url
:
service
+
'/exportCountStoreGroupReport'
,
params
,
params
})
})
}
}
linkwe-pc/src/views/customerManage/lossRemind.vue
View file @
ca85262
This diff is collapsed.
Click to expand it.
linkwe-pc/src/views/drainageCode/components/ImportStore.vue
View file @
ca85262
...
@@ -5,7 +5,8 @@
...
@@ -5,7 +5,8 @@
:show-close=
"false"
:show-close=
"false"
title=
"批量导入"
title=
"批量导入"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"500px"
>
width=
"500px"
>
<div
class=
"download_template"
>
<div
class=
"download_template"
>
<span>
请下载门店模板,按格式修改后导入
</span>
<span>
请下载门店模板,按格式修改后导入
</span>
<el-button
size=
"mini"
type=
"text"
plain
@
click=
"downloadFn"
>
下载模板
</el-button>
<el-button
size=
"mini"
type=
"text"
plain
@
click=
"downloadFn"
>
下载模板
</el-button>
...
@@ -21,19 +22,20 @@
...
@@ -21,19 +22,20 @@
:on-remove=
"handleRemove"
:on-remove=
"handleRemove"
:on-change=
"setFileData"
:on-change=
"setFileData"
:auto-upload=
"false"
:auto-upload=
"false"
:on-exceed=
"handlerExceed"
>
:on-exceed=
"handlerExceed"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
style=
"font-size: 12px"
>
<div
style=
"font-size: 12px
;
"
>
将文件拖拽到此区域
将文件拖拽到此区域
<p
style=
"margin: 3px 0"
>
仅支持xls、xlsx格式文件
</p>
<p
style=
"margin: 3px 0
;
"
>
仅支持xls、xlsx格式文件
</p>
<el-button
size=
"mini"
type=
"primary"
plain
>
上传文件
</el-button>
<el-button
size=
"mini"
type=
"primary"
plain
>
上传文件
</el-button>
</div>
</div>
</el-upload>
</el-upload>
</div>
</div>
<div
class=
"tip"
>
<div
class=
"tip"
>
<div
class=
"title"
>
填写说明
</div>
<div
class=
"title"
>
填写说明
</div>
<div
style=
"margin-bottom: 3px"
>
1、门店名称、所属地区、门店地址必填;
</div>
<div
style=
"margin-bottom: 3px
;
"
>
1、门店名称、所属地区、门店地址必填;
</div>
<div
style=
"margin-bottom: 3px"
>
2、门店名称不可重复,重复则自动过滤;
</div>
<div
style=
"margin-bottom: 3px
;
"
>
2、门店名称不可重复,重复则自动过滤;
</div>
<div>
3、所属地区请务必按照“xxx省xxx市xxx区/县”格式填写。
</div>
<div>
3、所属地区请务必按照“xxx省xxx市xxx区/县”格式填写。
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -41,7 +43,8 @@
...
@@ -41,7 +43,8 @@
@
click=
"
@
click=
"
dialogVisible = false
dialogVisible = false
file = ''
file = ''
"
>
"
>
取 消
取 消
</el-button>
</el-button>
<el-button
type=
"primary"
@
click=
"submitImport"
v-loading=
"submitLoading"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitImport"
v-loading=
"submitLoading"
>
确 定
</el-button>
...
@@ -50,94 +53,100 @@
...
@@ -50,94 +53,100 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
download
,
toFormData
}
from
'@/utils/common'
import
{
download
,
toFormData
}
from
'@/utils/common'
import
{
downloadTemplate
,
uploadStore
}
from
'@/api/drainageCode/store'
import
{
downloadTemplate
,
uploadStore
}
from
'@/api/drainageCode/store'
export
default
{
export
default
{
name
:
'import-store'
,
name
:
'import-store'
,
data
()
{
data
()
{
return
{
return
{
headers
:
window
.
lwConfig
.
headers
,
headers
:
window
.
lwConfig
.
headers
,
submitLoading
:
false
,
submitLoading
:
false
,
actionUrl
:
''
,
actionUrl
:
''
,
file
:
''
,
file
:
''
}
}
},
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
},
computed
:
{
dialogVisible
:
{
get
()
{
return
this
.
visible
},
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
},
},
},
methods
:
{
handlerExceed
()
{
this
.
msgError
(
'上传文件个数最大为1,请选择拖拽一份文件或删除已存在文件!'
)
},
},
submitImport
()
{
props
:
{
if
(
!
this
.
file
)
{
visible
:
{
t
his
.
msgInfo
(
'请先上传文件!'
)
t
ype
:
Boolean
,
return
false
default
:
false
}
}
uploadStore
(
toFormData
({
file
:
this
.
file
})).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
res
.
data
)
this
.
dialogVisible
=
false
this
.
$emit
(
'update'
)
}
})
},
},
handleRemove
()
{},
computed
:
{
setFileData
(
f
,
fl
)
{
dialogVisible
:
{
this
.
file
=
f
.
raw
get
()
{
return
this
.
visible
},
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
}
}
},
},
downloadFn
()
{
methods
:
{
downloadTemplate
().
then
((
res
)
=>
{
handlerExceed
()
{
if
(
res
!=
null
)
{
this
.
msgError
(
'上传文件个数最大为1,请选择拖拽一份文件或删除已存在文件!'
)
download
(
res
.
data
)
},
submitImport
()
{
if
(
!
this
.
file
)
{
this
.
msgInfo
(
'请先上传文件!'
)
return
false
}
}
})
uploadStore
(
toFormData
({
file
:
this
.
file
})).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
res
.
data
)
this
.
dialogVisible
=
false
this
.
$emit
(
'update'
)
}
})
},
handleRemove
()
{},
setFileData
(
f
,
fl
)
{
this
.
file
=
f
.
raw
},
downloadFn
()
{
downloadTemplate
().
then
((
res
)
=>
{
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
'门店模板.xlsx'
//指定下载文件名
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
}
},
},
},
created
()
{}
created
()
{},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.download_template
{
.download_template
{
padding
:
5px
20px
;
padding
:
5px
20px
;
//
color
:
#ebb563
;
//
color
:
#ebb563
;
background-color
:
#eee
;
background-color
:
#eee
;
border-radius
:
4px
;
border-radius
:
4px
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
}
}
.upload_content
{
.upload_content
{
margin-top
:
10px
;
margin-top
:
10px
;
text-align
:
center
;
text-align
:
center
;
::v-deep
.el-upload-dragger
{
::v-deep
.el-upload-dragger
{
width
:
460px
;
width
:
460px
;
.el-icon-upload
{
.el-icon-upload
{
margin
:
20px
0
16px
;
margin
:
20px
0
16px
;
}
}
}
}
}
}
.tip
{
.tip
{
padding
:
5px
20px
;
padding
:
5px
2
0px
;
margin-top
:
1
0px
;
margin-top
:
10
px
;
font-size
:
12
px
;
font-size
:
12px
;
color
:
#999999
;
color
:
#999999
;
.title
{
.title
{
margin-bottom
:
10px
;
margin-bottom
:
10
px
;
font-size
:
14
px
;
font-size
:
14px
;
}
}
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment