|
@@ -3,7 +3,7 @@
|
|
|
<div class="banseLeft">
|
|
|
<div class="head">乐团基本信息:</div>
|
|
|
<!-- <div class="num">乐团编号:dywh01</div> -->
|
|
|
- <save-form
|
|
|
+ <el-form
|
|
|
:model="topFrom"
|
|
|
:inline="true"
|
|
|
ref="topinfo"
|
|
@@ -70,28 +70,37 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="教学地点"
|
|
|
- prop="address"
|
|
|
- :rules="[{ required: true, message: '教学地点不能为空' }]">
|
|
|
+ <el-form-item
|
|
|
+ label="教学地点"
|
|
|
+ prop="address"
|
|
|
+ :rules="[{ required: true, message: '教学地点不能为空' }]"
|
|
|
+ >
|
|
|
<template #label>
|
|
|
- <p style="position: relative; display: inline-block;"> 教学地点
|
|
|
+ <p style="position: relative; display: inline-block">
|
|
|
+ 教学地点
|
|
|
<el-tooltip placement="top" popper-class="mTooltip">
|
|
|
- <div slot="content">
|
|
|
- 如果已生成课表,则会修改未上课时的教学点
|
|
|
- </div>
|
|
|
- <i class="el-icon-question"
|
|
|
- style="font-size: 18px; color: #F56C6C"></i>
|
|
|
- </el-tooltip>
|
|
|
+ <div slot="content">
|
|
|
+ 如果已生成课表,则会修改未上课时的教学点
|
|
|
+ </div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question"
|
|
|
+ style="font-size: 18px; color: #f56c6c"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
</p>
|
|
|
</template>
|
|
|
- <el-select v-model.trim="topFrom.address"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- :disabled="!topFrom.section || basdisabled">
|
|
|
- <el-option v-for="(item, index) in addList"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="topFrom.address"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ :disabled="!topFrom.section || basdisabled"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in addList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -288,7 +297,7 @@
|
|
|
修改【收费类型】会重置乐团声部与缴费信息
|
|
|
</p>
|
|
|
</el-form-item>
|
|
|
- </save-form>
|
|
|
+ </el-form>
|
|
|
<div class="btnWrap">
|
|
|
<div
|
|
|
class="nextBtn"
|
|
@@ -302,18 +311,13 @@
|
|
|
修改
|
|
|
</div>
|
|
|
<!-- 审批或者草稿的下一步 -->
|
|
|
- <div
|
|
|
- class="nextBtn"
|
|
|
- @click="gotoNext(1)"
|
|
|
- v-if="showNext"
|
|
|
- >
|
|
|
- 下一步
|
|
|
- </div>
|
|
|
+ <div class="nextBtn" @click="gotoNext(1)" v-if="showNext">下一步</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import merge from "webpack-merge";
|
|
|
import {
|
|
|
getSection,
|
|
|
getType,
|
|
@@ -465,11 +469,49 @@ export default {
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
+ if (this.$route.query.id) {
|
|
|
+ this.teamid = this.$route.query.id;
|
|
|
+ }
|
|
|
+ if (this.$route.query.type == "newTeam") {
|
|
|
+ this.onReset();
|
|
|
+ }
|
|
|
+ console.log(this.$route.query)
|
|
|
this.init();
|
|
|
- this.$forceUpdate();
|
|
|
- // 获取分部下的员工
|
|
|
+ // this.$forceUpdate();
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ console.log(this.$route.query.type)
|
|
|
+ // console.log('直接进编辑')
|
|
|
+ if (this.teamid && this.teamid != this.$route.query.id) {
|
|
|
+ this.init();
|
|
|
+ }
|
|
|
+ if (this.$route.query.clear == 'true') {
|
|
|
+
|
|
|
+ this.onReset();
|
|
|
+ this.$router.push({
|
|
|
+ query: merge(this.$route.query, { clear: false }),
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.teamStatus == "newTeam") {
|
|
|
+ this.$store.dispatch("buildIndex", 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.teamStatus != "newTeam") {
|
|
|
+ this.$store.dispatch("draftIndex", 0);
|
|
|
+ }
|
|
|
+ this.teamStatus = this.$route.query.type;
|
|
|
+
|
|
|
+ if (
|
|
|
+ this.teamStatus == "look" ||
|
|
|
+ this.teamStatus == "teamAudit" ||
|
|
|
+ this.teamStatus == "feeAudit"
|
|
|
+ ) {
|
|
|
+ this.basdisabled = true;
|
|
|
+ } else {
|
|
|
+ this.basdisabled = false;
|
|
|
+ }
|
|
|
},
|
|
|
- beforeDestroy() {},
|
|
|
+
|
|
|
methods: {
|
|
|
//|| this.teamStatus === 'teamAudit'
|
|
|
isNotEditing: function () {
|
|
@@ -479,9 +521,7 @@ export default {
|
|
|
this.teamStatus === "teamList"
|
|
|
);
|
|
|
},
|
|
|
- changeFeeType(val) {
|
|
|
- // console.log(val == "ONLINE");
|
|
|
- },
|
|
|
+ changeFeeType(val) {},
|
|
|
changePaymentValidStartDate(val) {
|
|
|
if (val) {
|
|
|
this.$set(this.topFrom, "paymentValidEndDate", "");
|
|
@@ -506,30 +546,36 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
- init() {
|
|
|
+ init() {
|
|
|
this.isInit = true;
|
|
|
- this.$store.dispatch('buildIndex',0)
|
|
|
+
|
|
|
// 分为3种 this.teamStatus
|
|
|
// 1.resetTeam 乐团修改
|
|
|
// 2. newTeam 新建乐团
|
|
|
// 3.teamList 跨团修改
|
|
|
// 4.teamDraft 乐团草稿
|
|
|
this.teamStatus = this.$route.query.type;
|
|
|
+ if (this.teamStatus == "newTeam") {
|
|
|
+ this.$store.dispatch("buildIndex", 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.teamStatus != "newTeam") {
|
|
|
+ this.$store.dispatch("draftIndex", 0);
|
|
|
+ }
|
|
|
// 传过来的乐团信息
|
|
|
this.activeTeam = this.getTeamList;
|
|
|
if (
|
|
|
+
|
|
|
this.teamStatus == "look" ||
|
|
|
this.teamStatus == "teamAudit" ||
|
|
|
this.teamStatus == "feeAudit"
|
|
|
-
|
|
|
) {
|
|
|
+
|
|
|
this.basdisabled = true;
|
|
|
} else {
|
|
|
this.basdisabled = false;
|
|
|
}
|
|
|
- if (
|
|
|
- this.$route.query.id
|
|
|
- ) {
|
|
|
+ if (this.$route.query.id) {
|
|
|
// 单团修改
|
|
|
this.teamid = this.$route.query.id;
|
|
|
getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
|
|
@@ -610,34 +656,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- // this.topFrom = {
|
|
|
- // type: "", // 收费类型
|
|
|
- // section: "", //所属分部
|
|
|
- // school: "", // 合作单位
|
|
|
- // courseViewType: "",
|
|
|
- // teacher: "", // 乐团主管
|
|
|
- // name: "", //乐团名称
|
|
|
- // boss: "", // 运营主管
|
|
|
- // time: "", // 报名截止时间
|
|
|
- // startClass: [], // 招生年级起始
|
|
|
- // paymentValid: [], // 缴费有效期时间起始
|
|
|
- // address: "", // 教学地点
|
|
|
- // salary: "", // 收费模式
|
|
|
- // head: "",
|
|
|
- // paymentPattern: "", // 缴费方式
|
|
|
- // isClass: false, //是否为课堂课
|
|
|
- // startTime: "",
|
|
|
- // ownershipType: "OWN", // 合作机构类型
|
|
|
- // feeType: null,
|
|
|
- // };
|
|
|
- // this.$refs["topinfo"].resetFields();
|
|
|
}
|
|
|
- // 1.获取各个选项卡的数据内容
|
|
|
- // getSection({ 'delFlag': 0, 'rows': 1000 }).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.sectionList = res.data.rows;
|
|
|
- // }
|
|
|
- // }).catch()
|
|
|
+
|
|
|
getEmployeeOrgan().then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.sectionList = res.data;
|
|
@@ -650,7 +670,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
// 缓存设置时的状态
|
|
|
- sessionStorage.setItem("resetCode", "1");
|
|
|
},
|
|
|
changeSection(val) {
|
|
|
// 修改分部的时候 重置运营主管 重置乐团主管 重置乐队指导 合作单位 教学点
|
|
@@ -685,7 +704,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
chioseSchool(val) {},
|
|
|
- gotoNext(num) {
|
|
|
+ gotoNext(num) {
|
|
|
this.$refs["topinfo"].validate((valid, object) => {
|
|
|
if (!valid) {
|
|
|
this.$message.error("请填写建团必要参数");
|
|
@@ -705,7 +724,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
resetSubmit() {
|
|
|
-
|
|
|
this.$refs["topinfo"].validate((valid, object) => {
|
|
|
if (!valid) {
|
|
|
this.$message.error("请填写必要参数");
|
|
@@ -791,6 +809,29 @@ export default {
|
|
|
// this.topFrom.paymentValidStartDate = ''
|
|
|
// this.topFrom.paymentValidEndDate = ''
|
|
|
},
|
|
|
+ onReset() {
|
|
|
+ this.topFrom = {
|
|
|
+ type: "", // 收费类型
|
|
|
+ section: "", //所属分部
|
|
|
+ school: "", // 合作单位
|
|
|
+ courseViewType: "",
|
|
|
+ teacher: "", // 乐团主管
|
|
|
+ name: "", //乐团名称
|
|
|
+ boss: "", // 运营主管
|
|
|
+ time: "", // 报名截止时间
|
|
|
+ startClass: [], // 招生年级起始
|
|
|
+ paymentValid: [], // 缴费有效期时间起始
|
|
|
+ address: "", // 教学地点
|
|
|
+ salary: "", // 收费模式
|
|
|
+ head: "",
|
|
|
+ paymentPattern: "", // 缴费方式
|
|
|
+ isClass: false, //是否为课堂课
|
|
|
+ startTime: "",
|
|
|
+ ownershipType: "OWN", // 合作机构类型
|
|
|
+ feeType: null,
|
|
|
+ };
|
|
|
+ this.$refs["topinfo"].resetFields();
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
startClassString() {
|
|
@@ -806,15 +847,14 @@ export default {
|
|
|
.join(",");
|
|
|
},
|
|
|
showNext() {
|
|
|
- const teamStatus = this.teamStatus
|
|
|
- // console.log(teamStatus)
|
|
|
+ const teamStatus = this.teamStatus;
|
|
|
return (
|
|
|
- teamStatus == 'newTeam' ||
|
|
|
- teamStatus == 'teamDraft' ||
|
|
|
- teamStatus == 'teamAudit' ||
|
|
|
- teamStatus == 'feeAudit'
|
|
|
- )
|
|
|
- }
|
|
|
+ teamStatus == "newTeam" ||
|
|
|
+ teamStatus == "teamDraft" ||
|
|
|
+ teamStatus == "teamAudit" ||
|
|
|
+ teamStatus == "feeAudit"
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|