入库出库添加防抖
This commit is contained in:
@@ -288,36 +288,39 @@
|
||||
location: this.warehouseInfo.location,
|
||||
packagelist: list
|
||||
};
|
||||
WarehoseApi.handlerIntoProductWarehouse(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (!res.data) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '入库失败:' + res.msg,
|
||||
showCancel: false,
|
||||
confirmText: '确定'
|
||||
uni.$u.throttle(()=>{
|
||||
WarehoseApi.handlerIntoProductWarehouse(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (!res.data) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '入库失败:' + res.msg,
|
||||
showCancel: false,
|
||||
confirmText: '确定'
|
||||
});
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '入库成功!'
|
||||
});
|
||||
this.loading = false;
|
||||
this.oldMaterialList = JSON.parse(JSON.stringify(this.clearData
|
||||
.oldMaterialList));
|
||||
this.newMaterialList = JSON.parse(JSON.stringify(this.clearData
|
||||
.newMaterialList));
|
||||
// this.clear();
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '入库失败!'
|
||||
});
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '入库成功!'
|
||||
});
|
||||
this.loading = false;
|
||||
this.oldMaterialList = JSON.parse(JSON.stringify(this.clearData
|
||||
.oldMaterialList));
|
||||
this.newMaterialList = JSON.parse(JSON.stringify(this.clearData
|
||||
.newMaterialList));
|
||||
// this.clear();
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '入库失败!'
|
||||
});
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
},5000)
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user