Commit ef3dce2e by 胡悦

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
...@@ -8,8 +8,13 @@ ...@@ -8,8 +8,13 @@
<div class="text" :class="itm.action ? 'action-text' : ''" :style="{ width: itm.width }">{{ item[itm.name] }}</div> <div class="text" :class="itm.action ? 'action-text' : ''" :style="{ width: itm.width }">{{ item[itm.name] }}</div>
</div> </div>
</template> </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> <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 }} {{ itm.preunit }}{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : itm.type == 'decimal' ? toPercent(item[itm.name]) : item[itm.name] }}{{ itm.sufunit }}
</div> </div>
</template> </template>
...@@ -109,10 +114,19 @@ export default { ...@@ -109,10 +114,19 @@ export default {
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
} }
} }
&-middle {
font-weight: 400;
font-size: 14px;
color: #C0C0C0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
&-right { &-right {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #95acd9; color: #95acd9;
text-align: right;
} }
} }
</style> </style>
...@@ -34,150 +34,55 @@ ...@@ -34,150 +34,55 @@
</template> </template>
<script> <script>
import { changeMixin } from '@/mixins'
export default { export default {
name: 'MerchantsRanking', name: 'MerchantsRanking',
mixins: [changeMixin],
data() { data() {
return { return {
// 门店产值排名数据 // 门店产值排名数据
storeOutputList: [ 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'
}
],
// 门店转化率排名数据 // 门店转化率排名数据
storePercentList: [ 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'
}
],
// 门店客单价排名数据 // 门店客单价排名数据
storePriceList: [ 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'
}
],
// rankingDataObj // rankingDataObj
rankingDataObj: [ rankingDataObj: [
{ {
name: 'name', name: 'merchantname',
width: '9.72vw', width: '9.72vw',
action: true action: true
}, },
{ {
name: 'province', name: 'province',
color: '#C0C0C0',
width: '2.92vw' width: '2.92vw'
}, },
{ {
name: 'carName', name: 'brand',
color: '#C0C0C0',
width: '3.89vw' width: '3.89vw'
}, },
{ {
name: 'value', name: 'num',
width: '3.88vw', width: '3.88vw',
type: 'number' type: 'number'
} }
], ],
rankPercentObj: [ rankPercentObj: [
{ {
name: 'name', name: 'merchantname',
width: '9.72vw', width: '9.72vw',
action: true action: true
}, },
{ {
name: 'province', name: 'province',
color: '#C0C0C0',
width: '2.92vw' width: '2.92vw'
}, },
{ {
name: 'carName', name: 'brand',
color: '#C0C0C0',
width: '3.89vw' width: '3.89vw'
}, },
{ {
name: 'per', name: 'num',
width: '3vw', width: '3vw',
type: 'decimal' type: 'decimal'
} }
...@@ -188,17 +93,29 @@ export default { ...@@ -188,17 +93,29 @@ export default {
mounted() {}, mounted() {},
methods: { 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) { goDetailPage(item) {
console.log(item) console.log(item)
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
name: 'boutiqueDetail' name: 'boutiqueDetail',
// query: { query: {
// merchantid: item.merchantid, merchantid: item.merchantid,
// merchantname: item.merchantname, merchantName: item.merchantname,
// purchaseType: this.purchase.value, year: this.$store.state.app.solarYear
// year: this.$store.state.app.solarYear }
// }
}) })
window.open(routeData.href, '_blank') window.open(routeData.href, '_blank')
} }
......
...@@ -25,123 +25,45 @@ ...@@ -25,123 +25,45 @@
</template> </template>
<script> <script>
import { changeMixin } from '@/mixins'
export default { export default {
name: 'StaffRanking', name: 'StaffRanking',
mixins: [changeMixin],
data() { data() {
return { return {
// 员工产值排名数据 // 员工产值排名数据
staffOutputList: [ staffOutputList: [],
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽绳瑞达汽绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
}
],
// 员工转化率排名数据 // 员工转化率排名数据
staffPercentList: [ staffPercentList: [],
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '43'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '11'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '1'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '24'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '44'
}
],
// 员工客单价排名数据 // 员工客单价排名数据
staffPriceList: [ staffPriceList: [],
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
}
],
// rankingDataObj // rankingDataObj
rankingDataObj: [ rankingDataObj: [
{ {
name: 'name', name: 'staffname',
width: '2.92vw' width: '2.92vw'
}, },
{ {
name: 'merchants', name: 'merchantname',
color: '#C0C0C0',
width: '9.72vw' width: '9.72vw'
}, },
{ {
name: 'value', name: 'num',
width: '3.88vw', width: '3.88vw',
type: 'number' type: 'number'
} }
], ],
rankPercentObj: [ rankPercentObj: [
{ {
name: 'name', name: 'staffname',
width: '2.92vw' width: '2.92vw'
}, },
{ {
name: 'merchants', name: 'merchantname',
color: '#C0C0C0',
width: '9.72vw' width: '9.72vw'
}, },
{ {
name: 'per', name: 'num',
width: '3vw', width: '3vw',
type: 'decimal' type: 'decimal'
} }
...@@ -151,7 +73,21 @@ export default { ...@@ -151,7 +73,21 @@ export default {
mounted() {}, 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> </script>
......
<template> <template>
<div class="detail-right-box"> <div class="detail-right-box">
<!-- 商品供应方占比 --> <!-- 商品供应方占比 -->
<GoodsSupplierPropertion></GoodsSupplierPropertion> <GoodsSupplierPropertion :merchantid="merchantid"></GoodsSupplierPropertion>
<!-- 订单支付方式占比 --> <!-- 订单支付方式占比 -->
<GoodsPayPropertion></GoodsPayPropertion> <GoodsPayPropertion :merchantid="merchantid"></GoodsPayPropertion>
<!-- 商品销售排行 --> <!-- 商品销售排行 -->
<GoodsRanking></GoodsRanking> <GoodsRanking :merchantid="merchantid"></GoodsRanking>
</div> </div>
</template> </template>
...@@ -21,10 +21,15 @@ export default { ...@@ -21,10 +21,15 @@ export default {
GoodsPayPropertion GoodsPayPropertion
}, },
data() { data() {
return {} return {
merchantid: ''
}
}, },
mounted() {}, created() {
const { merchantid } = this.$route.query
this.merchantid = merchantid
},
methods: {} methods: {}
} }
......
...@@ -16,35 +16,23 @@ ...@@ -16,35 +16,23 @@
</template> </template>
<script> <script>
import { changeMixin } from '@/mixins'
import RightViewContent from '../solar/RightViewContent.vue' import RightViewContent from '../solar/RightViewContent.vue'
export default { export default {
name: 'GoodsPayPropertion', name: 'GoodsPayPropertion',
mixins: [changeMixin],
components: { components: {
RightViewContent RightViewContent
}, },
props: {
merchantid: String
},
data() { data() {
return { return {
goodsPayData: [ goodsPayData: [],
{
name: 'POS及',
rate: 36,
value: 80
},
{
name: '微信支付',
rate: 40,
value: 20
},
{
name: '门店收款',
rate: 36,
value: 120
}
],
goodsPayChart: { goodsPayChart: {
id: 'goodsPay', id: 'goodsPay',
keys: ['name', 'value'], keys: ['payType', 'orderNum'],
height: '15.34vh', height: '15.34vh',
colors: ['#34AFFF', '#16E193', '#FFC200'], colors: ['#34AFFF', '#16E193', '#FFC200'],
formatter: 'total', formatter: 'total',
...@@ -52,7 +40,7 @@ export default { ...@@ -52,7 +40,7 @@ export default {
}, },
goodsPayLegend: [ goodsPayLegend: [
{ {
name: 'name', name: 'payType',
width: '4vw' width: '4vw'
}, },
{ {
...@@ -61,7 +49,7 @@ export default { ...@@ -61,7 +49,7 @@ export default {
width: '1.88vw' width: '1.88vw'
}, },
{ {
name: 'value', name: 'orderNum',
type: 'number', type: 'number',
width: '5vw' width: '5vw'
} }
...@@ -71,7 +59,18 @@ export default { ...@@ -71,7 +59,18 @@ export default {
mounted() {}, 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> </script>
......
...@@ -11,51 +11,29 @@ ...@@ -11,51 +11,29 @@
</template> </template>
<script> <script>
import { changeMixin } from '@/mixins'
export default { export default {
name: 'GoodsRanking', name: 'GoodsRanking',
mixins: [changeMixin],
props: {
merchantid: String
},
data() { data() {
return { return {
goodsRankingList: [ 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
}
],
goodsRankingDataObj: [ goodsRankingDataObj: [
{ {
name: 'name', name: 'goodsname',
width: '14.58vw' width: '14.58vw'
}, },
{ {
name: 'value', name: 'orderNum',
color: '#C0C0C0', color: '#C0C0C0',
width: '3vw', width: '3vw',
sufunit: '单' sufunit: '单'
}, },
{ {
name: 'price', name: 'payAmount',
type: 'number', type: 'number',
width: '5vw', width: '5vw',
preunit: '¥' preunit: '¥'
...@@ -66,7 +44,18 @@ export default { ...@@ -66,7 +44,18 @@ export default {
mounted() {}, 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> </script>
......
...@@ -16,29 +16,23 @@ ...@@ -16,29 +16,23 @@
</template> </template>
<script> <script>
import { changeMixin } from '@/mixins'
import RightViewContent from '../solar/RightViewContent.vue' import RightViewContent from '../solar/RightViewContent.vue'
export default { export default {
name: 'GoodsSupplierPropertion', name: 'GoodsSupplierPropertion',
mixins: [changeMixin],
components: { components: {
RightViewContent RightViewContent
}, },
props: {
merchantid: String
},
data() { data() {
return { return {
propertionData: [ propertionData: [],
{
name: '第三方产品',
value: 70,
rate: 70
},
{
name: '广联直营',
value: 30,
rate: 30
}
],
propertionChart: { propertionChart: {
id: 'boutiquePropertion', id: 'boutiquePropertion',
keys: ['name', 'value'], keys: ['supplyType', 'goodsNum'],
height: '15.34vh', height: '15.34vh',
colors: ['#16E193', '#34AFFF'], colors: ['#16E193', '#34AFFF'],
formatter: 'total', formatter: 'total',
...@@ -46,7 +40,7 @@ export default { ...@@ -46,7 +40,7 @@ export default {
}, },
propertionLegend: [ propertionLegend: [
{ {
name: 'name', name: 'supplyType',
width: '5vw' width: '5vw'
}, },
{ {
...@@ -55,7 +49,7 @@ export default { ...@@ -55,7 +49,7 @@ export default {
width: '1.88vw' width: '1.88vw'
}, },
{ {
name: 'value', name: 'goodsNum',
type: 'number', type: 'number',
width: '5vw' width: '5vw'
} }
...@@ -65,7 +59,18 @@ export default { ...@@ -65,7 +59,18 @@ export default {
mounted() {}, 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> </script>
......
...@@ -18,10 +18,12 @@ ...@@ -18,10 +18,12 @@
</template> </template>
<script> <script>
import { changeMixin } from '@/mixins'
import BoutiqueDetailLeft from './BoutiqueDetailLeft.vue' import BoutiqueDetailLeft from './BoutiqueDetailLeft.vue'
import BoutiqueDetailRight from './BoutiqueDetailRight.vue' import BoutiqueDetailRight from './BoutiqueDetailRight.vue'
export default { export default {
name: 'BoutiqueDetail', name: 'BoutiqueDetail',
mixins: [changeMixin],
components: { components: {
BoutiqueDetailLeft, BoutiqueDetailLeft,
BoutiqueDetailRight BoutiqueDetailRight
...@@ -30,7 +32,7 @@ export default { ...@@ -30,7 +32,7 @@ export default {
return { return {
merchantList: [], merchantList: [],
merchantListObj: { merchantListObj: {
labelName: 'merchantname', labelName: 'merchantName',
valueName: 'merchantid' valueName: 'merchantid'
}, },
tabObject: {}, tabObject: {},
...@@ -61,10 +63,28 @@ export default { ...@@ -61,10 +63,28 @@ export default {
}, },
methods: { methods: {
init() { async init() {
this.tabObject = this.$route.query this.tabObject = this.$route.query
const { merchantid } = this.$route.query const { merchantid, merchantName, year } = this.$route.query
// this.getYears(merchantid) // 获取门店列表
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 // 获取年份数据参数门店id
async getYears(MerchantId) { async getYears(MerchantId) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!