studentList.vue 80 KB

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