12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382 |
- <template>
- <div class="sigup-container">
- <div class="topWrap">
- <div>
- <h2>
- <el-page-header @back="onCancel"
- :content="teamName + '报名详情'">
- </el-page-header>
- </h2>
- <p style="margin-bottom:15px; font-size:18px;
- font-weight:400">报名缴费截止时间:{{ applyExpireDate | formatTimer }}</p>
- <div class="btnList">
- <div class='newBand close'
- v-permission="'musicGroup/cancelMusicGroup'"
- @click="onClose">停止乐团</div>
- <div class='newBand'
- @click="payStart"
- v-permission="'musicGroup/openPay'"
- v-if="status=='APPLY'">开始缴费</div>
- <!-- v-if="status=='PAY'" -->
- <div class='newBand'
- v-permission="'musicGroup/found'"
- @click="onGoHome">确认开团</div>
- <div class='newBand'
- v-permission="'musicGroup/extensionPayment'"
- @click="extendPaymentStatus = true"
- v-if="status=='PAY'">延长缴费</div>
- <div class='newBand'
- @click="onCreateQRCode">报名链接</div>
- <div class='newBand'
- @click="onCreateQRCode2">缴费详情</div>
- <div class='newBand'
- v-if="rightList.length > 0"
- v-permission="'studentRegistration/queryStudentApplyDetailExport'"
- @click='onDownLoadExecl'>报表导出</div>
- </div>
- </div>
- <!-- stepImgs: {
- APPLY: require('@/assets/images/base/clock.png'),
- PAY: require('@/assets/images/base/pay.png')
- }, -->
- <p class='msg'
- :class="status=='PAY'? 'pay' : '' "> <img :src="status=='APPLY'?stepImgs.APPLY:stepImgs.PAY"
- alt="">
- {{ status=='APPLY'?'报名中':'缴费中' }}</p>
- </div>
- <div class="searchList">
- <el-form :inline="true"
- :model="searchFrom">
- <el-form-item label="专业">
- <el-select v-model.trim="searchFrom.subject"
- filterable
- clearable>
- <el-option v-for="(item,index) in soundList"
- :key='index'
- :label="item.name"
- :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="是否允许调剂">
- <el-select v-model.trim="searchFrom.isAllowAdjust"
- filterable
- clearable>
- <el-option label="是"
- value="1"></el-option>
- <el-option label="否"
- value="0"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="用户名或手机号">
- <el-input v-model.trim="searchFrom.name"></el-input>
- </el-form-item>
- <!-- 专业actualSubjectId 调剂isAllowAdjust 手机号name -->
- <el-form-item>
- <el-button type='danger'
- @click='search'>搜索</el-button>
- <el-button type='primary'
- @click="onReset">重置</el-button>
- </el-form-item>
- </el-form>
- </div>
- <div class="sigup-core">
- <div class="left">
- <el-table :data='leftList'
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
- <el-table-column label="乐团声部"
- prop="subjectName"
- align='center'>
- </el-table-column>
- <el-table-column label="计划招生"
- prop="expectedStudentNum"
- align='center'>
- <template slot-scope="scope">
- <div>
- <p v-if="!isEdit">{{ scope.row.expectedStudentNum }}</p>
- <el-input v-if="isEdit"
- v-model.trim="scope.row.expectedStudentNum"></el-input>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="已报名"
- prop='applyStudentNum'
- align='center'>
- </el-table-column>
- <el-table-column label="已缴费"
- prop='payNum'
- align='center'>
- </el-table-column>
- </el-table>
- <div class="btnWrap"
- v-permission="'musicGroup/updateExpectedStudentNum'"
- style="margin-right:20px; margin-top:20px;">
- <el-button v-if="!isEdit"
- @click="isEdit = true">编辑</el-button>
- <el-button v-if="isEdit"
- @click="saveIsEdit">保存</el-button>
- </div>
- </div>
- <div class="right">
- <el-table :data='rightList'
- ref="multipleTable"
- :header-cell-style="{background:'#EDEEF0',color:'#444'}"
- @selection-change="handleSelectionChange">
- <el-table-column type="selection"
- width="55">
- </el-table-column>
- <el-table-column label="学员姓名"
- prop="studentName"
- align='center'>
- </el-table-column>
- <el-table-column label="家长姓名"
- prop="parentsName"
- align='center'>
- </el-table-column>
- <el-table-column label="年级班级"
- align='center'>
- <template slot-scope="scope">
- <div>
- {{scope.row.currentGrade+scope.row.currentClass}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="性别"
- prop="gender"
- align='center'>
- <template slot-scope="scope">
- <div>
- {{scope.row.gender | sex}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="服从调剂"
- prop="isAllowAdjust"
- align='center'>
- <template slot-scope="scope">
- <div>
- {{ scope.row.isAllowAdjust | isAllowAdjust}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="报名专业"
- prop="subjectName"
- align='center'>
- </el-table-column>
- <el-table-column label="调剂专业"
- prop="actualSubjectName"
- align='center'>
- </el-table-column>
- <el-table-column label="联系电话"
- prop="parentsPhone"
- align='center'>
- </el-table-column>
- <!-- v-if='status == "PAY"' -->
- <el-table-column label="学员状态"
- fixed='right'
- prop="paymentStatus"
- align='center'>
- <template slot-scope="scope">
- <div>
- {{ scope.row.paymentStatus | paymentStatus }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作"
- fixed='right'
- width="240"
- align='center'>
- <template slot-scope="scope">
- <div>
- <el-button type='text'
- v-permission="'studentRegistration/batchUpdateSubject'"
- v-if="scope.row.paymentStatus != 2"
- @click='resetSubject(scope.row)'>修改专业</el-button>
- <!-- APPLY status == "APPLY" || s-->
- <el-popover v-if='scope.row.remark'
- placement="top-start"
- title="备注"
- width="200"
- trigger="hover"
- :content="scope.row.remark">
- <el-button type="text"
- slot="reference">备注</el-button>
- </el-popover>
- <!-- PAY -->
- <!-- && status == "PAY"-->
- <el-button type='text'
- v-permission="'studentRegistration/queryFeeDetail'"
- v-if='scope.row.paymentStatus==2'
- @click='lookdetail(scope.row)'>查看</el-button>
- <el-button type='text'
- v-permission="'musicGroupQuit/directQuitMusicGroup2'"
- v-if='scope.row.paymentStatus==2'
- @click='quitTeam(scope.row)'>退团</el-button>
- <el-button type="text"
- v-if="permission('musicGroupQuit/directQuitMusicGroup3')&&scope.row.paymentStatus==2"
- @click="quieTeams(scope.row)">退团不退费</el-button>
- <el-button type="text"
- v-if="permission('visit/add')"
- @click="addVisit(scope.row)">新增回访</el-button>
- <el-button type="text"
- v-if="scope.row.paymentStatus==2"
- v-permission="'subjectChange/getStudentOriginal'"
- @click="openChangeVoice(scope.row)">更改声部</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div style="margin-top: 10px; margin-bottom: 10px;"
- v-if="status=='APPLY'">
- <el-button @click="onSelectAll">全选/取消</el-button>
- <el-button style="background-color: #14928a;border: 1px solid #14928a;"
- @click="onPartPayment"
- v-permission="'studentRegistration/openPayment'"
- type="primary">提前缴费</el-button>
- <!-- <div class='newBand' v-if="status=='APPLY'">允许缴费</div> -->
- </div>
- <pagination :total="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="getList" />
- </div>
- </div>
- <el-dialog title="修改专业"
- :visible.sync="subjectVisible"
- width="400px">
- <el-form :model="maskForm">
- <el-form-item label="选择专业">
- <el-select v-model.trim="maskForm.subject"
- filterable
- clearable>
- <el-option v-for="(item,index) in soundList"
- :key='index'
- :label="item.name"
- :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer"
- class="dialog-footer">
- <el-button @click="subjectVisible = false">取 消</el-button>
- <el-button type="primary"
- @click="okReset">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="延长缴费"
- :visible.sync="extendPaymentStatus"
- width="400px">
- <el-form :model="extendForm"
- ref="extendForm"
- :rules="extendRule">
- <el-form-item label="延长时间"
- prop="expireDate">
- <el-date-picker v-model.trim="extendForm.expireDate"
- value-format="yyyy-MM-dd"
- type="date"
- :picker-options="{
- firstDayOfWeek:1
- }"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-form>
- <div slot="footer"
- class="dialog-footer">
- <el-button @click="extendPaymentStatus = false">取 消</el-button>
- <el-button type="primary"
- @click="onExtendPayment('extendForm')">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="订单详情"
- :visible.sync="orderVisible"
- width="600px">
- <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>
- <el-form-item label="实缴金额">
- <el-input v-model.trim="orderForm.totalAmount"
- disabled=""></el-input>
- </el-form-item>
- <el-form-item label="实际专业">
- <el-input v-model.trim="orderForm.subject"
- disabled=""></el-input>
- </el-form-item>
- <el-form-item label="课程费用">
- <el-input v-model.trim="orderForm.subjectFee"
- disabled=""></el-input>
- </el-form-item>
- <el-form-item label="选择乐器">
- <el-input v-model.trim="orderForm.axe"
- disabled=""></el-input>
- </el-form-item>
- <el-form-item label="乐器价格">
- <el-input v-model.trim="orderForm.axePrice"
- disabled=""></el-input>
- </el-form-item>
- <el-form-item label="教辅组合">
- <el-input v-model.trim="orderForm.others"
- disabled=""></el-input>
- </el-form-item>
- <el-form-item label="组合价格">
- <el-input v-model.trim="orderForm.othersPrice"
- disabled=""></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer"
- class="dialog-footer">
- <!-- <el-button>取 消</el-button> -->
- <el-button type="primary"
- @click="orderVisible = false">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="开始缴费"
- :visible.sync="paymentStatus"
- width="400px">
- <el-form ref="paymentForm"
- class="paymentForm"
- :model="paymentForm"
- label-position="top"
- :rules="paymentRules">
- <el-form-item label="请设置缴费截止日期"
- prop="paymentExpireDate">
- <el-date-picker v-model.trim="paymentForm.paymentExpireDate"
- type="date"
- value-format="yyyy-MM-dd"
- :picker-options="{
- firstDayOfWeek:1
- }"
- style="width: 100%"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- <!-- <el-form-item label="是否排乐团网管课"
- :rules="[{ required: true, message: '请选择是否排乐团网管课'}]"
- prop="feeType">
- <el-select v-model="paymentForm.feeType"
- style="width: 100%!imoprtant">
- <el-option label="需要排线上课"
- value="ONLINE"></el-option>
- <el-option label="只排线下课"
- value="OFFLINE"></el-option>
- </el-select>
- </el-form-item> -->
- </el-form>
- <div slot="footer"
- class="dialog-footer">
- <el-button @click="paymentStatus = false">取 消</el-button>
- <el-button type="primary"
- @click="onStartPayment('paymentForm')">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="报名二维码"
- :visible.sync="qrcodeStatus"
- width="300px">
- <div class="left-code">
- <h2>学员报名连接</h2>
- <div id="qrcode"
- class="qrcode code"
- ref="qrCodeUrl"></div>
- <p class="code-url"
- v-if="codeUrl">{{ codeUrl }}</p>
- </div>
- </el-dialog>
- <el-dialog title="缴费详情二维码"
- :visible.sync="qrcodeStatus2"
- width="300px">
- <div class="right-code">
- <h2>报名缴费详情</h2>
- <div id="qrcode2"
- class="qrcode code"
- ref="qrCodeUrl"></div>
- <p class="code-url"
- v-if="codeUrl2">{{ codeUrl2 }}</p>
- </div>
- </el-dialog>
- <!-- 退团弹窗 -->
- <el-dialog title="退团信息确认"
- :destroy-on-close="true"
- width="640px"
- :visible.sync="quitVisible">
- <el-form :model="quitForm"
- ref="quitForm"
- :rules="quitRules">
- <el-form-item label="退还课程费用"
- prop="isRefundCourseFee">
- <el-radio v-model.trim="quitForm.isRefundCourseFee"
- :label="true">是</el-radio>
- <el-radio v-model.trim="quitForm.isRefundCourseFee"
- :label="false">否</el-radio>
- </el-form-item>
- <el-form-item label="退还乐器费用"
- prop="isRefundInstrumentFee">
- <el-radio v-model.trim="quitForm.isRefundInstrumentFee"
- :label="true">是</el-radio>
- <el-radio v-model.trim="quitForm.isRefundInstrumentFee"
- :label="false">否</el-radio>
- </el-form-item>
- <el-form-item label="退还教辅费用"
- prop="isRefundTeachingAssistantsFee">
- <el-radio v-model.trim="quitForm.isRefundTeachingAssistantsFee"
- :label="true">是</el-radio>
- <el-radio v-model.trim="quitForm.isRefundTeachingAssistantsFee"
- :label="false">否</el-radio>
- </el-form-item>
- <el-form-item label="退团原因">
- <el-input type="textarea"
- v-model.trim="quitForm.reason"></el-input>
- </el-form-item>
- </el-form>
- <span slot="footer"
- class="dialog-footer">
- <el-button @click="quitVisible = false">取 消</el-button>
- <el-button type="primary"
- @click="chioseType">确 定</el-button>
- </span>
- </el-dialog>
- <!-- 回访记录 -->
- <el-dialog title="新增回访"
- width="600px"
- destroy-on-close
- :close-on-click-modal='false'
- :visible.sync="visitVisiable">
- <el-form :model="visitForm"
- label-width="120px"
- label-position='right'
- ref='visitForm'
- :rules="visitRules">
- <el-form-item label="学生姓名">
- <p>{{visitForm.studentName}}</p>
- </el-form-item>
- <el-form-item label="回访类型"
- prop='visitType'>
- <el-cascader expand-trigger="hover"
- clearable
- placeholder="请选择回访类型"
- :options="visitChiose"
- @change="handleChange"
- style="width:220px!important;"
- v-model="visitForm.visitType">
- </el-cascader>
- </el-form-item>
- <el-form-item label="回访日期"
- prop='visitTime'>
- <el-date-picker v-model.trim="visitForm.visitTime"
- align="right"
- style="width:220px!important;"
- type="date"
- placeholder="选择日期"
- :picker-options="pickerOptions"
- value-format="yyyy-MM-dd"></el-date-picker>
- </el-form-item>
- <el-form-item label="学员情况"
- prop="overview">
- <el-input type="textarea"
- v-model="visitForm.overview"
- style="width:80%!important;"
- :rows="3"
- maxlength="50"
- show-word-limit></el-input>
- </el-form-item>
- <el-form-item label="家长反馈"
- prop='feedback'>
- <el-input type="textarea"
- v-model="visitForm.feedback"
- style="width:80%!important;"
- :rows="3"
- maxlength="50"
- show-word-limit></el-input>
- </el-form-item>
- </el-form>
- <span slot="footer"
- class="dialog-footer">
- <el-button @click="visitVisiable = false">取 消</el-button>
- <el-button type="primary"
- @click="submitAddVisit">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog title="更改声部"
- :visible.sync="changeVoiceVisible"
- @close="closeChangeVoice"
- :destroy-on-close="true"
- width="500px">
- <changeVoice @close="closeChangeVoice"
- @submited="getList"
- :detail.sync="rowDetail"
- :musicGroupId="id"
- :voiceList="leftList" />
- </el-dialog>
- </div>
- </template>
- <script>
- import pagination from '@/components/Pagination/index'
- import { getintoClass, getStudentList, findSound, musicGroupOpenPay, openPayment, musicGroupFound, extensionPayment, resetPlanNum, cancelMusicGroup, getTeamBaseInfo, studentApplyDetailExport, StudentQuit } from '@/api/buildTeam'
- import { resetStudentSubject, getStudentFeeDetail } from '@/api/studentManager'
- import { vaildStudentUrl, vaildTeacherUrl } from '@/utils/validate'
- import { addVisit } from "@/views/returnVisitManager/api.js"
- import QRCode from 'qrcodejs2'
- import { visitChiose } from '@/utils/searchArray'
- import axios from 'axios'
- import { getToken } from '@/utils/auth'
- import load from '@/utils/loading'
- import qs from 'qs'
- import { permission } from "@/utils/directivePage";
- import cleanDeep from 'clean-deep'
- import changeVoice from './modals/change-voice'
- export default {
- name: 'signupList',
- components: {
- pagination,
- changeVoice,
- },
- data () {
- return {
- multipleSelection: [], //
- isEdit: false,
- rowDetail: null,
- changeVoiceVisible: false,
- subjectVisible: false,
- orderVisible: false,
- quitVisible: false,
- leftList: [],
- rightList: [],
- searchFrom: {
- name: '',
- subject: '', // 专业
- isAllowAdjust: '' // 是否允许调剂
- },
- quitForm: {
- // 退团信息确认
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- reason: ""
- },
- stepImgs: {
- APPLY: require('@/assets/images/base/clock.png'),
- PAY: require('@/assets/images/base/pay.png')
- },
- status: '',
- id: '',
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 30, 40] // 选择限制显示条数
- },
- teamName: '',
- maskForm: {
- subject: ''
- },
- activeId: '',
- soundList: [],
- orderForm: {
- name: '',
- totalAmount: '',
- subject: '',
- subjectFee: '',
- axe: '',
- axePrice: '',
- others: '',
- othersPrice: ''
- },
- paymentStatus: false,
- paymentForm: {
- paymentExpireDate: null,
- // feeType: null
- },
- paymentRules: {
- paymentExpireDate: [{ required: true, message: '请设置缴费截止日期', trigger: 'blur' }]
- },
- paymentNum: 0, // 缴费了多少人
- qrcodeStatus: false, // 生成二维码
- qrcodes: true,
- qrcode: null,
- codeUrl: null,
- qrcodeStatus2: false, // 生成二维码
- qrcodes2: true,
- qrcode2: null,
- codeUrl2: null,
- extendPaymentStatus: false,
- extendForm: {
- expireDate: null,
- },
- extendRule: {
- expireDate: [{ required: true, message: '请选择延长时间', trigger: 'change' }]
- },
- quitRules: {
- isRefundCourseFee: [
- { required: true, message: "请选择是否退还课程费用" }
- ],
- isRefundInstrumentFee: [
- { required: true, message: "选择是否退还乐器费用" }
- ],
- isRefundTeachingAssistantsFee: [
- { required: true, message: "选择是否退还教辅费用" }
- ]
- },
- Fsearch: null,
- Frules: null,
- applyExpireDate: '',
- activeRow: null,
- visitVisiable: false,
- visitForm: {
- musicGroupId: '',
- overview: '',
- purpose: '',
- studentId: '',
- type: '',
- visitTime: '',
- visitType: '',
- feedback: '',
- studentName: ''
- },
- visitChiose,
- visitRules: {
- overview: [{ required: true, message: "请输入学生近况" }],
- feedback: [{ required: true, message: "请输入家长反馈" }],
- visitTime: [{ required: true, message: "请输入回访时间" }],
- visitType: [{ required: true, message: "请选择回访类型" }]
- }
- }
- },
- created () {
- // 通过乐团状态判断显示隐藏的东西
- this.init()
- },
- activated () {
- this.init()
- },
- methods: {
- permission (str) {
- return permission(str);
- },
- init () {
- this.status = this.$route.query.status;
- // 通过乐团id 获取乐团招生状态
- this.id = this.$route.query.id;
- this.teamName = this.$route.query.name
- // 判断是否带缓存参数
- if (this.$route.query.search) {
- this.Fsearch = this.$route.query.search;
- }
- if (this.$route.query.rules) {
- this.Frules = this.$route.query.rules
- }
- this.pickerOptions = this.beginDate();
- getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
- if (res.code == 200) {
- this.applyExpireDate = res.data.musicGroup.applyExpireDate;
- }
- })
- // 根据乐团id获乐团声部
- findSound({ musicGroupId: this.id }).then(res => {
- if (res.code == 200) {
- this.soundList = res.data;
- }
- })
- // 通过乐团id获取乐团学生列表
- this.getList()
- },
- search () {
- this.rules.page = 1;
- this.getList();
- },
- onReset () {
- this.rules.page = 1
- this.rules.limit = 10
- this.searchFrom = {
- name: null,
- subject: null, // 专业
- isAllowAdjust: null // 是否允许调剂
- }
- this.getList()
- },
- onCancel () {
- this.$router.push({ path: '/business/teamDetail', query: { search: this.Fsearch, rules: this.Frules } })
- },
- payStart () {
- this.paymentStatus = true;
- getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
- if (res.code == 200) {
- this.applyExpireDate = res.data.musicGroup.applyExpireDate;
- }
- })
- },
- getList () {
- let obj = {
- musicGroupId: this.id,
- actualSubjectId: this.searchFrom.subject || null,
- isAllowAdjust: this.searchFrom.isAllowAdjust || null,
- name: this.searchFrom.name || null,
- page: this.rules.page,
- rows: this.rules.limit
- }
- // 根据乐团id获取学团情况
- getintoClass({ musicGroupId: this.id }).then(res => {
- if (res.code == 200) {
- this.leftList = res.data;
- }
- })
- return getStudentList(obj).then(res => {
- if (res.code == 200) {
- res.data.rows.forEach(item => {
- // '未开启缴费', '开启缴费', '已缴费'
- if (item.paymentStatus == 2) {
- this.paymentNum += 1
- }
- })
- this.rightList = res.data.rows
- this.rules.total = res.data.total
- return res
- }
- })
- },
- onStartPayment (formName) { // 开启缴费
- this.$refs[formName].validate((valid) => {
- if (valid) {
- musicGroupOpenPay({
- musicGroupId: this.id,
- expireDate: this.paymentForm.paymentExpireDate,
- // feeType: this.paymentForm.feeType
- }).then(res => {
- if (res.code == 200) {
- this.$message.success('开启成功')
- this.paymentStatus = false
- this.$router.push({
- path: '/business/signupList',
- query: {
- status: 'PAY',
- id: this.$route.query.id,
- name: this.$route.query.name
- }
- })
- this.status = 'PAY'
- this.getList();
- }
- })
- } else {
- return false;
- }
- })
- // this.id
- },
- onSelectAll () { // 选中全部
- this.$refs.multipleTable.toggleAllSelection()
- },
- onPartPayment () { // 部分缴费
- let selection = this.multipleSelection
- if (selection.length <= 0) {
- this.$message.success('您还没有选择学生')
- return false
- }
- let ids = []
- selection.forEach(item => {
- ids.push(item.id)
- })
- this.$confirm(`是否确认提前缴费?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- openPayment({
- ids: ids.join(',')
- }).then(res => {
- if (res.code == 200) {
- this.$message.success('开启成功')
- this.getList()
- } else {
- this.$message.error(res.msg)
- }
- })
- }).catch(() => { })
- },
- onCreateQRCode () { // 生成报名二维码
- this.qrcodeStatus = true
- let id = this.id
- let teamName = this.$route.query.name
- setTimeout(() => {
- document.getElementById('qrcode').innerHTML = '';
- this.qrcode = new QRCode('qrcode', {
- width: 200,
- height: 200,
- colorDark: '#000000',
- colorLight: '#ffffff',
- correctLevel: QRCode.CorrectLevel.H
- })
- this.qrcode.makeCode(vaildStudentUrl() + '/#/login?musicGroupId=' + id)
- this.codeUrl = vaildStudentUrl() + '/#/login?musicGroupId=' + id
- }, 500)
- },
- onCreateQRCode2 () { // 生成报名二维码
- this.qrcodeStatus2 = true
- let id = this.id
- let teamName = this.$route.query.name
- setTimeout(() => {
- document.getElementById('qrcode2').innerHTML = '';
- this.qrcode2 = new QRCode('qrcode2', {
- width: 200,
- height: 200,
- colorDark: '#000000',
- colorLight: '#ffffff',
- correctLevel: QRCode.CorrectLevel.H
- })
- this.qrcode2.makeCode(vaildTeacherUrl() + '/#/order?musicGroupId=' + id + '&musicGroupName=' + teamName)
- this.codeUrl2 = vaildTeacherUrl() + '/#/order?musicGroupId=' + id + '&musicGroupName=' + teamName
- }, 500)
- },
- onDownLoadExecl () { // 报表导出
- let url = '/api-web/studentRegistration/queryStudentApplyDetailExport'
- let data = {
- musicGroupId: this.$route.query.id,
- page: 1,
- rows: 9999
- }
- const options = {
- method: 'POST',
- headers: {
- 'Authorization': getToken()
- },
- data: qs.stringify(data),
- url,
- responseType: 'blob'
- }
- this.$confirm('您确定导出吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- load.startLoading()
- axios(options).then(res => {
- let blob = new Blob([res.data], {
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
- type: 'application/vnd.ms-excel;charset=utf-8'
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
- })
- let text = (new Response(blob)).text()
- text.then(res => {
- // 判断是否报错
- if (res.indexOf('code') != -1) {
- let json = JSON.parse(res)
- this.$message.error(json.msg)
- } else {
- let objectUrl = URL.createObjectURL(blob)
- let link = document.createElement("a")
- let nowTime = new Date()
- let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
- let fname = this.$route.query.id + '-' + ymd //下载文件的名字
- link.href = objectUrl
- link.setAttribute("download", fname)
- document.body.appendChild(link)
- link.click()
- }
- })
- load.endLoading();
- }).catch(error => {
- this.$message.error('导出数据失败,请联系管理员');
- load.endLoading();
- })
- }).catch(() => { })
- },
- onGoHome () { // 确认开团
- // 判断是否有学生缴费
- if (this.paymentNum <= 0) {
- this.$message.error('当前缴费人数为0,无法开团')
- return
- }
- this.$confirm(`是否确认开团?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- musicGroupFound({
- musicGroupId: this.$route.query.id
- }).then(res => {
- if (res.code == 200) {
- this.$message.success('开启成功')
- this.$router.push({
- path: '/business/teamSeting',
- query: {
- status: 'PREPARE',
- id: this.$route.query.id,
- name: this.$route.query.name
- }
- })
- }
- })
- }).catch(() => {
- })
- },
- onClose () { // 停止乐团
- this.$confirm('您确定停止乐团吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- cancelMusicGroup({
- musicGroupId: this.$route.query.id
- }).then(res => {
- if (res.code == 200) {
- this.$message.success('停止成功')
- this.$router.push({
- path: '/business/teamDetail',
- query: { search: this.Fsearch, rules: this.Frules }
- })
- }
- })
- }).catch(() => {
- })
- },
- handleSelectionChange (val) {
- this.multipleSelection = val;
- },
- // 修改专业
- resetSubject (row) {
- this.activeId = row.studentId
- this.subjectVisible = true;
- // resetStudentSubject().then(res=>{]})
- },
- // 确认修改
- okReset () {
- if (!this.maskForm.subject) {
- this.$message.error('请选择调剂专业');
- return
- }
- resetStudentSubject({ musicGroupId: this.id, userId: this.activeId, subId: this.maskForm.subject }).then(res => {
- if (res.code == 200) {
- this.$message.success('修改成功');
- this.subjectVisible = false;
- this.maskForm.subject = '';
- getintoClass({ musicGroupId: this.id }).then(res => {
- if (res.code == 200) {
- this.leftList = res.data;
- }
- })
- this.getList();
- }
- })
- },
- onExtendPayment (formName) {
- this.$refs[formName].validate(valid => {
- if (valid) {
- extensionPayment({
- musicGroupId: this.id,
- expireDate: this.extendForm.expireDate
- }).then(res => {
- if (res.code == 200) {
- this.$message.success('延长缴费成功')
- this.extendPaymentStatus = false
- getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
- if (res.code == 200) {
- this.applyExpireDate = res.data.musicGroup.applyExpireDate;
- }
- })
- } else {
- this.$message.error(res.msg);
- }
- })
- }
- })
- },
- lookdetail (row) {
- this.orderVisible = true;
- this.activeId = row.studentId;
- this.orderForm.name = row.studentName;
- this.orderForm.subject = row.subjectName;
- getStudentFeeDetail({ musicGroupId: this.id, studentId: row.studentId }).then(res => {
- if (res.code == 200) {
- if (res.data) {
- this.orderForm.totalAmount = res.data.totalAmount;
- // this.orderForm.subjectFee = res.data.courseFee;
- let goodStr = '';
- let goodPrice = 0;
- let otherStr = '';
- let othersPrice = 0;
- for (let i in res.data.goods) {
- if (res.data.goods[i].goodsType == 'INSTRUMENT') {
- goodStr += res.data.goods[i].goodsName + ',';
- goodPrice += parseFloat(res.data.goods[i].musicalFee);
- // this.orderForm.axe = res.data.goods[i].goodsName;
- // this.orderForm.axePrice = res.data.goods[i].musicalFee;
- } else if (res.data.goods[i].goodsType == 'ACCESSORIES') {
- otherStr += res.data.goods[i].goodsName + ',';
- othersPrice += parseFloat(res.data.goods[i].musicalFee);
- // this.orderForm.others = res.data.goods[i].goodsName;
- // this.orderForm.othersPrice = res.data.goods[i].musicalFee;
- } else if (res.data.goods[i].goodsType == 'COURSE') {
- this.orderForm.subjectFee = res.data.goods[i].musicalFee
- }
- }
- this.orderForm.others = otherStr.substring(0, otherStr.length - 1);
- this.orderForm.othersPrice = othersPrice;
- this.orderForm.axe = goodStr.substring(0, goodStr.length - 1);
- this.orderForm.axePrice = goodPrice;
- }
- }
- })
- },
- saveIsEdit () {
- // 提交数据
- this.isEdit = false;
- resetPlanNum(this.leftList).then(res => {
- })
- },
- quitTeam (row) {
- this.activeRow = row;
- this.quitVisible = true;
- },
- quieTeams (row) {
- this.$confirm("确定退团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- // 发请求 退团
- StudentQuit({
- musicGroupId: this.id,
- userId: row.studentId,
- reason: '',
- isRefundCourseFee: false,
- isRefundInstrumentFee: false,
- isRefundTeachingAssistantsFee: false
- }).then(res => {
- this.quitForm = {
- // 退团信息确认
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- reason: ""
- };
- if (res.code == 200) {
- this.$message.success("退团成功");
- this.getList();
- this.quitVisible = false;
- }
- });
- })
- .catch(() => { });
- },
- chioseType () {
- this.$refs["quitForm"].validate(res => {
- if (res) {
- this.$confirm("确定退团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- let row = this.activeRow;
- // 发请求 退团
- StudentQuit({
- musicGroupId: this.id,
- userId: row.studentId,
- reason: this.quitForm.reason,
- isRefundCourseFee: this.quitForm.isRefundCourseFee,
- isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
- isRefundTeachingAssistantsFee: this.quitForm
- .isRefundTeachingAssistantsFee
- }).then(res => {
- this.quitForm = {
- // 退团信息确认
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- reason: ""
- };
- if (res.code == 200) {
- this.$message.success("退团成功");
- this.getList();
- this.quitVisible = false;
- }
- });
- })
- .catch(() => { });
- } else {
- }
- });
- // row.typeVisible = false;
- },
- addVisit (row) {
- this.visitForm.studentName = row.studentName;
- this.visitForm.musicGroupId = this.teamid
- this.visitForm.studentId = row.studentId
- this.visitVisiable = true;
- },
- openChangeVoice (row) {
- this.getList()
- .then(res => {
- for (const item of res.data.rows) {
- if (item.id === row.id) {
- this.rowDetail = { ...item }
- this.changeVoiceVisible = true
- }
- }
- })
- },
- closeChangeVoice () {
- this.changeVoiceVisible = false
- // this.rowDetail = null
- },
- handleChange (val) {
- this.visitForm.type = val[0]
- this.visitForm.purpose = val[1]
- },
- submitAddVisit () {
- this.$refs.visitForm.validate(res => {
- if (res) {
- this.visitForm.visitType = null;
- addVisit(cleanDeep(this.visitForm)).then(res => {
- if (res.code === 200) {
- this.$message.success('新增成功')
- this.visitVisiable = false
- }
- })
- }
- })
- },
- beginDate () {
- let self = this;
- return {
- firstDayOfWeek: 1,
- disabledDate (time) {
- return time.getTime() >= new Date().getTime(); //开始时间不选时,结束时间最大值小于等于当天
- }
- };
- },
- },
- watch: {
- orderVisible (val) {
- if (!val) {
- this.orderForm = {
- name: '',
- totalAmount: '',
- subject: '',
- subjectFee: '',
- axe: '',
- axePrice: '',
- others: '',
- othersPrice: ''
- }
- }
- },
- qrcodeStatus (val) {
- if (!val) {
- this.qrcode.clear()
- }
- },
- qrcodeStatus2 (val) {
- if (!val) {
- this.qrcode2.clear()
- }
- },
- paymentStatus (val) {
- if (!val) {
- this.paymentForm = {
- paymentExpireDate: null,
- // feeType: null
- }
- }
- },
- quitVisible (val) {
- if (!val) {
- this.quitForm = {
- // 退团信息确认
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- reason: ""
- };
- this.$refs["quitForm"].resetFields();
- }
- },
- visitVisiable (val) {
- if (!val) {
- this.$refs["visitForm"].resetFields();
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .sigup-container {
- margin-left: 12px;
- .topWrap {
- padding: 18px 58px;
- // height: 136px;
- background-color: #fff;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- .msg.pay {
- color: #f85043;
- }
- .msg {
- text-align: right;
- color: #f97215;
- font-size: 32px;
- font-weight: bold;
- padding-top: 30px;
- box-sizing: border-box;
- img {
- width: 36px;
- height: 36px;
- position: relative;
- top: 5px;
- margin-right: 8px;
- }
- }
- h2 {
- height: 48px;
- line-height: 48px;
- position: relative;
- // padding-left: 30px;
- font-size: 32px;
- font-weight: 600;
- margin-bottom: 10px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- .term {
- height: 32px;
- line-height: 32px;
- border-radius: 24px;
- width: 100px;
- color: #14928a;
- border: 1px solid rgba(20, 146, 138, 1);
- font-size: 14px;
- text-align: center;
- margin-right: 12px;
- &:nth-child(1) {
- margin-left: 47px;
- }
- }
- .term.active {
- color: #fff;
- background-color: #14928a;
- }
- .squrt {
- position: absolute;
- left: -25px;
- top: 8px;
- height: 34px;
- width: 8px;
- background-color: #14928a;
- }
- }
- .btnList {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- div {
- margin-right: 15px;
- }
- }
- .newBand.close {
- background-color: #777;
- border: 1px solid #777;
- }
- }
- .searchList {
- background-color: #fff;
- padding: 0 58px;
- }
- .sigup-core {
- margin-top: 12px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- .left {
- width: 340px;
- background-color: #fff;
- height: 80vh;
- overflow: auto;
- }
- .right {
- width: calc(100% - 340px);
- margin-left: 12px;
- flex-grow: 1;
- }
- }
- }
- .el-dialog__body {
- overflow: hidden;
- }
- .left-code,
- .right-code {
- // width: 50%;
- // float: left;
- h2 {
- font-size: 18px;
- text-align: center;
- padding-bottom: 8px;
- }
- .qrcode {
- display: flex;
- flex-direction: column;
- align-items: center;
- img {
- width: 200px;
- height: 200px;
- margin: 0 auto;
- }
- }
- .code-url {
- font-size: 18px;
- text-align: center;
- padding: 15px 15px 0 15px;
- }
- }
- .newBand {
- margin-bottom: 0;
- }
- /deep/.el-button--danger {
- background: #f85043;
- }
- .paymentForm {
- /deep/.el-input__inner,
- /deep/.el-input.el-input--suffix {
- width: 360px !important;
- }
- }
- </style>
|