Browse Source

Merge remote-tracking branch 'origin/12/17submitBaseInfo' into 11/24SAAS

lex-xin 3 years ago
parent
commit
e354a2c65a
2 changed files with 81 additions and 73 deletions
  1. 2 2
      src/utils/date.js
  2. 79 71
      src/views/accompanyManager/accompanyList.vue

+ 2 - 2
src/utils/date.js

@@ -87,10 +87,10 @@ export function diffTimerFormMinute(classDate, startTime, endTime) {
 
 export function addTimerFormMinute(classDate, startTime, time) {
   let endTime = dayjs(classDate + ' ' + startTime).add(time, 'minute')
-  if (!dayjs(classDate + ' ' + "23:59").isBefore(endTime)) {
+  if (!dayjs(classDate + ' ' + "21:00").isBefore(endTime)) {
     return endTime.format('HH:mm')
   } else {
-    $message.error('课程时间无法跨天请重新设置开始时间')
+    $message.error('课程结束时间不可超过21:00点,请重新设置开始时间')
     return ''
   }
 

+ 79 - 71
src/views/accompanyManager/accompanyList.vue

@@ -3,8 +3,10 @@
     <!-- <h2>
       <div class="squrt"></div>网管课列表
     </h2>-->
-    <div class="topWrap">
-      <!-- <div
+
+    <div class="m-core">
+      <div class="topWrap">
+        <!-- <div
         class="newBand"
         v-permission="'/newPractice'"
         @click="newPractice"
@@ -28,32 +30,31 @@
       >
         网管课导出
       </div> -->
-      <el-button
-        v-permission="'/newPractice'"
-        @click="newPractice"
-        type="primary"
-        style="margin-bottom:20px"
-      >
-        新建网管课
-      </el-button>
-      <el-button
-        v-permission="'export/practiceGroup'"
-        @click="onStudentExport"
-        type="primary"
-        style="margin-bottom:20px"
-      >
-        续费提醒导出
-      </el-button>
-      <el-button
-        v-permission="'export/practiceGroupList'"
-        @click="onPracticeExport"
-        type="primary"
-        style="margin-bottom:20px"
-      >
-        网管课导出
-      </el-button>
-    </div>
-    <div class="m-core">
+        <el-button
+          v-permission="'/newPractice'"
+          @click="newPractice"
+          type="primary"
+          style="margin-bottom: 20px"
+        >
+          新建网管课
+        </el-button>
+        <el-button
+          v-permission="'export/practiceGroup'"
+          @click="onStudentExport"
+          type="primary"
+          style="margin-bottom: 20px"
+        >
+          续费提醒导出
+        </el-button>
+        <el-button
+          v-permission="'export/practiceGroupList'"
+          @click="onPracticeExport"
+          type="primary"
+          style="margin-bottom: 20px"
+        >
+          网管课导出
+        </el-button>
+      </div>
       <save-form
         :inline="true"
         class="searchForm"
@@ -179,19 +180,19 @@
               <copy-text>{{ scope.row.name }}</copy-text>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="type"
-            label="课程组类型"
-
-          >
+          <el-table-column align="center" prop="type" label="课程组类型">
             <template slot-scope="scope">
               <div>
                 <p>{{ scope.row.type | comType }}</p>
               </div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="organName" label="所属分部"  width="100px">
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="所属分部"
+            width="100px"
+          >
             <template slot-scope="scope">
               <copy-text>{{ scope.row.organName }}</copy-text>
             </template>
@@ -202,7 +203,12 @@
             prop="educationalTeacherName"
             label="乐团主管"
           ></el-table-column>
-          <el-table-column align="center" prop="teacherName" label="指导老师" width="120px">
+          <el-table-column
+            align="center"
+            prop="teacherName"
+            label="指导老师"
+            width="120px"
+          >
             <template slot-scope="scope">
               <copy-text>{{ scope.row.teacherName }}</copy-text>
             </template>
@@ -365,7 +371,9 @@
             v-model.trim="closeForm.money"
           ></el-input>
         </el-form-item>
-        <p style="color:red"  v-if="closeForm.isBack">退费金额暂不进入账户余额</p>
+        <p style="color: red" v-if="closeForm.isBack">
+          退费金额暂不进入账户余额
+        </p>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="closeVisible = false">取 消</el-button>
@@ -492,7 +500,7 @@ export default {
         method: "get",
         headers: {
           Authorization: getToken(),
-          tenantId: getTenantId()
+          tenantId: getTenantId(),
         },
         params: data,
         url,
@@ -518,14 +526,14 @@ export default {
                 // 判断是否报错
                 if (res.indexOf("code") != -1) {
                   let json = JSON.parse(res);
-                  if(json.code == 403) {
-                    this.$message.error(`登录过期,请重新登录!`)
+                  if (json.code == 403) {
+                    this.$message.error(`登录过期,请重新登录!`);
                     setTimeout(() => {
-                      this.$store.dispatch('user/resetToken').then(() => {
-                        location.reload()
-                      })
+                      this.$store.dispatch("user/resetToken").then(() => {
+                        location.reload();
+                      });
                     }, 1000);
-                    return
+                    return;
                   }
                   this.$message.error(json.msg);
                 } else {
@@ -564,7 +572,7 @@ export default {
         method: "get",
         headers: {
           Authorization: getToken(),
-          tenantId: getTenantId()
+          tenantId: getTenantId(),
         },
         params: cleanDeep(obj),
         url,
@@ -588,16 +596,16 @@ export default {
               let text = new Response(blob).text();
               text.then((res) => {
                 // 判断是否报错
-                if(res.indexOf("code") != -1) {
+                if (res.indexOf("code") != -1) {
                   let json = JSON.parse(res);
-                  if(json.code == 403) {
-                    this.$message.error(`登录过期,请重新登录!`)
+                  if (json.code == 403) {
+                    this.$message.error(`登录过期,请重新登录!`);
                     setTimeout(() => {
-                      this.$store.dispatch('user/resetToken').then(() => {
-                        location.reload()
-                      })
+                      this.$store.dispatch("user/resetToken").then(() => {
+                        location.reload();
+                      });
                     }, 1000);
-                    return
+                    return;
                   }
                   this.$message.error(json.msg);
                 } else {
@@ -723,25 +731,25 @@ export default {
           this.getList();
           this.closeVisible = false;
         }
-         if (res.code == 206) {
-              this.$confirm(res.msg, "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-              }).then(() => {
-                cancelGroup({
-                  groupId: this.activeRow.id,
-                  groupType: "PRACTICE",
-                  refundAmount: this.closeForm.money,
-                  confirmReturnActivityGive: true,
-                }).then((res) => {
-                  if (res.code == 200) {
-                    this.$message.success("关闭成功");
-                    this.getList();
-                      this.closeVisible = false;
-                  }
-                });
-              });
-            }
+        if (res.code == 206) {
+          this.$confirm(res.msg, "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+          }).then(() => {
+            cancelGroup({
+              groupId: this.activeRow.id,
+              groupType: "PRACTICE",
+              refundAmount: this.closeForm.money,
+              confirmReturnActivityGive: true,
+            }).then((res) => {
+              if (res.code == 200) {
+                this.$message.success("关闭成功");
+                this.getList();
+                this.closeVisible = false;
+              }
+            });
+          });
+        }
       });
     },
     resetMemo(row) {