studentList.vue 52 KB

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