lex-xin 5 年 前
コミット
4f42166b19

+ 2 - 1
src/utils/vueFilter.js

@@ -89,7 +89,8 @@ Vue.filter('coursesType', (value) => {
     PRACTICE: '网管课',
     COMM: '对外课',
     MUSIC: '乐团课',
-    HIGH_ONLINE: '线上基础技能课'
+    HIGH_ONLINE: '线上基础技能课',
+    MUSIC_NETWORK: '乐团网管课'
   }
   return template[value]
 })

+ 39 - 9
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -85,10 +85,24 @@
           <el-table-column label="">
             <template slot-scope="scope">{{ scope.row.courseScheduleType | coursesType }}</template>
           </el-table-column>
+          <el-table-column label="1V1">
+            <template slot-scope="scope">
+              <el-input
+                type="number"
+                :disabled="scope.row.courseScheduleType == 'HIGH_ONLINE'"
+                @mousewheel.native.prevent
+                v-model.trim="scope.row.v1"
+                placeholder="请输入课酬"
+              >
+                <template slot="append">元/节</template>
+              </el-input>
+            </template>
+          </el-table-column>
           <el-table-column label="1V3">
             <template slot-scope="scope">
               <el-input
                 type="number"
+                :disabled="scope.row.courseScheduleType == 'MUSIC_NETWORK'"
                 @mousewheel.native.prevent
                 v-model.trim="scope.row.v3"
                 placeholder="请输入课酬"
@@ -101,6 +115,7 @@
             <template slot-scope="scope">
               <el-input
                 type="number"
+                :disabled="scope.row.courseScheduleType == 'MUSIC_NETWORK'"
                 @mousewheel.native.prevent
                 v-model.trim="scope.row.v4"
                 placeholder="请输入课酬"
@@ -113,6 +128,7 @@
             <template slot-scope="scope">
               <el-input
                 type="number"
+                :disabled="scope.row.courseScheduleType == 'MUSIC_NETWORK'"
                 @mousewheel.native.prevent
                 v-model.trim="scope.row.v5"
                 placeholder="请输入课酬"
@@ -129,7 +145,7 @@
           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="线上课">
+          <!-- <el-table-column label="线上课">
             <template slot-scope="scope">
               <el-input
                 type="number"
@@ -140,7 +156,7 @@
                 <template slot="append">元/45分钟</template>
               </el-input>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column label="线下课">
             <template slot-scope="scope">
               <el-input
@@ -285,6 +301,20 @@ export default {
         {
           courseScheduleType: "HIGH_ONLINE",
           // salaryRuleJson: { 3: 0, 4: 0, 5: 0 },
+          v1: 0,
+          v3: 0,
+          v4: 0,
+          v5: 0,
+          assistantTeacher30MinSalary: 0,
+          assistantTeacher90MinSalary: 0,
+          mainTeacher30MinSalary: 0,
+          mainTeacher90MinSalary: 0,
+          userId: this.teacherId
+        },
+        {
+          courseScheduleType: "MUSIC_NETWORK",
+          // salaryRuleJson: { 3: 0, 4: 0, 5: 0 },
+          v1: 0,
           v3: 0,
           v4: 0,
           v5: 0,
@@ -453,9 +483,10 @@ export default {
               assistantTeacher30MinSalary: c.assistantTeacher30MinSalary,
               assistantTeacher90MinSalary: c.assistantTeacher90MinSalary,
               salaryRuleJson: tempJson,
-              v3: tempJson[3],
-              v4: tempJson[4],
-              v5: tempJson[5],
+              v1: tempJson[1] ? tempJson[1] : 0,
+              v3: tempJson[3] ? tempJson[3] : 0,
+              v4: tempJson[4] ? tempJson[4] : 0,
+              v5: tempJson[5] ? tempJson[5] : 0,
               courseScheduleType: c.courseScheduleType,
               userId: this.teacherId
             });
@@ -497,15 +528,14 @@ export default {
           });
           let temps = []
           this.teamSmallTable.forEach(item => {
-            if(item.v3 < 0 || item.v4 < 0 || item.v5 < 0) {
+            if(item.v1 < 0 || item.v3 < 0 || item.v4 < 0 || item.v5 < 0) {
               this.$message.error("输入课酬不能为负数");
               checkStatus = false;
               return;
             }
-
             temps.push({
-              courseScheduleType: "HIGH_ONLINE",
-              salaryRuleJson: JSON.stringify({ 3: item.v3, 4: item.v4, 5: item.v5 }),
+              courseScheduleType: item.courseScheduleType,
+              salaryRuleJson: JSON.stringify({1: Number(item.v1), 3: Number(item.v3), 4: Number(item.v4), 5: Number(item.v5) }),
               assistantTeacher30MinSalary: 0,
               assistantTeacher90MinSalary: 0,
               mainTeacher30MinSalary: 0,