12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922 |
- <template>
- <div class="stu-container">
- <div class="studentListWrap" v-if="team_status == 'PROGRESS'">
- <div
- class="newBand"
- v-permission="'studentRegistration/insertStudent'"
- @click="createStudentFrom"
- >
- 新增学员
- </div>
- <div
- class="newBand"
- v-permission="'studentRegistration/insertStudent'"
- @click="addTryTime"
- >
- 增加会员试用期
- </div>
- </div>
- <!-- 搜索类型 -->
- <save-form
- ref="searchForm"
- :inline="true"
- :save-key="saveKey"
- class="searchForm"
- @submit="search"
- @reset="onReSet"
- :model="searchForm"
- >
- <el-form-item prop="search">
- <el-input
- v-model.trim="searchForm.search"
- clearable
- placeholder="学生姓名或电话"
- @keyup.enter.native="search"
- ></el-input>
- </el-form-item>
- <el-form-item prop="studentStatus">
- <el-select
- v-model.trim="searchForm.studentStatus"
- clearable
- filterable
- placeholder="学员状态"
- >
- <el-option label="在读" value="NORMAL"></el-option>
- <el-option label="请假" value="LEAVE"></el-option>
- <el-option label="退团" value="QUIT"></el-option>
- <el-option label="报名" value="APPLY"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="createYear">
- <el-date-picker
- v-model="searchForm.createYear"
- type="year"
- value-format="yyyy"
- placeholder="选择入团年份"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item prop="currentGrade">
- <!-- <el-input
- v-model.trim="searchForm.currentGrade"
- clearable
- placeholder="学员年级"
- ></el-input> -->
- <el-select
- v-model.trim="searchForm.currentGrade"
- filterable
- clearable
- placeholder="请选择年级"
- >
- <el-option
- v-for="(item, index) in gradeList"
- :key="index"
- :label="item.label"
- :value="item.label"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="classGroupId">
- <el-select
- v-model.trim="searchForm.classGroupId"
- clearable
- filterable
- placeholder="请选择班级"
- >
- <el-option
- v-for="(item, index) in classList"
- :key="index"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="major">
- <el-select
- v-model.trim="searchForm.major"
- clearable
- filterable
- placeholder="所选专业"
- >
- <el-option
- v-for="(item, index) in soundList"
- :key="index"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="isPay">
- <el-select
- v-model.trim="searchForm.isPay"
- clearable
- filterable
- placeholder="报名缴费"
- >
- <el-option label="未开启缴费" value="0"></el-option>
- <el-option label="开启缴费" value="1"></el-option>
- <el-option label="已缴费" value="2"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="oweFlag">
- <el-select
- v-model.trim="searchForm.oweFlag"
- clearable
- filterable
- placeholder="是否欠费"
- >
- <el-option label="否" value="0"></el-option>
- <el-option label="是" value="1"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="isActive">
- <el-select
- v-model.trim="searchForm.isActive"
- clearable
- filterable
- placeholder="是否激活"
- >
- <el-option label="是" value="1"></el-option>
- <el-option label="否" value="0"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="hasCourse">
- <el-select
- v-model.trim="searchForm.hasCourse"
- clearable
- placeholder="VIP/网管是否有课"
- >
- <el-option label="是" value="true"></el-option>
- <el-option label="否" value="false"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="carePackage">
- <el-select
- class="multiple"
- v-model.trim="searchForm.carePackage"
- clearable
- placeholder="关心包"
- >
- <el-option label="不可用" :value="0"></el-option>
- <el-option label="可用" :value="1"></el-option>
- <el-option label="已使用" :value="2"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="comeOnPackage">
- <el-select
- class="multiple"
- v-model.trim="searchForm.comeOnPackage"
- clearable
- placeholder="加油包"
- >
- <el-option label="不可用" :value="0"></el-option>
- <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 type="primary" native-type="reset">重置</el-button>
- <el-button
- type="primary"
- v-permission="'export/musicGroupStudent'"
- @click="onMusicGroupExport"
- >导出</el-button
- >
- </el-form-item>
- </save-form>
- <div style="font-size: 14px; color: #f85043; padding-bottom: 10px">
- 在读人数:{{ studentListInfo.studying
- }}<i style="width: 10px; display: inline-block"></i> 退团人数:{{
- studentListInfo.quit
- }}<i style="width: 10px; display: inline-block"></i> VIP&网管转化率:{{
- studentListInfo.courseRate
- }}<i style="width: 10px; display: inline-block"></i>
- </div>
- <!-- 列表 -->
- <div class="tableWrap">
- <el-table
- :data="tableList"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- width="55"
- :selectable="checkboxSelect"
- ></el-table-column>
- <el-table-column label="学员编号" width="120px;" prop="userId">
- <template slot-scope="scope">
- <div
- @click="gotoStudent(scope.row.userId)"
- style="color: #14928a; cursor: pointer"
- >
- <copy-text>
- {{ scope.row.userId }}
- </copy-text>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="学员姓名" width="120px;" prop="realName">
- <template slot-scope="scope">
- <div
- @click="gotoStudent(scope.row.realName)"
- style="color: #14928a; cursor: pointer"
- >
- <copy-text>
- {{ scope.row.realName }}
- </copy-text>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="gender"
- width="50px;"
- label="性别"
- >
- <template slot-scope="scope">
- <div>{{ scope.row.gender | sex }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="phone" label="联系电话">
- <template slot-scope="scope">
- <copy-text>
- {{ scope.row.phone }}
- </copy-text>
- </template>
- </el-table-column>
- <el-table-column align="center" label="入团年份">
- <template slot-scope="scope">
- <div>{{ scope.row.registerTime | dayjsFormat("YYYY年") }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="年级班级">
- <template slot-scope="scope">
- <div>{{ scope.row.currentGrade + scope.row.currentClass }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="报名专业" prop="subjectName">
- <template slot-scope="scope">
- <copy-text>
- {{ scope.row.regSubjectName }}
- </copy-text>
- </template>
- </el-table-column>
- <el-table-column align="center" label="入团专业" prop="subjectName">
- <template slot-scope="scope">
- <copy-text>
- {{ scope.row.subjectName }}
- </copy-text>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="studentStatus" label="学员状态">
- <template slot-scope="scope">
- <div>{{ scope.row.studentStatus | musicGroupStudentType }}</div>
- </template>
- </el-table-column>
- <!-- <el-table-column align="center" label="新增学员">
- <template slot-scope="scope">
- <div>{{ scope.row.isNewStudent | yesOrNo }}</div>
- </template>
- </el-table-column> -->
- <el-table-column align="center" label="报名缴费">
- <template slot-scope="scope">
- <div>{{ scope.row.paymentStatus | paymentStatus }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="是否激活">
- <template slot-scope="scope">
- <div>{{ scope.row.isActive ? "是" : "否" }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="VIP/网管是否有课">
- <template slot-scope="scope">
- <div>{{ scope.row.hasCourse ? "是" : "否" }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="关心包">
- <template slot-scope="scope">{{
- scope.row.carePackage | studentPackage
- }}</template>
- </el-table-column>
- <el-table-column align="center" label="加油包">
- <template slot-scope="scope">{{
- scope.row.comeOnPackage | studentPackage
- }}</template>
- </el-table-column>
- <el-table-column align="center" label="欠费金额(元)">
- <template slot-scope="scope">
- <div :class="[scope.row.noPaymentAmount > 0 ? 'error' : null]">
- {{ scope.row.noPaymentAmount | moneyFormat }}
- <!-- musicGroupPaymentCalenderDetail/queryPage/studentList -->
- <auth
- auths="musicGroupPaymentCalenderDetail/queryPage/studentList"
- :router="['/business/resetTeaming']"
- >
- <i
- style="color: #14928a; font-size: 17px"
- title="缴费记录"
- class="el-icon-view"
- @click="onPaymentDetail(scope.row)"
- ></i>
- </auth>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="退团原因" align="center">
- <template slot-scope="scope">
- <div>
- <Tooltip :content="scope.row.quitReason" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="乐团会员有效期" align="center" width="100px">
- <template slot-scope="scope">
- <div>
- {{ scope.row.membershipEndTime | dayjsFormat }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="备注" prop="remark" align="center">
- <template slot-scope="scope">
- <div>
- <overflow-text :text="scope.row.remark"></overflow-text>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- fixed="right"
- width="360px;"
- label="操作"
- >
- <template slot-scope="scope">
- <div>
- <el-button
- type="text"
- v-if="
- permission('studentManage/queryStudentClassGroup') &&
- scope.row.studentStatus != 'QUIT'
- "
- @click="lookClass(scope.row)"
- >查看班级</el-button
- >
- <el-button
- type="text"
- v-if="
- permission('musicGroupPaymentCalender/add') &&
- scope.row.studentStatus == 'APPLY' &&
- scope.row.paymentStatus != '2' &&
- team_status == 'PROGRESS'
- "
- @click="addPay(scope.row)"
- >添加缴费</el-button
- >
- <el-button
- type="text"
- v-if="
- permission('musicGroupQuit/directQuitMusicGroup/3852') &&
- scope.row.studentStatus != 'QUIT'
- "
- @click="quieTeamMask(scope.row)"
- >退团退费</el-button
- >
- <el-button
- type="text"
- v-if="
- permission('musicGroupQuit/directQuitMusicGroup/3851') &&
- scope.row.studentStatus != 'QUIT'
- "
- @click="quieTeam(scope.row)"
- >退团</el-button
- >
- <el-button
- type="text"
- v-if="permission('visit/add/teamStudentList')"
- @click="addVisit(scope.row)"
- >新增回访</el-button
- >
- <!-- <el-popover
- v-show="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> -->
- </div>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- :save-key="saveKey"
- sync
- :total.sync="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="getList"
- />
- </div>
- <el-dialog
- title="新增学员"
- width="700px"
- class="studentInfo"
- :visible.sync="addStudentVisible"
- >
- <el-form
- :model="maskForm"
- label-position="right"
- label-width="120px"
- ref="maskForm"
- :rules="maskRules"
- :inline="true"
- >
- <el-alert title="基本信息" :closable="false" class="alert" type="info">
- </el-alert>
- <el-form-item
- label="联系电话"
- prop="phone"
- :rules="[
- { required: true, message: '请输入手机号' },
- {
- pattern: /^1[3456789]\d{9}$/,
- message: '请输入正确的手机号',
- trigger: 'blur',
- },
- ]"
- >
- <el-input
- v-model.trim="maskForm.phone"
- placeholder="联系电话"
- @blur="checkPhone(maskForm.phone)"
- ></el-input>
- </el-form-item>
- <el-form-item label="学员姓名" prop="studentName">
- <el-input
- v-model.trim="maskForm.studentName"
- placeholder="学员姓名"
- ></el-input>
- </el-form-item>
- <el-form-item label="学员性别" prop="sex">
- <el-select
- v-model.trim="maskForm.sex"
- clearable
- style="width: 185px !important"
- >
- <el-option label="男" :value="1"></el-option>
- <el-option label="女" :value="0"></el-option>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="家长姓名" prop="parentName">
- <el-input
- v-model.trim="maskForm.parentName"
- placeholder="家长姓名"
- ></el-input>
- </el-form-item> -->
- <el-form-item label="年级" prop="currentGradeNum">
- <el-select
- placeholder="起始年级"
- filterable
- clearable
- v-model.trim="maskForm.currentGradeNum"
- style="width: 185px !important"
- >
- <el-option
- v-for="item in gradeList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- <!-- <el-option value="一年级" label="一年级"></el-option>
- <el-option value="二年级" label="二年级"></el-option>
- <el-option value="三年级" label="三年级"></el-option>
- <el-option value="四年级" label="四年级"></el-option>
- <el-option value="五年级" label="五年级"></el-option>
- <el-option value="六年级" label="六年级"></el-option>
- <el-option value="初一" label="初一"></el-option>
- <el-option value="初二" label="初二"></el-option>
- <el-option value="初三" label="初三"></el-option>
- <el-option value="高一" label="高一"></el-option>
- <el-option value="高二" label="高二"></el-option>
- <el-option value="高三" label="高三"></el-option> -->
- </el-select>
- </el-form-item>
- <el-form-item label="班级" prop="course">
- <el-input
- v-model.trim="maskForm.course"
- placeholder="班级"
- ></el-input>
- </el-form-item>
- <el-form-item label="学员声部" prop="sound">
- <el-select
- v-model.trim="maskForm.sound"
- clearable
- filterable
- @change="onSoundChange"
- style="width: 185px !important"
- >
- <el-option
- v-for="(item, index) in soundList"
- :key="index"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="证件号"
- prop="id">
- <el-input v-model.trim="maskForm.id"></el-input>
- </el-form-item>-->
- <el-form-item label="出生日期" style="margin-right: 0" prop="timer">
- <el-col :span="24">
- <el-date-picker
- v-model.trim="maskForm.timer"
- value-format="yyyy-MM-dd"
- type="date"
- :picker-options="{
- firstDayOfWeek: 1,
- }"
- placeholder="选择日期"
- ></el-date-picker>
- </el-col>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <!-- <el-button @click="addStudentVisible = false">取 消</el-button> -->
- <el-button type="primary" @click="addStudent">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog
- title="学员所在班级"
- width="640px"
- :visible.sync="studentClassVisible"
- >
- <el-form :model="classMask">
- <el-form-item label="学生姓名">{{
- classMask.studentName
- }}</el-form-item>
- <el-form-item
- label="所在班级"
- v-for="(item, index) in classLists"
- :key="index"
- >{{ item.name }}</el-form-item
- >
- </el-form>
- </el-dialog>
- <!-- 退团弹窗 -->
- <el-dialog title="退团信息确认" width="640px" :visible.sync="quitVisible">
- <quiteTeam :quitForm="quitForm" :activeRow="activeRow" ref="quitForm" />
- <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>退还乐保费用:报名缴费时缴费的乐保费用</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>
- <el-dialog
- title="修改缴费周期"
- :before-close="closePayVisible"
- width="600px"
- :visible.sync="payVisible"
- >
- <el-form :model="payForm" ref="payForm" :inline="true">
- <el-form-item label="学生姓名" prop="studentName">
- <el-input v-model.trim="payForm.studentName" disabled></el-input>
- </el-form-item>
- <br />
- <el-form-item label="缴费金额" prop="payMoney">
- <el-input
- type="number"
- v-model.trim="payForm.payMoney"
- @mousewheel.native.prevent
- ></el-input>
- </el-form-item>
- <el-form-item label="缴费月份" prop="payMonth">
- <el-checkbox-group
- v-model.trim="payForm.payMonth"
- fill="#14928A"
- text-color="#474747"
- >
- <el-checkbox label="1">一月</el-checkbox>
- <el-checkbox label="2">二月</el-checkbox>
- <el-checkbox label="3">三月</el-checkbox>
- <el-checkbox label="4">四月</el-checkbox>
- <el-checkbox label="5">五月</el-checkbox>
- <el-checkbox label="6">六月</el-checkbox>
- <el-checkbox label="7">七月</el-checkbox>
- <el-checkbox label="8">八月</el-checkbox>
- <el-checkbox label="9">九月</el-checkbox>
- <el-checkbox label="10">十月</el-checkbox>
- <el-checkbox label="11">十一月</el-checkbox>
- <el-checkbox label="12">十二月</el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- <!-- studentName: '',
- payMoney: '',
- payMonth-->
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="quitVisible = false">取 消</el-button>
- <el-button type="primary" @click="submitPay">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog
- title="新增回访"
- width="500px"
- destroy-on-close
- :close-on-click-modal="false"
- :visible.sync="visitVisiable"
- >
- <visit
- v-if="visitVisiable && detail"
- :detail="detail"
- @close="visitVisiable = false"
- @submited="getList"
- />
- </el-dialog>
- <el-dialog
- title="选择班级"
- destroy-on-close
- width="830px"
- :visible.sync="createUserPayVisible"
- >
- <createUserPay
- :signList="signList"
- :mixList="mixList"
- :highList="highList"
- :snapList="snapList"
- :highonlineList="highonlineList"
- :musicGroupId="this.teamid"
- :organizationCourseUnitPriceSettings="
- organizationCourseUnitPriceSettings
- "
- :createdUserId="createdUserId"
- :baseInfo="baseInfo"
- @submited="getList"
- @close="createUserPayVisible = false"
- />
- </el-dialog>
- <el-dialog
- title="缴费记录"
- width="900px"
- :visible.sync="paymentDetailVisible"
- >
- <payment-list
- v-if="paymentDetailVisible"
- :paymentDetail="paymentDetail"
- @close="paymentDetailVisible = false"
- />
- </el-dialog>
- <el-dialog
- title="订单详情"
- :visible.sync="orderVisible"
- width="600px"
- v-if="orderVisible"
- >
- <el-form :model="orderForm" :inline="true">
- <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="新增会员试用期"
- width="600px"
- :visible.sync="addTryVisible"
- >
- <addTryList
- ref="addTry"
- v-if="addTryVisible"
- :multipleSelection="multipleSelection"
- :memberRankList="memberRankList"
- @close="addTryVisible = false"
- @submited="getList"
- />
- <div slot="footer" class="dialog-footer">
- <el-button @click="addTryVisible = false">取 消</el-button>
- <el-button type="primary" @click="submitAddTryTime"
- >确 定</el-button
- >
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- getTeamStudentList,
- getTeamStudentInfo,
- findSound,
- StudentQuit,
- findSubjectPlan,
- getGoods,
- getMusicGroup,
- getMusicGroupAllClass,
- StudentFeeIsLock,
- updateStudentFee,
- getMusicGroupGradeList,
- } from "@/api/buildTeam";
- import {
- addStudent,
- getStudentClass,
- getStudentInfoByPhone,
- } from "@/api/studentManager";
- import { getAllmemberRank } from "@/views/resetTeaming/api";
- import qrCode from "@/components/QrCode/index";
- import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
- import { visitChiose } from "@/utils/searchArray";
- import pagination from "@/components/Pagination/index";
- import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
- import QRCode from "qrcodejs2";
- import axios from "axios";
- import { getToken } from "@/utils/auth";
- import { permission } from "@/utils/directivePage";
- import { addVisit } from "@/views/returnVisitManager/api.js";
- import cleanDeep from "clean-deep";
- import createUserPay from "./modals/create-user-pay.vue";
- import TimesView from "./modals/course-time-detail";
- import paymentCycle from "../../resetTeaming/modals/payment-cycle";
- import paymentList from "./modals/payment-list";
- import Tooltip from "@/components/Tooltip/index";
- import changeVoice from "@/views/teamBuild/modals/change-voice";
- //import changeVoice from "./modals/change-voice";
- import visit from "@/views/withdrawal-application/modals/visit";
- import mergeMusic from "@/views/teamBuild/components/merge-music";
- import quiteTeam from "@/views/teamDetail/components/modals/quite-team";
- import addTryList from "@/views/teamDetail/components/modals/addTryList";
- export default {
- name: "tstudentList",
- data() {
- return {
- detail: null,
- teamid: "",
- paymentDetailVisible: false,
- paymentDetail: {},
- payVisible: false,
- quitVisible: false, // 退团信息确认的弹窗
- studentClassVisible: false, // 学员所在班级弹窗
- addStudentVisible: false, //新增学员弹窗
- timesVisible: false,
- timerDetail: null,
- topFrom: {
- // 顶部的禁选框集合
- expect: "2", // 预期招生
- studing: "5", // 在读人数
- allmoney: "100", //实收总额
- students: "5", // 实际招生人数
- signout: "10", // 退团总数
- },
- searchForm: {
- studentStatus: "", // 学生状态
- major: "", // 报名专业
- isPay: "", // 是否缴费
- search: "",
- isActive: "",
- oweFlag: "",
- currentGrade: null,
- createYear: null,
- classGroupId: null,
- hasCourse: null,
- carePackage: null,
- comeOnPackage: null,
- },
- organizationCourseUnitPriceSettings: [],
- quitForm: {
- // 退团信息确认
- isCloudTeacherAmount: null,
- cloudTeacherAmount: null,
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- isMaintenanceFee: null,
- maintenanceFee: 0,
- reason: "",
- },
- classMask: {
- studentName: "",
- },
- baseInfo: {},
- searchLsit: [],
- tableList: [], //
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- studentListInfo: {
- add: "",
- quit: "",
- studying: "",
- courseRate: "",
- },
- signList: [],
- mixList: [],
- highList: [],
- snapList: [],
- soundList: [],
- highonlineList: [],
- muiscnetworkList: [],
- qrcodeStatus: false, // 生成二维码
- qrcodes: true,
- qrcode: null,
- codeUrl: null,
- gradeList: [], // 学生
- maskForm: {
- studentName: "",
- sex: "",
- parentName: "",
- course: "",
- phone: "",
- sound: "",
- timer: "",
- signClass: "",
- mixClass: "",
- highClass: "",
- snapClass: [],
- highonline: "",
- muiscnetwork: "",
- startClass: "",
- currentGradeNum: null,
- id: "",
- // courseFee: null, // 声部费用
- temporaryCourseFee: null, // 本次课程费用
- musicGoodsIdList: null, // 乐器商品编号
- kitGroupPurchaseType: "GROUP", // 乐器购买方式
- musicPrice: null, // 乐器购买金额
- instrGoodsIdList: [], // 辅件商品编号
- instrPrice: null, // 辅件购买金额
- },
- remark: "", // 退团原因
- classList: [],
- maskRules: {
- studentName: [{ required: true, message: "请输入学生姓名" }],
- sex: [{ required: true, message: "请选择学生姓名" }],
- parentName: [{ required: true, message: "请输入家长姓名" }],
- course: [{ required: true, message: "请输入班级" }],
- // phone: [{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
- sound: [{ required: true, message: "请选择声部" }],
- timer: [{ required: true, message: "请选择出生日期" }],
- signClass: [{ required: true, message: "请选择声部班" }],
- // price: [{ required: true, message: '请输入首缴金额' },],
- currentGradeNum: [{ required: true, message: "请选择年级" }],
- id: [{ required: true, message: "请输入证件号" }],
- // courseFee: [{ required: true, message: "请输入声部费用" }],
- temporaryCourseFee: [{ required: true, message: "请输课程费用" }],
- musicGoodsIdList: [
- { required: true, message: "请选择乐器", trigger: "change" },
- ],
- musicPrice: [{ required: true, message: "请输入乐器购买金额" }],
- instrGoodsIdList: [{ required: true, message: "请选择辅件" }],
- instrPrice: [{ required: true, message: "请输入辅件金额" }],
- },
- INSTRUMENTLIST: [], // 乐器列表
- ACCESSORIESLIST: [], // 辅件列表
- activeRow: { hasMaintenance: false },
- Fsearch: null,
- Frules: null,
- payForm: {
- studentName: "",
- payMoney: "",
- payMonth: [],
- },
- kitStatus: false, // 乐器提供方式
- // 新增回访记录弹窗
- visitVisiable: false,
- visitForm: {
- musicGroupId: "",
- overview: "",
- purpose: "",
- studentId: "",
- type: "",
- visitTime: "",
- visitType: "",
- feedback: "",
- studentName: "",
- },
- cycles: [{}],
- collapse: [0],
- visitChiose,
- visitRules: {
- overview: [{ required: true, message: "请输入学生近况" }],
- feedback: [{ required: true, message: "请输入家长反馈" }],
- visitTime: [{ required: true, message: "请输入回访时间" }],
- visitType: [{ required: true, message: "请选择回访类型" }],
- },
- pickerOptions: null,
- classLists: null,
- createdUserId: 0,
- createUserPayVisible: false,
- team_status: "",
- // 整合报名中
- orderVisible: false,
- orderForm: {
- name: "",
- totalAmount: "",
- subject: "",
- subjectFee: "",
- axe: "",
- axePrice: "",
- others: "",
- othersPrice: "",
- },
- maskSoundForm: {
- subject: "",
- },
- subjectVisible: false,
- multipleSelection: [],
- isCanReg: false,
- organId: "",
- addTryVisible: false,
- memberRankList: [],
- };
- },
- components: {
- pagination,
- paymentCycle,
- createUserPay,
- Tooltip,
- "times-view": TimesView,
- paymentList,
- visit,
- qrCode,
- changeVoice,
- mergeMusic,
- quiteTeam,
- addTryList,
- },
- created() {},
- filters: {
- studentPays(val) {
- let template = {
- 0: "未缴费",
- 1: "已缴费",
- };
- return template[val];
- },
- },
- // activated() {
- // this.init();
- // },
- async mounted() {
- try {
- const res = await getOrganizationCourseUnitPriceSettings({
- rows: 9999,
- });
- this.organizationCourseUnitPriceSettings = res.data.rows;
- } catch (error) {}
- try {
- const res = await getAllmemberRank({ isDefault: 0 });
- this.memberRankList = res.data;
- } catch (e) {
- console.log(e);
- }
- this.init();
- },
- methods: {
- onPaymentDetail(row) {
- this.paymentDetail = row;
- this.paymentDetailVisible = true;
- },
- viewTimer(row) {
- // this.timerDetail = row
- this.timesVisible = true;
- },
- permission(str) {
- return permission(str);
- },
- async init() {
- this.teamid = this.$route.query.id;
- this.team_status = this.$route.query.team_status;
- this.organId = this.$route.query.organId;
- // 获取乐团是否能补招
- // try {
- // const ruselt = await checkCanReg({ musicGroupId: this.teamid });
- // this.isCanReg = ruselt.data;
- // } catch (e) {
- // console.log(e);
- // }
- getMusicGroupGradeList({ musicGroupId: this.teamid }).then((res) => {
- let result = res.data;
- if (res.code == 200 && result) {
- for (let i in result) {
- this.gradeList.push({
- value: i,
- label: result[i],
- });
- }
- }
- });
- // 获取报名截止日期和缴费截止日期
- // getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
- // if (res.code == 200) {
- // this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
- // this.applyExpireDate = res.data.musicGroup.applyExpireDate;
- // this.organId = res.data.musicGroup.organId;
- // }
- // });
- // 获取汇总数据
- // this.getTeamStudent();
- this.pickerOptions = this.beginDate();
- this.getList();
- // 获取乐团内所有声部
- findSound({ musicGroupId: this.teamid }).then((res) => {
- if (res.code == 200) {
- this.soundList = res.data;
- }
- });
- // this.getMusicClass()
- // 获取乐团基本信息
- getMusicGroup({ musicGroupId: this.teamid }).then(
- (res) => (this.baseInfo = res.data)
- );
- // 获取乐团所有合奏课
- },
- getMusicClass() {
- getMusicGroupAllClass({ musicGroupId: this.teamid }).then((res) => {
- if (res.code == 200) {
- this.classList = res.data;
- this.signList = [];
- this.mixList = [];
- this.highList = [];
- this.snapList = [];
- this.highonlineList = [];
- this.classList.forEach((item) => {
- if (item.type == "NORMAL") {
- this.signList.push(item);
- } else if (item.type == "MIX") {
- this.mixList.push(item);
- } else if (item.type == "HIGH") {
- this.highList.push(item);
- } else if (item.type == "HIGH_ONLINE" && item.studentNum < 6) {
- this.highonlineList.push(item);
- } else if (item.type == "SNAP") {
- this.snapList.push(item);
- } else if (item.type == "MUSIC_NETWORK") {
- this.muiscnetworkList.push(item);
- }
- });
- }
- });
- },
- getTeamStudent() {
- getTeamStudentInfo({ musicGroupId: this.teamid }).then((res) => {
- if (res.code == 200) {
- this.studentListInfo = res.data;
- }
- });
- },
- permission(str) {
- return permission(str);
- },
- onInstrumentChange() {
- // 乐器切换时
- // 乐器切换时
- // let tempkitType = this.maskForm.kitGroupPurchaseType
- // if(tempkitType == 'GROUP') {
- // this.INSTRUMENTLIST.forEach(item => {
- // if(item.value == value) {
- // this.maskForm.musicPrice = item.marketPrice
- // }
- // })
- // }
- },
- onKitGroupChnage(value) {
- // 乐器提供方式
- this.kitStatus = false;
- if (value == "FREE") {
- this.kitStatus = true;
- this.maskForm.musicPrice = 0;
- } else {
- this.maskForm.musicPrice = null;
- }
- },
- onMusicGroupExport() {
- let url = "/api-web/export/musicGroupStudent";
- let data = {
- musicGroupId: this.teamid,
- studentStatus: this.searchForm.studentStatus || null,
- paymentStatus: this.searchForm.isPay || null,
- subjectId: this.searchForm.major || null,
- search: this.searchForm.search || null,
- isActive: this.searchForm.isActive || null,
- classGroupId: this.searchForm.classGroupId || null,
- currentGrade: this.searchForm.currentGrade || null,
- createYear: this.searchForm.createYear || null,
- hasCourse: this.searchForm.hasCourse || null,
- comeOnPackage: this.searchForm.comeOnPackage,
- carePackage: this.searchForm.carePackage,
- };
- const options = {
- method: "get",
- headers: {
- Authorization: getToken(),
- },
- url,
- params: data,
- responseType: "blob",
- };
- this.$confirm("您确定导出学员列表?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- 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 objectUrl = URL.createObjectURL(blob);
- let link = document.createElement("a");
- let fname = this.$route.query.name + "学员列表.xls";
- link.href = objectUrl;
- link.setAttribute("download", fname);
- document.body.appendChild(link);
- link.click();
- });
- })
- .catch(() => {});
- },
- search() {
- this.rules.page = 1;
- this.getList();
- },
- onReSet() {
- this.$refs.searchForm.resetFields();
- this.search();
- },
- getList() {
- // getintoClass({ musicGroupId: this.teamid }).then((res) => {
- // if (res.code == 200) {
- // this.$set(this, "leftList", res.data);
- // // this.leftList = res.data;
- // }
- // });
- this.getTeamStudent();
- let obj = {
- musicGroupId: this.teamid,
- page: this.rules.page,
- rows: this.rules.limit,
- studentStatus: this.searchForm.studentStatus || null,
- paymentStatus: this.searchForm.isPay || null,
- subjectId: this.searchForm.major || null,
- search: this.searchForm.search || null,
- isActive: this.searchForm.isActive || null,
- classGroupId: this.searchForm.classGroupId || null,
- currentGrade: this.searchForm.currentGrade || null,
- createYear: this.searchForm.createYear || null,
- oweFlag: this.searchForm.oweFlag || null,
- hasCourse: this.searchForm.hasCourse || null,
- oweFlag: this.searchForm.oweFlag || null,
- comeOnPackage: this.searchForm.comeOnPackage,
- carePackage: this.searchForm.carePackage,
- };
- return getTeamStudentList(obj).then((res) => {
- if (res.code == 200) {
- this.tableList = res.data.rows;
- this.rules.total = res.data.total;
- return res;
- }
- });
- },
- addPay(row) {
- this.createUserPayVisible = true;
- this.createdUserId = row.userId;
- },
- addCycle() {
- this.cycles.push({});
- this.collapse.push(this.collapse.length);
- },
- removeCycle(index) {
- this.cycles[index] = null;
- this.cycles = this.cycles.filter((item) => !!item);
- this.collapse.pop();
- },
- collapseChange(val) {
- this.collapse = val;
- },
- gotoSignin() {
- this.$router.push({
- path: "/business/studentSignin",
- query: {
- id: this.teamid,
- status: this.$route.query.status,
- name: this.$route.query.name,
- rules: this.Frules,
- search: this.Fsearch,
- },
- });
- },
- chioseType() {
- // 父级验证子集表单
- this.$refs["quitForm"].$refs["quitForm"].validate((res) => {
- if (res) {
- this.$confirm("确定退团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- let row = this.activeRow;
- let params = {
- musicGroupId: this.teamid,
- userId: row.userId,
- reason: this.quitForm.reason,
- isRefundCourseFee: this.quitForm.isRefundCourseFee,
- isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
- isRefundTeachingAssistantsFee:
- this.quitForm.isRefundTeachingAssistantsFee,
- maintenanceFee: this.quitForm.maintenanceFee,
- isRefundMemberFee: this.quitForm.isRefundMemberFee,
- };
- // 退还乐器练习云教练费用
- if (this.quitForm.isRefundMemberFee) {
- params.cloudTeacherAmount = this.quitForm.cloudTeacherAmount;
- } else {
- params.cloudTeacherAmount = 0;
- }
- // 发请求 退团
- StudentQuit(params).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(() => {});
- } else {
- }
- });
- // row.typeVisible = false;
- },
- //
- addStudent() {
- // 发请求添加学员
- this.$refs["maskForm"].validate((res) => {
- if (res) {
- // this.maskForm.parentName.timer 少个生日的字段
- // classGroupId: maskForm.signClass
- /** <!-- signClass: '',
- mixClass: '',
- highClass: '',
- snapClass: [], --> */
- let maskForm = this.maskForm;
- // if (
- // !maskForm.signClass &&
- // !maskForm.mixClass &&
- // !maskForm.highClass &&
- // !maskForm.highonline &&
- // !maskForm.muiscnetwork
- // ) {
- // if (
- // !maskForm.snapClass ||
- // !(maskForm.snapClass && maskForm.snapClass.length >= 1)
- // ) {
- // this.$message.error("该学生必须加入一个班级");
- // return;
- // }
- // }
- if (
- maskForm.musicGoodsIdList &&
- (maskForm.musicPrice === "" || maskForm.musicPrice === null)
- ) {
- this.$message.error("请输入乐器金额");
- return;
- }
- if (
- maskForm.instrGoodsIdList &&
- maskForm.instrGoodsIdList.length > 0 &&
- (maskForm.instrPrice === "" || maskForm.instrPrice === null)
- ) {
- this.$message.error("请输入辅件金额");
- return;
- }
- let snapClassIds;
- maskForm.snapClass
- ? (snapClassIds = maskForm.snapClass.join(","))
- : (snapClassIds = null);
- let params = {
- signClassId: maskForm.signClass,
- mixClassId: maskForm.mixClass,
- snapClassIds,
- highClassId: maskForm.highClass,
- courseFee: maskForm.courseFee,
- temporaryCourseFee: maskForm.temporaryCourseFee,
- studentRegistration: {
- name: maskForm.studentName,
- gender: maskForm.sex,
- birthdate: maskForm.timer,
- parentsName: maskForm.parentName,
- parentsPhone: maskForm.phone,
- currentGrade: maskForm.startClass,
- currentGradeNum: maskForm.currentGradeNum,
- currentClass: maskForm.course,
- subjectId: maskForm.sound,
- musicGroupId: this.teamid,
- },
- };
- params.studentPaymentOrderDetails = [];
- if (maskForm.musicGoodsIdList) {
- params.studentPaymentOrderDetails.push({
- goodsIdList: maskForm.musicGoodsIdList,
- kitGroupPurchaseType: maskForm.kitGroupPurchaseType,
- type: "MUSICAL",
- price: maskForm.musicPrice,
- });
- }
- if (maskForm.instrGoodsIdList && maskForm.instrGoodsIdList != "") {
- params.studentPaymentOrderDetails.push({
- goodsIdList: maskForm.instrGoodsIdList.join(","),
- type: "ACCESSORIES",
- price: maskForm.instrPrice,
- });
- }
- addStudent(params).then((res) => {
- if (res.code == 200) {
- this.$message.success("添加学生成功");
- this.getList();
- this.addStudentVisible = false;
- this.createUserPayVisible = true;
- this.createdUserId = res.data;
- }
- this.$refs.maskForm.resetFields();
- });
- }
- });
- },
- onSoundChange(value) {
- // 学员声部切换时
- // this.findSubjectPlan(value)
- // this.ACCESSORIESLIST = [];
- // this.maskForm.instrGoodsIdList = [];
- // this.maskForm.instrPrice = null;
- // this.INSTRUMENTLIST = [];
- // this.maskForm.musicPrice = null;
- // this.maskForm.musicGoodsIdList = null;
- // this.getGoodsList(value, "INSTRUMENT"); // 乐器
- // this.getGoodsList(value, "ACCESSORIES"); // 辅件
- },
- // 获取购买方式
- findSubjectPlan(subjectId) {
- findSubjectPlan({
- musicGroupId: this.teamid,
- subjectId: subjectId,
- }).then((res) => {
- let result = res.data;
- if (res.code == 200) {
- this.maskForm.musicMode = this.getBranchType(
- result.kitGroupPurchaseType
- );
- }
- });
- },
- getGoodsList(subjectId, type) {
- getGoods({
- subjectId: subjectId,
- type: type,
- organId: this.organId,
- }).then((res) => {
- let result = res.data;
- if (res.code == 200) {
- let tempArr = [];
- result.forEach((item) => {
- tempArr.push({
- label: item.name,
- value: item.id,
- marketPrice: item.marketPrice,
- });
- });
- if (type == "ACCESSORIES") {
- this.ACCESSORIESLIST = tempArr;
- }
- if (type == "INSTRUMENT") {
- this.INSTRUMENTLIST = tempArr;
- }
- }
- });
- },
- getBranchType(status) {
- let common = {
- FREE: "免费",
- GROUP: "团购",
- LEASE: "租赁",
- };
- return common[status];
- },
- lookClass(row) {
- this.classMask.studentName = row.realName;
- getStudentClass({
- musicGroupId: this.teamid,
- teacherId: row.userId,
- }).then((res) => {
- if (res.code == 200) {
- this.classLists = res.data;
- this.studentClassVisible = true;
- }
- });
- },
- quieTeamMask(row) {
- this.activeRow = row;
- this.activeRow.courseViewType = this.baseInfo.courseViewType;
- this.quitVisible = true;
- this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount;
- },
- quieTeam(row) {
- this.$prompt("请输入退团原因", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- inputPattern: /\S/,
- inputErrorMessage: "请输入退团原因",
- })
- .then((val) => {
- // 发请求 退团
- StudentQuit({
- musicGroupId: this.teamid,
- userId: row.userId,
- reason: val.value,
- isRefundCourseFee: false,
- isRefundInstrumentFee: false,
- isRefundTeachingAssistantsFee: false,
- }).then((res) => {
- this.quitForm = {
- // 退团信息确认
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- isMaintenanceFee: null,
- cloudTeacherAmount: null,
- isCloudTeacherAmount: null,
- maintenanceFee: 0,
- reason: "",
- };
- if (res.code == 200) {
- this.$message.success("退团成功");
- this.getList();
- this.quitVisible = false;
- }
- });
- })
- .catch(() => {});
- },
- checkPhone(val) {
- var regu = /^1[3456789]\d{9}$/;
- var re = new RegExp(regu);
- if (re.test(val)) {
- getStudentInfoByPhone({ mobile: this.maskForm.phone }).then((res) => {
- if (res.code == 200) {
- if (res.data) {
- this.maskForm.studentName = res.data.name;
- this.maskForm.sex = res.data.gender;
- this.maskForm.parentName = res.data.parentsName;
- this.maskForm.course = res.data.currentClass;
- this.maskForm.startClass = res.data.currentGrade;
- this.maskForm.currentGradeNum = res.data.currentGradeNum
- ? res.data.currentGradeNum + ""
- : null;
- this.maskForm.phone = val;
- this.maskForm.timer = res.data.birthdate;
- }
- }
- });
- }
- },
- lockStudent(row) {
- this.$confirm("是否锁定/解锁学生缴费周期?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- let musicGroupId = this.teamid;
- let studentId = row.userId;
- let isLock;
- row.isLock == 0 ? (isLock = 1) : (isLock = 0);
- StudentFeeIsLock({ musicGroupId, studentId, isLock }).then((res) => {
- if (res.code == 200) {
- this.$message.success("修改成功");
- this.getList();
- }
- });
- })
- .catch(() => {});
- },
- resetPay(row) {
- this.activeRow = row;
- this.payVisible = true;
- this.payForm.studentName = row.realName;
- this.payForm.payMoney = row.courseFee;
- this.payForm.payMonth = row.paymentPeriodList.split(",");
- if (this.payForm.payMonth[0] == "") {
- this.payForm.payMonth = [];
- }
- },
- submitPay() {
- let studentId = this.activeRow.userId;
- let musicGroupId = this.teamid;
- let month = this.payForm.payMonth.join(",") || null;
- let amount = this.payForm.payMoney;
- let obj = {
- studentId,
- musicGroupId,
- month,
- amount,
- };
- updateStudentFee(obj).then((res) => {
- if (res.code == 200) {
- this.$message.success("修改成功");
- this.payVisible = false;
- this.getList();
- }
- });
- },
- closePayVisible() {
- this.$refs["payForm"].resetFields();
- this.payVisible = false;
- },
- addVisit(row) {
- console.log(row);
- this.detail = row;
- // this.visitForm.studentName = row.realName;
- // this.visitForm.musicGroupId = this.teamid;
- // this.visitForm.studentId = row.userId;
- this.visitVisiable = true;
- },
- handleChange(val) {
- this.visitForm.type = val[0];
- this.visitForm.purpose = val[1];
- },
- submitAddVisit() {
- console.log(this.$refs.visitForm);
- this.$refs.visitForm.validate((res) => {
- if (res) {
- 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(); //开始时间不选时,结束时间最大值小于等于当天
- },
- };
- },
- createStudentFrom() {
- this.addStudentVisible = true;
- },
- // 报名缴费功能
- payDate() {
- let self = this;
- return {
- firstDayOfWeek: 1,
- disabledDate(time) {
- if (self.applyExpireDate) {
- return (
- time.getTime() <=
- new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
- );
- } else {
- return false;
- }
- },
- };
- },
- applyDate() {
- let self = this;
- return {
- firstDayOfWeek: 1,
- disabledDate(time) {
- if (self.paymentExpireDate) {
- return (
- time.getTime() >
- new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
- );
- } else {
- return false;
- }
- },
- };
- },
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- checkboxSelect(row) {
- return row.studentStatus == "NORMAL";
- },
- gotoStudent(search) {
- // this.$router.push({
- // name: "teamCourseList",
- // params: { courseIdSearch: row.id },
- // });
- this.$router.push({
- name: "studentList",
- params: { search: search },
- });
- },
- addTryTime() {
- if (this.multipleSelection.length > 0) {
- this.addTryVisible = true;
- } else {
- this.$message.error("请至少选择一名学员");
- }
- },
- submitAddTryTime(){
- this.$refs.addTry.submit()
- }
- },
- watch: {
- createUserPayVisible(val) {
- if (val) {
- this.getMusicClass();
- }
- },
- "quitForm.isMaintenanceFee"(val) {
- if (val) {
- this.quitForm.maintenanceFee = 300;
- } else {
- this.quitForm.maintenanceFee = 0;
- }
- },
- quitVisible(val) {
- if (!val) {
- this.quitForm = {
- // 退团信息确认
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- isMaintenanceFee: null,
- cloudTeacherAmount: null,
- isCloudTeacherAmount: null,
- isRefundMemberFee: null,
- maintenanceFee: 0,
- reason: "",
- };
- this.$refs["quitForm"].$refs["quitForm"].resetFields();
- }
- },
- // visitVisiable(val) {
- // if (!val) {
- // this.$refs["visitForm"].resetFields();
- // }
- // },
- },
- computed: {
- saveKey() {
- // return 'teamDetails-'+this.$route.query.id
- return "teamDetails-studentList|id|" + this.$route.query.id;
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .dialog-footer.question {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- }
- // .moreInput {
- // width: 100%;
- // display: flex;
- // /deep/.el-form-item__content {
- // display: flex;
- // flex-direction: row;
- // }
- // }
- .error {
- color: red;
- }
- .el-select {
- width: 180px !important;
- }
- .headWrap {
- padding: 20px 0;
- }
- /deep/.el-date-editor.el-input {
- width: auto;
- .el-input__inner {
- padding-right: 0;
- }
- }
- .studentInfo {
- /deep/.el-dialog__body {
- // padding-top: 0;
- // padding-bottom: 0;
- }
- }
- // .instrList {
- // display: flex;
- // /deep/.el-form-item__content {
- // width: 80%;
- // }
- // .el-col {
- // /deep/.el-form-item__content {
- // width: 100%;
- // }
- // }
- // }
- .stu-container {
- .topFrom {
- margin: 20px 30px 0;
- width: 1000px;
- }
- .newStudent {
- width: 121px;
- height: 40px;
- background: rgba(20, 146, 138, 1);
- border-radius: 4px;
- color: #fff;
- text-align: center;
- line-height: 40px;
- font-size: 14px;
- cursor: pointer;
- }
- }
- .left-code,
- .right-code {
- // width: 50%;
- // float: left;
- h2 {
- display: block;
- font-size: 18px;
- text-align: center;
- padding-bottom: 8px;
- line-height: 1;
- height: 30px;
- margin-bottom: 0;
- }
- .qrcode {
- display: flex;
- justify-content: center;
- img {
- width: 200px;
- height: 200px;
- // margin: 0 auto;
- }
- }
- .code-url {
- font-size: 18px;
- text-align: center;
- padding: 15px 15px 0 15px;
- }
- }
- .export {
- background: #14928a;
- }
- .alert {
- margin-bottom: 10px;
- }
- .collapse-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- .el-icon-circle-close {
- font-size: 16px;
- margin-right: 10px;
- }
- }
- /deep/ .el-collapse-item__wrap {
- padding-top: 20px;
- }
- .cycleForm {
- /deep/ .el-form-item {
- display: flex;
- width: 100%;
- /deep/ .el-form-item__content {
- margin-left: 0 !important;
- flex: 1;
- }
- }
- }
- .statistic {
- padding: 20px 0;
- text-align: center;
- width: 100%;
- margin: auto !important;
- }
- .popoverWrap {
- p {
- line-height: 25px;
- }
- }
- .studentListWrap {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- div {
- margin-right: 15px;
- }
- }
- .btnList {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- flex-wrap: wrap;
- & > div {
- margin-right: 15px;
- margin-bottom: 10px;
- }
- }
- </style>
|