studentList.vue 54 KB

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