Browse Source

修复BUG

1
mo 3 years ago
parent
commit
70fdfa1a10

+ 24 - 5
src/views/accompanyManager/accompanyList.vue

@@ -309,7 +309,7 @@
         />
       </div>
     </div>
-    <el-dialog title="关闭课程组" width="400px" :visible.sync="closeVisible">
+    <!-- <el-dialog title="关闭课程组" width="400px" :visible.sync="closeVisible">
       <el-form
         :model="closeForm"
         ref="closeForm"
@@ -333,7 +333,7 @@
         <el-button @click="closeVisible = false">取 消</el-button>
         <el-button type="primary" @click="submieCloseCrouse">确 定</el-button>
       </div>
-    </el-dialog>
+    </el-dialog> -->
     <el-dialog title="备注" width="400px" :visible.sync="memoVisible">
       <el-input
         type="textarea"
@@ -351,7 +351,7 @@
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
-
+import { Searchs } from "@/helpers";
 import { permission } from "@/utils/directivePage";
 import cleanDeep from "clean-deep";
 import { commGroupStatus, practiceGroupType } from "@/utils/searchArray";
@@ -436,6 +436,7 @@ export default {
         practiceGroupType: null,
         groupStatus: null,
       };
+      new Searchs().removeByKey('accompanyList');
       this.search();
     },
     onStudentExport() {
@@ -598,8 +599,26 @@ export default {
       });
     },
     closeCrouse(row) {
-      this.activeRow = row;
-      this.closeVisible = true;
+          this.activeRow = row;
+       this.$confirm("请确认是否关闭课程组,关闭后不予退费", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(res=>{
+        cancelGroup({
+        groupId: row.id,
+        groupType: "PRACTICE",
+        refundAmount: null,
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message.success("关闭成功");
+          this.getList();
+          // this.closeVisible = false;
+        }
+      });
+      }).catch(()=>{})
+
+      // this.closeVisible = true;
     },
     courseVisibleClose() {
       // 关闭弹窗前

+ 18 - 9
src/views/buildVip/index.vue

@@ -415,14 +415,14 @@
               <template slot="append">%</template>
             </el-input>
           </el-form-item>
-          <el-form-item v-if="hasOnline" label="线上课课酬">
+          <el-form-item v-if="courseType == 'PRACTICE'" label="网管课酬">
             <el-input v-model.trim="rightForm.onlineCourse" :disabled="true">
               <template slot="append" v-if="!isMusicTheory">元/节</template>
               <template slot="append" v-else>元/人</template>
             </el-input>
             <!--  || onlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
           </el-form-item>
-          <el-form-item v-if="hasOffline" label="线下课课酬">
+          <el-form-item v-else label="VIP课课酬">
             <el-input v-model.trim="rightForm.offlineCourse" :disabled="true">
               <template slot="append" v-if="!isMusicTheory">元/节</template>
               <template slot="append" v-else>元/人</template>
@@ -668,6 +668,7 @@ import {
   findTeacherByOrganId,
   getSubject,
   findEducationUsers,
+  getPracticeApplySubjects,
 } from "@/api/buildTeam";
 import {
   vipGroupCategory,
@@ -1112,13 +1113,21 @@ export default {
       }
       // 获取所有科目的接口
       await this.$store.dispatch("setBranchs");
-      getSubject({
-        tenantId: 1,
-      }).then((res) => {
-        if (res.code == 200) {
-          this.subjectList = res.data;
-        }
-      });
+      if (this.courseType == "PRACTICE") {
+        getPracticeApplySubjects().then((res) => {
+          if (res.code == 200) {
+            this.subjectList = res.data;
+          }
+        });
+      } else {
+        getSubject({
+          tenantId: 1,
+        }).then((res) => {
+          if (res.code == 200) {
+            this.subjectList = res.data;
+          }
+        });
+      }
 
       //  获取乐团主管
 

+ 1 - 1
src/views/categroyManager/modals/payInfo.vue

@@ -251,7 +251,7 @@
           label="折扣值"
           :rules="[
             { required: true, message: '请输入折扣值', trigger: 'blur' },
-            { pattern:/^(?:[1-9]?\d|100)$/, message: '请输入正确的则扣' }
+            { pattern:/^100$|^(\d|[1-9]\d)(\.\d{1,8})*$/, message: '请输入正确的折扣' }
           ]"
         >
           <el-input