lex hai 1 ano
pai
achega
fee775c374

+ 33 - 0
src/views/studentManager/studentGroupPractice.vue

@@ -62,6 +62,14 @@
         >取消资格</el-button
       >
 
+      <el-button
+        type="primary"
+        style="margin-bottom: 20px;margin-left: 12px;"
+        @click="exportList"
+        v-permission="'export/now5243'"
+        >导出</el-button
+      >
+
       <div class="tableWrap">
         <el-table
           style="width: 100%"
@@ -204,6 +212,7 @@ import { queryInactive, cancelInactive } from "@/views/resetTeaming/api";
 import giveMemberModel from "@/views/resetTeaming/modals/giveMemberModel";
 import Tooltip from "@/components/Tooltip";
 import { getTimeFormat } from "@/utils";
+import { Export } from "@/utils/downLoadFile";
 export default {
   components: { pagination, giveMemberModel, Tooltip },
   data() {
@@ -298,6 +307,30 @@ export default {
       });
       this.reson.ids = ids.join(",");
     },
+    exportList() {
+      let { operationDate, ...rest } = this.searchForm;
+      let params = {
+        ...rest,
+        ...getTimeFormat(
+          operationDate,
+          ["operateStartTime", "operateEndTime"],
+          "YYYY-MM-DD"
+        )
+      };
+      Export(
+        this,
+        {
+          url: "/api-web/export/now",
+          fileName: "待激活云教练.xls",
+          method: "post",
+          params: {
+            exportEnum: "EXPORT_CLOUD_TEACHER_ORDER_INACTIVE",
+            queryInfo: params
+          }
+        },
+        "您确定导出待激活云教练?"
+      );
+    },
     async submitDateReset() {
       this.$refs["cancelCloudForm"].validate(async flag => {
         if (flag) {

+ 83 - 45
src/views/withdrawal-application/index.vue

@@ -45,7 +45,11 @@
         </el-form-item>
 
         <el-form-item>
-          <el-select v-model="searchForm.status" clearable placeholder="请选择状态">
+          <el-select
+            v-model="searchForm.status"
+            clearable
+            placeholder="请选择状态"
+          >
             <el-option
               v-for="(item, key) in withdrawalStatus"
               :key="key"
@@ -86,19 +90,27 @@
         :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
         @selection-change="handleSelectionChange"
       >
-        <el-table-column type="selection" width="55" :selectable="checkSeleabled">
+        <el-table-column
+          type="selection"
+          width="55"
+          :selectable="checkSeleabled"
+        >
         </el-table-column>
         <el-table-column prop="userId" label="学员编号">
           <copy-text slot-scope="scope">{{ scope.row.userId }}</copy-text>
         </el-table-column>
         <el-table-column prop="userId" label="学员姓名">
-          <copy-text slot-scope="scope">{{ scope.row.user.username }}</copy-text>
+          <copy-text slot-scope="scope">{{
+            scope.row.user.username
+          }}</copy-text>
         </el-table-column>
         <el-table-column prop="organName" label="所属分部">
           <div slot-scope="scope">{{ scope.row.musicGroup.organName }}</div>
         </el-table-column>
         <el-table-column prop="musicGroupId" label="所属乐团">
-          <copy-text slot-scope="scope">{{ scope.row.musicGroup.name }}</copy-text>
+          <copy-text slot-scope="scope">{{
+            scope.row.musicGroup.name
+          }}</copy-text>
         </el-table-column>
 
         <el-table-column prop="createTime" label="申请时间">
@@ -136,7 +148,9 @@
             width="100%"
             slot-scope="scope"
             :text="
-              scope.row.schoolStaffAuditReason ? scope.row.schoolStaffAuditReason : '--'
+              scope.row.schoolStaffAuditReason
+                ? scope.row.schoolStaffAuditReason
+                : '--'
             "
           ></overflow-text>
         </el-table-column>
@@ -146,7 +160,9 @@
             <div>
               {{ scope.row.status | withdrawalStatus }}
               <span v-if="scope.row.status == 'PROCESSING'"
-                >({{ scope.row.currentApproveRole == 1 ? "分部经理" : "乐团主管" }})</span
+                >({{
+                  scope.row.currentApproveRole == 1 ? "分部经理" : "乐团主管"
+                }})</span
               >
             </div>
           </template>
@@ -158,32 +174,36 @@
           label="操作"
           v-if="
             permission('musicGroupQuit/quitMusicGroup/quit') ||
-            permission('musicGroupQuit/quitMusicGroup/quit-only') ||
-            permission('visit/add/tuituanliebiao')
+              permission('musicGroupQuit/quitMusicGroup/quit-only') ||
+              permission('visit/add/tuituanliebiao')
           "
         >
           <template slot-scope="scope">
             <div>
               <el-button
                 type="text"
-                v-if="permission('musicGroupQuit/quitMusicGroup/quit') && isManage"
+                v-if="
+                  permission('musicGroupQuit/quitMusicGroup/quit') && isManage
+                "
                 :disabled="
                   scope.row.status != 'PROCESSING' ||
-                  scope.row.status == 'DENIED' ||
-                  scope.row.status == 'CANCELED' ||
-                  (scope.row.status == 'PROCESSING' &&
-                    isManage == 'manage' &&
-                    scope.row.currentApproveRole == '2') ||
-                  (scope.row.status == 'PROCESSING' &&
-                    isManage == 'staff' &&
-                    scope.row.currentApproveRole == '1')
+                    scope.row.status == 'DENIED' ||
+                    scope.row.status == 'CANCELED' ||
+                    (scope.row.status == 'PROCESSING' &&
+                      isManage == 'manage' &&
+                      scope.row.currentApproveRole == '2') ||
+                    (scope.row.status == 'PROCESSING' &&
+                      isManage == 'staff' &&
+                      scope.row.currentApproveRole == '1')
                 "
                 @click="quieTeamMask(scope.row)"
                 >立即处理</el-button
               >
               <el-button
                 type="text"
-                v-if="permission('musicGroupQuit/quitMusicGroup/quit') && isManage"
+                v-if="
+                  permission('musicGroupQuit/quitMusicGroup/quit') && isManage
+                "
                 :disabled="
                   !(
                     scope.row.status != 'PROCESSING' ||
@@ -248,7 +268,9 @@
               <p>退还课程费用:缴费总额-已结束课时单价之和</p>
               <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
               <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
-              <p v-if="$helpers.tenantId == 1">退还乐保费用:报名缴费时缴费的乐保费用</p>
+              <p v-if="$helpers.tenantId == 1">
+                退还乐保费用:报名缴费时缴费的乐保费用
+              </p>
             </div>
             <el-button
               type="text"
@@ -319,7 +341,7 @@ let that;
 const initSearch = {
   search: "",
   status: null,
-  organId: "",
+  organId: ""
 };
 export default {
   components: { pagination, quitModal, quitOnlyModal, visit },
@@ -332,14 +354,14 @@ export default {
       detail: null,
       list: [],
       searchForm: {
-        ...initSearch,
+        ...initSearch
       },
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50], // 选择限制显示条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
       },
       quitForm: {
         // 退团信息确认
@@ -353,11 +375,11 @@ export default {
         musicGroupName: null,
         isVisit: false,
         userComment: null,
-        schoolStaffAuditReason: null,
+        schoolStaffAuditReason: null
       },
       isManage: false,
       isDisabled: false,
-      multipleSelection: [],
+      multipleSelection: []
     };
   },
   async mounted() {
@@ -397,7 +419,7 @@ export default {
       this.submit();
     },
     async quieTeamMask(row, look) {
-      await musicGroupQuit({ id: row.id }).then((res) => {
+      await musicGroupQuit({ id: row.id }).then(res => {
         if (res.code == 200) {
           if (look == "look") {
             this.isDisabled = true;
@@ -416,7 +438,8 @@ export default {
           this.quitForm.reason = res.data.reason;
           this.quitForm.id = res.data.id;
           this.quitForm.reasonEnum = res.data.reasonEnum;
-          this.quitForm.schoolStaffAuditReason = res.data.schoolStaffAuditReason;
+          this.quitForm.schoolStaffAuditReason =
+            res.data.schoolStaffAuditReason;
           this.quitForm = { ...this.quitForm, ...res.data.returnFeeDto };
           console.log(this.quitForm, "this.quitForm");
           this.quitVisible = true;
@@ -441,7 +464,7 @@ export default {
           page: this.rules.page,
           rows: this.rules.limit,
           visitFlag: this.$route.query.visitFlag,
-          ...this.searchForm,
+          ...this.searchForm
         });
         this.rules.total = res.data.total;
         this.list = res.data.rows;
@@ -457,8 +480,8 @@ export default {
           method: "post",
           params: qs.stringify({
             visitFlag: this.$route.query.visitFlag,
-            ...rest,
-          }),
+            ...rest
+          })
         },
         "您确定导出退团申请列表?"
       );
@@ -467,7 +490,7 @@ export default {
       this.$confirm("确定此操作吗?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(async () => {
           let query = this.quitForm;
@@ -482,9 +505,9 @@ export default {
             isReturnMusicalFee: query.isReturnMusicalFee,
             maintenanceFee: query.maintenanceFee,
             memberFee: query.memberFee,
-            musicalFee: query.musicalFee,
+            musicalFee: query.musicalFee
           };
-          await quitMusicGroup(cleanDeep(query)).then((res) => {
+          await quitMusicGroup(cleanDeep(query)).then(res => {
             this.$message.success("处理成功");
             this.activeRow = null;
             if (this.$refs["musicForm"].$refs.quitForm) {
@@ -494,7 +517,7 @@ export default {
             this.FetchList();
           });
         })
-        .catch((e) => {
+        .catch(e => {
           console.log(e);
         });
       // 乐团主管这里
@@ -508,7 +531,7 @@ export default {
         return;
       }
       let str = "";
-      this.multipleSelection.forEach((stu) => {
+      this.multipleSelection.forEach(stu => {
         console.log(stu);
         str += stu.user.username + ",";
       });
@@ -527,11 +550,11 @@ export default {
         beforeClose: async (val, instance, done) => {
           if (val == "confirm") {
             // reason
-            let objList = this.multipleSelection.map((stu) => {
+            let objList = this.multipleSelection.map(stu => {
               return {
                 id: stu.id,
                 status: "APPROVED",
-                reason: instance.inputValue,
+                reason: instance.inputValue
               };
             });
             try {
@@ -544,11 +567,11 @@ export default {
             }
           } else if (val == "cancel") {
             instance.validate();
-            let objList = this.multipleSelection.map((stu) => {
+            let objList = this.multipleSelection.map(stu => {
               return {
                 id: stu.id,
                 status: "DENIED",
-                reason: instance.inputValue,
+                reason: instance.inputValue
               };
             });
             try {
@@ -562,24 +585,39 @@ export default {
           } else {
             done();
           }
-        },
+        }
       })
         .then(() => {
           // 同意
         })
-        .catch((msg) => {
+        .catch(msg => {
           // close,cancel
           console.log(msg);
         });
     },
     checkSeleabled(row) {
-      if (row.status == "PROCESSING" && row.currentApproveRole == "1") {
-        return 1;
-      } else {
+      // if (row.status == "PROCESSING" && row.currentApproveRole == "1") {
+      //   return 1;
+      // } else {
+      //   return 0;
+      // }
+      if (
+        row.status != "PROCESSING" ||
+        row.status == "DENIED" ||
+        row.status == "CANCELED" ||
+        (row.status == "PROCESSING" &&
+          isManage == "manage" &&
+          row.currentApproveRole == "2") ||
+        (row.status == "PROCESSING" &&
+          isManage == "staff" &&
+          row.currentApproveRole == "1")
+      ) {
         return 0;
+      } else {
+        return 1;
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>