库存情况

This commit is contained in:
2024-04-29 17:56:50 +08:00
parent 0142e8a0f3
commit 5b1dbf52b1

View File

@@ -15,12 +15,12 @@
<vue-seamless-scroll :data="kc.list" :class-option="defaultOption1"> <vue-seamless-scroll :data="kc.list" :class-option="defaultOption1">
<ul class="scroll-ul_1"> <ul class="scroll-ul_1">
<li v-for="(e, i) in kc.list" :key="i"> <li v-for="(e, i) in kc.list" :key="i">
<span class="scroll_th">名称:</span> <!-- <span class="scroll_th">名称:</span> -->
<span>{{ e.name }}</span> <span>{{ e.name }}</span>
<span class="scroll_th">数量:</span> <span class="scroll_th">数量:</span>
<span>{{ e.number }} </span> <span>{{ e.number }}</span>
<!-- <span class="scroll_th">占比:</span> <span class="scroll_th">占比:</span>
<span>{{ Number(e.number) / total }}</span> --> <span>{{ e.percentage }}%</span>
</li> </li>
</ul> </ul>
</vue-seamless-scroll> </vue-seamless-scroll>
@@ -170,7 +170,6 @@ export default {
wrk: [], wrk: [],
kc: {}, kc: {},
hw: {}, hw: {},
total: 0,
resData: {}, resData: {},
myCharts01: '' myCharts01: ''
} }
@@ -227,12 +226,13 @@ export default {
this.wrk = res.wrk this.wrk = res.wrk
this.kc = res.kc this.kc = res.kc
this.hw = res.hw this.hw = res.hw
this.kc.list.map(el => { // let total = 0
this.total += Number(el.number) // this.kc.list.map(el => {
if (this.total > 0) { // total += Number(el.number)
el.zhanbi = Number(el.number) / this.total // if (total > 0) {
} // el.zhanbi = Number(el.number) / total
}) // }
// })
}, },
setEchart01 () { setEchart01 () {
// let data = [ // let data = [
@@ -503,4 +503,5 @@ export default {
line-height 26px line-height 26px
span span
font-size 12px font-size 12px
scale 0.9
</style> </style>