studentList.vue 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885
  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/directQuitMusicGroup2') &&
  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/directQuitMusicGroup3') &&
  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" :rules="quitRules">
  536. <el-form-item label="退还课程费用" prop="isRefundCourseFee">
  537. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="true"
  538. >是</el-radio
  539. >
  540. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="false"
  541. >否</el-radio
  542. >
  543. </el-form-item>
  544. <el-form-item label="退还乐器费用" prop="isRefundInstrumentFee">
  545. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="true"
  546. >是</el-radio
  547. >
  548. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="false"
  549. >否</el-radio
  550. >
  551. </el-form-item>
  552. <el-form-item label="退还教辅费用" prop="isRefundTeachingAssistantsFee">
  553. <el-radio
  554. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  555. :label="true"
  556. >是</el-radio
  557. >
  558. <el-radio
  559. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  560. :label="false"
  561. >否</el-radio
  562. >
  563. </el-form-item>
  564. <el-form-item
  565. label="退还乐保费用"
  566. prop="isMaintenanceFee"
  567. v-if="activeRow.hasMaintenance"
  568. >
  569. <el-radio v-model.trim="quitForm.isMaintenanceFee" :label="true"
  570. >是</el-radio
  571. >
  572. <el-radio v-model.trim="quitForm.isMaintenanceFee" :label="false"
  573. >否</el-radio
  574. >
  575. </el-form-item>
  576. <el-form-item
  577. label="退还乐保金额"
  578. prop="maintenanceFee"
  579. v-if="quitForm.isMaintenanceFee"
  580. >
  581. <el-input
  582. type="number"
  583. v-model.trim="quitForm.maintenanceFee"
  584. style="width: 180px"
  585. >
  586. <template slot="append">元</template>
  587. </el-input>
  588. </el-form-item>
  589. <el-form-item label="退团原因" prop="reason">
  590. <el-input type="textarea" v-model.trim="quitForm.reason"></el-input>
  591. </el-form-item>
  592. </el-form>
  593. <span slot="footer" class="dialog-footer question">
  594. <div>
  595. <el-popover placement="right" width="500" trigger="click">
  596. <div class="popoverWrap">
  597. <p>乐团退团退费规则:</p>
  598. <p>退还课程费用:缴费总额-已结束课时单价之和</p>
  599. <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
  600. <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
  601. </div>
  602. <el-button
  603. type="text"
  604. icon="el-icon-question"
  605. slot="reference"
  606. style="color: red"
  607. >退团退费说明</el-button
  608. >
  609. </el-popover>
  610. </div>
  611. <div>
  612. <el-button @click="quitVisible = false">取 消</el-button>
  613. <el-button type="primary" @click="chioseType">确 定</el-button>
  614. </div>
  615. </span>
  616. </el-dialog>
  617. <el-dialog
  618. title="修改缴费周期"
  619. :before-close="closePayVisible"
  620. width="600px"
  621. :visible.sync="payVisible"
  622. >
  623. <el-form :model="payForm" ref="payForm" :inline="true">
  624. <el-form-item label="学生姓名" prop="studentName">
  625. <el-input v-model.trim="payForm.studentName" disabled></el-input>
  626. </el-form-item>
  627. <br />
  628. <el-form-item label="缴费金额" prop="payMoney">
  629. <el-input
  630. type="number"
  631. v-model.trim="payForm.payMoney"
  632. @mousewheel.native.prevent
  633. ></el-input>
  634. </el-form-item>
  635. <el-form-item label="缴费月份" prop="payMonth">
  636. <el-checkbox-group
  637. v-model.trim="payForm.payMonth"
  638. fill="#14928A"
  639. text-color="#474747"
  640. >
  641. <el-checkbox label="1">一月</el-checkbox>
  642. <el-checkbox label="2">二月</el-checkbox>
  643. <el-checkbox label="3">三月</el-checkbox>
  644. <el-checkbox label="4">四月</el-checkbox>
  645. <el-checkbox label="5">五月</el-checkbox>
  646. <el-checkbox label="6">六月</el-checkbox>
  647. <el-checkbox label="7">七月</el-checkbox>
  648. <el-checkbox label="8">八月</el-checkbox>
  649. <el-checkbox label="9">九月</el-checkbox>
  650. <el-checkbox label="10">十月</el-checkbox>
  651. <el-checkbox label="11">十一月</el-checkbox>
  652. <el-checkbox label="12">十二月</el-checkbox>
  653. </el-checkbox-group>
  654. </el-form-item>
  655. <!-- studentName: '',
  656. payMoney: '',
  657. payMonth-->
  658. </el-form>
  659. <div slot="footer" class="dialog-footer">
  660. <el-button @click="quitVisible = false">取 消</el-button>
  661. <el-button type="primary" @click="submitPay">确 定</el-button>
  662. </div>
  663. </el-dialog>
  664. <el-dialog
  665. title="新增回访"
  666. width="500px"
  667. destroy-on-close
  668. :close-on-click-modal="false"
  669. :visible.sync="visitVisiable"
  670. >
  671. <visit
  672. v-if="visitVisiable && detail"
  673. :detail="detail"
  674. @close="visitVisiable = false"
  675. @submited="getList"
  676. />
  677. </el-dialog>
  678. <el-dialog
  679. title="选择班级"
  680. destroy-on-close
  681. width="700px"
  682. :visible.sync="createUserPayVisible"
  683. >
  684. <createUserPay
  685. :signList="signList"
  686. :mixList="mixList"
  687. :highList="highList"
  688. :snapList="snapList"
  689. :musicGroupId="this.teamid"
  690. :organizationCourseUnitPriceSettings="
  691. organizationCourseUnitPriceSettings
  692. "
  693. :createdUserId="createdUserId"
  694. :baseInfo="baseInfo"
  695. @submited="getList"
  696. @close="createUserPayVisible = false"
  697. />
  698. </el-dialog>
  699. <el-dialog
  700. title="缴费记录"
  701. width="900px"
  702. :visible.sync="paymentDetailVisible"
  703. >
  704. <payment-list
  705. v-if="paymentDetailVisible"
  706. :paymentDetail="paymentDetail"
  707. @close="paymentDetailVisible = false"
  708. />
  709. </el-dialog>
  710. <el-dialog
  711. title="订单详情"
  712. :visible.sync="orderVisible"
  713. width="600px"
  714. v-if="orderVisible"
  715. >
  716. <el-form :model="orderForm" :inline="true">
  717. <!-- name: '',
  718. totalAmount: '',
  719. subject: '',
  720. subjectFee: '',
  721. axe: '',
  722. axePrice: '',
  723. others: '',
  724. othersPrice: '' -->
  725. <el-form-item label="学员姓名">
  726. <el-input v-model.trim="orderForm.name" disabled=""></el-input>
  727. </el-form-item>
  728. <el-form-item label="实缴金额">
  729. <el-input v-model.trim="orderForm.totalAmount" disabled=""></el-input>
  730. </el-form-item>
  731. <el-form-item label="实际专业">
  732. <el-input v-model.trim="orderForm.subject" disabled=""></el-input>
  733. </el-form-item>
  734. <el-form-item label="课程费用">
  735. <el-input v-model.trim="orderForm.subjectFee" disabled=""></el-input>
  736. </el-form-item>
  737. <el-form-item label="选择乐器">
  738. <el-input v-model.trim="orderForm.axe" disabled=""></el-input>
  739. </el-form-item>
  740. <el-form-item label="乐器价格">
  741. <el-input v-model.trim="orderForm.axePrice" disabled=""></el-input>
  742. </el-form-item>
  743. <el-form-item label="教辅组合">
  744. <el-input v-model.trim="orderForm.others" disabled=""></el-input>
  745. </el-form-item>
  746. <el-form-item label="组合价格">
  747. <el-input v-model.trim="orderForm.othersPrice" disabled=""></el-input>
  748. </el-form-item>
  749. </el-form>
  750. <div slot="footer" class="dialog-footer">
  751. <!-- <el-button>取 消</el-button> -->
  752. <el-button type="primary" @click="orderVisible = false"
  753. >确 定</el-button
  754. >
  755. </div>
  756. </el-dialog>
  757. </div>
  758. </template>
  759. <script>
  760. import {
  761. getTeamStudentList,
  762. getTeamStudentInfo,
  763. findSound,
  764. StudentQuit,
  765. findSubjectPlan,
  766. getGoods,
  767. getMusicGroup,
  768. getMusicGroupAllClass,
  769. StudentFeeIsLock,
  770. updateStudentFee,
  771. getMusicGroupGradeList,
  772. getStudentList,
  773. musicGroupOpenPay,
  774. extensionPayment,
  775. extensionApplyExpire,
  776. getTeamBaseInfo,
  777. getintoClass,
  778. resetPlanNum,
  779. openPayment,
  780. musicGroupFound,
  781. checkCanReg,
  782. } from "@/api/buildTeam";
  783. import {
  784. addStudent,
  785. getStudentClass,
  786. getStudentInfoByPhone,
  787. getStudentFeeDetail,
  788. resetStudentSubject,
  789. } from "@/api/studentManager";
  790. import qrCode from "@/components/QrCode/index";
  791. import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
  792. import { visitChiose } from "@/utils/searchArray";
  793. import pagination from "@/components/Pagination/index";
  794. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  795. import QRCode from "qrcodejs2";
  796. import axios from "axios";
  797. import { getToken } from "@/utils/auth";
  798. import { permission } from "@/utils/directivePage";
  799. import { addVisit } from "@/views/returnVisitManager/api.js";
  800. import cleanDeep from "clean-deep";
  801. import createUserPay from "./modals/create-user-pay.vue";
  802. import TimesView from "./modals/course-time-detail";
  803. import paymentCycle from "../../resetTeaming/modals/payment-cycle";
  804. import paymentList from "./modals/payment-list";
  805. import Tooltip from "@/components/Tooltip/index";
  806. import changeVoice from "@/views/teamBuild/modals/change-voice";
  807. //import changeVoice from "./modals/change-voice";
  808. import visit from "@/views/withdrawal-application/modals/visit";
  809. import mergeMusic from "@/views/teamBuild/components/merge-music";
  810. export default {
  811. name: "tstudentList",
  812. data() {
  813. return {
  814. detail: null,
  815. teamid: "",
  816. paymentDetailVisible: false,
  817. paymentDetail: {},
  818. payVisible: false,
  819. quitVisible: false, // 退团信息确认的弹窗
  820. studentClassVisible: false, // 学员所在班级弹窗
  821. addStudentVisible: false, //新增学员弹窗
  822. timesVisible: false,
  823. timerDetail: null,
  824. topFrom: {
  825. // 顶部的禁选框集合
  826. expect: "2", // 预期招生
  827. studing: "5", // 在读人数
  828. allmoney: "100", //实收总额
  829. students: "5", // 实际招生人数
  830. signout: "10", // 退团总数
  831. },
  832. searchForm: {
  833. studentStatus: "", // 学生状态
  834. major: "", // 报名专业
  835. isPay: "", // 是否缴费
  836. search: "",
  837. isActive: "",
  838. oweFlag: "",
  839. currentGrade: null,
  840. createYear: null,
  841. classGroupId: null,
  842. hasCourse: null,
  843. carePackage: null,
  844. comeOnPackage: null,
  845. },
  846. organizationCourseUnitPriceSettings: [],
  847. quitForm: {
  848. // 退团信息确认
  849. isRefundCourseFee: null,
  850. isRefundInstrumentFee: null,
  851. isRefundTeachingAssistantsFee: null,
  852. isMaintenanceFee: null,
  853. maintenanceFee: 0,
  854. reason: "",
  855. },
  856. classMask: {
  857. studentName: "",
  858. },
  859. baseInfo: {},
  860. searchLsit: [],
  861. tableList: [], //
  862. rules: {
  863. // 分页规则
  864. limit: 10, // 限制显示条数
  865. page: 1, // 当前页
  866. total: 0, // 总条数
  867. page_size: [10, 20, 40, 50], // 选择限制显示条数
  868. },
  869. studentListInfo: {
  870. add: "",
  871. quit: "",
  872. studying: "",
  873. courseRate: "",
  874. },
  875. signList: [],
  876. mixList: [],
  877. highList: [],
  878. snapList: [],
  879. soundList: [],
  880. highonlineList: [],
  881. muiscnetworkList: [],
  882. qrcodeStatus: false, // 生成二维码
  883. qrcodes: true,
  884. qrcode: null,
  885. codeUrl: null,
  886. gradeList: [], // 学生
  887. maskForm: {
  888. studentName: "",
  889. sex: "",
  890. parentName: "",
  891. course: "",
  892. phone: "",
  893. sound: "",
  894. timer: "",
  895. signClass: "",
  896. mixClass: "",
  897. highClass: "",
  898. snapClass: [],
  899. highonline: "",
  900. muiscnetwork: "",
  901. startClass: "",
  902. currentGradeNum: null,
  903. id: "",
  904. // courseFee: null, // 声部费用
  905. temporaryCourseFee: null, // 本次课程费用
  906. musicGoodsIdList: null, // 乐器商品编号
  907. kitGroupPurchaseType: "GROUP", // 乐器购买方式
  908. musicPrice: null, // 乐器购买金额
  909. instrGoodsIdList: [], // 辅件商品编号
  910. instrPrice: null, // 辅件购买金额
  911. },
  912. remark: "", // 退团原因
  913. classList: [],
  914. quitRules: {
  915. isRefundCourseFee: [
  916. { required: true, message: "请选择是否退还课程费用" },
  917. ],
  918. isRefundInstrumentFee: [
  919. { required: true, message: "选择是否退还乐器费用" },
  920. ],
  921. isRefundTeachingAssistantsFee: [
  922. { required: true, message: "选择是否退还教辅费用" },
  923. ],
  924. isMaintenanceFee: [{ required: true, message: "选择是否退还乐保费用" }],
  925. maintenanceFee: [{ required: true, message: "请输入退还乐保金额" }],
  926. reason: [{ required: true, message: "请填写退团退费原因" }],
  927. },
  928. maskRules: {
  929. studentName: [{ required: true, message: "请输入学生姓名" }],
  930. sex: [{ required: true, message: "请选择学生姓名" }],
  931. parentName: [{ required: true, message: "请输入家长姓名" }],
  932. course: [{ required: true, message: "请输入班级" }],
  933. // phone: [{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
  934. sound: [{ required: true, message: "请选择声部" }],
  935. timer: [{ required: true, message: "请选择出生日期" }],
  936. signClass: [{ required: true, message: "请选择声部班" }],
  937. // price: [{ required: true, message: '请输入首缴金额' },],
  938. currentGradeNum: [{ required: true, message: "请选择年级" }],
  939. id: [{ required: true, message: "请输入证件号" }],
  940. // courseFee: [{ required: true, message: "请输入声部费用" }],
  941. temporaryCourseFee: [{ required: true, message: "请输课程费用" }],
  942. musicGoodsIdList: [
  943. { required: true, message: "请选择乐器", trigger: "change" },
  944. ],
  945. musicPrice: [{ required: true, message: "请输入乐器购买金额" }],
  946. instrGoodsIdList: [{ required: true, message: "请选择辅件" }],
  947. instrPrice: [{ required: true, message: "请输入辅件金额" }],
  948. },
  949. INSTRUMENTLIST: [], // 乐器列表
  950. ACCESSORIESLIST: [], // 辅件列表
  951. activeRow: { hasMaintenance: false },
  952. Fsearch: null,
  953. Frules: null,
  954. payForm: {
  955. studentName: "",
  956. payMoney: "",
  957. payMonth: [],
  958. },
  959. kitStatus: false, // 乐器提供方式
  960. // 新增回访记录弹窗
  961. visitVisiable: false,
  962. visitForm: {
  963. musicGroupId: "",
  964. overview: "",
  965. purpose: "",
  966. studentId: "",
  967. type: "",
  968. visitTime: "",
  969. visitType: "",
  970. feedback: "",
  971. studentName: "",
  972. },
  973. cycles: [{}],
  974. collapse: [0],
  975. visitChiose,
  976. visitRules: {
  977. overview: [{ required: true, message: "请输入学生近况" }],
  978. feedback: [{ required: true, message: "请输入家长反馈" }],
  979. visitTime: [{ required: true, message: "请输入回访时间" }],
  980. visitType: [{ required: true, message: "请选择回访类型" }],
  981. },
  982. pickerOptions: null,
  983. classLists: null,
  984. createdUserId: 0,
  985. createUserPayVisible: false,
  986. team_status: "",
  987. // 整合报名中
  988. orderVisible: false,
  989. orderForm: {
  990. name: "",
  991. totalAmount: "",
  992. subject: "",
  993. subjectFee: "",
  994. axe: "",
  995. axePrice: "",
  996. others: "",
  997. othersPrice: "",
  998. },
  999. maskSoundForm: {
  1000. subject: "",
  1001. },
  1002. subjectVisible: false,
  1003. multipleSelection: [],
  1004. isCanReg: false,
  1005. organId: "",
  1006. };
  1007. },
  1008. components: {
  1009. pagination,
  1010. paymentCycle,
  1011. createUserPay,
  1012. Tooltip,
  1013. "times-view": TimesView,
  1014. paymentList,
  1015. visit,
  1016. qrCode,
  1017. changeVoice,
  1018. mergeMusic,
  1019. },
  1020. created() {},
  1021. filters: {
  1022. studentPays(val) {
  1023. let template = {
  1024. 0: "未缴费",
  1025. 1: "已缴费",
  1026. };
  1027. return template[val];
  1028. },
  1029. },
  1030. // activated() {
  1031. // this.init();
  1032. // },
  1033. async mounted() {
  1034. try {
  1035. const res = await getOrganizationCourseUnitPriceSettings({
  1036. rows: 9999,
  1037. });
  1038. this.organizationCourseUnitPriceSettings = res.data.rows;
  1039. } catch (error) {}
  1040. this.init();
  1041. },
  1042. methods: {
  1043. onPaymentDetail(row) {
  1044. this.paymentDetail = row;
  1045. this.paymentDetailVisible = true;
  1046. },
  1047. viewTimer(row) {
  1048. // this.timerDetail = row
  1049. this.timesVisible = true;
  1050. },
  1051. permission(str) {
  1052. return permission(str);
  1053. },
  1054. async init() {
  1055. this.teamid = this.$route.query.id;
  1056. this.team_status = this.$route.query.team_status;
  1057. // 获取乐团是否能补招
  1058. // try {
  1059. // const ruselt = await checkCanReg({ musicGroupId: this.teamid });
  1060. // this.isCanReg = ruselt.data;
  1061. // } catch (e) {
  1062. // console.log(e);
  1063. // }
  1064. getMusicGroupGradeList({ musicGroupId: this.teamid }).then((res) => {
  1065. let result = res.data;
  1066. if (res.code == 200 && result) {
  1067. for (let i in result) {
  1068. this.gradeList.push({
  1069. value: i,
  1070. label: result[i],
  1071. });
  1072. }
  1073. }
  1074. });
  1075. // 获取报名截止日期和缴费截止日期
  1076. // getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1077. // if (res.code == 200) {
  1078. // this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1079. // this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1080. // this.organId = res.data.musicGroup.organId;
  1081. // }
  1082. // });
  1083. // 获取汇总数据
  1084. // this.getTeamStudent();
  1085. this.pickerOptions = this.beginDate();
  1086. this.getList();
  1087. // 获取乐团内所有声部
  1088. findSound({ musicGroupId: this.teamid }).then((res) => {
  1089. if (res.code == 200) {
  1090. this.soundList = res.data;
  1091. }
  1092. });
  1093. // 获取乐团基本信息
  1094. getMusicGroup({ musicGroupId: this.teamid }).then(
  1095. (res) => (this.baseInfo = res.data)
  1096. );
  1097. // 获取乐团所有合奏课
  1098. getMusicGroupAllClass({ musicGroupId: this.teamid }).then((res) => {
  1099. if (res.code == 200) {
  1100. this.classList = res.data;
  1101. this.signList = [];
  1102. this.mixList = [];
  1103. this.highList = [];
  1104. this.snapList = [];
  1105. this.classList.forEach((item) => {
  1106. if (item.type == "NORMAL") {
  1107. this.signList.push(item);
  1108. } else if (item.type == "MIX") {
  1109. this.mixList.push(item);
  1110. } else if (item.type == "HIGH") {
  1111. this.highList.push(item);
  1112. } else if (item.type == "SNAP") {
  1113. this.snapList.push(item);
  1114. } else if (item.type == "HIGH_ONLINE") {
  1115. this.highonlineList.push(item);
  1116. } else if (item.type == "MUSIC_NETWORK") {
  1117. this.muiscnetworkList.push(item);
  1118. }
  1119. });
  1120. }
  1121. });
  1122. },
  1123. getTeamStudent() {
  1124. getTeamStudentInfo({ musicGroupId: this.teamid }).then((res) => {
  1125. if (res.code == 200) {
  1126. this.studentListInfo = res.data;
  1127. }
  1128. });
  1129. },
  1130. permission(str) {
  1131. return permission(str);
  1132. },
  1133. onInstrumentChange() {
  1134. // 乐器切换时
  1135. // 乐器切换时
  1136. // let tempkitType = this.maskForm.kitGroupPurchaseType
  1137. // if(tempkitType == 'GROUP') {
  1138. // this.INSTRUMENTLIST.forEach(item => {
  1139. // if(item.value == value) {
  1140. // this.maskForm.musicPrice = item.marketPrice
  1141. // }
  1142. // })
  1143. // }
  1144. },
  1145. onKitGroupChnage(value) {
  1146. // 乐器提供方式
  1147. this.kitStatus = false;
  1148. if (value == "FREE") {
  1149. this.kitStatus = true;
  1150. this.maskForm.musicPrice = 0;
  1151. } else {
  1152. this.maskForm.musicPrice = null;
  1153. }
  1154. },
  1155. onMusicGroupExport() {
  1156. let url = "/api-web/export/musicGroupStudent";
  1157. let data = {
  1158. musicGroupId: this.teamid,
  1159. studentStatus: this.searchForm.studentStatus || null,
  1160. paymentStatus: this.searchForm.isPay || null,
  1161. subjectId: this.searchForm.major || null,
  1162. search: this.searchForm.search || null,
  1163. isActive: this.searchForm.isActive || null,
  1164. classGroupId: this.searchForm.classGroupId || null,
  1165. currentGrade: this.searchForm.currentGrade || null,
  1166. createYear: this.searchForm.createYear || null,
  1167. hasCourse: this.searchForm.hasCourse || null,
  1168. comeOnPackage: this.searchForm.comeOnPackage,
  1169. carePackage: this.searchForm.carePackage,
  1170. };
  1171. const options = {
  1172. method: "get",
  1173. headers: {
  1174. Authorization: getToken(),
  1175. },
  1176. url,
  1177. params: data,
  1178. responseType: "blob",
  1179. };
  1180. this.$confirm("您确定导出学员列表?", "提示", {
  1181. confirmButtonText: "确定",
  1182. cancelButtonText: "取消",
  1183. type: "warning",
  1184. })
  1185. .then(() => {
  1186. axios(options).then((res) => {
  1187. let blob = new Blob([res.data], {
  1188. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
  1189. type: "application/vnd.ms-excel;charset=utf-8",
  1190. // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1191. });
  1192. let objectUrl = URL.createObjectURL(blob);
  1193. let link = document.createElement("a");
  1194. let fname = this.$route.query.name + "学员列表.xls";
  1195. link.href = objectUrl;
  1196. link.setAttribute("download", fname);
  1197. document.body.appendChild(link);
  1198. link.click();
  1199. });
  1200. })
  1201. .catch(() => {});
  1202. },
  1203. search() {
  1204. this.rules.page = 1;
  1205. this.getList();
  1206. },
  1207. onReSet() {
  1208. this.$refs.searchForm.resetFields();
  1209. this.search();
  1210. },
  1211. getList() {
  1212. // getintoClass({ musicGroupId: this.teamid }).then((res) => {
  1213. // if (res.code == 200) {
  1214. // this.$set(this, "leftList", res.data);
  1215. // // this.leftList = res.data;
  1216. // }
  1217. // });
  1218. this.getTeamStudent();
  1219. let obj = {
  1220. musicGroupId: this.teamid,
  1221. page: this.rules.page,
  1222. rows: this.rules.limit,
  1223. studentStatus: this.searchForm.studentStatus || null,
  1224. paymentStatus: this.searchForm.isPay || null,
  1225. subjectId: this.searchForm.major || null,
  1226. search: this.searchForm.search || null,
  1227. isActive: this.searchForm.isActive || null,
  1228. classGroupId: this.searchForm.classGroupId || null,
  1229. currentGrade: this.searchForm.currentGrade || null,
  1230. createYear: this.searchForm.createYear || null,
  1231. oweFlag: this.searchForm.oweFlag || null,
  1232. hasCourse: this.searchForm.hasCourse || null,
  1233. oweFlag: this.searchForm.oweFlag || null,
  1234. comeOnPackage: this.searchForm.comeOnPackage,
  1235. carePackage: this.searchForm.carePackage,
  1236. };
  1237. return getTeamStudentList(obj).then((res) => {
  1238. if (res.code == 200) {
  1239. this.tableList = res.data.rows;
  1240. this.rules.total = res.data.total;
  1241. return res;
  1242. }
  1243. });
  1244. },
  1245. addPay(row) {
  1246. this.createUserPayVisible = true;
  1247. this.createdUserId = row.userId;
  1248. },
  1249. addCycle() {
  1250. this.cycles.push({});
  1251. this.collapse.push(this.collapse.length);
  1252. },
  1253. removeCycle(index) {
  1254. this.cycles[index] = null;
  1255. this.cycles = this.cycles.filter((item) => !!item);
  1256. this.collapse.pop();
  1257. },
  1258. collapseChange(val) {
  1259. this.collapse = val;
  1260. },
  1261. gotoSignin() {
  1262. this.$router.push({
  1263. path: "/business/studentSignin",
  1264. query: {
  1265. id: this.teamid,
  1266. status: this.$route.query.status,
  1267. name: this.$route.query.name,
  1268. rules: this.Frules,
  1269. search: this.Fsearch,
  1270. },
  1271. });
  1272. },
  1273. chioseType() {
  1274. this.$refs["quitForm"].validate((res) => {
  1275. if (res) {
  1276. this.$confirm("确定退团?", "提示", {
  1277. confirmButtonText: "确定",
  1278. cancelButtonText: "取消",
  1279. type: "warning",
  1280. })
  1281. .then(() => {
  1282. let row = this.activeRow;
  1283. // 发请求 退团
  1284. StudentQuit({
  1285. musicGroupId: this.teamid,
  1286. userId: row.userId,
  1287. reason: this.quitForm.reason,
  1288. isRefundCourseFee: this.quitForm.isRefundCourseFee,
  1289. isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
  1290. isRefundTeachingAssistantsFee: this.quitForm
  1291. .isRefundTeachingAssistantsFee,
  1292. maintenanceFee: this.quitForm.maintenanceFee,
  1293. }).then((res) => {
  1294. this.quitForm = {
  1295. // 退团信息确认
  1296. isRefundCourseFee: null,
  1297. isRefundInstrumentFee: null,
  1298. isRefundTeachingAssistantsFee: null,
  1299. isMaintenanceFee: null,
  1300. maintenanceFee: 0,
  1301. reason: "",
  1302. };
  1303. if (res.code == 200) {
  1304. this.$message.success("退团成功");
  1305. this.getList();
  1306. this.quitVisible = false;
  1307. }
  1308. });
  1309. })
  1310. .catch(() => {});
  1311. } else {
  1312. }
  1313. });
  1314. // row.typeVisible = false;
  1315. },
  1316. //
  1317. addStudent() {
  1318. // 发请求添加学员
  1319. this.$refs["maskForm"].validate((res) => {
  1320. if (res) {
  1321. // this.maskForm.parentName.timer 少个生日的字段
  1322. // classGroupId: maskForm.signClass
  1323. /** <!-- signClass: '',
  1324. mixClass: '',
  1325. highClass: '',
  1326. snapClass: [], --> */
  1327. let maskForm = this.maskForm;
  1328. // if (
  1329. // !maskForm.signClass &&
  1330. // !maskForm.mixClass &&
  1331. // !maskForm.highClass &&
  1332. // !maskForm.highonline &&
  1333. // !maskForm.muiscnetwork
  1334. // ) {
  1335. // if (
  1336. // !maskForm.snapClass ||
  1337. // !(maskForm.snapClass && maskForm.snapClass.length >= 1)
  1338. // ) {
  1339. // this.$message.error("该学生必须加入一个班级");
  1340. // return;
  1341. // }
  1342. // }
  1343. if (
  1344. maskForm.musicGoodsIdList &&
  1345. (maskForm.musicPrice === "" || maskForm.musicPrice === null)
  1346. ) {
  1347. this.$message.error("请输入乐器金额");
  1348. return;
  1349. }
  1350. if (
  1351. maskForm.instrGoodsIdList &&
  1352. maskForm.instrGoodsIdList.length > 0 &&
  1353. (maskForm.instrPrice === "" || maskForm.instrPrice === null)
  1354. ) {
  1355. this.$message.error("请输入辅件金额");
  1356. return;
  1357. }
  1358. let snapClassIds;
  1359. maskForm.snapClass
  1360. ? (snapClassIds = maskForm.snapClass.join(","))
  1361. : (snapClassIds = null);
  1362. let params = {
  1363. signClassId: maskForm.signClass,
  1364. mixClassId: maskForm.mixClass,
  1365. snapClassIds,
  1366. highClassId: maskForm.highClass,
  1367. courseFee: maskForm.courseFee,
  1368. temporaryCourseFee: maskForm.temporaryCourseFee,
  1369. studentRegistration: {
  1370. name: maskForm.studentName,
  1371. gender: maskForm.sex,
  1372. birthdate: maskForm.timer,
  1373. parentsName: maskForm.parentName,
  1374. parentsPhone: maskForm.phone,
  1375. currentGrade: maskForm.startClass,
  1376. currentGradeNum: maskForm.currentGradeNum,
  1377. currentClass: maskForm.course,
  1378. subjectId: maskForm.sound,
  1379. musicGroupId: this.teamid,
  1380. },
  1381. };
  1382. params.studentPaymentOrderDetails = [];
  1383. if (maskForm.musicGoodsIdList) {
  1384. params.studentPaymentOrderDetails.push({
  1385. goodsIdList: maskForm.musicGoodsIdList,
  1386. kitGroupPurchaseType: maskForm.kitGroupPurchaseType,
  1387. type: "MUSICAL",
  1388. price: maskForm.musicPrice,
  1389. });
  1390. }
  1391. if (maskForm.instrGoodsIdList && maskForm.instrGoodsIdList != "") {
  1392. params.studentPaymentOrderDetails.push({
  1393. goodsIdList: maskForm.instrGoodsIdList.join(","),
  1394. type: "ACCESSORIES",
  1395. price: maskForm.instrPrice,
  1396. });
  1397. }
  1398. addStudent(params).then((res) => {
  1399. if (res.code == 200) {
  1400. this.$message.success("添加学生成功");
  1401. this.getList();
  1402. this.addStudentVisible = false;
  1403. this.createUserPayVisible = true;
  1404. this.createdUserId = res.data;
  1405. }
  1406. this.$refs.maskForm.resetFields();
  1407. });
  1408. }
  1409. });
  1410. },
  1411. onSoundChange(value) {
  1412. // 学员声部切换时
  1413. // this.findSubjectPlan(value)
  1414. this.ACCESSORIESLIST = [];
  1415. this.maskForm.instrGoodsIdList = [];
  1416. this.maskForm.instrPrice = null;
  1417. this.INSTRUMENTLIST = [];
  1418. this.maskForm.musicPrice = null;
  1419. this.maskForm.musicGoodsIdList = null;
  1420. this.getGoodsList(value, "INSTRUMENT"); // 乐器
  1421. this.getGoodsList(value, "ACCESSORIES"); // 辅件
  1422. },
  1423. // 获取购买方式
  1424. findSubjectPlan(subjectId) {
  1425. findSubjectPlan({
  1426. musicGroupId: this.teamid,
  1427. subjectId: subjectId,
  1428. }).then((res) => {
  1429. let result = res.data;
  1430. if (res.code == 200) {
  1431. this.maskForm.musicMode = this.getBranchType(
  1432. result.kitGroupPurchaseType
  1433. );
  1434. }
  1435. });
  1436. },
  1437. getGoodsList(subjectId, type) {
  1438. getGoods({
  1439. subjectId: subjectId,
  1440. type: type,
  1441. }).then((res) => {
  1442. let result = res.data;
  1443. if (res.code == 200) {
  1444. let tempArr = [];
  1445. result.forEach((item) => {
  1446. tempArr.push({
  1447. label: item.name,
  1448. value: item.id,
  1449. marketPrice: item.marketPrice,
  1450. });
  1451. });
  1452. if (type == "ACCESSORIES") {
  1453. this.ACCESSORIESLIST = tempArr;
  1454. }
  1455. if (type == "INSTRUMENT") {
  1456. this.INSTRUMENTLIST = tempArr;
  1457. }
  1458. }
  1459. });
  1460. },
  1461. getBranchType(status) {
  1462. let common = {
  1463. FREE: "免费",
  1464. GROUP: "团购",
  1465. LEASE: "租赁",
  1466. };
  1467. return common[status];
  1468. },
  1469. lookClass(row) {
  1470. this.classMask.studentName = row.realName;
  1471. getStudentClass({
  1472. musicGroupId: this.teamid,
  1473. teacherId: row.userId,
  1474. }).then((res) => {
  1475. if (res.code == 200) {
  1476. this.classLists = res.data;
  1477. this.studentClassVisible = true;
  1478. }
  1479. });
  1480. },
  1481. quieTeamMask(row) {
  1482. this.activeRow = row;
  1483. this.quitVisible = true;
  1484. },
  1485. quieTeam(row) {
  1486. this.$prompt("请输入退团原因", "提示", {
  1487. confirmButtonText: "确定",
  1488. cancelButtonText: "取消",
  1489. type: "warning",
  1490. inputPattern: /\S/,
  1491. inputErrorMessage: "请输入退团原因",
  1492. })
  1493. .then((val) => {
  1494. // 发请求 退团
  1495. StudentQuit({
  1496. musicGroupId: this.teamid,
  1497. userId: row.userId,
  1498. reason: val.value,
  1499. isRefundCourseFee: false,
  1500. isRefundInstrumentFee: false,
  1501. isRefundTeachingAssistantsFee: false,
  1502. }).then((res) => {
  1503. this.quitForm = {
  1504. // 退团信息确认
  1505. isRefundCourseFee: null,
  1506. isRefundInstrumentFee: null,
  1507. isRefundTeachingAssistantsFee: null,
  1508. isMaintenanceFee: null,
  1509. maintenanceFee: 0,
  1510. reason: "",
  1511. };
  1512. if (res.code == 200) {
  1513. this.$message.success("退团成功");
  1514. this.getList();
  1515. this.quitVisible = false;
  1516. }
  1517. });
  1518. })
  1519. .catch(() => {});
  1520. },
  1521. checkPhone(val) {
  1522. var regu = /^1[3456789]\d{9}$/;
  1523. var re = new RegExp(regu);
  1524. if (re.test(val)) {
  1525. getStudentInfoByPhone({ mobile: this.maskForm.phone }).then((res) => {
  1526. if (res.code == 200) {
  1527. if (res.data) {
  1528. this.maskForm.studentName = res.data.name;
  1529. this.maskForm.sex = res.data.gender;
  1530. this.maskForm.parentName = res.data.parentsName;
  1531. this.maskForm.course = res.data.currentClass;
  1532. this.maskForm.startClass = res.data.currentGrade;
  1533. this.maskForm.currentGradeNum = res.data.currentGradeNum
  1534. ? res.data.currentGradeNum + ""
  1535. : null;
  1536. this.maskForm.phone = val;
  1537. this.maskForm.timer = res.data.birthdate;
  1538. }
  1539. }
  1540. });
  1541. }
  1542. },
  1543. lockStudent(row) {
  1544. this.$confirm("是否锁定/解锁学生缴费周期?", "提示", {
  1545. confirmButtonText: "确定",
  1546. cancelButtonText: "取消",
  1547. type: "warning",
  1548. })
  1549. .then(() => {
  1550. let musicGroupId = this.teamid;
  1551. let studentId = row.userId;
  1552. let isLock;
  1553. row.isLock == 0 ? (isLock = 1) : (isLock = 0);
  1554. StudentFeeIsLock({ musicGroupId, studentId, isLock }).then((res) => {
  1555. if (res.code == 200) {
  1556. this.$message.success("修改成功");
  1557. this.getList();
  1558. }
  1559. });
  1560. })
  1561. .catch(() => {});
  1562. },
  1563. resetPay(row) {
  1564. this.activeRow = row;
  1565. this.payVisible = true;
  1566. this.payForm.studentName = row.realName;
  1567. this.payForm.payMoney = row.courseFee;
  1568. this.payForm.payMonth = row.paymentPeriodList.split(",");
  1569. if (this.payForm.payMonth[0] == "") {
  1570. this.payForm.payMonth = [];
  1571. }
  1572. },
  1573. submitPay() {
  1574. let studentId = this.activeRow.userId;
  1575. let musicGroupId = this.teamid;
  1576. let month = this.payForm.payMonth.join(",") || null;
  1577. let amount = this.payForm.payMoney;
  1578. let obj = {
  1579. studentId,
  1580. musicGroupId,
  1581. month,
  1582. amount,
  1583. };
  1584. updateStudentFee(obj).then((res) => {
  1585. if (res.code == 200) {
  1586. this.$message.success("修改成功");
  1587. this.payVisible = false;
  1588. this.getList();
  1589. }
  1590. });
  1591. },
  1592. closePayVisible() {
  1593. this.$refs["payForm"].resetFields();
  1594. this.payVisible = false;
  1595. },
  1596. addVisit(row) {
  1597. console.log(row);
  1598. this.detail = row;
  1599. // this.visitForm.studentName = row.realName;
  1600. // this.visitForm.musicGroupId = this.teamid;
  1601. // this.visitForm.studentId = row.userId;
  1602. this.visitVisiable = true;
  1603. },
  1604. handleChange(val) {
  1605. this.visitForm.type = val[0];
  1606. this.visitForm.purpose = val[1];
  1607. },
  1608. submitAddVisit() {
  1609. console.log(this.$refs.visitForm);
  1610. this.$refs.visitForm.validate((res) => {
  1611. if (res) {
  1612. addVisit(cleanDeep(this.visitForm)).then((res) => {
  1613. if (res.code === 200) {
  1614. this.$message.success("新增成功");
  1615. this.visitVisiable = false;
  1616. }
  1617. });
  1618. }
  1619. });
  1620. },
  1621. beginDate() {
  1622. let self = this;
  1623. return {
  1624. firstDayOfWeek: 1,
  1625. disabledDate(time) {
  1626. return time.getTime() >= new Date().getTime(); //开始时间不选时,结束时间最大值小于等于当天
  1627. },
  1628. };
  1629. },
  1630. createStudentFrom() {
  1631. this.addStudentVisible = true;
  1632. },
  1633. // 报名缴费功能
  1634. payDate() {
  1635. let self = this;
  1636. return {
  1637. firstDayOfWeek: 1,
  1638. disabledDate(time) {
  1639. if (self.applyExpireDate) {
  1640. return (
  1641. time.getTime() <=
  1642. new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
  1643. );
  1644. } else {
  1645. return false;
  1646. }
  1647. },
  1648. };
  1649. },
  1650. applyDate() {
  1651. let self = this;
  1652. return {
  1653. firstDayOfWeek: 1,
  1654. disabledDate(time) {
  1655. if (self.paymentExpireDate) {
  1656. return (
  1657. time.getTime() >
  1658. new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
  1659. );
  1660. } else {
  1661. return false;
  1662. }
  1663. },
  1664. };
  1665. },
  1666. handleSelectionChange(val) {
  1667. this.multipleSelection = val;
  1668. },
  1669. checkboxSelect(row) {
  1670. return row.paymentStatus == 0;
  1671. },
  1672. },
  1673. watch: {
  1674. "quitForm.isMaintenanceFee"(val) {
  1675. if (val) {
  1676. this.quitForm.maintenanceFee = 300;
  1677. } else {
  1678. this.quitForm.maintenanceFee = 0;
  1679. }
  1680. },
  1681. quitVisible(val) {
  1682. if (!val) {
  1683. this.quitForm = {
  1684. // 退团信息确认
  1685. isRefundCourseFee: null,
  1686. isRefundInstrumentFee: null,
  1687. isRefundTeachingAssistantsFee: null,
  1688. reason: "",
  1689. };
  1690. this.$refs["quitForm"].resetFields();
  1691. }
  1692. },
  1693. // visitVisiable(val) {
  1694. // if (!val) {
  1695. // this.$refs["visitForm"].resetFields();
  1696. // }
  1697. // },
  1698. },
  1699. computed: {
  1700. saveKey() {
  1701. // return 'teamDetails-'+this.$route.query.id
  1702. return "teamDetails-studentList|id|" + this.$route.query.id;
  1703. },
  1704. },
  1705. };
  1706. </script>
  1707. <style lang="scss" scoped>
  1708. .dialog-footer.question {
  1709. display: flex;
  1710. flex-direction: row;
  1711. justify-content: space-between;
  1712. }
  1713. // .moreInput {
  1714. // width: 100%;
  1715. // display: flex;
  1716. // /deep/.el-form-item__content {
  1717. // display: flex;
  1718. // flex-direction: row;
  1719. // }
  1720. // }
  1721. .error {
  1722. color: red;
  1723. }
  1724. .el-select {
  1725. width: 180px !important;
  1726. }
  1727. .headWrap {
  1728. padding: 20px 0;
  1729. }
  1730. /deep/.el-date-editor.el-input {
  1731. width: auto;
  1732. .el-input__inner {
  1733. padding-right: 0;
  1734. }
  1735. }
  1736. .studentInfo {
  1737. /deep/.el-dialog__body {
  1738. // padding-top: 0;
  1739. // padding-bottom: 0;
  1740. }
  1741. }
  1742. // .instrList {
  1743. // display: flex;
  1744. // /deep/.el-form-item__content {
  1745. // width: 80%;
  1746. // }
  1747. // .el-col {
  1748. // /deep/.el-form-item__content {
  1749. // width: 100%;
  1750. // }
  1751. // }
  1752. // }
  1753. .stu-container {
  1754. .topFrom {
  1755. margin: 20px 30px 0;
  1756. width: 1000px;
  1757. }
  1758. .newStudent {
  1759. width: 121px;
  1760. height: 40px;
  1761. background: rgba(20, 146, 138, 1);
  1762. border-radius: 4px;
  1763. color: #fff;
  1764. text-align: center;
  1765. line-height: 40px;
  1766. font-size: 14px;
  1767. cursor: pointer;
  1768. }
  1769. }
  1770. .left-code,
  1771. .right-code {
  1772. // width: 50%;
  1773. // float: left;
  1774. h2 {
  1775. display: block;
  1776. font-size: 18px;
  1777. text-align: center;
  1778. padding-bottom: 8px;
  1779. line-height: 1;
  1780. height: 30px;
  1781. margin-bottom: 0;
  1782. }
  1783. .qrcode {
  1784. display: flex;
  1785. justify-content: center;
  1786. img {
  1787. width: 200px;
  1788. height: 200px;
  1789. // margin: 0 auto;
  1790. }
  1791. }
  1792. .code-url {
  1793. font-size: 18px;
  1794. text-align: center;
  1795. padding: 15px 15px 0 15px;
  1796. }
  1797. }
  1798. .export {
  1799. background: #14928a;
  1800. }
  1801. .alert {
  1802. margin-bottom: 10px;
  1803. }
  1804. .collapse-title {
  1805. display: flex;
  1806. justify-content: space-between;
  1807. align-items: center;
  1808. width: 100%;
  1809. .el-icon-circle-close {
  1810. font-size: 16px;
  1811. margin-right: 10px;
  1812. }
  1813. }
  1814. /deep/ .el-collapse-item__wrap {
  1815. padding-top: 20px;
  1816. }
  1817. .cycleForm {
  1818. /deep/ .el-form-item {
  1819. display: flex;
  1820. width: 100%;
  1821. /deep/ .el-form-item__content {
  1822. margin-left: 0 !important;
  1823. flex: 1;
  1824. }
  1825. }
  1826. }
  1827. .statistic {
  1828. padding: 20px 0;
  1829. text-align: center;
  1830. width: 100%;
  1831. margin: auto !important;
  1832. }
  1833. .popoverWrap {
  1834. p {
  1835. line-height: 25px;
  1836. }
  1837. }
  1838. .studentListWrap {
  1839. display: flex;
  1840. flex-direction: row;
  1841. justify-content: flex-start;
  1842. align-items: center;
  1843. div {
  1844. margin-right: 15px;
  1845. }
  1846. }
  1847. .btnList {
  1848. display: flex;
  1849. flex-direction: row;
  1850. justify-content: flex-start;
  1851. align-items: center;
  1852. flex-wrap: wrap;
  1853. & > div {
  1854. margin-right: 15px;
  1855. margin-bottom: 10px;
  1856. }
  1857. }
  1858. </style>