feat: 添加工段获取错误提示

This commit is contained in:
caoqianming 2024-08-01 08:37:31 +08:00
parent 947832ce0a
commit 1de0d342d5
6 changed files with 18 additions and 2 deletions

View File

@ -216,6 +216,10 @@ export default {
that.$API.mtm.mgroup.list
.req({ page: 0, search: that.mgroupName })
.then((res) => {
if(res.length != 1){
that.$message.error("获取工段错误");
return;
}
that.mgroupId = res[0].id;
that.processId = res[0].process;
that.processCate = res[0].process_cate;

View File

@ -152,6 +152,10 @@ export default {
that.$API.mtm.mgroup.list
.req({ page: 0, search: that.mgroupName })
.then((res) => {
if(res.length != 1){
that.$message.error("获取工段错误");
return;
}
that.mgroupId = res[0].id;
that.params.mgroupx = res[0].id;
that.apiObj = that.$API.wpm.wmaterial.list;

View File

@ -315,7 +315,7 @@ export default {
getRoute(id) {
let that = this;
that.$API.mtm.route.list
.req({ process: that.process, page: 0 })
.req({ process: that.process, page: 0, routepack__state: 30 })
.then((res) => {
that.routeOptions = res;
});

View File

@ -146,7 +146,7 @@ export default {
getMtask() {
let that = this;
this.$API.pm.mtask.list
.req({ page: 0, mgroup: that.mgroup })
.req({ page: 0, mgroup: that.mgroup, state: 20 })
.then((res) => {
that.options = res;
});

View File

@ -178,6 +178,10 @@ export default {
that.$API.mtm.mgroup.list
.req({ page: 0, search: that.mgroupName })
.then((res) => {
if(res.length != 1){
that.$message.error("获取工段错误");
return;
}
that.mgroupId = res[0].id;
that.deptId = res[0].belong_dept;
that.processId = res[0].process;

View File

@ -111,6 +111,10 @@ export default {
that.$API.mtm.mgroup.list
.req({ page: 0, search: that.mgroupName })
.then((res) => {
if(res.length != 1){
that.$message.error("获取工段错误");
return;
}
that.mgroupId = res[0].id;
that.processId = res[0].process;
that.processCate = res[0].process_cate;