|  | @@ -3,9 +3,6 @@
 | 
	
		
			
				|  |  |      <!-- <h4>单次课次参考时长:30min</h4> -->
 | 
	
		
			
				|  |  |      <div class="tableList">
 | 
	
		
			
				|  |  |        <div class="left">
 | 
	
		
			
				|  |  | -        <h3>
 | 
	
		
			
				|  |  | -          <el-button @click="onMusicGroupSave2()" type="text">保存</el-button>
 | 
	
		
			
				|  |  | -        </h3>
 | 
	
		
			
				|  |  |          <el-table :data='teamTable'
 | 
	
		
			
				|  |  |                    :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  |            <el-table-column label="乐团课课酬课时结算">
 | 
	
	
		
			
				|  | @@ -35,9 +32,7 @@
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  |          </el-table>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        <h3>单次课次参考时长:30min
 | 
	
		
			
				|  |  | -          <el-button @click="onVIPSave()" type="text">保存</el-button>
 | 
	
		
			
				|  |  | -        </h3>
 | 
	
		
			
				|  |  | +        <h3>单次课次参考时长:30min</h3>
 | 
	
		
			
				|  |  |          <el-table :data='vipTable' style="width: 70%"
 | 
	
		
			
				|  |  |                    :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  |            <el-table-column label="VIP课课酬参考值" prop="vipGroupCategoryName">
 | 
	
	
		
			
				|  | @@ -53,6 +48,10 @@
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  |          </el-table>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <div style="padding-top: 10px;">
 | 
	
		
			
				|  |  | +          <el-button @click="onSave()" type="primary">保存</el-button>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
	
		
			
				|  | @@ -62,9 +61,10 @@ import { vipGroupSalaryList, vipGroupSalarySet, teacherSalaryList, teacherSalary
 | 
	
		
			
				|  |  |  import { sysConfigList } from '@/api/generalSettings'
 | 
	
		
			
				|  |  |  import { vipGroupCategory } from '@/api/vipSeting'
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | +  props: ['teacherId'],
 | 
	
		
			
				|  |  |    data () {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -      teacherId: this.$route.query.teacherId,
 | 
	
		
			
				|  |  | +      // teacherId: this.teacherId ? this.teacherId : this.$route.query.teacherId,
 | 
	
		
			
				|  |  |        teamTable: [{
 | 
	
		
			
				|  |  |          assistantTeacher30MinSalary: 0,
 | 
	
		
			
				|  |  |          assistantTeacher90MinSalary: 0,
 | 
	
	
		
			
				|  | @@ -122,6 +122,7 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
		
			
				|  |  | +    console.log(this.teacherId)
 | 
	
		
			
				|  |  |      this.__init()
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
	
		
			
				|  | @@ -129,15 +130,11 @@ export default {
 | 
	
		
			
				|  |  |        // 获取课程形态 设置vip课酬
 | 
	
		
			
				|  |  |        vipGroupCategory({ organId: this.$store.getters.organ }).then(res => {
 | 
	
		
			
				|  |  |          if (res.code == 200 && res.data.length > 0) {
 | 
	
		
			
				|  |  | -          // this.vipList = res.data
 | 
	
		
			
				|  |  | -          // let vipData = res.data
 | 
	
		
			
				|  |  |            let vipData = []
 | 
	
		
			
				|  |  |            res.data.forEach(item => {
 | 
	
		
			
				|  |  |              vipData.push({
 | 
	
		
			
				|  |  |                offlineClassesSalary: null,
 | 
	
		
			
				|  |  | -              // offlineClassesSalary: item.offlineClassesUnitPrice,
 | 
	
		
			
				|  |  |                onlineClassesSalary: null,
 | 
	
		
			
				|  |  | -              // onlineClassesSalary: item.onlineClassesUnitPrice,
 | 
	
		
			
				|  |  |                vipGroupCategoryId: item.id,
 | 
	
		
			
				|  |  |                vipGroupCategoryName: item.name,
 | 
	
		
			
				|  |  |                userId: this.teacherId
 | 
	
	
		
			
				|  | @@ -234,26 +231,7 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.teamTable = result
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onVIPSave() { // vip保存
 | 
	
		
			
				|  |  | -      let checkStatus = true
 | 
	
		
			
				|  |  | -      this.vipTable.forEach(item => {
 | 
	
		
			
				|  |  | -        if(item.offlineClassesSalary < 0 && item.onlineClassesSalary < 0) {
 | 
	
		
			
				|  |  | -          this.$message('输入课酬不能为负数')
 | 
	
		
			
				|  |  | -          checkStatus = false
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -      // 判断输入的值是否正确
 | 
	
		
			
				|  |  | -      if(!checkStatus) return false
 | 
	
		
			
				|  |  | -      vipGroupSalarySet(this.vipTable).then(res => {
 | 
	
		
			
				|  |  | -        if(res.code == 200) {
 | 
	
		
			
				|  |  | -          this.$message({
 | 
	
		
			
				|  |  | -            message: '保存成功',
 | 
	
		
			
				|  |  | -            type: 'success'
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    onMusicGroupSave2() {
 | 
	
		
			
				|  |  | +    onSave() {
 | 
	
		
			
				|  |  |        let teamTable = this.teamTable
 | 
	
		
			
				|  |  |        let checkStatus = true
 | 
	
		
			
				|  |  |        teamTable.forEach(item => {
 | 
	
	
		
			
				|  | @@ -267,9 +245,21 @@ export default {
 | 
	
		
			
				|  |  |        if(!checkStatus) return false
 | 
	
		
			
				|  |  |        teacherSalaryBatchUpset(teamTable).then(res => {
 | 
	
		
			
				|  |  |          if(res.code == 200) {
 | 
	
		
			
				|  |  | -          this.$message({
 | 
	
		
			
				|  |  | -            message: '保存成功',
 | 
	
		
			
				|  |  | -            type: 'success'
 | 
	
		
			
				|  |  | +          this.vipTable.forEach(item => {
 | 
	
		
			
				|  |  | +            if(item.offlineClassesSalary < 0 && item.onlineClassesSalary < 0) {
 | 
	
		
			
				|  |  | +              this.$message('输入课酬不能为负数')
 | 
	
		
			
				|  |  | +              checkStatus = false
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          // 判断输入的值是否正确
 | 
	
		
			
				|  |  | +          if(!checkStatus) return false
 | 
	
		
			
				|  |  | +          vipGroupSalarySet(this.vipTable).then(res => {
 | 
	
		
			
				|  |  | +            if(res.code == 200) {
 | 
	
		
			
				|  |  | +              this.$message({
 | 
	
		
			
				|  |  | +                message: '保存成功',
 | 
	
		
			
				|  |  | +                type: 'success'
 | 
	
		
			
				|  |  | +              })
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 |