Commit 1ce0fd10 authored by Mac's avatar Mac

1

parent 456e105d
......@@ -321,17 +321,39 @@ export default {
data.forEach(x=>{
x.Ischeck = false
})
this.stagingData = this.dataList
// this.stagingData = this.dataList
this.CreateDatelist = this.groupArr(data,'GoodsName')
this.dataList = this.CreateDatelist;
this.dataList.forEach(x=>{
let alllist = this.CreateDatelist;
alllist.forEach(x=>{
x.list.forEach((j,index)=>{
j.xuhao = index+1+'/'+x.list.length
})
})
// let list = JSON.parse(JSON.stringify(this.dataList))
console.log(this.dataList)
this.dataList = [];
const loading = this.$loading({
lock: true,
text: '数据加载中...',
spinner: 'el-icon-loading',
});
alllist.forEach((x,y)=>{
let obj = {
GoodsName:x.GoodsName,
list:[],
}
this.dataList.push(obj)
x.list.forEach((j,ji)=>{
setTimeout(()=>{//20ms 是1000/25 得到的
this.dataList[y].list.push(j)
if(alllist.length== y+1 && x.list.length == ji+1){
loading.close();
}
},ji*50)
})
})
} else {
this.Error(res.data.message);
}
......@@ -385,19 +407,19 @@ export default {
this.dataList.forEach((x,i)=>{//处理显示问题
x.list.forEach((j,i2)=>{
j.Ischeck = true;
setTimeout(()=>{//20ms 是1000/25 得到的
setTimeout(()=>{
data.push(j)
if(this.dataList.length == i+1 && x.list.length == i2+1){//最后一个的时候数据处理
this.checkList = data;
loading.close();
this.checkList.forEach((x,i)=>{
x.page = 'page'+(i+1)
x.xpage = 'xpage'+(i+1)
})
}
},50)
},i2*50)
})
})
loading.close();
......@@ -468,7 +490,6 @@ export default {
setTimeout(()=>{
that.batchprint(num)
},200)
}else{
that.loading = false;
that.checkList=[];
......@@ -476,8 +497,6 @@ export default {
x.list.forEach((j)=>{
j.Ischeck = false;
})
})
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment