Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-pd
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 a2f12f58
authored
Jul 28, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
详情页接口联调
1 parent
f605a845
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
78 additions
and
48 deletions
src/components/SelectBox.vue
src/store/modules/app.js
src/views/boutique/rightCompoments/MerchantsRanking.vue
src/views/boutiqueDetail/BoutiqueDetailLeft.vue
src/views/boutiqueDetail/BoutiqueDetailRight.vue
src/views/boutiqueDetail/BusinessDetailTrends.vue
src/views/boutiqueDetail/GoodsPayPropertion.vue
src/views/boutiqueDetail/GoodsRanking.vue
src/views/boutiqueDetail/GoodsSupplierPropertion.vue
src/views/boutiqueDetail/index.vue
src/components/SelectBox.vue
View file @
a2f12f5
...
@@ -46,7 +46,7 @@ export default {
...
@@ -46,7 +46,7 @@ export default {
type
:
String
type
:
String
},
},
defaultValue
:
{
defaultValue
:
{
type
:
String
type
:
String
||
Number
}
}
},
},
directives
:
{
directives
:
{
...
...
src/store/modules/app.js
View file @
a2f12f5
...
@@ -18,7 +18,8 @@ const state = {
...
@@ -18,7 +18,8 @@ const state = {
channel
:
{
channel
:
{
label
:
'全部渠道'
,
label
:
'全部渠道'
,
value
:
'all'
value
:
'all'
}
},
merchantId
:
''
}
}
}
}
const
mutations
=
{
const
mutations
=
{
...
@@ -39,6 +40,9 @@ const mutations = {
...
@@ -39,6 +40,9 @@ const mutations = {
},
},
SET_BOUTIQUE_CHANNEL
(
state
,
meta
)
{
SET_BOUTIQUE_CHANNEL
(
state
,
meta
)
{
state
.
boutique
.
channel
=
meta
state
.
boutique
.
channel
=
meta
},
SET_BOUTIQUE_MERCHANTID
(
state
,
meta
)
{
state
.
boutique
.
merchantId
=
meta
}
}
}
}
const
actions
=
{
const
actions
=
{
...
@@ -60,6 +64,9 @@ const actions = {
...
@@ -60,6 +64,9 @@ const actions = {
},
},
setBoutiqueChannel
({
commit
},
channel
)
{
setBoutiqueChannel
({
commit
},
channel
)
{
commit
(
'SET_BOUTIQUE_CHANNEL'
,
channel
)
commit
(
'SET_BOUTIQUE_CHANNEL'
,
channel
)
},
setBoutiqueMerchantid
({
commit
},
id
)
{
commit
(
'SET_BOUTIQUE_MERCHANTID'
,
id
)
}
}
}
}
...
...
src/views/boutique/rightCompoments/MerchantsRanking.vue
View file @
a2f12f5
...
@@ -116,8 +116,7 @@ export default {
...
@@ -116,8 +116,7 @@ export default {
name
:
'boutiqueDetail'
,
name
:
'boutiqueDetail'
,
query
:
{
query
:
{
merchantid
:
item
.
merchantid
,
merchantid
:
item
.
merchantid
,
merchantName
:
item
.
merchantname
,
merchantName
:
item
.
merchantname
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
}
}
})
})
window
.
open
(
routeData
.
href
,
'_blank'
)
window
.
open
(
routeData
.
href
,
'_blank'
)
...
...
src/views/boutiqueDetail/BoutiqueDetailLeft.vue
View file @
a2f12f5
<
template
>
<
template
>
<div
class=
"detail-left-box"
>
<div
class=
"detail-left-box"
>
<StatisticsBox
:list=
"boutiqueDetailList"
></StatisticsBox>
<StatisticsBox
:list=
"boutiqueDetailList"
></StatisticsBox>
<BusinessDetailTrends
class=
"trends-charts"
:year=
"year
"
:merchantid=
"merchantid"
></BusinessDetailTrends>
<BusinessDetailTrends
ref=
"detailTrends"
class=
"trends-charts
"
:merchantid=
"merchantid"
></BusinessDetailTrends>
</div>
</div>
</
template
>
</
template
>
...
@@ -77,23 +77,39 @@ export default {
...
@@ -77,23 +77,39 @@ export default {
}
}
},
},
computed
:
{
listenId
()
{
return
this
.
$store
.
state
.
app
.
boutique
.
merchantId
}
},
watch
:
{
listenId
(
value
)
{
this
.
getMerchantOverview
(
value
)
this
.
merchantid
=
value
this
.
$refs
.
detailTrends
.
getDataList
(
value
)
}
},
created
()
{
created
()
{
const
{
merchantid
,
year
}
=
this
.
$route
.
query
const
{
merchantid
}
=
this
.
$route
.
query
this
.
merchantid
=
merchantid
this
.
merchantid
=
merchantid
this
.
year
=
year
this
.
getMerchantOverview
(
merchantid
)
this
.
getMerchantOverview
(
merchantid
,
year
)
this
.
$bus
.
$on
(
'changeMerchant'
,
data
=>
{
console
.
log
(
data
);
})
},
},
methods
:
{
methods
:
{
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等
async
getMerchantOverview
(
merchantid
,
year
)
{
async
getMerchantOverview
(
merchantid
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantOverview
({
MerchantId
:
merchantid
,
year
})
const
_data
=
await
this
.
api
.
boutique
.
getMerchantOverview
({
MerchantId
:
merchantid
,
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
})
const
_dataList
=
_data
.
data
.
dataList
[
0
]
const
_dataList
=
_data
.
data
.
dataList
[
0
]
||
{}
this
.
$bus
.
$emit
(
'boutiqueDate'
,
{
this
.
$bus
.
$emit
(
'boutiqueDate'
,
{
startTime
:
_dataList
.
startTime
,
startTime
:
_dataList
?
.
startTime
,
affiliation
:
_dataList
.
affiliation
,
affiliation
:
_dataList
?
.
affiliation
,
isusedElec
:
_dataList
.
isusedElec
,
isusedElec
:
_dataList
?
.
isusedElec
,
supplyMode
:
_dataList
.
supplyMode
supplyMode
:
_dataList
?
.
supplyMode
})
})
if
(
_dataList
)
{
if
(
_dataList
)
{
this
.
boutiqueDetailList
.
forEach
(
item
=>
{
this
.
boutiqueDetailList
.
forEach
(
item
=>
{
...
...
src/views/boutiqueDetail/BoutiqueDetailRight.vue
View file @
a2f12f5
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
<
template
>
<
template
>
<div
class=
"detail-right-box"
>
<div
class=
"detail-right-box"
>
<!-- 商品供应方占比 -->
<!-- 商品供应方占比 -->
<GoodsSupplierPropertion
:year=
"year
"
:merchantid=
"merchantid"
></GoodsSupplierPropertion>
<GoodsSupplierPropertion
ref=
"supplyPropertion
"
:merchantid=
"merchantid"
></GoodsSupplierPropertion>
<!-- 订单支付方式占比 -->
<!-- 订单支付方式占比 -->
<GoodsPayPropertion
:year=
"year
"
:merchantid=
"merchantid"
></GoodsPayPropertion>
<GoodsPayPropertion
ref=
"payPropertion
"
:merchantid=
"merchantid"
></GoodsPayPropertion>
<!-- 商品销售排行 -->
<!-- 商品销售排行 -->
<GoodsRanking
:year=
"year
"
:merchantid=
"merchantid"
></GoodsRanking>
<GoodsRanking
ref=
"goodsRanking
"
:merchantid=
"merchantid"
></GoodsRanking>
</div>
</div>
</
template
>
</
template
>
...
@@ -29,15 +29,29 @@ export default {
...
@@ -29,15 +29,29 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
merchantid
:
''
,
merchantid
:
''
year
:
''
,
}
},
computed
:
{
listenId
()
{
return
this
.
$store
.
state
.
app
.
boutique
.
merchantId
}
},
watch
:
{
listenId
(
value
)
{
console
.
log
(
value
,
'-00000000000-'
);
this
.
merchantid
=
value
this
.
$refs
.
supplyPropertion
.
getMerchantSupply
(
value
)
this
.
$refs
.
payPropertion
.
getMerchantPay
(
value
)
this
.
$refs
.
goodsRanking
.
getMerchantGoodsRank
(
value
)
}
}
},
},
created
()
{
created
()
{
const
{
merchantid
,
year
}
=
this
.
$route
.
query
const
{
merchantid
}
=
this
.
$route
.
query
this
.
merchantid
=
merchantid
this
.
merchantid
=
merchantid
this
.
year
=
year
},
},
methods
:
{}
methods
:
{}
...
...
src/views/boutiqueDetail/BusinessDetailTrends.vue
View file @
a2f12f5
...
@@ -41,8 +41,7 @@ export default {
...
@@ -41,8 +41,7 @@ export default {
},
},
mixins
:
[
boutiqueMixin
],
mixins
:
[
boutiqueMixin
],
props
:
{
props
:
{
merchantid
:
String
,
merchantid
:
String
year
:
String
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -68,11 +67,11 @@ export default {
...
@@ -68,11 +67,11 @@ export default {
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
getDataList
()
this
.
getDataList
(
this
.
merchantid
)
},
},
async
getDataList
()
{
async
getDataList
(
merchantid
)
{
this
.
dataList
=
[]
this
.
dataList
=
[]
const
_data
=
await
this
.
api
.
boutique
.
getMerchantTrend
({
year
:
this
.
year
,
MerchantId
:
this
.
merchantid
})
const
_data
=
await
this
.
api
.
boutique
.
getMerchantTrend
({
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
,
MerchantId
:
merchantid
})
const
_dataList
=
_data
.
data
.
dataList
const
_dataList
=
_data
.
data
.
dataList
if
(
!
_dataList
.
length
)
{
if
(
!
_dataList
.
length
)
{
this
.
isEmpty
=
true
this
.
isEmpty
=
true
...
...
src/views/boutiqueDetail/GoodsPayPropertion.vue
View file @
a2f12f5
...
@@ -25,8 +25,7 @@ export default {
...
@@ -25,8 +25,7 @@ export default {
RightViewContent
RightViewContent
},
},
props
:
{
props
:
{
merchantid
:
String
,
merchantid
:
String
year
:
String
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -62,12 +61,11 @@ export default {
...
@@ -62,12 +61,11 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
const
_year
=
this
.
year
this
.
getMerchantPay
(
this
.
merchantid
)
this
.
getMerchantPay
(
_year
)
},
},
// 获取门店支付方式占比
// 获取门店支付方式占比
async
getMerchantPay
(
year
)
{
async
getMerchantPay
(
merchantid
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantPay
({
year
,
MerchantId
:
this
.
merchantid
})
const
_data
=
await
this
.
api
.
boutique
.
getMerchantPay
({
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
,
MerchantId
:
merchantid
})
console
.
log
(
_data
);
console
.
log
(
_data
);
this
.
goodsPayData
=
_data
.
data
.
dataList
this
.
goodsPayData
=
_data
.
data
.
dataList
},
},
...
...
src/views/boutiqueDetail/GoodsRanking.vue
View file @
a2f12f5
...
@@ -23,8 +23,7 @@ export default {
...
@@ -23,8 +23,7 @@ export default {
name
:
'GoodsRanking'
,
name
:
'GoodsRanking'
,
mixins
:
[
boutiqueMixin
],
mixins
:
[
boutiqueMixin
],
props
:
{
props
:
{
merchantid
:
String
,
merchantid
:
String
year
:
String
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -54,12 +53,11 @@ export default {
...
@@ -54,12 +53,11 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
const
_year
=
this
.
year
this
.
getMerchantGoodsRank
(
this
.
merchantid
)
this
.
getMerchantGoodsRank
(
_year
)
},
},
// 获取门店商品销售排行
// 获取门店商品销售排行
async
getMerchantGoodsRank
(
year
,
MerchantI
d
)
{
async
getMerchantGoodsRank
(
merchanti
d
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantGoodsRank
({
year
,
MerchantId
:
this
.
merchantid
})
const
_data
=
await
this
.
api
.
boutique
.
getMerchantGoodsRank
({
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
,
MerchantId
:
merchantid
})
console
.
log
(
_data
);
console
.
log
(
_data
);
this
.
goodsRankingList
=
_data
.
data
.
dataList
this
.
goodsRankingList
=
_data
.
data
.
dataList
}
}
...
...
src/views/boutiqueDetail/GoodsSupplierPropertion.vue
View file @
a2f12f5
...
@@ -32,8 +32,7 @@ export default {
...
@@ -32,8 +32,7 @@ export default {
RightViewContent
RightViewContent
},
},
props
:
{
props
:
{
merchantid
:
String
,
merchantid
:
String
year
:
String
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -69,12 +68,11 @@ export default {
...
@@ -69,12 +68,11 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
const
_year
=
this
.
year
this
.
getMerchantSupply
(
this
.
merchantid
)
this
.
getMerchantSupply
(
_year
)
},
},
// 获取门店商品供应方占比
// 获取门店商品供应方占比
async
getMerchantSupply
(
year
,
MerchantI
d
)
{
async
getMerchantSupply
(
merchanti
d
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantSupply
({
year
,
MerchantId
:
this
.
merchantid
})
const
_data
=
await
this
.
api
.
boutique
.
getMerchantSupply
({
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
,
MerchantId
:
merchantid
})
console
.
log
(
_data
);
console
.
log
(
_data
);
this
.
propertionData
=
_data
.
data
.
dataList
this
.
propertionData
=
_data
.
data
.
dataList
},
},
...
...
src/views/boutiqueDetail/index.vue
View file @
a2f12f5
...
@@ -22,6 +22,7 @@ import { boutiqueMixin } from '@/mixins'
...
@@ -22,6 +22,7 @@ import { boutiqueMixin } from '@/mixins'
import
BoutiqueDetailLeft
from
'./BoutiqueDetailLeft.vue'
import
BoutiqueDetailLeft
from
'./BoutiqueDetailLeft.vue'
import
BoutiqueDetailRight
from
'./BoutiqueDetailRight.vue'
import
BoutiqueDetailRight
from
'./BoutiqueDetailRight.vue'
import
BoutiqueDetailDate
from
'./BoutiqueDetailDate.vue'
import
BoutiqueDetailDate
from
'./BoutiqueDetailDate.vue'
import
{
mapActions
}
from
'vuex'
export
default
{
export
default
{
name
:
'BoutiqueDetail'
,
name
:
'BoutiqueDetail'
,
mixins
:
[
boutiqueMixin
],
mixins
:
[
boutiqueMixin
],
...
@@ -56,11 +57,10 @@ export default {
...
@@ -56,11 +57,10 @@ export default {
path
:
'/boutiqueDetail'
,
path
:
'/boutiqueDetail'
,
query
:
{
query
:
{
merchantid
:
data
.
merchantid
,
merchantid
:
data
.
merchantid
,
merchantname
:
data
.
merchantname
,
merchantname
:
data
.
merchantname
year
:
this
.
$store
.
state
.
app
.
solarYear
}
}
})
})
this
.
init
(
)
this
.
setBoutiqueMerchantid
(
data
.
merchantid
)
})
})
this
.
$bus
.
$on
(
'boutiqueDate'
,
data
=>
{
this
.
$bus
.
$on
(
'boutiqueDate'
,
data
=>
{
console
.
log
(
data
,
'--==-=-='
);
console
.
log
(
data
,
'--==-=-='
);
...
@@ -69,6 +69,7 @@ export default {
...
@@ -69,6 +69,7 @@ export default {
},
},
methods
:
{
methods
:
{
...
mapActions
([
'setBoutiqueMerchantid'
]),
async
init
()
{
async
init
()
{
this
.
tabObject
=
this
.
$route
.
query
this
.
tabObject
=
this
.
$route
.
query
const
{
merchantid
,
merchantName
,
year
}
=
this
.
$route
.
query
const
{
merchantid
,
merchantName
,
year
}
=
this
.
$route
.
query
...
...
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