抢仓逻辑调整
This commit is contained in:
@@ -182,6 +182,7 @@
|
|||||||
robTotal: 0,
|
robTotal: 0,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
|
step: 400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -302,10 +303,13 @@
|
|||||||
this.timer = [];
|
this.timer = [];
|
||||||
|
|
||||||
for (let i = 0;i < this.choosedList.length; i++) {
|
for (let i = 0;i < this.choosedList.length; i++) {
|
||||||
setTimeout(() => {
|
/*setTimeout(() => {
|
||||||
let t = setInterval(this.robFunc(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId), 1000);
|
let t = setInterval(this.robFunc(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId), 1000);
|
||||||
this.timer.push({id: this.choosedList[i].subPurchaseOrderSn, timer: t})
|
this.timer.push({id: this.choosedList[i].subPurchaseOrderSn, timer: t})
|
||||||
}, 100 * i)
|
}, 100 * i)*/
|
||||||
|
setTimeout(() => {
|
||||||
|
this.rob(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId)
|
||||||
|
}, this.step * i)
|
||||||
}
|
}
|
||||||
|
|
||||||
let _this = this;
|
let _this = this;
|
||||||
@@ -348,15 +352,6 @@
|
|||||||
"subPurchaseOrderSn": sn
|
"subPurchaseOrderSn": sn
|
||||||
}}).then((res) => {
|
}}).then((res) => {
|
||||||
if (res.errorCode == 1000000) {
|
if (res.errorCode == 1000000) {
|
||||||
|
|
||||||
|
|
||||||
let t = this.timer.filter((item) => {
|
|
||||||
return item.id == sn;
|
|
||||||
})
|
|
||||||
if (t.length > 0) {
|
|
||||||
clearInterval(t[0].timer)
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let j = 0; j < this.choosedList.length; j++) {
|
for (let j = 0; j < this.choosedList.length; j++) {
|
||||||
if (this.choosedList[j].subPurchaseOrderSn == sn) {
|
if (this.choosedList[j].subPurchaseOrderSn == sn) {
|
||||||
this.addSuccessInfo(this.choosedList[j]);
|
this.addSuccessInfo(this.choosedList[j]);
|
||||||
@@ -372,6 +367,11 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.isBegin) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.rob(sn, mallId)
|
||||||
|
}, this.choosedList.length * this.step)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user