Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-discover
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 1fdd4e09
authored
Jul 11, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改门店列表
1 parent
5b227c61
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
147 additions
and
11 deletions
src/api/modules/store.js
src/views/goods/add.vue
src/views/goods/index.vue
src/views/store/edit.vue
src/api/modules/store.js
View file @
1fdd4e0
...
@@ -66,7 +66,8 @@ const getconfigMerchant = params => {
...
@@ -66,7 +66,8 @@ const getconfigMerchant = params => {
}
}
// 分页查询频道主题(内容)列表
// 分页查询频道主题(内容)列表
const
getChannelTopicList
=
params
=>
{
const
getChannelTopicList
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.discover.channel.topic.page`
params
.
method
=
params
.
apiType
==
5
?
`scrm.api.shopmall.goods.configuration.page`
:
`scrm.api.shopmall.discover.channel.topic.page`
if
(
params
.
apiType
==
5
)
params
.
pageNum
=
params
.
currentPage
return
http
({
return
http
({
url
:
'rop-scrm-shopmall/router'
,
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
...
src/views/goods/add.vue
View file @
1fdd4e0
...
@@ -269,6 +269,7 @@ export default {
...
@@ -269,6 +269,7 @@ export default {
// this.getCategory()
// this.getCategory()
const
urlParam
=
this
.
$route
.
params
const
urlParam
=
this
.
$route
.
params
this
.
routeInfo
=
JSON
.
parse
(
decodeURIComponent
(
urlParam
.
id
))
this
.
routeInfo
=
JSON
.
parse
(
decodeURIComponent
(
urlParam
.
id
))
console
.
log
(
this
.
routeInfo
)
const
{
id
,
type
}
=
this
.
routeInfo
const
{
id
,
type
}
=
this
.
routeInfo
if
(
id
){
if
(
id
){
this
.
disabled
=
type
==
1
this
.
disabled
=
type
==
1
...
@@ -385,9 +386,9 @@ export default {
...
@@ -385,9 +386,9 @@ export default {
const
params
=
{
const
params
=
{
id
:
this
.
routeInfo
.
id
id
:
this
.
routeInfo
.
id
}
}
if
(
this
.
routeInfo
.
merchantId
)
params
.
merchantId
=
this
.
routeInfo
.
merchantId
this
.
$apis
.
goods
.
getGoodsDetail
(
params
).
then
(
res
=>
{
this
.
$apis
.
goods
.
getGoodsDetail
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
res
,
12355
)
for
(
const
key
in
this
.
formObj
){
for
(
const
key
in
this
.
formObj
){
const
formatAttr
=
[
'depositPrice'
,
'minSellPrice'
,
'retailPrice'
]
const
formatAttr
=
[
'depositPrice'
,
'minSellPrice'
,
'retailPrice'
]
if
(
formatAttr
.
includes
(
key
)){
if
(
formatAttr
.
includes
(
key
)){
...
...
src/views/goods/index.vue
View file @
1fdd4e0
...
@@ -298,14 +298,12 @@
...
@@ -298,14 +298,12 @@
this
.
$refs
.
channelRef
.
data
.
length
?
(
this
.
$refs
.
channelRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
channelRef
.
setTableHeightFun
()
this
.
$refs
.
channelRef
.
data
.
length
?
(
this
.
$refs
.
channelRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
channelRef
.
setTableHeightFun
()
},
},
handleAdd
(
row
=
{},
type
){
handleAdd
(
row
=
{},
type
){
const
params
=
{
const
params
=
{}
id
:
row
.
id
}
let
title
=
'新增商品'
let
title
=
'新增商品'
if
(
type
){
if
(
type
){
params
.
id
=
row
.
id
params
.
id
=
row
.
id
params
.
type
=
type
params
.
type
=
type
title
=
type
==
1
?
'
新增'
:
'查看
'
title
=
type
==
1
?
'
查看商品'
:
'编辑商品
'
}
}
const
queryStr
=
encodeURIComponent
(
JSON
.
stringify
(
params
))
const
queryStr
=
encodeURIComponent
(
JSON
.
stringify
(
params
))
...
...
src/views/store/edit.vue
View file @
1fdd4e0
...
@@ -16,6 +16,34 @@
...
@@ -16,6 +16,34 @@
</div>
</div>
</div>
</div>
<GLTable
ref=
"editRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:beforeSearchFn=
"beforeSearchFn"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"editRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:beforeSearchFn=
"beforeSearchFn"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"imageSlot"
class=
"table-image"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
<img
class=
"table-popover-img"
:src=
"scope.scope.goodsImage"
/>
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.goodsImage"
/>
</el-popover>
</div>
<div
slot=
"statusSlot"
slot-scope=
"scope"
>
<span
:class=
"['status', scope.scope.goodsStatus==1 ? 'success-status': 'error-status']"
></span>
<span>
{{
scope
.
scope
.
goodsStatus
==
1
?
'上架'
:
'下架'
}}
</span>
</div>
<div
slot=
"merchantPriceSlot"
slot-scope=
"scope"
>
<template
v-if=
"scope.scope.merchantList && scope.scope.merchantList.length > 1"
>
<span>
{{
filterData
(
scope
.
scope
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<el-popover
placement=
"top"
width=
"400"
trigger=
"hover"
>
<div
v-for=
"(item,index) in filterData(scope.scope)"
:key=
"index"
>
{{
item
}}
</div>
<span
class=
"more-info"
slot=
"reference"
>
...[
{{
scope
.
scope
.
merchantList
.
length
}}
]
</span>
</el-popover>
</
template
>
<
template
v-else
>
<span
v-if=
"!scope.scope.merchantList || !scope.scope.merchantList.length"
>
--
</span>
<span
v-else
>
{{
filterData
(
scope
.
scope
).
join
(
'、'
)
}}
</span>
</
template
>
</div>
<
template
slot=
"activityLink"
slot-scope=
"scope"
>
<
template
slot=
"activityLink"
slot-scope=
"scope"
>
<span
class=
"relink"
>
{{
scope
.
scope
.
activityName
}}
</span>
<span
class=
"relink"
>
{{
scope
.
scope
.
activityName
}}
</span>
</
template
>
</
template
>
...
@@ -26,6 +54,8 @@
...
@@ -26,6 +54,8 @@
<el-switch
v-model=
"scope.scope.isOpen"
@
change=
"updateState(scope.scope)"
></el-switch>
<el-switch
v-model=
"scope.scope.isOpen"
@
change=
"updateState(scope.scope)"
></el-switch>
</
template
>
</
template
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<
template
v-if=
"activeName==5"
>
<el-button
type=
"text"
@
click=
"viewGoods(scope.scope, 1)"
>
查看
</el-button></
template
>
<
template
v-else
>
<template
v-if=
"scope.scope.confType != 1"
>
<template
v-if=
"scope.scope.confType != 1"
>
<el-button
type=
"text"
v-if=
"scope.scope.contentType == 1"
@
click=
"handleConfig(scope.scope)"
>
{{
scope
.
scope
.
status
==
0
?
'待配置'
:
'编辑'
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.contentType == 1"
@
click=
"handleConfig(scope.scope)"
>
{{
scope
.
scope
.
status
==
0
?
'待配置'
:
'编辑'
}}
</el-button>
<template
v-else
>
<template
v-else
>
...
@@ -37,6 +67,7 @@
...
@@ -37,6 +67,7 @@
</
template
>
</
template
>
</template>
</template>
<span
v-else
>
--
</span>
<span
v-else
>
--
</span>
</template>
</div>
</div>
</GLTable>
</GLTable>
</div>
</div>
...
@@ -95,13 +126,31 @@ export default {
...
@@ -95,13 +126,31 @@ export default {
filter
:
'2'
filter
:
'2'
},
},
{
{
label
:
'商品名称'
,
name
:
'goodsName'
,
type
:
'input'
,
filter
:
'5'
},
{
label
:
'创建日期'
,
label
:
'创建日期'
,
name
:
'createdDate'
,
name
:
'createdDate'
,
type
:
'date'
,
type
:
'date'
,
addHtml
:
'createdDate'
,
addHtml
:
'createdDate'
,
isClear
:
true
,
isClear
:
true
,
filter
:
'1,2,3,4'
filter
:
'1,2,3,4,5'
}
},
{
label
:
'商户名称'
,
name
:
'merchantName'
,
type
:
'input'
,
filter
:
'5'
},
{
label
:
'商品分类'
,
name
:
'channelName'
,
type
:
'input'
,
filter
:
'5'
},
],
],
getListApi
:
this
.
$apis
.
store
.
getChannelTopicList
,
getListApi
:
this
.
$apis
.
store
.
getChannelTopicList
,
tableParams
:
{
tableParams
:
{
...
@@ -175,7 +224,48 @@ export default {
...
@@ -175,7 +224,48 @@ export default {
},
},
filter
:
'3,4'
filter
:
'3,4'
},
},
{
label
:
'商品名称'
,
prop
:
'goodsName'
,
filter
:
'5'
},
{
label
:
'缩略图'
,
addHtml
:
'imageSlot'
,
filter
:
'5'
},
{
label
:
'收款方式'
,
formatter
:
cellValue
=>
{
return
cellValue
.
paymentType
==
1
?
'全款'
:
'定金+尾款'
},
filter
:
'5'
},
{
label
:
'定金(元)'
,
formatter
:
cellValue
=>
{
return
cellValue
.
depositPrice
?
Number
((
Number
(
cellValue
.
depositPrice
)
/
100
).
toFixed
(
2
))
:
'--'
},
filter
:
'5'
},
{
label
:
'门店活动价(元)'
,
width
:
200
,
addHtml
:
'merchantPriceSlot'
,
filter
:
'5'
},
{
label
:
'分类'
,
formatter
:
cellValue
=>
{
return
`
${
cellValue
.
associationClassifyFirstName
||
''
}
-
${
cellValue
.
associationClassifySecondName
||
''
}
`
},
filter
:
'5'
},
{
label
:
'状态'
,
addHtml
:
'statusSlot'
,
filter
:
'5'
},
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status'
,
prop
:
'status'
,
...
@@ -187,14 +277,14 @@ export default {
...
@@ -187,14 +277,14 @@ export default {
{
{
label
:
'创建日期'
,
label
:
'创建日期'
,
prop
:
'createdDate'
,
prop
:
'createdDate'
,
filter
:
'1,2,3,4'
,
filter
:
'1,2,3,4
,5
'
,
minWidth
:
180
minWidth
:
180
},
},
{
{
label
:
'更新日期'
,
label
:
'更新日期'
,
prop
:
'updatedDate'
,
prop
:
'updatedDate'
,
minWidth
:
180
,
minWidth
:
180
,
filter
:
'1,2,3,4'
filter
:
'1,2,3,4
,5
'
},
},
{
{
label
:
'操作人'
,
label
:
'操作人'
,
...
@@ -202,6 +292,11 @@ export default {
...
@@ -202,6 +292,11 @@ export default {
filter
:
'1,2,3,4'
filter
:
'1,2,3,4'
},
},
{
{
label
:
'操作人'
,
prop
:
'operator'
,
filter
:
'5'
},
{
label
:
'操作'
,
label
:
'操作'
,
addHtml
:
'auth-button'
,
addHtml
:
'auth-button'
,
width
:
220
,
width
:
220
,
...
@@ -242,6 +337,12 @@ export default {
...
@@ -242,6 +337,12 @@ export default {
SET_CHANNEL_STYLE
:
'channel/SET_CHANNEL_STYLE'
,
SET_CHANNEL_STYLE
:
'channel/SET_CHANNEL_STYLE'
,
SET_CHANNEL_TYPE
:
'channel/SET_CHANNEL_TYPE'
SET_CHANNEL_TYPE
:
'channel/SET_CHANNEL_TYPE'
}),
}),
filterData
({
merchantList
:
list
}){
return
list
?.
map
(
item
=>
{
let
activityPrice
=
item
.
activityPrice
?
Number
((
Number
(
item
.
activityPrice
)
/
100
).
toFixed
(
2
))
:
0
return
`
${
item
.
merchantName
||
'--'
}
:
${
activityPrice
||
'0'
}
`
})
||
[]
},
getParams
()
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
))
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
))
// if (this.tableSearchForm.createDate.length) {
// if (this.tableSearchForm.createDate.length) {
...
@@ -255,6 +356,10 @@ export default {
...
@@ -255,6 +356,10 @@ export default {
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
this
.
searchForm
=
this
.
getParams
()
this
.
searchForm
=
this
.
getParams
()
if
(
this
.
activeName
==
5
){
this
.
searchForm
.
apiType
=
5
this
.
searchForm
.
merchantId
=
this
.
merchantId
}
// delete this.searchForm.createDate
// delete this.searchForm.createDate
resolve
()
resolve
()
})
})
...
@@ -319,6 +424,18 @@ export default {
...
@@ -319,6 +424,18 @@ export default {
handleConfig
(
val
)
{
handleConfig
(
val
)
{
this
.
$router
.
push
(
`/store/content?topicId=
${
val
.
topicId
}
&channelType=-1&$title=新增配置`
)
this
.
$router
.
push
(
`/store/content?topicId=
${
val
.
topicId
}
&channelType=-1&$title=新增配置`
)
},
},
viewGoods
(
row
=
{},
type
){
const
params
=
{}
let
title
=
'新增商品'
if
(
type
){
params
.
id
=
row
.
id
params
.
type
=
type
params
.
merchantId
=
this
.
merchantId
title
=
type
==
1
?
'查看商品'
:
'编辑商品'
}
const
queryStr
=
encodeURIComponent
(
JSON
.
stringify
(
params
))
this
.
$router
.
push
({
path
:
`/goods/add/`
+
queryStr
,
query
:
{
$title
:
title
}})
},
handleClick
()
{
handleClick
()
{
this
.
SET_CHANNEL_TYPE
({
channelType
:
this
.
activeName
})
this
.
SET_CHANNEL_TYPE
({
channelType
:
this
.
activeName
})
this
.
tabPaneList
.
forEach
(
item
=>
{
this
.
tabPaneList
.
forEach
(
item
=>
{
...
@@ -414,5 +531,24 @@ export default {
...
@@ -414,5 +531,24 @@ export default {
color
:
#333333
;
color
:
#333333
;
}
}
}
}
.status
{
width
:
6px
;
height
:
6px
;
border-radius
:
50%
;
display
:
inline-block
;
vertical-align
:
middle
;
margin-right
:
8px
;
}
.success-status
{
background-color
:
#37C67F
;
}
.error-status
{
background-color
:
#999999
;
}
.more-info
{
white-space
:
nowrap
;
color
:
#5850FF
;
cursor
:
pointer
;
}
}
}
</
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