studentList.vue 54 KB

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