抢仓逻辑调整

This commit is contained in:
liushiwei
2023-08-09 12:31:21 +08:00
parent 5ea8c43ca5
commit a159a3a0d1

View File

@@ -182,6 +182,7 @@
robTotal: 0,
pageSize: 100,
currentPage: 1,
step: 400
}
},
@@ -302,10 +303,13 @@
this.timer = [];
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);
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;
@@ -348,15 +352,6 @@
"subPurchaseOrderSn": sn
}}).then((res) => {
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++) {
if (this.choosedList[j].subPurchaseOrderSn == sn) {
this.addSuccessInfo(this.choosedList[j]);
@@ -372,6 +367,11 @@
break;
}
}
if (this.isBegin) {
setTimeout(() => {
this.rob(sn, mallId)
}, this.choosedList.length * this.step)
}
}
})
},