|
@@ -3,115 +3,128 @@
|
|
|
<!-- <h4>单次课次参考时长:30min</h4> -->
|
|
|
<div class="tableList">
|
|
|
<div class="left">
|
|
|
- <el-table :data='teamTable'
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
+ <el-table :data="teamTable" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
<el-table-column label="乐团课课酬课时结算">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.courseScheduleType | coursesType }}
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope">{{ scope.row.courseScheduleType | coursesType }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="默认课酬-主教">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="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"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="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"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="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"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="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"
|
|
|
- @mousewheel.native.prevent
|
|
|
- :disabled="scope.row.courseScheduleType == 'CLASSROOM'"
|
|
|
- v-model.trim="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"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ :disabled="scope.row.courseScheduleType == 'CLASSROOM'"
|
|
|
+ v-model.trim="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"
|
|
|
- @mousewheel.native.prevent
|
|
|
- :disabled="scope.row.courseScheduleType == 'CLASSROOM'"
|
|
|
- v-model.trim="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"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ :disabled="scope.row.courseScheduleType == 'CLASSROOM'"
|
|
|
+ v-model.trim="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;"
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column label="VIP课课酬参考值"
|
|
|
- prop="vipGroupCategoryName">
|
|
|
- </el-table-column>
|
|
|
+ <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>
|
|
|
<el-table-column label="线上课">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="scope.row.onlineClassesSalary"
|
|
|
- placeholder="请输入内容">
|
|
|
+ <el-input
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="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"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="scope.row.offlineClassesSalary"
|
|
|
- placeholder="请输入内容">
|
|
|
+ <el-input
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="scope.row.offlineClassesSalary"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ >
|
|
|
<template slot="append">元/45分钟</template>
|
|
|
</el-input>
|
|
|
</template>
|
|
|
-
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-table :data='accompanyTable' style="width: 35%; margin-top: 15px;" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column label="网管课">
|
|
|
+ <el-table
|
|
|
+ :data="accompanyTable"
|
|
|
+ style="width: 35%; margin-top: 15px;"
|
|
|
+ :header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
|
+ >
|
|
|
+ <el-table-column label="网管课">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number"
|
|
|
- style="width:195px"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="scope.row.mainTeacherSalary"
|
|
|
- placeholder="请输入内容">
|
|
|
+ <el-input
|
|
|
+ type="number"
|
|
|
+ style="width:195px"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="scope.row.mainTeacherSalary"
|
|
|
+ >
|
|
|
<template slot="append">元/{{scope.row.minutes}}分钟</template>
|
|
|
</el-input>
|
|
|
</template>
|
|
@@ -120,116 +133,143 @@
|
|
|
|
|
|
<el-form style="margin-top: 20px;">
|
|
|
<el-form-item label="生效日期">
|
|
|
- <el-date-picker v-model.trim="startDate"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期">
|
|
|
- </el-date-picker>
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="startDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
- <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>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { vipGroupSalaryList, vipGroupSalarySet, teacherSalaryList, teacherSalaryBatchUpset,teacherDefaultPracticeGroupSalary,PracticeGroupSalaryUpdate } from '@/api/teacherManager'
|
|
|
-import { sysConfigList } from '@/api/generalSettings'
|
|
|
-import { findTeacherDefaultSalary } from '@/api/vipSeting'
|
|
|
-let nowTime = new Date()
|
|
|
-let checkTime = nowTime.getFullYear() + '-' + (nowTime.getMonth() + 1) + '-' + nowTime.getDate()
|
|
|
+import {
|
|
|
+ vipGroupSalaryList,
|
|
|
+ vipGroupSalarySet,
|
|
|
+ teacherSalaryList,
|
|
|
+ teacherSalaryBatchUpset,
|
|
|
+ teacherDefaultPracticeGroupSalary,
|
|
|
+ PracticeGroupSalaryUpdate
|
|
|
+} from "@/api/teacherManager";
|
|
|
+import { sysConfigList } from "@/api/generalSettings";
|
|
|
+import { findTeacherDefaultSalary } from "@/api/vipSeting";
|
|
|
+let nowTime = new Date();
|
|
|
+let checkTime =
|
|
|
+ nowTime.getFullYear() +
|
|
|
+ "-" +
|
|
|
+ (nowTime.getMonth() + 1) +
|
|
|
+ "-" +
|
|
|
+ nowTime.getDate();
|
|
|
export default {
|
|
|
- props: ['teacherId'],
|
|
|
- name: 'salarySet',
|
|
|
- data () {
|
|
|
+ props: ["teacherId"],
|
|
|
+ name: "salarySet",
|
|
|
+ data() {
|
|
|
return {
|
|
|
pageType: this.$route.query.type, // 页面类型
|
|
|
// teacherId: this.teacherId ? this.teacherId : this.$route.query.teacherId,
|
|
|
- teamTable: [{
|
|
|
- assistantTeacher30MinSalary: 0,
|
|
|
- assistantTeacher90MinSalary: 0,
|
|
|
- courseScheduleType: "SINGLE",
|
|
|
- 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",
|
|
|
- mainTeacher30MinSalary: 0,
|
|
|
- mainTeacher90MinSalary: 0,
|
|
|
- userId: this.teacherId
|
|
|
- }, {
|
|
|
- assistantTeacher30MinSalary: 0,
|
|
|
- assistantTeacher90MinSalary: 0,
|
|
|
- courseScheduleType: "CLASSROOM",
|
|
|
- mainTeacher30MinSalary: 0,
|
|
|
- mainTeacher90MinSalary: 0,
|
|
|
- userId: this.teacherId
|
|
|
- }],
|
|
|
+ teamTable: [
|
|
|
+ {
|
|
|
+ assistantTeacher30MinSalary: 0,
|
|
|
+ assistantTeacher90MinSalary: 0,
|
|
|
+ courseScheduleType: "SINGLE",
|
|
|
+ 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",
|
|
|
+ mainTeacher30MinSalary: 0,
|
|
|
+ mainTeacher90MinSalary: 0,
|
|
|
+ userId: this.teacherId
|
|
|
+ },
|
|
|
+ {
|
|
|
+ assistantTeacher30MinSalary: 0,
|
|
|
+ assistantTeacher90MinSalary: 0,
|
|
|
+ courseScheduleType: "CLASSROOM",
|
|
|
+ mainTeacher30MinSalary: 0,
|
|
|
+ mainTeacher90MinSalary: 0,
|
|
|
+ userId: this.teacherId
|
|
|
+ }
|
|
|
+ ],
|
|
|
vipTable: [],
|
|
|
musicGroupTable: [],
|
|
|
ruleList: [],
|
|
|
vipList: [],
|
|
|
startDate: null,
|
|
|
- accompanyTable:[{assistantTeacherSalary:30,minutes:25,userId:this.teacherId,mainTeacherSalary:null}]
|
|
|
- }
|
|
|
- },
|
|
|
- created () {
|
|
|
-
|
|
|
+ accompanyTable: [
|
|
|
+ {
|
|
|
+ assistantTeacherSalary: 30,
|
|
|
+ minutes: 25,
|
|
|
+ userId: this.teacherId,
|
|
|
+ mainTeacherSalary: 0
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.__init()
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.__init();
|
|
|
},
|
|
|
- activated () {
|
|
|
- this.pageType = this.$route.query.type
|
|
|
- this.__init()
|
|
|
+ activated() {
|
|
|
+ this.pageType = this.$route.query.type;
|
|
|
+ this.__init();
|
|
|
},
|
|
|
methods: {
|
|
|
- __init () {
|
|
|
+ __init() {
|
|
|
if (this.$route.query.search) {
|
|
|
this.Fsearch = this.$route.query.search;
|
|
|
}
|
|
|
if (this.$route.query.rules) {
|
|
|
- this.Frules = this.$route.query.rules
|
|
|
+ this.Frules = this.$route.query.rules;
|
|
|
}
|
|
|
// 获取课程形态 设置vip课酬
|
|
|
findTeacherDefaultSalary({ userId: this.teacherId }).then(res => {
|
|
|
if (res.code == 200 && res.data.length > 0) {
|
|
|
- let vipData = []
|
|
|
+ let vipData = [];
|
|
|
res.data.forEach(item => {
|
|
|
vipData.push({
|
|
|
offlineClassesSalary: null,
|
|
@@ -237,8 +277,8 @@ export default {
|
|
|
vipGroupCategoryId: item.id,
|
|
|
vipGroupCategoryName: item.name,
|
|
|
userId: this.teacherId
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ });
|
|
|
// VIP课列表
|
|
|
vipGroupSalaryList({
|
|
|
rows: 9999,
|
|
@@ -246,161 +286,182 @@ export default {
|
|
|
search: this.teacherId
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- let rows = res.data.rows
|
|
|
- this.vipListCompare(vipData, rows)
|
|
|
+ let rows = res.data.rows;
|
|
|
+ this.vipListCompare(vipData, rows);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
// 乐团
|
|
|
teacherSalaryList({
|
|
|
rows: 9999,
|
|
|
page: 1,
|
|
|
- teacherId: this.teacherId,
|
|
|
+ teacherId: this.teacherId
|
|
|
// settlementType: 'FIXED_SALARY'
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
// this.teamTable = res.data.rows
|
|
|
- let rows = res.data.rows
|
|
|
- this.teacherSalaryMoney(rows)
|
|
|
+ let rows = res.data.rows;
|
|
|
+ this.teacherSalaryMoney(rows);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
// 网管课
|
|
|
- teacherDefaultPracticeGroupSalary({teacherId:this.teacherId}).then(res=>{
|
|
|
- if(res.code == 200&&res.data){
|
|
|
- this.accompanyTable = res.data;
|
|
|
+ teacherDefaultPracticeGroupSalary({ teacherId: this.teacherId }).then(
|
|
|
+ res => {
|
|
|
+ if (res.code == 200 && res.data.length > 0) {
|
|
|
+ this.accompanyTable = res.data;
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ );
|
|
|
},
|
|
|
- vipListCompare (vipData, rows) { // vip 做对比
|
|
|
- if (!rows) { // 判断是否有数据
|
|
|
- this.vipTable = vipData
|
|
|
- return
|
|
|
+ vipListCompare(vipData, rows) {
|
|
|
+ // vip 做对比
|
|
|
+ if (!rows) {
|
|
|
+ // 判断是否有数据
|
|
|
+ this.vipTable = vipData;
|
|
|
+ return;
|
|
|
}
|
|
|
- let result = []
|
|
|
+ let result = [];
|
|
|
vipData.forEach(item => {
|
|
|
rows.forEach(c => {
|
|
|
if (item.vipGroupCategoryId == c.vipGroupCategoryId) {
|
|
|
- item.checked = true
|
|
|
+ item.checked = true;
|
|
|
result.push({
|
|
|
vipGroupCategoryId: c.vipGroupCategoryId,
|
|
|
offlineClassesSalary: c.offlineClassesSalary,
|
|
|
onlineClassesSalary: c.onlineClassesSalary,
|
|
|
vipGroupCategoryName: c.vipGroupCategoryName,
|
|
|
userId: c.userId
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ });
|
|
|
if (result.length > 0) {
|
|
|
vipData.forEach(item => {
|
|
|
if (!item.checked) {
|
|
|
- result.push(item)
|
|
|
+ result.push(item);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
} else {
|
|
|
- result = vipData
|
|
|
+ result = vipData;
|
|
|
}
|
|
|
- this.vipTable = result
|
|
|
+ this.vipTable = result;
|
|
|
},
|
|
|
|
|
|
- teacherSalaryMoney (rows) {
|
|
|
+ teacherSalaryMoney(rows) {
|
|
|
// 判断是否有数据
|
|
|
- if (!rows || rows.length <= 0) return
|
|
|
- let teamTable = this.teamTable
|
|
|
- let result = []
|
|
|
+ if (!rows || rows.length <= 0) return;
|
|
|
+ let teamTable = this.teamTable;
|
|
|
+ let result = [];
|
|
|
teamTable.forEach(item => {
|
|
|
rows.forEach(c => {
|
|
|
if (item.courseScheduleType == c.courseScheduleType) {
|
|
|
- item.checked = true
|
|
|
+ item.checked = true;
|
|
|
result.push({
|
|
|
mainTeacher30MinSalary: c.mainTeacher30MinSalary,
|
|
|
mainTeacher90MinSalary: c.mainTeacher90MinSalary,
|
|
|
assistantTeacher30MinSalary: c.assistantTeacher30MinSalary,
|
|
|
assistantTeacher90MinSalary: c.assistantTeacher90MinSalary,
|
|
|
courseScheduleType: c.courseScheduleType,
|
|
|
- userId: this.teacherId,
|
|
|
- })
|
|
|
+ userId: this.teacherId
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ });
|
|
|
if (result.length > 0) {
|
|
|
teamTable.forEach(item => {
|
|
|
if (!item.checked) {
|
|
|
- result.push(item)
|
|
|
+ result.push(item);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
} else {
|
|
|
- result = teamTable
|
|
|
+ result = teamTable;
|
|
|
}
|
|
|
- this.teamTable = result
|
|
|
+ this.teamTable = result;
|
|
|
},
|
|
|
- onSave () {
|
|
|
- let teamTable = this.teamTable
|
|
|
- let checkStatus = true
|
|
|
- teamTable.forEach(item => {
|
|
|
- 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
|
|
|
- }
|
|
|
- })
|
|
|
- this.accompanyTable.forEach(item => {
|
|
|
- if (item.mainTeacherSalary < 0) {
|
|
|
- this.$message('输入课酬不能为负数')
|
|
|
- checkStatus = false
|
|
|
- }
|
|
|
+ onSave() {
|
|
|
+ this.$confirm("您确定更改老师课酬", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
- // 判断输入的值是否正确
|
|
|
- if (!this.startDate) {
|
|
|
- this.$message.error('请填写生效日期')
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.$confirm('您确定更改老师课酬', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- teacherSalaryBatchUpset({
|
|
|
- teacherDefaultMusicGroupSalaries: teamTable,
|
|
|
- startDate: this.startDate
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- // 判断输入的值是否正确
|
|
|
- vipGroupSalarySet({
|
|
|
- teacherDefaultVipGroupSalaries: this.vipTable,
|
|
|
- startDate: this.startDate
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
-
|
|
|
- PracticeGroupSalaryUpdate({
|
|
|
- startDate: this.startDate,
|
|
|
- teacherDefaultPracticeGroupSalaries:this.accompanyTable
|
|
|
- }).then(res=>{
|
|
|
- if(res.code == 200){
|
|
|
- this.$message.success('保存成功')
|
|
|
- this.$router.push({ path: '/business/teacherList', query: { rules: this.Frules, search: this.Fsearch } })
|
|
|
- }
|
|
|
- })
|
|
|
- // if(this.$route.query.type == 'create') {
|
|
|
-
|
|
|
- // }
|
|
|
- }
|
|
|
- })
|
|
|
+ .then(() => {
|
|
|
+ let teamTable = this.teamTable;
|
|
|
+ let checkStatus = true;
|
|
|
+ teamTable.forEach(item => {
|
|
|
+ if (
|
|
|
+ item.assistantTeacher30MinSalary < 0 ||
|
|
|
+ item.assistantTeacher90MinSalary < 0 ||
|
|
|
+ item.mainTeacher30MinSalary < 0 ||
|
|
|
+ item.mainTeacher90MinSalary < 0
|
|
|
+ ) {
|
|
|
+ this.$message.error("输入课酬不能为负数");
|
|
|
+ checkStatus = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.vipTable.forEach(item => {
|
|
|
+ if (item.offlineClassesSalary < 0 && item.onlineClassesSalary < 0) {
|
|
|
+ this.$message.error("输入课酬不能为负数");
|
|
|
+ checkStatus = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.accompanyTable.forEach(item => {
|
|
|
+ if (item.mainTeacherSalary < 0) {
|
|
|
+ this.$message.error("输入课酬不能为负数");
|
|
|
+ checkStatus = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!item.mainTeacherSalary.toString()) {
|
|
|
+ this.$message.error("输入网管课课酬");
|
|
|
+ checkStatus = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 判断输入的值是否正确
|
|
|
+ if (!this.startDate) {
|
|
|
+ this.$message.error("请填写生效日期");
|
|
|
+ return;
|
|
|
}
|
|
|
- })
|
|
|
- }).catch(() => { })
|
|
|
+ if(!checkStatus){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ teacherSalaryBatchUpset({
|
|
|
+ teacherDefaultMusicGroupSalaries: teamTable,
|
|
|
+ startDate: this.startDate
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ // 判断输入的值是否正确
|
|
|
+ vipGroupSalarySet({
|
|
|
+ teacherDefaultVipGroupSalaries: this.vipTable,
|
|
|
+ startDate: this.startDate
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ PracticeGroupSalaryUpdate({
|
|
|
+ startDate: this.startDate,
|
|
|
+ teacherDefaultPracticeGroupSalaries: this.accompanyTable
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.$router.push({
|
|
|
+ path: "/business/teacherList",
|
|
|
+ query: { rules: this.Frules, search: this.Fsearch }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // if(this.$route.query.type == 'create') {
|
|
|
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.salarySet {
|