123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287 |
- <template>
- <div class='stu-container'>
- <!-- 头部展示 -->
- <div class="headWrap">
- <div class="left">
- <div class="headItem">
- <p>在读人数:<span>{{studentListInfo.studying}}</span></p>
- </div>
- <div class="headItem">
- <p>退团人数:<span>{{studentListInfo.quit}}</span></p>
- </div>
- <div class="headItem">
- <p>新增人数:<span>{{studentListInfo.add}}</span></p>
- </div>
- </div>
- <div class="right">
- <div class="newStudent"
- style="margin-bottom:10px;"
- @click="addStudentVisible = true">新增学员</div>
- <div class="newStudent"
- style="margin-bottom:10px;"
- @click="onCreateQRCode">报名连接</div>
- <div class="newStudent"
- @click='gotoSignin'>点名总览</div>
- </div>
- </div>
- <!-- 搜索类型 -->
- <el-form :inline="true"
- class="searchForm"
- v-model="searchForm">
- <el-form-item>
- <el-input v-model="searchForm.search"
- placeholder="学生姓名或电话"
- @keyup.enter.native='search'></el-input>
- </el-form-item>
- <el-form-item>
- <el-select v-model="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-select>
- </el-form-item>
- <el-form-item>
- <el-select v-model="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>
- <el-select v-model="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>
- <el-select v-model="searchForm.isPay"
- clearable
- filterable
- placeholder="报名缴费">
- <el-option label="完成缴费"
- value="PAID_COMPLETED"></el-option>
- <el-option label="未缴费"
- value="NON_PAYMENT"></el-option>
- <el-option label="缴费中"
- value="PROCESSING"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-select v-model="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>
- <el-select v-model="searchForm.school"
- placeholder="所在学校">
- <el-option label="item.text"
- value="1"></el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item>
- <div class='searchBtn'
- @click='search'>搜索</div>
- </el-form-item>
- <el-form-item>
- <div class='searchBtn export'
- v-permission="'export/musicGroupStudent'"
- @click='onMusicGroupExport'>导出</div>
- </el-form-item>
- </el-form>
- <!-- 列表 -->
- <div class="tableWrap">
- <el-table :data='tableList'
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
- <el-table-column label="学员编号"
- width="120px;"
- prop="userId">
- </el-table-column>
- <el-table-column label="学员姓名"
- width="120px;"
- prop="realName">
- </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="联系电话">
- </el-table-column>
- <!-- <el-table-column align='center'
- prop=""
- label="所在学校">
- </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">
- </el-table-column>
- <!-- <el-table-column align='center'
- label="乐团班级">
- </el-table-column>
- <el-table-column align='center'
- label="合奏班">
- </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.isLock?'已锁定':'可修改'}}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center"
- label="下次缴费日期"
- prop="nextPaymentDate">
- <template slot-scope="scope">
- {{ scope.row.nextPaymentDate | formatTimer }}
- </template>
- </el-table-column>
- <el-table-column align="center"
- label="缴费金额"
- prop="courseFee">
- </el-table-column>
- <el-table-column align='center'
- label="报名缴费">
- <template slot-scope="scope">
- <div>
- {{ scope.row.paymentStatus | studentPays}}
- </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'
- fixed="right"
- width="250px;"
- label="操作">
- <template slot-scope="scope">
- <div v-if="scope.row.studentStatus != 'QUIT'">
- <!-- <el-popover placement="top"
- v-model="scope.row.typeVisible">
- <el-input v-model="remark"
- placeholder="请输入退团原因"></el-input>
- <el-button type="text"
- slot='reference'
- class='chiose'>
- 退团
- </el-button>
- <div style="text-align: right; margin-top: 20px">
- <el-button size="mini"
- type="text"
- @click="scope.row.typeVisible = false">取消</el-button>
- <el-button type="primary"
- size="mini"
- @click="chioseType(scope.row)">确定</el-button>
- </div>
- </el-popover> -->
- <el-button type="text"
- @click="lookClass(scope.row)">查看班级</el-button>
- <el-button type="text"
- v-if="!scope.row.isLock"
- @click="lockStudent(scope.row)">锁定</el-button>
- <el-button v-else
- type="text"
- @click="lockStudent(scope.row)">解锁</el-button>
- <el-button type="text"
- @click="resetPay(scope.row)">修改缴费</el-button>
- <el-button type='text'
- @click="quieTeamMask(scope.row)">退团</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <pagination :total="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="getList" />
- </div>
- <el-dialog title="新增学员"
- width="640px"
- class="studentInfo"
- :visible.sync="addStudentVisible">
- <el-form :model="maskForm"
- label-position="right"
- label-width="100px"
- ref='maskForm'
- :rules="maskRules"
- :inline="true">
- <el-divider>基本信息</el-divider>
- <el-form-item label="联系电话"
- :rules="[{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }]"
- prop="phone">
- <el-input v-model="maskForm.phone"
- placeholder="联系电话"
- @blur="checkPhone(maskForm.phone)"></el-input>
- </el-form-item>
- <el-form-item label="学员姓名"
- prop="studentName">
- <el-input v-model="maskForm.studentName"
- placeholder="学员姓名"></el-input>
- </el-form-item>
- <el-form-item label="学员性别"
- prop="sex">
- <el-select v-model="maskForm.sex"
- clearable>
- <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="maskForm.parentName"
- placeholder="家长姓名"></el-input>
- </el-form-item>
- <el-form-item label="年级"
- prop="startClass">
- <el-select placeholder="起始年级"
- filterable
- clearable
- v-model="maskForm.startClass">
- <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="maskForm.course"
- placeholder="班级"></el-input>
- </el-form-item>
- <el-form-item label="学员声部"
- prop="sound">
- <el-select v-model="maskForm.sound"
- clearable
- filterable
- @change="onSoundChange">
- <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="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="maskForm.timer"
- value-format="yyyy-MM-dd"
- type="date"
- placeholder="选择日期">
- </el-date-picker>
- </el-col>
- </el-form-item>
- <el-form-item label="课程费用"
- prop="courseFee">
- <el-input v-model="maskForm.courseFee"
- placeholder="续费金额"></el-input>
- </el-form-item>
- <br>
- <el-form-item label="单技班">
- <el-select v-model="maskForm.signClass"
- filterable
- clearable>
- <el-option v-for="(item,index) in signList"
- :key="index"
- :value="item.id"
- :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="合奏班">
- <el-select v-model="maskForm.mixClass"
- filterable
- clearable>
- <el-option v-for="(item,index) in mixList"
- :key="index"
- :value="item.id"
- :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="基础技能班">
- <el-select v-model="maskForm.highClass"
- filterable
- clearable>
- <el-option v-for="(item,index) in highList"
- :key="index"
- :value="item.id"
- :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="临时班">
- <el-select v-model="maskForm.snapClass"
- filterable
- clearable
- multiple>
- <el-option v-for="(item,index) in snapList"
- :key="index"
- :value="item.id"
- :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-divider>首缴订单信息</el-divider>
- <el-form-item label="课程费用"
- prop="temporaryCourseFee">
- <el-input type='number'
- @mousewheel.native.prevent
- v-model="maskForm.temporaryCourseFee"
- placeholder="首缴课程金额"></el-input>
- </el-form-item>
- <el-form-item label="乐器"
- class="instrList">
- <el-col :span="11"
- style="width: auto;">
- <el-form-item>
- <el-select placeholder="选择乐器"
- filterable
- clearable
- v-model="maskForm.musicGoodsIdList">
- <el-option v-for="(item, index) in INSTRUMENTLIST"
- :key="index"
- :value="item.value"
- :label="item.label"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1"> </el-col>
- <el-col :span="11">
- <el-form-item>
- <el-input v-model="maskForm.musicPrice"
- placeholder="输入金额">
- <template slot="prepend">
- {{ maskForm.musicMode }}
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- </el-form-item>
- <el-form-item label="辅件">
- <el-col :span="11"
- style="width: auto;">
- <el-form-item>
- <el-select filterable
- clearable
- multiple
- placeholder="选择辅件"
- v-model="maskForm.instrGoodsIdList">
- <el-option v-for="(item, index) in ACCESSORIESLIST"
- :key="index"
- :value="item.value"
- :label="item.label"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1"> </el-col>
- <el-col :span="11">
- <el-form-item>
- <el-input v-model="maskForm.instrPrice"
- placeholder="输入金额"></el-input>
- </el-form-item>
- </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 classList"
- :key="index">
- {{ item.name }}
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 退团弹窗 -->
- <el-dialog title="退团信息确认"
- width="640px"
- :visible.sync="quitVisible">
- <el-form :model="quitForm"
- ref="quitForm"
- :rules="quitRules">
- <el-form-item label="退还课程费用"
- prop="isRefundCourseFee">
- <el-radio v-model="quitForm.isRefundCourseFee"
- :label="true">是</el-radio>
- <el-radio v-model="quitForm.isRefundCourseFee"
- :label="false">否</el-radio>
- </el-form-item>
- <el-form-item label="退还乐器费用"
- prop="isRefundInstrumentFee">
- <el-radio v-model="quitForm.isRefundInstrumentFee"
- :label="true">是</el-radio>
- <el-radio v-model="quitForm.isRefundInstrumentFee"
- :label="false">否</el-radio>
- </el-form-item>
- <el-form-item label="退还教辅费用"
- prop="isRefundTeachingAssistantsFee">
- <el-radio v-model="quitForm.isRefundTeachingAssistantsFee"
- :label="true">是</el-radio>
- <el-radio v-model="quitForm.isRefundTeachingAssistantsFee"
- :label="false">否</el-radio>
- </el-form-item>
- <el-form-item label="退团原因">
- <el-input type="textarea"
- v-model="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="报名二维码"
- :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="修改缴费周期"
- :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="payForm.studentName"
- disabled></el-input>
- </el-form-item>
- <br>
- <el-form-item label="缴费金额"
- prop="payMoney">
- <el-input type="number"
- v-model="payForm.payMoney"
- @mousewheel.native.prevent></el-input>
- </el-form-item>
- <el-form-item label="缴费月份"
- prop="payMonth">
- <el-checkbox-group v-model="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>
- </div>
- </template>
- <script>
- import { getTeamStudentList, getTeamStudentInfo, getSingleClass, findSound, StudentQuit, findSubjectPlan, getGoods, getSubject, getMusicGroupAllClass, StudentFeeIsLock, updateStudentFee } from '@/api/buildTeam'
- import { addStudent, getStudentClass, getStudentInfoByPhone } from '@/api/studentManager'
- import pagination from '@/components/Pagination/index'
- import { vaildStudentUrl } from '@/utils/validate'
- import QRCode from 'qrcodejs2'
- import axios from 'axios'
- import { getToken } from '@/utils/auth'
- export default {
- name: "tstudentList",
- props: {
- teamid: {
- type: String,
- required: true
- },
- },
- data () {
- return {
- payVisible: false,
- quitVisible: false, // 退团信息确认的弹窗
- studentClassVisible: false, // 学员所在班级弹窗
- addStudentVisible: false, //新增学员弹窗
- topFrom: { // 顶部的禁选框集合
- expect: '2', // 预期招生
- studing: '5', // 在读人数
- allmoney: '100', //实收总额
- students: '5', // 实际招生人数
- signout: '10', // 退团总数
- },
- searchForm: {
- studentStatus: '', // 学生状态
- major: '', // 报名专业
- isPay: '', // 是否缴费
- search: '',
- isActive: '',
- classGroupId: null
- },
- quitForm: { // 退团信息确认
- isRefundCourseFee: null,
- isRefundInstrumentFee: null,
- isRefundTeachingAssistantsFee: null,
- reason: ''
- },
- classMask: {
- studentName: ''
- },
- searchLsit: [],
- tableList: [], //
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50] // 选择限制显示条数
- },
- studentListInfo: {
- add: '',
- quit: '',
- studying: ''
- },
- signList: [],
- mixList: [],
- highList: [],
- snapList: [],
- soundList: [],
- classList: [],
- qrcodeStatus: false, // 生成二维码
- qrcodes: true,
- qrcode: null,
- codeUrl: null,
- maskForm: {
- studentName: '',
- sex: '',
- parentName: '',
- course: '',
- phone: '',
- sound: '',
- timer: '',
- signClass: '',
- mixClass: '',
- highClass: '',
- snapClass: [],
- // price: '',
- startClass: '',
- id: '',
- courseFee: null, // 声部费用
- temporaryCourseFee: null, // 本次课程费用
- musicGoodsIdList: null, // 乐器商品编号
- musicMode: null, // 乐器购买方式
- musicPrice: null, // 乐器购买金额
- instrGoodsIdList: [], // 辅件商品编号
- instrPrice: null // 辅件购买金额
- },
- remark: '', // 退团原因
- classList: [],
- quitRules: {
- isRefundCourseFee: [{ required: true, message: '请选择是否退还课程费用' },],
- isRefundInstrumentFee: [{ required: true, message: '选择是否退还乐器费用' },],
- isRefundTeachingAssistantsFee: [{ required: true, message: '选择是否退还教辅费用' },],
- },
- 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: '请输入首缴金额' },],
- startClass: [{ 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: null,
- Fsearch: null,
- Frules: null,
- payForm: {
- studentName: '',
- payMoney: '',
- payMonth: []
- }
- }
- },
- components: {
- pagination
- },
- created () {
- // 判断是否带缓存参数
- if (this.$route.query.search) {
- this.Fsearch = this.$route.query.search;
- }
- if (this.$route.query.rules) {
- this.Frules = this.$route.query.rules
- }
- },
- /** <el-option label="已开启缴费"
- value="1"></el-option>
- <el-option label="未缴费"
- value="0"></el-option>
- <el-option label="已缴费"
- value="2"></el-option> */
- filters: {
- studentPays (val) {
- let template = {
- 'PAID_COMPLETED': "完成缴费",
- 'NON_PAYMENT': "未缴费",
- 'PROCESSING': "缴费中"
- }
- return template[val]
- }
- },
- mounted () {
- // 获取汇总数据
- getTeamStudentInfo({ musicGroupId: this.teamid }).then(res => {
- if (res.code == 200) {
- this.studentListInfo = res.data;
- }
- });
- this.getList();
- // 获取乐团内所有声部
- findSound({ musicGroupId: this.teamid }).then(res => {
- if (res.code == 200) {
- this.soundList = res.data;
- }
- })
- // getSubject().then(res => {
- // if (res.code == 200) {
- // this.soundList = res.data;
- // }
- // })
- // 获取乐团所有单技课班
- // getSingleClass({ musicGroupId: this.teamid }).then(res => {
- // if (res.code == 200) {
- // this.signList = res.data;
- // }
- // })
- // 获取乐团所有合奏课
- getMusicGroupAllClass({ musicGroupId: this.teamid }).then(res => {
- if (res.code == 200) {
- this.classList = res.data;
- res.data.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 == 'SNAP') {
- this.snapList.push(item);
- }
- })
- }
- })
- },
- methods: {
- 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
- }
- 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 + '学员列表'
- link.href = objectUrl
- link.setAttribute("download", fname)
- document.body.appendChild(link)
- link.click()
- })
- }).catch(() => { })
- },
- search () {
- this.rules.page = 1;
- this.getList()
- },
- onCreateQRCode () { // 生成报名二维码
- this.qrcodeStatus = true
- let id = this.$route.query.id
- if (this.qrcodes) {
- this.qrcodes = false
- setTimeout(() => {
- 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)
- }
- },
- getList () {
- 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
- }
- getTeamStudentList(obj).then(res => {
- if (res.code == 200) {
- this.tableList = res.data.rows;
- this.rules.total = res.data.total
- }
- })
- },
- 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'].validate(res => {
- if (res) {
- this.$confirm('确定退团?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let row = this.activeRow;
- // 发请求 退团
- StudentQuit({ musicGroupId: this.teamid, userId: row.userId,
- 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;
- },
- //
- 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) {
- if (!maskForm.snapClass || !(maskForm.snapClass && maskForm.snapClass.length >= 1)) {
- 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,
- currentClass: maskForm.course,
- subjectId: maskForm.sound,
- musicGroupId: this.teamid,
- }
- }
- params.studentPaymentOrderDetails = []
- if (maskForm.musicGoodsIdList) {
- params.studentPaymentOrderDetails.push({
- goodsIdList: maskForm.musicGoodsIdList,
- 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.$refs.maskForm.resetFields()
- })
- }
- })
- },
- onSoundChange (value) { // 学员声部切换时
- this.findSubjectPlan(value)
- 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
- }).then(res => {
- let result = res.data
- if (res.code == 200) {
- let tempArr = []
- result.forEach(item => {
- tempArr.push({
- label: item.name,
- value: item.id
- })
- })
- 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.classList = res.data;
- this.studentClassVisible = true;
- }
- })
- },
- quieTeamMask (row) {
- this.activeRow = row;
- this.quitVisible = true;
- },
- 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,
- sex: res.data.gender,
- parentName: res.data.parentsName,
- course: res.data.currentClass,
- startClass: res.data.currentGrade,
- // sound: parseInt(res.data.subjectId),
- phone: val,
- timer: res.data.birthdate
- }
- /**
- * name: maskForm.studentName,
- gender: maskForm.sex,
- parentsName: maskForm.parentName,
- parentsPhone: maskForm.phone,
- currentGrade: maskForm.startClass,
- currentClass: maskForm.course,
- subjectId: maskForm.sound,
- musicGroupId: this.teamid,
- */
- /**
- maskForm: {
- studentName: '',
- sex: '',
- parentName: '',
- course: '',
- phone: '',
- sound: '',
- timer: '',
- signClass: '',
- // price: '',
- startClass: '',
- id: '',
- courseFee: null, // 声部费用
- temporaryCourseFee: null, // 本次课程费用
- musicGoodsIdList: null, // 乐器商品编号
- musicMode: null, // 乐器购买方式
- musicPrice: null, // 乐器购买金额
- instrGoodsIdList: [], // 辅件商品编号
- instrPrice: null // 辅件购买金额
- },
- *
- */
- }
- }
- })
- }
- },
- 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;
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- // .moreInput {
- // width: 100%;
- // display: flex;
- // /deep/.el-form-item__content {
- // display: flex;
- // flex-direction: row;
- // }
- // }
- .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;
- }
- </style>
|