studentList.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939
  1. <template>
  2. <div class="stu-container">
  3. <div class="studentListWrap" v-if="team_status == 'PROGRESS'">
  4. <div
  5. class="newBand"
  6. v-permission="'studentRegistration/insertStudent'"
  7. @click="createStudentFrom"
  8. >
  9. 新增学员
  10. </div>
  11. </div>
  12. <!-- 搜索类型 -->
  13. <save-form
  14. ref="searchForm"
  15. :inline="true"
  16. :save-key="saveKey"
  17. class="searchForm"
  18. @submit="search"
  19. @reset="onReSet"
  20. :model="searchForm"
  21. >
  22. <el-form-item prop="search">
  23. <el-input
  24. v-model.trim="searchForm.search"
  25. clearable
  26. placeholder="学生姓名或电话"
  27. @keyup.enter.native="search"
  28. ></el-input>
  29. </el-form-item>
  30. <el-form-item prop="studentStatus">
  31. <el-select
  32. v-model.trim="searchForm.studentStatus"
  33. clearable
  34. filterable
  35. placeholder="学员状态"
  36. >
  37. <el-option label="在读" value="NORMAL"></el-option>
  38. <el-option label="请假" value="LEAVE"></el-option>
  39. <el-option label="退团" value="QUIT"></el-option>
  40. <el-option label="报名" value="APPLY"></el-option>
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item prop="createYear">
  44. <el-date-picker
  45. v-model="searchForm.createYear"
  46. type="year"
  47. value-format="yyyy"
  48. placeholder="选择入团年份"
  49. >
  50. </el-date-picker>
  51. </el-form-item>
  52. <el-form-item prop="currentGrade">
  53. <!-- <el-input
  54. v-model.trim="searchForm.currentGrade"
  55. clearable
  56. placeholder="学员年级"
  57. ></el-input> -->
  58. <el-select
  59. v-model.trim="searchForm.currentGrade"
  60. filterable
  61. clearable
  62. placeholder="请输入年级"
  63. >
  64. <el-option
  65. v-for="(item, index) in gradeList"
  66. :key="index"
  67. :label="item.label"
  68. :value="item.label"
  69. ></el-option>
  70. </el-select>
  71. </el-form-item>
  72. <el-form-item prop="classGroupId">
  73. <el-select
  74. v-model.trim="searchForm.classGroupId"
  75. clearable
  76. filterable
  77. placeholder="请选择班级"
  78. >
  79. <el-option
  80. v-for="(item, index) in classList"
  81. :key="index"
  82. :value="item.id"
  83. :label="item.name"
  84. ></el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item prop="major">
  88. <el-select
  89. v-model.trim="searchForm.major"
  90. clearable
  91. filterable
  92. placeholder="所选专业"
  93. >
  94. <el-option
  95. v-for="(item, index) in soundList"
  96. :key="index"
  97. :value="item.id"
  98. :label="item.name"
  99. ></el-option>
  100. </el-select>
  101. </el-form-item>
  102. <el-form-item prop="isPay">
  103. <el-select
  104. v-model.trim="searchForm.isPay"
  105. clearable
  106. filterable
  107. placeholder="报名缴费"
  108. >
  109. <el-option label="未开启缴费" value="0"></el-option>
  110. <el-option label="开启缴费" value="1"></el-option>
  111. <el-option label="已缴费" value="2"></el-option>
  112. </el-select>
  113. </el-form-item>
  114. <el-form-item prop="oweFlag">
  115. <el-select
  116. v-model.trim="searchForm.oweFlag"
  117. clearable
  118. filterable
  119. placeholder="是否欠费"
  120. >
  121. <el-option label="否" value="0"></el-option>
  122. <el-option label="是" value="1"></el-option>
  123. </el-select>
  124. </el-form-item>
  125. <el-form-item prop="isActive">
  126. <el-select
  127. v-model.trim="searchForm.isActive"
  128. clearable
  129. filterable
  130. placeholder="是否激活"
  131. >
  132. <el-option label="是" value="1"></el-option>
  133. <el-option label="否" value="0"></el-option>
  134. </el-select>
  135. </el-form-item>
  136. <el-form-item prop="hasCourse">
  137. <el-select
  138. v-model.trim="searchForm.hasCourse"
  139. clearable
  140. placeholder="VIP/网管是否有课"
  141. >
  142. <el-option label="是" value="true"></el-option>
  143. <el-option label="否" value="false"></el-option>
  144. </el-select>
  145. </el-form-item>
  146. <el-form-item prop="carePackage">
  147. <el-select
  148. class="multiple"
  149. v-model.trim="searchForm.carePackage"
  150. clearable
  151. placeholder="关心包"
  152. >
  153. <el-option label="不可用" :value="0"></el-option>
  154. <el-option label="可用" :value="1"></el-option>
  155. <el-option label="已使用" :value="2"></el-option>
  156. </el-select>
  157. </el-form-item>
  158. <el-form-item prop="comeOnPackage">
  159. <el-select
  160. class="multiple"
  161. v-model.trim="searchForm.comeOnPackage"
  162. clearable
  163. placeholder="加油包"
  164. >
  165. <el-option label="不可用" :value="0"></el-option>
  166. <el-option label="可用" :value="1"></el-option>
  167. <el-option label="已使用" :value="2"></el-option>
  168. </el-select>
  169. </el-form-item>
  170. <el-form-item>
  171. <el-button native-type="submit" type="danger">搜索</el-button>
  172. <el-button type="primary" native-type="reset">重置</el-button>
  173. <el-button
  174. type="primary"
  175. v-permission="'export/musicGroupStudent'"
  176. @click="onMusicGroupExport"
  177. >导出</el-button
  178. >
  179. </el-form-item>
  180. </save-form>
  181. <div style="font-size: 14px; color: #f85043; padding-bottom: 10px">
  182. 在读人数:{{ studentListInfo.studying
  183. }}<i style="width: 10px; display: inline-block"></i> 退团人数:{{
  184. studentListInfo.quit
  185. }}<i style="width: 10px; display: inline-block"></i> VIP&网管转化率:{{
  186. studentListInfo.courseRate
  187. }}<i style="width: 10px; display: inline-block"></i>
  188. </div>
  189. <!-- 列表 -->
  190. <div class="tableWrap">
  191. <el-table
  192. :data="tableList"
  193. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  194. @selection-change="handleSelectionChange"
  195. >
  196. <el-table-column
  197. type="selection"
  198. width="55"
  199. :selectable="checkboxSelect"
  200. ></el-table-column>
  201. <el-table-column label="学员编号" width="120px;" prop="userId">
  202. <template slot-scope="scope">
  203. <copy-text>
  204. {{ scope.row.userId }}
  205. </copy-text>
  206. </template>
  207. </el-table-column>
  208. <el-table-column label="学员姓名" width="120px;" prop="realName">
  209. <template slot-scope="scope">
  210. <copy-text>
  211. {{ scope.row.realName }}
  212. </copy-text>
  213. </template>
  214. </el-table-column>
  215. <el-table-column
  216. align="center"
  217. prop="gender"
  218. width="50px;"
  219. label="性别"
  220. >
  221. <template slot-scope="scope">
  222. <div>{{ scope.row.gender | sex }}</div>
  223. </template>
  224. </el-table-column>
  225. <el-table-column align="center" prop="phone" label="联系电话">
  226. <template slot-scope="scope">
  227. <copy-text>
  228. {{ scope.row.phone }}
  229. </copy-text>
  230. </template>
  231. </el-table-column>
  232. <el-table-column align="center" label="入团年份">
  233. <template slot-scope="scope">
  234. <div>{{ scope.row.registerTime | dayjsFormat("YYYY年") }}</div>
  235. </template>
  236. </el-table-column>
  237. <el-table-column align="center" label="年级班级">
  238. <template slot-scope="scope">
  239. <div>{{ scope.row.currentGrade + scope.row.currentClass }}</div>
  240. </template>
  241. </el-table-column>
  242. <el-table-column align="center" label="报名专业" prop="subjectName">
  243. <template slot-scope="scope">
  244. <copy-text>
  245. {{ scope.row.regSubjectName }}
  246. </copy-text>
  247. </template>
  248. </el-table-column>
  249. <el-table-column align="center" label="入团专业" prop="subjectName">
  250. <template slot-scope="scope">
  251. <copy-text>
  252. {{ scope.row.subjectName }}
  253. </copy-text>
  254. </template>
  255. </el-table-column>
  256. <el-table-column align="center" prop="studentStatus" label="学员状态">
  257. <template slot-scope="scope">
  258. <div>{{ scope.row.studentStatus | musicGroupStudentType }}</div>
  259. </template>
  260. </el-table-column>
  261. <!-- <el-table-column align="center" label="新增学员">
  262. <template slot-scope="scope">
  263. <div>{{ scope.row.isNewStudent | yesOrNo }}</div>
  264. </template>
  265. </el-table-column> -->
  266. <el-table-column align="center" label="报名缴费">
  267. <template slot-scope="scope">
  268. <div>{{ scope.row.paymentStatus | paymentStatus }}</div>
  269. </template>
  270. </el-table-column>
  271. <el-table-column align="center" label="是否激活">
  272. <template slot-scope="scope">
  273. <div>{{ scope.row.isActive ? "是" : "否" }}</div>
  274. </template>
  275. </el-table-column>
  276. <el-table-column align="center" label="VIP/网管是否有课">
  277. <template slot-scope="scope">
  278. <div>{{ scope.row.hasCourse ? "是" : "否" }}</div>
  279. </template>
  280. </el-table-column>
  281. <el-table-column align="center" label="关心包">
  282. <template slot-scope="scope">{{
  283. scope.row.carePackage | studentPackage
  284. }}</template>
  285. </el-table-column>
  286. <el-table-column align="center" label="加油包">
  287. <template slot-scope="scope">{{
  288. scope.row.comeOnPackage | studentPackage
  289. }}</template>
  290. </el-table-column>
  291. <el-table-column align="center" label="欠费金额(元)">
  292. <template slot-scope="scope">
  293. <div :class="[scope.row.noPaymentAmount > 0 ? 'error' : null]">
  294. {{ scope.row.noPaymentAmount | moneyFormat }}
  295. <!-- musicGroupPaymentCalenderDetail/queryPage/studentList -->
  296. <auth
  297. auths="musicGroupPaymentCalenderDetail/queryPage/studentList"
  298. :router="['/teamLists']"
  299. >
  300. <i
  301. style="color: #14928a; font-size: 17px"
  302. title="缴费记录"
  303. class="el-icon-view"
  304. @click="onPaymentDetail(scope.row)"
  305. ></i>
  306. </auth>
  307. </div>
  308. </template>
  309. </el-table-column>
  310. <el-table-column label="退团原因" align="center">
  311. <template slot-scope="scope">
  312. <div>
  313. <Tooltip :content="scope.row.quitReason" />
  314. </div>
  315. </template>
  316. </el-table-column>
  317. <el-table-column
  318. align="center"
  319. fixed="right"
  320. width="360px;"
  321. label="操作"
  322. >
  323. <template slot-scope="scope">
  324. <div>
  325. <el-button
  326. type="text"
  327. v-if="
  328. permission('studentManage/queryStudentClassGroup') &&
  329. scope.row.studentStatus != 'QUIT'
  330. "
  331. @click="lookClass(scope.row)"
  332. >查看班级</el-button
  333. >
  334. <el-button
  335. type="text"
  336. v-if="
  337. permission('musicGroupPaymentCalender/add') &&
  338. scope.row.studentStatus == 'APPLY' &&
  339. scope.row.paymentStatus != '2' &&
  340. team_status == 'PROGRESS'
  341. "
  342. @click="addPay(scope.row)"
  343. >添加缴费</el-button
  344. >
  345. <el-button
  346. type="text"
  347. v-if="
  348. permission('musicGroupQuit/directQuitMusicGroup/3852') &&
  349. scope.row.studentStatus != 'QUIT'
  350. "
  351. @click="quieTeamMask(scope.row)"
  352. >退团退费</el-button
  353. >
  354. <el-button
  355. type="text"
  356. v-if="
  357. permission('musicGroupQuit/directQuitMusicGroup/3851') &&
  358. scope.row.studentStatus != 'QUIT'
  359. "
  360. @click="quieTeam(scope.row)"
  361. >退团</el-button
  362. >
  363. <el-button
  364. type="text"
  365. v-if="permission('visit/add/teamStudentList')"
  366. @click="addVisit(scope.row)"
  367. >新增回访</el-button
  368. >
  369. <el-popover
  370. v-show="scope.row.remark"
  371. placement="top-start"
  372. title="备注"
  373. width="200"
  374. trigger="hover"
  375. :content="scope.row.remark"
  376. >
  377. <el-button type="text" slot="reference">备注</el-button>
  378. </el-popover>
  379. </div>
  380. </template>
  381. </el-table-column>
  382. </el-table>
  383. <pagination
  384. :save-key="saveKey"
  385. sync
  386. :total.sync="rules.total"
  387. :page.sync="rules.page"
  388. :limit.sync="rules.limit"
  389. :page-sizes="rules.page_size"
  390. @pagination="getList"
  391. />
  392. </div>
  393. <el-dialog
  394. title="新增学员"
  395. width="700px"
  396. class="studentInfo"
  397. :visible.sync="addStudentVisible"
  398. >
  399. <el-form
  400. :model="maskForm"
  401. label-position="right"
  402. label-width="120px"
  403. ref="maskForm"
  404. :rules="maskRules"
  405. :inline="true"
  406. >
  407. <el-alert title="基本信息" :closable="false" class="alert" type="info">
  408. </el-alert>
  409. <el-form-item
  410. label="联系电话"
  411. prop="phone"
  412. :rules="[
  413. { required: true, message: '请输入手机号' },
  414. {
  415. pattern: /^1[3456789]\d{9}$/,
  416. message: '请输入正确的手机号',
  417. trigger: 'blur',
  418. },
  419. ]"
  420. >
  421. <el-input
  422. v-model.trim="maskForm.phone"
  423. placeholder="联系电话"
  424. @blur="checkPhone(maskForm.phone)"
  425. ></el-input>
  426. </el-form-item>
  427. <el-form-item label="学员姓名" prop="studentName">
  428. <el-input
  429. v-model.trim="maskForm.studentName"
  430. placeholder="学员姓名"
  431. ></el-input>
  432. </el-form-item>
  433. <el-form-item label="学员性别" prop="sex">
  434. <el-select v-model.trim="maskForm.sex" clearable>
  435. <el-option label="男" :value="1"></el-option>
  436. <el-option label="女" :value="0"></el-option>
  437. </el-select>
  438. </el-form-item>
  439. <el-form-item label="家长姓名" prop="parentName">
  440. <el-input
  441. v-model.trim="maskForm.parentName"
  442. placeholder="家长姓名"
  443. ></el-input>
  444. </el-form-item>
  445. <el-form-item label="年级" prop="currentGradeNum">
  446. <el-select
  447. placeholder="起始年级"
  448. filterable
  449. clearable
  450. v-model.trim="maskForm.currentGradeNum"
  451. >
  452. <el-option
  453. v-for="item in gradeList"
  454. :key="item.value"
  455. :label="item.label"
  456. :value="item.value"
  457. ></el-option>
  458. <!-- <el-option value="一年级" label="一年级"></el-option>
  459. <el-option value="二年级" label="二年级"></el-option>
  460. <el-option value="三年级" label="三年级"></el-option>
  461. <el-option value="四年级" label="四年级"></el-option>
  462. <el-option value="五年级" label="五年级"></el-option>
  463. <el-option value="六年级" label="六年级"></el-option>
  464. <el-option value="初一" label="初一"></el-option>
  465. <el-option value="初二" label="初二"></el-option>
  466. <el-option value="初三" label="初三"></el-option>
  467. <el-option value="高一" label="高一"></el-option>
  468. <el-option value="高二" label="高二"></el-option>
  469. <el-option value="高三" label="高三"></el-option> -->
  470. </el-select>
  471. </el-form-item>
  472. <el-form-item label="班级" prop="course">
  473. <el-input
  474. v-model.trim="maskForm.course"
  475. placeholder="班级"
  476. ></el-input>
  477. </el-form-item>
  478. <el-form-item label="学员声部" prop="sound">
  479. <el-select
  480. v-model.trim="maskForm.sound"
  481. clearable
  482. filterable
  483. @change="onSoundChange"
  484. >
  485. <el-option
  486. v-for="(item, index) in soundList"
  487. :key="index"
  488. :value="item.id"
  489. :label="item.name"
  490. ></el-option>
  491. </el-select>
  492. </el-form-item>
  493. <!-- <el-form-item label="证件号"
  494. prop="id">
  495. <el-input v-model.trim="maskForm.id"></el-input>
  496. </el-form-item>-->
  497. <el-form-item label="出生日期" style="margin-right: 0" prop="timer">
  498. <el-col :span="24">
  499. <el-date-picker
  500. v-model.trim="maskForm.timer"
  501. value-format="yyyy-MM-dd"
  502. type="date"
  503. :picker-options="{
  504. firstDayOfWeek: 1,
  505. }"
  506. placeholder="选择日期"
  507. ></el-date-picker>
  508. </el-col>
  509. </el-form-item>
  510. </el-form>
  511. <div slot="footer" class="dialog-footer">
  512. <!-- <el-button @click="addStudentVisible = false">取 消</el-button> -->
  513. <el-button type="primary" @click="addStudent">确 定</el-button>
  514. </div>
  515. </el-dialog>
  516. <el-dialog
  517. title="学员所在班级"
  518. width="640px"
  519. :visible.sync="studentClassVisible"
  520. >
  521. <el-form :model="classMask">
  522. <el-form-item label="学生姓名">{{
  523. classMask.studentName
  524. }}</el-form-item>
  525. <el-form-item
  526. label="所在班级"
  527. v-for="(item, index) in classLists"
  528. :key="index"
  529. >{{ item.name }}</el-form-item
  530. >
  531. </el-form>
  532. </el-dialog>
  533. <!-- 退团弹窗 -->
  534. <el-dialog title="退团信息确认" width="640px" :visible.sync="quitVisible">
  535. <el-form :model="quitForm" ref="quitForm" label-width="150px" :rules="quitRules">
  536. <el-form-item
  537. label="退还云教练费用"
  538. prop="isCloudTeacherAmount"
  539. v-if="activeRow.cloudTeacherAmount > 0"
  540. >
  541. <el-radio v-model.trim="quitForm.isCloudTeacherAmount" :label="true"
  542. >是</el-radio
  543. >
  544. <el-radio v-model.trim="quitForm.isCloudTeacherAmount" :label="false"
  545. >否</el-radio
  546. >
  547. </el-form-item>
  548. <el-form-item
  549. label="退还云教练金额"
  550. prop="cloudTeacherAmount"
  551. v-if="quitForm.isCloudTeacherAmount"
  552. >
  553. <el-input
  554. type="number"
  555. v-model.trim="quitForm.cloudTeacherAmount"
  556. style="width: 180px"
  557. >
  558. <template slot="append">元</template>
  559. </el-input>
  560. </el-form-item>
  561. <el-form-item label="退还课程费用" prop="isRefundCourseFee">
  562. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="true"
  563. >是</el-radio
  564. >
  565. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="false"
  566. >否</el-radio
  567. >
  568. </el-form-item>
  569. <el-form-item label="退还乐器费用" prop="isRefundInstrumentFee">
  570. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="true"
  571. >是</el-radio
  572. >
  573. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="false"
  574. >否</el-radio
  575. >
  576. </el-form-item>
  577. <el-form-item label="退还教辅费用" prop="isRefundTeachingAssistantsFee">
  578. <el-radio
  579. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  580. :label="true"
  581. >是</el-radio
  582. >
  583. <el-radio
  584. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  585. :label="false"
  586. >否</el-radio
  587. >
  588. </el-form-item>
  589. <el-form-item
  590. label="退还乐保费用"
  591. prop="isMaintenanceFee"
  592. v-if="activeRow.hasMaintenance"
  593. >
  594. <el-radio v-model.trim="quitForm.isMaintenanceFee" :label="true"
  595. >是</el-radio
  596. >
  597. <el-radio v-model.trim="quitForm.isMaintenanceFee" :label="false"
  598. >否</el-radio
  599. >
  600. </el-form-item>
  601. <el-form-item
  602. label="退还乐保金额"
  603. prop="maintenanceFee"
  604. v-if="quitForm.isMaintenanceFee"
  605. >
  606. <el-input
  607. type="number"
  608. v-model="quitForm.maintenanceFee"
  609. style="width: 180px"
  610. >
  611. <template slot="append">元</template>
  612. </el-input>
  613. </el-form-item>
  614. <el-form-item label="退团原因" prop="reason">
  615. <el-input type="textarea" v-model.trim="quitForm.reason"></el-input>
  616. </el-form-item>
  617. </el-form>
  618. <span slot="footer" class="dialog-footer question">
  619. <div>
  620. <el-popover placement="right" width="500" trigger="click">
  621. <div class="popoverWrap">
  622. <p>乐团退团退费规则:</p>
  623. <p>退还乐器练习云教练费用:报名缴费时缴费的乐器练习云教练费用</p>
  624. <p>退还课程费用:缴费总额-已结束课时单价之和</p>
  625. <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
  626. <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
  627. <p>退还乐保费用:报名缴费时缴费的乐保费用</p>
  628. </div>
  629. <el-button
  630. type="text"
  631. icon="el-icon-question"
  632. slot="reference"
  633. style="color: red"
  634. >退团退费说明</el-button
  635. >
  636. </el-popover>
  637. </div>
  638. <div>
  639. <el-button @click="quitVisible = false">取 消</el-button>
  640. <el-button type="primary" @click="chioseType">确 定</el-button>
  641. </div>
  642. </span>
  643. </el-dialog>
  644. <el-dialog
  645. title="修改缴费周期"
  646. :before-close="closePayVisible"
  647. width="600px"
  648. :visible.sync="payVisible"
  649. >
  650. <el-form :model="payForm" ref="payForm" :inline="true">
  651. <el-form-item label="学生姓名" prop="studentName">
  652. <el-input v-model.trim="payForm.studentName" disabled></el-input>
  653. </el-form-item>
  654. <br />
  655. <el-form-item label="缴费金额" prop="payMoney">
  656. <el-input
  657. type="number"
  658. v-model.trim="payForm.payMoney"
  659. @mousewheel.native.prevent
  660. ></el-input>
  661. </el-form-item>
  662. <el-form-item label="缴费月份" prop="payMonth">
  663. <el-checkbox-group
  664. v-model.trim="payForm.payMonth"
  665. fill="#14928A"
  666. text-color="#474747"
  667. >
  668. <el-checkbox label="1">一月</el-checkbox>
  669. <el-checkbox label="2">二月</el-checkbox>
  670. <el-checkbox label="3">三月</el-checkbox>
  671. <el-checkbox label="4">四月</el-checkbox>
  672. <el-checkbox label="5">五月</el-checkbox>
  673. <el-checkbox label="6">六月</el-checkbox>
  674. <el-checkbox label="7">七月</el-checkbox>
  675. <el-checkbox label="8">八月</el-checkbox>
  676. <el-checkbox label="9">九月</el-checkbox>
  677. <el-checkbox label="10">十月</el-checkbox>
  678. <el-checkbox label="11">十一月</el-checkbox>
  679. <el-checkbox label="12">十二月</el-checkbox>
  680. </el-checkbox-group>
  681. </el-form-item>
  682. <!-- studentName: '',
  683. payMoney: '',
  684. payMonth-->
  685. </el-form>
  686. <div slot="footer" class="dialog-footer">
  687. <el-button @click="quitVisible = false">取 消</el-button>
  688. <el-button type="primary" @click="submitPay">确 定</el-button>
  689. </div>
  690. </el-dialog>
  691. <el-dialog
  692. title="新增回访"
  693. width="500px"
  694. destroy-on-close
  695. :close-on-click-modal="false"
  696. :visible.sync="visitVisiable"
  697. >
  698. <visit
  699. v-if="visitVisiable && detail"
  700. :detail="detail"
  701. @close="visitVisiable = false"
  702. @submited="getList"
  703. />
  704. </el-dialog>
  705. <el-dialog
  706. title="选择班级"
  707. destroy-on-close
  708. width="700px"
  709. :visible.sync="createUserPayVisible"
  710. >
  711. <createUserPay
  712. :signList="signList"
  713. :mixList="mixList"
  714. :highList="highList"
  715. :snapList="snapList"
  716. :highonlineList="highonlineList"
  717. :musicGroupId="this.teamid"
  718. :organizationCourseUnitPriceSettings="
  719. organizationCourseUnitPriceSettings
  720. "
  721. :createdUserId="createdUserId"
  722. :baseInfo="baseInfo"
  723. @submited="getList"
  724. @close="createUserPayVisible = false"
  725. />
  726. </el-dialog>
  727. <el-dialog
  728. title="缴费记录"
  729. width="900px"
  730. :visible.sync="paymentDetailVisible"
  731. >
  732. <payment-list
  733. v-if="paymentDetailVisible"
  734. :paymentDetail="paymentDetail"
  735. @close="paymentDetailVisible = false"
  736. />
  737. </el-dialog>
  738. <el-dialog
  739. title="订单详情"
  740. :visible.sync="orderVisible"
  741. width="600px"
  742. v-if="orderVisible"
  743. >
  744. <el-form :model="orderForm" :inline="true">
  745. <!-- name: '',
  746. totalAmount: '',
  747. subject: '',
  748. subjectFee: '',
  749. axe: '',
  750. axePrice: '',
  751. others: '',
  752. othersPrice: '' -->
  753. <el-form-item label="学员姓名">
  754. <el-input v-model.trim="orderForm.name" disabled=""></el-input>
  755. </el-form-item>
  756. <el-form-item label="实缴金额">
  757. <el-input v-model.trim="orderForm.totalAmount" disabled=""></el-input>
  758. </el-form-item>
  759. <el-form-item label="实际专业">
  760. <el-input v-model.trim="orderForm.subject" disabled=""></el-input>
  761. </el-form-item>
  762. <el-form-item label="课程费用">
  763. <el-input v-model.trim="orderForm.subjectFee" disabled=""></el-input>
  764. </el-form-item>
  765. <el-form-item label="选择乐器">
  766. <el-input v-model.trim="orderForm.axe" disabled=""></el-input>
  767. </el-form-item>
  768. <el-form-item label="乐器价格">
  769. <el-input v-model.trim="orderForm.axePrice" disabled=""></el-input>
  770. </el-form-item>
  771. <el-form-item label="教辅组合">
  772. <el-input v-model.trim="orderForm.others" disabled=""></el-input>
  773. </el-form-item>
  774. <el-form-item label="组合价格">
  775. <el-input v-model.trim="orderForm.othersPrice" disabled=""></el-input>
  776. </el-form-item>
  777. </el-form>
  778. <div slot="footer" class="dialog-footer">
  779. <!-- <el-button>取 消</el-button> -->
  780. <el-button type="primary" @click="orderVisible = false"
  781. >确 定</el-button
  782. >
  783. </div>
  784. </el-dialog>
  785. </div>
  786. </template>
  787. <script>
  788. import {
  789. getTeamStudentList,
  790. getTeamStudentInfo,
  791. findSound,
  792. StudentQuit,
  793. findSubjectPlan,
  794. getGoods,
  795. getMusicGroup,
  796. getMusicGroupAllClass,
  797. StudentFeeIsLock,
  798. updateStudentFee,
  799. getMusicGroupGradeList,
  800. getStudentList,
  801. musicGroupOpenPay,
  802. extensionPayment,
  803. extensionApplyExpire,
  804. getTeamBaseInfo,
  805. getintoClass,
  806. resetPlanNum,
  807. openPayment,
  808. musicGroupFound,
  809. checkCanReg,
  810. } from "@/api/buildTeam";
  811. import {
  812. addStudent,
  813. getStudentClass,
  814. getStudentInfoByPhone,
  815. getStudentFeeDetail,
  816. resetStudentSubject,
  817. } from "@/api/studentManager";
  818. import qrCode from "@/components/QrCode/index";
  819. import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
  820. import { visitChiose } from "@/utils/searchArray";
  821. import pagination from "@/components/Pagination/index";
  822. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  823. import QRCode from "qrcodejs2";
  824. import axios from "axios";
  825. import { getToken } from "@/utils/auth";
  826. import { permission } from "@/utils/directivePage";
  827. import { addVisit } from "@/views/returnVisitManager/api.js";
  828. import cleanDeep from "clean-deep";
  829. import createUserPay from "./modals/create-user-pay.vue";
  830. import TimesView from "./modals/course-time-detail";
  831. import paymentCycle from "../../resetTeaming/modals/payment-cycle";
  832. import paymentList from "./modals/payment-list";
  833. import Tooltip from "@/components/Tooltip/index";
  834. import changeVoice from "@/views/teamBuild/modals/change-voice";
  835. //import changeVoice from "./modals/change-voice";
  836. import visit from "@/views/withdrawal-application/modals/visit";
  837. import mergeMusic from "@/views/teamBuild/components/merge-music";
  838. export default {
  839. name: "tstudentList",
  840. data() {
  841. return {
  842. detail: null,
  843. teamid: "",
  844. paymentDetailVisible: false,
  845. paymentDetail: {},
  846. payVisible: false,
  847. quitVisible: false, // 退团信息确认的弹窗
  848. studentClassVisible: false, // 学员所在班级弹窗
  849. addStudentVisible: false, //新增学员弹窗
  850. timesVisible: false,
  851. timerDetail: null,
  852. topFrom: {
  853. // 顶部的禁选框集合
  854. expect: "2", // 预期招生
  855. studing: "5", // 在读人数
  856. allmoney: "100", //实收总额
  857. students: "5", // 实际招生人数
  858. signout: "10", // 退团总数
  859. },
  860. searchForm: {
  861. studentStatus: "", // 学生状态
  862. major: "", // 报名专业
  863. isPay: "", // 是否缴费
  864. search: "",
  865. isActive: "",
  866. oweFlag: "",
  867. currentGrade: null,
  868. createYear: null,
  869. classGroupId: null,
  870. hasCourse: null,
  871. carePackage: null,
  872. comeOnPackage: null,
  873. },
  874. organizationCourseUnitPriceSettings: [],
  875. quitForm: {
  876. // 退团信息确认
  877. isCloudTeacherAmount: null,
  878. cloudTeacherAmount: null,
  879. isRefundCourseFee: null,
  880. isRefundInstrumentFee: null,
  881. isRefundTeachingAssistantsFee: null,
  882. isMaintenanceFee: null,
  883. maintenanceFee: 0,
  884. reason: "",
  885. },
  886. classMask: {
  887. studentName: "",
  888. },
  889. baseInfo: {},
  890. searchLsit: [],
  891. tableList: [], //
  892. rules: {
  893. // 分页规则
  894. limit: 10, // 限制显示条数
  895. page: 1, // 当前页
  896. total: 0, // 总条数
  897. page_size: [10, 20, 40, 50], // 选择限制显示条数
  898. },
  899. studentListInfo: {
  900. add: "",
  901. quit: "",
  902. studying: "",
  903. courseRate: "",
  904. },
  905. signList: [],
  906. mixList: [],
  907. highList: [],
  908. snapList: [],
  909. soundList: [],
  910. highonlineList: [],
  911. muiscnetworkList: [],
  912. qrcodeStatus: false, // 生成二维码
  913. qrcodes: true,
  914. qrcode: null,
  915. codeUrl: null,
  916. gradeList: [], // 学生
  917. maskForm: {
  918. studentName: "",
  919. sex: "",
  920. parentName: "",
  921. course: "",
  922. phone: "",
  923. sound: "",
  924. timer: "",
  925. signClass: "",
  926. mixClass: "",
  927. highClass: "",
  928. snapClass: [],
  929. highonline: "",
  930. muiscnetwork: "",
  931. startClass: "",
  932. currentGradeNum: null,
  933. id: "",
  934. // courseFee: null, // 声部费用
  935. temporaryCourseFee: null, // 本次课程费用
  936. musicGoodsIdList: null, // 乐器商品编号
  937. kitGroupPurchaseType: "GROUP", // 乐器购买方式
  938. musicPrice: null, // 乐器购买金额
  939. instrGoodsIdList: [], // 辅件商品编号
  940. instrPrice: null, // 辅件购买金额
  941. },
  942. remark: "", // 退团原因
  943. classList: [],
  944. quitRules: {
  945. isCloudTeacherAmount: [{ required: true, message: "请输入云教练费用" }],
  946. cloudTeacherAmount: [{ required: true, message: "请输入云教练金额", trigger: 'blur' }],
  947. isRefundCourseFee: [
  948. { required: true, message: "请选择是否退还课程费用" },
  949. ],
  950. isRefundInstrumentFee: [
  951. { required: true, message: "选择是否退还乐器费用" },
  952. ],
  953. isRefundTeachingAssistantsFee: [
  954. { required: true, message: "选择是否退还教辅费用" },
  955. ],
  956. isMaintenanceFee: [{ required: true, message: "选择是否退还乐保费用" }],
  957. maintenanceFee: [{ required: true, message: "请输入退还乐保金额" }],
  958. reason: [{ required: true, message: "请填写退团退费原因" }],
  959. },
  960. maskRules: {
  961. studentName: [{ required: true, message: "请输入学生姓名" }],
  962. sex: [{ required: true, message: "请选择学生姓名" }],
  963. parentName: [{ required: true, message: "请输入家长姓名" }],
  964. course: [{ required: true, message: "请输入班级" }],
  965. // phone: [{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
  966. sound: [{ required: true, message: "请选择声部" }],
  967. timer: [{ required: true, message: "请选择出生日期" }],
  968. signClass: [{ required: true, message: "请选择声部班" }],
  969. // price: [{ required: true, message: '请输入首缴金额' },],
  970. currentGradeNum: [{ required: true, message: "请选择年级" }],
  971. id: [{ required: true, message: "请输入证件号" }],
  972. // courseFee: [{ required: true, message: "请输入声部费用" }],
  973. temporaryCourseFee: [{ required: true, message: "请输课程费用" }],
  974. musicGoodsIdList: [
  975. { required: true, message: "请选择乐器", trigger: "change" },
  976. ],
  977. musicPrice: [{ required: true, message: "请输入乐器购买金额" }],
  978. instrGoodsIdList: [{ required: true, message: "请选择辅件" }],
  979. instrPrice: [{ required: true, message: "请输入辅件金额" }],
  980. },
  981. INSTRUMENTLIST: [], // 乐器列表
  982. ACCESSORIESLIST: [], // 辅件列表
  983. activeRow: { hasMaintenance: false },
  984. Fsearch: null,
  985. Frules: null,
  986. payForm: {
  987. studentName: "",
  988. payMoney: "",
  989. payMonth: [],
  990. },
  991. kitStatus: false, // 乐器提供方式
  992. // 新增回访记录弹窗
  993. visitVisiable: false,
  994. visitForm: {
  995. musicGroupId: "",
  996. overview: "",
  997. purpose: "",
  998. studentId: "",
  999. type: "",
  1000. visitTime: "",
  1001. visitType: "",
  1002. feedback: "",
  1003. studentName: "",
  1004. },
  1005. cycles: [{}],
  1006. collapse: [0],
  1007. visitChiose,
  1008. visitRules: {
  1009. overview: [{ required: true, message: "请输入学生近况" }],
  1010. feedback: [{ required: true, message: "请输入家长反馈" }],
  1011. visitTime: [{ required: true, message: "请输入回访时间" }],
  1012. visitType: [{ required: true, message: "请选择回访类型" }],
  1013. },
  1014. pickerOptions: null,
  1015. classLists: null,
  1016. createdUserId: 0,
  1017. createUserPayVisible: false,
  1018. team_status: "",
  1019. // 整合报名中
  1020. orderVisible: false,
  1021. orderForm: {
  1022. name: "",
  1023. totalAmount: "",
  1024. subject: "",
  1025. subjectFee: "",
  1026. axe: "",
  1027. axePrice: "",
  1028. others: "",
  1029. othersPrice: "",
  1030. },
  1031. maskSoundForm: {
  1032. subject: "",
  1033. },
  1034. subjectVisible: false,
  1035. multipleSelection: [],
  1036. isCanReg: false,
  1037. organId: "",
  1038. };
  1039. },
  1040. components: {
  1041. pagination,
  1042. paymentCycle,
  1043. createUserPay,
  1044. Tooltip,
  1045. "times-view": TimesView,
  1046. paymentList,
  1047. visit,
  1048. qrCode,
  1049. changeVoice,
  1050. mergeMusic,
  1051. },
  1052. created() {},
  1053. filters: {
  1054. studentPays(val) {
  1055. let template = {
  1056. 0: "未缴费",
  1057. 1: "已缴费",
  1058. };
  1059. return template[val];
  1060. },
  1061. },
  1062. // activated() {
  1063. // this.init();
  1064. // },
  1065. async mounted() {
  1066. try {
  1067. const res = await getOrganizationCourseUnitPriceSettings({
  1068. rows: 9999,
  1069. });
  1070. this.organizationCourseUnitPriceSettings = res.data.rows;
  1071. } catch (error) {}
  1072. this.init();
  1073. },
  1074. methods: {
  1075. onPaymentDetail(row) {
  1076. this.paymentDetail = row;
  1077. this.paymentDetailVisible = true;
  1078. },
  1079. viewTimer(row) {
  1080. // this.timerDetail = row
  1081. this.timesVisible = true;
  1082. },
  1083. permission(str) {
  1084. return permission(str);
  1085. },
  1086. async init() {
  1087. this.teamid = this.$route.query.id;
  1088. this.team_status = this.$route.query.team_status;
  1089. // 获取乐团是否能补招
  1090. // try {
  1091. // const ruselt = await checkCanReg({ musicGroupId: this.teamid });
  1092. // this.isCanReg = ruselt.data;
  1093. // } catch (e) {
  1094. // console.log(e);
  1095. // }
  1096. getMusicGroupGradeList({ musicGroupId: this.teamid }).then((res) => {
  1097. let result = res.data;
  1098. if (res.code == 200 && result) {
  1099. for (let i in result) {
  1100. this.gradeList.push({
  1101. value: i,
  1102. label: result[i],
  1103. });
  1104. }
  1105. }
  1106. });
  1107. // 获取报名截止日期和缴费截止日期
  1108. // getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1109. // if (res.code == 200) {
  1110. // this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1111. // this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1112. // this.organId = res.data.musicGroup.organId;
  1113. // }
  1114. // });
  1115. // 获取汇总数据
  1116. // this.getTeamStudent();
  1117. this.pickerOptions = this.beginDate();
  1118. this.getList();
  1119. // 获取乐团内所有声部
  1120. findSound({ musicGroupId: this.teamid }).then((res) => {
  1121. if (res.code == 200) {
  1122. this.soundList = res.data;
  1123. }
  1124. });
  1125. // this.getMusicClass()
  1126. // 获取乐团基本信息
  1127. getMusicGroup({ musicGroupId: this.teamid }).then(
  1128. (res) => (this.baseInfo = res.data)
  1129. );
  1130. // 获取乐团所有合奏课
  1131. },
  1132. getMusicClass(){
  1133. getMusicGroupAllClass({ musicGroupId: this.teamid }).then((res) => {
  1134. if (res.code == 200) {
  1135. this.classList = res.data;
  1136. this.signList = [];
  1137. this.mixList = [];
  1138. this.highList = [];
  1139. this.snapList = [];
  1140. this.highonlineList = [];
  1141. this.classList.forEach((item) => {
  1142. if (item.type == "NORMAL") {
  1143. this.signList.push(item);
  1144. } else if (item.type == "MIX") {
  1145. this.mixList.push(item);
  1146. } else if (item.type == "HIGH") {
  1147. this.highList.push(item);
  1148. }
  1149. else if (item.type == "HIGH_ONLINE"&&item.studentNum<6) {
  1150. this.highonlineList.push(item);
  1151. }
  1152. else if (item.type == "SNAP") {
  1153. this.snapList.push(item);
  1154. } else if (item.type == "MUSIC_NETWORK") {
  1155. this.muiscnetworkList.push(item);
  1156. }
  1157. });
  1158. }
  1159. });
  1160. },
  1161. getTeamStudent() {
  1162. getTeamStudentInfo({ musicGroupId: this.teamid }).then((res) => {
  1163. if (res.code == 200) {
  1164. this.studentListInfo = res.data;
  1165. }
  1166. });
  1167. },
  1168. permission(str) {
  1169. return permission(str);
  1170. },
  1171. onInstrumentChange() {
  1172. // 乐器切换时
  1173. // 乐器切换时
  1174. // let tempkitType = this.maskForm.kitGroupPurchaseType
  1175. // if(tempkitType == 'GROUP') {
  1176. // this.INSTRUMENTLIST.forEach(item => {
  1177. // if(item.value == value) {
  1178. // this.maskForm.musicPrice = item.marketPrice
  1179. // }
  1180. // })
  1181. // }
  1182. },
  1183. onKitGroupChnage(value) {
  1184. // 乐器提供方式
  1185. this.kitStatus = false;
  1186. if (value == "FREE") {
  1187. this.kitStatus = true;
  1188. this.maskForm.musicPrice = 0;
  1189. } else {
  1190. this.maskForm.musicPrice = null;
  1191. }
  1192. },
  1193. onMusicGroupExport() {
  1194. let url = "/api-web/export/musicGroupStudent";
  1195. let data = {
  1196. musicGroupId: this.teamid,
  1197. studentStatus: this.searchForm.studentStatus || null,
  1198. paymentStatus: this.searchForm.isPay || null,
  1199. subjectId: this.searchForm.major || null,
  1200. search: this.searchForm.search || null,
  1201. isActive: this.searchForm.isActive || null,
  1202. classGroupId: this.searchForm.classGroupId || null,
  1203. currentGrade: this.searchForm.currentGrade || null,
  1204. createYear: this.searchForm.createYear || null,
  1205. hasCourse: this.searchForm.hasCourse || null,
  1206. comeOnPackage: this.searchForm.comeOnPackage,
  1207. carePackage: this.searchForm.carePackage,
  1208. };
  1209. const options = {
  1210. method: "get",
  1211. headers: {
  1212. Authorization: getToken(),
  1213. },
  1214. url,
  1215. params: data,
  1216. responseType: "blob",
  1217. };
  1218. this.$confirm("您确定导出学员列表?", "提示", {
  1219. confirmButtonText: "确定",
  1220. cancelButtonText: "取消",
  1221. type: "warning",
  1222. })
  1223. .then(() => {
  1224. axios(options).then((res) => {
  1225. let blob = new Blob([res.data], {
  1226. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
  1227. type: "application/vnd.ms-excel;charset=utf-8",
  1228. // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1229. });
  1230. let objectUrl = URL.createObjectURL(blob);
  1231. let link = document.createElement("a");
  1232. let fname = this.$route.query.name + "学员列表.xls";
  1233. link.href = objectUrl;
  1234. link.setAttribute("download", fname);
  1235. document.body.appendChild(link);
  1236. link.click();
  1237. });
  1238. })
  1239. .catch(() => {});
  1240. },
  1241. search() {
  1242. this.rules.page = 1;
  1243. this.getList();
  1244. },
  1245. onReSet() {
  1246. this.$refs.searchForm.resetFields();
  1247. this.search();
  1248. },
  1249. getList() {
  1250. // getintoClass({ musicGroupId: this.teamid }).then((res) => {
  1251. // if (res.code == 200) {
  1252. // this.$set(this, "leftList", res.data);
  1253. // // this.leftList = res.data;
  1254. // }
  1255. // });
  1256. this.getTeamStudent();
  1257. let obj = {
  1258. musicGroupId: this.teamid,
  1259. page: this.rules.page,
  1260. rows: this.rules.limit,
  1261. studentStatus: this.searchForm.studentStatus || null,
  1262. paymentStatus: this.searchForm.isPay || null,
  1263. subjectId: this.searchForm.major || null,
  1264. search: this.searchForm.search || null,
  1265. isActive: this.searchForm.isActive || null,
  1266. classGroupId: this.searchForm.classGroupId || null,
  1267. currentGrade: this.searchForm.currentGrade || null,
  1268. createYear: this.searchForm.createYear || null,
  1269. oweFlag: this.searchForm.oweFlag || null,
  1270. hasCourse: this.searchForm.hasCourse || null,
  1271. oweFlag: this.searchForm.oweFlag || null,
  1272. comeOnPackage: this.searchForm.comeOnPackage,
  1273. carePackage: this.searchForm.carePackage,
  1274. };
  1275. return getTeamStudentList(obj).then((res) => {
  1276. if (res.code == 200) {
  1277. this.tableList = res.data.rows;
  1278. this.rules.total = res.data.total;
  1279. return res;
  1280. }
  1281. });
  1282. },
  1283. addPay(row) {
  1284. this.createUserPayVisible = true;
  1285. this.createdUserId = row.userId;
  1286. },
  1287. addCycle() {
  1288. this.cycles.push({});
  1289. this.collapse.push(this.collapse.length);
  1290. },
  1291. removeCycle(index) {
  1292. this.cycles[index] = null;
  1293. this.cycles = this.cycles.filter((item) => !!item);
  1294. this.collapse.pop();
  1295. },
  1296. collapseChange(val) {
  1297. this.collapse = val;
  1298. },
  1299. gotoSignin() {
  1300. this.$router.push({
  1301. path: "/business/studentSignin",
  1302. query: {
  1303. id: this.teamid,
  1304. status: this.$route.query.status,
  1305. name: this.$route.query.name,
  1306. rules: this.Frules,
  1307. search: this.Fsearch,
  1308. },
  1309. });
  1310. },
  1311. chioseType() {
  1312. this.$refs["quitForm"].validate((res) => {
  1313. if (res) {
  1314. this.$confirm("确定退团?", "提示", {
  1315. confirmButtonText: "确定",
  1316. cancelButtonText: "取消",
  1317. type: "warning",
  1318. })
  1319. .then(() => {
  1320. let row = this.activeRow;
  1321. let params = {
  1322. musicGroupId: this.teamid,
  1323. userId: row.userId,
  1324. reason: this.quitForm.reason,
  1325. isRefundCourseFee: this.quitForm.isRefundCourseFee,
  1326. isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
  1327. isRefundTeachingAssistantsFee: this.quitForm.isRefundTeachingAssistantsFee,
  1328. maintenanceFee: this.quitForm.maintenanceFee,
  1329. }
  1330. // 退还乐器练习云教练费用
  1331. if(this.quitForm.isCloudTeacherAmount) {
  1332. params.cloudTeacherAmount = this.quitForm.cloudTeacherAmount
  1333. } else {
  1334. params.cloudTeacherAmount = 0
  1335. }
  1336. // 发请求 退团
  1337. StudentQuit(params).then((res) => {
  1338. this.quitForm = {
  1339. // 退团信息确认
  1340. isRefundCourseFee: null,
  1341. isRefundInstrumentFee: null,
  1342. isRefundTeachingAssistantsFee: null,
  1343. isMaintenanceFee: null,
  1344. cloudTeacherAmount: null,
  1345. isCloudTeacherAmount: null,
  1346. maintenanceFee: 0,
  1347. reason: "",
  1348. };
  1349. if (res.code == 200) {
  1350. this.$message.success("退团成功");
  1351. this.getList();
  1352. this.quitVisible = false;
  1353. }
  1354. });
  1355. })
  1356. .catch(() => {});
  1357. } else {
  1358. }
  1359. });
  1360. // row.typeVisible = false;
  1361. },
  1362. //
  1363. addStudent() {
  1364. // 发请求添加学员
  1365. this.$refs["maskForm"].validate((res) => {
  1366. if (res) {
  1367. // this.maskForm.parentName.timer 少个生日的字段
  1368. // classGroupId: maskForm.signClass
  1369. /** <!-- signClass: '',
  1370. mixClass: '',
  1371. highClass: '',
  1372. snapClass: [], --> */
  1373. let maskForm = this.maskForm;
  1374. // if (
  1375. // !maskForm.signClass &&
  1376. // !maskForm.mixClass &&
  1377. // !maskForm.highClass &&
  1378. // !maskForm.highonline &&
  1379. // !maskForm.muiscnetwork
  1380. // ) {
  1381. // if (
  1382. // !maskForm.snapClass ||
  1383. // !(maskForm.snapClass && maskForm.snapClass.length >= 1)
  1384. // ) {
  1385. // this.$message.error("该学生必须加入一个班级");
  1386. // return;
  1387. // }
  1388. // }
  1389. if (
  1390. maskForm.musicGoodsIdList &&
  1391. (maskForm.musicPrice === "" || maskForm.musicPrice === null)
  1392. ) {
  1393. this.$message.error("请输入乐器金额");
  1394. return;
  1395. }
  1396. if (
  1397. maskForm.instrGoodsIdList &&
  1398. maskForm.instrGoodsIdList.length > 0 &&
  1399. (maskForm.instrPrice === "" || maskForm.instrPrice === null)
  1400. ) {
  1401. this.$message.error("请输入辅件金额");
  1402. return;
  1403. }
  1404. let snapClassIds;
  1405. maskForm.snapClass
  1406. ? (snapClassIds = maskForm.snapClass.join(","))
  1407. : (snapClassIds = null);
  1408. let params = {
  1409. signClassId: maskForm.signClass,
  1410. mixClassId: maskForm.mixClass,
  1411. snapClassIds,
  1412. highClassId: maskForm.highClass,
  1413. courseFee: maskForm.courseFee,
  1414. temporaryCourseFee: maskForm.temporaryCourseFee,
  1415. studentRegistration: {
  1416. name: maskForm.studentName,
  1417. gender: maskForm.sex,
  1418. birthdate: maskForm.timer,
  1419. parentsName: maskForm.parentName,
  1420. parentsPhone: maskForm.phone,
  1421. currentGrade: maskForm.startClass,
  1422. currentGradeNum: maskForm.currentGradeNum,
  1423. currentClass: maskForm.course,
  1424. subjectId: maskForm.sound,
  1425. musicGroupId: this.teamid,
  1426. },
  1427. };
  1428. params.studentPaymentOrderDetails = [];
  1429. if (maskForm.musicGoodsIdList) {
  1430. params.studentPaymentOrderDetails.push({
  1431. goodsIdList: maskForm.musicGoodsIdList,
  1432. kitGroupPurchaseType: maskForm.kitGroupPurchaseType,
  1433. type: "MUSICAL",
  1434. price: maskForm.musicPrice,
  1435. });
  1436. }
  1437. if (maskForm.instrGoodsIdList && maskForm.instrGoodsIdList != "") {
  1438. params.studentPaymentOrderDetails.push({
  1439. goodsIdList: maskForm.instrGoodsIdList.join(","),
  1440. type: "ACCESSORIES",
  1441. price: maskForm.instrPrice,
  1442. });
  1443. }
  1444. addStudent(params).then((res) => {
  1445. if (res.code == 200) {
  1446. this.$message.success("添加学生成功");
  1447. this.getList();
  1448. this.addStudentVisible = false;
  1449. this.createUserPayVisible = true;
  1450. this.createdUserId = res.data;
  1451. }
  1452. this.$refs.maskForm.resetFields();
  1453. });
  1454. }
  1455. });
  1456. },
  1457. onSoundChange(value) {
  1458. // 学员声部切换时
  1459. // this.findSubjectPlan(value)
  1460. this.ACCESSORIESLIST = [];
  1461. this.maskForm.instrGoodsIdList = [];
  1462. this.maskForm.instrPrice = null;
  1463. this.INSTRUMENTLIST = [];
  1464. this.maskForm.musicPrice = null;
  1465. this.maskForm.musicGoodsIdList = null;
  1466. this.getGoodsList(value, "INSTRUMENT"); // 乐器
  1467. this.getGoodsList(value, "ACCESSORIES"); // 辅件
  1468. },
  1469. // 获取购买方式
  1470. findSubjectPlan(subjectId) {
  1471. findSubjectPlan({
  1472. musicGroupId: this.teamid,
  1473. subjectId: subjectId,
  1474. }).then((res) => {
  1475. let result = res.data;
  1476. if (res.code == 200) {
  1477. this.maskForm.musicMode = this.getBranchType(
  1478. result.kitGroupPurchaseType
  1479. );
  1480. }
  1481. });
  1482. },
  1483. getGoodsList(subjectId, type) {
  1484. getGoods({
  1485. subjectId: subjectId,
  1486. type: type,
  1487. }).then((res) => {
  1488. let result = res.data;
  1489. if (res.code == 200) {
  1490. let tempArr = [];
  1491. result.forEach((item) => {
  1492. tempArr.push({
  1493. label: item.name,
  1494. value: item.id,
  1495. marketPrice: item.marketPrice,
  1496. });
  1497. });
  1498. if (type == "ACCESSORIES") {
  1499. this.ACCESSORIESLIST = tempArr;
  1500. }
  1501. if (type == "INSTRUMENT") {
  1502. this.INSTRUMENTLIST = tempArr;
  1503. }
  1504. }
  1505. });
  1506. },
  1507. getBranchType(status) {
  1508. let common = {
  1509. FREE: "免费",
  1510. GROUP: "团购",
  1511. LEASE: "租赁",
  1512. };
  1513. return common[status];
  1514. },
  1515. lookClass(row) {
  1516. this.classMask.studentName = row.realName;
  1517. getStudentClass({
  1518. musicGroupId: this.teamid,
  1519. teacherId: row.userId,
  1520. }).then((res) => {
  1521. if (res.code == 200) {
  1522. this.classLists = res.data;
  1523. this.studentClassVisible = true;
  1524. }
  1525. });
  1526. },
  1527. quieTeamMask(row) {
  1528. this.activeRow = row;
  1529. this.quitVisible = true;
  1530. this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount
  1531. },
  1532. quieTeam(row) {
  1533. this.$prompt("请输入退团原因", "提示", {
  1534. confirmButtonText: "确定",
  1535. cancelButtonText: "取消",
  1536. type: "warning",
  1537. inputPattern: /\S/,
  1538. inputErrorMessage: "请输入退团原因",
  1539. })
  1540. .then((val) => {
  1541. // 发请求 退团
  1542. StudentQuit({
  1543. musicGroupId: this.teamid,
  1544. userId: row.userId,
  1545. reason: val.value,
  1546. isRefundCourseFee: false,
  1547. isRefundInstrumentFee: false,
  1548. isRefundTeachingAssistantsFee: false,
  1549. }).then((res) => {
  1550. this.quitForm = {
  1551. // 退团信息确认
  1552. isRefundCourseFee: null,
  1553. isRefundInstrumentFee: null,
  1554. isRefundTeachingAssistantsFee: null,
  1555. isMaintenanceFee: null,
  1556. cloudTeacherAmount: null,
  1557. isCloudTeacherAmount: null,
  1558. maintenanceFee: 0,
  1559. reason: "",
  1560. };
  1561. if (res.code == 200) {
  1562. this.$message.success("退团成功");
  1563. this.getList();
  1564. this.quitVisible = false;
  1565. }
  1566. });
  1567. })
  1568. .catch(() => {});
  1569. },
  1570. checkPhone(val) {
  1571. var regu = /^1[3456789]\d{9}$/;
  1572. var re = new RegExp(regu);
  1573. if (re.test(val)) {
  1574. getStudentInfoByPhone({ mobile: this.maskForm.phone }).then((res) => {
  1575. if (res.code == 200) {
  1576. if (res.data) {
  1577. this.maskForm.studentName = res.data.name;
  1578. this.maskForm.sex = res.data.gender;
  1579. this.maskForm.parentName = res.data.parentsName;
  1580. this.maskForm.course = res.data.currentClass;
  1581. this.maskForm.startClass = res.data.currentGrade;
  1582. this.maskForm.currentGradeNum = res.data.currentGradeNum
  1583. ? res.data.currentGradeNum + ""
  1584. : null;
  1585. this.maskForm.phone = val;
  1586. this.maskForm.timer = res.data.birthdate;
  1587. }
  1588. }
  1589. });
  1590. }
  1591. },
  1592. lockStudent(row) {
  1593. this.$confirm("是否锁定/解锁学生缴费周期?", "提示", {
  1594. confirmButtonText: "确定",
  1595. cancelButtonText: "取消",
  1596. type: "warning",
  1597. })
  1598. .then(() => {
  1599. let musicGroupId = this.teamid;
  1600. let studentId = row.userId;
  1601. let isLock;
  1602. row.isLock == 0 ? (isLock = 1) : (isLock = 0);
  1603. StudentFeeIsLock({ musicGroupId, studentId, isLock }).then((res) => {
  1604. if (res.code == 200) {
  1605. this.$message.success("修改成功");
  1606. this.getList();
  1607. }
  1608. });
  1609. })
  1610. .catch(() => {});
  1611. },
  1612. resetPay(row) {
  1613. this.activeRow = row;
  1614. this.payVisible = true;
  1615. this.payForm.studentName = row.realName;
  1616. this.payForm.payMoney = row.courseFee;
  1617. this.payForm.payMonth = row.paymentPeriodList.split(",");
  1618. if (this.payForm.payMonth[0] == "") {
  1619. this.payForm.payMonth = [];
  1620. }
  1621. },
  1622. submitPay() {
  1623. let studentId = this.activeRow.userId;
  1624. let musicGroupId = this.teamid;
  1625. let month = this.payForm.payMonth.join(",") || null;
  1626. let amount = this.payForm.payMoney;
  1627. let obj = {
  1628. studentId,
  1629. musicGroupId,
  1630. month,
  1631. amount,
  1632. };
  1633. updateStudentFee(obj).then((res) => {
  1634. if (res.code == 200) {
  1635. this.$message.success("修改成功");
  1636. this.payVisible = false;
  1637. this.getList();
  1638. }
  1639. });
  1640. },
  1641. closePayVisible() {
  1642. this.$refs["payForm"].resetFields();
  1643. this.payVisible = false;
  1644. },
  1645. addVisit(row) {
  1646. console.log(row);
  1647. this.detail = row;
  1648. // this.visitForm.studentName = row.realName;
  1649. // this.visitForm.musicGroupId = this.teamid;
  1650. // this.visitForm.studentId = row.userId;
  1651. this.visitVisiable = true;
  1652. },
  1653. handleChange(val) {
  1654. this.visitForm.type = val[0];
  1655. this.visitForm.purpose = val[1];
  1656. },
  1657. submitAddVisit() {
  1658. console.log(this.$refs.visitForm);
  1659. this.$refs.visitForm.validate((res) => {
  1660. if (res) {
  1661. addVisit(cleanDeep(this.visitForm)).then((res) => {
  1662. if (res.code === 200) {
  1663. this.$message.success("新增成功");
  1664. this.visitVisiable = false;
  1665. }
  1666. });
  1667. }
  1668. });
  1669. },
  1670. beginDate() {
  1671. let self = this;
  1672. return {
  1673. firstDayOfWeek: 1,
  1674. disabledDate(time) {
  1675. return time.getTime() >= new Date().getTime(); //开始时间不选时,结束时间最大值小于等于当天
  1676. },
  1677. };
  1678. },
  1679. createStudentFrom() {
  1680. this.addStudentVisible = true;
  1681. },
  1682. // 报名缴费功能
  1683. payDate() {
  1684. let self = this;
  1685. return {
  1686. firstDayOfWeek: 1,
  1687. disabledDate(time) {
  1688. if (self.applyExpireDate) {
  1689. return (
  1690. time.getTime() <=
  1691. new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
  1692. );
  1693. } else {
  1694. return false;
  1695. }
  1696. },
  1697. };
  1698. },
  1699. applyDate() {
  1700. let self = this;
  1701. return {
  1702. firstDayOfWeek: 1,
  1703. disabledDate(time) {
  1704. if (self.paymentExpireDate) {
  1705. return (
  1706. time.getTime() >
  1707. new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
  1708. );
  1709. } else {
  1710. return false;
  1711. }
  1712. },
  1713. };
  1714. },
  1715. handleSelectionChange(val) {
  1716. this.multipleSelection = val;
  1717. },
  1718. checkboxSelect(row) {
  1719. return row.paymentStatus == 0;
  1720. },
  1721. },
  1722. watch: {
  1723. createUserPayVisible(val){
  1724. if(val){
  1725. this.getMusicClass()
  1726. }
  1727. },
  1728. "quitForm.isMaintenanceFee"(val) {
  1729. if (val) {
  1730. this.quitForm.maintenanceFee = 300;
  1731. } else {
  1732. this.quitForm.maintenanceFee = 0;
  1733. }
  1734. },
  1735. quitVisible(val) {
  1736. if (!val) {
  1737. this.quitForm = {
  1738. // 退团信息确认
  1739. isRefundCourseFee: null,
  1740. isRefundInstrumentFee: null,
  1741. isRefundTeachingAssistantsFee: null,
  1742. reason: "",
  1743. };
  1744. this.$refs["quitForm"].resetFields();
  1745. }
  1746. },
  1747. // visitVisiable(val) {
  1748. // if (!val) {
  1749. // this.$refs["visitForm"].resetFields();
  1750. // }
  1751. // },
  1752. },
  1753. computed: {
  1754. saveKey() {
  1755. // return 'teamDetails-'+this.$route.query.id
  1756. return "teamDetails-studentList|id|" + this.$route.query.id;
  1757. },
  1758. },
  1759. };
  1760. </script>
  1761. <style lang="scss" scoped>
  1762. .dialog-footer.question {
  1763. display: flex;
  1764. flex-direction: row;
  1765. justify-content: space-between;
  1766. }
  1767. // .moreInput {
  1768. // width: 100%;
  1769. // display: flex;
  1770. // /deep/.el-form-item__content {
  1771. // display: flex;
  1772. // flex-direction: row;
  1773. // }
  1774. // }
  1775. .error {
  1776. color: red;
  1777. }
  1778. .el-select {
  1779. width: 180px !important;
  1780. }
  1781. .headWrap {
  1782. padding: 20px 0;
  1783. }
  1784. /deep/.el-date-editor.el-input {
  1785. width: auto;
  1786. .el-input__inner {
  1787. padding-right: 0;
  1788. }
  1789. }
  1790. .studentInfo {
  1791. /deep/.el-dialog__body {
  1792. // padding-top: 0;
  1793. // padding-bottom: 0;
  1794. }
  1795. }
  1796. // .instrList {
  1797. // display: flex;
  1798. // /deep/.el-form-item__content {
  1799. // width: 80%;
  1800. // }
  1801. // .el-col {
  1802. // /deep/.el-form-item__content {
  1803. // width: 100%;
  1804. // }
  1805. // }
  1806. // }
  1807. .stu-container {
  1808. .topFrom {
  1809. margin: 20px 30px 0;
  1810. width: 1000px;
  1811. }
  1812. .newStudent {
  1813. width: 121px;
  1814. height: 40px;
  1815. background: rgba(20, 146, 138, 1);
  1816. border-radius: 4px;
  1817. color: #fff;
  1818. text-align: center;
  1819. line-height: 40px;
  1820. font-size: 14px;
  1821. cursor: pointer;
  1822. }
  1823. }
  1824. .left-code,
  1825. .right-code {
  1826. // width: 50%;
  1827. // float: left;
  1828. h2 {
  1829. display: block;
  1830. font-size: 18px;
  1831. text-align: center;
  1832. padding-bottom: 8px;
  1833. line-height: 1;
  1834. height: 30px;
  1835. margin-bottom: 0;
  1836. }
  1837. .qrcode {
  1838. display: flex;
  1839. justify-content: center;
  1840. img {
  1841. width: 200px;
  1842. height: 200px;
  1843. // margin: 0 auto;
  1844. }
  1845. }
  1846. .code-url {
  1847. font-size: 18px;
  1848. text-align: center;
  1849. padding: 15px 15px 0 15px;
  1850. }
  1851. }
  1852. .export {
  1853. background: #14928a;
  1854. }
  1855. .alert {
  1856. margin-bottom: 10px;
  1857. }
  1858. .collapse-title {
  1859. display: flex;
  1860. justify-content: space-between;
  1861. align-items: center;
  1862. width: 100%;
  1863. .el-icon-circle-close {
  1864. font-size: 16px;
  1865. margin-right: 10px;
  1866. }
  1867. }
  1868. /deep/ .el-collapse-item__wrap {
  1869. padding-top: 20px;
  1870. }
  1871. .cycleForm {
  1872. /deep/ .el-form-item {
  1873. display: flex;
  1874. width: 100%;
  1875. /deep/ .el-form-item__content {
  1876. margin-left: 0 !important;
  1877. flex: 1;
  1878. }
  1879. }
  1880. }
  1881. .statistic {
  1882. padding: 20px 0;
  1883. text-align: center;
  1884. width: 100%;
  1885. margin: auto !important;
  1886. }
  1887. .popoverWrap {
  1888. p {
  1889. line-height: 25px;
  1890. }
  1891. }
  1892. .studentListWrap {
  1893. display: flex;
  1894. flex-direction: row;
  1895. justify-content: flex-start;
  1896. align-items: center;
  1897. div {
  1898. margin-right: 15px;
  1899. }
  1900. }
  1901. .btnList {
  1902. display: flex;
  1903. flex-direction: row;
  1904. justify-content: flex-start;
  1905. align-items: center;
  1906. flex-wrap: wrap;
  1907. & > div {
  1908. margin-right: 15px;
  1909. margin-bottom: 10px;
  1910. }
  1911. }
  1912. </style>