mo 4 lat temu
rodzic
commit
88016b6953

+ 1 - 1
src/layout/components/Navbar.vue

@@ -169,7 +169,7 @@ export default {
     // 手动加入
     this.toggleSideBar();
     this.username = this.$store.getters.name;
-    this.organNameList = this.organName.split(",");
+    this.organNameList = this.organName.split(",")||[];
   },
   methods: {
     toggleSideBar() {

+ 1 - 1
src/utils/request.js

@@ -117,7 +117,7 @@ service.interceptors.response.use(
       if (data.code == 404) {
         router.push('/404')
       }
-      if (data.code != 200) {
+      if (data.code < 200||data.code >= 300) {
         // Message({
         //   message: data.msg || `请求失败code码为${ data.code }`,
         //   type: 'error',

+ 1 - 1
src/utils/request2.js

@@ -123,7 +123,7 @@ service.interceptors.response.use(
       if (data.code == 404) {
         router.push('/404')
       }
-      if (data.code != 200) {
+      if (data.code < 200||data.code >= 300) {
         // Message({
         //   message: data.msg || `请求失败code码为${ data.code }`,
         //   type: 'error',

+ 26 - 31
src/views/businessManager/orderManager/backMoney.vue

@@ -9,7 +9,7 @@
       <save-form
         :inline="true"
         class="searchForm"
-        ref='searchForm'
+        ref="searchForm"
         :model="searchForm"
         @submit="search"
         @reset="onReSet"
@@ -30,6 +30,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
+        <!--   @change="searchOrderDate" -->
         <el-form-item prop="orderDate">
           <el-date-picker
             style="width: 410px"
@@ -239,27 +240,17 @@ export default {
     // })
     this.$store.dispatch("setBranchs");
     if (this.searchForm?.orderDate?.length < 1) {
-     this.getNow()
+      this.getNow();
     }
 
     this.getList();
   },
   methods: {
-    getNow(){
-       var now = new Date();
-      var startDate = new Date(
-        Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
-      )
-        .toISOString()
-        .slice(0, 10);
-      var endDate = new Date(
-        Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
-      )
-        .toISOString()
-        .slice(0, 10);
-      this.searchForm.orderDate = [];
+    getNow() {
+      let startDate = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
+      this.$set(this.searchForm, "orderDate", []);
+      this.searchForm.orderDate.push(startDate);
       this.searchForm.orderDate.push(startDate);
-      this.searchForm.orderDate.push(endDate);
     },
     search() {
       this.pageInfo.page = 1;
@@ -285,14 +276,16 @@ export default {
       });
     },
     getList() {
+      console.log(this.searchForm.orderDate);
       let { orderDate, ...rest } = this.searchForm;
+      // console.log(orderDate,{...rest})
       let params = {
         ...rest,
         page: this.pageInfo.page,
         rows: this.pageInfo.limit,
         ...getTimes(orderDate, ["startTime", "endTime"]),
       };
-      console.log(params)
+      // console.log(params)
       studentRefundsQueryPage(params).then((res) => {
         let result = res.data;
         if (res.code == 200) {
@@ -301,21 +294,23 @@ export default {
         }
       });
     },
-    searchOrderDate(value) {
-      console.log(value)
-      if (value) {
-        this.searchForm.startTime = value[0] + " 00:00:00";
-        this.searchForm.endTime = value[1] + " 23:59:59";
-      } else {
-        this.searchForm.startTime = null;
-        this.searchForm.endTime = null;
-      }
-    },
+    // searchOrderDate(value) {
+    //   console.log(value)
+    //   if (value) {
+    //     this.searchForm.startTime = value[0];
+    //     this.searchForm.endTime = value[1];
+    //   } else {
+    //     this.searchForm.startTime = null;
+    //     this.searchForm.endTime = null;
+    //   }
+    // },
     onReSet() {
-      this.$refs["searchForm"].resetFields();
-      // console.log(this.searchForm)
-      // this.getNow()
-      this.search()
+
+      console.log(this.searchForm);
+      this.getNow();
+      console.log(this.searchForm);
+        this.$refs["searchForm"].resetFields();
+      this.search();
     },
     onFormClose(formName) {
       // 关闭弹窗重置验证

+ 4 - 3
src/views/resetTeaming/index.vue

@@ -135,13 +135,14 @@ export default {
       }
     },
     onCancel () {
-       this.$store.dispatch('delVisitedViews', this.$route) 
+       this.$store.dispatch('delVisitedViews', this.$route)
       this.$router.push({ path: '/business/teamDetail' })
     },
     getBaseInfo (baseInfo) {
+
       this.baseInfo = baseInfo
-      this.teamName = baseInfo.musicGroup.name
-      this.musicGroupInfo = baseInfo.musicGroup
+      this.teamName = baseInfo?.musicGroup?.name
+      this.musicGroupInfo = baseInfo?.musicGroup
     },
     handleClick (val) {
       // this.activeIndex = val.name

+ 6 - 6
src/views/teacherManager/teacherDetail/index.vue

@@ -5,8 +5,8 @@
                       :content="teacherName"></el-page-header>
       <div>
         <!-- 服务指标:本周 运营指标: -->
-        <el-button v-if="teacherInfo" type="text" @click="gotoOperating">运营指标:<span style="color:red">{{teacherInfo.operatingIndex}}%</span></el-button>
-        <el-button v-if="teacherInfo" type="text" @click="gotoAfterSchool">服务指标(每周):<span style="color:red">{{teacherInfo.serviceIndex}}%</span></el-button>
+        <el-button v-if="teacherInfos" type="text" @click="gotoOperating">运营指标:<span style="color:red">{{teacherInfos.operatingIndex}}%</span></el-button>
+        <el-button v-if="teacherInfos" type="text" @click="gotoAfterSchool">服务指标(每周):<span style="color:red">{{teacherInfos.serviceIndex}}%</span></el-button>
       </div>
     </h2>
     <div class="m-core">
@@ -18,7 +18,7 @@
         lazy
                      v-if="permissionList.teacherInfo"
                      name="0">
-          <teacherInfo v-if="activeName == 0&&teacherInfo" :teacherInfo='teacherInfo'  />
+          <teacherInfo v-if="activeName == 0&&teacherInfos" :teacherInfo='teacherInfos'  />
         </el-tab-pane>
         <el-tab-pane label="乐团课"
         lazy
@@ -143,7 +143,7 @@ export default {
         calendarList: permission("/teacherDetail/calendarList"),
         weeklyCalendar: permission("/teacherDetail/weeklyCalendar"),
       },
-      teacherInfo:null
+      teacherInfos:null
     };
   },
   activated () {
@@ -156,7 +156,7 @@ export default {
     this.activeName = "0";
       teacherGet({ teacherId: this.teacherId }).then(res => {
         if (res.code == 200) {
-         this.teacherInfo = res.data
+         this.teacherInfos = res.data
 
         }
       })
@@ -167,7 +167,7 @@ export default {
       // this.activeStatus[val.name] = true
     },
     onCancel () {
-       this.$store.dispatch('delVisitedViews', this.$route) 
+       this.$store.dispatch('delVisitedViews', this.$route)
       this.$router.push({
         path: "/business/teacherList"
       });

+ 1 - 0
src/views/teacherManager/teacherList.vue

@@ -432,6 +432,7 @@ export default {
       if (type == "update") {
         path = "/business/teacherOperationUpdate";
       }
+      console.log(params)
       //  teacherId=${scope.row.id}&teacherName=${scope.row.realName}
       this.$router.push(
         {

+ 80 - 39
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
-    <el-form :model="form" inline ref="form" label-suffix=": " label-width="130px">
+    <el-form
+      :model="form"
+      inline
+      ref="form"
+      label-suffix=": "
+      label-width="130px"
+    >
       <el-row v-if="classType == 5">
         <el-form-item
           label="班级名称"
@@ -35,10 +41,18 @@
             :value="String(item.id)"
           ></el-option>
         </el-select>
-         <!-- <remote-search :commit="'setTeachers'" v-model="form.coreTeacher"  /> -->
+        <!-- <remote-search :commit="'setTeachers'" v-model="form.coreTeacher"  /> -->
       </el-form-item>
-      <el-form-item label="助教老师" prop="assistant" v-if="activeType!='HIGH'&&activeType!='HIGH_ONLINE'&&activeType!='MUSIC_NETWORK'">
-         <!-- <remote-search :commit="'setTeachers'" v-model="form.assistant"  :multiple='true'/> -->
+      <el-form-item
+        label="助教老师"
+        prop="assistant"
+        v-if="
+          activeType != 'HIGH' &&
+          activeType != 'HIGH_ONLINE' &&
+          activeType != 'MUSIC_NETWORK'
+        "
+      >
+        <!-- <remote-search :commit="'setTeachers'" v-model="form.assistant"  :multiple='true'/> -->
         <el-select
           v-model.trim="form.assistant"
           placeholder="请选择助教老师"
@@ -54,16 +68,22 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item v-if="!!Object.keys(allClasss).length" style="display: block;" label="排课类型" label-width="88px">
+      <el-form-item
+        v-if="!!Object.keys(allClasss).length"
+        style="display: block"
+        label="排课类型"
+        label-width="88px"
+      >
         <el-tag
           class="tag"
           :effect="form.classs[key] ? 'dark' : 'plain'"
           v-for="(item, key) in allClasss"
           :key="key"
           @click="changeTag(key)"
-        >{{courseTypeListByName[key]}}</el-tag>
+          >{{ courseTypeListByName[key] }}</el-tag
+        >
       </el-form-item>
-      <empty v-if="isEmpty" desc="暂无可排课时长"/>
+      <empty v-if="isEmpty" desc="暂无可排课时长" />
       <el-collapse v-model="collapses" @change="collapseChange">
         <el-collapse-item
           v-for="(item, key, index) in form.classs"
@@ -88,7 +108,9 @@
     </el-form>
     <div slot="footer" class="dialog-footer" v-if="classType != 5">
       <el-button @click="$listeners.close">取 消</el-button>
-      <el-button type="primary" :disabled="isEmpty" @click="submit">确 定</el-button>
+      <el-button type="primary" :disabled="isEmpty" @click="submit"
+        >确 定</el-button
+      >
     </div>
   </div>
 </template>
@@ -147,7 +169,7 @@ export default {
     "selectPrices",
     "classCouresTimeList",
     "teacherList",
-    "cooperationList"
+    "cooperationList",
   ],
   components: {
     courseItem,
@@ -246,7 +268,6 @@ export default {
       if (this.classType == 5) {
         // res = await findClassCourseMinute(this.classIdList);
         res.data = this.classCouresTimeList;
-
       } else {
         try {
           res = await getMusicCourseSettingsWithStudents({
@@ -257,38 +278,37 @@ export default {
         } catch (error) {
           console.log(error);
         }
-        }
-        // console.log(res);
-        if (Object.keys(res).length <= 0) return;
-        this.musicCourseSettings = res.data;
+      }
+      // console.log(res);
+      if (Object.keys(res).length <= 0) return;
+      this.musicCourseSettings = res.data;
 
-        const classs = {};
-        for (const item of this.courseTypeList) {
-          const key = item.value;
-          if (res.data[key]) {
-            classs[key] = {
-              courseTotalMinuties: res.data[key],
-              cycle: [
-                {
-                  time: this.selectPrices ? this.selectPrices[key] : undefined,
-                },
-              ],
-            };
-          }
+      const classs = {};
+      for (const item of this.courseTypeList) {
+        const key = item.value;
+        if (res.data[key]) {
+          classs[key] = {
+            courseTotalMinuties: res.data[key],
+            cycle: [
+              {
+                time: this.selectPrices ? this.selectPrices[key] : undefined,
+              },
+            ],
+          };
         }
-        this.allClasss = {...classs}
-        this.$set(this.form, "classs", classs);
-        // this.courseTimes = courseTimes
-
+      }
+      this.allClasss = { ...classs };
+      this.$set(this.form, "classs", classs);
+      // this.courseTimes = courseTimes
     },
     changeTag(key) {
-      const clas = {...this.form.classs}
+      const clas = { ...this.form.classs };
       if (clas[key]) {
-        delete clas[key]
+        delete clas[key];
       } else {
-        clas[key] = this.allClasss[key]
+        clas[key] = this.allClasss[key];
       }
-      this.$set(this.form, 'classs', clas)
+      this.$set(this.form, "classs", clas);
     },
     submit() {
       this.$refs.form.validate(async (valid) => {
@@ -325,7 +345,27 @@ export default {
           }
           try {
             if (this.detail) {
-              await classGroupUpdate(list);
+              let result = await classGroupUpdate(list);
+              if (result.code == 206) {
+                this.$confirm(`当前课程课酬预计为0,是否继续`, "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                })
+                  .then(async () => {
+                    // obj.allowZeroSalary = true;
+                    list.forEach((item) => {
+                      item.allowZeroSalary = true;
+                    });
+                    await classGroupUpdate(list);
+                    this.$listeners.submited();
+                    this.$listeners.close();
+                  })
+                  .catch(() => {
+                    return;
+                  });
+                return;
+              }
               this.$message.success("排课修改成功");
             } else {
               if (this.classType == 1) {
@@ -347,9 +387,10 @@ export default {
                 obj.classGroupIds = this.classIdList;
                 obj.studentIds = this.studentSubmitedData.seleched;
                 obj.classGroupStudents = this.classGroupStudents;
-                obj.classCourseMinuteMap  = this.selectPrices
+                obj.classCourseMinuteMap = this.selectPrices;
                 await mergeClassSplitClassAffirm(obj);
-                let grend = this.$parent.$parent.$parent.$parent.$parent.$parent.$parent;
+                let grend = this.$parent.$parent.$parent.$parent.$parent.$parent
+                  .$parent;
                 grend.closeStudentReset();
                 grend.getList();
                 return;
@@ -387,7 +428,7 @@ export default {
     font-size: 14px;
   }
 }
-.tag{
+.tag {
   margin-right: 5px;
   cursor: pointer;
 }

+ 51 - 52
src/views/teamDetail/components/resetClass.vue

@@ -125,15 +125,15 @@
                   @click="classAdjustment(scope.row)"
                   >排课</el-button
                 >
-                   <el-button
-                    type="text"
-                    v-if="
-                      scope.row.studentNum == '0' ||
-                      scope.row.totalClassTimes == '0'
-                    "
-                      @click="removeClass(scope)"
-                    >删除</el-button
-                  >
+                <el-button
+                  type="text"
+                  v-if="
+                    scope.row.studentNum == '0' ||
+                    scope.row.totalClassTimes == '0'
+                  "
+                  @click="removeClass(scope)"
+                  >删除</el-button
+                >
                 <!--<el-button type="text"
                 @click="recourse(scope.row)">重新排课</el-button>-->
                 <!-- <el-popover
@@ -503,12 +503,10 @@
             ></el-option>
           </el-select>
         </el-form-item>
-
-
       </el-form>
       <div slot="footer" class="dialog-footer question">
         <div>
-           <el-popover placement="right" width="500" trigger="click">
+          <el-popover placement="right" width="500" trigger="click">
             <div class="popoverWrap">
               <p>线上基础技能班规则:</p>
               <p>班级数量:</p>
@@ -532,9 +530,8 @@
         </div>
         <div>
           <el-button @click="newClassVisible = false">取 消</el-button>
-        <el-button type="primary" @click="newClassHight">确 定</el-button>
+          <el-button type="primary" @click="newClassHight">确 定</el-button>
         </div>
-
       </div>
     </el-dialog>
     <el-dialog
@@ -828,11 +825,14 @@ export default {
       // 根据分部id和缴费类型获取 可选课程类型
     },
     resetTeacher(row) {
-      this.teacherVisible = true
-      this.teacherDetail = row
+      this.teacherVisible = true;
+      this.teacherDetail = row;
     },
     teacherSubmited(data) {
-      const obj = this.getSubmitData(data, {classGroupId: this.teacherDetail?.id, courseAddType: 'onlyUpdateTeacher'})
+      const obj = this.getSubmitData(data, {
+        classGroupId: this.teacherDetail?.id,
+        courseAddType: "onlyUpdateTeacher",
+      });
       classGroupUpdate(obj).then((res) => {
         if (res.code == 200) {
           this.$message.success("修改成功");
@@ -842,20 +842,22 @@ export default {
       });
     },
     getSubmitData(data, more = {}) {
-      return [{
-        type: this.activeType,
-        classGroupName: data?.name,
-        musicGroupId: this.teamid,
-        classGroupTeacherMapperList: formatClassGroupTeacherMapperList(
-          data.coreTeacher,
-          data.assistant
-        ),
-        students: data?.seleched,
-        ...more
-      }]
+      return [
+        {
+          type: this.activeType,
+          classGroupName: data?.name,
+          musicGroupId: this.teamid,
+          classGroupTeacherMapperList: formatClassGroupTeacherMapperList(
+            data.coreTeacher,
+            data.assistant
+          ),
+          students: data?.seleched,
+          ...more,
+        },
+      ];
     },
     async submitClass(data) {
-      const list = this.getSubmitData(data, {onlyCreateClassGroup: true});
+      const list = this.getSubmitData(data, { onlyCreateClassGroup: true });
       try {
         if (this.classType == 1) {
           // 0新建班级 2 3 4新增班级修改
@@ -869,15 +871,15 @@ export default {
           await revisionAddClassGroup(list);
           this.$message.success("提交成功");
         }
-        this.studentVisible = false
-        this.getList()
+        this.studentVisible = false;
+        this.getList();
       } catch (error) {
         console.log(error);
       }
     },
     studentSubmited(data) {
       if (!this.isOnlyChangeUser) {
-        this.submitClass(data)
+        this.submitClass(data);
         // this.studentSubmitedData = data;
         // this.infoVisible = true;
       } else {
@@ -1037,26 +1039,23 @@ export default {
     },
     // 删除班级
     removeClass(scope) {
-         this.$confirm("是否确定删除该班级?", "提示", {
-      confirmButtonText: "确定",
-      cancelButtonText: "取消",
-      type: "warning"
-    })
-      .then(() => {
-        removeSingleClass({ classGroupId: scope.row.id })
-        .then((res) => {
-          if (res.code == 200) {
-            this.$message.success("删除成功");
-            // 重新请求列表
-            this.getList(this.activeMixClass);
-          }
-        })
-        .catch((res) => {
-
-        });
+      this.$confirm("是否确定删除该班级?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
       })
-      .catch(() => { });
-
+        .then(() => {
+          removeSingleClass({ classGroupId: scope.row.id })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$message.success("删除成功");
+                // 重新请求列表
+                this.getList(this.activeMixClass);
+              }
+            })
+            .catch((res) => {});
+        })
+        .catch(() => {});
     },
     // 修改班级
     resetClass(row) {
@@ -1704,7 +1703,7 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.dialog-footer.question{
+.dialog-footer.question {
   display: flex;
   flex-direction: row;
   justify-content: space-between;

+ 8 - 1
src/views/workBenchManager/payAppeal.vue

@@ -144,10 +144,17 @@
               <div>
                 <el-button
                   type="text"
-                  v-if="permission('teacherAttendance/operation')"
+                  v-if="permission('teacherAttendance/operation')&&scope.row.complaintsStatusEnum == 2"
                   @click="lookDetail(scope.row)"
                   >操作</el-button
                 >
+                 <el-button
+                  type="text"
+                  v-if="permission('teacherAttendance/operation')&&scope.row.complaintsStatusEnum != 2"
+                  @click="lookDetail(scope.row)"
+                  >查看</el-button
+                >
+                <!-- complaintsStatusEnum -->
               </div>
             </template>
           </el-table-column>