|
@@ -507,27 +507,29 @@ export default {
|
|
// },
|
|
// },
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
- setStore(str) {
|
|
|
|
|
|
+ async 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`));
|
|
if (!loadash.isEqual(this.topFrom, sotrage) && sotrage) {
|
|
if (!loadash.isEqual(this.topFrom, sotrage) && sotrage) {
|
|
// 提示保存
|
|
// 提示保存
|
|
- return this.$confirm("已修改当前页面数据是否保存", "提示", {
|
|
|
|
|
|
+ return await this.$confirm("已修改当前页面数据是否保存", "提示", {
|
|
confirmButtonText: "是",
|
|
confirmButtonText: "是",
|
|
cancelButtonText: "否",
|
|
cancelButtonText: "否",
|
|
type: "warning",
|
|
type: "warning",
|
|
})
|
|
})
|
|
- .then(() => {
|
|
|
|
|
|
+ .then(async () => {
|
|
localStorage.setItem(
|
|
localStorage.setItem(
|
|
`${this.teamid}base`,
|
|
`${this.teamid}base`,
|
|
JSON.stringify(this.topFrom)
|
|
JSON.stringify(this.topFrom)
|
|
);
|
|
);
|
|
- return this.gotoNext(str);
|
|
|
|
|
|
+ let b = await this.gotoNext(str)
|
|
|
|
+ console.log(b)
|
|
|
|
+ return b;
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
- });
|
|
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
return true
|
|
return true
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
// localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
@@ -713,11 +715,12 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
chioseSchool(val) {},
|
|
chioseSchool(val) {},
|
|
- gotoNext(str) {
|
|
|
|
- this.$refs["topinfo"].validate(async (valid, object) => {
|
|
|
|
|
|
+ async gotoNext(str) {
|
|
|
|
+ let tempStatus
|
|
|
|
+ await this.$refs["topinfo"].validate(async (valid, object) => {
|
|
if (!valid) {
|
|
if (!valid) {
|
|
this.$message.error("请填写建团必要参数");
|
|
this.$message.error("请填写建团必要参数");
|
|
- return false
|
|
|
|
|
|
+ tempStatus = false
|
|
} else {
|
|
} else {
|
|
// 判断一下是否勾选了课程类型而没有输入金额
|
|
// 判断一下是否勾选了课程类型而没有输入金额
|
|
// 验证通过
|
|
// 验证通过
|
|
@@ -727,14 +730,15 @@ 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);
|
|
- return await this.resetSubmit(str);
|
|
|
|
|
|
+ tempStatus = await this.resetSubmit(str);
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ return tempStatus
|
|
},
|
|
},
|
|
- resetSubmit(str) {
|
|
|
|
- this.$refs["topinfo"].validate((valid, object) => {
|
|
|
|
|
|
+ async resetSubmit(str) {
|
|
|
|
+ this.$refs["topinfo"].validate(async (valid, object) => {
|
|
if (!valid) {
|
|
if (!valid) {
|
|
this.$message.error("请填写必要参数");
|
|
this.$message.error("请填写必要参数");
|
|
} else {
|
|
} else {
|
|
@@ -798,7 +802,7 @@ export default {
|
|
// obj.musicGroupPaymentEntities = [];
|
|
// obj.musicGroupPaymentEntities = [];
|
|
// createTeam
|
|
// createTeam
|
|
if (this.teamStatus != "newTeam") {
|
|
if (this.teamStatus != "newTeam") {
|
|
- resetTeamBaseInfo(obj).then((res) => {
|
|
|
|
|
|
+ await resetTeamBaseInfo(obj).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
|
|
|
localStorage.setItem(
|
|
localStorage.setItem(
|
|
@@ -883,6 +887,7 @@ export default {
|
|
// 发请求
|
|
// 发请求
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ return true
|
|
},
|
|
},
|
|
changeApplyTime(val) {
|
|
changeApplyTime(val) {
|
|
this.$set(this.topFrom, "paymentValidStartDate", "");
|
|
this.$set(this.topFrom, "paymentValidStartDate", "");
|