瀏覽代碼

修改退团和回访

1
mo 2 年之前
父節點
當前提交
174c1b098c

File diff suppressed because it is too large
+ 611 - 629
src/api/buildTeam.js


+ 13 - 1
src/constant/index.js

@@ -447,7 +447,8 @@ export const feedbackType = {
   'PENDING_PAYMENT': '确认缴费待缴费',
   'LOST': '回访流失',
   'PAUSE': '暂停',
-  'OTHER': '其他'
+  'OTHER': '其他',
+  'NORMAL':'在读'
 }
 
 export const feedbackTypeDesc = {
@@ -504,3 +505,14 @@ export const catRole = {
   '衔接老师':'衔接老师',
   '学员':''
 }
+
+
+// 退团原因
+
+export const quiteReason = {
+  GRADUATE:'毕业',
+  NOT_INTERESTED:'不感兴趣',
+  TIME_CONFLICT:'时间冲突',
+  FEELING_UNWELL:'身体不适',
+  OTHER:'其他'
+}

+ 3 - 1
src/utils/searchArray.js

@@ -25,7 +25,8 @@ import {
   campState,
   catgGoupType,
   catRole,
-  catType
+  catType,
+  quiteReason
 } from '../constant'
 // 课程类型
 let tenantConfig = sessionStorage.getItem('tenantConfig')
@@ -816,6 +817,7 @@ export const campStateList = getValueForKey(campState)
 export const catgGoupTypeList =  getValueForKey(catgGoupType)
 export const catRoleList = getValueForKey(catRole)
 export const catTypeList = getValueForKey(catType)
+export const quiteReasonList = getValueForKey(quiteReason)
 //downListType
 function getValueForKey(obj) {
   let arr = []

+ 4 - 0
src/utils/vueFilter.js

@@ -857,6 +857,10 @@ Vue.filter("catDotType", value => {
   return constant.catDotType[value];
 });
 
+Vue.filter('quiteReasonFilter',value=>{
+  return constant.quiteReason[value]
+})
+
 Vue.filter("usageStatus", value => {
   let obj = {
     0: "未使用",

+ 0 - 1
src/views/main/teamShowList.vue

@@ -134,7 +134,6 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import quiteTeam from "@/views/teamDetail/components/modals/quite-team";
-import { StudentQuit } from "@/api/buildTeam";
 import load from "@/utils/loading";
 import { getMusicGroupPerformance } from "./api";
 import visit from "@/views/withdrawal-application/modals/visit";

+ 156 - 58
src/views/studentManager/memberList.vue

@@ -17,7 +17,7 @@
           <el-input
             v-model.trim="searchForm.search"
             clearable
-             @keyup.enter.native="
+            @keyup.enter.native="
               (e) => {
                 e.target.blur();
                 $refs.searchForm.save();
@@ -179,7 +179,7 @@
                   >
                 </auth>
                 <auth :auths="'musicGroupQuit/directQuitMusicGroup4462'">
-                  <el-button type="text" @click="quieTeams(scope.row)"
+                  <el-button type="text" @click="onekeyquickTeams(scope.row)"
                     >退团</el-button
                   >
                 </auth>
@@ -200,7 +200,7 @@
     <!-- 退团弹窗 -->
     <el-dialog title="退团信息确认" width="660px" :visible.sync="quitVisible">
       <quiteTeam :quitForm="quitForm" :activeRow="activeRow" ref="quitForm" />
-       <p style="color:red;paddingLeft:150px">退费金额暂不进入账户余额</p>
+      <p style="color: red; paddingleft: 150px">退费金额暂不进入账户余额</p>
       <span slot="footer" class="dialog-footer question">
         <div>
           <el-popover placement="right" width="500" trigger="click">
@@ -211,7 +211,6 @@
               <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
               <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
               <p v-if="tenantId == 1">退还乐保费用:报名缴费时缴费的乐保费用</p>
-
             </div>
             <el-button
               type="text"
@@ -228,6 +227,70 @@
         </div>
       </span>
     </el-dialog>
+    <!-- 退团 -->
+    <el-dialog title="一键退团" width="660px" :visible.sync="onekeyQuitVisible">
+      <el-form
+        :model="quitForm"
+        ref="onekeyQuitForm"
+        label-width="150px"
+        :inline="true"
+      >
+        <el-row>
+          <el-col :span="10">
+            <el-form-item label="学员姓名">
+              <span>{{ quitForm.studentName }}</span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="乐团名称">
+              <overflow-text
+                :text="quitForm.musicGroupName"
+                width="150px"
+              ></overflow-text>
+              <!-- <span>{{}}</span>   -->
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-form-item
+            label="退团原因"
+            prop="reasonEnum"
+            :rules="[{ required: true, message: '请选择退团原因' }]"
+          >
+            <el-radio-group
+              v-model="quitForm.reasonEnum"
+              :disabled="false"
+            >
+              <el-radio-button
+                :label="item.value"
+                v-for="(item, index) in quiteReasonList"
+                :key="index"
+                >{{ item.label }}</el-radio-button
+              >
+            </el-radio-group>
+          </el-form-item>
+        </el-row>
+        <el-form-item
+          label="审批理由"
+          prop="reason"
+          :rules="[{ required: true, message: '请输入退团理由' }]"
+        >
+          <el-input
+            :disabled="false"
+            type="textarea"
+            :rows="3"
+            v-model.trim="quitForm.reason"
+            style="width: 455px !important"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer question">
+        <div>
+          <el-button @click="onekeyQuitVisible = false">取 消</el-button>
+          <el-button type="primary" @click="quieTeams">确 定</el-button>
+        </div>
+      </span>
+    </el-dialog>
     <!-- 新增回访 -->
     <el-dialog
       title="新增回访"
@@ -244,6 +307,35 @@
         :useVisitType="['其它', '会员续费']"
       />
     </el-dialog>
+    <el-dialog title="退团信息确认" width="660px" :visible.sync="quitVisible">
+      <quiteTeam :quitForm="quitForm" :activeRow="activeRow" ref="quitForm" />
+      <p style="color: red; paddingleft: 150px">退费金额暂不进入账户余额</p>
+      <span slot="footer" class="dialog-footer question">
+        <div>
+          <el-popover placement="right" width="500" trigger="click">
+            <div class="popoverWrap">
+              <p>乐团退团退费规则:</p>
+              <p>退还云教练费用:报名缴费时缴费的云教练费用</p>
+              <p>退还课程费用:缴费总额-已结束课时单价之和</p>
+              <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
+              <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
+              <p v-if="tenantId == 1">退还乐保费用:报名缴费时缴费的乐保费用</p>
+            </div>
+            <el-button
+              type="text"
+              icon="el-icon-question"
+              slot="reference"
+              style="color: red"
+              >退团退费说明</el-button
+            >
+          </el-popover>
+        </div>
+        <div>
+          <el-button @click="quitVisible = false">取 消</el-button>
+          <el-button type="primary" @click="chioseType">确 定</el-button>
+        </div>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -257,6 +349,7 @@ import load from "@/utils/loading";
 import { getMusicMemberList } from "./api";
 import visit from "@/views/withdrawal-application/modals/visit";
 import { getTimes } from "@/utils";
+import { quiteReasonList } from "@/utils/searchArray";
 export default {
   components: { pagination, quiteTeam, visit },
   data() {
@@ -264,7 +357,7 @@ export default {
       searchForm: {
         search: null,
         organId: null,
-        hasMember: '0',
+        hasMember: "0",
         visitTime: [],
       },
 
@@ -279,8 +372,8 @@ export default {
       },
       quitForm: {
         // 退团信息确认
-        studentName:null,
-        musicGroupName:null,
+        studentName: null,
+        musicGroupName: null,
         isRefundCourseFee: null,
         isRefundInstrumentFee: null,
         isRefundTeachingAssistantsFee: null,
@@ -294,7 +387,9 @@ export default {
       quitVisible: false,
       activeRow: null,
       visitVisible: false,
-      tenantId:''
+      tenantId: "",
+      onekeyQuitVisible: false,
+      quiteReasonList,
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -334,55 +429,58 @@ export default {
       this.getList();
     },
     onReSet() {
-       this.$refs["searchForm"].resetFields();
-       this.search()
+      this.$refs["searchForm"].resetFields();
+      this.search();
     },
     quitTeam(row) {
       this.activeRow = row;
       this.quitVisible = true;
       this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount;
-       this.quitForm.studentName = row.username
-       this.quitForm.musicGroupName = row.musicGroupName
+      this.quitForm.studentName = row.username;
+      this.quitForm.musicGroupName = row.musicGroupName;
+    },
+    onekeyquickTeams(row) {
+      this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount;
+      this.quitForm.studentName = row.username;
+      this.quitForm.musicGroupName = row.musicGroupName;
+      this.activeRow = row;
+      this.onekeyQuitVisible = true;
     },
-    quieTeams(row) {
-      this.$prompt("请输入退团原因", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        inputPattern: /\S/,
-        inputErrorMessage: "请输入退团原因",
-        type: "warning",
-      })
-        .then((val) => {
-          // 发请求 退团
-          StudentQuit({
-            musicGroupId: row.musicGroupId,
-            userId: row.userId,
-            reason: val.value,
-            isRefundCourseFee: false,
-            isRefundInstrumentFee: false,
-            isRefundTeachingAssistantsFee: false,
-            isRefundMemberFee: false,
-          }).then((res) => {
-            this.quitForm = {
-              // 退团信息确认
-              isRefundCourseFee: null,
-              isRefundInstrumentFee: null,
-              isRefundTeachingAssistantsFee: null,
-              isMaintenanceFee: null,
-              cloudTeacherAmount: null,
-              isCloudTeacherAmount: null,
-              isRefundMemberFee: null,
-              maintenanceFee: 0,
-              reason: "",
-            };
-            if (res.code == 200) {
-              this.$message.success("退团成功");
-              this.getList();
-              this.quitVisible = false;
-            }
-          });
-        })
-        .catch(() => {});
+    quieTeams() {
+      this.$refs.onekeyQuitForm.validate((res) => {
+        if (!res) {
+          return;
+        }
+        StudentQuit({
+          musicGroupId: this.activeRow.musicGroupId,
+          userId: this.activeRow.userId,
+          reason: this.quitForm.reason,
+          reasonEnum:this.quitForm.reasonEnum,
+          isRefundCourseFee: false,
+          isRefundInstrumentFee: false,
+          isRefundTeachingAssistantsFee: false,
+          isRefundMemberFee: false,
+        }).then((res) => {
+          this.quitForm = {
+            // 退团信息确认
+            isRefundCourseFee: null,
+            isRefundInstrumentFee: null,
+            isRefundTeachingAssistantsFee: null,
+            isMaintenanceFee: null,
+            cloudTeacherAmount: null,
+            isCloudTeacherAmount: null,
+            isRefundMemberFee: null,
+            maintenanceFee: 0,
+            reason: "",
+            reasonEnum: "",
+          };
+          if (res.code == 200) {
+            this.$message.success("退团成功");
+            this.getList();
+            this.onekeyQuitVisible = false;
+          }
+        });
+      });
     },
     chioseType() {
       this.$refs["quitForm"].$refs["quitForm"].validate((res) => {
@@ -449,7 +547,7 @@ export default {
     lookVisit(row) {
       this.$router.push({
         path: "/studentManager/returnVisitList",
-        query: { search: row.userId,typeList:['其它', '会员续费'] },
+        query: { search: row.userId, typeList: ["其它", "会员续费"] },
       });
     },
   },
@@ -471,12 +569,12 @@ export default {
       }
     },
   },
-  filters:{
-    hasMemberFilter(val){
-    const arr =  ['已过期','即将过期','待生效','生效中']
-    return arr[val]
-    }
-  }
+  filters: {
+    hasMemberFilter(val) {
+      const arr = ["已过期", "即将过期", "待生效", "生效中"];
+      return arr[val];
+    },
+  },
 };
 </script>
 <style lang='scss' scoped>

+ 24 - 3
src/views/teamDetail/components/modals/quite-team.vue

@@ -39,6 +39,7 @@
             >否</el-radio
           >
         </el-form-item>
+
         <el-form-item
           label="回访时间"
           v-if="quitForm.isVisit"
@@ -205,7 +206,7 @@
             </el-input>
           </el-form-item>
         </el-row>
-        <el-row v-if="$helpers.tenantId ==1">
+        <el-row v-if="$helpers.tenantId == 1">
           <el-form-item
             label="退还乐保费用"
             :rules="[{ required: true, message: '请选择是否退还乐保费用' }]"
@@ -239,6 +240,21 @@
             </el-input>
           </el-form-item>
         </el-row>
+        <el-row>
+          <el-form-item label="退团原因" prop="reasonEnum">
+            <el-radio-group
+              v-model="quitForm.reasonEnum"
+              :disabled="isDisabled"
+            >
+              <el-radio-button
+                :label="item.value"
+                v-for="(item, index) in quiteReasonList"
+                :key="index"
+                >{{ item.label }}</el-radio-button
+              >
+            </el-radio-group>
+          </el-form-item>
+        </el-row>
       </div>
       <el-row>
         <el-form-item label="申请理由" prop="userComment">
@@ -264,10 +280,10 @@
   </div>
 </template>
 <script>
+import {quiteReasonList} from '@/utils/searchArray'
 export default {
   props: ["quitForm", "isDisabled"],
-  mounted() {
-  },
+  mounted() {},
   data() {
     return {
       quitRules: {
@@ -290,6 +306,10 @@ export default {
         isRefundMemberFee: [
           { required: true, message: "请选择是否退还会员费用" },
         ],
+        reasonEnum:[
+          { required: true, message: "请选择退团原因" },
+        ]
+
       },
       pickerOptions: {
         firstDayOfWeek: 1,
@@ -297,6 +317,7 @@ export default {
           return time.getTime() > new Date().getTime();
         },
       },
+      quiteReasonList
     };
   },
 };

+ 1 - 0
src/views/withdrawal-application/index.vue

@@ -412,6 +412,7 @@ export default {
           this.quitForm.hasMaintenance = res.data.hasMaintenance;
           this.quitForm.reason = res.data.reason;
           this.quitForm.id = res.data.id;
+          this.quitForm.reasonEnum = res.data.reasonEnum
           this.quitForm = { ...this.quitForm, ...res.data.returnFeeDto };
           this.quitVisible = true;
         } else {

Some files were not shown because too many files changed in this diff