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
// 门店活码类型 storeCodeType 1:门店导购码 2:门店群活码
export
function
getCode
(
type
)
{
return
request
({
url
:
service
+
'/config/'
+
type
,
url
:
service
+
'/config/'
+
type
})
}
...
...
@@ -12,7 +12,7 @@ export function getCode(type) {
export
function
getTableList
(
params
)
{
return
request
({
url
:
service
+
'/storeCodes'
,
params
,
params
})
}
...
...
@@ -20,7 +20,7 @@ export function getTableList(params) {
export
function
deleteStore
(
ids
)
{
return
request
({
url
:
service
+
'/'
+
ids
,
method
:
'delete'
,
method
:
'delete'
})
}
...
...
@@ -29,7 +29,7 @@ export function updateState(ids, params) {
return
request
({
url
:
service
+
'/batchStartOrStop/'
+
ids
,
method
:
'put'
,
data
:
params
,
data
:
params
})
}
...
...
@@ -37,6 +37,7 @@ export function updateState(ids, params) {
export
function
downloadTemplate
()
{
return
request
({
url
:
service
+
'/importTemplate'
,
responseType
:
'blob'
})
}
...
...
@@ -46,7 +47,7 @@ export function uploadStore(params) {
return
request
({
url
:
service
+
'/importData'
,
method
:
'post'
,
data
:
params
,
data
:
params
})
}
...
...
@@ -55,14 +56,14 @@ export function addOrUpdateStore(params) {
return
request
({
url
:
service
+
'/code/createOrUpdateStoreCode'
,
method
:
'post'
,
data
:
params
,
data
:
params
})
}
// 门店详情
export
function
storeDetail
(
id
)
{
return
request
({
url
:
service
+
'/getWeStoreCodeById/'
+
id
,
url
:
service
+
'/getWeStoreCodeById/'
+
id
})
}
...
...
@@ -71,14 +72,14 @@ export function addOrUpdateCodeInStore(params) {
return
request
({
url
:
service
+
'/config/createOrUpdate'
,
method
:
'post'
,
data
:
params
,
data
:
params
})
}
// 门店详情统计 头部
export
function
getTabTotalInStore
(
id
)
{
return
request
({
url
:
service
+
'/countWeStoreTab/'
+
id
,
url
:
service
+
'/countWeStoreTab/'
+
id
})
}
...
...
@@ -86,7 +87,7 @@ export function getTabTotalInStore(id) {
export
function
getLineDataGuideCode
(
params
)
{
return
request
({
url
:
service
+
'/countStoreShopGuideTrend'
,
params
,
params
})
}
...
...
@@ -94,7 +95,7 @@ export function getLineDataGuideCode(params) {
export
function
getLineDataStoreCode
(
params
)
{
return
request
({
url
:
service
+
'/countStoreGroupTrend'
,
params
,
params
})
}
...
...
@@ -103,7 +104,7 @@ export function downloadUrl(params) {
return
request
({
url
:
service
+
'/downloadStoreCodeConfigUrl'
,
params
,
responseType
:
'blob'
,
responseType
:
'blob'
})
}
...
...
@@ -111,7 +112,7 @@ export function downloadUrl(params) {
export
function
getGuideCodeTab
(
params
)
{
return
request
({
url
:
service
+
'/countWeStoreShopGuideTab'
,
params
,
params
})
}
...
...
@@ -119,7 +120,7 @@ export function getGuideCodeTab(params) {
export
function
getStoreCodeTab
(
params
)
{
return
request
({
url
:
service
+
'/countWeStoreGroupTab'
,
params
,
params
})
}
...
...
@@ -127,7 +128,7 @@ export function getStoreCodeTab(params) {
export
function
getBarTop10GuideCode
(
params
)
{
return
request
({
url
:
service
+
'/countStoreShopGuideDrum'
,
params
,
params
})
}
...
...
@@ -135,7 +136,7 @@ export function getBarTop10GuideCode(params) {
export
function
getBarTop10StoreCode
(
params
)
{
return
request
({
url
:
service
+
'/countStoreShopGroupDrum'
,
params
,
params
})
}
...
...
@@ -143,7 +144,7 @@ export function getBarTop10StoreCode(params) {
export
function
getTableInGuideCode
(
params
)
{
return
request
({
url
:
service
+
'/countShopGuideReport'
,
params
,
params
})
}
...
...
@@ -151,7 +152,7 @@ export function getTableInGuideCode(params) {
export
function
getTableGuideCodeExport
(
params
)
{
return
request
({
url
:
service
+
'/exportCountShopGuideReport'
,
params
,
params
})
}
...
...
@@ -159,7 +160,7 @@ export function getTableGuideCodeExport(params) {
export
function
getTableInStoreCode
(
params
)
{
return
request
({
url
:
service
+
'/countStoreGroupReport'
,
params
,
params
})
}
...
...
@@ -167,6 +168,6 @@ export function getTableInStoreCode(params) {
export
function
getTableStoreCodeExport
(
params
)
{
return
request
({
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 @@
:show-close=
"false"
title=
"批量导入"
:visible
.
sync=
"dialogVisible"
width=
"500px"
>
width=
"500px"
>
<div
class=
"download_template"
>
<span>
请下载门店模板,按格式修改后导入
</span>
<el-button
size=
"mini"
type=
"text"
plain
@
click=
"downloadFn"
>
下载模板
</el-button>
...
...
@@ -21,19 +22,20 @@
:on-remove=
"handleRemove"
:on-change=
"setFileData"
:auto-upload=
"false"
:on-exceed=
"handlerExceed"
>
:on-exceed=
"handlerExceed"
>
<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>
</div>
</el-upload>
</div>
<div
class=
"tip"
>
<div
class=
"title"
>
填写说明
</div>
<div
style=
"margin-bottom: 3px"
>
1、门店名称、所属地区、门店地址必填;
</div>
<div
style=
"margin-bottom: 3px"
>
2、门店名称不可重复,重复则自动过滤;
</div>
<div
style=
"margin-bottom: 3px
;
"
>
1、门店名称、所属地区、门店地址必填;
</div>
<div
style=
"margin-bottom: 3px
;
"
>
2、门店名称不可重复,重复则自动过滤;
</div>
<div>
3、所属地区请务必按照“xxx省xxx市xxx区/县”格式填写。
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -41,7 +43,8 @@
@
click=
"
dialogVisible = false
file = ''
"
>
"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitImport"
v-loading=
"submitLoading"
>
确 定
</el-button>
...
...
@@ -50,94 +53,100 @@
</div>
</
template
>
<
script
>
import
{
download
,
toFormData
}
from
'@/utils/common'
import
{
downloadTemplate
,
uploadStore
}
from
'@/api/drainageCode/store'
export
default
{
name
:
'import-store'
,
data
()
{
return
{
headers
:
window
.
lwConfig
.
headers
,
submitLoading
:
false
,
actionUrl
:
''
,
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,请选择拖拽一份文件或删除已存在文件!'
)
import
{
download
,
toFormData
}
from
'@/utils/common'
import
{
downloadTemplate
,
uploadStore
}
from
'@/api/drainageCode/store'
export
default
{
name
:
'import-store'
,
data
()
{
return
{
headers
:
window
.
lwConfig
.
headers
,
submitLoading
:
false
,
actionUrl
:
''
,
file
:
''
}
},
submitImport
()
{
if
(
!
this
.
file
)
{
t
his
.
msgInfo
(
'请先上传文件!'
)
return
false
props
:
{
visible
:
{
t
ype
:
Boolean
,
default
:
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
computed
:
{
dialogVisible
:
{
get
()
{
return
this
.
visible
},
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
}
}
},
downloadFn
()
{
downloadTemplate
().
then
((
res
)
=>
{
if
(
res
!=
null
)
{
download
(
res
.
data
)
methods
:
{
handlerExceed
()
{
this
.
msgError
(
'上传文件个数最大为1,请选择拖拽一份文件或删除已存在文件!'
)
},
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
>
<
style
lang=
"scss"
scoped
>
.download_template
{
padding
:
5px
20px
;
//
color
:
#ebb563
;
background-color
:
#eee
;
border-radius
:
4px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.upload_content
{
margin-top
:
10px
;
text-align
:
center
;
::v-deep
.el-upload-dragger
{
width
:
460px
;
.el-icon-upload
{
margin
:
20px
0
16px
;
.download_template
{
padding
:
5px
20px
;
//
color
:
#ebb563
;
background-color
:
#eee
;
border-radius
:
4px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.upload_content
{
margin-top
:
10px
;
text-align
:
center
;
::v-deep
.el-upload-dragger
{
width
:
460px
;
.el-icon-upload
{
margin
:
20px
0
16px
;
}
}
}
}
.tip
{
padding
:
5px
2
0px
;
margin-top
:
10
px
;
font-size
:
12px
;
color
:
#999999
;
.title
{
margin-bottom
:
10
px
;
font-size
:
14px
;
.tip
{
padding
:
5px
20px
;
margin-top
:
1
0px
;
font-size
:
12
px
;
color
:
#999999
;
.title
{
margin-bottom
:
10px
;
font-size
:
14
px
;
}
}
}
</
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