studentList.vue 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530
  1. <template>
  2. <div class="stu-container">
  3. <!-- 头部展示 -->
  4. <!-- <statistic>
  5. <statistic-item>
  6. <span>在读人数</span>
  7. <span>{{ studentListInfo.studying }}</span>
  8. </statistic-item>
  9. <statistic-item>
  10. <span>退团人数</span>
  11. <span>{{ studentListInfo.quit }}</span>
  12. </statistic-item>
  13. <statistic-item>
  14. <span>新增人数</span>
  15. <span>{{ studentListInfo.add }}</span>
  16. </statistic-item>
  17. <statistic-item>
  18. <span>VIP&网管转化率</span>
  19. <span>{{ studentListInfo.courseRate }}</span>
  20. </statistic-item>
  21. </statistic> -->
  22. <!-- style="margin-bottom: 15px" -->
  23. <p
  24. style="margin-bottom: 15px; font-size: 16px; font-weight: 400"
  25. >
  26. 报名截止时间:{{ applyExpireDate | formatTimer }} 缴费截止时间:{{
  27. paymentExpireDate | formatTimer
  28. }}
  29. </p>
  30. <div class="studentListWrap" v-if="team_status == 'PROGRESS'">
  31. <div
  32. class="newBand"
  33. v-permission="'studentRegistration/insertStudent'"
  34. @click="createStudentFrom"
  35. >
  36. 新增学员
  37. </div>
  38. <!-- 可以直接去学生考勤查看 -->
  39. <!-- <el-button type="primary" v-permission="'/studentSignin'"
  40. @click="gotoSignin">点名总览</el-button> -->
  41. <div
  42. class="newBand"
  43. v-permission="'studentManage/queryStudentSubTotalCourseTimes'"
  44. @click="viewTimer"
  45. style="margin-right: 15px"
  46. >
  47. 剩余时长明细
  48. </div>
  49. </div>
  50. <div
  51. style="display: flex; justify-content: space-between; align-items: center"
  52. v-if="
  53. team_status == 'PAY' ||
  54. team_status == 'APPLY' ||
  55. team_status == 'PROGRESS' ||
  56. team_status == 'PREPARE'
  57. "
  58. >
  59. <!-- <h2> -->
  60. <!-- + '报名详情' -->
  61. <!-- <el-page-header @back="onCancel" :content="teamName">
  62. </el-page-header> -->
  63. <!-- </h2> -->
  64. <div
  65. class="btnList"
  66. style="margin-bottom: 15px; font-size: 18px; font-weight: 400"
  67. >
  68. <!-- <div class='newBand close'
  69. v-permission="'musicGroup/cancelMusicGroup'"
  70. @click="onClose">停止乐团</div> v-show="status == 'APPLY'"-->
  71. <div
  72. class="newBand"
  73. @click="payStart"
  74. v-permission="'musicGroup/openPay'"
  75. v-if="team_status == 'APPLY'"
  76. >
  77. 开始缴费
  78. </div>
  79. <!-- v-show="status=='PAY'" -->
  80. <div
  81. class="newBand"
  82. v-permission="'musicGroup/found'"
  83. @click="onGoHome"
  84. v-if="team_status == 'APPLY' || team_status == 'PAY'"
  85. >
  86. 确认开团
  87. </div>
  88. <div
  89. class="newBand"
  90. v-permission="'musicGroup/extensionPayment'"
  91. @click="extendTime(true)"
  92. v-show="
  93. team_status == 'PAY' ||
  94. team_status == 'PROGRESS' ||
  95. team_status == 'PREPARE'
  96. "
  97. >
  98. 延长缴费
  99. </div>
  100. <div
  101. class="newBand"
  102. v-permission="'musicGroup/extensionApplyExpireDate'"
  103. @click="extendTime(false)"
  104. v-show="
  105. team_status == 'PAY' ||
  106. team_status == 'APPLY' ||
  107. team_status == 'PROGRESS' ||
  108. team_status == 'PREPARE'
  109. "
  110. >
  111. 延长报名
  112. </div>
  113. <div class="newBand" @click="onCreateQRCode('payment')">报名链接</div>
  114. <div class="newBand" @click="onCreateQRCode('rePayment')">
  115. 报名链接(无乐器)
  116. </div>
  117. <div class="newBand" @click="onCreateQRCode('detail')">
  118. 报名缴费详情
  119. </div>
  120. <div
  121. class="newBand"
  122. v-permission="'musicGroup/addMusicGroupRegs'"
  123. @click="mergeVisible = true"
  124. v-show="team_status == 'PAY' || team_status == 'APPLY'"
  125. >
  126. 合并学员
  127. </div>
  128. <div
  129. v-if="
  130. team_status == 'APPLY' ||
  131. team_status == 'PROGRESS' ||
  132. team_status == 'PREPARE'
  133. "
  134. v-permission="'studentRegistration/openPayment'"
  135. class="newBand"
  136. style="background-color: #14928a; border: 1px solid #14928a"
  137. @click="onPartPayment"
  138. type="primary"
  139. >
  140. 提前开启缴费
  141. </div>
  142. <el-popover placement="bottom" width="800" trigger="hover">
  143. <div>
  144. <el-table
  145. style="width: 100% !important"
  146. :data="leftList"
  147. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  148. >
  149. <el-table-column
  150. label="乐团声部"
  151. prop="subjectName"
  152. align="center"
  153. >
  154. </el-table-column>
  155. <el-table-column
  156. label="计划招生"
  157. prop="expectedStudentNum"
  158. align="center"
  159. >
  160. <template slot-scope="scope">
  161. <div>
  162. <p v-show="!isEdit">{{ scope.row.expectedStudentNum }}</p>
  163. <el-input
  164. v-show="isEdit"
  165. v-model.trim="scope.row.expectedStudentNum"
  166. ></el-input>
  167. </div>
  168. </template>
  169. </el-table-column>
  170. <el-table-column
  171. label="已报名"
  172. prop="applyStudentNum"
  173. align="center"
  174. >
  175. </el-table-column>
  176. <el-table-column label="已缴费" prop="payNum" align="center">
  177. </el-table-column>
  178. </el-table>
  179. <div
  180. class="btnWrap"
  181. v-permission="'musicGroup/updateExpectedStudentNum'"
  182. style="margin-right: 20px; margin-top: 20px"
  183. >
  184. <el-button v-show="!isEdit" @click="isEdit = true"
  185. >编辑</el-button
  186. >
  187. <el-button v-show="isEdit" @click="saveIsEdit">保存</el-button>
  188. </div>
  189. </div>
  190. <auth :auths="'studentRegistration/openPayment'">
  191. <el-button
  192. style="background-color: #14928a; border: 1px solid #14928a"
  193. @click="onPartPayment"
  194. type="primary"
  195. >开启缴费</el-button
  196. >
  197. </auth>
  198. <div class="newBand" style="margin-bottom: 10px" slot="reference">
  199. 声部报名计划
  200. </div>
  201. </el-popover>
  202. </div>
  203. </div>
  204. <!-- v-if="
  205. team_status == 'PAY' ||
  206. team_status == 'PROGRESS' ||
  207. team_status == 'PREPARE'
  208. " -->
  209. <!-- 搜索类型 -->
  210. <save-form
  211. ref="searchForm"
  212. :inline="true"
  213. :save-key="saveKey"
  214. class="searchForm"
  215. @submit="search"
  216. @reset="onReSet"
  217. :model="searchForm"
  218. >
  219. <el-form-item prop="search">
  220. <el-input
  221. v-model.trim="searchForm.search"
  222. clearable
  223. placeholder="学生姓名或电话"
  224. @keyup.enter.native="search"
  225. ></el-input>
  226. </el-form-item>
  227. <el-form-item prop="studentStatus">
  228. <el-select
  229. v-model.trim="searchForm.studentStatus"
  230. clearable
  231. filterable
  232. placeholder="学员状态"
  233. >
  234. <el-option label="在读" value="NORMAL"></el-option>
  235. <el-option label="请假" value="LEAVE"></el-option>
  236. <el-option label="退团" value="QUIT"></el-option>
  237. <el-option label="报名" value="APPLY"></el-option>
  238. </el-select>
  239. </el-form-item>
  240. <el-form-item prop="createYear">
  241. <el-date-picker
  242. v-model="searchForm.createYear"
  243. type="year"
  244. value-format="yyyy"
  245. placeholder="选择入团年份"
  246. >
  247. </el-date-picker>
  248. </el-form-item>
  249. <el-form-item prop="currentGrade">
  250. <!-- <el-input
  251. v-model.trim="searchForm.currentGrade"
  252. clearable
  253. placeholder="学员年级"
  254. ></el-input> -->
  255. <el-select
  256. v-model.trim="searchForm.currentGrade"
  257. filterable
  258. clearable
  259. placeholder="请输入年级"
  260. >
  261. <el-option
  262. v-for="(item, index) in gradeList"
  263. :key="index"
  264. :label="item.label"
  265. :value="item.label"
  266. ></el-option>
  267. </el-select>
  268. </el-form-item>
  269. <el-form-item prop="classGroupId">
  270. <el-select
  271. v-model.trim="searchForm.classGroupId"
  272. clearable
  273. filterable
  274. placeholder="请选择班级"
  275. >
  276. <el-option
  277. v-for="(item, index) in classList"
  278. :key="index"
  279. :value="item.id"
  280. :label="item.name"
  281. ></el-option>
  282. </el-select>
  283. </el-form-item>
  284. <el-form-item prop="major">
  285. <el-select
  286. v-model.trim="searchForm.major"
  287. clearable
  288. filterable
  289. placeholder="所选专业"
  290. >
  291. <el-option
  292. v-for="(item, index) in soundList"
  293. :key="index"
  294. :value="item.id"
  295. :label="item.name"
  296. ></el-option>
  297. </el-select>
  298. </el-form-item>
  299. <el-form-item prop="isPay">
  300. <el-select
  301. v-model.trim="searchForm.isPay"
  302. clearable
  303. filterable
  304. placeholder="报名缴费"
  305. >
  306. <el-option label="未开启" value="0"></el-option>
  307. <el-option label="开启缴费" value="1"></el-option>
  308. <el-option label="已缴费" value="2"></el-option>
  309. </el-select>
  310. </el-form-item>
  311. <el-form-item prop="oweFlag">
  312. <el-select
  313. v-model.trim="searchForm.oweFlag"
  314. clearable
  315. filterable
  316. placeholder="是否欠费"
  317. >
  318. <el-option label="否" value="0"></el-option>
  319. <el-option label="是" value="1"></el-option>
  320. </el-select>
  321. </el-form-item>
  322. <el-form-item prop="isActive">
  323. <el-select
  324. v-model.trim="searchForm.isActive"
  325. clearable
  326. filterable
  327. placeholder="是否激活"
  328. >
  329. <el-option label="是" value="1"></el-option>
  330. <el-option label="否" value="0"></el-option>
  331. </el-select>
  332. </el-form-item>
  333. <el-form-item prop="hasCourse">
  334. <el-select
  335. v-model.trim="searchForm.hasCourse"
  336. clearable
  337. placeholder="VIP/网管是否有课"
  338. >
  339. <el-option label="是" value="true"></el-option>
  340. <el-option label="否" value="false"></el-option>
  341. </el-select>
  342. </el-form-item>
  343. <el-form-item prop="carePackage">
  344. <el-select
  345. class="multiple"
  346. v-model.trim="searchForm.carePackage"
  347. clearable
  348. placeholder="关心包"
  349. >
  350. <el-option label="不可用" :value="0"></el-option>
  351. <el-option label="可用" :value="1"></el-option>
  352. <el-option label="已使用" :value="2"></el-option>
  353. </el-select>
  354. </el-form-item>
  355. <el-form-item prop="comeOnPackage">
  356. <el-select
  357. class="multiple"
  358. v-model.trim="searchForm.comeOnPackage"
  359. clearable
  360. placeholder="加油包"
  361. >
  362. <el-option label="不可用" :value="0"></el-option>
  363. <el-option label="可用" :value="1"></el-option>
  364. <el-option label="已使用" :value="2"></el-option>
  365. </el-select>
  366. </el-form-item>
  367. <el-form-item>
  368. <el-button native-type="submit" type="danger">搜索</el-button>
  369. <el-button type="primary" native-type="reset">重置</el-button>
  370. <el-button
  371. type="primary"
  372. v-permission="'export/musicGroupStudent'"
  373. @click="onMusicGroupExport"
  374. >导出</el-button
  375. >
  376. </el-form-item>
  377. </save-form>
  378. <div style="font-size: 14px; color: #f85043; padding-bottom: 10px">
  379. 在读人数:{{ studentListInfo.studying
  380. }}<i style="width: 10px; display: inline-block"></i> 退团人数:{{
  381. studentListInfo.quit
  382. }}<i style="width: 10px; display: inline-block"></i> VIP&网管转化率:{{
  383. studentListInfo.courseRate
  384. }}<i style="width: 10px; display: inline-block"></i>
  385. </div>
  386. <!-- 列表 -->
  387. <div class="tableWrap">
  388. <el-table
  389. :data="tableList"
  390. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  391. @selection-change="handleSelectionChange"
  392. >
  393. <el-table-column
  394. type="selection"
  395. width="55"
  396. :selectable="checkboxSelect"
  397. ></el-table-column>
  398. <el-table-column label="学员编号" width="120px;" prop="userId">
  399. <template slot-scope="scope">
  400. <copy-text>
  401. {{ scope.row.userId }}
  402. </copy-text>
  403. </template>
  404. </el-table-column>
  405. <el-table-column label="学员姓名" width="120px;" prop="realName">
  406. <template slot-scope="scope">
  407. <copy-text>
  408. {{ scope.row.realName }}
  409. </copy-text>
  410. </template>
  411. </el-table-column>
  412. <el-table-column
  413. align="center"
  414. prop="gender"
  415. width="50px;"
  416. label="性别"
  417. >
  418. <template slot-scope="scope">
  419. <div>{{ scope.row.gender | sex }}</div>
  420. </template>
  421. </el-table-column>
  422. <el-table-column align="center" prop="phone" label="联系电话">
  423. <template slot-scope="scope">
  424. <copy-text>
  425. {{ scope.row.phone }}
  426. </copy-text>
  427. </template>
  428. </el-table-column>
  429. <el-table-column align="center" label="入团年份">
  430. <template slot-scope="scope">
  431. <div>{{ scope.row.registerTime | dayjsFormat("YYYY年") }}</div>
  432. </template>
  433. </el-table-column>
  434. <el-table-column align="center" label="年级班级">
  435. <template slot-scope="scope">
  436. <div>{{ scope.row.currentGrade + scope.row.currentClass }}</div>
  437. </template>
  438. </el-table-column>
  439. <el-table-column align="center" label="报名专业" prop="subjectName">
  440. <template slot-scope="scope">
  441. <copy-text>
  442. {{ scope.row.regSubjectName }}
  443. </copy-text>
  444. </template>
  445. </el-table-column>
  446. <el-table-column align="center" label="入团专业" prop="subjectName">
  447. <template slot-scope="scope">
  448. <copy-text>
  449. {{ scope.row.subjectName }}
  450. </copy-text>
  451. </template>
  452. </el-table-column>
  453. <el-table-column align="center" prop="studentStatus" label="学员状态">
  454. <template slot-scope="scope">
  455. <div>{{ scope.row.studentStatus | musicGroupStudentType }}</div>
  456. </template>
  457. </el-table-column>
  458. <el-table-column align="center" label="新增学员">
  459. <template slot-scope="scope">
  460. <div>{{ scope.row.isNewStudent | yesOrNo }}</div>
  461. </template>
  462. </el-table-column>
  463. <el-table-column align="center" label="报名缴费">
  464. <template slot-scope="scope">
  465. <div>{{ scope.row.paymentStatus | paymentStatus }}</div>
  466. </template>
  467. </el-table-column>
  468. <el-table-column align="center" label="是否激活">
  469. <template slot-scope="scope">
  470. <div>{{ scope.row.isActive ? "是" : "否" }}</div>
  471. </template>
  472. </el-table-column>
  473. <el-table-column align="center" label="VIP/网管是否有课">
  474. <template slot-scope="scope">
  475. <div>{{ scope.row.hasCourse ? "是" : "否" }}</div>
  476. </template>
  477. </el-table-column>
  478. <el-table-column align="center" label="关心包">
  479. <template slot-scope="scope">{{
  480. scope.row.carePackage | studentPackage
  481. }}</template>
  482. </el-table-column>
  483. <el-table-column align="center" label="加油包">
  484. <template slot-scope="scope">{{
  485. scope.row.comeOnPackage | studentPackage
  486. }}</template>
  487. </el-table-column>
  488. <el-table-column align="center" label="欠费金额(元)">
  489. <template slot-scope="scope">
  490. <div :class="[scope.row.noPaymentAmount > 0 ? 'error' : null]">
  491. {{ scope.row.noPaymentAmount | moneyFormat }}
  492. <!-- musicGroupPaymentCalenderDetail/queryPage/studentList -->
  493. <auth
  494. auths="musicGroupPaymentCalenderDetail/queryPage/studentList"
  495. :router="['/teamLists']"
  496. >
  497. <i
  498. style="color: #14928a; font-size: 17px"
  499. title="缴费记录"
  500. class="el-icon-view"
  501. @click="onPaymentDetail(scope.row)"
  502. ></i>
  503. </auth>
  504. </div>
  505. </template>
  506. </el-table-column>
  507. <el-table-column label="退团原因" align="center">
  508. <template slot-scope="scope">
  509. <div>
  510. <Tooltip :content="scope.row.quitReason" />
  511. </div>
  512. </template>
  513. </el-table-column>
  514. <el-table-column
  515. align="center"
  516. fixed="right"
  517. width="360px;"
  518. label="操作"
  519. >
  520. <template slot-scope="scope">
  521. <div>
  522. <el-button
  523. type="text"
  524. v-if="
  525. permission('studentManage/queryStudentClassGroup') &&
  526. scope.row.studentStatus != 'QUIT'
  527. "
  528. @click="lookClass(scope.row)"
  529. >查看班级</el-button
  530. >
  531. <el-button
  532. type="text"
  533. v-if="
  534. permission('musicGroupPaymentCalender/add') &&
  535. scope.row.studentStatus == 'APPLY' &&
  536. scope.row.paymentStatus == '0'
  537. "
  538. @click="addPay(scope.row)"
  539. >添加缴费</el-button
  540. >
  541. <el-button
  542. type="text"
  543. v-if="
  544. permission('musicGroupQuit/directQuitMusicGroup2') &&
  545. scope.row.studentStatus != 'QUIT'
  546. "
  547. @click="quieTeamMask(scope.row)"
  548. >退团退费</el-button
  549. >
  550. <el-button
  551. type="text"
  552. v-if="
  553. permission('musicGroupQuit/directQuitMusicGroup3') &&
  554. scope.row.studentStatus != 'QUIT'
  555. "
  556. @click="quieTeam(scope.row)"
  557. >退团</el-button
  558. >
  559. <el-button
  560. type="text"
  561. v-if="permission('visit/add/teamStudentList')"
  562. @click="addVisit(scope.row)"
  563. >新增回访</el-button
  564. >
  565. <auth :auths="'studentRegistration/batchUpdateSubject'">
  566. <el-button
  567. type="text"
  568. v-show="scope.row.paymentStatus != 1"
  569. @click="resetSubject(scope.row)"
  570. >修改专业</el-button
  571. >
  572. </auth>
  573. <!-- APPLY status == "APPLY" || s-->
  574. <el-popover
  575. v-show="scope.row.remark"
  576. placement="top-start"
  577. title="备注"
  578. width="200"
  579. trigger="hover"
  580. :content="scope.row.remark"
  581. >
  582. <el-button type="text" slot="reference">备注</el-button>
  583. </el-popover>
  584. <!-- PAY -->
  585. <!-- && status == "PAY"-->
  586. <auth
  587. :auths="'studentRegistration/queryFeeDetail'"
  588. v-show="scope.row.paymentStatus == 1"
  589. >
  590. <el-button type="text" @click="lookdetail(scope.row)"
  591. >查看</el-button
  592. >
  593. </auth>
  594. <auth
  595. :auths="'subjectChange/getStudentOriginal'"
  596. v-show="scope.row.paymentStatus == 1"
  597. >
  598. <el-button type="text" @click="openChangeVoice(scope.row)"
  599. >更改声部</el-button
  600. >
  601. </auth>
  602. </div>
  603. </template>
  604. </el-table-column>
  605. </el-table>
  606. <pagination
  607. :save-key="saveKey"
  608. sync
  609. :total.sync="rules.total"
  610. :page.sync="rules.page"
  611. :limit.sync="rules.limit"
  612. :page-sizes="rules.page_size"
  613. @pagination="getList"
  614. />
  615. </div>
  616. <el-dialog
  617. title="新增学员"
  618. width="700px"
  619. class="studentInfo"
  620. :visible.sync="addStudentVisible"
  621. >
  622. <el-form
  623. :model="maskForm"
  624. label-position="right"
  625. label-width="120px"
  626. ref="maskForm"
  627. :rules="maskRules"
  628. :inline="true"
  629. >
  630. <el-alert title="基本信息" :closable="false" class="alert" type="info">
  631. </el-alert>
  632. <el-form-item
  633. label="联系电话"
  634. prop="phone"
  635. :rules="[
  636. { required: true, message: '请输入手机号' },
  637. {
  638. pattern: /^1[3456789]\d{9}$/,
  639. message: '请输入正确的手机号',
  640. trigger: 'blur',
  641. },
  642. ]"
  643. >
  644. <el-input
  645. v-model.trim="maskForm.phone"
  646. placeholder="联系电话"
  647. @blur="checkPhone(maskForm.phone)"
  648. ></el-input>
  649. </el-form-item>
  650. <el-form-item label="学员姓名" prop="studentName">
  651. <el-input
  652. v-model.trim="maskForm.studentName"
  653. placeholder="学员姓名"
  654. ></el-input>
  655. </el-form-item>
  656. <el-form-item label="学员性别" prop="sex">
  657. <el-select v-model.trim="maskForm.sex" clearable>
  658. <el-option label="男" :value="1"></el-option>
  659. <el-option label="女" :value="0"></el-option>
  660. </el-select>
  661. </el-form-item>
  662. <el-form-item label="家长姓名" prop="parentName">
  663. <el-input
  664. v-model.trim="maskForm.parentName"
  665. placeholder="家长姓名"
  666. ></el-input>
  667. </el-form-item>
  668. <el-form-item label="年级" prop="currentGradeNum">
  669. <el-select
  670. placeholder="起始年级"
  671. filterable
  672. clearable
  673. v-model.trim="maskForm.currentGradeNum"
  674. >
  675. <el-option
  676. v-for="item in gradeList"
  677. :key="item.value"
  678. :label="item.label"
  679. :value="item.value"
  680. ></el-option>
  681. <!-- <el-option value="一年级" label="一年级"></el-option>
  682. <el-option value="二年级" label="二年级"></el-option>
  683. <el-option value="三年级" label="三年级"></el-option>
  684. <el-option value="四年级" label="四年级"></el-option>
  685. <el-option value="五年级" label="五年级"></el-option>
  686. <el-option value="六年级" label="六年级"></el-option>
  687. <el-option value="初一" label="初一"></el-option>
  688. <el-option value="初二" label="初二"></el-option>
  689. <el-option value="初三" label="初三"></el-option>
  690. <el-option value="高一" label="高一"></el-option>
  691. <el-option value="高二" label="高二"></el-option>
  692. <el-option value="高三" label="高三"></el-option> -->
  693. </el-select>
  694. </el-form-item>
  695. <el-form-item label="班级" prop="course">
  696. <el-input
  697. v-model.trim="maskForm.course"
  698. placeholder="班级"
  699. ></el-input>
  700. </el-form-item>
  701. <el-form-item label="学员声部" prop="sound">
  702. <el-select
  703. v-model.trim="maskForm.sound"
  704. clearable
  705. filterable
  706. @change="onSoundChange"
  707. >
  708. <el-option
  709. v-for="(item, index) in soundList"
  710. :key="index"
  711. :value="item.id"
  712. :label="item.name"
  713. ></el-option>
  714. </el-select>
  715. </el-form-item>
  716. <!-- <el-form-item label="证件号"
  717. prop="id">
  718. <el-input v-model.trim="maskForm.id"></el-input>
  719. </el-form-item>-->
  720. <el-form-item label="出生日期" style="margin-right: 0" prop="timer">
  721. <el-col :span="24">
  722. <el-date-picker
  723. v-model.trim="maskForm.timer"
  724. value-format="yyyy-MM-dd"
  725. type="date"
  726. :picker-options="{
  727. firstDayOfWeek: 1,
  728. }"
  729. placeholder="选择日期"
  730. ></el-date-picker>
  731. </el-col>
  732. </el-form-item>
  733. </el-form>
  734. <div slot="footer" class="dialog-footer">
  735. <!-- <el-button @click="addStudentVisible = false">取 消</el-button> -->
  736. <el-button type="primary" @click="addStudent">确 定</el-button>
  737. </div>
  738. </el-dialog>
  739. <el-dialog
  740. title="学员所在班级"
  741. width="640px"
  742. :visible.sync="studentClassVisible"
  743. >
  744. <el-form :model="classMask">
  745. <el-form-item label="学生姓名">{{
  746. classMask.studentName
  747. }}</el-form-item>
  748. <el-form-item
  749. label="所在班级"
  750. v-for="(item, index) in classLists"
  751. :key="index"
  752. >{{ item.name }}</el-form-item
  753. >
  754. </el-form>
  755. </el-dialog>
  756. <!-- 退团弹窗 -->
  757. <el-dialog title="退团信息确认" width="640px" :visible.sync="quitVisible">
  758. <el-form :model="quitForm" ref="quitForm" :rules="quitRules">
  759. <el-form-item label="退还课程费用" prop="isRefundCourseFee">
  760. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="true"
  761. >是</el-radio
  762. >
  763. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="false"
  764. >否</el-radio
  765. >
  766. </el-form-item>
  767. <el-form-item label="退还乐器费用" prop="isRefundInstrumentFee">
  768. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="true"
  769. >是</el-radio
  770. >
  771. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="false"
  772. >否</el-radio
  773. >
  774. </el-form-item>
  775. <el-form-item label="退还教辅费用" prop="isRefundTeachingAssistantsFee">
  776. <el-radio
  777. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  778. :label="true"
  779. >是</el-radio
  780. >
  781. <el-radio
  782. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  783. :label="false"
  784. >否</el-radio
  785. >
  786. </el-form-item>
  787. <el-form-item label="退团原因" prop="reason">
  788. <el-input type="textarea" v-model.trim="quitForm.reason"></el-input>
  789. </el-form-item>
  790. </el-form>
  791. <span slot="footer" class="dialog-footer question">
  792. <div>
  793. <el-popover placement="right" width="500" trigger="click">
  794. <div class="popoverWrap">
  795. <p>乐团退团退费规则:</p>
  796. <p>退还课程费用:缴费总额-已结束课时单价之和</p>
  797. <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
  798. <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
  799. </div>
  800. <el-button
  801. type="text"
  802. icon="el-icon-question"
  803. slot="reference"
  804. style="color: red"
  805. >退团退费说明</el-button
  806. >
  807. </el-popover>
  808. </div>
  809. <div>
  810. <el-button @click="quitVisible = false">取 消</el-button>
  811. <el-button type="primary" @click="chioseType">确 定</el-button>
  812. </div>
  813. </span>
  814. </el-dialog>
  815. <el-dialog title="报名二维码" :visible.sync="qrcodeStatus" width="300px">
  816. <div class="left-code">
  817. <h2>学员报名连接</h2>
  818. <div id="qrcode" class="qrcode code" ref="qrCodeUrl"></div>
  819. <p class="code-url" v-if="codeUrl">{{ codeUrl }}</p>
  820. </div>
  821. </el-dialog>
  822. <el-dialog :visible.sync="timesVisible" title="查看剩余可排课时长">
  823. <times-view v-if="timesVisible" @close="timesVisible = false" />
  824. </el-dialog>
  825. <el-dialog
  826. title="修改缴费周期"
  827. :before-close="closePayVisible"
  828. width="600px"
  829. :visible.sync="payVisible"
  830. >
  831. <el-form :model="payForm" ref="payForm" :inline="true">
  832. <el-form-item label="学生姓名" prop="studentName">
  833. <el-input v-model.trim="payForm.studentName" disabled></el-input>
  834. </el-form-item>
  835. <br />
  836. <el-form-item label="缴费金额" prop="payMoney">
  837. <el-input
  838. type="number"
  839. v-model.trim="payForm.payMoney"
  840. @mousewheel.native.prevent
  841. ></el-input>
  842. </el-form-item>
  843. <el-form-item label="缴费月份" prop="payMonth">
  844. <el-checkbox-group
  845. v-model.trim="payForm.payMonth"
  846. fill="#14928A"
  847. text-color="#474747"
  848. >
  849. <el-checkbox label="1">一月</el-checkbox>
  850. <el-checkbox label="2">二月</el-checkbox>
  851. <el-checkbox label="3">三月</el-checkbox>
  852. <el-checkbox label="4">四月</el-checkbox>
  853. <el-checkbox label="5">五月</el-checkbox>
  854. <el-checkbox label="6">六月</el-checkbox>
  855. <el-checkbox label="7">七月</el-checkbox>
  856. <el-checkbox label="8">八月</el-checkbox>
  857. <el-checkbox label="9">九月</el-checkbox>
  858. <el-checkbox label="10">十月</el-checkbox>
  859. <el-checkbox label="11">十一月</el-checkbox>
  860. <el-checkbox label="12">十二月</el-checkbox>
  861. </el-checkbox-group>
  862. </el-form-item>
  863. <!-- studentName: '',
  864. payMoney: '',
  865. payMonth-->
  866. </el-form>
  867. <div slot="footer" class="dialog-footer">
  868. <el-button @click="quitVisible = false">取 消</el-button>
  869. <el-button type="primary" @click="submitPay">确 定</el-button>
  870. </div>
  871. </el-dialog>
  872. <el-dialog
  873. title="新增回访"
  874. width="500px"
  875. destroy-on-close
  876. :close-on-click-modal="false"
  877. :visible.sync="visitVisiable"
  878. >
  879. <visit
  880. v-if="visitVisiable && detail"
  881. :detail="detail"
  882. @close="visitVisiable = false"
  883. @submited="getList"
  884. />
  885. </el-dialog>
  886. <el-dialog
  887. title="选择班级"
  888. destroy-on-close
  889. width="700px"
  890. :visible.sync="createUserPayVisible"
  891. >
  892. <createUserPay
  893. :signList="signList"
  894. :mixList="mixList"
  895. :highList="highList"
  896. :snapList="snapList"
  897. :musicGroupId="this.teamid"
  898. :organizationCourseUnitPriceSettings="
  899. organizationCourseUnitPriceSettings
  900. "
  901. :createdUserId="createdUserId"
  902. :baseInfo="baseInfo"
  903. @submited="getList"
  904. @close="createUserPayVisible = false"
  905. />
  906. </el-dialog>
  907. <el-dialog
  908. title="缴费记录"
  909. width="900px"
  910. :visible.sync="paymentDetailVisible"
  911. >
  912. <payment-list
  913. v-if="paymentDetailVisible"
  914. :paymentDetail="paymentDetail"
  915. @close="paymentDetailVisible = false"
  916. />
  917. </el-dialog>
  918. <el-dialog title="选择合并乐团" :visible.sync="mergeVisible" width="950px">
  919. <mergeMusic
  920. v-if="mergeVisible"
  921. style="padding: 0 20px"
  922. :organId="organId"
  923. @close="mergeVisible = false"
  924. @submited="gotoStudentList"
  925. />
  926. </el-dialog>
  927. <el-dialog
  928. title="开始缴费"
  929. :visible.sync="paymentStatus"
  930. width="400px"
  931. destroy-on-close
  932. >
  933. <el-form
  934. ref="paymentForm"
  935. class="paymentForm"
  936. :model="paymentForm"
  937. :rules="paymentRules"
  938. >
  939. <el-form-item label="请设置缴费截止日期" prop="paymentExpireDate">
  940. <el-date-picker
  941. v-model.trim="paymentForm.paymentExpireDate"
  942. type="date"
  943. value-format="yyyy-MM-dd"
  944. :picker-options="payDate()"
  945. style="width: 100%"
  946. placeholder="选择日期"
  947. >
  948. </el-date-picker>
  949. </el-form-item>
  950. </el-form>
  951. <div slot="footer" class="dialog-footer">
  952. <el-button @click="paymentStatus = false">取 消</el-button>
  953. <el-button type="primary" @click="onStartPayment('paymentForm')"
  954. >确 定</el-button
  955. >
  956. </div>
  957. </el-dialog>
  958. <el-dialog
  959. :title="!isPay ? '延长报名' : '延长缴费'"
  960. :visible.sync="extendPaymentStatus"
  961. destroy-on-close
  962. width="400px"
  963. >
  964. <el-form :model="extendForm" ref="extendForm" :rules="extendRule">
  965. <el-form-item v-if="isPay" label="延长缴费时间" prop="expireDate">
  966. <el-date-picker
  967. v-model.trim="extendForm.expireDate"
  968. value-format="yyyy-MM-dd"
  969. type="date"
  970. :picker-options="{
  971. firstDayOfWeek: 1,
  972. }"
  973. placeholder="选择日期"
  974. >
  975. </el-date-picker>
  976. </el-form-item>
  977. <el-form-item label="延长报名时间" v-else prop="expireDate">
  978. <el-date-picker
  979. v-model.trim="extendForm.expireDate"
  980. value-format="yyyy-MM-dd"
  981. type="date"
  982. :picker-options="applyDate"
  983. placeholder="选择日期"
  984. >
  985. </el-date-picker>
  986. </el-form-item>
  987. </el-form>
  988. <div slot="footer" class="dialog-footer">
  989. <el-button @click="extendPaymentStatus = false">取 消</el-button>
  990. <el-button
  991. type="primary"
  992. v-if="isPay"
  993. @click="onExtendPayment('extendForm', isPay)"
  994. >确 定</el-button
  995. >
  996. <el-button
  997. v-else
  998. type="primary"
  999. @click="onExtendPayment('extendForm', isPay)"
  1000. >确 定</el-button
  1001. >
  1002. </div>
  1003. </el-dialog>
  1004. <qr-code v-model="codeStatus" :title="codeTitle" :codeUrl="qrCodeUrl" />
  1005. <el-dialog
  1006. title="更改声部"
  1007. :visible.sync="changeVoiceVisible"
  1008. @close="closeChangeVoice"
  1009. :destroy-on-close="true"
  1010. width="600px"
  1011. >
  1012. <changeVoice
  1013. @close="closeChangeVoice"
  1014. @submited="getList"
  1015. :detail.sync="rowDetail"
  1016. :musicGroupId="teamid"
  1017. :voiceList="leftList"
  1018. />
  1019. </el-dialog>
  1020. <el-dialog
  1021. title="订单详情"
  1022. :visible.sync="orderVisible"
  1023. width="600px"
  1024. v-if="orderVisible"
  1025. >
  1026. <el-form :model="orderForm" :inline="true">
  1027. <!-- name: '',
  1028. totalAmount: '',
  1029. subject: '',
  1030. subjectFee: '',
  1031. axe: '',
  1032. axePrice: '',
  1033. others: '',
  1034. othersPrice: '' -->
  1035. <el-form-item label="学员姓名">
  1036. <el-input v-model.trim="orderForm.name" disabled=""></el-input>
  1037. </el-form-item>
  1038. <el-form-item label="实缴金额">
  1039. <el-input v-model.trim="orderForm.totalAmount" disabled=""></el-input>
  1040. </el-form-item>
  1041. <el-form-item label="实际专业">
  1042. <el-input v-model.trim="orderForm.subject" disabled=""></el-input>
  1043. </el-form-item>
  1044. <el-form-item label="课程费用">
  1045. <el-input v-model.trim="orderForm.subjectFee" disabled=""></el-input>
  1046. </el-form-item>
  1047. <el-form-item label="选择乐器">
  1048. <el-input v-model.trim="orderForm.axe" disabled=""></el-input>
  1049. </el-form-item>
  1050. <el-form-item label="乐器价格">
  1051. <el-input v-model.trim="orderForm.axePrice" disabled=""></el-input>
  1052. </el-form-item>
  1053. <el-form-item label="教辅组合">
  1054. <el-input v-model.trim="orderForm.others" disabled=""></el-input>
  1055. </el-form-item>
  1056. <el-form-item label="组合价格">
  1057. <el-input v-model.trim="orderForm.othersPrice" disabled=""></el-input>
  1058. </el-form-item>
  1059. </el-form>
  1060. <div slot="footer" class="dialog-footer">
  1061. <!-- <el-button>取 消</el-button> -->
  1062. <el-button type="primary" @click="orderVisible = false"
  1063. >确 定</el-button
  1064. >
  1065. </div>
  1066. </el-dialog>
  1067. <el-dialog title="修改专业" :visible.sync="subjectVisible" width="400px">
  1068. <el-form :model="maskSoundForm">
  1069. <el-form-item label="选择专业">
  1070. <el-select v-model.trim="maskSoundForm.subject" filterable clearable>
  1071. <el-option
  1072. v-for="(item, index) in soundList"
  1073. :key="index"
  1074. :label="item.name"
  1075. :value="item.id"
  1076. ></el-option>
  1077. </el-select>
  1078. </el-form-item>
  1079. </el-form>
  1080. <div slot="footer" class="dialog-footer">
  1081. <el-button @click="subjectVisible = false">取 消</el-button>
  1082. <el-button type="primary" @click="okReset">确 定</el-button>
  1083. </div>
  1084. </el-dialog>
  1085. </div>
  1086. </template>
  1087. <script>
  1088. import {
  1089. getTeamStudentList,
  1090. getTeamStudentInfo,
  1091. findSound,
  1092. StudentQuit,
  1093. findSubjectPlan,
  1094. getGoods,
  1095. getMusicGroup,
  1096. getMusicGroupAllClass,
  1097. StudentFeeIsLock,
  1098. updateStudentFee,
  1099. getMusicGroupGradeList,
  1100. getStudentList,
  1101. musicGroupOpenPay,
  1102. extensionPayment,
  1103. extensionApplyExpire,
  1104. getTeamBaseInfo,
  1105. getintoClass,
  1106. resetPlanNum,
  1107. openPayment
  1108. } from "@/api/buildTeam";
  1109. import {
  1110. addStudent,
  1111. getStudentClass,
  1112. getStudentInfoByPhone,
  1113. getStudentFeeDetail,
  1114. resetStudentSubject,
  1115. } from "@/api/studentManager";
  1116. import qrCode from "@/components/QrCode/index";
  1117. import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
  1118. import { visitChiose } from "@/utils/searchArray";
  1119. import pagination from "@/components/Pagination/index";
  1120. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  1121. import QRCode from "qrcodejs2";
  1122. import axios from "axios";
  1123. import { getToken } from "@/utils/auth";
  1124. import { permission } from "@/utils/directivePage";
  1125. import { addVisit } from "@/views/returnVisitManager/api.js";
  1126. import cleanDeep from "clean-deep";
  1127. import createUserPay from "./modals/create-user-pay.vue";
  1128. import TimesView from "./modals/course-time-detail";
  1129. import paymentCycle from "../../resetTeaming/modals/payment-cycle";
  1130. import paymentList from "./modals/payment-list";
  1131. import Tooltip from "@/components/Tooltip/index";
  1132. import changeVoice from "@/views/teamBuild/modals/change-voice";
  1133. //import changeVoice from "./modals/change-voice";
  1134. import visit from "@/views/withdrawal-application/modals/visit";
  1135. export default {
  1136. name: "tstudentList",
  1137. data() {
  1138. return {
  1139. detail: null,
  1140. teamid: "",
  1141. paymentDetailVisible: false,
  1142. paymentDetail: {},
  1143. payVisible: false,
  1144. quitVisible: false, // 退团信息确认的弹窗
  1145. studentClassVisible: false, // 学员所在班级弹窗
  1146. addStudentVisible: false, //新增学员弹窗
  1147. timesVisible: false,
  1148. timerDetail: null,
  1149. topFrom: {
  1150. // 顶部的禁选框集合
  1151. expect: "2", // 预期招生
  1152. studing: "5", // 在读人数
  1153. allmoney: "100", //实收总额
  1154. students: "5", // 实际招生人数
  1155. signout: "10", // 退团总数
  1156. },
  1157. searchForm: {
  1158. studentStatus: "", // 学生状态
  1159. major: "", // 报名专业
  1160. isPay: "", // 是否缴费
  1161. search: "",
  1162. isActive: "",
  1163. oweFlag: "",
  1164. currentGrade: null,
  1165. createYear: null,
  1166. classGroupId: null,
  1167. hasCourse: null,
  1168. carePackage: null,
  1169. comeOnPackage: null,
  1170. },
  1171. organizationCourseUnitPriceSettings: [],
  1172. quitForm: {
  1173. // 退团信息确认
  1174. isRefundCourseFee: null,
  1175. isRefundInstrumentFee: null,
  1176. isRefundTeachingAssistantsFee: null,
  1177. reason: "",
  1178. },
  1179. classMask: {
  1180. studentName: "",
  1181. },
  1182. baseInfo: {},
  1183. searchLsit: [],
  1184. tableList: [], //
  1185. rules: {
  1186. // 分页规则
  1187. limit: 10, // 限制显示条数
  1188. page: 1, // 当前页
  1189. total: 0, // 总条数
  1190. page_size: [10, 20, 40, 50], // 选择限制显示条数
  1191. },
  1192. studentListInfo: {
  1193. add: "",
  1194. quit: "",
  1195. studying: "",
  1196. courseRate: "",
  1197. },
  1198. signList: [],
  1199. mixList: [],
  1200. highList: [],
  1201. snapList: [],
  1202. soundList: [],
  1203. highonlineList: [],
  1204. muiscnetworkList: [],
  1205. qrcodeStatus: false, // 生成二维码
  1206. qrcodes: true,
  1207. qrcode: null,
  1208. codeUrl: null,
  1209. gradeList: [], // 学生
  1210. maskForm: {
  1211. studentName: "",
  1212. sex: "",
  1213. parentName: "",
  1214. course: "",
  1215. phone: "",
  1216. sound: "",
  1217. timer: "",
  1218. signClass: "",
  1219. mixClass: "",
  1220. highClass: "",
  1221. snapClass: [],
  1222. highonline: "",
  1223. muiscnetwork: "",
  1224. startClass: "",
  1225. currentGradeNum: null,
  1226. id: "",
  1227. // courseFee: null, // 声部费用
  1228. temporaryCourseFee: null, // 本次课程费用
  1229. musicGoodsIdList: null, // 乐器商品编号
  1230. kitGroupPurchaseType: "GROUP", // 乐器购买方式
  1231. musicPrice: null, // 乐器购买金额
  1232. instrGoodsIdList: [], // 辅件商品编号
  1233. instrPrice: null, // 辅件购买金额
  1234. },
  1235. remark: "", // 退团原因
  1236. classList: [],
  1237. quitRules: {
  1238. isRefundCourseFee: [
  1239. { required: true, message: "请选择是否退还课程费用" },
  1240. ],
  1241. isRefundInstrumentFee: [
  1242. { required: true, message: "选择是否退还乐器费用" },
  1243. ],
  1244. isRefundTeachingAssistantsFee: [
  1245. { required: true, message: "选择是否退还教辅费用" },
  1246. ],
  1247. reason: [{ required: true, message: "请填写退团退费原因" }],
  1248. },
  1249. maskRules: {
  1250. studentName: [{ required: true, message: "请输入学生姓名" }],
  1251. sex: [{ required: true, message: "请选择学生姓名" }],
  1252. parentName: [{ required: true, message: "请输入家长姓名" }],
  1253. course: [{ required: true, message: "请输入班级" }],
  1254. // phone: [{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
  1255. sound: [{ required: true, message: "请选择声部" }],
  1256. timer: [{ required: true, message: "请选择出生日期" }],
  1257. signClass: [{ required: true, message: "请选择声部班" }],
  1258. // price: [{ required: true, message: '请输入首缴金额' },],
  1259. currentGradeNum: [{ required: true, message: "请选择年级" }],
  1260. id: [{ required: true, message: "请输入证件号" }],
  1261. // courseFee: [{ required: true, message: "请输入声部费用" }],
  1262. temporaryCourseFee: [{ required: true, message: "请输课程费用" }],
  1263. musicGoodsIdList: [
  1264. { required: true, message: "请选择乐器", trigger: "change" },
  1265. ],
  1266. musicPrice: [{ required: true, message: "请输入乐器购买金额" }],
  1267. instrGoodsIdList: [{ required: true, message: "请选择辅件" }],
  1268. instrPrice: [{ required: true, message: "请输入辅件金额" }],
  1269. },
  1270. INSTRUMENTLIST: [], // 乐器列表
  1271. ACCESSORIESLIST: [], // 辅件列表
  1272. activeRow: null,
  1273. Fsearch: null,
  1274. Frules: null,
  1275. payForm: {
  1276. studentName: "",
  1277. payMoney: "",
  1278. payMonth: [],
  1279. },
  1280. kitStatus: false, // 乐器提供方式
  1281. // 新增回访记录弹窗
  1282. visitVisiable: false,
  1283. visitForm: {
  1284. musicGroupId: "",
  1285. overview: "",
  1286. purpose: "",
  1287. studentId: "",
  1288. type: "",
  1289. visitTime: "",
  1290. visitType: "",
  1291. feedback: "",
  1292. studentName: "",
  1293. },
  1294. cycles: [{}],
  1295. collapse: [0],
  1296. visitChiose,
  1297. visitRules: {
  1298. overview: [{ required: true, message: "请输入学生近况" }],
  1299. feedback: [{ required: true, message: "请输入家长反馈" }],
  1300. visitTime: [{ required: true, message: "请输入回访时间" }],
  1301. visitType: [{ required: true, message: "请选择回访类型" }],
  1302. },
  1303. pickerOptions: null,
  1304. classLists: null,
  1305. createdUserId: 0,
  1306. createUserPayVisible: false,
  1307. team_status: "",
  1308. // 整合报名中
  1309. paymentExpireDate: "",
  1310. applyExpireDate: null,
  1311. mergeVisible: false,
  1312. team_status: "",
  1313. paymentNum: 0,
  1314. paymentStatus: false,
  1315. paymentForm: {
  1316. paymentExpireDate: null,
  1317. // feeType: null
  1318. },
  1319. paymentRules: {
  1320. paymentExpireDate: [
  1321. { required: true, message: "请设置缴费截止日期", trigger: "blur" },
  1322. ],
  1323. },
  1324. extendForm: {
  1325. expireDate: null,
  1326. },
  1327. extendRule: {
  1328. expireDate: [
  1329. { required: true, message: "请选择延长时间", trigger: "change" },
  1330. ],
  1331. },
  1332. isPay: false,
  1333. extendPaymentStatus: false, // 延长缴费
  1334. codeStatus: false,
  1335. qrCodeUrl: null,
  1336. codeTitle: null,
  1337. isEdit: false,
  1338. leftList: [],
  1339. changeVoiceVisible: false,
  1340. rowDetail: null,
  1341. orderVisible: false,
  1342. orderForm: {
  1343. name: "",
  1344. totalAmount: "",
  1345. subject: "",
  1346. subjectFee: "",
  1347. axe: "",
  1348. axePrice: "",
  1349. others: "",
  1350. othersPrice: "",
  1351. },
  1352. maskSoundForm: {
  1353. subject: "",
  1354. },
  1355. subjectVisible: false,
  1356. multipleSelection: [],
  1357. };
  1358. },
  1359. components: {
  1360. pagination,
  1361. paymentCycle,
  1362. createUserPay,
  1363. Tooltip,
  1364. "times-view": TimesView,
  1365. paymentList,
  1366. visit,
  1367. qrCode,
  1368. changeVoice,
  1369. },
  1370. created() {},
  1371. filters: {
  1372. studentPays(val) {
  1373. let template = {
  1374. 0: "未缴费",
  1375. 1: "已缴费",
  1376. };
  1377. return template[val];
  1378. },
  1379. },
  1380. // activated() {
  1381. // this.init();
  1382. // },
  1383. async mounted() {
  1384. try {
  1385. const res = await getOrganizationCourseUnitPriceSettings({
  1386. rows: 9999,
  1387. });
  1388. this.organizationCourseUnitPriceSettings = res.data.rows;
  1389. } catch (error) {}
  1390. this.init();
  1391. },
  1392. methods: {
  1393. onPaymentDetail(row) {
  1394. this.paymentDetail = row;
  1395. this.paymentDetailVisible = true;
  1396. },
  1397. viewTimer(row) {
  1398. // this.timerDetail = row
  1399. this.timesVisible = true;
  1400. },
  1401. permission(str) {
  1402. return permission(str);
  1403. },
  1404. init() {
  1405. this.teamid = this.$route.query.id;
  1406. this.team_status = this.$route.query.team_status;
  1407. getMusicGroupGradeList({ musicGroupId: this.teamid }).then((res) => {
  1408. let result = res.data;
  1409. if (res.code == 200 && result) {
  1410. for (let i in result) {
  1411. this.gradeList.push({
  1412. value: i,
  1413. label: result[i],
  1414. });
  1415. }
  1416. }
  1417. });
  1418. // 获取报名截止日期和缴费截止日期
  1419. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1420. if (res.code == 200) {
  1421. this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1422. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1423. }
  1424. });
  1425. // 获取汇总数据
  1426. getTeamStudentInfo({ musicGroupId: this.teamid }).then((res) => {
  1427. if (res.code == 200) {
  1428. this.studentListInfo = res.data;
  1429. }
  1430. });
  1431. this.pickerOptions = this.beginDate();
  1432. this.getList();
  1433. // 获取乐团内所有声部
  1434. findSound({ musicGroupId: this.teamid }).then((res) => {
  1435. if (res.code == 200) {
  1436. this.soundList = res.data;
  1437. }
  1438. });
  1439. getintoClass({ musicGroupId: this.teamid }).then((res) => {
  1440. if (res.code == 200) {
  1441. this.leftList = res.data;
  1442. }
  1443. });
  1444. // getSubject().then(res => {
  1445. // if (res.code == 200) {
  1446. // this.soundList = res.data;
  1447. // }
  1448. // })
  1449. // 获取乐团所有声部课班
  1450. // getSingleClass({ musicGroupId: this.teamid }).then(res => {
  1451. // if (res.code == 200) {
  1452. // this.signList = res.data;
  1453. // }
  1454. // })
  1455. // 获取乐团基本信息
  1456. getMusicGroup({ musicGroupId: this.teamid }).then(
  1457. (res) => (this.baseInfo = res.data)
  1458. );
  1459. // 获取乐团所有合奏课
  1460. getMusicGroupAllClass({ musicGroupId: this.teamid }).then((res) => {
  1461. if (res.code == 200) {
  1462. this.classList = res.data;
  1463. this.signList = [];
  1464. this.mixList = [];
  1465. this.highList = [];
  1466. this.snapList = [];
  1467. this.classList.forEach((item) => {
  1468. if (item.type == "NORMAL") {
  1469. this.signList.push(item);
  1470. } else if (item.type == "MIX") {
  1471. this.mixList.push(item);
  1472. } else if (item.type == "HIGH") {
  1473. this.highList.push(item);
  1474. } else if (item.type == "SNAP") {
  1475. this.snapList.push(item);
  1476. } else if (item.type == "HIGH_ONLINE") {
  1477. this.highonlineList.push(item);
  1478. } else if (item.type == "MUSIC_NETWORK") {
  1479. this.muiscnetworkList.push(item);
  1480. }
  1481. });
  1482. }
  1483. });
  1484. },
  1485. permission(str) {
  1486. return permission(str);
  1487. },
  1488. onInstrumentChange() {
  1489. // 乐器切换时
  1490. // 乐器切换时
  1491. // let tempkitType = this.maskForm.kitGroupPurchaseType
  1492. // if(tempkitType == 'GROUP') {
  1493. // this.INSTRUMENTLIST.forEach(item => {
  1494. // if(item.value == value) {
  1495. // this.maskForm.musicPrice = item.marketPrice
  1496. // }
  1497. // })
  1498. // }
  1499. },
  1500. onKitGroupChnage(value) {
  1501. // 乐器提供方式
  1502. this.kitStatus = false;
  1503. if (value == "FREE") {
  1504. this.kitStatus = true;
  1505. this.maskForm.musicPrice = 0;
  1506. } else {
  1507. this.maskForm.musicPrice = null;
  1508. }
  1509. },
  1510. onMusicGroupExport() {
  1511. let url = "/api-web/export/musicGroupStudent";
  1512. let data = {
  1513. musicGroupId: this.teamid,
  1514. studentStatus: this.searchForm.studentStatus || null,
  1515. paymentStatus: this.searchForm.isPay || null,
  1516. subjectId: this.searchForm.major || null,
  1517. search: this.searchForm.search || null,
  1518. isActive: this.searchForm.isActive || null,
  1519. classGroupId: this.searchForm.classGroupId || null,
  1520. currentGrade: this.searchForm.currentGrade || null,
  1521. createYear: this.searchForm.createYear || null,
  1522. hasCourse: this.searchForm.hasCourse || null,
  1523. comeOnPackage: this.searchForm.comeOnPackage,
  1524. carePackage: this.searchForm.carePackage,
  1525. };
  1526. const options = {
  1527. method: "get",
  1528. headers: {
  1529. Authorization: getToken(),
  1530. },
  1531. url,
  1532. params: data,
  1533. responseType: "blob",
  1534. };
  1535. this.$confirm("您确定导出学员列表?", "提示", {
  1536. confirmButtonText: "确定",
  1537. cancelButtonText: "取消",
  1538. type: "warning",
  1539. })
  1540. .then(() => {
  1541. axios(options).then((res) => {
  1542. let blob = new Blob([res.data], {
  1543. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
  1544. type: "application/vnd.ms-excel;charset=utf-8",
  1545. // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1546. });
  1547. let objectUrl = URL.createObjectURL(blob);
  1548. let link = document.createElement("a");
  1549. let fname = this.$route.query.name + "学员列表.xls";
  1550. link.href = objectUrl;
  1551. link.setAttribute("download", fname);
  1552. document.body.appendChild(link);
  1553. link.click();
  1554. });
  1555. })
  1556. .catch(() => {});
  1557. },
  1558. search() {
  1559. this.rules.page = 1;
  1560. this.getList();
  1561. },
  1562. onReSet() {
  1563. this.$refs.searchForm.resetFields();
  1564. this.search();
  1565. },
  1566. onCreateQRCode() {
  1567. // 生成报名二维码
  1568. this.qrcodeStatus = true;
  1569. let id = this.$route.query.id;
  1570. if (this.qrcodes) {
  1571. this.qrcodes = false;
  1572. setTimeout(() => {
  1573. this.qrcode = new QRCode("qrcode", {
  1574. width: 200,
  1575. height: 200,
  1576. colorDark: "#000000",
  1577. colorLight: "#ffffff",
  1578. correctLevel: QRCode.CorrectLevel.H,
  1579. });
  1580. this.qrcode.makeCode(
  1581. vaildStudentUrl() + "/#/login?musicGroupId=" + id
  1582. );
  1583. this.codeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  1584. }, 500);
  1585. }
  1586. },
  1587. getList() {
  1588. let obj = {
  1589. musicGroupId: this.teamid,
  1590. page: this.rules.page,
  1591. rows: this.rules.limit,
  1592. studentStatus: this.searchForm.studentStatus || null,
  1593. paymentStatus: this.searchForm.isPay || null,
  1594. subjectId: this.searchForm.major || null,
  1595. search: this.searchForm.search || null,
  1596. isActive: this.searchForm.isActive || null,
  1597. classGroupId: this.searchForm.classGroupId || null,
  1598. currentGrade: this.searchForm.currentGrade || null,
  1599. createYear: this.searchForm.createYear || null,
  1600. oweFlag: this.searchForm.oweFlag || null,
  1601. hasCourse: this.searchForm.hasCourse || null,
  1602. comeOnPackage: this.searchForm.comeOnPackage,
  1603. carePackage: this.searchForm.carePackage,
  1604. };
  1605. getTeamStudentList(obj).then((res) => {
  1606. if (res.code == 200) {
  1607. this.tableList = res.data.rows;
  1608. this.rules.total = res.data.total;
  1609. }
  1610. });
  1611. },
  1612. addPay(row) {
  1613. this.createUserPayVisible = true;
  1614. this.createdUserId = row.userId;
  1615. },
  1616. addCycle() {
  1617. this.cycles.push({});
  1618. this.collapse.push(this.collapse.length);
  1619. },
  1620. removeCycle(index) {
  1621. this.cycles[index] = null;
  1622. this.cycles = this.cycles.filter((item) => !!item);
  1623. this.collapse.pop();
  1624. },
  1625. collapseChange(val) {
  1626. this.collapse = val;
  1627. },
  1628. gotoSignin() {
  1629. this.$router.push({
  1630. path: "/business/studentSignin",
  1631. query: {
  1632. id: this.teamid,
  1633. status: this.$route.query.status,
  1634. name: this.$route.query.name,
  1635. rules: this.Frules,
  1636. search: this.Fsearch,
  1637. },
  1638. });
  1639. },
  1640. chioseType() {
  1641. this.$refs["quitForm"].validate((res) => {
  1642. if (res) {
  1643. this.$confirm("确定退团?", "提示", {
  1644. confirmButtonText: "确定",
  1645. cancelButtonText: "取消",
  1646. type: "warning",
  1647. })
  1648. .then(() => {
  1649. let row = this.activeRow;
  1650. // 发请求 退团
  1651. StudentQuit({
  1652. musicGroupId: this.teamid,
  1653. userId: row.userId,
  1654. reason: this.quitForm.reason,
  1655. isRefundCourseFee: this.quitForm.isRefundCourseFee,
  1656. isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
  1657. isRefundTeachingAssistantsFee: this.quitForm
  1658. .isRefundTeachingAssistantsFee,
  1659. }).then((res) => {
  1660. this.quitForm = {
  1661. // 退团信息确认
  1662. isRefundCourseFee: null,
  1663. isRefundInstrumentFee: null,
  1664. isRefundTeachingAssistantsFee: null,
  1665. reason: "",
  1666. };
  1667. if (res.code == 200) {
  1668. this.$message.success("退团成功");
  1669. this.getList();
  1670. this.quitVisible = false;
  1671. }
  1672. });
  1673. })
  1674. .catch(() => {});
  1675. } else {
  1676. }
  1677. });
  1678. // row.typeVisible = false;
  1679. },
  1680. //
  1681. addStudent() {
  1682. // 发请求添加学员
  1683. this.$refs["maskForm"].validate((res) => {
  1684. if (res) {
  1685. // this.maskForm.parentName.timer 少个生日的字段
  1686. // classGroupId: maskForm.signClass
  1687. /** <!-- signClass: '',
  1688. mixClass: '',
  1689. highClass: '',
  1690. snapClass: [], --> */
  1691. let maskForm = this.maskForm;
  1692. // if (
  1693. // !maskForm.signClass &&
  1694. // !maskForm.mixClass &&
  1695. // !maskForm.highClass &&
  1696. // !maskForm.highonline &&
  1697. // !maskForm.muiscnetwork
  1698. // ) {
  1699. // if (
  1700. // !maskForm.snapClass ||
  1701. // !(maskForm.snapClass && maskForm.snapClass.length >= 1)
  1702. // ) {
  1703. // this.$message.error("该学生必须加入一个班级");
  1704. // return;
  1705. // }
  1706. // }
  1707. if (
  1708. maskForm.musicGoodsIdList &&
  1709. (maskForm.musicPrice === "" || maskForm.musicPrice === null)
  1710. ) {
  1711. this.$message.error("请输入乐器金额");
  1712. return;
  1713. }
  1714. if (
  1715. maskForm.instrGoodsIdList &&
  1716. maskForm.instrGoodsIdList.length > 0 &&
  1717. (maskForm.instrPrice === "" || maskForm.instrPrice === null)
  1718. ) {
  1719. this.$message.error("请输入辅件金额");
  1720. return;
  1721. }
  1722. let snapClassIds;
  1723. maskForm.snapClass
  1724. ? (snapClassIds = maskForm.snapClass.join(","))
  1725. : (snapClassIds = null);
  1726. let params = {
  1727. signClassId: maskForm.signClass,
  1728. mixClassId: maskForm.mixClass,
  1729. snapClassIds,
  1730. highClassId: maskForm.highClass,
  1731. courseFee: maskForm.courseFee,
  1732. temporaryCourseFee: maskForm.temporaryCourseFee,
  1733. studentRegistration: {
  1734. name: maskForm.studentName,
  1735. gender: maskForm.sex,
  1736. birthdate: maskForm.timer,
  1737. parentsName: maskForm.parentName,
  1738. parentsPhone: maskForm.phone,
  1739. currentGrade: maskForm.startClass,
  1740. currentGradeNum: maskForm.currentGradeNum,
  1741. currentClass: maskForm.course,
  1742. subjectId: maskForm.sound,
  1743. musicGroupId: this.teamid,
  1744. },
  1745. };
  1746. params.studentPaymentOrderDetails = [];
  1747. if (maskForm.musicGoodsIdList) {
  1748. params.studentPaymentOrderDetails.push({
  1749. goodsIdList: maskForm.musicGoodsIdList,
  1750. kitGroupPurchaseType: maskForm.kitGroupPurchaseType,
  1751. type: "MUSICAL",
  1752. price: maskForm.musicPrice,
  1753. });
  1754. }
  1755. if (maskForm.instrGoodsIdList && maskForm.instrGoodsIdList != "") {
  1756. params.studentPaymentOrderDetails.push({
  1757. goodsIdList: maskForm.instrGoodsIdList.join(","),
  1758. type: "ACCESSORIES",
  1759. price: maskForm.instrPrice,
  1760. });
  1761. }
  1762. addStudent(params).then((res) => {
  1763. if (res.code == 200) {
  1764. this.$message.success("添加学生成功");
  1765. this.getList();
  1766. this.addStudentVisible = false;
  1767. this.createUserPayVisible = true;
  1768. this.createdUserId = res.data;
  1769. }
  1770. this.$refs.maskForm.resetFields();
  1771. });
  1772. }
  1773. });
  1774. },
  1775. onSoundChange(value) {
  1776. // 学员声部切换时
  1777. // this.findSubjectPlan(value)
  1778. this.ACCESSORIESLIST = [];
  1779. this.maskForm.instrGoodsIdList = [];
  1780. this.maskForm.instrPrice = null;
  1781. this.INSTRUMENTLIST = [];
  1782. this.maskForm.musicPrice = null;
  1783. this.maskForm.musicGoodsIdList = null;
  1784. this.getGoodsList(value, "INSTRUMENT"); // 乐器
  1785. this.getGoodsList(value, "ACCESSORIES"); // 辅件
  1786. },
  1787. // 获取购买方式
  1788. findSubjectPlan(subjectId) {
  1789. findSubjectPlan({
  1790. musicGroupId: this.teamid,
  1791. subjectId: subjectId,
  1792. }).then((res) => {
  1793. let result = res.data;
  1794. if (res.code == 200) {
  1795. this.maskForm.musicMode = this.getBranchType(
  1796. result.kitGroupPurchaseType
  1797. );
  1798. }
  1799. });
  1800. },
  1801. getGoodsList(subjectId, type) {
  1802. getGoods({
  1803. subjectId: subjectId,
  1804. type: type,
  1805. }).then((res) => {
  1806. let result = res.data;
  1807. if (res.code == 200) {
  1808. let tempArr = [];
  1809. result.forEach((item) => {
  1810. tempArr.push({
  1811. label: item.name,
  1812. value: item.id,
  1813. marketPrice: item.marketPrice,
  1814. });
  1815. });
  1816. if (type == "ACCESSORIES") {
  1817. this.ACCESSORIESLIST = tempArr;
  1818. }
  1819. if (type == "INSTRUMENT") {
  1820. this.INSTRUMENTLIST = tempArr;
  1821. }
  1822. }
  1823. });
  1824. },
  1825. getBranchType(status) {
  1826. let common = {
  1827. FREE: "免费",
  1828. GROUP: "团购",
  1829. LEASE: "租赁",
  1830. };
  1831. return common[status];
  1832. },
  1833. lookClass(row) {
  1834. this.classMask.studentName = row.realName;
  1835. getStudentClass({
  1836. musicGroupId: this.teamid,
  1837. teacherId: row.userId,
  1838. }).then((res) => {
  1839. if (res.code == 200) {
  1840. this.classLists = res.data;
  1841. this.studentClassVisible = true;
  1842. }
  1843. });
  1844. },
  1845. quieTeamMask(row) {
  1846. this.activeRow = row;
  1847. this.quitVisible = true;
  1848. },
  1849. quieTeam(row) {
  1850. this.$prompt("请输入退团原因", "提示", {
  1851. confirmButtonText: "确定",
  1852. cancelButtonText: "取消",
  1853. type: "warning",
  1854. inputPattern: /\S/,
  1855. inputErrorMessage: "请输入退团原因",
  1856. })
  1857. .then((val) => {
  1858. // 发请求 退团
  1859. StudentQuit({
  1860. musicGroupId: this.teamid,
  1861. userId: row.userId,
  1862. reason: val.value,
  1863. isRefundCourseFee: false,
  1864. isRefundInstrumentFee: false,
  1865. isRefundTeachingAssistantsFee: false,
  1866. }).then((res) => {
  1867. this.quitForm = {
  1868. // 退团信息确认
  1869. isRefundCourseFee: null,
  1870. isRefundInstrumentFee: null,
  1871. isRefundTeachingAssistantsFee: null,
  1872. reason: "",
  1873. };
  1874. if (res.code == 200) {
  1875. this.$message.success("退团成功");
  1876. this.getList();
  1877. this.quitVisible = false;
  1878. }
  1879. });
  1880. })
  1881. .catch(() => {});
  1882. },
  1883. checkPhone(val) {
  1884. var regu = /^1[3456789]\d{9}$/;
  1885. var re = new RegExp(regu);
  1886. if (re.test(val)) {
  1887. getStudentInfoByPhone({ mobile: this.maskForm.phone }).then((res) => {
  1888. if (res.code == 200) {
  1889. if (res.data) {
  1890. this.maskForm.studentName = res.data.name;
  1891. this.maskForm.sex = res.data.gender;
  1892. this.maskForm.parentName = res.data.parentsName;
  1893. this.maskForm.course = res.data.currentClass;
  1894. this.maskForm.startClass = res.data.currentGrade;
  1895. this.maskForm.currentGradeNum = res.data.currentGradeNum
  1896. ? res.data.currentGradeNum + ""
  1897. : null;
  1898. this.maskForm.phone = val;
  1899. this.maskForm.timer = res.data.birthdate;
  1900. }
  1901. }
  1902. });
  1903. }
  1904. },
  1905. lockStudent(row) {
  1906. this.$confirm("是否锁定/解锁学生缴费周期?", "提示", {
  1907. confirmButtonText: "确定",
  1908. cancelButtonText: "取消",
  1909. type: "warning",
  1910. })
  1911. .then(() => {
  1912. let musicGroupId = this.teamid;
  1913. let studentId = row.userId;
  1914. let isLock;
  1915. row.isLock == 0 ? (isLock = 1) : (isLock = 0);
  1916. StudentFeeIsLock({ musicGroupId, studentId, isLock }).then((res) => {
  1917. if (res.code == 200) {
  1918. this.$message.success("修改成功");
  1919. this.getList();
  1920. }
  1921. });
  1922. })
  1923. .catch(() => {});
  1924. },
  1925. resetPay(row) {
  1926. this.activeRow = row;
  1927. this.payVisible = true;
  1928. this.payForm.studentName = row.realName;
  1929. this.payForm.payMoney = row.courseFee;
  1930. this.payForm.payMonth = row.paymentPeriodList.split(",");
  1931. if (this.payForm.payMonth[0] == "") {
  1932. this.payForm.payMonth = [];
  1933. }
  1934. },
  1935. submitPay() {
  1936. let studentId = this.activeRow.userId;
  1937. let musicGroupId = this.teamid;
  1938. let month = this.payForm.payMonth.join(",") || null;
  1939. let amount = this.payForm.payMoney;
  1940. let obj = {
  1941. studentId,
  1942. musicGroupId,
  1943. month,
  1944. amount,
  1945. };
  1946. updateStudentFee(obj).then((res) => {
  1947. if (res.code == 200) {
  1948. this.$message.success("修改成功");
  1949. this.payVisible = false;
  1950. this.getList();
  1951. }
  1952. });
  1953. },
  1954. closePayVisible() {
  1955. this.$refs["payForm"].resetFields();
  1956. this.payVisible = false;
  1957. },
  1958. addVisit(row) {
  1959. console.log(row);
  1960. this.detail = row;
  1961. // this.visitForm.studentName = row.realName;
  1962. // this.visitForm.musicGroupId = this.teamid;
  1963. // this.visitForm.studentId = row.userId;
  1964. this.visitVisiable = true;
  1965. },
  1966. handleChange(val) {
  1967. this.visitForm.type = val[0];
  1968. this.visitForm.purpose = val[1];
  1969. },
  1970. submitAddVisit() {
  1971. console.log(this.$refs.visitForm);
  1972. this.$refs.visitForm.validate((res) => {
  1973. if (res) {
  1974. addVisit(cleanDeep(this.visitForm)).then((res) => {
  1975. if (res.code === 200) {
  1976. this.$message.success("新增成功");
  1977. this.visitVisiable = false;
  1978. }
  1979. });
  1980. }
  1981. });
  1982. },
  1983. beginDate() {
  1984. let self = this;
  1985. return {
  1986. firstDayOfWeek: 1,
  1987. disabledDate(time) {
  1988. return time.getTime() >= new Date().getTime(); //开始时间不选时,结束时间最大值小于等于当天
  1989. },
  1990. };
  1991. },
  1992. createStudentFrom() {
  1993. this.addStudentVisible = true;
  1994. },
  1995. // 报名缴费功能
  1996. onGoHome() {
  1997. if (this.paymentNum <= 0) {
  1998. this.$message.error("当前缴费人数为0,无法开团");
  1999. return;
  2000. }
  2001. this.$confirm(`是否确认开团?`, "提示", {
  2002. confirmButtonText: "确定",
  2003. cancelButtonText: "取消",
  2004. type: "warning",
  2005. })
  2006. .then(() => {
  2007. musicGroupFound({
  2008. musicGroupId: this.$route.query.id,
  2009. }).then((res) => {
  2010. if (res.code == 200) {
  2011. // let query = this.$route.query;
  2012. // this.$message.success("开启成功");
  2013. // this.$router.push({
  2014. // path: "/teamList",
  2015. // query: {
  2016. // ...query,
  2017. // },
  2018. // });
  2019. this.onCancel();
  2020. }
  2021. });
  2022. })
  2023. .catch(() => {});
  2024. },
  2025. payStart() {
  2026. this.paymentStatus = true;
  2027. },
  2028. getStudentStatus() {
  2029. let obj = {
  2030. musicGroupId: this.teamid,
  2031. page: 1,
  2032. rows: 9999,
  2033. };
  2034. getStudentList(obj).then((res) => {
  2035. if (res.code == 200) {
  2036. res.data.rows.forEach((item) => {
  2037. // '未开启缴费', '开启缴费', '已缴费'
  2038. if (item.paymentStatus == 2) {
  2039. this.paymentNum += 1;
  2040. }
  2041. });
  2042. // this.rightList = res.data.rows;
  2043. // this.rules.total = res.data.total;
  2044. // return res;
  2045. }
  2046. });
  2047. },
  2048. payDate() {
  2049. let self = this;
  2050. return {
  2051. firstDayOfWeek: 1,
  2052. disabledDate(time) {
  2053. if (self.applyExpireDate) {
  2054. return (
  2055. time.getTime() <=
  2056. new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
  2057. );
  2058. } else {
  2059. return false;
  2060. }
  2061. },
  2062. };
  2063. },
  2064. onStartPayment(formName) {
  2065. // 开启缴费
  2066. this.$refs[formName].validate((valid) => {
  2067. if (valid) {
  2068. musicGroupOpenPay({
  2069. musicGroupId: this.teamid,
  2070. expireDate: this.paymentForm.paymentExpireDate,
  2071. // feeType: this.paymentForm.feeType
  2072. }).then((res) => {
  2073. if (res.code == 200) {
  2074. this.$message.success("开启成功");
  2075. this.paymentStatus = false;
  2076. this.$store.dispatch("delVisitedViews", this.$route);
  2077. this.$router.push({ path: "/teamList" });
  2078. // this.$router.push({
  2079. // path: "/business/resetTeaming",
  2080. // query: {
  2081. // status: "PAY",
  2082. // id: this.$route.query.id,
  2083. // name: this.$route.query.name,
  2084. // },
  2085. // });
  2086. // this.team_status = "PAY";
  2087. // this.paymentExpireDate = this.paymentForm.paymentExpireDate;
  2088. // this.getList();
  2089. }
  2090. });
  2091. } else {
  2092. return false;
  2093. }
  2094. });
  2095. },
  2096. applyDate() {
  2097. let self = this;
  2098. return {
  2099. firstDayOfWeek: 1,
  2100. disabledDate(time) {
  2101. if (self.paymentExpireDate) {
  2102. return (
  2103. time.getTime() >
  2104. new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
  2105. );
  2106. } else {
  2107. return false;
  2108. }
  2109. },
  2110. };
  2111. },
  2112. extendTime(isPay) {
  2113. this.isPay = isPay;
  2114. if (isPay) {
  2115. // 点击的延长缴费
  2116. this.extendForm.expireDate = this.paymentExpireDate;
  2117. } else {
  2118. // 点击的延长报名
  2119. this.extendForm.expireDate = this.applyExpireDate;
  2120. }
  2121. this.extendPaymentStatus = true;
  2122. },
  2123. onExtendPayment(formName, isPay) {
  2124. this.$refs[formName].validate((valid) => {
  2125. if (valid) {
  2126. if (!isPay) {
  2127. extensionApplyExpire({
  2128. musicGroupId: this.teamid,
  2129. expireDate: this.extendForm.expireDate,
  2130. }).then((res) => {
  2131. if (res.code == 200) {
  2132. this.$message.success("延长报名成功");
  2133. this.extendPaymentStatus = false;
  2134. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  2135. if (res.code == 200) {
  2136. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  2137. this.setBase(res);
  2138. }
  2139. });
  2140. } else {
  2141. this.$message.error(res.msg);
  2142. }
  2143. });
  2144. } else {
  2145. extensionPayment({
  2146. musicGroupId: this.teamid,
  2147. expireDate: this.extendForm.expireDate,
  2148. }).then((res) => {
  2149. if (res.code == 200) {
  2150. this.$message.success("延长缴费成功");
  2151. this.extendPaymentStatus = false;
  2152. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  2153. if (res.code == 200) {
  2154. this.paymentExpireDate =
  2155. res.data.musicGroup.paymentExpireDate;
  2156. }
  2157. });
  2158. } else {
  2159. this.$message.error(res.msg);
  2160. }
  2161. });
  2162. }
  2163. }
  2164. });
  2165. },
  2166. onCreateQRCode(type) {
  2167. // 生成报名二维码
  2168. let id = this.teamid;
  2169. this.codeStatus = true;
  2170. if (type == "payment") {
  2171. this.codeTitle = "学员报名连接";
  2172. this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  2173. } else if (type == "detail") {
  2174. let teamName = this.$route.query.name;
  2175. this.codeTitle = "报名缴费详情";
  2176. this.qrCodeUrl =
  2177. vaildTeacherUrl() +
  2178. "/#/order?musicGroupId=" +
  2179. id +
  2180. "&musicGroupName=" +
  2181. teamName;
  2182. } else if (type == "rePayment") {
  2183. this.codeTitle = "学生报名链接(无乐器)";
  2184. this.qrCodeUrl =
  2185. vaildStudentUrl() + "/#/login?musicGroupId=" + id + "&instrument=1";
  2186. }
  2187. },
  2188. saveIsEdit() {
  2189. // 提交数据
  2190. this.isEdit = false;
  2191. resetPlanNum(this.leftList).then((res) => {});
  2192. },
  2193. openChangeVoice(row) {
  2194. console.log(row);
  2195. // this.getList().then((res) => {
  2196. // for (const item of res.data.rows) {
  2197. // if (item.id === row.id) {
  2198. // this.rowDetail = { ...item };
  2199. // this.changeVoiceVisible = true;
  2200. // console.log( this.rowDetail)
  2201. // }
  2202. // }
  2203. // });
  2204. this.rowDetail = { ...row, studentId: row.userId };
  2205. this.changeVoiceVisible = true;
  2206. },
  2207. closeChangeVoice() {
  2208. this.changeVoiceVisible = false;
  2209. // this.rowDetail = null
  2210. },
  2211. lookdetail(row) {
  2212. this.orderVisible = true;
  2213. this.activeId = row.userId;
  2214. this.orderForm.name = row.realName;
  2215. this.orderForm.subject = row.subjectName;
  2216. getStudentFeeDetail({
  2217. musicGroupId: this.teamid,
  2218. studentId: row.userId,
  2219. }).then((res) => {
  2220. if (res.code == 200) {
  2221. if (res.data) {
  2222. this.orderForm.totalAmount = res.data.totalAmount;
  2223. // this.orderForm.subjectFee = res.data.courseFee;
  2224. let goodStr = "";
  2225. let goodPrice = 0;
  2226. let otherStr = "";
  2227. let othersPrice = 0;
  2228. for (let i in res.data.goods) {
  2229. if (res.data.goods[i].goodsType == "INSTRUMENT") {
  2230. goodStr += res.data.goods[i].goodsName + ",";
  2231. goodPrice += parseFloat(res.data.goods[i].musicalFee);
  2232. // this.orderForm.axe = res.data.goods[i].goodsName;
  2233. // this.orderForm.axePrice = res.data.goods[i].musicalFee;
  2234. } else if (res.data.goods[i].goodsType == "ACCESSORIES") {
  2235. otherStr += res.data.goods[i].goodsName + ",";
  2236. othersPrice += parseFloat(res.data.goods[i].musicalFee);
  2237. // this.orderForm.others = res.data.goods[i].goodsName;
  2238. // this.orderForm.othersPrice = res.data.goods[i].musicalFee;
  2239. } else if (res.data.goods[i].goodsType == "COURSE") {
  2240. this.orderForm.subjectFee = res.data.goods[i].musicalFee;
  2241. }
  2242. }
  2243. this.orderForm.others = otherStr.substring(0, otherStr.length - 1);
  2244. this.orderForm.othersPrice = othersPrice;
  2245. this.orderForm.axe = goodStr.substring(0, goodStr.length - 1);
  2246. this.orderForm.axePrice = goodPrice;
  2247. }
  2248. }
  2249. });
  2250. },
  2251. // 修改专业
  2252. resetSubject(row) {
  2253. this.activeId = row.userId;
  2254. this.subjectVisible = true;
  2255. // resetStudentSubject().then(res=>{]})
  2256. },
  2257. okReset() {
  2258. if (!this.maskSoundForm.subject) {
  2259. this.$message.error("请选择调剂专业");
  2260. return;
  2261. }
  2262. resetStudentSubject({
  2263. musicGroupId: this.teamid,
  2264. userId: this.activeId,
  2265. subId: this.maskSoundForm.subject,
  2266. }).then((res) => {
  2267. if (res.code == 200) {
  2268. this.$message.success("修改成功");
  2269. this.subjectVisible = false;
  2270. this.maskForm.subject = "";
  2271. getintoClass({ musicGroupId: this.id }).then((res) => {
  2272. if (res.code == 200) {
  2273. this.leftList = res.data;
  2274. }
  2275. });
  2276. this.getList();
  2277. }
  2278. });
  2279. },
  2280. onPartPayment() {
  2281. // 部分缴费
  2282. let selection = this.multipleSelection;
  2283. if (selection.length <= 0) {
  2284. this.$message.error("您还没有选择学生");
  2285. return false;
  2286. }
  2287. let ids = [];
  2288. selection.forEach((item) => {
  2289. ids.push(item.id);
  2290. });
  2291. this.$confirm(`是否确认开启缴费?`, "提示", {
  2292. confirmButtonText: "确定",
  2293. cancelButtonText: "取消",
  2294. type: "warning",
  2295. })
  2296. .then(() => {
  2297. openPayment({
  2298. ids: ids.join(","),
  2299. }).then((res) => {
  2300. if (res.code == 200) {
  2301. this.$message.success("开启成功");
  2302. this.getList();
  2303. } else {
  2304. this.$message.error(res.msg);
  2305. }
  2306. });
  2307. })
  2308. .catch(() => {});
  2309. },
  2310. handleSelectionChange(val) {
  2311. this.multipleSelection = val;
  2312. },
  2313. checkboxSelect(row) {
  2314. return row.paymentStatus == 0;
  2315. },
  2316. },
  2317. watch: {
  2318. quitVisible(val) {
  2319. if (!val) {
  2320. this.quitForm = {
  2321. // 退团信息确认
  2322. isRefundCourseFee: null,
  2323. isRefundInstrumentFee: null,
  2324. isRefundTeachingAssistantsFee: null,
  2325. reason: "",
  2326. };
  2327. this.$refs["quitForm"].resetFields();
  2328. }
  2329. },
  2330. // visitVisiable(val) {
  2331. // if (!val) {
  2332. // this.$refs["visitForm"].resetFields();
  2333. // }
  2334. // },
  2335. },
  2336. computed: {
  2337. saveKey() {
  2338. // return 'teamDetails-'+this.$route.query.id
  2339. return "teamDetails-studentList|id|" + this.$route.query.id;
  2340. },
  2341. },
  2342. };
  2343. </script>
  2344. <style lang="scss" scoped>
  2345. .dialog-footer.question {
  2346. display: flex;
  2347. flex-direction: row;
  2348. justify-content: space-between;
  2349. }
  2350. // .moreInput {
  2351. // width: 100%;
  2352. // display: flex;
  2353. // /deep/.el-form-item__content {
  2354. // display: flex;
  2355. // flex-direction: row;
  2356. // }
  2357. // }
  2358. .error {
  2359. color: red;
  2360. }
  2361. .el-select {
  2362. width: 180px !important;
  2363. }
  2364. .headWrap {
  2365. padding: 20px 0;
  2366. }
  2367. /deep/.el-date-editor.el-input {
  2368. width: auto;
  2369. .el-input__inner {
  2370. padding-right: 0;
  2371. }
  2372. }
  2373. .studentInfo {
  2374. /deep/.el-dialog__body {
  2375. // padding-top: 0;
  2376. // padding-bottom: 0;
  2377. }
  2378. }
  2379. // .instrList {
  2380. // display: flex;
  2381. // /deep/.el-form-item__content {
  2382. // width: 80%;
  2383. // }
  2384. // .el-col {
  2385. // /deep/.el-form-item__content {
  2386. // width: 100%;
  2387. // }
  2388. // }
  2389. // }
  2390. .stu-container {
  2391. .topFrom {
  2392. margin: 20px 30px 0;
  2393. width: 1000px;
  2394. }
  2395. .newStudent {
  2396. width: 121px;
  2397. height: 40px;
  2398. background: rgba(20, 146, 138, 1);
  2399. border-radius: 4px;
  2400. color: #fff;
  2401. text-align: center;
  2402. line-height: 40px;
  2403. font-size: 14px;
  2404. cursor: pointer;
  2405. }
  2406. }
  2407. .left-code,
  2408. .right-code {
  2409. // width: 50%;
  2410. // float: left;
  2411. h2 {
  2412. display: block;
  2413. font-size: 18px;
  2414. text-align: center;
  2415. padding-bottom: 8px;
  2416. line-height: 1;
  2417. height: 30px;
  2418. margin-bottom: 0;
  2419. }
  2420. .qrcode {
  2421. display: flex;
  2422. justify-content: center;
  2423. img {
  2424. width: 200px;
  2425. height: 200px;
  2426. // margin: 0 auto;
  2427. }
  2428. }
  2429. .code-url {
  2430. font-size: 18px;
  2431. text-align: center;
  2432. padding: 15px 15px 0 15px;
  2433. }
  2434. }
  2435. .export {
  2436. background: #14928a;
  2437. }
  2438. .alert {
  2439. margin-bottom: 10px;
  2440. }
  2441. .collapse-title {
  2442. display: flex;
  2443. justify-content: space-between;
  2444. align-items: center;
  2445. width: 100%;
  2446. .el-icon-circle-close {
  2447. font-size: 16px;
  2448. margin-right: 10px;
  2449. }
  2450. }
  2451. /deep/ .el-collapse-item__wrap {
  2452. padding-top: 20px;
  2453. }
  2454. .cycleForm {
  2455. /deep/ .el-form-item {
  2456. display: flex;
  2457. width: 100%;
  2458. /deep/ .el-form-item__content {
  2459. margin-left: 0 !important;
  2460. flex: 1;
  2461. }
  2462. }
  2463. }
  2464. .statistic {
  2465. padding: 20px 0;
  2466. text-align: center;
  2467. width: 100%;
  2468. margin: auto !important;
  2469. }
  2470. .popoverWrap {
  2471. p {
  2472. line-height: 25px;
  2473. }
  2474. }
  2475. .studentListWrap {
  2476. display: flex;
  2477. flex-direction: row;
  2478. justify-content: flex-start;
  2479. align-items: center;
  2480. div {
  2481. margin-right: 15px;
  2482. }
  2483. }
  2484. .btnList {
  2485. display: flex;
  2486. flex-direction: row;
  2487. justify-content: flex-start;
  2488. align-items: center;
  2489. flex-wrap: wrap;
  2490. & > div {
  2491. margin-right: 15px;
  2492. margin-bottom: 10px;
  2493. }
  2494. }
  2495. </style>