|
@@ -12,58 +12,86 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="默认课酬-主教">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" v-model="scope.row.mainTeacher30MinSalary" placeholder="请输入课酬">
|
|
|
- <template slot="append" v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
- <template slot="append" v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
- <template slot="append" v-else>元/30分钟</template>
|
|
|
+ <el-input type="number"
|
|
|
+ v-model="scope.row.mainTeacher30MinSalary"
|
|
|
+ placeholder="请输入课酬">
|
|
|
+ <template slot="append"
|
|
|
+ v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else>元/30分钟</template>
|
|
|
</el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="默认课酬-助教">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" v-model="scope.row.assistantTeacher30MinSalary" placeholder="请输入课酬">
|
|
|
- <template slot="append" v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
- <template slot="append" v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
- <template slot="append" v-else>元/30分钟</template>
|
|
|
+ <el-input type="number"
|
|
|
+ v-model="scope.row.assistantTeacher30MinSalary"
|
|
|
+ placeholder="请输入课酬">
|
|
|
+ <template slot="append"
|
|
|
+ v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else>元/30分钟</template>
|
|
|
</el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="3.0课酬-主教">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" :disabled="scope.row.courseScheduleType == 'CLASSROOM'" v-model="scope.row.mainTeacher90MinSalary" placeholder="请输入课酬">
|
|
|
- <template slot="append" v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
- <template slot="append" v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
- <template slot="append" v-else>元/90分钟</template>
|
|
|
+ <el-input type="number"
|
|
|
+ :disabled="scope.row.courseScheduleType == 'CLASSROOM'"
|
|
|
+ v-model="scope.row.mainTeacher90MinSalary"
|
|
|
+ placeholder="请输入课酬">
|
|
|
+ <template slot="append"
|
|
|
+ v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else>元/90分钟</template>
|
|
|
<!-- <template slot="append">元/{{ (scope.row.courseScheduleType == 'HIGH' || scope.row.courseScheduleType == 'CLASSROOM') ? 45 : 90 }}分钟</template> -->
|
|
|
</el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="3.0课酬-助教">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" :disabled="scope.row.courseScheduleType == 'CLASSROOM'" v-model="scope.row.assistantTeacher90MinSalary" placeholder="请输入课酬">
|
|
|
- <template slot="append" v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
- <template slot="append" v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
- <template slot="append" v-else>元/90分钟</template>
|
|
|
+ <el-input type="number"
|
|
|
+ :disabled="scope.row.courseScheduleType == 'CLASSROOM'"
|
|
|
+ v-model="scope.row.assistantTeacher90MinSalary"
|
|
|
+ placeholder="请输入课酬">
|
|
|
+ <template slot="append"
|
|
|
+ v-if="scope.row.courseScheduleType == 'HIGH'">元/45分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
|
|
|
+ <template slot="append"
|
|
|
+ v-else>元/90分钟</template>
|
|
|
<!-- <template slot="append">元/{{ (scope.row.courseScheduleType == 'HIGH' || scope.row.courseScheduleType == 'CLASSROOM') ? 45 : 90 }}分钟</template> -->
|
|
|
</el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <el-table :data='vipTable' style="width: 70%; margin-top: 15px;"
|
|
|
+ <el-table :data='vipTable'
|
|
|
+ style="width: 70%; margin-top: 15px;"
|
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column label="VIP课课酬参考值" prop="vipGroupCategoryName">
|
|
|
+ <el-table-column label="VIP课课酬参考值"
|
|
|
+ prop="vipGroupCategoryName">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="线上课">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" v-model="scope.row.onlineClassesSalary" placeholder="请输入内容">
|
|
|
+ <el-input type="number"
|
|
|
+ v-model="scope.row.onlineClassesSalary"
|
|
|
+ placeholder="请输入内容">
|
|
|
<template slot="append">元/45分钟</template>
|
|
|
</el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="线下课">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" v-model="scope.row.offlineClassesSalary" placeholder="请输入内容">
|
|
|
+ <el-input type="number"
|
|
|
+ v-model="scope.row.offlineClassesSalary"
|
|
|
+ placeholder="请输入内容">
|
|
|
<template slot="append">元/45分钟</template>
|
|
|
</el-input>
|
|
|
</template>
|
|
@@ -71,8 +99,10 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <div style="padding-top: 10px;" v-permission="pageType == 'create' ? {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherAdd/batchUpset'} : {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherUpdate/batchUpset'}">
|
|
|
- <el-button @click="onSave()" type="primary">保存</el-button>
|
|
|
+ <div style="padding-top: 10px;"
|
|
|
+ v-permission="pageType == 'create' ? {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherAdd/batchUpset'} : {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherUpdate/batchUpset'}">
|
|
|
+ <el-button @click="onSave()"
|
|
|
+ type="primary">保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -95,35 +125,35 @@ export default {
|
|
|
mainTeacher30MinSalary: 0,
|
|
|
mainTeacher90MinSalary: 0,
|
|
|
userId: this.teacherId,
|
|
|
- },{
|
|
|
+ }, {
|
|
|
assistantTeacher30MinSalary: 0,
|
|
|
assistantTeacher90MinSalary: 0,
|
|
|
courseScheduleType: "MIX",
|
|
|
mainTeacher30MinSalary: 0,
|
|
|
mainTeacher90MinSalary: 0,
|
|
|
userId: this.teacherId
|
|
|
- },{
|
|
|
+ }, {
|
|
|
assistantTeacher30MinSalary: 0,
|
|
|
assistantTeacher90MinSalary: 0,
|
|
|
courseScheduleType: "COMPREHENSIVE",
|
|
|
mainTeacher30MinSalary: 0,
|
|
|
mainTeacher90MinSalary: 0,
|
|
|
userId: this.teacherId
|
|
|
- },{
|
|
|
+ }, {
|
|
|
assistantTeacher30MinSalary: 0,
|
|
|
assistantTeacher90MinSalary: 0,
|
|
|
courseScheduleType: "TRAINING_SINGLE",
|
|
|
mainTeacher30MinSalary: 0,
|
|
|
mainTeacher90MinSalary: 0,
|
|
|
userId: this.teacherId
|
|
|
- },{
|
|
|
+ }, {
|
|
|
assistantTeacher30MinSalary: 0,
|
|
|
assistantTeacher90MinSalary: 0,
|
|
|
courseScheduleType: "TRAINING_MIX",
|
|
|
mainTeacher30MinSalary: 0,
|
|
|
mainTeacher90MinSalary: 0,
|
|
|
userId: this.teacherId
|
|
|
- },{
|
|
|
+ }, {
|
|
|
assistantTeacher30MinSalary: 0,
|
|
|
assistantTeacher90MinSalary: 0,
|
|
|
courseScheduleType: "HIGH",
|
|
@@ -144,13 +174,13 @@ export default {
|
|
|
vipList: []
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted () {
|
|
|
this.__init()
|
|
|
},
|
|
|
methods: {
|
|
|
- __init() {
|
|
|
+ __init () {
|
|
|
// 获取课程形态 设置vip课酬
|
|
|
- vipGroupCategory({ organId: this.$store.getters.organ }).then(res => {
|
|
|
+ vipGroupCategory().then(res => {
|
|
|
if (res.code == 200 && res.data.length > 0) {
|
|
|
let vipData = []
|
|
|
res.data.forEach(item => {
|
|
@@ -168,7 +198,7 @@ export default {
|
|
|
page: 1,
|
|
|
search: this.teacherId
|
|
|
}).then(res => {
|
|
|
- if(res.code == 200) {
|
|
|
+ if (res.code == 200) {
|
|
|
let rows = res.data.rows
|
|
|
this.vipListCompare(vipData, rows)
|
|
|
}
|
|
@@ -182,7 +212,7 @@ export default {
|
|
|
teacherId: this.teacherId,
|
|
|
// settlementType: 'FIXED_SALARY'
|
|
|
}).then(res => {
|
|
|
- if(res.code == 200) {
|
|
|
+ if (res.code == 200) {
|
|
|
// this.teamTable = res.data.rows
|
|
|
let rows = res.data.rows
|
|
|
this.teacherSalaryMoney(rows)
|
|
@@ -190,15 +220,15 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- vipListCompare(vipData, rows) { // vip 做对比
|
|
|
- if(!rows) { // 判断是否有数据
|
|
|
+ vipListCompare (vipData, rows) { // vip 做对比
|
|
|
+ if (!rows) { // 判断是否有数据
|
|
|
this.vipTable = vipData
|
|
|
return
|
|
|
}
|
|
|
let result = []
|
|
|
vipData.forEach(item => {
|
|
|
rows.forEach(c => {
|
|
|
- if(item.vipGroupCategoryId == c.vipGroupCategoryId) {
|
|
|
+ if (item.vipGroupCategoryId == c.vipGroupCategoryId) {
|
|
|
item.checked = true
|
|
|
result.push({
|
|
|
vipGroupCategoryId: c.vipGroupCategoryId,
|
|
@@ -210,9 +240,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- if(result.length > 0) {
|
|
|
+ if (result.length > 0) {
|
|
|
vipData.forEach(item => {
|
|
|
- if(!item.checked) {
|
|
|
+ if (!item.checked) {
|
|
|
result.push(item)
|
|
|
}
|
|
|
})
|
|
@@ -222,14 +252,14 @@ export default {
|
|
|
this.vipTable = result
|
|
|
},
|
|
|
|
|
|
- teacherSalaryMoney(rows) {
|
|
|
+ teacherSalaryMoney (rows) {
|
|
|
// 判断是否有数据
|
|
|
- if(!rows || rows.length <= 0) return
|
|
|
+ if (!rows || rows.length <= 0) return
|
|
|
let teamTable = this.teamTable
|
|
|
let result = []
|
|
|
teamTable.forEach(item => {
|
|
|
rows.forEach(c => {
|
|
|
- if(item.courseScheduleType == c.courseScheduleType) {
|
|
|
+ if (item.courseScheduleType == c.courseScheduleType) {
|
|
|
item.checked = true
|
|
|
result.push({
|
|
|
mainTeacher30MinSalary: c.mainTeacher30MinSalary,
|
|
@@ -242,9 +272,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- if(result.length > 0) {
|
|
|
+ if (result.length > 0) {
|
|
|
teamTable.forEach(item => {
|
|
|
- if(!item.checked) {
|
|
|
+ if (!item.checked) {
|
|
|
result.push(item)
|
|
|
}
|
|
|
})
|
|
@@ -253,35 +283,35 @@ export default {
|
|
|
}
|
|
|
this.teamTable = result
|
|
|
},
|
|
|
- onSave() {
|
|
|
+ onSave () {
|
|
|
let teamTable = this.teamTable
|
|
|
let checkStatus = true
|
|
|
teamTable.forEach(item => {
|
|
|
- if(item.assistantTeacher30MinSalary < 0 || item.assistantTeacher90MinSalary < 0
|
|
|
+ if (item.assistantTeacher30MinSalary < 0 || item.assistantTeacher90MinSalary < 0
|
|
|
|| item.mainTeacher30MinSalary < 0 || item.mainTeacher90MinSalary < 0) {
|
|
|
this.$message('输入课酬不能为负数')
|
|
|
checkStatus = false
|
|
|
- }
|
|
|
+ }
|
|
|
})
|
|
|
this.vipTable.forEach(item => {
|
|
|
- if(item.offlineClassesSalary < 0 && item.onlineClassesSalary < 0) {
|
|
|
- this.$message('输入课酬不能为负数')
|
|
|
- checkStatus = false
|
|
|
- }
|
|
|
- })
|
|
|
+ if (item.offlineClassesSalary < 0 && item.onlineClassesSalary < 0) {
|
|
|
+ this.$message('输入课酬不能为负数')
|
|
|
+ checkStatus = false
|
|
|
+ }
|
|
|
+ })
|
|
|
// 判断输入的值是否正确
|
|
|
- if(!checkStatus) return false
|
|
|
+ if (!checkStatus) return false
|
|
|
teacherSalaryBatchUpset(teamTable).then(res => {
|
|
|
- if(res.code == 200) {
|
|
|
-
|
|
|
+ if (res.code == 200) {
|
|
|
+
|
|
|
// 判断输入的值是否正确
|
|
|
// if(!checkStatus) return false
|
|
|
vipGroupSalarySet(this.vipTable).then(res => {
|
|
|
- if(res.code == 200) {
|
|
|
+ if (res.code == 200) {
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
|
// if(this.$route.query.type == 'create') {
|
|
|
- this.$router.push('/business/teacherList')
|
|
|
+ this.$router.push('/business/teacherList')
|
|
|
// }
|
|
|
}
|
|
|
})
|
|
@@ -301,7 +331,8 @@ export default {
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
.tableList {
|
|
|
- .left, .right {
|
|
|
+ .left,
|
|
|
+ .right {
|
|
|
float: left;
|
|
|
}
|
|
|
.left {
|
|
@@ -318,17 +349,17 @@ export default {
|
|
|
/deep/.el-table__body {
|
|
|
tr {
|
|
|
td:nth-child(3) {
|
|
|
- border-right: 1px solid #EBEEF5;
|
|
|
+ border-right: 1px solid #ebeef5;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
/deep/.el-input-group__append {
|
|
|
- background-color: #F5F7FA;
|
|
|
- color: #909399;
|
|
|
- vertical-align: middle;
|
|
|
- display: table-cell;
|
|
|
- position: relative;
|
|
|
- border: 1px solid #DCDFE6;
|
|
|
- border-left: 0;
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ color: #909399;
|
|
|
+ vertical-align: middle;
|
|
|
+ display: table-cell;
|
|
|
+ position: relative;
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
+ border-left: 0;
|
|
|
}
|
|
|
</style>
|