Browse Source

提交测试

11
mo 4 years ago
parent
commit
dfe92ef830

+ 4 - 0
.gitignore

@@ -21,4 +21,8 @@ debug.log
 
 *.log
 debug.log
+<<<<<<< HEAD
 debug.log
+=======
+*.log
+>>>>>>> 01/21VipReset

+ 1 - 1
src/App.vue

@@ -127,7 +127,7 @@ input[type="number"] {
 }
 .newBand {
   min-width: 100px;
-  max-width: 120px;
+  max-width: 130px;
   padding: 0 10px;
   height: 36px;
   line-height: 36px;

+ 40 - 16
src/views/buildVip/index.vue

@@ -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;

+ 10 - 5
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -151,13 +151,16 @@
           </el-table-column> -->
           <el-table-column label="">
             <template slot-scope="scope">
-              <el-input type="number"
+              <div>
+                <el-input type="number"
                         @mousewheel.native.prevent
                         v-model.trim="scope.row.offlineClassesSalary"
                         placeholder="请输入内容">
-                <template slot="append" v-if="!scope.row.musicTheory">元/节</template>
-              <template slot="append" v-else>元/人</template>
+                <template slot="append" v-if="scope.row.musicTheory"> 元/人</template>
+                <template slot="append" v-else>节/人</template>
               </el-input>
+              </div>
+
             </template>
           </el-table-column>
         </el-table>
@@ -360,7 +363,8 @@ export default {
               onlineClassesSalary: null,
               vipGroupCategoryId: item.id,
               vipGroupCategoryName: item.name,
-              userId: this.teacherId
+              userId: this.teacherId,
+               musicTheory:item.musicTheory
             });
           });
           // VIP课列表
@@ -415,7 +419,8 @@ export default {
               offlineClassesSalary: c.offlineClassesSalary,
               onlineClassesSalary: c.onlineClassesSalary,
               vipGroupCategoryName: c.vipGroupCategoryName,
-              userId: c.userId
+              userId: c.userId,
+              musicTheory:c.musicTheory
             });
           }
         });

+ 6 - 2
src/views/vipClass/vipDetail/components/vipStudentList.vue

@@ -153,6 +153,7 @@
               style="width: 90% !important"
               class="number-input"
               v-model="scope.row.onlineClassesUnitPrice"
+              :disabled='!vipDetail.musicTheory'
               :controls="false"
               :min="0"
               placeholder="线上课单价"
@@ -167,6 +168,7 @@
               style="width: 90% !important"
               class="number-input"
               v-model="scope.row.offlineClassesUnitPrice"
+              :disabled='!vipDetail.musicTheory'
               :controls="false"
               :min="0"
               placeholder="线下课单价"
@@ -554,8 +556,10 @@ export default {
       }
     },
     getList() {
+      console.log(this.id)
       let search = this.maskForm.search || null;
       getHaveCourseBalanceStudents({
+        vipGroupId:this.id,
         organId: null,
         page: this.rules.page,
         rows: this.rules.limit,
@@ -565,8 +569,8 @@ export default {
           this.rules.total = res.data.total;
           this.maskStudentList = res.data.rows;
           this.maskStudentList.forEach(stu=>{
-            stu.offlineClassesUnitPrice = this.vipDetail?.offlineClassesUnitPrice
-            stu.onlineClassesUnitPrice =this.vipDetail?.onlineClassesUnitPrice
+            stu.offlineClassesUnitPrice?stu.offlineClassesUnitPrice:stu.offlineClassesUnitPrice = this.vipDetail?.offlineClassesUnitPrice
+            stu.onlineClassesUnitPrice?stu.onlineClassesUnitPrice:stu.onlineClassesUnitPrice =this.vipDetail?.onlineClassesUnitPrice
           })
           this.maskVisible = true;
         }