Commit f6f2e7ed by 匡雅琴

样式+接口调整

1 parent 255bae28
......@@ -59,11 +59,11 @@ export default {
},
{
name: 'brand',
width: '4vw'
width: '2vw'
},
{
name: 'num',
width: '4.88vw',
width: '6vw',
type: 'number'
}
],
......@@ -79,7 +79,7 @@ export default {
},
{
name: 'brand',
width: '3.89vw'
width: '2vw'
},
{
name: 'num',
......@@ -115,7 +115,8 @@ export default {
name: 'boutiqueDetail',
query: {
merchantid: item.merchantid,
merchantName: item.merchantname
merchantName: item.merchantname,
year: this.$store.state.app.boutique.year
}
})
window.open(routeData.href, '_blank')
......
......@@ -41,7 +41,7 @@ export default {
rankingDataObj: [
{
name: 'staffname',
width: '2.92vw'
width: '3.5vw'
},
{
name: 'merchantname',
......@@ -49,14 +49,14 @@ export default {
},
{
name: 'num',
width: '4vw',
width: '5.5vw',
type: 'number'
}
],
rankPercentObj: [
{
name: 'staffname',
width: '2.92vw'
width: '3.5vw'
},
{
name: 'merchantname',
......
<template>
<div class="detail-left-box">
<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>
</template>
......@@ -73,7 +73,8 @@ export default {
ratioRightValueName: 'conversionRateTB',
ratioRightValue: '0'
}
]
],
year: ''
}
},
......@@ -92,15 +93,16 @@ export default {
},
created() {
const { merchantid } = this.$route.query
const { merchantid, year } = this.$route.query
this.merchantid = merchantid
this.getMerchantOverview(merchantid)
this.year = year
this.getMerchantOverview(merchantid, year)
},
methods: {
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等
async getMerchantOverview(merchantid) {
const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, year: this.$store.state.app.boutique.year })
async getMerchantOverview(merchantid, year) {
const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, year })
const _dataList = _data.data.dataList[0] || {}
this.$bus.$emit('boutiqueDate', {
startTime: _dataList?.startTime,
......
......@@ -8,11 +8,11 @@
<template>
<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>
</template>
......@@ -29,7 +29,8 @@ export default {
},
data() {
return {
merchantid: ''
merchantid: '',
year: ''
}
},
......@@ -49,8 +50,9 @@ export default {
},
created() {
const { merchantid } = this.$route.query
const { merchantid, year } = this.$route.query
this.merchantid = merchantid
this.year = year
},
methods: {}
......
......@@ -41,7 +41,8 @@ export default {
},
mixins: [boutiqueMixin],
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -68,13 +69,13 @@ export default {
mounted() {},
methods: {
init() {
this.getDataList(this.merchantid)
this.getDataList()
},
getDataList() {
this.dataList = []
this.isFlag = false
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
if (!_dataList.length) {
this.isEmpty = true
......
......@@ -25,7 +25,8 @@ export default {
RightViewContent
},
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -41,7 +42,7 @@ export default {
goodsPayLegend: [
{
name: 'payType',
width: '4vw'
width: '5vw'
},
{
name: 'rate',
......@@ -61,11 +62,11 @@ export default {
methods: {
init() {
this.getMerchantPay(this.merchantid)
this.getMerchantPay(this.merchantid, this.year)
},
// 获取门店支付方式占比
async getMerchantPay(merchantid) {
const _data = await this.api.boutique.getMerchantPay({ year: this.$store.state.app.boutique.year, MerchantId: merchantid })
async getMerchantPay(merchantid, year) {
const _data = await this.api.boutique.getMerchantPay({ year, MerchantId: merchantid })
this.goodsPayData = _data.data.dataList
},
}
......
......@@ -23,7 +23,8 @@ export default {
name: 'GoodsRanking',
mixins: [boutiqueMixin],
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -31,12 +32,12 @@ export default {
goodsRankingDataObj: [
{
name: 'goodsname',
width: '5vw'
width: '12vw'
},
{
name: 'orderNum',
color: '#C0C0C0',
width: '5vw',
width: '3vw',
sufunit: '单'
},
{
......@@ -53,11 +54,11 @@ export default {
methods: {
init() {
this.getMerchantGoodsRank(this.merchantid)
this.getMerchantGoodsRank(this.merchantid, this.year)
},
// 获取门店商品销售排行
async getMerchantGoodsRank(merchantid) {
const _data = await this.api.boutique.getMerchantGoodsRank({ year: this.$store.state.app.boutique.year, MerchantId: merchantid })
async getMerchantGoodsRank(merchantid, year) {
const _data = await this.api.boutique.getMerchantGoodsRank({ year, MerchantId: merchantid })
this.goodsRankingList = _data.data.dataList
}
}
......
......@@ -32,7 +32,8 @@ export default {
RightViewContent
},
props: {
merchantid: String
merchantid: String,
year: String
},
data() {
return {
......@@ -53,7 +54,7 @@ export default {
{
name: 'rate',
type: 'decimal',
width: '1.88vw'
width: '2vw'
},
{
name: 'goodsNum',
......@@ -68,11 +69,11 @@ export default {
methods: {
init() {
this.getMerchantSupply(this.merchantid)
this.getMerchantSupply(this.merchantid, this.year)
},
// 获取门店商品供应方占比
async getMerchantSupply(merchantid) {
const _data = await this.api.boutique.getMerchantSupply({ year: this.$store.state.app.boutique.year, MerchantId: merchantid })
async getMerchantSupply(merchantid, year) {
const _data = await this.api.boutique.getMerchantSupply({ year, MerchantId: merchantid })
this.propertionData = _data.data.dataList
},
}
......
......@@ -40,14 +40,9 @@ export default {
},
tabObject: {},
defaultYear: '',
yearList: [
{
label: '全部',
value: ''
}
],
businessTime: '',
boutiqueDate: {}
boutiqueDate: {},
year: ''
}
},
......@@ -57,7 +52,8 @@ export default {
path: '/boutiqueDetail',
query: {
merchantid: data.merchantid,
merchantname: data.merchantname
merchantname: data.merchantname,
year: this.year
}
})
this.setBoutiqueMerchantid(data.merchantid)
......@@ -71,12 +67,11 @@ export default {
...mapActions(['setBoutiqueMerchantid']),
async init() {
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)
console.log(_merchantList, '=====')
this.merchantList = _merchantList
// this.getYears(merchantid)
},
// 获取门店列表
getMerchant(merchantName) {
......@@ -91,22 +86,6 @@ export default {
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!