studentList.vue 51 KB

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