studentList.vue 53 KB

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