Sfoglia il codice sorgente

提交一下 云教练统计

1
mo 3 anni fa
parent
commit
f56c790a5b

+ 98 - 0
src/views/main/cloudDate/allDate.vue

@@ -0,0 +1,98 @@
+<template>
+  <div>
+    <headers title="数据总览" />
+    <el-card>
+      <div slot="header" class="clearfix">
+        <div class="box">
+          <span class="shape"></span>
+          <span>学员数据</span>
+        </div>
+      </div>
+      <div
+        class="wall"
+        style="height: 68px"
+        v-if="
+          JSON.stringify(items) == '{}' &&
+          !data['CHARGE_STUDENT_CHANGE_RATE'] &&
+          !data['ACTIVATION_RATE']
+        "
+      >
+        暂无数据
+      </div>
+      <statistic :col="5" class="statistic" :cols="0">
+        <statistic-item
+          v-for="(item, key) in items"
+          :key="key"
+          :class="{ active: active === key }"
+          @click="active = key"
+        >
+          <span>
+            {{ item.title + "(人)" }}
+            <el-tooltip
+              v-if="item.desc"
+              :content="item.desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span> <count-to :endVal="item.percent" /> </span>
+        </statistic-item>
+
+        <statistic-item v-if="data['CHARGE_STUDENT_CHANGE_RATE']">
+          <span>
+            {{ data["CHARGE_STUDENT_CHANGE_RATE"].title + "(%)" }}
+            <el-tooltip
+              v-if="data['CHARGE_STUDENT_CHANGE_RATE'].desc"
+              :content="data['CHARGE_STUDENT_CHANGE_RATE'].desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span>
+            <count-to :endVal="data['CHARGE_STUDENT_CHANGE_RATE'].percent" />
+          </span>
+        </statistic-item>
+        <statistic-item v-if="data['ACTIVATION_RATE']">
+          <span>
+            {{ data["ACTIVATION_RATE"].title + "(%)" }}
+            <el-tooltip
+              v-if="data['ACTIVATION_RATE'].desc"
+              :content="data['ACTIVATION_RATE'].desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span> <count-to :endVal="data['ACTIVATION_RATE'].percent" /></span>
+        </statistic-item>
+      </statistic>
+    </el-card>
+  </div>
+</template>
+<script>
+import headers from "./modals/headers.vue";
+export default {
+  components: {
+    headers,
+  },
+  data() {
+    return {};
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 21 - 0
src/views/main/cloudDate/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <div>
+    <allDate />
+  </div>
+</template>
+<script>
+import allDate from './allDate.vue'
+export default {
+  components:{
+    allDate
+  },
+  data(){
+    return{
+
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 48 - 0
src/views/main/cloudDate/modals/headers.vue

@@ -0,0 +1,48 @@
+<template>
+  <div class="titleWrap">
+    <div class="box">
+      <span class="shape"></span>
+      <span>{{ title }}</span>
+    </div>
+    <div class="right">
+      <el-select
+      size='mini'
+        class="multiple"
+        v-model.trim="organId"
+        filterable
+        clearable
+        placeholder="请选择分部"
+      >
+        <el-option
+          v-for="(item, index) in selects.branchs"
+          :key="index"
+          :label="item.name"
+          :value="item.id"
+        ></el-option>
+      </el-select>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props: ["title"],
+  data() {
+    return {
+      organId: "",
+    };
+  },
+  async mounted() {
+    await this.$store.dispatch("setBranchs");
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.titleWrap {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  height: 55px;
+}
+</style>

+ 12 - 4
src/views/main/index.vue

@@ -11,7 +11,6 @@
       />
     </h2>
     <div class="m-core">
-
       <tab-router @change="changeKey">
         <el-tab-pane
           v-if="permission('/main/main/allData/826')"
@@ -21,6 +20,14 @@
         >
           <baseinfo v-if="activeKey === 'baseinfo'" />
         </el-tab-pane>
+        <el-tab-pane
+          v-if="permission('/main/main/allData/826')"
+          lazy
+          label="云教练数据"
+          name="cloudDate"
+        >
+         <cloudDate v-if="activeKey === 'cloudDate'" />
+        </el-tab-pane>
         <el-tab-pane v-if="permission('/getIndexErrData')" lazy name="abnormal">
           <el-badge
             slot="label"
@@ -71,6 +78,7 @@ import abnormal from "./abnormal";
 import teamSchedule from "./teamSchedule";
 import ScheduleBranch from "./schedule-branch";
 import reminders from "./reminders";
+import cloudDate from './cloudDate'
 export default {
   name: "Main",
   components: {
@@ -79,15 +87,15 @@ export default {
     teamSchedule,
     ScheduleBranch,
     reminders,
+    cloudDate
   },
   data() {
     return {
       activeKey: "",
     };
   },
-  mounted(){
+  mounted() {
     // console.log(permission('/main/main/allData/826'))
-
   },
   computed: {
     status() {
@@ -138,7 +146,7 @@ export default {
       });
     },
     reloadItem() {
-      console.log('调用')
+      console.log("调用");
       if (this.$refs.teamSchedule) {
         this.$refs.teamSchedule.getList();
       }

+ 14 - 16
src/views/teamBuild/signupList.vue

@@ -43,16 +43,6 @@
           </div>
           <div
             class="newBand"
-            v-permission="'musicGroup/extensionPayment'"
-            @click="extendTime(true)"
-            v-show="
-              status == 'PAY' || status == 'PROGRESS' || status == 'PREPARE'
-            "
-          >
-            延长缴费
-          </div>
-          <div
-            class="newBand"
             v-permission="'musicGroup/extensionApplyExpireDate'"
             @click="extendTime(false)"
             v-show="
@@ -66,6 +56,17 @@
           </div>
           <div
             class="newBand"
+            v-permission="'musicGroup/extensionPayment'"
+            @click="extendTime(true)"
+            v-show="
+               status == 'APPLY' || status == 'PAY' || status == 'PROGRESS' || status == 'PREPARE'
+            "
+          >
+            延长缴费
+          </div>
+
+          <div
+            class="newBand"
             @click="onCreateQRCode('payment')"
             v-show="
               (status == 'PAY' ||
@@ -635,7 +636,7 @@
             </div>
           </template>
         </el-table-column>
-        {{status}}
+        {{ status }}
         <el-table-column
           label="操作"
           fixed="right"
@@ -710,12 +711,9 @@
               <auth
                 :auths="'subjectChange/getStudentOriginal'"
                 v-show="scope.row.paymentStatus == 2"
-                  v-if="status !='PROGRESS'"
+                v-if="status != 'PROGRESS'"
               >
-                <el-button
-                  type="text"
-                  @click="openChangeVoice(scope.row)"
-
+                <el-button type="text" @click="openChangeVoice(scope.row)"
                   >更改声部</el-button
                 >
               </auth>

+ 95 - 0
src/views/teamDetail/components/modals/addTryList.vue

@@ -0,0 +1,95 @@
+<template>
+  <div>
+    <!-- <p class="title">已选择{{ multipleSelection.length }}名学员</p> -->
+    <el-form :model="tryForm" label-width="150px" ref="tryForm">
+      <el-form-item label="选择学员数">
+        <p>{{ multipleSelection.length }}名</p>
+      </el-form-item>
+      <el-form-item label="选择学员">
+        <p>{{ studendNames }}</p>
+      </el-form-item>
+      <el-form-item
+        label="会员等级"
+        prop="memberRankSettingId"
+        :rules="[
+          { required: true, message: '请选择会员等级', trigger: 'blur' },
+        ]"
+      >
+        <el-select
+          placeholder="会员等级"
+          clearable
+          v-model.trim="tryForm.memberRankSettingId"
+          style="width: 185px !important"
+        >
+          <el-option
+            :value="item.id"
+            :label="item.name"
+            v-for="item in memberRankList"
+            :key="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="将会员试用期延长至"
+        prop="tryTime"
+        :rules="[
+          { required: true, message: '请选择延长日期', trigger: 'blur' },
+        ]"
+      >
+        <el-date-picker
+          v-model.trim="tryForm.tryTime"
+          align="right"
+          type="date"
+          placeholder="选择日期"
+          value-format="yyyy-MM-dd"
+          :picker-options="pickerOptions"
+        ></el-date-picker>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+export default {
+  props: ["multipleSelection", "memberRankList"],
+  data() {
+    return {
+      tryForm: {
+        tryTime: "",
+        memberRankSettingId: "",
+      },
+      studendNames: "",
+      pickerOptions: {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+          return time.getTime() < new Date().getTime() - 86400000;
+        },
+      },
+    };
+  },
+  mounted() {
+    this.studendNames = this.multipleSelection
+      .map((stu) => {
+        return stu.realName;
+      })
+      .join(",");
+    // console.log(this.multipleSelection);
+  },
+  methods: {
+    submit() {
+      this.$refs.tryForm.validate(async (res) => {
+        if (res) {
+          this.$emit("close");
+          this.$emit("submited");
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.title {
+  margin-bottom: 30px;
+  font-size: 16px;
+  color: #000;
+}
+</style>

+ 53 - 29
src/views/teamDetail/components/studentList.vue

@@ -8,6 +8,13 @@
       >
         新增学员
       </div>
+      <div
+        class="newBand"
+        v-permission="'studentRegistration/insertStudent'"
+        @click="addTryTime"
+      >
+        增加会员试用期
+      </div>
     </div>
 
     <!-- 搜索类型 -->
@@ -325,18 +332,14 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column
-          label="乐团会员有效期"
-          align="center"
-          width="100px"
-        >
+        <el-table-column label="乐团会员有效期" align="center" width="100px">
           <template slot-scope="scope">
             <div>
-              {{scope.row.membershipEndTime | dayjsFormat}}
+              {{ scope.row.membershipEndTime | dayjsFormat }}
             </div>
           </template>
         </el-table-column>
-            <el-table-column label="备注" prop="remark" align="center">
+        <el-table-column label="备注" prop="remark" align="center">
           <template slot-scope="scope">
             <div>
               <overflow-text :text="scope.row.remark"></overflow-text>
@@ -703,14 +706,6 @@
       v-if="orderVisible"
     >
       <el-form :model="orderForm" :inline="true">
-        <!--     name: '',
-        totalAmount: '',
-        subject: '',
-        subjectFee: '',
-        axe: '',
-        axePrice: '',
-        others: '',
-        othersPrice: '' -->
         <el-form-item label="学员姓名">
           <el-input v-model.trim="orderForm.name" disabled=""></el-input>
         </el-form-item>
@@ -743,6 +738,26 @@
         >
       </div>
     </el-dialog>
+    <el-dialog
+      title="新增会员试用期"
+      width="600px"
+      :visible.sync="addTryVisible"
+    >
+      <addTryList
+      ref="addTry"
+        v-if="addTryVisible"
+        :multipleSelection="multipleSelection"
+        :memberRankList="memberRankList"
+        @close="addTryVisible = false"
+        @submited="getList"
+      />
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addTryVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitAddTryTime"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -758,24 +773,13 @@ import {
   StudentFeeIsLock,
   updateStudentFee,
   getMusicGroupGradeList,
-  getStudentList,
-  musicGroupOpenPay,
-  extensionPayment,
-  extensionApplyExpire,
-  getTeamBaseInfo,
-  getintoClass,
-  resetPlanNum,
-  openPayment,
-  musicGroupFound,
-  checkCanReg,
 } from "@/api/buildTeam";
 import {
   addStudent,
   getStudentClass,
   getStudentInfoByPhone,
-  getStudentFeeDetail,
-  resetStudentSubject,
 } from "@/api/studentManager";
+import { getAllmemberRank } from "@/views/resetTeaming/api";
 import qrCode from "@/components/QrCode/index";
 import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
 import { visitChiose } from "@/utils/searchArray";
@@ -797,6 +801,7 @@ import changeVoice from "@/views/teamBuild/modals/change-voice";
 import visit from "@/views/withdrawal-application/modals/visit";
 import mergeMusic from "@/views/teamBuild/components/merge-music";
 import quiteTeam from "@/views/teamDetail/components/modals/quite-team";
+import addTryList from "@/views/teamDetail/components/modals/addTryList";
 export default {
   name: "tstudentList",
   data() {
@@ -983,6 +988,8 @@ export default {
       multipleSelection: [],
       isCanReg: false,
       organId: "",
+      addTryVisible: false,
+      memberRankList: [],
     };
   },
   components: {
@@ -997,6 +1004,7 @@ export default {
     changeVoice,
     mergeMusic,
     quiteTeam,
+    addTryList,
   },
   created() {},
   filters: {
@@ -1018,6 +1026,12 @@ export default {
       });
       this.organizationCourseUnitPriceSettings = res.data.rows;
     } catch (error) {}
+    try {
+      const res = await getAllmemberRank({ isDefault: 0 });
+      this.memberRankList = res.data;
+    } catch (e) {
+      console.log(e);
+    }
     this.init();
   },
   methods: {
@@ -1489,7 +1503,7 @@ export default {
     },
     quieTeamMask(row) {
       this.activeRow = row;
-       this.activeRow.courseViewType =this.baseInfo.courseViewType
+      this.activeRow.courseViewType = this.baseInfo.courseViewType;
       this.quitVisible = true;
       this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount;
     },
@@ -1681,7 +1695,7 @@ export default {
       this.multipleSelection = val;
     },
     checkboxSelect(row) {
-      return row.paymentStatus == 0;
+      return row.studentStatus == "NORMAL";
     },
     gotoStudent(search) {
       // this.$router.push({
@@ -1694,6 +1708,16 @@ export default {
         params: { search: search },
       });
     },
+    addTryTime() {
+      if (this.multipleSelection.length > 0) {
+        this.addTryVisible = true;
+      } else {
+        this.$message.error("请至少选择一名学员");
+      }
+    },
+    submitAddTryTime(){
+      this.$refs.addTry.submit()
+    }
   },
   watch: {
     createUserPayVisible(val) {

+ 43 - 30
src/views/withdrawal-application/modals/visit.vue

@@ -1,12 +1,19 @@
 <template>
   <div>
     <div class="visitBtnWrap">
-      <auth auths='studentAttendance/findStudentAttendance'>
-          <el-button type="text" @click="recordVisible = true">学员考勤</el-button>
+      <auth auths="studentAttendance/findStudentAttendance">
+        <el-button type="text" @click="recordVisible = true"
+          >学员考勤</el-button
+        >
+      </auth>
+      <auth
+        :auths="[
+          'webCurseHomework/getStudentHomeWorks',
+          'extracurricularExercisesReply/queryPageList',
+        ]"
+      >
+        <el-button type="text" @click="workVisible = true">训练情况</el-button>
       </auth>
-       <auth :auths="['webCurseHomework/getStudentHomeWorks','extracurricularExercisesReply/queryPageList']">
-         <el-button type="text" @click="workVisible=true">训练情况</el-button>
-       </auth>
     </div>
     <el-form
       :model="visitForm"
@@ -20,7 +27,7 @@
       </el-form-item>
       <el-form-item label="回访类型" prop="visitType">
         <el-cascader
-          :disabled='isMainGo || !!useVisitType'
+          :disabled="isMainGo || !!useVisitType"
           expand-trigger="hover"
           clearable
           style="width: 80% !important"
@@ -38,7 +45,7 @@
           style="width: 80% !important"
           placeholder="选择日期"
           value-format="yyyy-MM-dd"
-           :picker-options="pickerOptions"
+          :picker-options="pickerOptions"
         ></el-date-picker>
       </el-form-item>
       <el-form-item label="学员情况" prop="overview">
@@ -79,7 +86,7 @@
       append-to-body
       v-if="recordVisible"
     >
-    <record  :studentId="this.detail.userId"/>
+      <record :studentId="this.detail.userId" />
     </el-dialog>
 
     <el-dialog
@@ -89,20 +96,20 @@
       :visible.sync="workVisible"
       append-to-body
     >
-    <studentWork :studentId="this.detail.userId"/>
+      <studentWork :studentId="this.detail.userId" />
     </el-dialog>
   </div>
 </template>
 <script>
 import cleanDeep from "clean-deep";
-import { visitChiose,visitChiose1 } from "@/utils/searchArray";
+import { visitChiose, visitChiose1 } from "@/utils/searchArray";
 import { addVisit } from "@/views/returnVisitManager/api";
-import record from './record'
-import studentWork from './studentWork'
+import record from "./record";
+import studentWork from "./studentWork";
 export default {
   // useVisitType 自定义回访类型
-  props: ["detail", "username",'isMainGo', "useVisitType"],
-  components:{record,studentWork},
+  props: ["detail", "username", "isMainGo", "useVisitType"],
+  components: { record, studentWork },
   data() {
     return {
       visitChiose,
@@ -123,9 +130,9 @@ export default {
         visitTime: [{ required: true, message: "请输入回访时间" }],
         visitType: [{ required: true, message: "请选择回访类型" }],
       },
-      recordVisible:false,
-      workVisible:false,
-        pickerOptions: {
+      recordVisible: false,
+      workVisible: false,
+      pickerOptions: {
         firstDayOfWeek: 1,
         disabledDate(time) {
           return time.getTime() > new Date().getTime();
@@ -133,24 +140,30 @@ export default {
       },
     };
   },
-  mounted(){
-    if(this.isMainGo){
-      this.visitChiose = visitChiose1
-      this.$set(this.visitForm,'visitType',['常规回访','考勤申诉'])
-    } else if(this.useVisitType) {
-      this.visitChiose = visitChiose1
-      this.$set(this.visitForm,'visitType', this.useVisitType)
-    } else{
-      this.visitChiose = visitChiose
+  mounted() {
+    if (this.isMainGo) {
+      this.visitChiose = visitChiose1;
+      this.$set(this.visitForm, "visitType", ["常规回访", "考勤申诉"]);
+    } else if (this.useVisitType) {
+      this.visitChiose = visitChiose1;
+      this.$set(this.visitForm, "visitType", this.useVisitType);
+    } else {
+      this.visitChiose = visitChiose;
     }
   },
   computed: {
     userName() {
-      return this.username || this.detail.user?.username || this.detail.realName || this.detail.userName || this.detail.studentName
+      return (
+        this.username ||
+        this.detail.user?.username ||
+        this.detail.realName ||
+        this.detail.userName ||
+        this.detail.studentName
+      );
+    },
+    studentId() {
+      return this.detail.userId || this.detail.studentId;
     },
-    studentId(){
-      return this.detail.userId || this.detail.studentId
-    }
   },
   methods: {
     submitAddVisit() {