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