Commit 27e35b8e authored by 张海景's avatar 张海景

fix:修复领料和反冲料一进来就提示保存成功的提示

parent 1bff5e0e
...@@ -1385,13 +1385,15 @@ export default { ...@@ -1385,13 +1385,15 @@ export default {
this.feedingInspectionVisible = true; this.feedingInspectionVisible = true;
this.feedingInspectionLoadAndScan(); this.feedingInspectionLoadAndScan();
}, },
feedingInspectionLoadAndScan() { feedingInspectionLoadAndScan(bool) {
const t = this; const t = this;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.$u.api.listFeedingInspection({ taskId: taskInfo.taskId }).then((res) => { this.$u.api.listFeedingInspection({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.feedingInspectionList = res.data; t.feedingInspectionList = res.data;
if (bool) {
t.$u.toast('保存成功'); t.$u.toast('保存成功');
}
let timer = setTimeout(() => { let timer = setTimeout(() => {
t.feedingInspectionScan(); t.feedingInspectionScan();
}, 1000); }, 1000);
...@@ -1404,7 +1406,7 @@ export default { ...@@ -1404,7 +1406,7 @@ export default {
success: function (res) { success: function (res) {
t.$u.api.validateFeedingInspection({ plnr: res.result }).then((res2) => { t.$u.api.validateFeedingInspection({ plnr: res.result }).then((res2) => {
if (res2.code === 200) { if (res2.code === 200) {
t.feedingInspectionLoadAndScan(); t.feedingInspectionLoadAndScan(true);
} }
}); });
} }
...@@ -1428,13 +1430,15 @@ export default { ...@@ -1428,13 +1430,15 @@ export default {
this.recoilMaterialVisible = true; this.recoilMaterialVisible = true;
this.recoilMaterialLoadAndScan(); this.recoilMaterialLoadAndScan();
}, },
recoilMaterialLoadAndScan() { recoilMaterialLoadAndScan(bool) {
const t = this; const t = this;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.$u.api.recoilMaterialList({ taskId: taskInfo.taskId }).then((res) => { this.$u.api.recoilMaterialList({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.recoilMaterialList = res.data; t.recoilMaterialList = res.data;
if (bool) {
t.$u.toast('保存成功'); t.$u.toast('保存成功');
}
let timer = setTimeout(() => { let timer = setTimeout(() => {
t.recoilMaterialScan(); t.recoilMaterialScan();
}, 1000); }, 1000);
...@@ -1448,7 +1452,7 @@ export default { ...@@ -1448,7 +1452,7 @@ export default {
success: function (res) { success: function (res) {
t.$u.api.addRecoilMaterial({ taskId: taskInfo.taskId, plnr: res.result }).then((res2) => { t.$u.api.addRecoilMaterial({ taskId: taskInfo.taskId, plnr: res.result }).then((res2) => {
if (res2.code === 200) { if (res2.code === 200) {
t.recoilMaterialLoadAndScan(); t.recoilMaterialLoadAndScan(true);
} }
}); });
} }
......
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