|
@@ -127,7 +127,7 @@
|
|
|
v-model.trim="leftForm.activeType"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!leftForm.courseType|| isMusicTheory"
|
|
|
+ :disabled="!leftForm.courseType || isMusicTheory"
|
|
|
@change="chioseActive"
|
|
|
>
|
|
|
<el-option
|
|
@@ -382,11 +382,8 @@
|
|
|
<!-- <el-form-item label="课程总价">
|
|
|
<el-input v-model.trim="rightForm.allPrice" disabled />
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="computational">计算</el-button>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
- <div style="width: 700px">
|
|
|
+ <div style="width: 700px; clear: both">
|
|
|
<el-table
|
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
:data="activeStudentList"
|
|
@@ -403,7 +400,9 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
+ :disabled="!isMusicTheory"
|
|
|
size="mini"
|
|
|
+ @change="changeStudentMoney"
|
|
|
style="width: 90% !important"
|
|
|
class="number-input"
|
|
|
v-model="scope.row.onlineClassesUnitPrice"
|
|
@@ -421,9 +420,11 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
+ @change="changeStudentMoney"
|
|
|
size="mini"
|
|
|
style="width: 90% !important"
|
|
|
class="number-input"
|
|
|
+ :disabled="!isMusicTheory"
|
|
|
v-model="scope.row.offlineClassesUnitPrice"
|
|
|
:controls="false"
|
|
|
:min="0"
|
|
@@ -446,6 +447,10 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <!-- class="computeMoney" -->
|
|
|
+ <div style="overflow: hidden;" >
|
|
|
+ <el-button type="primary" class="computeMoney" @click="computational">计算</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -553,12 +558,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <div class="btnWrap">
|
|
|
- <!-- <div class="closeBtn">
|
|
|
+ <el-row>
|
|
|
+ <el-col>
|
|
|
+ <div class="okBtn" @click="submitInfo">{{ id ? "修改" : "确定" }}</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <!-- <div class="btnWrap"> -->
|
|
|
+ <!-- <div class="closeBtn">
|
|
|
取消
|
|
|
</div>-->
|
|
|
- <div class="okBtn" @click="submitInfo">{{ id ? "修改" : "确定" }}</div>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <!-- </div> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -749,7 +759,7 @@ export default {
|
|
|
id: "",
|
|
|
studentList: [],
|
|
|
courseTimeList: [],
|
|
|
- isMusicTheory:false
|
|
|
+ isMusicTheory: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -909,7 +919,7 @@ export default {
|
|
|
this.rightForm.offlinePrice = this.courseTypeList[
|
|
|
i
|
|
|
].offlineClassesUnitPrice;
|
|
|
- this.isMusicTheory = this.courseTypeList[i].musicTheory
|
|
|
+ this.isMusicTheory = this.courseTypeList[i].musicTheory;
|
|
|
}
|
|
|
}
|
|
|
// teacherId
|
|
@@ -1294,6 +1304,7 @@ export default {
|
|
|
},
|
|
|
// 计算课酬
|
|
|
computational() {
|
|
|
+ console.log('lai')
|
|
|
this.computationalBtn = true;
|
|
|
let userId = this.leftForm.teacher || null;
|
|
|
let giveTeachMode = this.centerForm.radio || null;
|
|
@@ -1356,7 +1367,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
// let activeCourseType;
|
|
|
- let flag =false
|
|
|
+ let flag = false;
|
|
|
// console.log(this.courseTypeList,)
|
|
|
// this.courseTypeList.forEach((courseType) => {
|
|
|
// if (courseType.id == this.leftForm.courseType) {
|
|
@@ -1365,17 +1376,20 @@ export default {
|
|
|
// });
|
|
|
// console.log(activeCourseType)
|
|
|
if (this.isMusicTheory) {
|
|
|
- if (this.leftForm.students.length > this.studentLimit || this.leftForm.students.length<3) {
|
|
|
+ if (
|
|
|
+ this.leftForm.students.length > this.studentLimit ||
|
|
|
+ this.leftForm.students.length < 3
|
|
|
+ ) {
|
|
|
this.$message.error(`请选择上课学生为3-${this.studentLimit}人`);
|
|
|
- flag = true
|
|
|
+ flag = true;
|
|
|
}
|
|
|
} else {
|
|
|
if (this.leftForm.students.length !== this.studentLimit) {
|
|
|
this.$message.error(`请选择上课学生为${this.studentLimit}人`);
|
|
|
- flag = true
|
|
|
+ flag = true;
|
|
|
}
|
|
|
}
|
|
|
- if(flag)return
|
|
|
+ if (flag) return;
|
|
|
// 获取活动方案
|
|
|
|
|
|
// 判断线上课课酬和线下课课酬
|
|
@@ -1720,6 +1734,11 @@ export default {
|
|
|
this.maskForm.startTime = "";
|
|
|
}
|
|
|
},
|
|
|
+ changeStudentMoney(val) {
|
|
|
+ if(val){
|
|
|
+ this.computationalBtn = false
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
// watch: {
|
|
|
// rightForm: {
|
|
@@ -1732,7 +1751,12 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+ .computeMoney {
|
|
|
+ margin-top: 10px;
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
.m-core {
|
|
|
+
|
|
|
margin-top: 30px;
|
|
|
// display: flex;
|
|
|
// flex-direction: row;
|