studentList.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272
  1. <template>
  2. <div class='stu-container'>
  3. <!-- 头部展示 -->
  4. <div class="headWrap">
  5. <div class="left">
  6. <div class="headItem">
  7. <p>在读人数:<span>{{studentListInfo.studying}}</span></p>
  8. </div>
  9. <div class="headItem">
  10. <p>退团人数:<span>{{studentListInfo.quit}}</span></p>
  11. </div>
  12. <div class="headItem">
  13. <p>新增人数:<span>{{studentListInfo.add}}</span></p>
  14. </div>
  15. </div>
  16. <div class="right">
  17. <div class="newStudent"
  18. style="margin-bottom:10px;"
  19. @click="addStudentVisible = true">新增学员</div>
  20. <!-- <div class="newStudent"
  21. style="margin-bottom:10px;"
  22. @click="onCreateQRCode">报名连接</div> -->
  23. <div class="newStudent"
  24. @click='gotoSignin'>点名总览</div>
  25. </div>
  26. </div>
  27. <!-- 搜索类型 -->
  28. <el-form :inline="true"
  29. class="searchForm"
  30. v-model="searchForm">
  31. <el-form-item>
  32. <el-input v-model="searchForm.search"
  33. placeholder="学生姓名或电话"
  34. @keyup.enter.native='search'></el-input>
  35. </el-form-item>
  36. <el-form-item>
  37. <el-select v-model="searchForm.studentStatus"
  38. clearable
  39. filterable
  40. placeholder="学员状态">
  41. <el-option label="在读"
  42. value="NORMAL"></el-option>
  43. <el-option label="请假"
  44. value="LEAVE"></el-option>
  45. <el-option label="退团"
  46. value="QUIT"></el-option>
  47. </el-select>
  48. </el-form-item>
  49. <el-form-item>
  50. <el-select v-model="searchForm.major"
  51. clearable
  52. filterable
  53. placeholder="所选专业">
  54. <el-option v-for='(item,index) in soundList'
  55. :key='index'
  56. :value="item.id"
  57. :label="item.name"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item>
  61. <el-select v-model="searchForm.isPay"
  62. clearable
  63. filterable
  64. placeholder="报名缴费">
  65. <el-option label="完成缴费"
  66. value="PAID_COMPLETED"></el-option>
  67. <el-option label="未缴费"
  68. value="NON_PAYMENT"></el-option>
  69. <el-option label="缴费中"
  70. value="PROCESSING"></el-option>
  71. </el-select>
  72. </el-form-item>
  73. <el-form-item>
  74. <el-select v-model="searchForm.isActive"
  75. clearable
  76. filterable
  77. placeholder="是否激活">
  78. <el-option label="是"
  79. value="1"></el-option>
  80. <el-option label="否"
  81. value="0"></el-option>
  82. </el-select>
  83. </el-form-item>
  84. <!-- <el-form-item>
  85. <el-select v-model="searchForm.school"
  86. placeholder="所在学校">
  87. <el-option label="item.text"
  88. value="1"></el-option>
  89. </el-select>
  90. </el-form-item> -->
  91. <el-form-item>
  92. <div class='searchBtn'
  93. @click='search'>搜索</div>
  94. </el-form-item>
  95. <el-form-item>
  96. <div class='searchBtn export'
  97. v-permission="'export/musicGroupStudent'"
  98. @click='onMusicGroupExport'>导出</div>
  99. </el-form-item>
  100. </el-form>
  101. <!-- 列表 -->
  102. <div class="tableWrap">
  103. <el-table :data='tableList'
  104. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  105. <el-table-column label="学员编号"
  106. width="120px;"
  107. prop="userId">
  108. </el-table-column>
  109. <el-table-column label="学员姓名"
  110. width="120px;"
  111. prop="realName">
  112. </el-table-column>
  113. <el-table-column align='center'
  114. prop="gender"
  115. width="50px;"
  116. label="性别">
  117. <template slot-scope="scope">
  118. <div>
  119. {{scope.row.gender| sex }}
  120. </div>
  121. </template>
  122. </el-table-column>
  123. <el-table-column align='center'
  124. prop="phone"
  125. label="联系电话">
  126. </el-table-column>
  127. <!-- <el-table-column align='center'
  128. prop=""
  129. label="所在学校">
  130. </el-table-column> -->
  131. <el-table-column align='center'
  132. label="年级班级">
  133. <template slot-scope="scope">
  134. <div>
  135. {{scope.row.currentGrade+scope.row.currentClass}}
  136. </div>
  137. </template>
  138. </el-table-column>
  139. <el-table-column align='center'
  140. label="专业"
  141. prop="subjectName">
  142. </el-table-column>
  143. <!-- <el-table-column align='center'
  144. label="乐团班级">
  145. </el-table-column>
  146. <el-table-column align='center'
  147. label="合奏班">
  148. </el-table-column> -->
  149. <el-table-column align='center'
  150. prop="studentStatus"
  151. label="学员状态">
  152. <template slot-scope="scope">
  153. <div>
  154. {{ scope.row.studentStatus | musicGroupStudentType}}
  155. </div>
  156. </template>
  157. </el-table-column>
  158. <el-table-column align='center'
  159. label="新增学员">
  160. <template slot-scope="scope">
  161. <div>
  162. {{ scope.row.isNewStudent | yesOrNo}}
  163. </div>
  164. </template>
  165. </el-table-column>
  166. <el-table-column align='center'
  167. label="批量修改缴费">
  168. <template slot-scope="scope">
  169. <div>
  170. {{ scope.row.isLock?'已锁定':'可修改'}}
  171. </div>
  172. </template>
  173. </el-table-column>
  174. <el-table-column align="center"
  175. label="下次缴费日期"
  176. prop="nextPaymentDate">
  177. <template slot-scope="scope">
  178. {{ scope.row.nextPaymentDate | formatTimer }}
  179. </template>
  180. </el-table-column>
  181. <el-table-column align="center"
  182. label="缴费金额"
  183. prop="courseFee">
  184. </el-table-column>
  185. <el-table-column align='center'
  186. label="报名缴费">
  187. <template slot-scope="scope">
  188. <div>
  189. {{ scope.row.paymentStatus | studentPays}}
  190. </div>
  191. </template>
  192. </el-table-column>
  193. <el-table-column align='center'
  194. label="是否激活">
  195. <template slot-scope="scope">
  196. <div>
  197. {{ scope.row.isActive?'是':'否'}}
  198. </div>
  199. </template>
  200. </el-table-column>
  201. <el-table-column align='center'
  202. fixed="right"
  203. width="250px;"
  204. label="操作">
  205. <template slot-scope="scope">
  206. <div v-if="scope.row.studentStatus != 'QUIT'">
  207. <!-- <el-popover placement="top"
  208. v-model="scope.row.typeVisible">
  209. <el-input v-model="remark"
  210. placeholder="请输入退团原因"></el-input>
  211. <el-button type="text"
  212. slot='reference'
  213. class='chiose'>
  214. 退团
  215. </el-button>
  216. <div style="text-align: right; margin-top: 20px">
  217. <el-button size="mini"
  218. type="text"
  219. @click="scope.row.typeVisible = false">取消</el-button>
  220. <el-button type="primary"
  221. size="mini"
  222. @click="chioseType(scope.row)">确定</el-button>
  223. </div>
  224. </el-popover> -->
  225. <el-button type="text"
  226. @click="lookClass(scope.row)">查看班级</el-button>
  227. <el-button type="text"
  228. v-if="!scope.row.isLock"
  229. @click="lockStudent(scope.row)">锁定</el-button>
  230. <el-button v-else
  231. type="text"
  232. @click="lockStudent(scope.row)">解锁</el-button>
  233. <el-button type="text"
  234. @click="resetPay(scope.row)">修改缴费</el-button>
  235. <el-button type='text'
  236. @click="quieTeamMask(scope.row)">退团</el-button>
  237. </div>
  238. </template>
  239. </el-table-column>
  240. </el-table>
  241. <pagination :total="rules.total"
  242. :page.sync="rules.page"
  243. :limit.sync="rules.limit"
  244. :page-sizes="rules.page_size"
  245. @pagination="getList" />
  246. </div>
  247. <el-dialog title="新增学员"
  248. width="640px"
  249. class="studentInfo"
  250. :visible.sync="addStudentVisible">
  251. <el-form :model="maskForm"
  252. label-position="right"
  253. label-width="100px"
  254. ref='maskForm'
  255. :rules="maskRules"
  256. :inline="true">
  257. <el-divider>基本信息</el-divider>
  258. <el-form-item label="联系电话"
  259. :rules="[{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }]"
  260. prop="phone">
  261. <el-input v-model="maskForm.phone"
  262. placeholder="联系电话"
  263. @blur="checkPhone(maskForm.phone)"></el-input>
  264. </el-form-item>
  265. <el-form-item label="学员姓名"
  266. prop="studentName">
  267. <el-input v-model="maskForm.studentName"
  268. placeholder="学员姓名"></el-input>
  269. </el-form-item>
  270. <el-form-item label="学员性别"
  271. prop="sex">
  272. <el-select v-model="maskForm.sex"
  273. clearable>
  274. <el-option label="男"
  275. :value="1"></el-option>
  276. <el-option label="女"
  277. :value="0"></el-option>
  278. </el-select>
  279. </el-form-item>
  280. <el-form-item label="家长姓名"
  281. prop="parentName">
  282. <el-input v-model="maskForm.parentName"
  283. placeholder="家长姓名"></el-input>
  284. </el-form-item>
  285. <el-form-item label="年级"
  286. prop="startClass">
  287. <el-select placeholder="起始年级"
  288. filterable
  289. clearable
  290. v-model="maskForm.startClass">
  291. <el-option value="一年级"
  292. label="一年级"></el-option>
  293. <el-option value="二年级"
  294. label="二年级"></el-option>
  295. <el-option value="三年级"
  296. label="三年级"></el-option>
  297. <el-option value="四年级"
  298. label="四年级"></el-option>
  299. <el-option value="五年级"
  300. label="五年级"></el-option>
  301. <el-option value="六年级"
  302. label="六年级"></el-option>
  303. <el-option value="初一"
  304. label="初一"></el-option>
  305. <el-option value="初二"
  306. label="初二"></el-option>
  307. <el-option value="初三"
  308. label="初三"></el-option>
  309. <el-option value="高一"
  310. label="高一"></el-option>
  311. <el-option value="高二"
  312. label="高二"></el-option>
  313. <el-option value="高三"
  314. label="高三"></el-option>
  315. </el-select>
  316. </el-form-item>
  317. <el-form-item label="班级"
  318. prop="course">
  319. <el-input v-model="maskForm.course"
  320. placeholder="班级"></el-input>
  321. </el-form-item>
  322. <el-form-item label="学员声部"
  323. prop="sound">
  324. <el-select v-model="maskForm.sound"
  325. clearable
  326. filterable
  327. @change="onSoundChange">
  328. <el-option v-for='(item,index) in soundList'
  329. :key='index'
  330. :value="item.id"
  331. :label="item.name"></el-option>
  332. </el-select>
  333. </el-form-item>
  334. <!-- <el-form-item label="证件号"
  335. prop="id">
  336. <el-input v-model="maskForm.id"></el-input>
  337. </el-form-item> -->
  338. <el-form-item label="出生日期"
  339. style="margin-right: 0;"
  340. prop="timer">
  341. <el-col :span="24">
  342. <el-date-picker v-model="maskForm.timer"
  343. value-format="yyyy-MM-dd"
  344. type="date"
  345. placeholder="选择日期">
  346. </el-date-picker>
  347. </el-col>
  348. </el-form-item>
  349. <el-form-item label="课程费用"
  350. prop="courseFee">
  351. <el-input v-model="maskForm.courseFee"
  352. placeholder="请输入课程费用"></el-input>
  353. <span style="position: absolute; width: 100px;">备注:续费金额</span>
  354. </el-form-item>
  355. <br>
  356. <el-form-item label="单技班">
  357. <el-select v-model="maskForm.signClass"
  358. filterable
  359. clearable>
  360. <el-option v-for="(item,index) in signList"
  361. :key="index"
  362. :value="item.id"
  363. :label="item.name"></el-option>
  364. </el-select>
  365. </el-form-item>
  366. <el-form-item label="合奏班">
  367. <el-select v-model="maskForm.mixClass"
  368. filterable
  369. clearable>
  370. <el-option v-for="(item,index) in mixList"
  371. :key="index"
  372. :value="item.id"
  373. :label="item.name"></el-option>
  374. </el-select>
  375. </el-form-item>
  376. <el-form-item label="基础技能班">
  377. <el-select v-model="maskForm.highClass"
  378. filterable
  379. clearable>
  380. <el-option v-for="(item,index) in highList"
  381. :key="index"
  382. :value="item.id"
  383. :label="item.name"></el-option>
  384. </el-select>
  385. </el-form-item>
  386. <el-form-item label="临时班">
  387. <el-select v-model="maskForm.snapClass"
  388. filterable
  389. clearable
  390. multiple>
  391. <el-option v-for="(item,index) in snapList"
  392. :key="index"
  393. :value="item.id"
  394. :label="item.name"></el-option>
  395. </el-select>
  396. </el-form-item>
  397. <el-divider>首缴订单信息</el-divider>
  398. <el-form-item label="课程费用"
  399. prop="temporaryCourseFee">
  400. <el-input type='number'
  401. @mousewheel.native.prevent
  402. v-model="maskForm.temporaryCourseFee"
  403. placeholder="首缴课程金额"></el-input>
  404. </el-form-item>
  405. <el-form-item label="乐器"
  406. class="instrList">
  407. <el-col :span="11"
  408. style="width: auto;">
  409. <el-form-item>
  410. <el-select placeholder="选择乐器"
  411. filterable
  412. clearable
  413. v-model="maskForm.musicGoodsIdList">
  414. <el-option v-for="(item, index) in INSTRUMENTLIST"
  415. :key="index"
  416. :value="item.value"
  417. :label="item.label"></el-option>
  418. </el-select>
  419. </el-form-item>
  420. </el-col>
  421. <el-col :span="1">&nbsp;</el-col>
  422. <el-col :span="11">
  423. <el-form-item>
  424. <el-input v-model="maskForm.musicPrice"
  425. placeholder="输入金额">
  426. <template slot="prepend">
  427. {{ maskForm.musicMode }}
  428. </template>
  429. </el-input>
  430. </el-form-item>
  431. </el-col>
  432. </el-form-item>
  433. <el-form-item label="辅件">
  434. <el-col :span="11"
  435. style="width: auto;">
  436. <el-form-item>
  437. <el-select filterable
  438. clearable
  439. multiple
  440. placeholder="选择辅件"
  441. v-model="maskForm.instrGoodsIdList">
  442. <el-option v-for="(item, index) in ACCESSORIESLIST"
  443. :key="index"
  444. :value="item.value"
  445. :label="item.label"></el-option>
  446. </el-select>
  447. </el-form-item>
  448. </el-col>
  449. <el-col :span="1">&nbsp;</el-col>
  450. <el-col :span="11">
  451. <el-form-item>
  452. <el-input v-model="maskForm.instrPrice"
  453. placeholder="输入金额"></el-input>
  454. </el-form-item>
  455. </el-col>
  456. </el-form-item>
  457. </el-form>
  458. <div slot="footer"
  459. class="dialog-footer">
  460. <!-- <el-button @click="addStudentVisible = false">取 消</el-button> -->
  461. <el-button type="primary"
  462. @click="addStudent">确 定</el-button>
  463. </div>
  464. </el-dialog>
  465. <el-dialog title="学员所在班级"
  466. width="640px"
  467. :visible.sync="studentClassVisible">
  468. <el-form :model="classMask">
  469. <el-form-item label="学生姓名">
  470. {{ classMask.studentName }}
  471. </el-form-item>
  472. <el-form-item label="所在班级"
  473. v-for="(item,index) in classList"
  474. :key="index">
  475. {{ item.name }}
  476. </el-form-item>
  477. </el-form>
  478. </el-dialog>
  479. <!-- 退团弹窗 -->
  480. <el-dialog title="退团信息确认"
  481. width="640px"
  482. :visible.sync="quitVisible">
  483. <el-form :model="quitForm"
  484. ref="quitForm"
  485. :rules="quitRules">
  486. <el-form-item label="退还课程费用"
  487. prop="isRefundCourseFee">
  488. <el-radio v-model="quitForm.isRefundCourseFee"
  489. :label="true">是</el-radio>
  490. <el-radio v-model="quitForm.isRefundCourseFee"
  491. :label="false">否</el-radio>
  492. </el-form-item>
  493. <el-form-item label="退还乐器费用"
  494. prop="isRefundInstrumentFee">
  495. <el-radio v-model="quitForm.isRefundInstrumentFee"
  496. :label="true">是</el-radio>
  497. <el-radio v-model="quitForm.isRefundInstrumentFee"
  498. :label="false">否</el-radio>
  499. </el-form-item>
  500. <el-form-item label="退还教辅费用"
  501. prop="isRefundTeachingAssistantsFee">
  502. <el-radio v-model="quitForm.isRefundTeachingAssistantsFee"
  503. :label="true">是</el-radio>
  504. <el-radio v-model="quitForm.isRefundTeachingAssistantsFee"
  505. :label="false">否</el-radio>
  506. </el-form-item>
  507. <el-form-item label="退团原因">
  508. <el-input type="textarea"
  509. v-model="quitForm.reason"></el-input>
  510. </el-form-item>
  511. </el-form>
  512. <span slot="footer"
  513. class="dialog-footer">
  514. <el-button @click="quitVisible = false">取 消</el-button>
  515. <el-button type="primary"
  516. @click="chioseType">确 定</el-button>
  517. </span>
  518. </el-dialog>
  519. <el-dialog title="报名二维码"
  520. :visible.sync="qrcodeStatus"
  521. width="300px">
  522. <div class="left-code">
  523. <h2>学员报名连接</h2>
  524. <div id="qrcode"
  525. class="qrcode code"
  526. ref="qrCodeUrl"></div>
  527. <p class="code-url"
  528. v-if="codeUrl">{{ codeUrl }}</p>
  529. </div>
  530. </el-dialog>
  531. <el-dialog title="修改缴费周期"
  532. :before-close='closePayVisible'
  533. width='600px'
  534. :visible.sync="payVisible">
  535. <el-form :model="payForm"
  536. ref="payForm"
  537. :inline="true">
  538. <el-form-item label="学生姓名"
  539. prop="studentName">
  540. <el-input v-model="payForm.studentName"
  541. disabled></el-input>
  542. </el-form-item>
  543. <br>
  544. <el-form-item label="缴费金额"
  545. prop="payMoney">
  546. <el-input type="number"
  547. v-model="payForm.payMoney"
  548. @mousewheel.native.prevent></el-input>
  549. </el-form-item>
  550. <el-form-item label="缴费月份"
  551. prop="payMonth">
  552. <el-checkbox-group v-model="payForm.payMonth"
  553. fill="#14928A"
  554. text-color='#474747'>
  555. <el-checkbox label="1">一月</el-checkbox>
  556. <el-checkbox label="2">二月</el-checkbox>
  557. <el-checkbox label="3">三月</el-checkbox>
  558. <el-checkbox label="4">四月</el-checkbox>
  559. <el-checkbox label="5">五月</el-checkbox>
  560. <el-checkbox label="6">六月</el-checkbox>
  561. <el-checkbox label="7">七月</el-checkbox>
  562. <el-checkbox label="8">八月</el-checkbox>
  563. <el-checkbox label="9">九月</el-checkbox>
  564. <el-checkbox label="10">十月</el-checkbox>
  565. <el-checkbox label="11">十一月</el-checkbox>
  566. <el-checkbox label="12">十二月</el-checkbox>
  567. </el-checkbox-group>
  568. </el-form-item>
  569. <!-- studentName: '',
  570. payMoney: '',
  571. payMonth -->
  572. </el-form>
  573. <div slot="footer"
  574. class="dialog-footer">
  575. <el-button @click="quitVisible = false">取 消</el-button>
  576. <el-button type="primary"
  577. @click="submitPay">确 定</el-button>
  578. </div>
  579. </el-dialog>
  580. </div>
  581. </template>
  582. <script>
  583. import { getTeamStudentList, getTeamStudentInfo, getSingleClass, findSound, StudentQuit, findSubjectPlan, getGoods, getSubject, getMusicGroupAllClass, StudentFeeIsLock, updateStudentFee } from '@/api/buildTeam'
  584. import { addStudent, getStudentClass, getStudentInfoByPhone } from '@/api/studentManager'
  585. import pagination from '@/components/Pagination/index'
  586. import { vaildStudentUrl } from '@/utils/validate'
  587. import QRCode from 'qrcodejs2'
  588. import axios from 'axios'
  589. import { getToken } from '@/utils/auth'
  590. export default {
  591. props: {
  592. teamid: {
  593. type: String,
  594. required: true
  595. },
  596. },
  597. data () {
  598. return {
  599. payVisible: false,
  600. quitVisible: false, // 退团信息确认的弹窗
  601. studentClassVisible: false, // 学员所在班级弹窗
  602. addStudentVisible: false, //新增学员弹窗
  603. topFrom: { // 顶部的禁选框集合
  604. expect: '2', // 预期招生
  605. studing: '5', // 在读人数
  606. allmoney: '100', //实收总额
  607. students: '5', // 实际招生人数
  608. signout: '10', // 退团总数
  609. },
  610. searchForm: {
  611. studentStatus: '', // 学生状态
  612. major: '', // 报名专业
  613. isPay: '', // 是否缴费
  614. search: '',
  615. isActive: ''
  616. },
  617. quitForm: { // 退团信息确认
  618. isRefundCourseFee: null,
  619. isRefundInstrumentFee: null,
  620. isRefundTeachingAssistantsFee: null,
  621. reason: ''
  622. },
  623. classMask: {
  624. studentName: ''
  625. },
  626. searchLsit: [],
  627. tableList: [], //
  628. rules: {
  629. // 分页规则
  630. limit: 10, // 限制显示条数
  631. page: 1, // 当前页
  632. total: 0, // 总条数
  633. page_size: [10, 20, 40, 50] // 选择限制显示条数
  634. },
  635. studentListInfo: {
  636. add: '',
  637. quit: '',
  638. studying: ''
  639. },
  640. signList: [],
  641. mixList: [],
  642. highList: [],
  643. snapList: [],
  644. soundList: [],
  645. qrcodeStatus: false, // 生成二维码
  646. qrcodes: true,
  647. qrcode: null,
  648. codeUrl: null,
  649. maskForm: {
  650. studentName: '',
  651. sex: '',
  652. parentName: '',
  653. course: '',
  654. phone: '',
  655. sound: '',
  656. timer: '',
  657. signClass: '',
  658. mixClass: '',
  659. highClass: '',
  660. snapClass: [],
  661. // price: '',
  662. startClass: '',
  663. id: '',
  664. courseFee: null, // 声部费用
  665. temporaryCourseFee: null, // 本次课程费用
  666. musicGoodsIdList: null, // 乐器商品编号
  667. musicMode: null, // 乐器购买方式
  668. musicPrice: null, // 乐器购买金额
  669. instrGoodsIdList: [], // 辅件商品编号
  670. instrPrice: null // 辅件购买金额
  671. },
  672. remark: '', // 退团原因
  673. classList: [],
  674. quitRules: {
  675. isRefundCourseFee: [{ required: true, message: '请选择是否退还课程费用' },],
  676. isRefundInstrumentFee: [{ required: true, message: '选择是否退还乐器费用' },],
  677. isRefundTeachingAssistantsFee: [{ required: true, message: '选择是否退还教辅费用' },],
  678. },
  679. maskRules: {
  680. studentName: [{ required: true, message: '请输入学生姓名' },],
  681. sex: [{ required: true, message: '请选择学生姓名' },],
  682. parentName: [{ required: true, message: '请输入家长姓名' },],
  683. course: [{ required: true, message: '请输入班级' },],
  684. // phone: [{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
  685. sound: [{ required: true, message: '请选择声部' },],
  686. timer: [{ required: true, message: '请选择出生日期' },],
  687. signClass: [{ required: true, message: '请选择单技班' },],
  688. // price: [{ required: true, message: '请输入首缴金额' },],
  689. startClass: [{ required: true, message: '请选择年级' }],
  690. id: [{ required: true, message: '请输入证件号' }],
  691. courseFee: [{ required: true, message: '请输入声部费用' }],
  692. temporaryCourseFee: [{ required: true, message: '请输课程费用' }],
  693. musicGoodsIdList: [{ required: true, message: '请选择乐器', trigger: 'change' }],
  694. musicPrice: [{ required: true, message: '请输入乐器购买金额' }],
  695. instrGoodsIdList: [{ required: true, message: '请选择辅件' }],
  696. instrPrice: [{ required: true, message: '请输入辅件金额' }]
  697. },
  698. INSTRUMENTLIST: [], // 乐器列表
  699. ACCESSORIESLIST: [], // 辅件列表
  700. activeRow: null,
  701. Fsearch: null,
  702. Frules: null,
  703. payForm: {
  704. studentName: '',
  705. payMoney: '',
  706. payMonth: []
  707. }
  708. }
  709. },
  710. components: {
  711. pagination
  712. },
  713. created () {
  714. // 判断是否带缓存参数
  715. if (this.$route.query.search) {
  716. this.Fsearch = this.$route.query.search;
  717. }
  718. if (this.$route.query.rules) {
  719. this.Frules = this.$route.query.rules
  720. }
  721. },
  722. /** <el-option label="已开启缴费"
  723. value="1"></el-option>
  724. <el-option label="未缴费"
  725. value="0"></el-option>
  726. <el-option label="已缴费"
  727. value="2"></el-option> */
  728. filters: {
  729. studentPays (val) {
  730. let template = {
  731. 'PAID_COMPLETED': "完成缴费",
  732. 'NON_PAYMENT': "未缴费",
  733. 'PROCESSING': "缴费中"
  734. }
  735. return template[val]
  736. }
  737. },
  738. mounted () {
  739. // 获取汇总数据
  740. getTeamStudentInfo({ musicGroupId: this.teamid }).then(res => {
  741. if (res.code == 200) {
  742. this.studentListInfo = res.data;
  743. }
  744. });
  745. this.getList();
  746. // 获取乐团内所有声部
  747. findSound({ musicGroupId: this.teamid }).then(res => {
  748. if (res.code == 200) {
  749. this.soundList = res.data;
  750. }
  751. })
  752. // getSubject().then(res => {
  753. // if (res.code == 200) {
  754. // this.soundList = res.data;
  755. // }
  756. // })
  757. // 获取乐团所有单技课班
  758. // getSingleClass({ musicGroupId: this.teamid }).then(res => {
  759. // if (res.code == 200) {
  760. // this.signList = res.data;
  761. // }
  762. // })
  763. // 获取乐团所有合奏课
  764. getMusicGroupAllClass({ musicGroupId: this.teamid }).then(res => {
  765. if (res.code == 200) {
  766. res.data.forEach(item => {
  767. if (item.type == 'NORMAL') {
  768. this.signList.push(item);
  769. } else if (item.type == 'MIX') {
  770. this.mixList.push(item);
  771. } else if (item.type == 'HIGH') {
  772. this.highList.push(item)
  773. } else if (item.type == 'SNAP') {
  774. this.snapList.push(item);
  775. }
  776. })
  777. }
  778. })
  779. },
  780. methods: {
  781. onMusicGroupExport () {
  782. let url = '/api-web/export/musicGroupStudent'
  783. let data = {
  784. musicGroupId: this.teamid,
  785. studentStatus: this.searchForm.studentStatus || null,
  786. paymentStatus: this.searchForm.isPay || null,
  787. subjectId: this.searchForm.major || null,
  788. search: this.searchForm.search || null,
  789. isActive: this.searchForm.isActive
  790. }
  791. const options = {
  792. method: 'get',
  793. headers: {
  794. 'Authorization': getToken()
  795. },
  796. url,
  797. params: data,
  798. responseType: 'blob'
  799. }
  800. this.$confirm('您确定导出学员列表?', '提示', {
  801. confirmButtonText: '确定',
  802. cancelButtonText: '取消',
  803. type: 'warning'
  804. }).then(() => {
  805. axios(options).then(res => {
  806. let blob = new Blob([res.data], {
  807. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
  808. type: 'application/vnd.ms-excel;charset=utf-8'
  809. // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  810. })
  811. let objectUrl = URL.createObjectURL(blob)
  812. let link = document.createElement("a")
  813. let fname = this.$route.query.name + '学员列表'
  814. link.href = objectUrl
  815. link.setAttribute("download", fname)
  816. document.body.appendChild(link)
  817. link.click()
  818. })
  819. }).catch(() => { })
  820. },
  821. search () {
  822. this.rules.page = 1;
  823. this.getList()
  824. },
  825. onCreateQRCode () { // 生成报名二维码
  826. this.qrcodeStatus = true
  827. let id = this.$route.query.id
  828. if (this.qrcodes) {
  829. this.qrcodes = false
  830. setTimeout(() => {
  831. this.qrcode = new QRCode('qrcode', {
  832. width: 200,
  833. height: 200,
  834. colorDark: '#000000',
  835. colorLight: '#ffffff',
  836. correctLevel: QRCode.CorrectLevel.H
  837. })
  838. this.qrcode.makeCode(vaildStudentUrl() + '/#/login?musicGroupId=' + id)
  839. this.codeUrl = vaildStudentUrl() + '/#/login?musicGroupId=' + id
  840. }, 500)
  841. }
  842. },
  843. getList () {
  844. let obj = {
  845. musicGroupId: this.teamid,
  846. page: this.rules.page,
  847. rows: this.rules.limit,
  848. studentStatus: this.searchForm.studentStatus || null,
  849. paymentStatus: this.searchForm.isPay || null,
  850. subjectId: this.searchForm.major || null,
  851. search: this.searchForm.search || null,
  852. isActive: this.searchForm.isActive
  853. }
  854. getTeamStudentList(obj).then(res => {
  855. if (res.code == 200) {
  856. this.tableList = res.data.rows;
  857. this.rules.total = res.data.total
  858. }
  859. })
  860. },
  861. gotoSignin () {
  862. this.$router.push({
  863. path: '/business/studentSignin',
  864. query: {
  865. id: this.teamid,
  866. status: this.$route.query.status,
  867. name: this.$route.query.name,
  868. rules: this.Frules, search: this.Fsearch
  869. }
  870. })
  871. },
  872. chioseType () {
  873. this.$refs['quitForm'].validate(res => {
  874. if (res) {
  875. this.$confirm('确定退团?', '提示', {
  876. confirmButtonText: '确定',
  877. cancelButtonText: '取消',
  878. type: 'warning'
  879. }).then(() => {
  880. let row = this.activeRow;
  881. // 发请求 退团
  882. StudentQuit({ musicGroupId: this.teamid, userId: row.userId,
  883. reason: this.quitForm.reason,
  884. isRefundCourseFee: this.quitForm.isRefundCourseFee,
  885. isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
  886. isRefundTeachingAssistantsFee: this.quitForm.isRefundTeachingAssistantsFee }).then(res => {
  887. this.quitForm = { // 退团信息确认
  888. isRefundCourseFee: null,
  889. isRefundInstrumentFee: null,
  890. isRefundTeachingAssistantsFee: null,
  891. reason: ''
  892. }
  893. if (res.code == 200) {
  894. this.$message.success('退团成功')
  895. this.getList();
  896. this.quitVisible = false;
  897. }
  898. })
  899. }).catch(() => {
  900. });
  901. } else {
  902. }
  903. })
  904. // row.typeVisible = false;
  905. },
  906. //
  907. addStudent () {
  908. // 发请求添加学员
  909. this.$refs['maskForm'].validate(res => {
  910. if (res) {
  911. // this.maskForm.parentName.timer 少个生日的字段
  912. // classGroupId: maskForm.signClass
  913. /** <!-- signClass: '',
  914. mixClass: '',
  915. highClass: '',
  916. snapClass: [], --> */
  917. let maskForm = this.maskForm
  918. if (!maskForm.signClass && !maskForm.mixClass && !maskForm.highClass) {
  919. if (!maskForm.snapClass || !(maskForm.snapClass && maskForm.snapClass.length >= 1)) {
  920. this.$message.error('该学生必须加入一个班级')
  921. return;
  922. }
  923. }
  924. let snapClassIds;
  925. maskForm.snapClass ? snapClassIds = maskForm.snapClass.join(',') : snapClassIds = null
  926. let params = {
  927. signClassId: maskForm.signClass,
  928. mixClassId: maskForm.mixClass,
  929. snapClassIds,
  930. highClassId: maskForm.highClass,
  931. courseFee: maskForm.courseFee,
  932. temporaryCourseFee: maskForm.temporaryCourseFee,
  933. studentRegistration: {
  934. name: maskForm.studentName,
  935. gender: maskForm.sex,
  936. birthdate: maskForm.timer,
  937. parentsName: maskForm.parentName,
  938. parentsPhone: maskForm.phone,
  939. currentGrade: maskForm.startClass,
  940. currentClass: maskForm.course,
  941. subjectId: maskForm.sound,
  942. musicGroupId: this.teamid,
  943. }
  944. }
  945. params.studentPaymentOrderDetails = []
  946. if (maskForm.musicGoodsIdList) {
  947. params.studentPaymentOrderDetails.push({
  948. goodsIdList: maskForm.musicGoodsIdList,
  949. type: 'MUSICAL',
  950. price: maskForm.musicPrice
  951. })
  952. }
  953. if (maskForm.instrGoodsIdList && maskForm.instrGoodsIdList != '') {
  954. params.studentPaymentOrderDetails.push({
  955. goodsIdList: maskForm.instrGoodsIdList.join(','),
  956. type: 'ACCESSORIES',
  957. price: maskForm.instrPrice
  958. })
  959. }
  960. addStudent(params).then(res => {
  961. if (res.code == 200) {
  962. this.$message.success('添加学生成功');
  963. this.getList()
  964. this.addStudentVisible = false
  965. }
  966. this.$refs.maskForm.resetFields()
  967. })
  968. }
  969. })
  970. },
  971. onSoundChange (value) { // 学员声部切换时
  972. this.findSubjectPlan(value)
  973. this.getGoodsList(value, 'INSTRUMENT') // 乐器
  974. this.getGoodsList(value, 'ACCESSORIES') // 辅件
  975. },
  976. // 获取购买方式
  977. findSubjectPlan (subjectId) {
  978. findSubjectPlan({
  979. musicGroupId: this.teamid,
  980. subjectId: subjectId
  981. }).then(res => {
  982. let result = res.data
  983. if (res.code == 200) {
  984. this.maskForm.musicMode = this.getBranchType(result.kitGroupPurchaseType)
  985. }
  986. })
  987. },
  988. getGoodsList (subjectId, type) {
  989. getGoods({
  990. subjectId: subjectId,
  991. type: type
  992. }).then(res => {
  993. let result = res.data
  994. if (res.code == 200) {
  995. let tempArr = []
  996. result.forEach(item => {
  997. tempArr.push({
  998. label: item.name,
  999. value: item.id
  1000. })
  1001. })
  1002. if (type == 'ACCESSORIES') {
  1003. this.ACCESSORIESLIST = tempArr
  1004. }
  1005. if (type == 'INSTRUMENT') {
  1006. this.INSTRUMENTLIST = tempArr
  1007. }
  1008. }
  1009. })
  1010. },
  1011. getBranchType (status) {
  1012. let common = {
  1013. FREE: "免费",
  1014. GROUP: "团购",
  1015. LEASE: "租赁"
  1016. }
  1017. return common[status]
  1018. },
  1019. lookClass (row) {
  1020. this.classMask.studentName = row.realName;
  1021. getStudentClass({
  1022. musicGroupId: this.teamid,
  1023. teacherId: row.userId
  1024. }).then(res => {
  1025. if (res.code == 200) {
  1026. this.classList = res.data;
  1027. this.studentClassVisible = true;
  1028. }
  1029. })
  1030. },
  1031. quieTeamMask (row) {
  1032. this.activeRow = row;
  1033. this.quitVisible = true;
  1034. },
  1035. checkPhone (val) {
  1036. var regu = /^1[3456789]\d{9}$/;
  1037. var re = new RegExp(regu);
  1038. if (re.test(val)) {
  1039. getStudentInfoByPhone({ mobile: this.maskForm.phone }).then(res => {
  1040. if (res.code == 200) {
  1041. if (res.data) {
  1042. this.maskForm = {
  1043. studentName: res.data.name,
  1044. sex: res.data.gender,
  1045. parentName: res.data.parentsName,
  1046. course: res.data.currentClass,
  1047. startClass: res.data.currentGrade,
  1048. // sound: parseInt(res.data.subjectId),
  1049. phone: val,
  1050. timer: res.data.birthdate
  1051. }
  1052. /**
  1053. * name: maskForm.studentName,
  1054. gender: maskForm.sex,
  1055. parentsName: maskForm.parentName,
  1056. parentsPhone: maskForm.phone,
  1057. currentGrade: maskForm.startClass,
  1058. currentClass: maskForm.course,
  1059. subjectId: maskForm.sound,
  1060. musicGroupId: this.teamid,
  1061. */
  1062. /**
  1063. maskForm: {
  1064. studentName: '',
  1065. sex: '',
  1066. parentName: '',
  1067. course: '',
  1068. phone: '',
  1069. sound: '',
  1070. timer: '',
  1071. signClass: '',
  1072. // price: '',
  1073. startClass: '',
  1074. id: '',
  1075. courseFee: null, // 声部费用
  1076. temporaryCourseFee: null, // 本次课程费用
  1077. musicGoodsIdList: null, // 乐器商品编号
  1078. musicMode: null, // 乐器购买方式
  1079. musicPrice: null, // 乐器购买金额
  1080. instrGoodsIdList: [], // 辅件商品编号
  1081. instrPrice: null // 辅件购买金额
  1082. },
  1083. *
  1084. */
  1085. }
  1086. }
  1087. })
  1088. }
  1089. },
  1090. lockStudent (row) {
  1091. this.$confirm('是否锁定/解锁学生缴费周期?', '提示', {
  1092. confirmButtonText: '确定',
  1093. cancelButtonText: '取消',
  1094. type: 'warning'
  1095. }).then(() => {
  1096. let musicGroupId = this.teamid;
  1097. let studentId = row.userId;
  1098. let isLock;
  1099. row.isLock == 0 ? isLock = 1 : isLock = 0;
  1100. StudentFeeIsLock({ musicGroupId, studentId, isLock }).then(res => {
  1101. if (res.code == 200) {
  1102. this.$message.success('修改成功')
  1103. this.getList()
  1104. }
  1105. })
  1106. }).catch(() => {
  1107. });
  1108. },
  1109. resetPay (row) {
  1110. this.activeRow = row;
  1111. this.payVisible = true;
  1112. this.payForm.studentName = row.realName;
  1113. this.payForm.payMoney = row.courseFee;
  1114. this.payForm.payMonth = row.paymentPeriodList.split(',')
  1115. if (this.payForm.payMonth[0] == "") {
  1116. this.payForm.payMonth = []
  1117. }
  1118. },
  1119. submitPay () {
  1120. let studentId = this.activeRow.userId;
  1121. let musicGroupId = this.teamid;
  1122. let month = this.payForm.payMonth.join(',') || null;
  1123. let amount = this.payForm.payMoney;
  1124. let obj = {
  1125. studentId,
  1126. musicGroupId,
  1127. month,
  1128. amount
  1129. }
  1130. updateStudentFee(obj).then(res => {
  1131. if (res.code == 200) {
  1132. this.$message.success('修改成功')
  1133. this.payVisible = false;
  1134. this.getList();
  1135. }
  1136. })
  1137. },
  1138. closePayVisible () {
  1139. this.$refs['payForm'].resetFields();
  1140. this.payVisible = false;
  1141. }
  1142. }
  1143. }
  1144. </script>
  1145. <style lang="scss" scoped>
  1146. // .moreInput {
  1147. // width: 100%;
  1148. // display: flex;
  1149. // /deep/.el-form-item__content {
  1150. // display: flex;
  1151. // flex-direction: row;
  1152. // }
  1153. // }
  1154. .el-select {
  1155. width: 180px !important;
  1156. }
  1157. .headWrap {
  1158. padding: 20px 0;
  1159. }
  1160. /deep/.el-date-editor.el-input {
  1161. width: auto;
  1162. .el-input__inner {
  1163. padding-right: 0;
  1164. }
  1165. }
  1166. .studentInfo {
  1167. /deep/.el-dialog__body {
  1168. padding-top: 0;
  1169. padding-bottom: 0;
  1170. }
  1171. }
  1172. // .instrList {
  1173. // display: flex;
  1174. // /deep/.el-form-item__content {
  1175. // width: 80%;
  1176. // }
  1177. // .el-col {
  1178. // /deep/.el-form-item__content {
  1179. // width: 100%;
  1180. // }
  1181. // }
  1182. // }
  1183. .stu-container {
  1184. .topFrom {
  1185. margin: 20px 30px 0;
  1186. width: 1000px;
  1187. }
  1188. .newStudent {
  1189. width: 121px;
  1190. height: 40px;
  1191. background: rgba(20, 146, 138, 1);
  1192. border-radius: 4px;
  1193. color: #fff;
  1194. text-align: center;
  1195. line-height: 40px;
  1196. font-size: 14px;
  1197. cursor: pointer;
  1198. }
  1199. }
  1200. .left-code,
  1201. .right-code {
  1202. // width: 50%;
  1203. // float: left;
  1204. h2 {
  1205. display: block;
  1206. font-size: 18px;
  1207. text-align: center;
  1208. padding-bottom: 8px;
  1209. line-height: 1;
  1210. height: 30px;
  1211. margin-bottom: 0;
  1212. }
  1213. .qrcode {
  1214. display: flex;
  1215. justify-content: center;
  1216. img {
  1217. width: 200px;
  1218. height: 200px;
  1219. // margin: 0 auto;
  1220. }
  1221. }
  1222. .code-url {
  1223. font-size: 18px;
  1224. text-align: center;
  1225. padding: 15px 15px 0 15px;
  1226. }
  1227. }
  1228. .export {
  1229. background: #14928a;
  1230. }
  1231. </style>