Commit 8b1ca7b5 by 胡悦

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

2 parents 5b65462c a91d77ad
......@@ -10,10 +10,11 @@
</template>
<template v-else>
<div class="flex item-content" :style="{ width: itm.width,'max-width': itm.width }">
<div v-show="itm.hasIcon">{{ itm.hasIcon }}</div>
<!-- <div v-show="itm.hasIcon">{{ itm.hasIcon }}</div>
<div v-if="itm.type == 'number'">{{numAddSymbol(item[itm.name])}}</div>
<div v-else-if="itm.type == 'decimal'">{{toPercent(item[itm.name])}}</div>
<div v-else>{{ item[itm.name] }}</div>
<div v-else>{{ item[itm.name] }}</div> -->
{{ itm.hasIcon ? itm.hasIcon : '' }}{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : itm.type == 'decimal' ? toPercent(item[itm.name]) : item[itm.name] }}
</div>
</template>
</div>
......
......@@ -50,7 +50,7 @@ export default {
name: 'purchaseamount',
hasIcon: '¥',
type: 'number',
width: '3.1vw'
width: '4.5vw'
}
]
}
......@@ -85,7 +85,8 @@ export default {
height: 25vh;
margin-bottom: 1.78vh;
.content-box {
padding: 2.78vh 1.39vw 2.78vh 0;
// padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
}
.empty {
height: 21.67vh;
......
......@@ -43,13 +43,13 @@ export default {
name: 'purchaseamount',
hasIcon: '¥',
type: 'number',
width: '3.06vw'
width: '4.06vw'
},
{
name: 'averprice',
hasIcon: '均价¥',
type: 'number',
width: '4.24vw'
width: '6.24vw'
}
]
}
......@@ -69,7 +69,7 @@ export default {
this.openMessage('获取商品采购占比失败')
return
}
this.propertionData = res.data.dataList[0].shopgoodsRatioList || []
this.propertionData = res.data.dataList[0].shopgoodsRatioList.slice(0, 6) || []
})
}
}
......@@ -83,7 +83,8 @@ export default {
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh;
.content-box {
padding: 2.78vh 1.39vw 2.78vh 0;
// padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
}
.empty {
height: 21.67vh;
......
......@@ -48,6 +48,7 @@ export default {
.pie-chart {
// width: 138px;
// height: 138px;
margin-top: 2.44vh;
width: 20%;
}
.legend {
......
<template>
<div class="storage-box">
<box-title title="入库使用情况"></box-title>
<div v-if="listData.length">
<div class="content-box" v-if="listData.length">
<pie-chart :id="chart.id" :keys="chart.keys" :list="listData" :height="chart.height" :colors="chart.colors"></pie-chart>
<Legend class="legend" :list="listData" :legentList="legentList" :colors="chart.colors"></Legend>
</div>
......@@ -27,14 +27,17 @@ export default {
listData: [],
legentList: [
{
name: 'isused'
name: 'isused',
width: '4vw'
},
{
name: 'rate',
type: 'decimal'
type: 'decimal',
width: '2vw'
},
{
name: 'num'
name: 'num',
width: '1.88vw'
}
]
}
......@@ -66,6 +69,9 @@ export default {
width: 19.72vw;
height: 32vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
.content-box {
margin-top: 2.44vh;
}
.legend {
padding: 0.96vh 2.78vw 0;
}
......
......@@ -111,7 +111,6 @@ export default {
},
methods: {
async init() {
console.log(222)
this.tabObject = this.$route.query
const { year } = this.$route.query
this.defaultYear = year
......@@ -127,13 +126,12 @@ export default {
// 获取门店的商品采购占比(商城、自采)
getMerchantGoodsRatio(merchantid) {
this.api.solar.getMerchantGoodsRatio({ year: this.$store.state.app.solarYear, MerchantId: merchantid }).then(res => {
console.log(res)
if (!res.code === '0') {
this.openMessage('获取门店商品采购占比失败')
return
}
this.shopmallData = res.data.dataList[0].selfgoodsRatioList || []
this.selfPickData = res.data.dataList[0].shopgoodsRatioList || []
this.shopmallData = res.data.dataList[0].selfgoodsRatioList.slice(0, 6) || []
this.selfPickData = res.data.dataList[0].shopgoodsRatioList.slice(0, 6) || []
})
},
// 获取每个门店的 总采购额(总计、本月) 、商城采购额(总计、本月) 、自采采购额(总计、本月)
......@@ -181,7 +179,6 @@ export default {
return new Promise(resolve => {
let _merchantList
this.api.solar.getAllRanking({ year: this.$store.state.app.solarYear }).then(res => {
console.log(res, '000')
if (!res.code === '0') {
this.openMessage('获取商品采购额排名失败')
return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!