studentList.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287
  1. <template>
  2. <div class='stu-container'>
  3. <!-- 头部展示 -->
  4. <div class="headWrap">
  5. <div class="left">
  6. <div class="headItem">
  7. <p>在读人数:<span>{{studentListInfo.studying}}</span></p>
  8. </div>
  9. <div class="headItem">
  10. <p>退团人数:<span>{{studentListInfo.quit}}</span></p>
  11. </div>
  12. <div class="headItem">
  13. <p>新增人数:<span>{{studentListInfo.add}}</span></p>
  14. </div>
  15. </div>
  16. <div class="right">
  17. <div class="newStudent"
  18. style="margin-bottom:10px;"
  19. @click="addStudentVisible = true">新增学员</div>
  20. <div class="newStudent"
  21. style="margin-bottom:10px;"
  22. @click="onCreateQRCode">报名连接</div>
  23. <div class="newStudent"
  24. @click='gotoSignin'>点名总览</div>
  25. </div>
  26. </div>
  27. <!-- 搜索类型 -->
  28. <el-form :inline="true"
  29. class="searchForm"
  30. v-model="searchForm">
  31. <el-form-item>
  32. <el-input v-model="searchForm.search"
  33. placeholder="学生姓名或电话"
  34. @keyup.enter.native='search'></el-input>
  35. </el-form-item>
  36. <el-form-item>
  37. <el-select v-model="searchForm.studentStatus"
  38. clearable
  39. filterable
  40. placeholder="学员状态">
  41. <el-option label="在读"
  42. value="NORMAL"></el-option>
  43. <el-option label="请假"
  44. value="LEAVE"></el-option>
  45. <el-option label="退团"
  46. value="QUIT"></el-option>
  47. </el-select>
  48. </el-form-item>
  49. <el-form-item>
  50. <el-select v-model="searchForm.classGroupId"
  51. clearable
  52. filterable
  53. placeholder="请选择班级">
  54. <el-option v-for='(item,index) in classList'
  55. :key='index'
  56. :value="item.id"
  57. :label="item.name"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item>
  61. <el-select v-model="searchForm.major"
  62. clearable
  63. filterable
  64. placeholder="所选专业">
  65. <el-option v-for='(item,index) in soundList'
  66. :key='index'
  67. :value="item.id"
  68. :label="item.name"></el-option>
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item>
  72. <el-select v-model="searchForm.isPay"
  73. clearable
  74. filterable
  75. placeholder="报名缴费">
  76. <el-option label="完成缴费"
  77. value="PAID_COMPLETED"></el-option>
  78. <el-option label="未缴费"
  79. value="NON_PAYMENT"></el-option>
  80. <el-option label="缴费中"
  81. value="PROCESSING"></el-option>
  82. </el-select>
  83. </el-form-item>
  84. <el-form-item>
  85. <el-select v-model="searchForm.isActive"
  86. clearable
  87. filterable
  88. placeholder="是否激活">
  89. <el-option label="是"
  90. value="1"></el-option>
  91. <el-option label="否"
  92. value="0"></el-option>
  93. </el-select>
  94. </el-form-item>
  95. <!-- <el-form-item>
  96. <el-select v-model="searchForm.school"
  97. placeholder="所在学校">
  98. <el-option label="item.text"
  99. value="1"></el-option>
  100. </el-select>
  101. </el-form-item> -->
  102. <el-form-item>
  103. <div class='searchBtn'
  104. @click='search'>搜索</div>
  105. </el-form-item>
  106. <el-form-item>
  107. <div class='searchBtn export'
  108. v-permission="'export/musicGroupStudent'"
  109. @click='onMusicGroupExport'>导出</div>
  110. </el-form-item>
  111. </el-form>
  112. <!-- 列表 -->
  113. <div class="tableWrap">
  114. <el-table :data='tableList'
  115. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  116. <el-table-column label="学员编号"
  117. width="120px;"
  118. prop="userId">
  119. </el-table-column>
  120. <el-table-column label="学员姓名"
  121. width="120px;"
  122. prop="realName">
  123. </el-table-column>
  124. <el-table-column align='center'
  125. prop="gender"
  126. width="50px;"
  127. label="性别">
  128. <template slot-scope="scope">
  129. <div>
  130. {{scope.row.gender| sex }}
  131. </div>
  132. </template>
  133. </el-table-column>
  134. <el-table-column align='center'
  135. prop="phone"
  136. label="联系电话">
  137. </el-table-column>
  138. <!-- <el-table-column align='center'
  139. prop=""
  140. label="所在学校">
  141. </el-table-column> -->
  142. <el-table-column align='center'
  143. label="年级班级">
  144. <template slot-scope="scope">
  145. <div>
  146. {{scope.row.currentGrade+scope.row.currentClass}}
  147. </div>
  148. </template>
  149. </el-table-column>
  150. <el-table-column align='center'
  151. label="专业"
  152. prop="subjectName">
  153. </el-table-column>
  154. <!-- <el-table-column align='center'
  155. label="乐团班级">
  156. </el-table-column>
  157. <el-table-column align='center'
  158. label="合奏班">
  159. </el-table-column> -->
  160. <el-table-column align='center'
  161. prop="studentStatus"
  162. label="学员状态">
  163. <template slot-scope="scope">
  164. <div>
  165. {{ scope.row.studentStatus | musicGroupStudentType}}
  166. </div>
  167. </template>
  168. </el-table-column>
  169. <el-table-column align='center'
  170. label="新增学员">
  171. <template slot-scope="scope">
  172. <div>
  173. {{ scope.row.isNewStudent | yesOrNo}}
  174. </div>
  175. </template>
  176. </el-table-column>
  177. <el-table-column align='center'
  178. label="批量修改缴费">
  179. <template slot-scope="scope">
  180. <div>
  181. {{ scope.row.isLock?'已锁定':'可修改'}}
  182. </div>
  183. </template>
  184. </el-table-column>
  185. <el-table-column align="center"
  186. label="下次缴费日期"
  187. prop="nextPaymentDate">
  188. <template slot-scope="scope">
  189. {{ scope.row.nextPaymentDate | formatTimer }}
  190. </template>
  191. </el-table-column>
  192. <el-table-column align="center"
  193. label="缴费金额"
  194. prop="courseFee">
  195. </el-table-column>
  196. <el-table-column align='center'
  197. label="报名缴费">
  198. <template slot-scope="scope">
  199. <div>
  200. {{ scope.row.paymentStatus | studentPays}}
  201. </div>
  202. </template>
  203. </el-table-column>
  204. <el-table-column align='center'
  205. label="是否激活">
  206. <template slot-scope="scope">
  207. <div>
  208. {{ scope.row.isActive?'是':'否'}}
  209. </div>
  210. </template>
  211. </el-table-column>
  212. <el-table-column align='center'
  213. fixed="right"
  214. width="250px;"
  215. label="操作">
  216. <template slot-scope="scope">
  217. <div v-if="scope.row.studentStatus != 'QUIT'">
  218. <!-- <el-popover placement="top"
  219. v-model="scope.row.typeVisible">
  220. <el-input v-model="remark"
  221. placeholder="请输入退团原因"></el-input>
  222. <el-button type="text"
  223. slot='reference'
  224. class='chiose'>
  225. 退团
  226. </el-button>
  227. <div style="text-align: right; margin-top: 20px">
  228. <el-button size="mini"
  229. type="text"
  230. @click="scope.row.typeVisible = false">取消</el-button>
  231. <el-button type="primary"
  232. size="mini"
  233. @click="chioseType(scope.row)">确定</el-button>
  234. </div>
  235. </el-popover> -->
  236. <el-button type="text"
  237. @click="lookClass(scope.row)">查看班级</el-button>
  238. <el-button type="text"
  239. v-if="!scope.row.isLock"
  240. @click="lockStudent(scope.row)">锁定</el-button>
  241. <el-button v-else
  242. type="text"
  243. @click="lockStudent(scope.row)">解锁</el-button>
  244. <el-button type="text"
  245. @click="resetPay(scope.row)">修改缴费</el-button>
  246. <el-button type='text'
  247. @click="quieTeamMask(scope.row)">退团</el-button>
  248. </div>
  249. </template>
  250. </el-table-column>
  251. </el-table>
  252. <pagination :total="rules.total"
  253. :page.sync="rules.page"
  254. :limit.sync="rules.limit"
  255. :page-sizes="rules.page_size"
  256. @pagination="getList" />
  257. </div>
  258. <el-dialog title="新增学员"
  259. width="640px"
  260. class="studentInfo"
  261. :visible.sync="addStudentVisible">
  262. <el-form :model="maskForm"
  263. label-position="right"
  264. label-width="100px"
  265. ref='maskForm'
  266. :rules="maskRules"
  267. :inline="true">
  268. <el-divider>基本信息</el-divider>
  269. <el-form-item label="联系电话"
  270. :rules="[{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }]"
  271. prop="phone">
  272. <el-input v-model="maskForm.phone"
  273. placeholder="联系电话"
  274. @blur="checkPhone(maskForm.phone)"></el-input>
  275. </el-form-item>
  276. <el-form-item label="学员姓名"
  277. prop="studentName">
  278. <el-input v-model="maskForm.studentName"
  279. placeholder="学员姓名"></el-input>
  280. </el-form-item>
  281. <el-form-item label="学员性别"
  282. prop="sex">
  283. <el-select v-model="maskForm.sex"
  284. clearable>
  285. <el-option label="男"
  286. :value="1"></el-option>
  287. <el-option label="女"
  288. :value="0"></el-option>
  289. </el-select>
  290. </el-form-item>
  291. <el-form-item label="家长姓名"
  292. prop="parentName">
  293. <el-input v-model="maskForm.parentName"
  294. placeholder="家长姓名"></el-input>
  295. </el-form-item>
  296. <el-form-item label="年级"
  297. prop="startClass">
  298. <el-select placeholder="起始年级"
  299. filterable
  300. clearable
  301. v-model="maskForm.startClass">
  302. <el-option value="一年级"
  303. label="一年级"></el-option>
  304. <el-option value="二年级"
  305. label="二年级"></el-option>
  306. <el-option value="三年级"
  307. label="三年级"></el-option>
  308. <el-option value="四年级"
  309. label="四年级"></el-option>
  310. <el-option value="五年级"
  311. label="五年级"></el-option>
  312. <el-option value="六年级"
  313. label="六年级"></el-option>
  314. <el-option value="初一"
  315. label="初一"></el-option>
  316. <el-option value="初二"
  317. label="初二"></el-option>
  318. <el-option value="初三"
  319. label="初三"></el-option>
  320. <el-option value="高一"
  321. label="高一"></el-option>
  322. <el-option value="高二"
  323. label="高二"></el-option>
  324. <el-option value="高三"
  325. label="高三"></el-option>
  326. </el-select>
  327. </el-form-item>
  328. <el-form-item label="班级"
  329. prop="course">
  330. <el-input v-model="maskForm.course"
  331. placeholder="班级"></el-input>
  332. </el-form-item>
  333. <el-form-item label="学员声部"
  334. prop="sound">
  335. <el-select v-model="maskForm.sound"
  336. clearable
  337. filterable
  338. @change="onSoundChange">
  339. <el-option v-for='(item,index) in soundList'
  340. :key='index'
  341. :value="item.id"
  342. :label="item.name"></el-option>
  343. </el-select>
  344. </el-form-item>
  345. <!-- <el-form-item label="证件号"
  346. prop="id">
  347. <el-input v-model="maskForm.id"></el-input>
  348. </el-form-item> -->
  349. <el-form-item label="出生日期"
  350. style="margin-right: 0;"
  351. prop="timer">
  352. <el-col :span="24">
  353. <el-date-picker v-model="maskForm.timer"
  354. value-format="yyyy-MM-dd"
  355. type="date"
  356. placeholder="选择日期">
  357. </el-date-picker>
  358. </el-col>
  359. </el-form-item>
  360. <el-form-item label="课程费用"
  361. prop="courseFee">
  362. <el-input v-model="maskForm.courseFee"
  363. placeholder="续费金额"></el-input>
  364. </el-form-item>
  365. <br>
  366. <el-form-item label="单技班">
  367. <el-select v-model="maskForm.signClass"
  368. filterable
  369. clearable>
  370. <el-option v-for="(item,index) in signList"
  371. :key="index"
  372. :value="item.id"
  373. :label="item.name"></el-option>
  374. </el-select>
  375. </el-form-item>
  376. <el-form-item label="合奏班">
  377. <el-select v-model="maskForm.mixClass"
  378. filterable
  379. clearable>
  380. <el-option v-for="(item,index) in mixList"
  381. :key="index"
  382. :value="item.id"
  383. :label="item.name"></el-option>
  384. </el-select>
  385. </el-form-item>
  386. <el-form-item label="基础技能班">
  387. <el-select v-model="maskForm.highClass"
  388. filterable
  389. clearable>
  390. <el-option v-for="(item,index) in highList"
  391. :key="index"
  392. :value="item.id"
  393. :label="item.name"></el-option>
  394. </el-select>
  395. </el-form-item>
  396. <el-form-item label="临时班">
  397. <el-select v-model="maskForm.snapClass"
  398. filterable
  399. clearable
  400. multiple>
  401. <el-option v-for="(item,index) in snapList"
  402. :key="index"
  403. :value="item.id"
  404. :label="item.name"></el-option>
  405. </el-select>
  406. </el-form-item>
  407. <el-divider>首缴订单信息</el-divider>
  408. <el-form-item label="课程费用"
  409. prop="temporaryCourseFee">
  410. <el-input type='number'
  411. @mousewheel.native.prevent
  412. v-model="maskForm.temporaryCourseFee"
  413. placeholder="首缴课程金额"></el-input>
  414. </el-form-item>
  415. <el-form-item label="乐器"
  416. class="instrList">
  417. <el-col :span="11"
  418. style="width: auto;">
  419. <el-form-item>
  420. <el-select placeholder="选择乐器"
  421. filterable
  422. clearable
  423. v-model="maskForm.musicGoodsIdList">
  424. <el-option v-for="(item, index) in INSTRUMENTLIST"
  425. :key="index"
  426. :value="item.value"
  427. :label="item.label"></el-option>
  428. </el-select>
  429. </el-form-item>
  430. </el-col>
  431. <el-col :span="1">&nbsp;</el-col>
  432. <el-col :span="11">
  433. <el-form-item>
  434. <el-input v-model="maskForm.musicPrice"
  435. placeholder="输入金额">
  436. <template slot="prepend">
  437. {{ maskForm.musicMode }}
  438. </template>
  439. </el-input>
  440. </el-form-item>
  441. </el-col>
  442. </el-form-item>
  443. <el-form-item label="辅件">
  444. <el-col :span="11"
  445. style="width: auto;">
  446. <el-form-item>
  447. <el-select filterable
  448. clearable
  449. multiple
  450. placeholder="选择辅件"
  451. v-model="maskForm.instrGoodsIdList">
  452. <el-option v-for="(item, index) in ACCESSORIESLIST"
  453. :key="index"
  454. :value="item.value"
  455. :label="item.label"></el-option>
  456. </el-select>
  457. </el-form-item>
  458. </el-col>
  459. <el-col :span="1">&nbsp;</el-col>
  460. <el-col :span="11">
  461. <el-form-item>
  462. <el-input v-model="maskForm.instrPrice"
  463. placeholder="输入金额"></el-input>
  464. </el-form-item>
  465. </el-col>
  466. </el-form-item>
  467. </el-form>
  468. <div slot="footer"
  469. class="dialog-footer">
  470. <!-- <el-button @click="addStudentVisible = false">取 消</el-button> -->
  471. <el-button type="primary"
  472. @click="addStudent">确 定</el-button>
  473. </div>
  474. </el-dialog>
  475. <el-dialog title="学员所在班级"
  476. width="640px"
  477. :visible.sync="studentClassVisible">
  478. <el-form :model="classMask">
  479. <el-form-item label="学生姓名">
  480. {{ classMask.studentName }}
  481. </el-form-item>
  482. <el-form-item label="所在班级"
  483. v-for="(item,index) in classList"
  484. :key="index">
  485. {{ item.name }}
  486. </el-form-item>
  487. </el-form>
  488. </el-dialog>
  489. <!-- 退团弹窗 -->
  490. <el-dialog title="退团信息确认"
  491. width="640px"
  492. :visible.sync="quitVisible">
  493. <el-form :model="quitForm"
  494. ref="quitForm"
  495. :rules="quitRules">
  496. <el-form-item label="退还课程费用"
  497. prop="isRefundCourseFee">
  498. <el-radio v-model="quitForm.isRefundCourseFee"
  499. :label="true">是</el-radio>
  500. <el-radio v-model="quitForm.isRefundCourseFee"
  501. :label="false">否</el-radio>
  502. </el-form-item>
  503. <el-form-item label="退还乐器费用"
  504. prop="isRefundInstrumentFee">
  505. <el-radio v-model="quitForm.isRefundInstrumentFee"
  506. :label="true">是</el-radio>
  507. <el-radio v-model="quitForm.isRefundInstrumentFee"
  508. :label="false">否</el-radio>
  509. </el-form-item>
  510. <el-form-item label="退还教辅费用"
  511. prop="isRefundTeachingAssistantsFee">
  512. <el-radio v-model="quitForm.isRefundTeachingAssistantsFee"
  513. :label="true">是</el-radio>
  514. <el-radio v-model="quitForm.isRefundTeachingAssistantsFee"
  515. :label="false">否</el-radio>
  516. </el-form-item>
  517. <el-form-item label="退团原因">
  518. <el-input type="textarea"
  519. v-model="quitForm.reason"></el-input>
  520. </el-form-item>
  521. </el-form>
  522. <span slot="footer"
  523. class="dialog-footer">
  524. <el-button @click="quitVisible = false">取 消</el-button>
  525. <el-button type="primary"
  526. @click="chioseType">确 定</el-button>
  527. </span>
  528. </el-dialog>
  529. <el-dialog title="报名二维码"
  530. :visible.sync="qrcodeStatus"
  531. width="300px">
  532. <div class="left-code">
  533. <h2>学员报名连接</h2>
  534. <div id="qrcode"
  535. class="qrcode code"
  536. ref="qrCodeUrl"></div>
  537. <p class="code-url"
  538. v-if="codeUrl">{{ codeUrl }}</p>
  539. </div>
  540. </el-dialog>
  541. <el-dialog title="修改缴费周期"
  542. :before-close='closePayVisible'
  543. width='600px'
  544. :visible.sync="payVisible">
  545. <el-form :model="payForm"
  546. ref="payForm"
  547. :inline="true">
  548. <el-form-item label="学生姓名"
  549. prop="studentName">
  550. <el-input v-model="payForm.studentName"
  551. disabled></el-input>
  552. </el-form-item>
  553. <br>
  554. <el-form-item label="缴费金额"
  555. prop="payMoney">
  556. <el-input type="number"
  557. v-model="payForm.payMoney"
  558. @mousewheel.native.prevent></el-input>
  559. </el-form-item>
  560. <el-form-item label="缴费月份"
  561. prop="payMonth">
  562. <el-checkbox-group v-model="payForm.payMonth"
  563. fill="#14928A"
  564. text-color='#474747'>
  565. <el-checkbox label="1">一月</el-checkbox>
  566. <el-checkbox label="2">二月</el-checkbox>
  567. <el-checkbox label="3">三月</el-checkbox>
  568. <el-checkbox label="4">四月</el-checkbox>
  569. <el-checkbox label="5">五月</el-checkbox>
  570. <el-checkbox label="6">六月</el-checkbox>
  571. <el-checkbox label="7">七月</el-checkbox>
  572. <el-checkbox label="8">八月</el-checkbox>
  573. <el-checkbox label="9">九月</el-checkbox>
  574. <el-checkbox label="10">十月</el-checkbox>
  575. <el-checkbox label="11">十一月</el-checkbox>
  576. <el-checkbox label="12">十二月</el-checkbox>
  577. </el-checkbox-group>
  578. </el-form-item>
  579. <!-- studentName: '',
  580. payMoney: '',
  581. payMonth -->
  582. </el-form>
  583. <div slot="footer"
  584. class="dialog-footer">
  585. <el-button @click="quitVisible = false">取 消</el-button>
  586. <el-button type="primary"
  587. @click="submitPay">确 定</el-button>
  588. </div>
  589. </el-dialog>
  590. </div>
  591. </template>
  592. <script>
  593. import { getTeamStudentList, getTeamStudentInfo, getSingleClass, findSound, StudentQuit, findSubjectPlan, getGoods, getSubject, getMusicGroupAllClass, StudentFeeIsLock, updateStudentFee } from '@/api/buildTeam'
  594. import { addStudent, getStudentClass, getStudentInfoByPhone } from '@/api/studentManager'
  595. import pagination from '@/components/Pagination/index'
  596. import { vaildStudentUrl } from '@/utils/validate'
  597. import QRCode from 'qrcodejs2'
  598. import axios from 'axios'
  599. import { getToken } from '@/utils/auth'
  600. export default {
  601. name: "tstudentList",
  602. props: {
  603. teamid: {
  604. type: String,
  605. required: true
  606. },
  607. },
  608. data () {
  609. return {
  610. payVisible: false,
  611. quitVisible: false, // 退团信息确认的弹窗
  612. studentClassVisible: false, // 学员所在班级弹窗
  613. addStudentVisible: false, //新增学员弹窗
  614. topFrom: { // 顶部的禁选框集合
  615. expect: '2', // 预期招生
  616. studing: '5', // 在读人数
  617. allmoney: '100', //实收总额
  618. students: '5', // 实际招生人数
  619. signout: '10', // 退团总数
  620. },
  621. searchForm: {
  622. studentStatus: '', // 学生状态
  623. major: '', // 报名专业
  624. isPay: '', // 是否缴费
  625. search: '',
  626. isActive: '',
  627. classGroupId: null
  628. },
  629. quitForm: { // 退团信息确认
  630. isRefundCourseFee: null,
  631. isRefundInstrumentFee: null,
  632. isRefundTeachingAssistantsFee: null,
  633. reason: ''
  634. },
  635. classMask: {
  636. studentName: ''
  637. },
  638. searchLsit: [],
  639. tableList: [], //
  640. rules: {
  641. // 分页规则
  642. limit: 10, // 限制显示条数
  643. page: 1, // 当前页
  644. total: 0, // 总条数
  645. page_size: [10, 20, 40, 50] // 选择限制显示条数
  646. },
  647. studentListInfo: {
  648. add: '',
  649. quit: '',
  650. studying: ''
  651. },
  652. signList: [],
  653. mixList: [],
  654. highList: [],
  655. snapList: [],
  656. soundList: [],
  657. classList: [],
  658. qrcodeStatus: false, // 生成二维码
  659. qrcodes: true,
  660. qrcode: null,
  661. codeUrl: null,
  662. maskForm: {
  663. studentName: '',
  664. sex: '',
  665. parentName: '',
  666. course: '',
  667. phone: '',
  668. sound: '',
  669. timer: '',
  670. signClass: '',
  671. mixClass: '',
  672. highClass: '',
  673. snapClass: [],
  674. // price: '',
  675. startClass: '',
  676. id: '',
  677. courseFee: null, // 声部费用
  678. temporaryCourseFee: null, // 本次课程费用
  679. musicGoodsIdList: null, // 乐器商品编号
  680. musicMode: null, // 乐器购买方式
  681. musicPrice: null, // 乐器购买金额
  682. instrGoodsIdList: [], // 辅件商品编号
  683. instrPrice: null // 辅件购买金额
  684. },
  685. remark: '', // 退团原因
  686. classList: [],
  687. quitRules: {
  688. isRefundCourseFee: [{ required: true, message: '请选择是否退还课程费用' },],
  689. isRefundInstrumentFee: [{ required: true, message: '选择是否退还乐器费用' },],
  690. isRefundTeachingAssistantsFee: [{ required: true, message: '选择是否退还教辅费用' },],
  691. },
  692. maskRules: {
  693. studentName: [{ required: true, message: '请输入学生姓名' },],
  694. sex: [{ required: true, message: '请选择学生姓名' },],
  695. parentName: [{ required: true, message: '请输入家长姓名' },],
  696. course: [{ required: true, message: '请输入班级' },],
  697. // phone: [{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
  698. sound: [{ required: true, message: '请选择声部' },],
  699. timer: [{ required: true, message: '请选择出生日期' },],
  700. signClass: [{ required: true, message: '请选择单技班' },],
  701. // price: [{ required: true, message: '请输入首缴金额' },],
  702. startClass: [{ required: true, message: '请选择年级' }],
  703. id: [{ required: true, message: '请输入证件号' }],
  704. courseFee: [{ required: true, message: '请输入声部费用' }],
  705. temporaryCourseFee: [{ required: true, message: '请输课程费用' }],
  706. musicGoodsIdList: [{ required: true, message: '请选择乐器', trigger: 'change' }],
  707. musicPrice: [{ required: true, message: '请输入乐器购买金额' }],
  708. instrGoodsIdList: [{ required: true, message: '请选择辅件' }],
  709. instrPrice: [{ required: true, message: '请输入辅件金额' }]
  710. },
  711. INSTRUMENTLIST: [], // 乐器列表
  712. ACCESSORIESLIST: [], // 辅件列表
  713. activeRow: null,
  714. Fsearch: null,
  715. Frules: null,
  716. payForm: {
  717. studentName: '',
  718. payMoney: '',
  719. payMonth: []
  720. }
  721. }
  722. },
  723. components: {
  724. pagination
  725. },
  726. created () {
  727. // 判断是否带缓存参数
  728. if (this.$route.query.search) {
  729. this.Fsearch = this.$route.query.search;
  730. }
  731. if (this.$route.query.rules) {
  732. this.Frules = this.$route.query.rules
  733. }
  734. },
  735. /** <el-option label="已开启缴费"
  736. value="1"></el-option>
  737. <el-option label="未缴费"
  738. value="0"></el-option>
  739. <el-option label="已缴费"
  740. value="2"></el-option> */
  741. filters: {
  742. studentPays (val) {
  743. let template = {
  744. 'PAID_COMPLETED': "完成缴费",
  745. 'NON_PAYMENT': "未缴费",
  746. 'PROCESSING': "缴费中"
  747. }
  748. return template[val]
  749. }
  750. },
  751. mounted () {
  752. // 获取汇总数据
  753. getTeamStudentInfo({ musicGroupId: this.teamid }).then(res => {
  754. if (res.code == 200) {
  755. this.studentListInfo = res.data;
  756. }
  757. });
  758. this.getList();
  759. // 获取乐团内所有声部
  760. findSound({ musicGroupId: this.teamid }).then(res => {
  761. if (res.code == 200) {
  762. this.soundList = res.data;
  763. }
  764. })
  765. // getSubject().then(res => {
  766. // if (res.code == 200) {
  767. // this.soundList = res.data;
  768. // }
  769. // })
  770. // 获取乐团所有单技课班
  771. // getSingleClass({ musicGroupId: this.teamid }).then(res => {
  772. // if (res.code == 200) {
  773. // this.signList = res.data;
  774. // }
  775. // })
  776. // 获取乐团所有合奏课
  777. getMusicGroupAllClass({ musicGroupId: this.teamid }).then(res => {
  778. if (res.code == 200) {
  779. this.classList = res.data;
  780. res.data.forEach(item => {
  781. if (item.type == 'NORMAL') {
  782. this.signList.push(item);
  783. } else if (item.type == 'MIX') {
  784. this.mixList.push(item);
  785. } else if (item.type == 'HIGH') {
  786. this.highList.push(item)
  787. } else if (item.type == 'SNAP') {
  788. this.snapList.push(item);
  789. }
  790. })
  791. }
  792. })
  793. },
  794. methods: {
  795. onMusicGroupExport () {
  796. let url = '/api-web/export/musicGroupStudent'
  797. let data = {
  798. musicGroupId: this.teamid,
  799. studentStatus: this.searchForm.studentStatus || null,
  800. paymentStatus: this.searchForm.isPay || null,
  801. subjectId: this.searchForm.major || null,
  802. search: this.searchForm.search || null,
  803. isActive: this.searchForm.isActive || null,
  804. classGroupId: this.searchForm.classGroupId || null
  805. }
  806. const options = {
  807. method: 'get',
  808. headers: {
  809. 'Authorization': getToken()
  810. },
  811. url,
  812. params: data,
  813. responseType: 'blob'
  814. }
  815. this.$confirm('您确定导出学员列表?', '提示', {
  816. confirmButtonText: '确定',
  817. cancelButtonText: '取消',
  818. type: 'warning'
  819. }).then(() => {
  820. axios(options).then(res => {
  821. let blob = new Blob([res.data], {
  822. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
  823. type: 'application/vnd.ms-excel;charset=utf-8'
  824. // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  825. })
  826. let objectUrl = URL.createObjectURL(blob)
  827. let link = document.createElement("a")
  828. let fname = this.$route.query.name + '学员列表'
  829. link.href = objectUrl
  830. link.setAttribute("download", fname)
  831. document.body.appendChild(link)
  832. link.click()
  833. })
  834. }).catch(() => { })
  835. },
  836. search () {
  837. this.rules.page = 1;
  838. this.getList()
  839. },
  840. onCreateQRCode () { // 生成报名二维码
  841. this.qrcodeStatus = true
  842. let id = this.$route.query.id
  843. if (this.qrcodes) {
  844. this.qrcodes = false
  845. setTimeout(() => {
  846. this.qrcode = new QRCode('qrcode', {
  847. width: 200,
  848. height: 200,
  849. colorDark: '#000000',
  850. colorLight: '#ffffff',
  851. correctLevel: QRCode.CorrectLevel.H
  852. })
  853. this.qrcode.makeCode(vaildStudentUrl() + '/#/login?musicGroupId=' + id)
  854. this.codeUrl = vaildStudentUrl() + '/#/login?musicGroupId=' + id
  855. }, 500)
  856. }
  857. },
  858. getList () {
  859. let obj = {
  860. musicGroupId: this.teamid,
  861. page: this.rules.page,
  862. rows: this.rules.limit,
  863. studentStatus: this.searchForm.studentStatus || null,
  864. paymentStatus: this.searchForm.isPay || null,
  865. subjectId: this.searchForm.major || null,
  866. search: this.searchForm.search || null,
  867. isActive: this.searchForm.isActive || null,
  868. classGroupId: this.searchForm.classGroupId || null
  869. }
  870. getTeamStudentList(obj).then(res => {
  871. if (res.code == 200) {
  872. this.tableList = res.data.rows;
  873. this.rules.total = res.data.total
  874. }
  875. })
  876. },
  877. gotoSignin () {
  878. this.$router.push({
  879. path: '/business/studentSignin',
  880. query: {
  881. id: this.teamid,
  882. status: this.$route.query.status,
  883. name: this.$route.query.name,
  884. rules: this.Frules, search: this.Fsearch
  885. }
  886. })
  887. },
  888. chioseType () {
  889. this.$refs['quitForm'].validate(res => {
  890. if (res) {
  891. this.$confirm('确定退团?', '提示', {
  892. confirmButtonText: '确定',
  893. cancelButtonText: '取消',
  894. type: 'warning'
  895. }).then(() => {
  896. let row = this.activeRow;
  897. // 发请求 退团
  898. StudentQuit({ musicGroupId: this.teamid, userId: row.userId,
  899. reason: this.quitForm.reason,
  900. isRefundCourseFee: this.quitForm.isRefundCourseFee,
  901. isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
  902. isRefundTeachingAssistantsFee: this.quitForm.isRefundTeachingAssistantsFee }).then(res => {
  903. this.quitForm = { // 退团信息确认
  904. isRefundCourseFee: null,
  905. isRefundInstrumentFee: null,
  906. isRefundTeachingAssistantsFee: null,
  907. reason: ''
  908. }
  909. if (res.code == 200) {
  910. this.$message.success('退团成功')
  911. this.getList();
  912. this.quitVisible = false;
  913. }
  914. })
  915. }).catch(() => {
  916. });
  917. } else {
  918. }
  919. })
  920. // row.typeVisible = false;
  921. },
  922. //
  923. addStudent () {
  924. // 发请求添加学员
  925. this.$refs['maskForm'].validate(res => {
  926. if (res) {
  927. // this.maskForm.parentName.timer 少个生日的字段
  928. // classGroupId: maskForm.signClass
  929. /** <!-- signClass: '',
  930. mixClass: '',
  931. highClass: '',
  932. snapClass: [], --> */
  933. let maskForm = this.maskForm
  934. if (!maskForm.signClass && !maskForm.mixClass && !maskForm.highClass) {
  935. if (!maskForm.snapClass || !(maskForm.snapClass && maskForm.snapClass.length >= 1)) {
  936. this.$message.error('该学生必须加入一个班级')
  937. return;
  938. }
  939. }
  940. let snapClassIds;
  941. maskForm.snapClass ? snapClassIds = maskForm.snapClass.join(',') : snapClassIds = null
  942. let params = {
  943. signClassId: maskForm.signClass,
  944. mixClassId: maskForm.mixClass,
  945. snapClassIds,
  946. highClassId: maskForm.highClass,
  947. courseFee: maskForm.courseFee,
  948. temporaryCourseFee: maskForm.temporaryCourseFee,
  949. studentRegistration: {
  950. name: maskForm.studentName,
  951. gender: maskForm.sex,
  952. birthdate: maskForm.timer,
  953. parentsName: maskForm.parentName,
  954. parentsPhone: maskForm.phone,
  955. currentGrade: maskForm.startClass,
  956. currentClass: maskForm.course,
  957. subjectId: maskForm.sound,
  958. musicGroupId: this.teamid,
  959. }
  960. }
  961. params.studentPaymentOrderDetails = []
  962. if (maskForm.musicGoodsIdList) {
  963. params.studentPaymentOrderDetails.push({
  964. goodsIdList: maskForm.musicGoodsIdList,
  965. type: 'MUSICAL',
  966. price: maskForm.musicPrice
  967. })
  968. }
  969. if (maskForm.instrGoodsIdList && maskForm.instrGoodsIdList != '') {
  970. params.studentPaymentOrderDetails.push({
  971. goodsIdList: maskForm.instrGoodsIdList.join(','),
  972. type: 'ACCESSORIES',
  973. price: maskForm.instrPrice
  974. })
  975. }
  976. addStudent(params).then(res => {
  977. if (res.code == 200) {
  978. this.$message.success('添加学生成功');
  979. this.getList()
  980. this.addStudentVisible = false
  981. }
  982. this.$refs.maskForm.resetFields()
  983. })
  984. }
  985. })
  986. },
  987. onSoundChange (value) { // 学员声部切换时
  988. this.findSubjectPlan(value)
  989. this.getGoodsList(value, 'INSTRUMENT') // 乐器
  990. this.getGoodsList(value, 'ACCESSORIES') // 辅件
  991. },
  992. // 获取购买方式
  993. findSubjectPlan (subjectId) {
  994. findSubjectPlan({
  995. musicGroupId: this.teamid,
  996. subjectId: subjectId
  997. }).then(res => {
  998. let result = res.data
  999. if (res.code == 200) {
  1000. this.maskForm.musicMode = this.getBranchType(result.kitGroupPurchaseType)
  1001. }
  1002. })
  1003. },
  1004. getGoodsList (subjectId, type) {
  1005. getGoods({
  1006. subjectId: subjectId,
  1007. type: type
  1008. }).then(res => {
  1009. let result = res.data
  1010. if (res.code == 200) {
  1011. let tempArr = []
  1012. result.forEach(item => {
  1013. tempArr.push({
  1014. label: item.name,
  1015. value: item.id
  1016. })
  1017. })
  1018. if (type == 'ACCESSORIES') {
  1019. this.ACCESSORIESLIST = tempArr
  1020. }
  1021. if (type == 'INSTRUMENT') {
  1022. this.INSTRUMENTLIST = tempArr
  1023. }
  1024. }
  1025. })
  1026. },
  1027. getBranchType (status) {
  1028. let common = {
  1029. FREE: "免费",
  1030. GROUP: "团购",
  1031. LEASE: "租赁"
  1032. }
  1033. return common[status]
  1034. },
  1035. lookClass (row) {
  1036. this.classMask.studentName = row.realName;
  1037. getStudentClass({
  1038. musicGroupId: this.teamid,
  1039. teacherId: row.userId
  1040. }).then(res => {
  1041. if (res.code == 200) {
  1042. this.classList = res.data;
  1043. this.studentClassVisible = true;
  1044. }
  1045. })
  1046. },
  1047. quieTeamMask (row) {
  1048. this.activeRow = row;
  1049. this.quitVisible = true;
  1050. },
  1051. checkPhone (val) {
  1052. var regu = /^1[3456789]\d{9}$/;
  1053. var re = new RegExp(regu);
  1054. if (re.test(val)) {
  1055. getStudentInfoByPhone({ mobile: this.maskForm.phone }).then(res => {
  1056. if (res.code == 200) {
  1057. if (res.data) {
  1058. this.maskForm = {
  1059. studentName: res.data.name,
  1060. sex: res.data.gender,
  1061. parentName: res.data.parentsName,
  1062. course: res.data.currentClass,
  1063. startClass: res.data.currentGrade,
  1064. // sound: parseInt(res.data.subjectId),
  1065. phone: val,
  1066. timer: res.data.birthdate
  1067. }
  1068. /**
  1069. * name: maskForm.studentName,
  1070. gender: maskForm.sex,
  1071. parentsName: maskForm.parentName,
  1072. parentsPhone: maskForm.phone,
  1073. currentGrade: maskForm.startClass,
  1074. currentClass: maskForm.course,
  1075. subjectId: maskForm.sound,
  1076. musicGroupId: this.teamid,
  1077. */
  1078. /**
  1079. maskForm: {
  1080. studentName: '',
  1081. sex: '',
  1082. parentName: '',
  1083. course: '',
  1084. phone: '',
  1085. sound: '',
  1086. timer: '',
  1087. signClass: '',
  1088. // price: '',
  1089. startClass: '',
  1090. id: '',
  1091. courseFee: null, // 声部费用
  1092. temporaryCourseFee: null, // 本次课程费用
  1093. musicGoodsIdList: null, // 乐器商品编号
  1094. musicMode: null, // 乐器购买方式
  1095. musicPrice: null, // 乐器购买金额
  1096. instrGoodsIdList: [], // 辅件商品编号
  1097. instrPrice: null // 辅件购买金额
  1098. },
  1099. *
  1100. */
  1101. }
  1102. }
  1103. })
  1104. }
  1105. },
  1106. lockStudent (row) {
  1107. this.$confirm('是否锁定/解锁学生缴费周期?', '提示', {
  1108. confirmButtonText: '确定',
  1109. cancelButtonText: '取消',
  1110. type: 'warning'
  1111. }).then(() => {
  1112. let musicGroupId = this.teamid;
  1113. let studentId = row.userId;
  1114. let isLock;
  1115. row.isLock == 0 ? isLock = 1 : isLock = 0;
  1116. StudentFeeIsLock({ musicGroupId, studentId, isLock }).then(res => {
  1117. if (res.code == 200) {
  1118. this.$message.success('修改成功')
  1119. this.getList()
  1120. }
  1121. })
  1122. }).catch(() => {
  1123. });
  1124. },
  1125. resetPay (row) {
  1126. this.activeRow = row;
  1127. this.payVisible = true;
  1128. this.payForm.studentName = row.realName;
  1129. this.payForm.payMoney = row.courseFee;
  1130. this.payForm.payMonth = row.paymentPeriodList.split(',')
  1131. if (this.payForm.payMonth[0] == "") {
  1132. this.payForm.payMonth = []
  1133. }
  1134. },
  1135. submitPay () {
  1136. let studentId = this.activeRow.userId;
  1137. let musicGroupId = this.teamid;
  1138. let month = this.payForm.payMonth.join(',') || null;
  1139. let amount = this.payForm.payMoney;
  1140. let obj = {
  1141. studentId,
  1142. musicGroupId,
  1143. month,
  1144. amount
  1145. }
  1146. updateStudentFee(obj).then(res => {
  1147. if (res.code == 200) {
  1148. this.$message.success('修改成功')
  1149. this.payVisible = false;
  1150. this.getList();
  1151. }
  1152. })
  1153. },
  1154. closePayVisible () {
  1155. this.$refs['payForm'].resetFields();
  1156. this.payVisible = false;
  1157. }
  1158. }
  1159. }
  1160. </script>
  1161. <style lang="scss" scoped>
  1162. // .moreInput {
  1163. // width: 100%;
  1164. // display: flex;
  1165. // /deep/.el-form-item__content {
  1166. // display: flex;
  1167. // flex-direction: row;
  1168. // }
  1169. // }
  1170. .el-select {
  1171. width: 180px !important;
  1172. }
  1173. .headWrap {
  1174. padding: 20px 0;
  1175. }
  1176. /deep/.el-date-editor.el-input {
  1177. width: auto;
  1178. .el-input__inner {
  1179. padding-right: 0;
  1180. }
  1181. }
  1182. .studentInfo {
  1183. /deep/.el-dialog__body {
  1184. padding-top: 0;
  1185. padding-bottom: 0;
  1186. }
  1187. }
  1188. // .instrList {
  1189. // display: flex;
  1190. // /deep/.el-form-item__content {
  1191. // width: 80%;
  1192. // }
  1193. // .el-col {
  1194. // /deep/.el-form-item__content {
  1195. // width: 100%;
  1196. // }
  1197. // }
  1198. // }
  1199. .stu-container {
  1200. .topFrom {
  1201. margin: 20px 30px 0;
  1202. width: 1000px;
  1203. }
  1204. .newStudent {
  1205. width: 121px;
  1206. height: 40px;
  1207. background: rgba(20, 146, 138, 1);
  1208. border-radius: 4px;
  1209. color: #fff;
  1210. text-align: center;
  1211. line-height: 40px;
  1212. font-size: 14px;
  1213. cursor: pointer;
  1214. }
  1215. }
  1216. .left-code,
  1217. .right-code {
  1218. // width: 50%;
  1219. // float: left;
  1220. h2 {
  1221. display: block;
  1222. font-size: 18px;
  1223. text-align: center;
  1224. padding-bottom: 8px;
  1225. line-height: 1;
  1226. height: 30px;
  1227. margin-bottom: 0;
  1228. }
  1229. .qrcode {
  1230. display: flex;
  1231. justify-content: center;
  1232. img {
  1233. width: 200px;
  1234. height: 200px;
  1235. // margin: 0 auto;
  1236. }
  1237. }
  1238. .code-url {
  1239. font-size: 18px;
  1240. text-align: center;
  1241. padding: 15px 15px 0 15px;
  1242. }
  1243. }
  1244. .export {
  1245. background: #14928a;
  1246. }
  1247. </style>