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 {
type
:
String
},
defaultValue
:
{
type
:
String
type
:
String
||
Number
}
},
directives
:
{
...
...
src/store/modules/app.js
View file @
a2f12f5
...
...
@@ -18,7 +18,8 @@ const state = {
channel
:
{
label
:
'全部渠道'
,
value
:
'all'
}
},
merchantId
:
''
}
}
const
mutations
=
{
...
...
@@ -39,6 +40,9 @@ const mutations = {
},
SET_BOUTIQUE_CHANNEL
(
state
,
meta
)
{
state
.
boutique
.
channel
=
meta
},
SET_BOUTIQUE_MERCHANTID
(
state
,
meta
)
{
state
.
boutique
.
merchantId
=
meta
}
}
const
actions
=
{
...
...
@@ -60,6 +64,9 @@ const actions = {
},
setBoutiqueChannel
({
commit
},
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 {
name
:
'boutiqueDetail'
,
query
:
{
merchantid
:
item
.
merchantid
,
merchantName
:
item
.
merchantname
,
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
merchantName
:
item
.
merchantname
}
})
window
.
open
(
routeData
.
href
,
'_blank'
)
...
...
src/views/boutiqueDetail/BoutiqueDetailLeft.vue
View file @
a2f12f5
<
template
>
<div
class=
"detail-left-box"
>
<StatisticsBox
:list=
"boutiqueDetailList"
></StatisticsBox>
<BusinessDetailTrends
class=
"trends-charts"
:year=
"year
"
:merchantid=
"merchantid"
></BusinessDetailTrends>
<BusinessDetailTrends
ref=
"detailTrends"
class=
"trends-charts
"
:merchantid=
"merchantid"
></BusinessDetailTrends>
</div>
</
template
>
...
...
@@ -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
()
{
const
{
merchantid
,
year
}
=
this
.
$route
.
query
const
{
merchantid
}
=
this
.
$route
.
query
this
.
merchantid
=
merchantid
this
.
year
=
year
this
.
getMerchantOverview
(
merchantid
,
year
)
this
.
getMerchantOverview
(
merchantid
)
this
.
$bus
.
$on
(
'changeMerchant'
,
data
=>
{
console
.
log
(
data
);
})
},
methods
:
{
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等
async
getMerchantOverview
(
merchantid
,
year
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantOverview
({
MerchantId
:
merchantid
,
year
})
const
_dataList
=
_data
.
data
.
dataList
[
0
]
async
getMerchantOverview
(
merchantid
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantOverview
({
MerchantId
:
merchantid
,
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
})
const
_dataList
=
_data
.
data
.
dataList
[
0
]
||
{}
this
.
$bus
.
$emit
(
'boutiqueDate'
,
{
startTime
:
_dataList
.
startTime
,
affiliation
:
_dataList
.
affiliation
,
isusedElec
:
_dataList
.
isusedElec
,
supplyMode
:
_dataList
.
supplyMode
startTime
:
_dataList
?
.
startTime
,
affiliation
:
_dataList
?
.
affiliation
,
isusedElec
:
_dataList
?
.
isusedElec
,
supplyMode
:
_dataList
?
.
supplyMode
})
if
(
_dataList
)
{
this
.
boutiqueDetailList
.
forEach
(
item
=>
{
...
...
src/views/boutiqueDetail/BoutiqueDetailRight.vue
View file @
a2f12f5
...
...
@@ -8,11 +8,11 @@
<
template
>
<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>
</
template
>
...
...
@@ -29,15 +29,29 @@ export default {
},
data
()
{
return
{
merchantid
:
''
,
year
:
''
,
merchantid
:
''
}
},
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
()
{
const
{
merchantid
,
year
}
=
this
.
$route
.
query
const
{
merchantid
}
=
this
.
$route
.
query
this
.
merchantid
=
merchantid
this
.
year
=
year
},
methods
:
{}
...
...
src/views/boutiqueDetail/BusinessDetailTrends.vue
View file @
a2f12f5
...
...
@@ -41,8 +41,7 @@ export default {
},
mixins
:
[
boutiqueMixin
],
props
:
{
merchantid
:
String
,
year
:
String
merchantid
:
String
},
data
()
{
return
{
...
...
@@ -68,11 +67,11 @@ export default {
mounted
()
{},
methods
:
{
init
()
{
this
.
getDataList
()
this
.
getDataList
(
this
.
merchantid
)
},
async
getDataList
()
{
async
getDataList
(
merchantid
)
{
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
if
(
!
_dataList
.
length
)
{
this
.
isEmpty
=
true
...
...
src/views/boutiqueDetail/GoodsPayPropertion.vue
View file @
a2f12f5
...
...
@@ -25,8 +25,7 @@ export default {
RightViewContent
},
props
:
{
merchantid
:
String
,
year
:
String
merchantid
:
String
},
data
()
{
return
{
...
...
@@ -62,12 +61,11 @@ export default {
methods
:
{
init
()
{
const
_year
=
this
.
year
this
.
getMerchantPay
(
_year
)
this
.
getMerchantPay
(
this
.
merchantid
)
},
// 获取门店支付方式占比
async
getMerchantPay
(
year
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantPay
({
year
,
MerchantId
:
this
.
merchantid
})
async
getMerchantPay
(
merchantid
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantPay
({
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
,
MerchantId
:
merchantid
})
console
.
log
(
_data
);
this
.
goodsPayData
=
_data
.
data
.
dataList
},
...
...
src/views/boutiqueDetail/GoodsRanking.vue
View file @
a2f12f5
...
...
@@ -23,8 +23,7 @@ export default {
name
:
'GoodsRanking'
,
mixins
:
[
boutiqueMixin
],
props
:
{
merchantid
:
String
,
year
:
String
merchantid
:
String
},
data
()
{
return
{
...
...
@@ -54,12 +53,11 @@ export default {
methods
:
{
init
()
{
const
_year
=
this
.
year
this
.
getMerchantGoodsRank
(
_year
)
this
.
getMerchantGoodsRank
(
this
.
merchantid
)
},
// 获取门店商品销售排行
async
getMerchantGoodsRank
(
year
,
MerchantI
d
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantGoodsRank
({
year
,
MerchantId
:
this
.
merchantid
})
async
getMerchantGoodsRank
(
merchanti
d
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantGoodsRank
({
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
,
MerchantId
:
merchantid
})
console
.
log
(
_data
);
this
.
goodsRankingList
=
_data
.
data
.
dataList
}
...
...
src/views/boutiqueDetail/GoodsSupplierPropertion.vue
View file @
a2f12f5
...
...
@@ -32,8 +32,7 @@ export default {
RightViewContent
},
props
:
{
merchantid
:
String
,
year
:
String
merchantid
:
String
},
data
()
{
return
{
...
...
@@ -69,12 +68,11 @@ export default {
methods
:
{
init
()
{
const
_year
=
this
.
year
this
.
getMerchantSupply
(
_year
)
this
.
getMerchantSupply
(
this
.
merchantid
)
},
// 获取门店商品供应方占比
async
getMerchantSupply
(
year
,
MerchantI
d
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantSupply
({
year
,
MerchantId
:
this
.
merchantid
})
async
getMerchantSupply
(
merchanti
d
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantSupply
({
year
:
this
.
$store
.
state
.
app
.
boutique
.
year
,
MerchantId
:
merchantid
})
console
.
log
(
_data
);
this
.
propertionData
=
_data
.
data
.
dataList
},
...
...
src/views/boutiqueDetail/index.vue
View file @
a2f12f5
...
...
@@ -22,6 +22,7 @@ import { boutiqueMixin } from '@/mixins'
import
BoutiqueDetailLeft
from
'./BoutiqueDetailLeft.vue'
import
BoutiqueDetailRight
from
'./BoutiqueDetailRight.vue'
import
BoutiqueDetailDate
from
'./BoutiqueDetailDate.vue'
import
{
mapActions
}
from
'vuex'
export
default
{
name
:
'BoutiqueDetail'
,
mixins
:
[
boutiqueMixin
],
...
...
@@ -56,11 +57,10 @@ export default {
path
:
'/boutiqueDetail'
,
query
:
{
merchantid
:
data
.
merchantid
,
merchantname
:
data
.
merchantname
,
year
:
this
.
$store
.
state
.
app
.
solarYear
merchantname
:
data
.
merchantname
}
})
this
.
init
(
)
this
.
setBoutiqueMerchantid
(
data
.
merchantid
)
})
this
.
$bus
.
$on
(
'boutiqueDate'
,
data
=>
{
console
.
log
(
data
,
'--==-=-='
);
...
...
@@ -69,6 +69,7 @@ export default {
},
methods
:
{
...
mapActions
([
'setBoutiqueMerchantid'
]),
async
init
()
{
this
.
tabObject
=
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