|
@@ -186,51 +186,6 @@
|
|
|
placeholder="选择日期"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="缴费方式"
|
|
|
- prop="paymentPattern"
|
|
|
- :rules="[{ required: !isNotEditing(), message: '请选择缴费方式' }]">
|
|
|
- <el-select placeholder="缴费方式"
|
|
|
- :disabled="isNotEditing() || basdisabled"
|
|
|
- clearable
|
|
|
- @change="changePaymentPattern"
|
|
|
- filterable
|
|
|
- v-model.trim="topFrom.paymentPattern">
|
|
|
- <el-option :value="0"
|
|
|
- label="按月"></el-option>
|
|
|
- <el-option :value="1"
|
|
|
- label="按季"></el-option>
|
|
|
- <el-option :value="2"
|
|
|
- label="一次性"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="缴费有效期开始"
|
|
|
- prop="paymentValidStartDate"
|
|
|
- :rules="[
|
|
|
- { required: !isNotEditing(), message: '请选择缴费有效期开始' },
|
|
|
- ]">
|
|
|
- <el-date-picker :disabled="isNotEditing() || basdisabled "
|
|
|
- v-model="topFrom.paymentValidStartDate"
|
|
|
- @change="changePaymentValidStartDate"
|
|
|
- placeholder="开始日期"
|
|
|
- :picker-options="beginDate(topFrom.time)">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="缴费有效期结束"
|
|
|
- prop="paymentValidEndDate"
|
|
|
- :rules="[
|
|
|
- {
|
|
|
- required: !(isNotEditing()),
|
|
|
- message: '请选择缴费有效期结束',
|
|
|
- },
|
|
|
- ]">
|
|
|
- <el-date-picker :disabled="
|
|
|
- isNotEditing() || basdisabled || !topFrom.paymentValidStartDate
|
|
|
- "
|
|
|
- v-model="topFrom.paymentValidEndDate"
|
|
|
- :picker-options="beginDate(topFrom.paymentValidStartDate)"
|
|
|
- placeholder="结束日期">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item> -->
|
|
|
<el-form-item label="招生年级" v-if="basdisabled">
|
|
|
<el-tooltip
|
|
|
class="item"
|
|
@@ -587,6 +542,7 @@ export default {
|
|
|
this.teamStatus == "look" ||
|
|
|
this.teamStatus == "teamAudit" ||
|
|
|
this.teamStatus == "feeAudit"
|
|
|
+
|
|
|
) {
|
|
|
this.basdisabled = true;
|
|
|
} else {
|
|
@@ -638,53 +594,8 @@ export default {
|
|
|
this.topFrom.feeType = res.data.musicGroup.feeType
|
|
|
? res.data.musicGroup.feeType
|
|
|
: null;
|
|
|
- // 课程组成形式
|
|
|
- this.checkList;
|
|
|
- // 判断课程是否为空
|
|
|
- let list = res.data.musicGroup.courseForm
|
|
|
- ? JSON.parse(res.data.musicGroup.courseForm)
|
|
|
- : {};
|
|
|
- for (let i in this.checkList) {
|
|
|
- if (list[i] && !list[i].isNew) {
|
|
|
- this.checkList[i] = list[i];
|
|
|
- } else if (list[i] && list[i].isNew) {
|
|
|
- this.newStudentList[i] = list[i];
|
|
|
- this.newStudentList[i].checkBuy = true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 付费方式和周期
|
|
|
- for (let i in res.data.musicGroupPaymentEntities) {
|
|
|
- if (res.data.musicGroupPaymentEntities[i].name == "学校") {
|
|
|
- this.payList.school.ischeck = true;
|
|
|
- this.payList.school.value =
|
|
|
- res.data.musicGroupPaymentEntities[i].memo;
|
|
|
- this.payList.school.price =
|
|
|
- res.data.musicGroupPaymentEntities[i].amount;
|
|
|
- this.payList.school.chiose =
|
|
|
- res.data.musicGroupPaymentEntities[i].paymentMethod;
|
|
|
- }
|
|
|
- if (res.data.musicGroupPaymentEntities[i].name == "公司") {
|
|
|
- this.payList.company.ischeck = true;
|
|
|
- this.payList.company.value =
|
|
|
- res.data.musicGroupPaymentEntities[i].memo;
|
|
|
- this.payList.company.price =
|
|
|
- res.data.musicGroupPaymentEntities[i].amount;
|
|
|
- this.payList.company.chiose =
|
|
|
- res.data.musicGroupPaymentEntities[i].paymentMethod;
|
|
|
- }
|
|
|
-
|
|
|
- if (res.data?.months?.length > 0) {
|
|
|
- this.payList.student.ischeck = true;
|
|
|
- this.payList.student.chiose = "loop";
|
|
|
- this.chioseMonth = res.data.months;
|
|
|
- } else {
|
|
|
- this.payList.student.ischeck = true;
|
|
|
- this.payList.student.chiose = "ONE_OFF";
|
|
|
- }
|
|
|
- }
|
|
|
- // 循环缴费月
|
|
|
- this.payList.chioseMonth = res.data.months;
|
|
|
+ // // 循环缴费月
|
|
|
+ // this.payList.chioseMonth = res.data.months;
|
|
|
if (res.data.musicGroup.organId) {
|
|
|
// 获取员工
|
|
|
queryEmployByOrganId({
|
|
@@ -762,34 +673,6 @@ export default {
|
|
|
this.typeList = res.data.rows;
|
|
|
}
|
|
|
});
|
|
|
- // 3.获取合作单位选项卡
|
|
|
- // getCooperation({ 'rows': 1000, search: this.organId }).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.cooperationList = res.data.rows;
|
|
|
- // }
|
|
|
- // })
|
|
|
- // 4.获取老师选项卡
|
|
|
- // getTeacher({ 'rows': 1000, organId: this.organId }).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.teacherList = res.data;
|
|
|
- // }
|
|
|
- // })
|
|
|
- // 5.获取教学地点选项卡
|
|
|
- // getAddress({ 'rows': 1000, }).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.addList = res.data.rows;
|
|
|
- // }
|
|
|
- // })
|
|
|
- // 6.默认支付主体
|
|
|
- // getPayMaster({ 'rows': 1000 }).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.payList = res.data.map(item => {
|
|
|
- // let obj = {};
|
|
|
- // obj.id = item.id;
|
|
|
- // obj.ischios
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
// 缓存设置时的状态
|
|
|
sessionStorage.setItem("resetCode", "1");
|
|
|
},
|
|
@@ -827,61 +710,13 @@ export default {
|
|
|
},
|
|
|
chioseSchool(val) {},
|
|
|
gotoNext(num) {
|
|
|
- // 1.效验数据 判断是否数据正常=> 正常放入store存储
|
|
|
- // 不正常=> 进行效验提示
|
|
|
- let check = [];
|
|
|
- for (let i in this.checkList) {
|
|
|
- if (this.checkList[i] && i != "submit") {
|
|
|
- check.push(this.checkList[i].ischeck);
|
|
|
- }
|
|
|
- }
|
|
|
- let checkFlag = false;
|
|
|
- check.forEach((item) => {
|
|
|
- checkFlag = checkFlag || item;
|
|
|
- });
|
|
|
- // if (!checkFlag) {
|
|
|
- // this.$message.error("请至少选择一种乐团课程类型");
|
|
|
- // return;
|
|
|
- // }
|
|
|
this.$refs["topinfo"].validate((valid, object) => {
|
|
|
if (!valid) {
|
|
|
this.$message.error("请填写建团必要参数");
|
|
|
} else {
|
|
|
// 判断一下是否勾选了课程类型而没有输入金额
|
|
|
- let flagList = [];
|
|
|
- for (let i in this.checkList) {
|
|
|
- if (this.checkList[i].ischeck && !this.checkList[i].value) {
|
|
|
- flagList.push(false);
|
|
|
- } else {
|
|
|
- flagList.push(true);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- for (let i in this.newStudentList) {
|
|
|
- if (
|
|
|
- (this.newStudentList[i].ischeck &&
|
|
|
- !this.newStudentList[i].value) ||
|
|
|
- (this.newStudentList[i].ischeck &&
|
|
|
- !this.newStudentList[i].nowValue)
|
|
|
- ) {
|
|
|
- flagList.push(false);
|
|
|
- } else {
|
|
|
- flagList.push(true);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- let flag = flagList.every((item) => {
|
|
|
- return item == true;
|
|
|
- });
|
|
|
- if (!flag) {
|
|
|
- this.$message.error("课程价格不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
// 验证通过
|
|
|
this.$store.dispatch("topinfo", this.topFrom);
|
|
|
- // this.$store.dispatch("checkinfo", this.checkList);
|
|
|
- // this.$store.dispatch("getpayInfo", this.payList);
|
|
|
- // this.$store.dispatch("newStudentinfo", this.newStudentList);
|
|
|
if (this.teamStatus == "teamDraft") {
|
|
|
// 获取数据提交
|
|
|
|
|
@@ -894,51 +729,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
resetSubmit() {
|
|
|
- let check = [];
|
|
|
- for (let i in this.checkList) {
|
|
|
- if (this.checkList[i] && i != "submit") {
|
|
|
- check.push(this.checkList[i].ischeck);
|
|
|
- }
|
|
|
- }
|
|
|
- // let checkFlag = false;
|
|
|
- // check.forEach((item) => {
|
|
|
- // checkFlag = checkFlag || item;
|
|
|
- // });
|
|
|
- // if (!checkFlag) {
|
|
|
- // this.$message.error("请至少选择一种乐团课程类型");
|
|
|
- // return;
|
|
|
- // }
|
|
|
+
|
|
|
this.$refs["topinfo"].validate((valid, object) => {
|
|
|
if (!valid) {
|
|
|
this.$message.error("请填写必要参数");
|
|
|
} else {
|
|
|
- let flagList = [];
|
|
|
- for (let i in this.checkList) {
|
|
|
- if (this.checkList[i].ischeck && !this.checkList[i].value) {
|
|
|
- flagList.push(false);
|
|
|
- } else {
|
|
|
- flagList.push(true);
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i in this.newStudentList) {
|
|
|
- if (
|
|
|
- (this.newStudentList[i].ischeck &&
|
|
|
- !this.newStudentList[i].value) ||
|
|
|
- (this.newStudentList[i].ischeck &&
|
|
|
- !this.newStudentList[i].nowValue)
|
|
|
- ) {
|
|
|
- flagList.push(false);
|
|
|
- } else {
|
|
|
- flagList.push(true);
|
|
|
- }
|
|
|
- }
|
|
|
- let flag = flagList.every((item) => {
|
|
|
- return item == true;
|
|
|
- });
|
|
|
- if (!flag) {
|
|
|
- this.$message.error("课程价格不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
let status = null;
|
|
|
// 1.resetTeam 乐团修改
|
|
|
// 2.newTeam 新建乐团
|
|
@@ -965,20 +760,6 @@ export default {
|
|
|
let obj = {};
|
|
|
// topFrom.ownershipType
|
|
|
// 修改 合并对象
|
|
|
- let courseJson = {};
|
|
|
- for (let i in this.checkList) {
|
|
|
- if (this.checkList[i].ischeck) {
|
|
|
- courseJson[i] = this.checkList[i];
|
|
|
- }
|
|
|
- }
|
|
|
- for (let j in this.newStudentList) {
|
|
|
- if (this.newStudentList[j].ischeck) {
|
|
|
- courseJson[j] = this.newStudentList[j];
|
|
|
- }
|
|
|
- }
|
|
|
- this.payList.student.chiose == "loop"
|
|
|
- ? (obj.months = this.payList.chioseMonth)
|
|
|
- : (obj.months = []);
|
|
|
obj.musicGroup = {
|
|
|
settlementType: this.topFrom.salary,
|
|
|
applyExpireDate: dayjs(this.topFrom.time).format(
|
|
@@ -1000,7 +781,6 @@ export default {
|
|
|
organId: this.topFrom.section,
|
|
|
// paymentMonths:obj.months 有待确认
|
|
|
schoolId: this.topFrom.address,
|
|
|
- courseForm: JSON.stringify(courseJson),
|
|
|
id: this.teamid,
|
|
|
directorUserId: this.topFrom.head,
|
|
|
isClassroomLessons: this.topFrom.isClass,
|
|
@@ -1011,30 +791,6 @@ export default {
|
|
|
feeType: this.topFrom.feeType,
|
|
|
};
|
|
|
obj.musicGroupPaymentEntities = [];
|
|
|
- // 添加学校主体付费方式
|
|
|
- if (this.payList.school.ischeck) {
|
|
|
- obj.musicGroupPaymentEntities.push({
|
|
|
- amount: this.payList.school.price,
|
|
|
- memo: this.payList.school.value,
|
|
|
- paymentMethod: this.payList.school.chiose,
|
|
|
- name: "学校",
|
|
|
- });
|
|
|
- }
|
|
|
- // 添加公司主体付费方式
|
|
|
- if (this.payList.company.ischeck) {
|
|
|
- obj.musicGroupPaymentEntities.push({
|
|
|
- amount: this.payList.company.price,
|
|
|
- memo: this.payList.company.value,
|
|
|
- paymentMethod: this.payList.company.chiose,
|
|
|
- name: "公司",
|
|
|
- });
|
|
|
- }
|
|
|
- if (this.payList.student.ischeck) {
|
|
|
- obj.musicGroupPaymentEntities.push({
|
|
|
- paymentMethod: this.payList.student.chiose,
|
|
|
- name: "学生",
|
|
|
- });
|
|
|
- }
|
|
|
// 发请求
|
|
|
resetTeamBaseInfo(obj).then((res) => {
|
|
|
if (res.code == 200) {
|
|
@@ -1074,24 +830,6 @@ export default {
|
|
|
.join(",");
|
|
|
},
|
|
|
},
|
|
|
- watch: {
|
|
|
- newStudentList: {
|
|
|
- handler: function (val) {
|
|
|
- if (val.baseInfo.ischeck) {
|
|
|
- this.checkList.baseInfo.ischeck = false;
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
- checkList: {
|
|
|
- handler: function (val) {
|
|
|
- if (val.baseInfo.ischeck) {
|
|
|
- this.newStudentList.baseInfo.ischeck = false;
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
- },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" >
|