Commit 92c7fcaf by 匡雅琴

Merge branch 'v1.0.0' of http://192.168.3.233:8090/h5/glsk-data-view-pd into v1.0.0

2 parents 95383a2c 506cc2ab
......@@ -58,6 +58,11 @@ const getSpringbudTrend = params => {
return window.$HTTP.get('upgrade/getSpringbudTrend', params)
}
// 总 - 获取年份
const getYears = params => {
return window.$HTTP.get('upgrade/getYears', params)
}
export default {
getAllMerchantRank,
getAllOverview,
......@@ -70,5 +75,6 @@ export default {
getMerchantSupply,
getMerchantTrend,
getRegionMerchant,
getSpringbudTrend
getSpringbudTrend,
getYears
}
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-26 17:25:03
* @LastEditTime: 2023-07-27 16:51:18
-->
<template>
<div class="left">
......@@ -49,9 +49,6 @@ export default {
yearList: [{
label: '全部',
value: ''
}, {
label: '2023',
value: '2023'
}],
channelList: [{
label: '全部渠道',
......@@ -146,6 +143,7 @@ export default {
},
init() {
this.getAllOverview()
this.getYears()
},
async getAllOverview() {
const { boutique } = this.$store.state.app
......@@ -164,6 +162,21 @@ export default {
item.ratioRightValue = _dataList[item.ratioRightValueName]
}
})
},
async getYears() {
this.yearList = [{
label: '全部',
value: ''
}]
const _data = await this.api.boutique.getYears({})
console.log(_data)
const _yearList = _data.data.dataList[0].year
_yearList.forEach(item => {
this.yearList.push({
label: item,
value: item + ''
})
})
}
}
}
......
<template>
<div class="detail-left-box">
<StatisticsBox :list="boutiqueDetailList"></StatisticsBox>
<BusinessDetailTrends class="trends-charts" :merchantid="merchantid"></BusinessDetailTrends>
<BusinessDetailTrends class="trends-charts" :year="year" :merchantid="merchantid"></BusinessDetailTrends>
</div>
</template>
......@@ -77,6 +77,7 @@ export default {
created() {
const { merchantid, year } = this.$route.query
this.merchantid = merchantid
this.year = year
this.getMerchantOverview(merchantid, year)
},
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-07-20 15:27:55
* @LastEditors: huyue
* @LastEditTime: 2023-07-27 16:18:19
-->
<template>
<div class="detail-right-box">
<!-- 商品供应方占比 -->
<GoodsSupplierPropertion :merchantid="merchantid"></GoodsSupplierPropertion>
<GoodsSupplierPropertion :year="year" :merchantid="merchantid"></GoodsSupplierPropertion>
<!-- 订单支付方式占比 -->
<GoodsPayPropertion :merchantid="merchantid"></GoodsPayPropertion>
<GoodsPayPropertion :year="year" :merchantid="merchantid"></GoodsPayPropertion>
<!-- 商品销售排行 -->
<GoodsRanking :merchantid="merchantid"></GoodsRanking>
<GoodsRanking :year="year" :merchantid="merchantid"></GoodsRanking>
</div>
</template>
......@@ -22,13 +29,15 @@ export default {
},
data() {
return {
merchantid: ''
merchantid: '',
year: '',
}
},
created() {
const { merchantid } = this.$route.query
const { merchantid, year } = this.$route.query
this.merchantid = merchantid
this.year = year
},
methods: {}
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-19 17:18:33
* @LastEditors: huyue
* @LastEditTime: 2023-07-21 16:32:58
* @LastEditTime: 2023-07-27 16:22:05
-->
<template>
<div class="trends-box">
......@@ -41,7 +41,8 @@ export default {
},
mixins: [boutiqueMixin],
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -71,7 +72,7 @@ export default {
},
async getDataList() {
this.dataList = []
const _data = await this.api.boutique.getMerchantTrend({ year: this.$store.state.app.solarYear, MerchantId: this.merchantid })
const _data = await this.api.boutique.getMerchantTrend({ year: this.year, MerchantId: this.merchantid })
const _dataList = _data.data.dataList
if (!_dataList.length) {
this.isEmpty = true
......
......@@ -25,7 +25,8 @@ export default {
RightViewContent
},
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -61,7 +62,7 @@ export default {
methods: {
init() {
const _year = this.$store.state.app.solarYear
const _year = this.year
this.getMerchantPay(_year)
},
// 获取门店支付方式占比
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-07-20 15:27:55
* @LastEditors: huyue
* @LastEditTime: 2023-07-27 16:19:13
-->
<template>
<div class="goods-rank-box">
<box-title title="商品销售排行"></box-title>
......@@ -16,7 +23,8 @@ export default {
name: 'GoodsRanking',
mixins: [boutiqueMixin],
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -46,7 +54,7 @@ export default {
methods: {
init() {
const _year = this.$store.state.app.solarYear
const _year = this.year
this.getMerchantGoodsRank(_year)
},
// 获取门店商品销售排行
......@@ -54,7 +62,7 @@ export default {
const _data = await this.api.boutique.getMerchantGoodsRank({ year, MerchantId: this.merchantid })
console.log(_data);
this.goodsRankingList = _data.data.dataList
},
}
}
}
</script>
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-07-20 15:27:55
* @LastEditors: huyue
* @LastEditTime: 2023-07-27 16:19:47
-->
<template>
<div class="goods-supply-box">
<box-title title="商品供应方占比"></box-title>
......@@ -25,7 +32,8 @@ export default {
RightViewContent
},
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -61,7 +69,7 @@ export default {
methods: {
init() {
const _year = this.$store.state.app.solarYear
const _year = this.year
this.getMerchantSupply(_year)
},
// 获取门店商品供应方占比
......
......@@ -74,9 +74,9 @@ export default {
const { merchantid, merchantName, year } = this.$route.query
// 获取门店列表
const _merchantList = await this.getMerchant(merchantName)
console.log(_merchantList, '=====');
console.log(_merchantList, '=====')
this.merchantList = _merchantList
this.getYears(merchantid)
// this.getYears(merchantid)
},
// 获取门店列表
getMerchant(merchantName) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!