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 ef3dce2e
authored
Jul 26, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.0' of
http://192.168.3.233:8090/h5/glsk-data-view-pd
into v1.0.0
2 parents
9747ee1f
6d4afee9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
168 additions
and
283 deletions
src/components/Ranking.vue
src/views/boutique/rightCompoments/MerchantsRanking.vue
src/views/boutique/rightCompoments/StaffRanking.vue
src/views/boutiqueDetail/BoutiqueDetailRight.vue
src/views/boutiqueDetail/GoodsPayPropertion.vue
src/views/boutiqueDetail/GoodsRanking.vue
src/views/boutiqueDetail/GoodsSupplierPropertion.vue
src/views/boutiqueDetail/index.vue
src/components/Ranking.vue
View file @
ef3dce2
...
...
@@ -8,8 +8,13 @@
<div
class=
"text"
:class=
"itm.action ? 'action-text' : ''"
:style=
"
{ width: itm.width }">
{{
item
[
itm
.
name
]
}}
</div>
</div>
</
template
>
<
template
v-else-if=
"inx !== rankingDataObj.length - 1"
>
<div
class=
"ranking-box-item-middle"
:style=
"
{ width: itm.width, color: itm.color }">
{{
itm
.
preunit
}}{{
item
[
itm
.
name
]
}}{{
itm
.
sufunit
}}
</div>
</
template
>
<
template
v-else
>
<div
class=
"ranking-box-item-right"
:style=
"
{ width: itm.width, color: itm.color, 'text-align': inx + 1 == rankingDataObj.length ? 'right' : '' }"
>
<div
class=
"ranking-box-item-right"
>
{{
itm
.
preunit
}}{{
itm
.
type
==
'number'
?
numAddSymbol
(
item
[
itm
.
name
])
:
itm
.
type
==
'decimal'
?
toPercent
(
item
[
itm
.
name
])
:
item
[
itm
.
name
]
}}{{
itm
.
sufunit
}}
</div>
</
template
>
...
...
@@ -109,10 +114,19 @@ export default {
-webkit-text-fill-color
:
transparent
;
}
}
&
-middle
{
font-weight
:
400
;
font-size
:
14px
;
color
:
#C0C0C0
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
&
-right
{
font-weight
:
400
;
font-size
:
14px
;
color
:
#95acd9
;
text-align
:
right
;
}
}
</
style
>
src/views/boutique/rightCompoments/MerchantsRanking.vue
View file @
ef3dce2
...
...
@@ -34,150 +34,55 @@
</
template
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
export
default
{
name
:
'MerchantsRanking'
,
mixins
:
[
changeMixin
],
data
()
{
return
{
// 门店产值排名数据
storeOutputList
:
[
{
name
:
'云南红绳瑞达汽车汽车汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'奔驰'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'保时捷'
,
value
:
'345489'
}
],
storeOutputList
:
[],
// 门店转化率排名数据
storePercentList
:
[
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
per
:
'43'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
per
:
'11'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
per
:
'1'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
per
:
'24'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
per
:
'44'
}
],
storePercentList
:
[],
// 门店客单价排名数据
storePriceList
:
[
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
},
{
name
:
'云南红绳瑞达汽车销售'
,
province
:
'广东省'
,
carName
:
'一汽大众'
,
value
:
'345489'
}
],
storePriceList
:
[],
// rankingDataObj
rankingDataObj
:
[
{
name
:
'name'
,
name
:
'
merchant
name'
,
width
:
'9.72vw'
,
action
:
true
},
{
name
:
'province'
,
color
:
'#C0C0C0'
,
width
:
'2.92vw'
},
{
name
:
'carName'
,
color
:
'#C0C0C0'
,
name
:
'brand'
,
width
:
'3.89vw'
},
{
name
:
'
value
'
,
name
:
'
num
'
,
width
:
'3.88vw'
,
type
:
'number'
}
],
rankPercentObj
:
[
{
name
:
'name'
,
name
:
'
merchant
name'
,
width
:
'9.72vw'
,
action
:
true
},
{
name
:
'province'
,
color
:
'#C0C0C0'
,
width
:
'2.92vw'
},
{
name
:
'carName'
,
color
:
'#C0C0C0'
,
name
:
'brand'
,
width
:
'3.89vw'
},
{
name
:
'
per
'
,
name
:
'
num
'
,
width
:
'3vw'
,
type
:
'decimal'
}
...
...
@@ -188,17 +93,29 @@ export default {
mounted
()
{},
methods
:
{
init
()
{
const
_year
=
this
.
$store
.
state
.
app
.
solarYear
this
.
getAllMerchantRank
(
_year
)
},
// 获取门店总产值、客单价、转化率排行
async
getAllMerchantRank
(
year
)
{
const
_data
=
await
this
.
api
.
boutique
.
getAllMerchantRank
({
year
})
console
.
log
(
_data
);
const
{
conversionRateRank
,
outputvalueRank
,
perCusTransRank
}
=
_data
.
data
.
dataList
[
0
]
this
.
storeOutputList
=
outputvalueRank
this
.
storePriceList
=
perCusTransRank
this
.
storePercentList
=
conversionRateRank
},
// 跳转精品升级二级页面
goDetailPage
(
item
)
{
console
.
log
(
item
)
const
routeData
=
this
.
$router
.
resolve
({
name
:
'boutiqueDetail'
// query: {
// merchantid: item.merchantid,
// merchantname: item.merchantname,
// purchaseType: this.purchase.value,
// year: this.$store.state.app.solarYear
// }
name
:
'boutiqueDetail'
,
query
:
{
merchantid
:
item
.
merchantid
,
merchantName
:
item
.
merchantname
,
year
:
this
.
$store
.
state
.
app
.
solarYear
}
})
window
.
open
(
routeData
.
href
,
'_blank'
)
}
...
...
src/views/boutique/rightCompoments/StaffRanking.vue
View file @
ef3dce2
...
...
@@ -25,123 +25,45 @@
</
template
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
export
default
{
name
:
'StaffRanking'
,
mixins
:
[
changeMixin
],
data
()
{
return
{
// 员工产值排名数据
staffOutputList
:
[
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽绳瑞达汽绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
}
],
staffOutputList
:
[],
// 员工转化率排名数据
staffPercentList
:
[
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
per
:
'43'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
per
:
'11'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
per
:
'1'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
per
:
'24'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
per
:
'44'
}
],
staffPercentList
:
[],
// 员工客单价排名数据
staffPriceList
:
[
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
},
{
name
:
'王二虎'
,
merchants
:
'云南红绳瑞达汽车销售'
,
value
:
'345489'
}
],
staffPriceList
:
[],
// rankingDataObj
rankingDataObj
:
[
{
name
:
'name'
,
name
:
'
staff
name'
,
width
:
'2.92vw'
},
{
name
:
'merchants'
,
color
:
'#C0C0C0'
,
name
:
'merchantname'
,
width
:
'9.72vw'
},
{
name
:
'
value
'
,
name
:
'
num
'
,
width
:
'3.88vw'
,
type
:
'number'
}
],
rankPercentObj
:
[
{
name
:
'name'
,
name
:
'
staff
name'
,
width
:
'2.92vw'
},
{
name
:
'merchants'
,
color
:
'#C0C0C0'
,
name
:
'merchantname'
,
width
:
'9.72vw'
},
{
name
:
'
per
'
,
name
:
'
num
'
,
width
:
'3vw'
,
type
:
'decimal'
}
...
...
@@ -151,7 +73,21 @@ export default {
mounted
()
{},
methods
:
{}
methods
:
{
init
()
{
const
_year
=
this
.
$store
.
state
.
app
.
solarYear
this
.
getAllStaffRank
(
_year
)
},
// 获取门店员工业绩、客单价、转化率排行
async
getAllStaffRank
(
year
)
{
const
_data
=
await
this
.
api
.
boutique
.
getAllStaffRank
({
year
})
console
.
log
(
_data
);
const
{
performanceRank
,
perCusTransRank
,
conversionRateRank
}
=
_data
.
data
.
dataList
[
0
]
this
.
staffOutputList
=
performanceRank
this
.
staffPriceList
=
perCusTransRank
this
.
staffPercentList
=
conversionRateRank
}
}
}
</
script
>
...
...
src/views/boutiqueDetail/BoutiqueDetailRight.vue
View file @
ef3dce2
<
template
>
<div
class=
"detail-right-box"
>
<!-- 商品供应方占比 -->
<GoodsSupplierPropertion></GoodsSupplierPropertion>
<GoodsSupplierPropertion
:merchantid=
"merchantid"
></GoodsSupplierPropertion>
<!-- 订单支付方式占比 -->
<GoodsPayPropertion></GoodsPayPropertion>
<GoodsPayPropertion
:merchantid=
"merchantid"
></GoodsPayPropertion>
<!-- 商品销售排行 -->
<GoodsRanking></GoodsRanking>
<GoodsRanking
:merchantid=
"merchantid"
></GoodsRanking>
</div>
</
template
>
...
...
@@ -21,10 +21,15 @@ export default {
GoodsPayPropertion
},
data
()
{
return
{}
return
{
merchantid
:
''
}
},
mounted
()
{},
created
()
{
const
{
merchantid
}
=
this
.
$route
.
query
this
.
merchantid
=
merchantid
},
methods
:
{}
}
...
...
src/views/boutiqueDetail/GoodsPayPropertion.vue
View file @
ef3dce2
...
...
@@ -16,35 +16,23 @@
</
template
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
import
RightViewContent
from
'../solar/RightViewContent.vue'
export
default
{
name
:
'GoodsPayPropertion'
,
mixins
:
[
changeMixin
],
components
:
{
RightViewContent
},
props
:
{
merchantid
:
String
},
data
()
{
return
{
goodsPayData
:
[
{
name
:
'POS及'
,
rate
:
36
,
value
:
80
},
{
name
:
'微信支付'
,
rate
:
40
,
value
:
20
},
{
name
:
'门店收款'
,
rate
:
36
,
value
:
120
}
],
goodsPayData
:
[],
goodsPayChart
:
{
id
:
'goodsPay'
,
keys
:
[
'
name'
,
'value
'
],
keys
:
[
'
payType'
,
'orderNum
'
],
height
:
'15.34vh'
,
colors
:
[
'#34AFFF'
,
'#16E193'
,
'#FFC200'
],
formatter
:
'total'
,
...
...
@@ -52,7 +40,7 @@ export default {
},
goodsPayLegend
:
[
{
name
:
'
nam
e'
,
name
:
'
payTyp
e'
,
width
:
'4vw'
},
{
...
...
@@ -61,7 +49,7 @@ export default {
width
:
'1.88vw'
},
{
name
:
'
value
'
,
name
:
'
orderNum
'
,
type
:
'number'
,
width
:
'5vw'
}
...
...
@@ -71,7 +59,18 @@ export default {
mounted
()
{},
methods
:
{}
methods
:
{
init
()
{
const
_year
=
this
.
$store
.
state
.
app
.
solarYear
this
.
getMerchantPay
(
_year
)
},
// 获取门店支付方式占比
async
getMerchantPay
(
year
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantPay
({
year
,
MerchantId
:
this
.
merchantid
})
console
.
log
(
_data
);
this
.
goodsPayData
=
_data
.
data
.
dataList
},
}
}
</
script
>
...
...
src/views/boutiqueDetail/GoodsRanking.vue
View file @
ef3dce2
...
...
@@ -11,51 +11,29 @@
</
template
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
export
default
{
name
:
'GoodsRanking'
,
mixins
:
[
changeMixin
],
props
:
{
merchantid
:
String
},
data
()
{
return
{
goodsRankingList
:
[
{
name
:
'低价只想隔热G70 前挡'
,
value
:
80
,
price
:
95489
},
{
name
:
'低价只想隔热G70 前挡'
,
value
:
80
,
price
:
95489
},
{
name
:
'低价只想隔热G70 前挡'
,
value
:
80
,
price
:
95489
},
{
name
:
'低价只想隔热G70 前挡'
,
value
:
80
,
price
:
95489
},
{
name
:
'低价只想隔热低价只想隔热G70 前挡'
,
value
:
80
,
price
:
95489
}
],
goodsRankingList
:
[],
goodsRankingDataObj
:
[
{
name
:
'name'
,
name
:
'
goods
name'
,
width
:
'14.58vw'
},
{
name
:
'
value
'
,
name
:
'
orderNum
'
,
color
:
'#C0C0C0'
,
width
:
'3vw'
,
sufunit
:
'单'
},
{
name
:
'p
rice
'
,
name
:
'p
ayAmount
'
,
type
:
'number'
,
width
:
'5vw'
,
preunit
:
'¥'
...
...
@@ -66,7 +44,18 @@ export default {
mounted
()
{},
methods
:
{}
methods
:
{
init
()
{
const
_year
=
this
.
$store
.
state
.
app
.
solarYear
this
.
getMerchantGoodsRank
(
_year
)
},
// 获取门店商品销售排行
async
getMerchantGoodsRank
(
year
,
MerchantId
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantGoodsRank
({
year
,
MerchantId
:
this
.
merchantidmerchantid
})
console
.
log
(
_data
);
this
.
goodsRankingList
=
_data
.
data
.
dataList
},
}
}
</
script
>
...
...
src/views/boutiqueDetail/GoodsSupplierPropertion.vue
View file @
ef3dce2
...
...
@@ -16,29 +16,23 @@
</
template
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
import
RightViewContent
from
'../solar/RightViewContent.vue'
export
default
{
name
:
'GoodsSupplierPropertion'
,
mixins
:
[
changeMixin
],
components
:
{
RightViewContent
},
props
:
{
merchantid
:
String
},
data
()
{
return
{
propertionData
:
[
{
name
:
'第三方产品'
,
value
:
70
,
rate
:
70
},
{
name
:
'广联直营'
,
value
:
30
,
rate
:
30
}
],
propertionData
:
[],
propertionChart
:
{
id
:
'boutiquePropertion'
,
keys
:
[
'
name'
,
'value
'
],
keys
:
[
'
supplyType'
,
'goodsNum
'
],
height
:
'15.34vh'
,
colors
:
[
'#16E193'
,
'#34AFFF'
],
formatter
:
'total'
,
...
...
@@ -46,7 +40,7 @@ export default {
},
propertionLegend
:
[
{
name
:
'
nam
e'
,
name
:
'
supplyTyp
e'
,
width
:
'5vw'
},
{
...
...
@@ -55,7 +49,7 @@ export default {
width
:
'1.88vw'
},
{
name
:
'
value
'
,
name
:
'
goodsNum
'
,
type
:
'number'
,
width
:
'5vw'
}
...
...
@@ -65,7 +59,18 @@ export default {
mounted
()
{},
methods
:
{}
methods
:
{
init
()
{
const
_year
=
this
.
$store
.
state
.
app
.
solarYear
this
.
getMerchantSupply
(
_year
)
},
// 获取门店商品供应方占比
async
getMerchantSupply
(
year
,
MerchantId
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantSupply
({
year
,
MerchantId
:
this
.
merchantid
})
console
.
log
(
_data
);
this
.
propertionData
=
_data
.
data
.
dataList
},
}
}
</
script
>
...
...
src/views/boutiqueDetail/index.vue
View file @
ef3dce2
...
...
@@ -18,10 +18,12 @@
</template>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
import
BoutiqueDetailLeft
from
'./BoutiqueDetailLeft.vue'
import
BoutiqueDetailRight
from
'./BoutiqueDetailRight.vue'
export
default
{
name
:
'BoutiqueDetail'
,
mixins
:
[
changeMixin
],
components
:
{
BoutiqueDetailLeft
,
BoutiqueDetailRight
...
...
@@ -30,7 +32,7 @@ export default {
return
{
merchantList
:
[],
merchantListObj
:
{
labelName
:
'merchant
n
ame'
,
labelName
:
'merchant
N
ame'
,
valueName
:
'merchantid'
},
tabObject
:
{},
...
...
@@ -61,10 +63,28 @@ export default {
},
methods
:
{
init
()
{
async
init
()
{
this
.
tabObject
=
this
.
$route
.
query
const
{
merchantid
}
=
this
.
$route
.
query
// this.getYears(merchantid)
const
{
merchantid
,
merchantName
,
year
}
=
this
.
$route
.
query
// 获取门店列表
const
_merchantList
=
await
this
.
getMerchant
(
merchantName
)
console
.
log
(
_merchantList
,
'====='
);
this
.
merchantList
=
_merchantList
this
.
getYears
(
merchantid
)
},
// 获取门店列表
getMerchant
(
merchantName
)
{
return
new
Promise
(
resolve
=>
{
let
_merchantList
this
.
api
.
boutique
.
getMerchant
({
merchantName
}).
then
(
res
=>
{
if
(
!
res
.
code
===
'0'
)
{
this
.
openMessage
(
'获取门店列表失败'
)
return
}
_merchantList
=
res
.
data
.
dataList
resolve
(
_merchantList
)
})
})
},
// 获取年份数据参数门店id
async
getYears
(
MerchantId
)
{
...
...
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