Bläddra i källkod

提交测试

1
mo 3 år sedan
förälder
incheckning
14b38f7a80

+ 6 - 0
src/constant/index.js

@@ -283,3 +283,9 @@ export const conclusion = {
   1:'正常',
   2:'异常'
 }
+export const vipResetType = {
+  1: '不限制',
+0: '线上不可调为线下',
+2: '线下不可调为线上',
+3: '线上线下不可互调'
+}

+ 2 - 1
src/utils/searchArray.js

@@ -1,5 +1,5 @@
 // 搜索用的下拉数据列表
-import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType,ProbationPeriodStatus,downListType,musicGroupType,conclusion } from '../constant'
+import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType,ProbationPeriodStatus,downListType,musicGroupType,conclusion,vipResetType } from '../constant'
 // 课程类型
 export const courseType = [
   { label: "声部课", value: "SINGLE" },
@@ -214,6 +214,7 @@ export const stockType = [
 //   { value: 'CANCELED', text: '取消' },
 //   { value: 'CLOSE', text: '已关闭' },
 // ]
+export const vipResetTypeList = getValueForKey(vipResetType)
 export const musicGroupStatus = getValueForKey(musicGroupType)
 export const classTimeList = getValueForKey(classTime)
 

+ 25 - 8
src/views/categroyManager/vipActiveList.vue

@@ -65,14 +65,18 @@
             <el-option label="关闭" :value="false"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item  prop="allowOnlineToOffline">
+        <el-form-item prop="allowOnlineToOffline">
           <el-select
             v-model.trim="searchForm.allowOnlineToOffline"
             placeholder="请选择课程调整方式"
             clearable
           >
-            <el-option label="无限制" :value="1"></el-option>
-            <el-option label="线上不可转线下" :value="0"></el-option>
+            <el-option
+              :label="item.label"
+              :value="item.value"
+              v-for="item in vipResetTypeList"
+              :key="item.value"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item prop="applyToStudentType">
@@ -129,6 +133,7 @@
             :formatter="fommatterCourseType"
           ></el-table-column>
           <el-table-column
+          width="135"
             align="center"
             label="课程调整方式"
             :formatter="fommatterResetType"
@@ -285,8 +290,12 @@
               placeholder="请选择课程调整方式"
               clearable
             >
-              <el-option label="无限制" :value="1"></el-option>
-              <el-option label="线上不可转线下" :value="0"></el-option>
+              <el-option
+                :label="item.label"
+                :value="item.value"
+                v-for="item in vipResetTypeList"
+                :key="item.value"
+              ></el-option>
             </el-select>
           </el-form-item>
           <el-form-item
@@ -602,11 +611,13 @@ import {
 import qs from "qs";
 import { Export } from "@/utils/downLoadFile";
 import cleanDeep from "clean-deep";
+import { vipResetTypeList } from "@/utils/searchArray";
 export default {
   name: "vipActiveList",
   components: { pagination },
   data() {
     return {
+      vipResetTypeList,
       labelPosition: "right",
       tableList: [],
       rules: {
@@ -621,7 +632,7 @@ export default {
         enable: null,
         search: "",
         applyToStudentType: null,
-        allowOnlineToOffline:null,
+        allowOnlineToOffline: null,
       },
       dialogVisible: false,
       resetForm: {
@@ -894,7 +905,7 @@ export default {
       vipGroupActivity({
         organId: this.searchForm.organId,
         applyToStudentType: this.searchForm.applyToStudentType,
-        allowOnlineToOffline:this.searchForm.allowOnlineToOffline,
+        allowOnlineToOffline: this.searchForm.allowOnlineToOffline,
         rows: this.rules.limit,
         page: this.rules.page,
         enable,
@@ -951,6 +962,12 @@ export default {
       if (row.allowOnlineToOffline == 0) {
         str = "线上不可转线下";
       }
+      if (row.allowOnlineToOffline == 2) {
+        str = "线下不可调为线上";
+      }
+        if (row.allowOnlineToOffline == 3) {
+        str = "线上线下不可互调";
+      }
       return str;
     },
     formatStudentType(row) {
@@ -986,7 +1003,7 @@ export default {
       this.dialogVisible = true;
       this.resetForm.name = row.name;
       this.resetForm.applyToStudentType = row.applyToStudentType;
-      this.resetForm.allowOnlineToOffline = row.allowOnlineToOffline;
+      this.resetForm.allowOnlineToOffline = row.allowOnlineToOffline + "";
       this.resetForm.desc = row.description;
 
       if (row.organId) {

+ 8 - 2
src/views/categroyManager/vipNewActive.vue

@@ -62,8 +62,12 @@
             placeholder="请选择课程调整方式"
             clearable
           >
-            <el-option label="无限制" :value="1"></el-option>
-            <el-option label="线上不可转线下" :value="0"></el-option>
+               <el-option
+              :label="item.label"
+              :value="item.value"
+              v-for="item in vipResetTypeList"
+              :key="item.value"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="使用学员" prop="applyToStudentType">
@@ -383,6 +387,7 @@
 <script>
 import { vipGroupCategory, addVipActive } from "@/api/vipSeting";
 import { getEmployeeOrgan } from "@/api/buildTeam";
+import { vipResetTypeList } from "@/utils/searchArray";
 import cleanDeep from "clean-deep";
 const MIN_NUMBER = 1;
 const MAX_NUMBER = 999;
@@ -390,6 +395,7 @@ export default {
   name: "vipNewActive",
   data() {
     return {
+      vipResetTypeList,
       pageType: "",
       labelPosition: "right",
       vipform: {

+ 17 - 1
src/views/teamBuild/components/newForecast-list.vue

@@ -19,6 +19,7 @@
         <el-form-item>
           <el-button type="danger" native-type="seach">搜索</el-button>
           <!-- <el-button native-type="reset" type="primary">重置</el-button> -->
+          <el-button @click="exporOrPreList" type="primary" v-permission="'studentRegistration/registerOrPreListExport'">导出</el-button>
         </el-form-item>
       </save-form>
       <div class="tableWrap">
@@ -98,7 +99,10 @@
 <script>
 import pagination from "@/components/Pagination/index";
 import { getRegisterOrPreList } from "../api";
+import cleandeep from "clean-deep";
 import moment from "moment";
+import{Export}  from "@/utils/downLoadFile";
+
 export default {
   name: "forecastName",
   components: { pagination },
@@ -169,11 +173,23 @@ export default {
       } else if (3600 < second && second < 86400) {
         return moment(second * 1000).format("HH小时mm分钟");
       } else if (second > 86400) {
-        return moment(second * 1000).format("DD天HH小时");
+        return moment(second * 1000).format("DD天HH小时mm分钟");
       } else {
         return "--";
       }
     },
+    exporOrPreList(){
+       let params = this.searchForm;
+      Export(
+        this,
+        {
+          method: "get",
+          url: "/api-web/studentRegistration/registerOrPreListExport",
+          params:{...params, musicGroupId: this.musicGroupId,}
+        },
+        "是否导出时间数据统计?"
+      );
+    }
   },
 };
 </script>