Browse Source

Merge branch '0601Action' into test

mo 4 năm trước cách đây
mục cha
commit
d87ab4e614

+ 1 - 0
package.json

@@ -31,6 +31,7 @@
     "js-cookie": "2.2.0",
     "js-cookie": "2.2.0",
     "linq": "^3.2.2",
     "linq": "^3.2.2",
     "lodash": "^4.17.20",
     "lodash": "^4.17.20",
+    "moment": "^2.29.1",
     "node-sass": "^4.13.1",
     "node-sass": "^4.13.1",
     "normalize.css": "7.0.0",
     "normalize.css": "7.0.0",
     "npm": "^6.13.0",
     "npm": "^6.13.0",

+ 7 - 0
src/utils/vueFilter.js

@@ -148,6 +148,13 @@ Vue.filter('formatTimer', (value) => {
     return value
     return value
   }
   }
 })
 })
+Vue.filter('formatSecondTimer', (value) => {
+  if (value) {
+    return dayjs(value).format('HH:mm:ss')
+  } else {
+    return value
+  }
+})
 Vue.filter('timerForMinFormat', (value) => {
 Vue.filter('timerForMinFormat', (value) => {
   if (value) {
   if (value) {
     return value.substring(0, 5)
     return value.substring(0, 5)

+ 18 - 1
src/views/teamBuild/api.js

@@ -55,6 +55,23 @@ export const queryPreApplyList = data => request2({
   requestType: 'json'
   requestType: 'json'
 })
 })
 
 
+// 时间数据统计列表
+export const getRegisterOrPreList = data => request2({
+  url: '/api-web/studentRegistration/getRegisterOrPreList',
+  params: data,
+  method: 'get',
+  requestType: 'json'
+})
+
+// 解除预约限制 studentRegistration/setNoneCloudTeacher
+export const setNoneCloudTeacher = data => request2({
+  url: '/api-web/studentRegistration/setNoneCloudTeacher',
+  params: data,
+  method: 'get',
+  requestType: 'json'
+})
+
+
 // 意向列表
 // 意向列表
 export const queryPreApplySubjectList = data => request2({
 export const queryPreApplySubjectList = data => request2({
   url: '/api-web/studentRegistration/queryPreApplySubjectList',
   url: '/api-web/studentRegistration/queryPreApplySubjectList',
@@ -69,4 +86,4 @@ export const sendParentMeetingNotice = data => request2({
   data,
   data,
   method: 'post',
   method: 'post',
   requestType: 'form'
   requestType: 'form'
-})
+})

+ 182 - 0
src/views/teamBuild/components/newForecast-list.vue

@@ -0,0 +1,182 @@
+<template>
+  <div class="forecastName">
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        @reset="onReSet"
+        @submit="search"
+        :model="searchForm"
+        ref="searchForm"
+      >
+        <el-form-item>
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="学生编号/姓名/手机号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="danger" native-type="seach">搜索</el-button>
+          <!-- <el-button native-type="reset" type="primary">重置</el-button> -->
+        </el-form-item>
+      </save-form>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+          @sort-change="changePayTime"
+        >
+          <!--    :default-sort="{prop: 'perRegisterTime', order: 'payTime'}" -->
+          <el-table-column align="center" prop="userId" label="学员编号">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.userId }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="studentName"
+            label="学员姓名"
+          ></el-table-column>
+          <el-table-column align="center" prop="actualSubjectName" label="声部">
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="perRegisterTime"
+            label="预报名时间"
+            sortable="custom"
+          >
+            <template slot-scope="scope">
+              <div>
+                <p>{{ scope.row.perRegisterTime | formatTimer }}</p>
+                <p>{{ scope.row.perRegisterTime | formatSecondTimer }}</p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="预报名时间差">
+            <template slot-scope="scope">
+              {{ formatterTimes(scope.row.perRegInterval) }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="缴费时间"
+            sortable="custom"
+            prop="payTime"
+          >
+            <template slot-scope="scope">
+              <div>
+                <p>{{ scope.row.payTime | formatTimer }}</p>
+                <p>{{ scope.row.payTime | formatSecondTimer }}</p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="isRegistered"
+            label="缴费时间差"
+          >
+            <template slot-scope="scope">
+              {{ formatterTimes(scope.row.payInterval) }}
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          sync
+          :total.sync="pageInfo.total"
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/Pagination/index";
+import { getRegisterOrPreList } from "../api";
+import moment from "moment";
+export default {
+  name: "forecastName",
+  components: { pagination },
+  data() {
+    const query = this.$route.query;
+    return {
+      musicGroupId: query.id,
+      searchForm: {
+        search: null,
+        orderByPayTime: null,
+        orderByPerRegister: null,
+      },
+      tableList: [],
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {
+    this.searchForm.orderByPerRegister = null;
+    this.searchForm.orderByPayTime = null;
+    this.$store.dispatch("setSubjects");
+    this.getList();
+  },
+  methods: {
+    onReSet() {
+      this.$refs["searchForm"].resetFields();
+      this.search();
+    },
+    search() {
+      this.pageInfo.page = 1;
+      this.getList();
+    },
+    async getList() {
+      try {
+        const result = await getRegisterOrPreList({
+          ...this.searchForm,
+          musicGroupId: this.musicGroupId,
+          page: this.pageInfo.page,
+          rows: this.pageInfo.limit,
+        });
+        this.tableList = result.data.rows;
+        this.pageInfo.total = result.data.total;
+      } catch (error) {}
+    },
+    changePayTime(row) {
+      // console.log(row);
+      this.searchForm.orderByPerRegister = null;
+      this.searchForm.orderByPayTime = null;
+      let obj = {
+        perRegisterTime: "orderByPerRegister",
+        payTime: "orderByPayTime",
+        ascending: "ASC",
+        descending: "DESC",
+      };
+      this.searchForm[obj[row.prop]] = obj[row.order];
+      this.search();
+    },
+    formatterTimes(second) {
+      if (second < 60) {
+        return second + "秒";
+      } else if (60 < second && second < 3600) {
+        return moment(second * 1000).format("mm分钟");
+      } else if (3600 < second && second < 86400) {
+        return moment(second * 1000).format("HH小时mm分钟");
+      } else if (second > 86400) {
+        return moment(second * 1000).format("DD天HH小时");
+      } else {
+        return "--";
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 106 - 21
src/views/teamBuild/signupList.vue

@@ -123,6 +123,15 @@
           >
           >
             名单导出
             名单导出
           </div>
           </div>
+          <auth :auths="'studentRegistration/getRegisterOrPreList'">
+            <div
+              class="newBand"
+              style="margin-right: 0"
+              @click="newForecastVisible = true"
+            >
+              时间数据统计
+            </div>
+          </auth>
         </div>
         </div>
       </div>
       </div>
       <el-dialog
       <el-dialog
@@ -138,7 +147,16 @@
           @submited="getList"
           @submited="getList"
         />
         />
       </el-dialog>
       </el-dialog>
-
+      <el-dialog
+        title="时间数据统计"
+        :visible.sync="newForecastVisible"
+        width="1100px"
+      >
+        <newForecastList
+          v-if="newForecastVisible"
+          @close="newForecastVisible = false"
+        />
+      </el-dialog>
       <el-dialog
       <el-dialog
         title="预报名名单"
         title="预报名名单"
         :visible.sync="forecastVisible"
         :visible.sync="forecastVisible"
@@ -241,17 +259,17 @@
             <el-option label="否" :value="0"></el-option>
             <el-option label="否" :value="0"></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <!-- <el-form-item>
+        <el-form-item>
           <el-select
           <el-select
-            v-model.trim="searchFrom.payingStatus"
+            v-model.trim="searchFrom.noneNeedCloudTeacher"
             clearable
             clearable
             filterable
             filterable
-            placeholder="交易状态"
+            placeholder="是否解除限制"
           >
           >
-            <el-option label="审核中" :value="2"></el-option>
-            <el-option label="缴费中" :value="1"></el-option>
+            <el-option label="是" :value="1"></el-option>
+            <el-option label="否" :value="0"></el-option>
           </el-select>
           </el-select>
-        </el-form-item> -->
+        </el-form-item>
         <!-- 专业actualSubjectId 调剂isAllowAdjust 手机号name -->
         <!-- 专业actualSubjectId 调剂isAllowAdjust 手机号name -->
         <el-form-item>
         <el-form-item>
           <el-button type="danger" native-type="search">搜索</el-button>
           <el-button type="danger" native-type="search">搜索</el-button>
@@ -290,7 +308,7 @@
           </el-table-column>
           </el-table-column>
           <el-table-column label="缴费中" prop="payingNum" align="center">
           <el-table-column label="缴费中" prop="payingNum" align="center">
             <template slot="header">
             <template slot="header">
-              <p style="position: relative;display: flex;">
+              <p style="position: relative; display: flex">
                 缴费中
                 缴费中
                 <el-tooltip placement="top" popper-class="mTooltip">
                 <el-tooltip placement="top" popper-class="mTooltip">
                   <div slot="content">提交订单尚未支付成功学员</div>
                   <div slot="content">提交订单尚未支付成功学员</div>
@@ -304,10 +322,12 @@
           </el-table-column>
           </el-table-column>
           <el-table-column label="预约中" prop="checkNum" align="center">
           <el-table-column label="预约中" prop="checkNum" align="center">
             <template slot="header">
             <template slot="header">
-              <p style="position: relative;display: flex;">
+              <p style="position: relative; display: flex">
                 预约中
                 预约中
                 <el-tooltip placement="top" popper-class="mTooltip">
                 <el-tooltip placement="top" popper-class="mTooltip">
-                  <div slot="content">不购买云教练系统学员数量,不包含不购买云教练系统且支付成功学员</div>
+                  <div slot="content">
+                    不购买云教练系统学员数量,不包含不购买云教练系统且支付成功学员
+                  </div>
                   <i
                   <i
                     class="el-icon-question"
                     class="el-icon-question"
                     style="font-size: 18px; color: #f56c6c"
                     style="font-size: 18px; color: #f56c6c"
@@ -421,7 +441,31 @@
           >
           >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div>
               <div>
-                {{ scope.row.hasCloudTeacher == 1 ? '是' : '否' }}
+                {{ scope.row.hasCloudTeacher == 1 ? "是" : "否" }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="解除限制"
+            fixed="right"
+            prop="noneNeedCloudTeacher"
+            align="center"
+          >
+            <template slot="header">
+              <p style="position: relative; display: flex">
+                解除限制
+                <el-tooltip placement="top" popper-class="mTooltip">
+                  <div slot="content">学员是否受到不购买云教练的缴费限制</div>
+                  <i
+                    class="el-icon-question"
+                    style="font-size: 18px; color: #f56c6c"
+                  ></i>
+                </el-tooltip>
+              </p>
+            </template>
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.noneNeedCloudTeacher == 1 ? "是" : "否" }}
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -505,6 +549,15 @@
                     >更改声部</el-button
                     >更改声部</el-button
                   >
                   >
                 </auth>
                 </auth>
+                <!--  -->
+                <auth
+                  v-show="scope.row.payingStatus == 2"
+                  :auths="'studentRegistration/setNoneCloudTeacher'"
+                >
+                  <el-button type="text" @click="relieve(scope.row)"
+                    >解除预约限制</el-button
+                  >
+                </auth>
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -715,7 +768,12 @@
       width="640px"
       width="640px"
       :visible.sync="quitVisible"
       :visible.sync="quitVisible"
     >
     >
-      <el-form :model="quitForm" ref="quitForm" label-width="150px" :rules="quitRules">
+      <el-form
+        :model="quitForm"
+        ref="quitForm"
+        label-width="150px"
+        :rules="quitRules"
+      >
         <el-form-item
         <el-form-item
           label="退还云教练费用"
           label="退还云教练费用"
           prop="isCloudTeacherAmount"
           prop="isCloudTeacherAmount"
@@ -875,8 +933,11 @@ import {
   getMusicGroupGradeList,
   getMusicGroupGradeList,
   checkCanReg,
   checkCanReg,
 } from "@/api/buildTeam";
 } from "@/api/buildTeam";
+
+import { setNoneCloudTeacher } from "./api";
 import mergeMusic from "./components/merge-music";
 import mergeMusic from "./components/merge-music";
 import forecastList from "./components/forecast-list";
 import forecastList from "./components/forecast-list";
+import newForecastList from "./components/newForecast-list";
 import { resetStudentSubject, getStudentFeeDetail } from "@/api/studentManager";
 import { resetStudentSubject, getStudentFeeDetail } from "@/api/studentManager";
 import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
 import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
 import { addVisit } from "@/views/returnVisitManager/api.js";
 import { addVisit } from "@/views/returnVisitManager/api.js";
@@ -899,11 +960,13 @@ export default {
     mergeMusic,
     mergeMusic,
     forecastList,
     forecastList,
     visit,
     visit,
+    newForecastList,
   },
   },
   data() {
   data() {
     return {
     return {
       multipleSelection: [], //
       multipleSelection: [], //
       forecastVisible: false, // 预报名状态
       forecastVisible: false, // 预报名状态
+      newForecastVisible: false,
       isEdit: false,
       isEdit: false,
       rowDetail: null,
       rowDetail: null,
       mergeVisible: false,
       mergeVisible: false,
@@ -922,6 +985,7 @@ export default {
         visited: "",
         visited: "",
         hasCloudTeacher: null, // 是否购买云教练
         hasCloudTeacher: null, // 是否购买云教练
         payingStatus: null,
         payingStatus: null,
+        noneNeedCloudTeacher: null,
       },
       },
       quitForm: {
       quitForm: {
         // 退团信息确认
         // 退团信息确认
@@ -997,8 +1061,12 @@ export default {
       },
       },
       quitRules: {
       quitRules: {
         isCloudTeacherAmount: [{ required: true, message: "请输入云教练费用" }],
         isCloudTeacherAmount: [{ required: true, message: "请输入云教练费用" }],
-        cloudTeacherAmount: [{ required: true, message: "请输入云教练金额", trigger: 'blur' }],
-        isRefundCourseFee: [{ required: true, message: "请选择是否退还课程费用" }],
+        cloudTeacherAmount: [
+          { required: true, message: "请输入云教练金额", trigger: "blur" },
+        ],
+        isRefundCourseFee: [
+          { required: true, message: "请选择是否退还课程费用" },
+        ],
         isRefundInstrumentFee: [
         isRefundInstrumentFee: [
           { required: true, message: "选择是否退还乐器费用" },
           { required: true, message: "选择是否退还乐器费用" },
         ],
         ],
@@ -1113,6 +1181,7 @@ export default {
         visited: null,
         visited: null,
         hasCloudTeacher: null,
         hasCloudTeacher: null,
         payingStatus: null,
         payingStatus: null,
+        noneNeedCloudTeacher: null,
       };
       };
       this.getList();
       this.getList();
     },
     },
@@ -1140,6 +1209,7 @@ export default {
         visited: this.searchFrom.visited || null,
         visited: this.searchFrom.visited || null,
         hasCloudTeacher: this.searchFrom.hasCloudTeacher,
         hasCloudTeacher: this.searchFrom.hasCloudTeacher,
         payingStatus: this.searchFrom.payingStatus,
         payingStatus: this.searchFrom.payingStatus,
+        noneNeedCloudTeacher: this.searchFrom.noneNeedCloudTeacher,
         page: this.rules.page,
         page: this.rules.page,
         rows: this.rules.limit,
         rows: this.rules.limit,
       };
       };
@@ -1524,7 +1594,7 @@ export default {
     quitTeam(row) {
     quitTeam(row) {
       this.activeRow = row;
       this.activeRow = row;
       this.quitVisible = true;
       this.quitVisible = true;
-      this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount
+      this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount;
     },
     },
     quieTeams(row) {
     quieTeams(row) {
       this.$prompt("请输入退团原因", "提示", {
       this.$prompt("请输入退团原因", "提示", {
@@ -1580,15 +1650,15 @@ export default {
                 reason: this.quitForm.reason,
                 reason: this.quitForm.reason,
                 isRefundCourseFee: this.quitForm.isRefundCourseFee,
                 isRefundCourseFee: this.quitForm.isRefundCourseFee,
                 isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
                 isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
-                isRefundTeachingAssistantsFee: this.quitForm
-                  .isRefundTeachingAssistantsFee,
+                isRefundTeachingAssistantsFee:
+                  this.quitForm.isRefundTeachingAssistantsFee,
                 maintenanceFee: this.quitForm.maintenanceFee,
                 maintenanceFee: this.quitForm.maintenanceFee,
-              }
+              };
               // 退还乐器练习云教练费用
               // 退还乐器练习云教练费用
-              if(this.quitForm.isCloudTeacherAmount) {
-                params.cloudTeacherAmount = this.quitForm.cloudTeacherAmount
+              if (this.quitForm.isCloudTeacherAmount) {
+                params.cloudTeacherAmount = this.quitForm.cloudTeacherAmount;
               } else {
               } else {
-                params.cloudTeacherAmount = 0
+                params.cloudTeacherAmount = 0;
               }
               }
               // 发请求 退团
               // 发请求 退团
               StudentQuit(params).then((res) => {
               StudentQuit(params).then((res) => {
@@ -1701,6 +1771,21 @@ export default {
     checkboxSelect(row) {
     checkboxSelect(row) {
       return row.paymentStatus == 0;
       return row.paymentStatus == 0;
     },
     },
+    relieve(row) {
+      this.$confirm("操作后该学员即可不购买云教练缴费入团", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(async () => {
+        try {
+          const res = await setNoneCloudTeacher({ id: row.id });
+          this.$message.success("解除预约成功");
+          this.getList();
+        } catch (e) {
+          console.log(e);
+        }
+      });
+    },
   },
   },
   watch: {
   watch: {
     "quitForm.isMaintenanceFee"(val) {
     "quitForm.isMaintenanceFee"(val) {

+ 2 - 2
vue.config.js

@@ -19,8 +19,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
 // let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 开发环境
-let target = 'https://test.dayaedu.com' //测试环境
+let target = 'http://dev.dayaedu.com' // 开发环境
+// let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
 module.exports = {