Commit eed58682 by 胡悦

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

2 parents 078aa7d9 f6f2e7ed
...@@ -59,11 +59,11 @@ export default { ...@@ -59,11 +59,11 @@ export default {
}, },
{ {
name: 'brand', name: 'brand',
width: '4vw' width: '2vw'
}, },
{ {
name: 'num', name: 'num',
width: '4.88vw', width: '6vw',
type: 'number' type: 'number'
} }
], ],
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
}, },
{ {
name: 'brand', name: 'brand',
width: '3.89vw' width: '2vw'
}, },
{ {
name: 'num', name: 'num',
...@@ -115,7 +115,8 @@ export default { ...@@ -115,7 +115,8 @@ 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')
......
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
rankingDataObj: [ rankingDataObj: [
{ {
name: 'staffname', name: 'staffname',
width: '2.92vw' width: '3.5vw'
}, },
{ {
name: 'merchantname', name: 'merchantname',
...@@ -49,14 +49,14 @@ export default { ...@@ -49,14 +49,14 @@ export default {
}, },
{ {
name: 'num', name: 'num',
width: '4vw', width: '5.5vw',
type: 'number' type: 'number'
} }
], ],
rankPercentObj: [ rankPercentObj: [
{ {
name: 'staffname', name: 'staffname',
width: '2.92vw' width: '3.5vw'
}, },
{ {
name: 'merchantname', name: 'merchantname',
......
<template> <template>
<div class="detail-left-box"> <div class="detail-left-box">
<StatisticsBox :list="boutiqueDetailList"></StatisticsBox> <StatisticsBox :list="boutiqueDetailList"></StatisticsBox>
<BusinessDetailTrends ref="detailTrends" class="trends-charts" :merchantid="merchantid"></BusinessDetailTrends> <BusinessDetailTrends ref="detailTrends" class="trends-charts" :merchantid="merchantid" :year="year"></BusinessDetailTrends>
</div> </div>
</template> </template>
...@@ -73,7 +73,8 @@ export default { ...@@ -73,7 +73,8 @@ export default {
ratioRightValueName: 'conversionRateTB', ratioRightValueName: 'conversionRateTB',
ratioRightValue: '0' ratioRightValue: '0'
} }
] ],
year: ''
} }
}, },
...@@ -92,15 +93,16 @@ export default { ...@@ -92,15 +93,16 @@ export default {
}, },
created() { created() {
const { merchantid } = this.$route.query const { merchantid, year } = this.$route.query
this.merchantid = merchantid this.merchantid = merchantid
this.getMerchantOverview(merchantid) this.year = year
this.getMerchantOverview(merchantid, year)
}, },
methods: { methods: {
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等 // 获取门店的总展业时间&最近订单时间、总产值&本月产值等
async getMerchantOverview(merchantid) { async getMerchantOverview(merchantid, year) {
const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, year: this.$store.state.app.boutique.year }) const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, 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,
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<template> <template>
<div class="detail-right-box"> <div class="detail-right-box">
<!-- 商品供应方占比 --> <!-- 商品供应方占比 -->
<GoodsSupplierPropertion ref="supplyPropertion" :merchantid="merchantid"></GoodsSupplierPropertion> <GoodsSupplierPropertion ref="supplyPropertion" :merchantid="merchantid" :year="year"></GoodsSupplierPropertion>
<!-- 订单支付方式占比 --> <!-- 订单支付方式占比 -->
<GoodsPayPropertion ref="payPropertion" :merchantid="merchantid"></GoodsPayPropertion> <GoodsPayPropertion ref="payPropertion" :merchantid="merchantid" :year="year"></GoodsPayPropertion>
<!-- 商品销售排行 --> <!-- 商品销售排行 -->
<GoodsRanking ref="goodsRanking" :merchantid="merchantid"></GoodsRanking> <GoodsRanking ref="goodsRanking" :merchantid="merchantid" :year="year"></GoodsRanking>
</div> </div>
</template> </template>
...@@ -29,7 +29,8 @@ export default { ...@@ -29,7 +29,8 @@ export default {
}, },
data() { data() {
return { return {
merchantid: '' merchantid: '',
year: ''
} }
}, },
...@@ -49,8 +50,9 @@ export default { ...@@ -49,8 +50,9 @@ export default {
}, },
created() { created() {
const { merchantid } = this.$route.query const { merchantid, year } = this.$route.query
this.merchantid = merchantid this.merchantid = merchantid
this.year = year
}, },
methods: {} methods: {}
......
...@@ -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 {
...@@ -68,13 +69,13 @@ export default { ...@@ -68,13 +69,13 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
init() { init() {
this.getDataList(this.merchantid) this.getDataList()
}, },
getDataList() { getDataList() {
this.dataList = [] this.dataList = []
this.isFlag = false this.isFlag = false
if (!this.isFlag) { if (!this.isFlag) {
this.api.boutique.getMerchantTrend({ year: this.$store.state.app.boutique.year, MerchantId: this.merchantid }).then(res => { this.api.boutique.getMerchantTrend({ year: this.year, MerchantId: this.merchantid }).then(res => {
const _dataList = res.data.dataList const _dataList = res.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 {
...@@ -41,7 +42,7 @@ export default { ...@@ -41,7 +42,7 @@ export default {
goodsPayLegend: [ goodsPayLegend: [
{ {
name: 'payType', name: 'payType',
width: '4vw' width: '5vw'
}, },
{ {
name: 'rate', name: 'rate',
...@@ -61,11 +62,11 @@ export default { ...@@ -61,11 +62,11 @@ export default {
methods: { methods: {
init() { init() {
this.getMerchantPay(this.merchantid) this.getMerchantPay(this.merchantid, this.year)
}, },
// 获取门店支付方式占比 // 获取门店支付方式占比
async getMerchantPay(merchantid) { async getMerchantPay(merchantid, year) {
const _data = await this.api.boutique.getMerchantPay({ year: this.$store.state.app.boutique.year, MerchantId: merchantid }) const _data = await this.api.boutique.getMerchantPay({ year, MerchantId: merchantid })
this.goodsPayData = _data.data.dataList this.goodsPayData = _data.data.dataList
}, },
} }
......
...@@ -23,7 +23,8 @@ export default { ...@@ -23,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 {
...@@ -31,12 +32,12 @@ export default { ...@@ -31,12 +32,12 @@ export default {
goodsRankingDataObj: [ goodsRankingDataObj: [
{ {
name: 'goodsname', name: 'goodsname',
width: '5vw' width: '12vw'
}, },
{ {
name: 'orderNum', name: 'orderNum',
color: '#C0C0C0', color: '#C0C0C0',
width: '5vw', width: '3vw',
sufunit: '单' sufunit: '单'
}, },
{ {
...@@ -53,11 +54,11 @@ export default { ...@@ -53,11 +54,11 @@ export default {
methods: { methods: {
init() { init() {
this.getMerchantGoodsRank(this.merchantid) this.getMerchantGoodsRank(this.merchantid, this.year)
}, },
// 获取门店商品销售排行 // 获取门店商品销售排行
async getMerchantGoodsRank(merchantid) { async getMerchantGoodsRank(merchantid, year) {
const _data = await this.api.boutique.getMerchantGoodsRank({ year: this.$store.state.app.boutique.year, MerchantId: merchantid }) const _data = await this.api.boutique.getMerchantGoodsRank({ year, MerchantId: merchantid })
this.goodsRankingList = _data.data.dataList this.goodsRankingList = _data.data.dataList
} }
} }
......
...@@ -32,7 +32,8 @@ export default { ...@@ -32,7 +32,8 @@ export default {
RightViewContent RightViewContent
}, },
props: { props: {
merchantid: String merchantid: String,
year: String
}, },
data() { data() {
return { return {
...@@ -53,7 +54,7 @@ export default { ...@@ -53,7 +54,7 @@ export default {
{ {
name: 'rate', name: 'rate',
type: 'decimal', type: 'decimal',
width: '1.88vw' width: '2vw'
}, },
{ {
name: 'goodsNum', name: 'goodsNum',
...@@ -68,11 +69,11 @@ export default { ...@@ -68,11 +69,11 @@ export default {
methods: { methods: {
init() { init() {
this.getMerchantSupply(this.merchantid) this.getMerchantSupply(this.merchantid, this.year)
}, },
// 获取门店商品供应方占比 // 获取门店商品供应方占比
async getMerchantSupply(merchantid) { async getMerchantSupply(merchantid, year) {
const _data = await this.api.boutique.getMerchantSupply({ year: this.$store.state.app.boutique.year, MerchantId: merchantid }) const _data = await this.api.boutique.getMerchantSupply({ year, MerchantId: merchantid })
this.propertionData = _data.data.dataList this.propertionData = _data.data.dataList
}, },
} }
......
...@@ -40,14 +40,9 @@ export default { ...@@ -40,14 +40,9 @@ export default {
}, },
tabObject: {}, tabObject: {},
defaultYear: '', defaultYear: '',
yearList: [
{
label: '全部',
value: ''
}
],
businessTime: '', businessTime: '',
boutiqueDate: {} boutiqueDate: {},
year: ''
} }
}, },
...@@ -57,7 +52,8 @@ export default { ...@@ -57,7 +52,8 @@ export default {
path: '/boutiqueDetail', path: '/boutiqueDetail',
query: { query: {
merchantid: data.merchantid, merchantid: data.merchantid,
merchantname: data.merchantname merchantname: data.merchantname,
year: this.year
} }
}) })
this.setBoutiqueMerchantid(data.merchantid) this.setBoutiqueMerchantid(data.merchantid)
...@@ -71,12 +67,11 @@ export default { ...@@ -71,12 +67,11 @@ export default {
...mapActions(['setBoutiqueMerchantid']), ...mapActions(['setBoutiqueMerchantid']),
async init() { async init() {
this.tabObject = this.$route.query this.tabObject = this.$route.query
const { merchantName } = this.$route.query const { merchantName, year } = this.$route.query
this.year = year
// 获取门店列表 // 获取门店列表
const _merchantList = await this.getMerchant(merchantName) const _merchantList = await this.getMerchant(merchantName)
console.log(_merchantList, '=====')
this.merchantList = _merchantList this.merchantList = _merchantList
// this.getYears(merchantid)
}, },
// 获取门店列表 // 获取门店列表
getMerchant(merchantName) { getMerchant(merchantName) {
...@@ -91,22 +86,6 @@ export default { ...@@ -91,22 +86,6 @@ export default {
resolve(_merchantList) resolve(_merchantList)
}) })
}) })
},
// 获取年份数据参数门店id
async getYears(MerchantId) {
this.yearList = [{
label: '全部',
value: ''
}]
const _data = await this.api.solar.getYears({ MerchantId })
const _yearList = _data.data.dataList[0].year.reverse()
_yearList.forEach(item => {
this.yearList.push({
label: item,
value: item + ''
})
})
this.defaultYear = this.yearList[0].value
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!