| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642 | 
							- <template>
 
-   <div class="m-container">
 
-     <h2>
 
-       <div class="squrt"></div>
 
-       退团申请
 
-       <auth :auths="['/WithdrawalApplication/abnormal']">
 
-         <filter-search
 
-           @reload="reloadSearch"
 
-           :keys="['visitFlag']"
 
-           :moreKeys="['organId']"
 
-         />
 
-       </auth>
 
-     </h2>
 
-     <div class="m-core">
 
-       <save-form
 
-         :inline="true"
 
-         @submit="submit"
 
-         @reset="onReSet"
 
-         ref="searchForm"
 
-         :model.sync="searchForm"
 
-       >
 
-         <el-form-item>
 
-           <el-input
 
-             v-model.trim="searchForm.search"
 
-             clearable
 
-             placeholder="学员(乐团)编号、名称"
 
-           ></el-input>
 
-         </el-form-item>
 
-         <el-form-item prop="organId">
 
-           <el-select
 
-             class="multiple"
 
-             style="width: 180px !important"
 
-             v-model.trim="searchForm.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>
 
-         </el-form-item>
 
-         <el-form-item>
 
-           <el-select
 
-             v-model="searchForm.status"
 
-             clearable
 
-             placeholder="请选择状态"
 
-           >
 
-             <el-option
 
-               v-for="(item, key) in withdrawalStatus"
 
-               :key="key"
 
-               :label="item"
 
-               :value="key"
 
-             ></el-option>
 
-           </el-select>
 
-         </el-form-item>
 
-         <el-form-item>
 
-           <el-select
 
-             v-model="searchForm.currentApproveRole"
 
-             clearable
 
-             placeholder="请选择角色"
 
-           >
 
-             <el-option label="分部经理" value="1"></el-option>
 
-             <el-option label="乐团主管" value="2"></el-option>
 
-           </el-select>
 
-         </el-form-item>
 
-         <el-form-item>
 
-           <el-button native-type="submit" type="danger">搜索</el-button>
 
-           <el-button native-type="reset" type="primary">重置</el-button>
 
-           <el-button
 
-             @click="onExport"
 
-             type="primary"
 
-             v-permission="'export/musicGroupQuit'"
 
-             >导出</el-button
 
-           >
 
-         </el-form-item>
 
-       </save-form>
 
-       <div class="btnList">
 
-         <auth :auths="['musicGroupQuit/batchQuitMusicGroup']">
 
-           <el-button type="primary" @click="quiteTeamAll">批量处理</el-button>
 
-         </auth>
 
-       </div>
 
-       <el-table
 
-         :data="list"
 
-         style="width: 100%"
 
-         :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
 
-         @selection-change="handleSelectionChange"
 
-       >
 
-         <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>
 
-         </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>
 
-         </el-table-column>
 
-         <el-table-column prop="createTime" label="申请时间">
 
-           <template slot-scope="scope">
 
-             <div>
 
-               {{ scope.row.createTime | dateForMinFormat }}
 
-             </div>
 
-           </template>
 
-         </el-table-column>
 
-         <el-table-column prop="applyUserName" label="申请人"></el-table-column>
 
-         <el-table-column prop="createTime" label="退费金额">
 
-           <template slot-scope="scope">
 
-             <div>
 
-               <p v-if="!scope.row.returnTotalFee">--</p>
 
-               <p v-else>
 
-                 {{ scope.row.returnTotalFee | moneyFormat }}
 
-               </p>
 
-             </div>
 
-           </template>
 
-         </el-table-column>
 
-         <el-table-column prop="reasonEnum" label="退团原因">
 
-           <template slot-scope="scope">
 
-             <p>{{ scope.row.reasonEnum | quiteReasonFilter }}</p>
 
-           </template>
 
-         </el-table-column>
 
-         <el-table-column prop="userComment" label="退团理由">
 
-           <overflow-text
 
-             width="100%"
 
-             slot-scope="scope"
 
-             :text="scope.row.userComment"
 
-           ></overflow-text>
 
-         </el-table-column>
 
-         <el-table-column prop="userComment" label="学校审批理由">
 
-           <overflow-text
 
-             width="100%"
 
-             slot-scope="scope"
 
-             :text="
 
-               scope.row.schoolStaffAuditReason
 
-                 ? scope.row.schoolStaffAuditReason
 
-                 : '--'
 
-             "
 
-           ></overflow-text>
 
-         </el-table-column>
 
-         <el-table-column label="状态">
 
-           <template slot-scope="scope">
 
-             <div>
 
-               {{ scope.row.status | withdrawalStatus }}
 
-               <span v-if="scope.row.status == 'PROCESSING'"
 
-                 >({{
 
-                   scope.row.currentApproveRole == 1 ? "分部经理" : "乐团主管"
 
-                 }})</span
 
-               >
 
-             </div>
 
-           </template>
 
-         </el-table-column>
 
-         <el-table-column
 
-           align="center"
 
-           fixed="right"
 
-           width="200px;"
 
-           label="操作"
 
-           v-if="
 
-             permission('musicGroupQuit/quitMusicGroup/quit') ||
 
-               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
 
-                 "
 
-                 :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')
 
-                 "
 
-                 @click="quieTeamMask(scope.row)"
 
-                 >立即处理</el-button
 
-               >
 
-               <el-button
 
-                 type="text"
 
-                 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')
 
-                   )
 
-                 "
 
-                 @click="quieTeamMask(scope.row, 'look')"
 
-                 >查看</el-button
 
-               >
 
-               <!-- <el-button
 
-               type="text"
 
-               v-if="permission('musicGroupQuit/quitMusicGroup/quit-only')"
 
-               :disabled="scope.row.status != 'PROCESSING'"
 
-               @click="quieTeam(scope.row)"
 
-             >退团</el-button> -->
 
-               <el-button
 
-                 type="text"
 
-                 v-if="permission('visit/add/tuituanliebiao')"
 
-                 @click="addVisit(scope.row)"
 
-                 >新增回访</el-button
 
-               >
 
-             </div>
 
-           </template>
 
-         </el-table-column>
 
-       </el-table>
 
-       <pagination
 
-         sync
 
-         :total.sync="rules.total"
 
-         :page.sync="rules.page"
 
-         :limit.sync="rules.limit"
 
-         :page-sizes="rules.page_size"
 
-         @pagination="FetchList"
 
-       />
 
-     </div>
 
-     <el-dialog
 
-       :title="isDisabled ? '查看' : '立即处理'"
 
-       width="700px"
 
-       :visible.sync="quitVisible"
 
-     >
 
-       <quitModal
 
-         v-if="quitVisible"
 
-         :quitForm="quitForm"
 
-         @close="quitVisible = false"
 
-         @submited="FetchList"
 
-         :isDisabled="isDisabled"
 
-         ref="musicForm"
 
-       />
 
-       <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="$helpers.tenantId == 1">
 
-                 退还乐保费用:报名缴费时缴费的乐保费用
 
-               </p>
 
-             </div>
 
-             <el-button
 
-               type="text"
 
-               icon="el-icon-question"
 
-               slot="reference"
 
-               style="color: red"
 
-               >退团退费说明</el-button
 
-             >
 
-           </el-popover>
 
-         </div>
 
-         <div v-if="!isDisabled">
 
-           <el-button
 
-             type="primary"
 
-             v-permission="'musicGroupQuit/quitMusicGroup'"
 
-             v-if="isManage == 'staff'"
 
-             @click="submitInfo('PROCESSING')"
 
-             >提交审核</el-button
 
-           >
 
-           <el-button
 
-             v-if="isManage == 'super' || isManage == 'manage'"
 
-             type="primary"
 
-             v-permission="'musicGroupQuit/quitMusicGroup'"
 
-             @click="submitInfo('APPROVED')"
 
-             >同意</el-button
 
-           >
 
-           <el-button
 
-             type="danger"
 
-             v-permission="'musicGroupQuit/quitMusicGroup'"
 
-             @click="submitInfo('DENIED')"
 
-             >拒绝</el-button
 
-           >
 
-         </div>
 
-       </span>
 
-     </el-dialog>
 
-     <!-- <el-dialog title="退团" width="500px" :visible.sync="quitOnlyVisible">
 
-       <quitOnlyModal
 
-         v-if="quitOnlyVisible && detail"
 
-         :detail="detail"
 
-         @close="quitOnlyVisible = false"
 
-         @submited="FetchList"
 
-       />
 
-     </el-dialog> -->
 
-     <el-dialog title="新增回访" width="760px" :visible.sync="visitVisible">
 
-       <visit
 
-         v-if="visitVisible && detail"
 
-         :detail="detail"
 
-         @close="visitVisible = false"
 
-         @submited="FetchList"
 
-       />
 
-     </el-dialog>
 
-   </div>
 
- </template>
 
- <script>
 
- import pagination from "@/components/Pagination/index";
 
- import { permission } from "@/utils/directivePage";
 
- import quitModal from "@/views/teamDetail/components/modals/quite-team";
 
- import quitOnlyModal from "./modals/quitOnly";
 
- import visit from "./modals/visit";
 
- import { Export } from "@/utils/downLoadFile";
 
- import { quitMusicGroup } from "@/api/journal";
 
- import qs from "qs";
 
- import { musicGroupQuitQeryPage, batchQuitMusicGroup } from "./api";
 
- import cleanDeep from "clean-deep";
 
- import { musicGroupQuit } from "@/api/journal";
 
- import { withdrawalStatus } from "@/constant";
 
- import { quiteReasonFilter } from "@/utils/vueFilter";
 
- let that;
 
- const initSearch = {
 
-   search: "",
 
-   status: null,
 
-   organId: ""
 
- };
 
- export default {
 
-   components: { pagination, quitModal, quitOnlyModal, visit },
 
-   data() {
 
-     return {
 
-       withdrawalStatus,
 
-       quitVisible: false,
 
-       quitOnlyVisible: false,
 
-       visitVisible: false,
 
-       detail: null,
 
-       list: [],
 
-       searchForm: {
 
-         ...initSearch
 
-       },
 
-       rules: {
 
-         // 分页规则
 
-         limit: 10, // 限制显示条数
 
-         page: 1, // 当前页
 
-         total: 0, // 总条数
 
-         page_size: [10, 20, 40, 50] // 选择限制显示条数
 
-       },
 
-       quitForm: {
 
-         // 退团信息确认
 
-         isRefundCourseFee: null,
 
-         isRefundInstrumentFee: null,
 
-         isRefundTeachingAssistantsFee: null,
 
-         reason: "",
 
-         courseViewType: null,
 
-         hasMaintenance: null,
 
-         studentName: null,
 
-         musicGroupName: null,
 
-         isVisit: false,
 
-         userComment: null,
 
-         schoolStaffAuditReason: null
 
-       },
 
-       isManage: false,
 
-       isDisabled: false,
 
-       multipleSelection: []
 
-     };
 
-   },
 
-   async mounted() {
 
-     that = this;
 
-     let isSuperAdmin = this.$store.getters.isSuperAdmin;
 
-     let roles = this.$store.getters.roles; // 岗位
 
-     let newRoles = this.$store.getters.newRoles; // 角色  这里判断一半岗位 一半角色 深水炸弹!!!!!  危险 危险 危险
 
-     await this.$store.dispatch("setBranchs");
 
-     if (isSuperAdmin || newRoles.indexOf(150) != -1) {
 
-       console.log("isSuperAdmin");
 
-       this.isManage = "super";
 
-     } else {
 
-       if (roles.indexOf("1") != -1) {
 
-         this.isManage = "manage";
 
-       }
 
-       if (roles.indexOf("2") != -1) {
 
-         this.isManage = "staff";
 
-       }
 
-     }
 
-     if (roles.indexOf("1") != -1 && roles.indexOf("2") != -1) {
 
-       this.isManage = "super";
 
-     }
 
-     this.FetchList();
 
-   },
 
-   methods: {
 
-     permission,
 
-     reloadSearch() {
 
-       this.rules.page = 1;
 
-       this.FetchList();
 
-     },
 
-     submit() {
 
-       this.rules.page = 1;
 
-       this.FetchList();
 
-     },
 
-     onReSet() {
 
-       this.searchForm = { ...initSearch };
 
-       this.submit();
 
-     },
 
-     async quieTeamMask(row, look) {
 
-       await musicGroupQuit({ id: row.id }).then(res => {
 
-         if (res.code == 200) {
 
-           if (look == "look") {
 
-             this.isDisabled = true;
 
-           } else {
 
-             this.isDisabled = false;
 
-           }
 
-           this.musicForm = res.data;
 
-           this.activeRow = { ...row, ...res.data.returnFeeDto };
 
-           this.quitForm.courseViewType = res.data.musicGroup.courseViewType;
 
-           this.quitForm.userComment = res.data.userComment;
 
-           this.quitForm.isVisit = res.data.isVisit;
 
-           this.quitForm.visitTime = res.data.visitTime;
 
-           this.quitForm.studentName = res.data.user?.username;
 
-           this.quitForm.musicGroupName = res.data.musicGroup?.name;
 
-           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.schoolStaffAuditReason =
 
-             res.data.schoolStaffAuditReason;
 
-           this.quitForm = { ...this.quitForm, ...res.data.returnFeeDto };
 
-           console.log(this.quitForm, "this.quitForm");
 
-           this.quitVisible = true;
 
-         } else {
 
-           this.$message.error(res.msg);
 
-         }
 
-       });
 
-       // this.detail = row;
 
-     },
 
-     quieTeam(row) {
 
-       this.quitOnlyVisible = true;
 
-       this.detail = row;
 
-     },
 
-     addVisit(row) {
 
-       this.visitVisible = true;
 
-       this.detail = row;
 
-     },
 
-     async FetchList() {
 
-       try {
 
-         const res = await musicGroupQuitQeryPage({
 
-           page: this.rules.page,
 
-           rows: this.rules.limit,
 
-           visitFlag: this.$route.query.visitFlag,
 
-           ...this.searchForm
 
-         });
 
-         this.rules.total = res.data.total;
 
-         this.list = res.data.rows;
 
-       } catch (error) {}
 
-     },
 
-     onExport() {
 
-       const { ...rest } = this.searchForm;
 
-       Export(
 
-         this,
 
-         {
 
-           url: "/api-web/export/musicGroupQuit",
 
-           fileName: "退团申请.xls",
 
-           method: "post",
 
-           params: qs.stringify({
 
-             visitFlag: this.$route.query.visitFlag,
 
-             ...rest
 
-           })
 
-         },
 
-         "您确定导出退团申请列表?"
 
-       );
 
-     },
 
-     submitInfo(status) {
 
-       this.$confirm("确定此操作吗?", "提示", {
 
-         confirmButtonText: "确定",
 
-         cancelButtonText: "取消",
 
-         type: "warning"
 
-       })
 
-         .then(async () => {
 
-           let query = this.quitForm;
 
-           query.status = status;
 
-           query.returnFeeDto = {
 
-             accessoriesFee: query.accessoriesFee,
 
-             courseFee: query.courseFee,
 
-             isReturnAccessoriesFee: query.isReturnAccessoriesFee,
 
-             isReturnCourseFee: query.isReturnCourseFee,
 
-             isReturnMaintenanceFee: query.isReturnMaintenanceFee,
 
-             isReturnMemberFee: query.isReturnMemberFee,
 
-             isReturnMusicalFee: query.isReturnMusicalFee,
 
-             maintenanceFee: query.maintenanceFee,
 
-             memberFee: query.memberFee,
 
-             musicalFee: query.musicalFee
 
-           };
 
-           await quitMusicGroup(cleanDeep(query)).then(res => {
 
-             this.$message.success("处理成功");
 
-             this.activeRow = null;
 
-             if (this.$refs["musicForm"].$refs.quitForm) {
 
-               this.$refs["musicForm"].$refs.quitForm.resetFields();
 
-             }
 
-             this.quitVisible = false;
 
-             this.FetchList();
 
-           });
 
-         })
 
-         .catch(e => {
 
-           console.log(e);
 
-         });
 
-       // 乐团主管这里
 
-     },
 
-     handleSelectionChange(val) {
 
-       this.multipleSelection = val;
 
-     },
 
-     quiteTeamAll() {
 
-       if (this.multipleSelection.length < 1) {
 
-         this.$message.error("请至少选择一名学员");
 
-         return;
 
-       }
 
-       let str = "";
 
-       this.multipleSelection.forEach(stu => {
 
-         console.log(stu);
 
-         str += stu.user.username + ",";
 
-       });
 
-       str += "的退团申请将批量处理";
 
-       this.$prompt(str, "提示", {
 
-         distinguishCancelAndClose: true,
 
-         confirmButtonText: "同意",
 
-         cancelButtonText: "拒绝",
 
-         confirmButtonClass: "el-button--primary",
 
-         cancelButtonClass: "el-button--danger",
 
-         closeOnClickModal: false,
 
-         inputPattern: /\S/,
 
-         inputType: "textarea",
 
-         inputErrorMessage: "请输入审批理由",
 
-         inputPlaceholder: "请输入审批理由",
 
-         beforeClose: async (val, instance, done) => {
 
-           if (val == "confirm") {
 
-             // reason
 
-             let objList = this.multipleSelection.map(stu => {
 
-               return {
 
-                 id: stu.id,
 
-                 status: "APPROVED",
 
-                 reason: instance.inputValue
 
-               };
 
-             });
 
-             try {
 
-               const res = await batchQuitMusicGroup(objList);
 
-               this.$message.success("审批成功");
 
-               done();
 
-               this.FetchList();
 
-             } catch (e) {
 
-               console.log(e);
 
-             }
 
-           } else if (val == "cancel") {
 
-             instance.validate();
 
-             let objList = this.multipleSelection.map(stu => {
 
-               return {
 
-                 id: stu.id,
 
-                 status: "DENIED",
 
-                 reason: instance.inputValue
 
-               };
 
-             });
 
-             try {
 
-               const res = await batchQuitMusicGroup(objList);
 
-               this.$message.success("审批成功");
 
-               done();
 
-               this.FetchList();
 
-             } catch (e) {
 
-               console.log(e);
 
-             }
 
-           } else {
 
-             done();
 
-           }
 
-         }
 
-       })
 
-         .then(() => {
 
-           // 同意
 
-         })
 
-         .catch(msg => {
 
-           // close,cancel
 
-           console.log(msg);
 
-         });
 
-     },
 
-     checkSeleabled(row) {
 
-       // 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" &&
 
-           this.isManage == "manage" &&
 
-           row.currentApproveRole == "2") ||
 
-         (row.status == "PROCESSING" &&
 
-           this.isManage == "staff" &&
 
-           row.currentApproveRole == "1")
 
-       ) {
 
-         return 0;
 
-       } else {
 
-         return 1;
 
-       }
 
-     }
 
-   }
 
- };
 
- </script>
 
- <style lang="scss" scoped>
 
- .dialog-footer.question {
 
-   display: flex;
 
-   flex-direction: row;
 
-   justify-content: space-between;
 
- }
 
- .btnList {
 
-   margin-bottom: 20px;
 
- }
 
- .confirmButton {
 
-   color: #fff;
 
-   background-color: #f56c6c;
 
-   border-color: #f56c6c;
 
- }
 
- .cancelButton {
 
-   color: #fff;
 
-   background-color: var(--color-primary);
 
-   border-color: var(--color-primary);
 
- }
 
- </style>
 
 
  |