studentList.vue 49 KB

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