studentList.vue 57 KB

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