|
@@ -507,7 +507,7 @@ export default {
|
|
// },
|
|
// },
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
- setStore() {
|
|
|
|
|
|
+ setStore(str) {
|
|
if (this.teamid) {
|
|
if (this.teamid) {
|
|
let loadash = this.$helpers.lodash;
|
|
let loadash = this.$helpers.lodash;
|
|
let sotrage = JSON.parse(localStorage.getItem(`${this.teamid}base`));
|
|
let sotrage = JSON.parse(localStorage.getItem(`${this.teamid}base`));
|
|
@@ -523,16 +523,18 @@ export default {
|
|
`${this.teamid}base`,
|
|
`${this.teamid}base`,
|
|
JSON.stringify(this.topFrom)
|
|
JSON.stringify(this.topFrom)
|
|
);
|
|
);
|
|
- return this.gotoNext();
|
|
|
|
|
|
+ return this.gotoNext(str);
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
|
|
+ return true
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
localStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
|
|
localStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
|
|
|
|
+ return true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//|| this.teamStatus === 'teamAudit'
|
|
//|| this.teamStatus === 'teamAudit'
|
|
@@ -711,10 +713,11 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
chioseSchool(val) {},
|
|
chioseSchool(val) {},
|
|
- gotoNext() {
|
|
|
|
|
|
+ gotoNext(str) {
|
|
this.$refs["topinfo"].validate(async (valid, object) => {
|
|
this.$refs["topinfo"].validate(async (valid, object) => {
|
|
if (!valid) {
|
|
if (!valid) {
|
|
this.$message.error("请填写建团必要参数");
|
|
this.$message.error("请填写建团必要参数");
|
|
|
|
+ return false
|
|
} else {
|
|
} else {
|
|
// 判断一下是否勾选了课程类型而没有输入金额
|
|
// 判断一下是否勾选了课程类型而没有输入金额
|
|
// 验证通过
|
|
// 验证通过
|
|
@@ -724,13 +727,13 @@ export default {
|
|
this.$emit("handleClick", { name: "2" });
|
|
this.$emit("handleClick", { name: "2" });
|
|
} else {
|
|
} else {
|
|
this.$emit("getName", this.topFrom.name);
|
|
this.$emit("getName", this.topFrom.name);
|
|
- await this.resetSubmit();
|
|
|
|
|
|
+ return await this.resetSubmit(str);
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- resetSubmit() {
|
|
|
|
|
|
+ resetSubmit(str) {
|
|
this.$refs["topinfo"].validate((valid, object) => {
|
|
this.$refs["topinfo"].validate((valid, object) => {
|
|
if (!valid) {
|
|
if (!valid) {
|
|
this.$message.error("请填写必要参数");
|
|
this.$message.error("请填写必要参数");
|
|
@@ -797,6 +800,7 @@ export default {
|
|
if (this.teamStatus != "newTeam") {
|
|
if (this.teamStatus != "newTeam") {
|
|
resetTeamBaseInfo(obj).then((res) => {
|
|
resetTeamBaseInfo(obj).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
|
+
|
|
localStorage.setItem(
|
|
localStorage.setItem(
|
|
`${this.teamid}base`,
|
|
`${this.teamid}base`,
|
|
JSON.stringify(this.topFrom)
|
|
JSON.stringify(this.topFrom)
|
|
@@ -804,13 +808,17 @@ export default {
|
|
this.$emit("getBaseInfo");
|
|
this.$emit("getBaseInfo");
|
|
if (this.teamStatus == "teamDraft") {
|
|
if (this.teamStatus == "teamDraft") {
|
|
this.$message.success("保存成功");
|
|
this.$message.success("保存成功");
|
|
- this.$emit("handleClick", { name: "2" });
|
|
|
|
|
|
+ if(!str){
|
|
|
|
+ this.$emit("handleClick", { name: "2" });
|
|
|
|
+ }
|
|
|
|
+ return true
|
|
// 跳到第二页
|
|
// 跳到第二页
|
|
} else {
|
|
} else {
|
|
this.$message.success("修改乐团成功");
|
|
this.$message.success("修改乐团成功");
|
|
|
|
|
|
// this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
|
|
// this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
|
|
}
|
|
}
|
|
|
|
+ return true
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -849,6 +857,7 @@ export default {
|
|
|
|
|
|
this.$emit("getName", this.topFrom.name);
|
|
this.$emit("getName", this.topFrom.name);
|
|
this.$emit("handleClick", { name: "2" });
|
|
this.$emit("handleClick", { name: "2" });
|
|
|
|
+ return true
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$router.push(
|
|
this.$router.push(
|
|
@@ -866,6 +875,7 @@ export default {
|
|
);
|
|
);
|
|
this.$emit("getName", this.topFrom.name);
|
|
this.$emit("getName", this.topFrom.name);
|
|
this.init();
|
|
this.init();
|
|
|
|
+ return true
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|