yyw提交
This commit is contained in:
parent
7369891fbf
commit
6261fa78b8
@ -139,7 +139,26 @@ export default {
|
||||
this.dateList = []
|
||||
this.Sales = []
|
||||
this.SaleCount = []
|
||||
res.data.data.forEach((it) => {
|
||||
let List = res.data.data
|
||||
if(this.time_type == 'day') {
|
||||
List = []
|
||||
for (let index = 0; index < 24; index++) {
|
||||
let obj = {
|
||||
goods_total: 0, goods_total_amount: 0, day: index
|
||||
}
|
||||
for (let i = 0; i < res.data.data.length; i++) {
|
||||
let row = res.data.data[i]
|
||||
if(index == row.sort_key) {
|
||||
obj.goods_total = row.goods_total
|
||||
obj.goods_total_amount = row.goods_total_amount
|
||||
}
|
||||
}
|
||||
obj.day += ':00'
|
||||
List.push(obj)
|
||||
}
|
||||
}
|
||||
|
||||
List.forEach((it) => {
|
||||
this.dateList.push(it.day)
|
||||
this.Sales.push(it.goods_total)
|
||||
this.SaleCount.push(it.goods_total_amount)
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<el-button type="warning" icon="el-icon-upload2" @click="handleImport">导入</el-button>
|
||||
</div>
|
||||
<el-table v-loading="loading" :data="procureList" style="width: 100%" border>
|
||||
<el-table-column prop="sku_id" label="商品id" width="80" align="center" />
|
||||
<el-table-column prop="goods_sku.id" label="商品id" width="80" align="center" />
|
||||
<el-table-column prop="goods_sku.name" label="商品标题" />
|
||||
<el-table-column prop="external_sku_id" label="规格编码" />
|
||||
<el-table-column prop="num" label="采购数量" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user