studentList.vue 53 KB

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