studentList.vue 53 KB

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