|
@@ -719,10 +719,11 @@ export default {
|
|
|
chioseSchool(val) {},
|
|
|
async gotoNext(str) {
|
|
|
let tempStatus
|
|
|
- await this.$refs["topinfo"].validate(async (valid, object) => {
|
|
|
+ return new Promise((resolve, reject)=>{
|
|
|
+ this.$refs["topinfo"].validate(async (valid, object) => {
|
|
|
if (!valid) {
|
|
|
this.$message.error("请填写建团必要参数");
|
|
|
- tempStatus = false
|
|
|
+ reject()
|
|
|
} else {
|
|
|
// 判断一下是否勾选了课程类型而没有输入金额
|
|
|
// 验证通过
|
|
@@ -732,18 +733,22 @@ export default {
|
|
|
this.$emit("handleClick", { name: "2" });
|
|
|
} else {
|
|
|
this.$emit("getName", this.topFrom.name);
|
|
|
- console.log(str)
|
|
|
+
|
|
|
tempStatus = await this.resetSubmit(str);
|
|
|
+ console.log(tempStatus,'tempStatus')
|
|
|
+ resolve(tempStatus)
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- return tempStatus
|
|
|
+ })
|
|
|
},
|
|
|
async resetSubmit(str) {
|
|
|
- this.$refs["topinfo"].validate(async (valid, object) => {
|
|
|
+ return new Promise((resolve, reject)=>{
|
|
|
+ this.$refs["topinfo"].validate(async (valid, object) => {
|
|
|
if (!valid) {
|
|
|
this.$message.error("请填写必要参数");
|
|
|
+ reject()
|
|
|
} else {
|
|
|
let status = null;
|
|
|
// 1.resetTeam 乐团修改
|
|
@@ -805,7 +810,7 @@ export default {
|
|
|
// obj.musicGroupPaymentEntities = [];
|
|
|
// createTeam
|
|
|
if (this.teamStatus != "newTeam") {
|
|
|
- await resetTeamBaseInfo(obj).then((res) => {
|
|
|
+ return await resetTeamBaseInfo(obj).then(async(res) => {
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
localStorage.setItem(
|
|
@@ -818,14 +823,15 @@ export default {
|
|
|
if(!str){
|
|
|
this.$emit("handleClick", { name: "2" });
|
|
|
}
|
|
|
- return true
|
|
|
+ resolve(true)
|
|
|
+
|
|
|
// 跳到第二页
|
|
|
} else {
|
|
|
this.$message.success("修改乐团成功");
|
|
|
|
|
|
// this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
|
|
|
}
|
|
|
- return true
|
|
|
+ resolve(true)
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
@@ -890,7 +896,8 @@ export default {
|
|
|
// 发请求
|
|
|
}
|
|
|
});
|
|
|
- return true
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
changeApplyTime(val) {
|
|
|
this.$set(this.topFrom, "paymentValidStartDate", "");
|