studentList.vue 80 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583
  1. <template>
  2. <div class="stu-container">
  3. <!-- 头部展示 -->
  4. <!-- <statistic>
  5. <statistic-item>
  6. <span>在读人数</span>
  7. <span>{{ studentListInfo.studying }}</span>
  8. </statistic-item>
  9. <statistic-item>
  10. <span>退团人数</span>
  11. <span>{{ studentListInfo.quit }}</span>
  12. </statistic-item>
  13. <statistic-item>
  14. <span>新增人数</span>
  15. <span>{{ studentListInfo.add }}</span>
  16. </statistic-item>
  17. <statistic-item>
  18. <span>VIP&网管转化率</span>
  19. <span>{{ studentListInfo.courseRate }}</span>
  20. </statistic-item>
  21. </statistic> -->
  22. <!-- style="margin-bottom: 15px" -->
  23. <p
  24. style="margin-bottom: 15px; font-size: 16px; font-weight: 400"
  25. v-if="
  26. team_status == 'PAY' ||
  27. team_status == 'APPLY' ||
  28. (team_status == 'PROGRESS' && isCanReg) ||
  29. team_status == 'PREPARE'
  30. "
  31. >
  32. <span> 报名截止时间:{{ applyExpireDate | formatTimer }} </span>
  33. <span v-if="team_status != 'APPLY'">
  34. 缴费截止时间:{{ paymentExpireDate | formatTimer }}
  35. </span>
  36. </p>
  37. <div class="studentListWrap" v-if="team_status == 'PROGRESS'">
  38. <div
  39. class="newBand"
  40. v-permission="'studentRegistration/insertStudent'"
  41. @click="createStudentFrom"
  42. >
  43. 新增学员
  44. </div>
  45. <!-- 可以直接去学生考勤查看 -->
  46. <!-- <el-button type="primary" v-permission="'/studentSignin'"
  47. @click="gotoSignin">点名总览</el-button> -->
  48. <!-- <div
  49. class="newBand"
  50. v-permission="'studentManage/queryStudentSubTotalCourseTimes'"
  51. @click="viewTimer"
  52. style="margin-right: 15px"
  53. >
  54. 剩余时长明细
  55. </div> -->
  56. </div>
  57. <div
  58. style="display: flex; justify-content: space-between; align-items: center"
  59. v-if="
  60. team_status == 'PAY' ||
  61. team_status == 'APPLY' ||
  62. (team_status == 'PROGRESS' && isCanReg) ||
  63. team_status == 'PREPARE'
  64. "
  65. >
  66. <!-- <h2> -->
  67. <!-- + '报名详情' -->
  68. <!-- <el-page-header @back="onCancel" :content="teamName">
  69. </el-page-header> -->
  70. <!-- </h2> -->
  71. <div
  72. class="btnList"
  73. style="margin-bottom: 15px; font-size: 18px; font-weight: 400"
  74. >
  75. <!-- <div class='newBand close'
  76. v-permission="'musicGroup/cancelMusicGroup'"
  77. @click="onClose">停止乐团</div> v-show="status == 'APPLY'"-->
  78. <div
  79. class="newBand"
  80. @click="payStart"
  81. v-permission="'musicGroup/openPay'"
  82. v-if="team_status == 'APPLY'"
  83. >
  84. 开始缴费
  85. </div>
  86. <!-- v-show="status=='PAY'" -->
  87. <div
  88. class="newBand"
  89. v-permission="'musicGroup/found'"
  90. @click="onGoHome"
  91. v-if="team_status == 'APPLY' || team_status == 'PAY'"
  92. >
  93. 确认开团
  94. </div>
  95. <div
  96. class="newBand"
  97. v-permission="'musicGroup/extensionPayment'"
  98. @click="extendTime(true)"
  99. v-show="
  100. team_status == 'PAY' ||
  101. team_status == 'PROGRESS' ||
  102. team_status == 'PREPARE'
  103. "
  104. >
  105. 延长缴费
  106. </div>
  107. <div
  108. class="newBand"
  109. v-permission="'musicGroup/extensionApplyExpireDate'"
  110. @click="extendTime(false)"
  111. v-show="
  112. team_status == 'PAY' ||
  113. team_status == 'APPLY' ||
  114. team_status == 'PROGRESS' ||
  115. team_status == 'PREPARE'
  116. "
  117. >
  118. 延长报名
  119. </div>
  120. <div class="newBand" @click="onCreateQRCode('payment')">报名链接</div>
  121. <div class="newBand" @click="onCreateQRCode('detail')">
  122. 报名缴费详情
  123. </div>
  124. <div
  125. class="newBand"
  126. v-permission="'musicGroup/addMusicGroupRegs'"
  127. @click="mergeVisible = true"
  128. v-show="team_status == 'PAY' || team_status == 'APPLY'"
  129. >
  130. 合并学员
  131. </div>
  132. <div
  133. v-if="team_status == 'APPLY'"
  134. v-permission="'studentRegistration/openPayment'"
  135. class="newBand"
  136. style="background-color: #14928a; border: 1px solid #14928a"
  137. @click="onPartPayment"
  138. type="primary"
  139. >
  140. 提前开启缴费
  141. </div>
  142. <el-popover placement="bottom" width="800" trigger="hover">
  143. <div>
  144. <el-table
  145. style="width: 100% !important"
  146. :data="leftList"
  147. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  148. >
  149. <el-table-column
  150. label="乐团声部"
  151. prop="subjectName"
  152. align="center"
  153. >
  154. </el-table-column>
  155. <el-table-column
  156. label="计划招生"
  157. prop="expectedStudentNum"
  158. align="center"
  159. >
  160. <template slot-scope="scope">
  161. <div>
  162. <p v-show="!isEdit">{{ scope.row.expectedStudentNum }}</p>
  163. <el-input
  164. v-show="isEdit"
  165. v-model.trim="scope.row.expectedStudentNum"
  166. ></el-input>
  167. </div>
  168. </template>
  169. </el-table-column>
  170. <el-table-column
  171. label="已报名"
  172. prop="applyStudentNum"
  173. align="center"
  174. >
  175. </el-table-column>
  176. <el-table-column label="已缴费" prop="payNum" align="center">
  177. </el-table-column>
  178. </el-table>
  179. <div
  180. class="btnWrap"
  181. v-permission="'musicGroup/updateExpectedStudentNum'"
  182. style="margin-right: 20px; margin-top: 20px"
  183. >
  184. <el-button v-show="!isEdit" @click="isEdit = true"
  185. >编辑</el-button
  186. >
  187. <el-button v-show="isEdit" @click="saveIsEdit">保存</el-button>
  188. </div>
  189. </div>
  190. <!-- <auth :auths="'studentRegistration/openPayment'">
  191. <el-button
  192. style="background-color: #14928a; border: 1px solid #14928a"
  193. @click="onPartPayment"
  194. type="primary"
  195. >开启缴费</el-button
  196. >
  197. </auth> -->
  198. <div class="newBand" style="margin-bottom: 10px" slot="reference">
  199. 声部报名计划
  200. </div>
  201. </el-popover>
  202. <div
  203. class="newBand"
  204. style="
  205. background-color: #f97215;
  206. border: 1px solid #f97215;
  207. margin-left: 15px;
  208. "
  209. @click="onCreateQRCode('rePayment')"
  210. >
  211. 报名链接(无乐器)
  212. </div>
  213. </div>
  214. </div>
  215. <!-- v-if="
  216. team_status == 'PAY' ||
  217. team_status == 'PROGRESS' ||
  218. team_status == 'PREPARE'
  219. " -->
  220. <!-- 搜索类型 -->
  221. <save-form
  222. ref="searchForm"
  223. :inline="true"
  224. :save-key="saveKey"
  225. class="searchForm"
  226. @submit="search"
  227. @reset="onReSet"
  228. :model="searchForm"
  229. >
  230. <el-form-item prop="search">
  231. <el-input
  232. v-model.trim="searchForm.search"
  233. clearable
  234. placeholder="学生姓名或电话"
  235. @keyup.enter.native="search"
  236. ></el-input>
  237. </el-form-item>
  238. <el-form-item prop="studentStatus">
  239. <el-select
  240. v-model.trim="searchForm.studentStatus"
  241. clearable
  242. filterable
  243. placeholder="学员状态"
  244. >
  245. <el-option label="在读" value="NORMAL"></el-option>
  246. <el-option label="请假" value="LEAVE"></el-option>
  247. <el-option label="退团" value="QUIT"></el-option>
  248. <el-option label="报名" value="APPLY"></el-option>
  249. </el-select>
  250. </el-form-item>
  251. <el-form-item prop="createYear">
  252. <el-date-picker
  253. v-model="searchForm.createYear"
  254. type="year"
  255. value-format="yyyy"
  256. placeholder="选择入团年份"
  257. >
  258. </el-date-picker>
  259. </el-form-item>
  260. <el-form-item prop="currentGrade">
  261. <!-- <el-input
  262. v-model.trim="searchForm.currentGrade"
  263. clearable
  264. placeholder="学员年级"
  265. ></el-input> -->
  266. <el-select
  267. v-model.trim="searchForm.currentGrade"
  268. filterable
  269. clearable
  270. placeholder="请输入年级"
  271. >
  272. <el-option
  273. v-for="(item, index) in gradeList"
  274. :key="index"
  275. :label="item.label"
  276. :value="item.label"
  277. ></el-option>
  278. </el-select>
  279. </el-form-item>
  280. <el-form-item prop="classGroupId">
  281. <el-select
  282. v-model.trim="searchForm.classGroupId"
  283. clearable
  284. filterable
  285. placeholder="请选择班级"
  286. >
  287. <el-option
  288. v-for="(item, index) in classList"
  289. :key="index"
  290. :value="item.id"
  291. :label="item.name"
  292. ></el-option>
  293. </el-select>
  294. </el-form-item>
  295. <el-form-item prop="major">
  296. <el-select
  297. v-model.trim="searchForm.major"
  298. clearable
  299. filterable
  300. placeholder="所选专业"
  301. >
  302. <el-option
  303. v-for="(item, index) in soundList"
  304. :key="index"
  305. :value="item.id"
  306. :label="item.name"
  307. ></el-option>
  308. </el-select>
  309. </el-form-item>
  310. <el-form-item prop="isPay">
  311. <el-select
  312. v-model.trim="searchForm.isPay"
  313. clearable
  314. filterable
  315. placeholder="报名缴费"
  316. >
  317. <el-option label="未开启缴费" value="0"></el-option>
  318. <el-option label="开启缴费" value="1"></el-option>
  319. <el-option label="已缴费" value="2"></el-option>
  320. </el-select>
  321. </el-form-item>
  322. <el-form-item prop="oweFlag">
  323. <el-select
  324. v-model.trim="searchForm.oweFlag"
  325. clearable
  326. filterable
  327. placeholder="是否欠费"
  328. >
  329. <el-option label="否" value="0"></el-option>
  330. <el-option label="是" value="1"></el-option>
  331. </el-select>
  332. </el-form-item>
  333. <el-form-item prop="isActive">
  334. <el-select
  335. v-model.trim="searchForm.isActive"
  336. clearable
  337. filterable
  338. placeholder="是否激活"
  339. >
  340. <el-option label="是" value="1"></el-option>
  341. <el-option label="否" value="0"></el-option>
  342. </el-select>
  343. </el-form-item>
  344. <el-form-item prop="hasCourse">
  345. <el-select
  346. v-model.trim="searchForm.hasCourse"
  347. clearable
  348. placeholder="VIP/网管是否有课"
  349. >
  350. <el-option label="是" value="true"></el-option>
  351. <el-option label="否" value="false"></el-option>
  352. </el-select>
  353. </el-form-item>
  354. <el-form-item prop="carePackage">
  355. <el-select
  356. class="multiple"
  357. v-model.trim="searchForm.carePackage"
  358. clearable
  359. placeholder="关心包"
  360. >
  361. <el-option label="不可用" :value="0"></el-option>
  362. <el-option label="可用" :value="1"></el-option>
  363. <el-option label="已使用" :value="2"></el-option>
  364. </el-select>
  365. </el-form-item>
  366. <el-form-item prop="comeOnPackage">
  367. <el-select
  368. class="multiple"
  369. v-model.trim="searchForm.comeOnPackage"
  370. clearable
  371. placeholder="加油包"
  372. >
  373. <el-option label="不可用" :value="0"></el-option>
  374. <el-option label="可用" :value="1"></el-option>
  375. <el-option label="已使用" :value="2"></el-option>
  376. </el-select>
  377. </el-form-item>
  378. <el-form-item>
  379. <el-button native-type="submit" type="danger">搜索</el-button>
  380. <el-button type="primary" native-type="reset">重置</el-button>
  381. <el-button
  382. type="primary"
  383. v-permission="'export/musicGroupStudent'"
  384. @click="onMusicGroupExport"
  385. >导出</el-button
  386. >
  387. </el-form-item>
  388. </save-form>
  389. <div style="font-size: 14px; color: #f85043; padding-bottom: 10px">
  390. 在读人数:{{ studentListInfo.studying
  391. }}<i style="width: 10px; display: inline-block"></i> 退团人数:{{
  392. studentListInfo.quit
  393. }}<i style="width: 10px; display: inline-block"></i> VIP&网管转化率:{{
  394. studentListInfo.courseRate
  395. }}<i style="width: 10px; display: inline-block"></i>
  396. </div>
  397. <!-- 列表 -->
  398. <div class="tableWrap">
  399. <el-table
  400. :data="tableList"
  401. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  402. @selection-change="handleSelectionChange"
  403. >
  404. <el-table-column
  405. type="selection"
  406. width="55"
  407. :selectable="checkboxSelect"
  408. ></el-table-column>
  409. <el-table-column label="学员编号" width="120px;" prop="userId">
  410. <template slot-scope="scope">
  411. <copy-text>
  412. {{ scope.row.userId }}
  413. </copy-text>
  414. </template>
  415. </el-table-column>
  416. <el-table-column label="学员姓名" width="120px;" prop="realName">
  417. <template slot-scope="scope">
  418. <copy-text>
  419. {{ scope.row.realName }}
  420. </copy-text>
  421. </template>
  422. </el-table-column>
  423. <el-table-column
  424. align="center"
  425. prop="gender"
  426. width="50px;"
  427. label="性别"
  428. >
  429. <template slot-scope="scope">
  430. <div>{{ scope.row.gender | sex }}</div>
  431. </template>
  432. </el-table-column>
  433. <el-table-column align="center" prop="phone" label="联系电话">
  434. <template slot-scope="scope">
  435. <copy-text>
  436. {{ scope.row.phone }}
  437. </copy-text>
  438. </template>
  439. </el-table-column>
  440. <el-table-column align="center" label="入团年份">
  441. <template slot-scope="scope">
  442. <div>{{ scope.row.registerTime | dayjsFormat("YYYY年") }}</div>
  443. </template>
  444. </el-table-column>
  445. <el-table-column align="center" label="年级班级">
  446. <template slot-scope="scope">
  447. <div>{{ scope.row.currentGrade + scope.row.currentClass }}</div>
  448. </template>
  449. </el-table-column>
  450. <el-table-column align="center" label="报名专业" prop="subjectName">
  451. <template slot-scope="scope">
  452. <copy-text>
  453. {{ scope.row.regSubjectName }}
  454. </copy-text>
  455. </template>
  456. </el-table-column>
  457. <el-table-column align="center" label="入团专业" prop="subjectName">
  458. <template slot-scope="scope">
  459. <copy-text>
  460. {{ scope.row.subjectName }}
  461. </copy-text>
  462. </template>
  463. </el-table-column>
  464. <el-table-column align="center" prop="studentStatus" label="学员状态">
  465. <template slot-scope="scope">
  466. <div>{{ scope.row.studentStatus | musicGroupStudentType }}</div>
  467. </template>
  468. </el-table-column>
  469. <!-- <el-table-column align="center" label="新增学员">
  470. <template slot-scope="scope">
  471. <div>{{ scope.row.isNewStudent | yesOrNo }}</div>
  472. </template>
  473. </el-table-column> -->
  474. <el-table-column align="center" label="报名缴费">
  475. <template slot-scope="scope">
  476. <div>{{ scope.row.paymentStatus | paymentStatus }}</div>
  477. </template>
  478. </el-table-column>
  479. <el-table-column align="center" label="是否激活">
  480. <template slot-scope="scope">
  481. <div>{{ scope.row.isActive ? "是" : "否" }}</div>
  482. </template>
  483. </el-table-column>
  484. <el-table-column align="center" label="VIP/网管是否有课">
  485. <template slot-scope="scope">
  486. <div>{{ scope.row.hasCourse ? "是" : "否" }}</div>
  487. </template>
  488. </el-table-column>
  489. <el-table-column align="center" label="关心包">
  490. <template slot-scope="scope">{{
  491. scope.row.carePackage | studentPackage
  492. }}</template>
  493. </el-table-column>
  494. <el-table-column align="center" label="加油包">
  495. <template slot-scope="scope">{{
  496. scope.row.comeOnPackage | studentPackage
  497. }}</template>
  498. </el-table-column>
  499. <el-table-column align="center" label="欠费金额(元)">
  500. <template slot-scope="scope">
  501. <div :class="[scope.row.noPaymentAmount > 0 ? 'error' : null]">
  502. {{ scope.row.noPaymentAmount | moneyFormat }}
  503. <!-- musicGroupPaymentCalenderDetail/queryPage/studentList -->
  504. <auth
  505. auths="musicGroupPaymentCalenderDetail/queryPage/studentList"
  506. :router="['/teamLists']"
  507. >
  508. <i
  509. style="color: #14928a; font-size: 17px"
  510. title="缴费记录"
  511. class="el-icon-view"
  512. @click="onPaymentDetail(scope.row)"
  513. ></i>
  514. </auth>
  515. </div>
  516. </template>
  517. </el-table-column>
  518. <el-table-column label="退团原因" align="center">
  519. <template slot-scope="scope">
  520. <div>
  521. <Tooltip :content="scope.row.quitReason" />
  522. </div>
  523. </template>
  524. </el-table-column>
  525. <el-table-column
  526. align="center"
  527. fixed="right"
  528. width="360px;"
  529. label="操作"
  530. >
  531. <template slot-scope="scope">
  532. <div>
  533. <el-button
  534. type="text"
  535. v-if="
  536. permission('studentManage/queryStudentClassGroup') &&
  537. scope.row.studentStatus != 'QUIT'
  538. "
  539. @click="lookClass(scope.row)"
  540. >查看班级</el-button
  541. >
  542. <el-button
  543. type="text"
  544. v-if="
  545. permission('musicGroupPaymentCalender/add') &&
  546. scope.row.studentStatus == 'APPLY' &&
  547. scope.row.paymentStatus != '2' &&
  548. team_status == 'PROGRESS'
  549. "
  550. @click="addPay(scope.row)"
  551. >添加缴费</el-button
  552. >
  553. <el-button
  554. type="text"
  555. v-if="
  556. permission('musicGroupQuit/directQuitMusicGroup2') &&
  557. scope.row.studentStatus != 'QUIT'
  558. "
  559. @click="quieTeamMask(scope.row)"
  560. >退团退费</el-button
  561. >
  562. <el-button
  563. type="text"
  564. v-if="
  565. permission('musicGroupQuit/directQuitMusicGroup3') &&
  566. scope.row.studentStatus != 'QUIT'
  567. "
  568. @click="quieTeam(scope.row)"
  569. >退团</el-button
  570. >
  571. <el-button
  572. type="text"
  573. v-if="permission('visit/add/teamStudentList')"
  574. @click="addVisit(scope.row)"
  575. >新增回访</el-button
  576. >
  577. <auth :auths="'studentRegistration/batchUpdateSubject'">
  578. <el-button
  579. type="text"
  580. v-show="
  581. (team_status == 'PAY' || team_status == 'APPLY') &&
  582. scope.row.paymentStatus != 2 &&
  583. isShowResSound() &&
  584. scope.row.studentStatus != 'QUIT'
  585. "
  586. @click="resetSubject(scope.row)"
  587. >修改专业</el-button
  588. >
  589. </auth>
  590. <!-- APPLY status == "APPLY" || s-->
  591. <el-popover
  592. v-show="scope.row.remark"
  593. placement="top-start"
  594. title="备注"
  595. width="200"
  596. trigger="hover"
  597. :content="scope.row.remark"
  598. >
  599. <el-button type="text" slot="reference">备注</el-button>
  600. </el-popover>
  601. <!-- PAY -->
  602. <!-- && status == "PAY"-->
  603. <auth
  604. :auths="'studentRegistration/queryFeeDetail'"
  605. v-show="scope.row.paymentStatus == 2"
  606. >
  607. <el-button type="text" @click="lookdetail(scope.row)"
  608. >查看</el-button
  609. >
  610. </auth>
  611. <auth
  612. :auths="'subjectChange/getStudentOriginal'"
  613. v-show="
  614. (team_status == 'PAY' || team_status == 'APPLY') &&
  615. scope.row.paymentStatus == 2 &&
  616. isShowResSound() &&
  617. scope.row.studentStatus != 'QUIT'
  618. "
  619. >
  620. <el-button type="text" @click="openChangeVoice(scope.row)"
  621. >更改声部</el-button
  622. >
  623. </auth>
  624. </div>
  625. </template>
  626. </el-table-column>
  627. </el-table>
  628. <pagination
  629. :save-key="saveKey"
  630. sync
  631. :total.sync="rules.total"
  632. :page.sync="rules.page"
  633. :limit.sync="rules.limit"
  634. :page-sizes="rules.page_size"
  635. @pagination="getList"
  636. />
  637. </div>
  638. <el-dialog
  639. title="新增学员"
  640. width="700px"
  641. class="studentInfo"
  642. :visible.sync="addStudentVisible"
  643. >
  644. <el-form
  645. :model="maskForm"
  646. label-position="right"
  647. label-width="120px"
  648. ref="maskForm"
  649. :rules="maskRules"
  650. :inline="true"
  651. >
  652. <el-alert title="基本信息" :closable="false" class="alert" type="info">
  653. </el-alert>
  654. <el-form-item
  655. label="联系电话"
  656. prop="phone"
  657. :rules="[
  658. { required: true, message: '请输入手机号' },
  659. {
  660. pattern: /^1[3456789]\d{9}$/,
  661. message: '请输入正确的手机号',
  662. trigger: 'blur',
  663. },
  664. ]"
  665. >
  666. <el-input
  667. v-model.trim="maskForm.phone"
  668. placeholder="联系电话"
  669. @blur="checkPhone(maskForm.phone)"
  670. ></el-input>
  671. </el-form-item>
  672. <el-form-item label="学员姓名" prop="studentName">
  673. <el-input
  674. v-model.trim="maskForm.studentName"
  675. placeholder="学员姓名"
  676. ></el-input>
  677. </el-form-item>
  678. <el-form-item label="学员性别" prop="sex">
  679. <el-select v-model.trim="maskForm.sex" clearable>
  680. <el-option label="男" :value="1"></el-option>
  681. <el-option label="女" :value="0"></el-option>
  682. </el-select>
  683. </el-form-item>
  684. <el-form-item label="家长姓名" prop="parentName">
  685. <el-input
  686. v-model.trim="maskForm.parentName"
  687. placeholder="家长姓名"
  688. ></el-input>
  689. </el-form-item>
  690. <el-form-item label="年级" prop="currentGradeNum">
  691. <el-select
  692. placeholder="起始年级"
  693. filterable
  694. clearable
  695. v-model.trim="maskForm.currentGradeNum"
  696. >
  697. <el-option
  698. v-for="item in gradeList"
  699. :key="item.value"
  700. :label="item.label"
  701. :value="item.value"
  702. ></el-option>
  703. <!-- <el-option value="一年级" label="一年级"></el-option>
  704. <el-option value="二年级" label="二年级"></el-option>
  705. <el-option value="三年级" label="三年级"></el-option>
  706. <el-option value="四年级" label="四年级"></el-option>
  707. <el-option value="五年级" label="五年级"></el-option>
  708. <el-option value="六年级" label="六年级"></el-option>
  709. <el-option value="初一" label="初一"></el-option>
  710. <el-option value="初二" label="初二"></el-option>
  711. <el-option value="初三" label="初三"></el-option>
  712. <el-option value="高一" label="高一"></el-option>
  713. <el-option value="高二" label="高二"></el-option>
  714. <el-option value="高三" label="高三"></el-option> -->
  715. </el-select>
  716. </el-form-item>
  717. <el-form-item label="班级" prop="course">
  718. <el-input
  719. v-model.trim="maskForm.course"
  720. placeholder="班级"
  721. ></el-input>
  722. </el-form-item>
  723. <el-form-item label="学员声部" prop="sound">
  724. <el-select
  725. v-model.trim="maskForm.sound"
  726. clearable
  727. filterable
  728. @change="onSoundChange"
  729. >
  730. <el-option
  731. v-for="(item, index) in soundList"
  732. :key="index"
  733. :value="item.id"
  734. :label="item.name"
  735. ></el-option>
  736. </el-select>
  737. </el-form-item>
  738. <!-- <el-form-item label="证件号"
  739. prop="id">
  740. <el-input v-model.trim="maskForm.id"></el-input>
  741. </el-form-item>-->
  742. <el-form-item label="出生日期" style="margin-right: 0" prop="timer">
  743. <el-col :span="24">
  744. <el-date-picker
  745. v-model.trim="maskForm.timer"
  746. value-format="yyyy-MM-dd"
  747. type="date"
  748. :picker-options="{
  749. firstDayOfWeek: 1,
  750. }"
  751. placeholder="选择日期"
  752. ></el-date-picker>
  753. </el-col>
  754. </el-form-item>
  755. </el-form>
  756. <div slot="footer" class="dialog-footer">
  757. <!-- <el-button @click="addStudentVisible = false">取 消</el-button> -->
  758. <el-button type="primary" @click="addStudent">确 定</el-button>
  759. </div>
  760. </el-dialog>
  761. <el-dialog
  762. title="学员所在班级"
  763. width="640px"
  764. :visible.sync="studentClassVisible"
  765. >
  766. <el-form :model="classMask">
  767. <el-form-item label="学生姓名">{{
  768. classMask.studentName
  769. }}</el-form-item>
  770. <el-form-item
  771. label="所在班级"
  772. v-for="(item, index) in classLists"
  773. :key="index"
  774. >{{ item.name }}</el-form-item
  775. >
  776. </el-form>
  777. </el-dialog>
  778. <!-- 退团弹窗 -->
  779. <el-dialog title="退团信息确认" width="640px" :visible.sync="quitVisible">
  780. <el-form :model="quitForm" ref="quitForm" :rules="quitRules">
  781. <el-form-item label="退还课程费用" prop="isRefundCourseFee">
  782. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="true"
  783. >是</el-radio
  784. >
  785. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="false"
  786. >否</el-radio
  787. >
  788. </el-form-item>
  789. <el-form-item label="退还乐器费用" prop="isRefundInstrumentFee">
  790. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="true"
  791. >是</el-radio
  792. >
  793. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="false"
  794. >否</el-radio
  795. >
  796. </el-form-item>
  797. <el-form-item label="退还教辅费用" prop="isRefundTeachingAssistantsFee">
  798. <el-radio
  799. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  800. :label="true"
  801. >是</el-radio
  802. >
  803. <el-radio
  804. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  805. :label="false"
  806. >否</el-radio
  807. >
  808. </el-form-item>
  809. <el-form-item label="退团原因" prop="reason">
  810. <el-input type="textarea" v-model.trim="quitForm.reason"></el-input>
  811. </el-form-item>
  812. </el-form>
  813. <span slot="footer" class="dialog-footer question">
  814. <div>
  815. <el-popover placement="right" width="500" trigger="click">
  816. <div class="popoverWrap">
  817. <p>乐团退团退费规则:</p>
  818. <p>退还课程费用:缴费总额-已结束课时单价之和</p>
  819. <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
  820. <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
  821. </div>
  822. <el-button
  823. type="text"
  824. icon="el-icon-question"
  825. slot="reference"
  826. style="color: red"
  827. >退团退费说明</el-button
  828. >
  829. </el-popover>
  830. </div>
  831. <div>
  832. <el-button @click="quitVisible = false">取 消</el-button>
  833. <el-button type="primary" @click="chioseType">确 定</el-button>
  834. </div>
  835. </span>
  836. </el-dialog>
  837. <el-dialog title="报名二维码" :visible.sync="qrcodeStatus" width="300px">
  838. <div class="left-code">
  839. <h2>学员报名连接</h2>
  840. <div id="qrcode" class="qrcode code" ref="qrCodeUrl"></div>
  841. <p class="code-url" v-if="codeUrl">{{ codeUrl }}</p>
  842. </div>
  843. </el-dialog>
  844. <el-dialog :visible.sync="timesVisible" title="查看剩余可排课时长">
  845. <times-view v-if="timesVisible" @close="timesVisible = false" />
  846. </el-dialog>
  847. <el-dialog
  848. title="修改缴费周期"
  849. :before-close="closePayVisible"
  850. width="600px"
  851. :visible.sync="payVisible"
  852. >
  853. <el-form :model="payForm" ref="payForm" :inline="true">
  854. <el-form-item label="学生姓名" prop="studentName">
  855. <el-input v-model.trim="payForm.studentName" disabled></el-input>
  856. </el-form-item>
  857. <br />
  858. <el-form-item label="缴费金额" prop="payMoney">
  859. <el-input
  860. type="number"
  861. v-model.trim="payForm.payMoney"
  862. @mousewheel.native.prevent
  863. ></el-input>
  864. </el-form-item>
  865. <el-form-item label="缴费月份" prop="payMonth">
  866. <el-checkbox-group
  867. v-model.trim="payForm.payMonth"
  868. fill="#14928A"
  869. text-color="#474747"
  870. >
  871. <el-checkbox label="1">一月</el-checkbox>
  872. <el-checkbox label="2">二月</el-checkbox>
  873. <el-checkbox label="3">三月</el-checkbox>
  874. <el-checkbox label="4">四月</el-checkbox>
  875. <el-checkbox label="5">五月</el-checkbox>
  876. <el-checkbox label="6">六月</el-checkbox>
  877. <el-checkbox label="7">七月</el-checkbox>
  878. <el-checkbox label="8">八月</el-checkbox>
  879. <el-checkbox label="9">九月</el-checkbox>
  880. <el-checkbox label="10">十月</el-checkbox>
  881. <el-checkbox label="11">十一月</el-checkbox>
  882. <el-checkbox label="12">十二月</el-checkbox>
  883. </el-checkbox-group>
  884. </el-form-item>
  885. <!-- studentName: '',
  886. payMoney: '',
  887. payMonth-->
  888. </el-form>
  889. <div slot="footer" class="dialog-footer">
  890. <el-button @click="quitVisible = false">取 消</el-button>
  891. <el-button type="primary" @click="submitPay">确 定</el-button>
  892. </div>
  893. </el-dialog>
  894. <el-dialog
  895. title="新增回访"
  896. width="500px"
  897. destroy-on-close
  898. :close-on-click-modal="false"
  899. :visible.sync="visitVisiable"
  900. >
  901. <visit
  902. v-if="visitVisiable && detail"
  903. :detail="detail"
  904. @close="visitVisiable = false"
  905. @submited="getList"
  906. />
  907. </el-dialog>
  908. <el-dialog
  909. title="选择班级"
  910. destroy-on-close
  911. width="700px"
  912. :visible.sync="createUserPayVisible"
  913. >
  914. <createUserPay
  915. :signList="signList"
  916. :mixList="mixList"
  917. :highList="highList"
  918. :snapList="snapList"
  919. :musicGroupId="this.teamid"
  920. :organizationCourseUnitPriceSettings="
  921. organizationCourseUnitPriceSettings
  922. "
  923. :createdUserId="createdUserId"
  924. :baseInfo="baseInfo"
  925. @submited="getList"
  926. @close="createUserPayVisible = false"
  927. />
  928. </el-dialog>
  929. <el-dialog
  930. title="缴费记录"
  931. width="900px"
  932. :visible.sync="paymentDetailVisible"
  933. >
  934. <payment-list
  935. v-if="paymentDetailVisible"
  936. :paymentDetail="paymentDetail"
  937. @close="paymentDetailVisible = false"
  938. />
  939. </el-dialog>
  940. <el-dialog title="选择合并乐团" :visible.sync="mergeVisible" width="950px">
  941. <mergeMusic
  942. v-if="mergeVisible"
  943. style="padding: 0 20px"
  944. :organId="organId"
  945. @close="mergeVisible = false"
  946. @submited="getList"
  947. />
  948. </el-dialog>
  949. <el-dialog
  950. title="开始缴费"
  951. :visible.sync="paymentStatus"
  952. width="400px"
  953. destroy-on-close
  954. >
  955. <el-form
  956. ref="paymentForm"
  957. class="paymentForm"
  958. :model="paymentForm"
  959. :rules="paymentRules"
  960. >
  961. <el-form-item label="请设置缴费截止日期" prop="paymentExpireDate">
  962. <el-date-picker
  963. v-model.trim="paymentForm.paymentExpireDate"
  964. type="date"
  965. value-format="yyyy-MM-dd"
  966. :picker-options="payDate()"
  967. style="width: 100%"
  968. placeholder="选择日期"
  969. >
  970. </el-date-picker>
  971. </el-form-item>
  972. </el-form>
  973. <div slot="footer" class="dialog-footer">
  974. <el-button @click="paymentStatus = false">取 消</el-button>
  975. <el-button type="primary" @click="onStartPayment('paymentForm')"
  976. >确 定</el-button
  977. >
  978. </div>
  979. </el-dialog>
  980. <el-dialog
  981. :title="!isPay ? '延长报名' : '延长缴费'"
  982. :visible.sync="extendPaymentStatus"
  983. destroy-on-close
  984. width="400px"
  985. >
  986. <el-form :model="extendForm" ref="extendForm" :rules="extendRule">
  987. <el-form-item v-if="isPay" label="延长缴费时间" prop="expireDate">
  988. <el-date-picker
  989. v-model.trim="extendForm.expireDate"
  990. value-format="yyyy-MM-dd"
  991. type="date"
  992. :picker-options="{
  993. firstDayOfWeek: 1,
  994. }"
  995. placeholder="选择日期"
  996. >
  997. </el-date-picker>
  998. </el-form-item>
  999. <el-form-item label="延长报名时间" v-else prop="expireDate">
  1000. <el-date-picker
  1001. v-model.trim="extendForm.expireDate"
  1002. value-format="yyyy-MM-dd"
  1003. type="date"
  1004. :picker-options="applyDate"
  1005. placeholder="选择日期"
  1006. >
  1007. </el-date-picker>
  1008. </el-form-item>
  1009. </el-form>
  1010. <div slot="footer" class="dialog-footer">
  1011. <el-button @click="extendPaymentStatus = false">取 消</el-button>
  1012. <el-button
  1013. type="primary"
  1014. v-if="isPay"
  1015. @click="onExtendPayment('extendForm', isPay)"
  1016. >确 定</el-button
  1017. >
  1018. <el-button
  1019. v-else
  1020. type="primary"
  1021. @click="onExtendPayment('extendForm', isPay)"
  1022. >确 定</el-button
  1023. >
  1024. </div>
  1025. </el-dialog>
  1026. <qr-code v-model="codeStatus" :title="codeTitle" :codeUrl="qrCodeUrl" />
  1027. <el-dialog
  1028. title="更改声部"
  1029. :visible.sync="changeVoiceVisible"
  1030. @close="closeChangeVoice"
  1031. v-if="changeVoiceVisible"
  1032. width="600px"
  1033. >
  1034. <changeVoice
  1035. @close="closeChangeVoice"
  1036. @submited="getList"
  1037. :detail.sync="rowDetail"
  1038. :musicGroupId="teamid"
  1039. :voiceList="leftList"
  1040. />
  1041. </el-dialog>
  1042. <el-dialog
  1043. title="订单详情"
  1044. :visible.sync="orderVisible"
  1045. width="600px"
  1046. v-if="orderVisible"
  1047. >
  1048. <el-form :model="orderForm" :inline="true">
  1049. <!-- name: '',
  1050. totalAmount: '',
  1051. subject: '',
  1052. subjectFee: '',
  1053. axe: '',
  1054. axePrice: '',
  1055. others: '',
  1056. othersPrice: '' -->
  1057. <el-form-item label="学员姓名">
  1058. <el-input v-model.trim="orderForm.name" disabled=""></el-input>
  1059. </el-form-item>
  1060. <el-form-item label="实缴金额">
  1061. <el-input v-model.trim="orderForm.totalAmount" disabled=""></el-input>
  1062. </el-form-item>
  1063. <el-form-item label="实际专业">
  1064. <el-input v-model.trim="orderForm.subject" disabled=""></el-input>
  1065. </el-form-item>
  1066. <el-form-item label="课程费用">
  1067. <el-input v-model.trim="orderForm.subjectFee" disabled=""></el-input>
  1068. </el-form-item>
  1069. <el-form-item label="选择乐器">
  1070. <el-input v-model.trim="orderForm.axe" disabled=""></el-input>
  1071. </el-form-item>
  1072. <el-form-item label="乐器价格">
  1073. <el-input v-model.trim="orderForm.axePrice" disabled=""></el-input>
  1074. </el-form-item>
  1075. <el-form-item label="教辅组合">
  1076. <el-input v-model.trim="orderForm.others" disabled=""></el-input>
  1077. </el-form-item>
  1078. <el-form-item label="组合价格">
  1079. <el-input v-model.trim="orderForm.othersPrice" disabled=""></el-input>
  1080. </el-form-item>
  1081. </el-form>
  1082. <div slot="footer" class="dialog-footer">
  1083. <!-- <el-button>取 消</el-button> -->
  1084. <el-button type="primary" @click="orderVisible = false"
  1085. >确 定</el-button
  1086. >
  1087. </div>
  1088. </el-dialog>
  1089. <el-dialog title="修改专业" :visible.sync="subjectVisible" width="400px">
  1090. <el-form :model="maskSoundForm">
  1091. <el-form-item label="选择专业">
  1092. <el-select v-model.trim="maskSoundForm.subject" filterable clearable>
  1093. <el-option
  1094. v-for="(item, index) in soundList"
  1095. :key="index"
  1096. :label="item.name"
  1097. :value="item.id"
  1098. ></el-option>
  1099. </el-select>
  1100. </el-form-item>
  1101. </el-form>
  1102. <div slot="footer" class="dialog-footer">
  1103. <el-button @click="subjectVisible = false">取 消</el-button>
  1104. <el-button type="primary" @click="okReset">确 定</el-button>
  1105. </div>
  1106. </el-dialog>
  1107. </div>
  1108. </template>
  1109. <script>
  1110. import {
  1111. getTeamStudentList,
  1112. getTeamStudentInfo,
  1113. findSound,
  1114. StudentQuit,
  1115. findSubjectPlan,
  1116. getGoods,
  1117. getMusicGroup,
  1118. getMusicGroupAllClass,
  1119. StudentFeeIsLock,
  1120. updateStudentFee,
  1121. getMusicGroupGradeList,
  1122. getStudentList,
  1123. musicGroupOpenPay,
  1124. extensionPayment,
  1125. extensionApplyExpire,
  1126. getTeamBaseInfo,
  1127. getintoClass,
  1128. resetPlanNum,
  1129. openPayment,
  1130. musicGroupFound,
  1131. checkCanReg,
  1132. } from "@/api/buildTeam";
  1133. import {
  1134. addStudent,
  1135. getStudentClass,
  1136. getStudentInfoByPhone,
  1137. getStudentFeeDetail,
  1138. resetStudentSubject,
  1139. } from "@/api/studentManager";
  1140. import qrCode from "@/components/QrCode/index";
  1141. import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
  1142. import { visitChiose } from "@/utils/searchArray";
  1143. import pagination from "@/components/Pagination/index";
  1144. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  1145. import QRCode from "qrcodejs2";
  1146. import axios from "axios";
  1147. import { getToken } from "@/utils/auth";
  1148. import { permission } from "@/utils/directivePage";
  1149. import { addVisit } from "@/views/returnVisitManager/api.js";
  1150. import cleanDeep from "clean-deep";
  1151. import createUserPay from "./modals/create-user-pay.vue";
  1152. import TimesView from "./modals/course-time-detail";
  1153. import paymentCycle from "../../resetTeaming/modals/payment-cycle";
  1154. import paymentList from "./modals/payment-list";
  1155. import Tooltip from "@/components/Tooltip/index";
  1156. import changeVoice from "@/views/teamBuild/modals/change-voice";
  1157. //import changeVoice from "./modals/change-voice";
  1158. import visit from "@/views/withdrawal-application/modals/visit";
  1159. import mergeMusic from "@/views/teamBuild/components/merge-music";
  1160. export default {
  1161. name: "tstudentList",
  1162. data() {
  1163. return {
  1164. detail: null,
  1165. teamid: "",
  1166. paymentDetailVisible: false,
  1167. paymentDetail: {},
  1168. payVisible: false,
  1169. quitVisible: false, // 退团信息确认的弹窗
  1170. studentClassVisible: false, // 学员所在班级弹窗
  1171. addStudentVisible: false, //新增学员弹窗
  1172. timesVisible: false,
  1173. timerDetail: null,
  1174. topFrom: {
  1175. // 顶部的禁选框集合
  1176. expect: "2", // 预期招生
  1177. studing: "5", // 在读人数
  1178. allmoney: "100", //实收总额
  1179. students: "5", // 实际招生人数
  1180. signout: "10", // 退团总数
  1181. },
  1182. searchForm: {
  1183. studentStatus: "", // 学生状态
  1184. major: "", // 报名专业
  1185. isPay: "", // 是否缴费
  1186. search: "",
  1187. isActive: "",
  1188. oweFlag: "",
  1189. currentGrade: null,
  1190. createYear: null,
  1191. classGroupId: null,
  1192. hasCourse: null,
  1193. carePackage: null,
  1194. comeOnPackage: null,
  1195. },
  1196. organizationCourseUnitPriceSettings: [],
  1197. quitForm: {
  1198. // 退团信息确认
  1199. isRefundCourseFee: null,
  1200. isRefundInstrumentFee: null,
  1201. isRefundTeachingAssistantsFee: null,
  1202. reason: "",
  1203. },
  1204. classMask: {
  1205. studentName: "",
  1206. },
  1207. baseInfo: {},
  1208. searchLsit: [],
  1209. tableList: [], //
  1210. rules: {
  1211. // 分页规则
  1212. limit: 10, // 限制显示条数
  1213. page: 1, // 当前页
  1214. total: 0, // 总条数
  1215. page_size: [10, 20, 40, 50], // 选择限制显示条数
  1216. },
  1217. studentListInfo: {
  1218. add: "",
  1219. quit: "",
  1220. studying: "",
  1221. courseRate: "",
  1222. },
  1223. signList: [],
  1224. mixList: [],
  1225. highList: [],
  1226. snapList: [],
  1227. soundList: [],
  1228. highonlineList: [],
  1229. muiscnetworkList: [],
  1230. qrcodeStatus: false, // 生成二维码
  1231. qrcodes: true,
  1232. qrcode: null,
  1233. codeUrl: null,
  1234. gradeList: [], // 学生
  1235. maskForm: {
  1236. studentName: "",
  1237. sex: "",
  1238. parentName: "",
  1239. course: "",
  1240. phone: "",
  1241. sound: "",
  1242. timer: "",
  1243. signClass: "",
  1244. mixClass: "",
  1245. highClass: "",
  1246. snapClass: [],
  1247. highonline: "",
  1248. muiscnetwork: "",
  1249. startClass: "",
  1250. currentGradeNum: null,
  1251. id: "",
  1252. // courseFee: null, // 声部费用
  1253. temporaryCourseFee: null, // 本次课程费用
  1254. musicGoodsIdList: null, // 乐器商品编号
  1255. kitGroupPurchaseType: "GROUP", // 乐器购买方式
  1256. musicPrice: null, // 乐器购买金额
  1257. instrGoodsIdList: [], // 辅件商品编号
  1258. instrPrice: null, // 辅件购买金额
  1259. },
  1260. remark: "", // 退团原因
  1261. classList: [],
  1262. quitRules: {
  1263. isRefundCourseFee: [
  1264. { required: true, message: "请选择是否退还课程费用" },
  1265. ],
  1266. isRefundInstrumentFee: [
  1267. { required: true, message: "选择是否退还乐器费用" },
  1268. ],
  1269. isRefundTeachingAssistantsFee: [
  1270. { required: true, message: "选择是否退还教辅费用" },
  1271. ],
  1272. reason: [{ required: true, message: "请填写退团退费原因" }],
  1273. },
  1274. maskRules: {
  1275. studentName: [{ required: true, message: "请输入学生姓名" }],
  1276. sex: [{ required: true, message: "请选择学生姓名" }],
  1277. parentName: [{ required: true, message: "请输入家长姓名" }],
  1278. course: [{ required: true, message: "请输入班级" }],
  1279. // phone: [{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
  1280. sound: [{ required: true, message: "请选择声部" }],
  1281. timer: [{ required: true, message: "请选择出生日期" }],
  1282. signClass: [{ required: true, message: "请选择声部班" }],
  1283. // price: [{ required: true, message: '请输入首缴金额' },],
  1284. currentGradeNum: [{ required: true, message: "请选择年级" }],
  1285. id: [{ required: true, message: "请输入证件号" }],
  1286. // courseFee: [{ required: true, message: "请输入声部费用" }],
  1287. temporaryCourseFee: [{ required: true, message: "请输课程费用" }],
  1288. musicGoodsIdList: [
  1289. { required: true, message: "请选择乐器", trigger: "change" },
  1290. ],
  1291. musicPrice: [{ required: true, message: "请输入乐器购买金额" }],
  1292. instrGoodsIdList: [{ required: true, message: "请选择辅件" }],
  1293. instrPrice: [{ required: true, message: "请输入辅件金额" }],
  1294. },
  1295. INSTRUMENTLIST: [], // 乐器列表
  1296. ACCESSORIESLIST: [], // 辅件列表
  1297. activeRow: null,
  1298. Fsearch: null,
  1299. Frules: null,
  1300. payForm: {
  1301. studentName: "",
  1302. payMoney: "",
  1303. payMonth: [],
  1304. },
  1305. kitStatus: false, // 乐器提供方式
  1306. // 新增回访记录弹窗
  1307. visitVisiable: false,
  1308. visitForm: {
  1309. musicGroupId: "",
  1310. overview: "",
  1311. purpose: "",
  1312. studentId: "",
  1313. type: "",
  1314. visitTime: "",
  1315. visitType: "",
  1316. feedback: "",
  1317. studentName: "",
  1318. },
  1319. cycles: [{}],
  1320. collapse: [0],
  1321. visitChiose,
  1322. visitRules: {
  1323. overview: [{ required: true, message: "请输入学生近况" }],
  1324. feedback: [{ required: true, message: "请输入家长反馈" }],
  1325. visitTime: [{ required: true, message: "请输入回访时间" }],
  1326. visitType: [{ required: true, message: "请选择回访类型" }],
  1327. },
  1328. pickerOptions: null,
  1329. classLists: null,
  1330. createdUserId: 0,
  1331. createUserPayVisible: false,
  1332. team_status: "",
  1333. // 整合报名中
  1334. paymentExpireDate: "",
  1335. applyExpireDate: null,
  1336. mergeVisible: false,
  1337. team_status: "",
  1338. paymentNum: 0,
  1339. paymentStatus: false,
  1340. paymentForm: {
  1341. paymentExpireDate: null,
  1342. // feeType: null
  1343. },
  1344. paymentRules: {
  1345. paymentExpireDate: [
  1346. { required: true, message: "请设置缴费截止日期", trigger: "blur" },
  1347. ],
  1348. },
  1349. extendForm: {
  1350. expireDate: null,
  1351. },
  1352. extendRule: {
  1353. expireDate: [
  1354. { required: true, message: "请选择延长时间", trigger: "change" },
  1355. ],
  1356. },
  1357. isPay: false,
  1358. extendPaymentStatus: false, // 延长缴费
  1359. codeStatus: false,
  1360. qrCodeUrl: null,
  1361. codeTitle: null,
  1362. isEdit: false,
  1363. leftList: [],
  1364. changeVoiceVisible: false,
  1365. rowDetail: null,
  1366. orderVisible: false,
  1367. orderForm: {
  1368. name: "",
  1369. totalAmount: "",
  1370. subject: "",
  1371. subjectFee: "",
  1372. axe: "",
  1373. axePrice: "",
  1374. others: "",
  1375. othersPrice: "",
  1376. },
  1377. maskSoundForm: {
  1378. subject: "",
  1379. },
  1380. subjectVisible: false,
  1381. multipleSelection: [],
  1382. isCanReg: false,
  1383. organId: "",
  1384. };
  1385. },
  1386. components: {
  1387. pagination,
  1388. paymentCycle,
  1389. createUserPay,
  1390. Tooltip,
  1391. "times-view": TimesView,
  1392. paymentList,
  1393. visit,
  1394. qrCode,
  1395. changeVoice,
  1396. mergeMusic,
  1397. },
  1398. created() {},
  1399. filters: {
  1400. studentPays(val) {
  1401. let template = {
  1402. 0: "未缴费",
  1403. 1: "已缴费",
  1404. };
  1405. return template[val];
  1406. },
  1407. },
  1408. // activated() {
  1409. // this.init();
  1410. // },
  1411. async mounted() {
  1412. try {
  1413. const res = await getOrganizationCourseUnitPriceSettings({
  1414. rows: 9999,
  1415. });
  1416. this.organizationCourseUnitPriceSettings = res.data.rows;
  1417. } catch (error) {}
  1418. this.init();
  1419. },
  1420. methods: {
  1421. onPaymentDetail(row) {
  1422. this.paymentDetail = row;
  1423. this.paymentDetailVisible = true;
  1424. },
  1425. viewTimer(row) {
  1426. // this.timerDetail = row
  1427. this.timesVisible = true;
  1428. },
  1429. permission(str) {
  1430. return permission(str);
  1431. },
  1432. async init() {
  1433. this.teamid = this.$route.query.id;
  1434. this.team_status = this.$route.query.team_status;
  1435. // 获取乐团是否能补招
  1436. try {
  1437. const ruselt = await checkCanReg({ musicGroupId: this.teamid });
  1438. this.isCanReg = ruselt.data;
  1439. } catch (e) {
  1440. console.log(e);
  1441. }
  1442. getMusicGroupGradeList({ musicGroupId: this.teamid }).then((res) => {
  1443. let result = res.data;
  1444. if (res.code == 200 && result) {
  1445. for (let i in result) {
  1446. this.gradeList.push({
  1447. value: i,
  1448. label: result[i],
  1449. });
  1450. }
  1451. }
  1452. });
  1453. // 获取报名截止日期和缴费截止日期
  1454. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1455. if (res.code == 200) {
  1456. this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1457. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1458. this.organId = res.data.musicGroup.organId;
  1459. }
  1460. });
  1461. // 获取汇总数据
  1462. // this.getTeamStudent();
  1463. this.pickerOptions = this.beginDate();
  1464. this.getList();
  1465. // 获取乐团内所有声部
  1466. findSound({ musicGroupId: this.teamid }).then((res) => {
  1467. if (res.code == 200) {
  1468. this.soundList = res.data;
  1469. }
  1470. });
  1471. // 获取乐团基本信息
  1472. getMusicGroup({ musicGroupId: this.teamid }).then(
  1473. (res) => (this.baseInfo = res.data)
  1474. );
  1475. // 获取乐团所有合奏课
  1476. getMusicGroupAllClass({ musicGroupId: this.teamid }).then((res) => {
  1477. if (res.code == 200) {
  1478. this.classList = res.data;
  1479. this.signList = [];
  1480. this.mixList = [];
  1481. this.highList = [];
  1482. this.snapList = [];
  1483. this.classList.forEach((item) => {
  1484. if (item.type == "NORMAL") {
  1485. this.signList.push(item);
  1486. } else if (item.type == "MIX") {
  1487. this.mixList.push(item);
  1488. } else if (item.type == "HIGH") {
  1489. this.highList.push(item);
  1490. } else if (item.type == "SNAP") {
  1491. this.snapList.push(item);
  1492. } else if (item.type == "HIGH_ONLINE") {
  1493. this.highonlineList.push(item);
  1494. } else if (item.type == "MUSIC_NETWORK") {
  1495. this.muiscnetworkList.push(item);
  1496. }
  1497. });
  1498. }
  1499. });
  1500. },
  1501. getTeamStudent() {
  1502. getTeamStudentInfo({ musicGroupId: this.teamid }).then((res) => {
  1503. if (res.code == 200) {
  1504. this.studentListInfo = res.data;
  1505. }
  1506. });
  1507. },
  1508. permission(str) {
  1509. return permission(str);
  1510. },
  1511. onInstrumentChange() {
  1512. // 乐器切换时
  1513. // 乐器切换时
  1514. // let tempkitType = this.maskForm.kitGroupPurchaseType
  1515. // if(tempkitType == 'GROUP') {
  1516. // this.INSTRUMENTLIST.forEach(item => {
  1517. // if(item.value == value) {
  1518. // this.maskForm.musicPrice = item.marketPrice
  1519. // }
  1520. // })
  1521. // }
  1522. },
  1523. onKitGroupChnage(value) {
  1524. // 乐器提供方式
  1525. this.kitStatus = false;
  1526. if (value == "FREE") {
  1527. this.kitStatus = true;
  1528. this.maskForm.musicPrice = 0;
  1529. } else {
  1530. this.maskForm.musicPrice = null;
  1531. }
  1532. },
  1533. onMusicGroupExport() {
  1534. let url = "/api-web/export/musicGroupStudent";
  1535. let data = {
  1536. musicGroupId: this.teamid,
  1537. studentStatus: this.searchForm.studentStatus || null,
  1538. paymentStatus: this.searchForm.isPay || null,
  1539. subjectId: this.searchForm.major || null,
  1540. search: this.searchForm.search || null,
  1541. isActive: this.searchForm.isActive || null,
  1542. classGroupId: this.searchForm.classGroupId || null,
  1543. currentGrade: this.searchForm.currentGrade || null,
  1544. createYear: this.searchForm.createYear || null,
  1545. hasCourse: this.searchForm.hasCourse || null,
  1546. comeOnPackage: this.searchForm.comeOnPackage,
  1547. carePackage: this.searchForm.carePackage,
  1548. };
  1549. const options = {
  1550. method: "get",
  1551. headers: {
  1552. Authorization: getToken(),
  1553. },
  1554. url,
  1555. params: data,
  1556. responseType: "blob",
  1557. };
  1558. this.$confirm("您确定导出学员列表?", "提示", {
  1559. confirmButtonText: "确定",
  1560. cancelButtonText: "取消",
  1561. type: "warning",
  1562. })
  1563. .then(() => {
  1564. axios(options).then((res) => {
  1565. let blob = new Blob([res.data], {
  1566. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
  1567. type: "application/vnd.ms-excel;charset=utf-8",
  1568. // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1569. });
  1570. let objectUrl = URL.createObjectURL(blob);
  1571. let link = document.createElement("a");
  1572. let fname = this.$route.query.name + "学员列表.xls";
  1573. link.href = objectUrl;
  1574. link.setAttribute("download", fname);
  1575. document.body.appendChild(link);
  1576. link.click();
  1577. });
  1578. })
  1579. .catch(() => {});
  1580. },
  1581. search() {
  1582. this.rules.page = 1;
  1583. this.getList();
  1584. },
  1585. onReSet() {
  1586. this.$refs.searchForm.resetFields();
  1587. this.search();
  1588. },
  1589. onCreateQRCode() {
  1590. // 生成报名二维码
  1591. this.qrcodeStatus = true;
  1592. let id = this.$route.query.id;
  1593. if (this.qrcodes) {
  1594. this.qrcodes = false;
  1595. setTimeout(() => {
  1596. this.qrcode = new QRCode("qrcode", {
  1597. width: 200,
  1598. height: 200,
  1599. colorDark: "#000000",
  1600. colorLight: "#ffffff",
  1601. correctLevel: QRCode.CorrectLevel.H,
  1602. });
  1603. this.qrcode.makeCode(
  1604. vaildStudentUrl() + "/#/login?musicGroupId=" + id
  1605. );
  1606. this.codeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  1607. }, 500);
  1608. }
  1609. },
  1610. getList() {
  1611. getintoClass({ musicGroupId: this.teamid }).then((res) => {
  1612. if (res.code == 200) {
  1613. this.$set(this,'leftList',res.data)
  1614. // this.leftList = res.data;
  1615. }
  1616. });
  1617. this.getTeamStudent();
  1618. let obj = {
  1619. musicGroupId: this.teamid,
  1620. page: this.rules.page,
  1621. rows: this.rules.limit,
  1622. studentStatus: this.searchForm.studentStatus || null,
  1623. paymentStatus: this.searchForm.isPay || null,
  1624. subjectId: this.searchForm.major || null,
  1625. search: this.searchForm.search || null,
  1626. isActive: this.searchForm.isActive || null,
  1627. classGroupId: this.searchForm.classGroupId || null,
  1628. currentGrade: this.searchForm.currentGrade || null,
  1629. createYear: this.searchForm.createYear || null,
  1630. oweFlag: this.searchForm.oweFlag || null,
  1631. hasCourse: this.searchForm.hasCourse || null,
  1632. oweFlag: this.searchForm.oweFlag || null,
  1633. comeOnPackage: this.searchForm.comeOnPackage,
  1634. carePackage: this.searchForm.carePackage,
  1635. };
  1636. return getTeamStudentList(obj).then((res) => {
  1637. if (res.code == 200) {
  1638. this.tableList = res.data.rows;
  1639. this.rules.total = res.data.total;
  1640. this.getStudentStatus();
  1641. return res;
  1642. }
  1643. });
  1644. },
  1645. addPay(row) {
  1646. this.createUserPayVisible = true;
  1647. this.createdUserId = row.userId;
  1648. },
  1649. addCycle() {
  1650. this.cycles.push({});
  1651. this.collapse.push(this.collapse.length);
  1652. },
  1653. removeCycle(index) {
  1654. this.cycles[index] = null;
  1655. this.cycles = this.cycles.filter((item) => !!item);
  1656. this.collapse.pop();
  1657. },
  1658. collapseChange(val) {
  1659. this.collapse = val;
  1660. },
  1661. gotoSignin() {
  1662. this.$router.push({
  1663. path: "/business/studentSignin",
  1664. query: {
  1665. id: this.teamid,
  1666. status: this.$route.query.status,
  1667. name: this.$route.query.name,
  1668. rules: this.Frules,
  1669. search: this.Fsearch,
  1670. },
  1671. });
  1672. },
  1673. chioseType() {
  1674. this.$refs["quitForm"].validate((res) => {
  1675. if (res) {
  1676. this.$confirm("确定退团?", "提示", {
  1677. confirmButtonText: "确定",
  1678. cancelButtonText: "取消",
  1679. type: "warning",
  1680. })
  1681. .then(() => {
  1682. let row = this.activeRow;
  1683. // 发请求 退团
  1684. StudentQuit({
  1685. musicGroupId: this.teamid,
  1686. userId: row.userId,
  1687. reason: this.quitForm.reason,
  1688. isRefundCourseFee: this.quitForm.isRefundCourseFee,
  1689. isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
  1690. isRefundTeachingAssistantsFee: this.quitForm
  1691. .isRefundTeachingAssistantsFee,
  1692. }).then((res) => {
  1693. this.quitForm = {
  1694. // 退团信息确认
  1695. isRefundCourseFee: null,
  1696. isRefundInstrumentFee: null,
  1697. isRefundTeachingAssistantsFee: null,
  1698. reason: "",
  1699. };
  1700. if (res.code == 200) {
  1701. this.$message.success("退团成功");
  1702. this.getList();
  1703. this.quitVisible = false;
  1704. }
  1705. });
  1706. })
  1707. .catch(() => {});
  1708. } else {
  1709. }
  1710. });
  1711. // row.typeVisible = false;
  1712. },
  1713. //
  1714. addStudent() {
  1715. // 发请求添加学员
  1716. this.$refs["maskForm"].validate((res) => {
  1717. if (res) {
  1718. // this.maskForm.parentName.timer 少个生日的字段
  1719. // classGroupId: maskForm.signClass
  1720. /** <!-- signClass: '',
  1721. mixClass: '',
  1722. highClass: '',
  1723. snapClass: [], --> */
  1724. let maskForm = this.maskForm;
  1725. // if (
  1726. // !maskForm.signClass &&
  1727. // !maskForm.mixClass &&
  1728. // !maskForm.highClass &&
  1729. // !maskForm.highonline &&
  1730. // !maskForm.muiscnetwork
  1731. // ) {
  1732. // if (
  1733. // !maskForm.snapClass ||
  1734. // !(maskForm.snapClass && maskForm.snapClass.length >= 1)
  1735. // ) {
  1736. // this.$message.error("该学生必须加入一个班级");
  1737. // return;
  1738. // }
  1739. // }
  1740. if (
  1741. maskForm.musicGoodsIdList &&
  1742. (maskForm.musicPrice === "" || maskForm.musicPrice === null)
  1743. ) {
  1744. this.$message.error("请输入乐器金额");
  1745. return;
  1746. }
  1747. if (
  1748. maskForm.instrGoodsIdList &&
  1749. maskForm.instrGoodsIdList.length > 0 &&
  1750. (maskForm.instrPrice === "" || maskForm.instrPrice === null)
  1751. ) {
  1752. this.$message.error("请输入辅件金额");
  1753. return;
  1754. }
  1755. let snapClassIds;
  1756. maskForm.snapClass
  1757. ? (snapClassIds = maskForm.snapClass.join(","))
  1758. : (snapClassIds = null);
  1759. let params = {
  1760. signClassId: maskForm.signClass,
  1761. mixClassId: maskForm.mixClass,
  1762. snapClassIds,
  1763. highClassId: maskForm.highClass,
  1764. courseFee: maskForm.courseFee,
  1765. temporaryCourseFee: maskForm.temporaryCourseFee,
  1766. studentRegistration: {
  1767. name: maskForm.studentName,
  1768. gender: maskForm.sex,
  1769. birthdate: maskForm.timer,
  1770. parentsName: maskForm.parentName,
  1771. parentsPhone: maskForm.phone,
  1772. currentGrade: maskForm.startClass,
  1773. currentGradeNum: maskForm.currentGradeNum,
  1774. currentClass: maskForm.course,
  1775. subjectId: maskForm.sound,
  1776. musicGroupId: this.teamid,
  1777. },
  1778. };
  1779. params.studentPaymentOrderDetails = [];
  1780. if (maskForm.musicGoodsIdList) {
  1781. params.studentPaymentOrderDetails.push({
  1782. goodsIdList: maskForm.musicGoodsIdList,
  1783. kitGroupPurchaseType: maskForm.kitGroupPurchaseType,
  1784. type: "MUSICAL",
  1785. price: maskForm.musicPrice,
  1786. });
  1787. }
  1788. if (maskForm.instrGoodsIdList && maskForm.instrGoodsIdList != "") {
  1789. params.studentPaymentOrderDetails.push({
  1790. goodsIdList: maskForm.instrGoodsIdList.join(","),
  1791. type: "ACCESSORIES",
  1792. price: maskForm.instrPrice,
  1793. });
  1794. }
  1795. addStudent(params).then((res) => {
  1796. if (res.code == 200) {
  1797. this.$message.success("添加学生成功");
  1798. this.getList();
  1799. this.addStudentVisible = false;
  1800. this.createUserPayVisible = true;
  1801. this.createdUserId = res.data;
  1802. }
  1803. this.$refs.maskForm.resetFields();
  1804. });
  1805. }
  1806. });
  1807. },
  1808. onSoundChange(value) {
  1809. // 学员声部切换时
  1810. // this.findSubjectPlan(value)
  1811. this.ACCESSORIESLIST = [];
  1812. this.maskForm.instrGoodsIdList = [];
  1813. this.maskForm.instrPrice = null;
  1814. this.INSTRUMENTLIST = [];
  1815. this.maskForm.musicPrice = null;
  1816. this.maskForm.musicGoodsIdList = null;
  1817. this.getGoodsList(value, "INSTRUMENT"); // 乐器
  1818. this.getGoodsList(value, "ACCESSORIES"); // 辅件
  1819. },
  1820. // 获取购买方式
  1821. findSubjectPlan(subjectId) {
  1822. findSubjectPlan({
  1823. musicGroupId: this.teamid,
  1824. subjectId: subjectId,
  1825. }).then((res) => {
  1826. let result = res.data;
  1827. if (res.code == 200) {
  1828. this.maskForm.musicMode = this.getBranchType(
  1829. result.kitGroupPurchaseType
  1830. );
  1831. }
  1832. });
  1833. },
  1834. getGoodsList(subjectId, type) {
  1835. getGoods({
  1836. subjectId: subjectId,
  1837. type: type,
  1838. }).then((res) => {
  1839. let result = res.data;
  1840. if (res.code == 200) {
  1841. let tempArr = [];
  1842. result.forEach((item) => {
  1843. tempArr.push({
  1844. label: item.name,
  1845. value: item.id,
  1846. marketPrice: item.marketPrice,
  1847. });
  1848. });
  1849. if (type == "ACCESSORIES") {
  1850. this.ACCESSORIESLIST = tempArr;
  1851. }
  1852. if (type == "INSTRUMENT") {
  1853. this.INSTRUMENTLIST = tempArr;
  1854. }
  1855. }
  1856. });
  1857. },
  1858. getBranchType(status) {
  1859. let common = {
  1860. FREE: "免费",
  1861. GROUP: "团购",
  1862. LEASE: "租赁",
  1863. };
  1864. return common[status];
  1865. },
  1866. lookClass(row) {
  1867. this.classMask.studentName = row.realName;
  1868. getStudentClass({
  1869. musicGroupId: this.teamid,
  1870. teacherId: row.userId,
  1871. }).then((res) => {
  1872. if (res.code == 200) {
  1873. this.classLists = res.data;
  1874. this.studentClassVisible = true;
  1875. }
  1876. });
  1877. },
  1878. quieTeamMask(row) {
  1879. this.activeRow = row;
  1880. this.quitVisible = true;
  1881. },
  1882. quieTeam(row) {
  1883. this.$prompt("请输入退团原因", "提示", {
  1884. confirmButtonText: "确定",
  1885. cancelButtonText: "取消",
  1886. type: "warning",
  1887. inputPattern: /\S/,
  1888. inputErrorMessage: "请输入退团原因",
  1889. })
  1890. .then((val) => {
  1891. // 发请求 退团
  1892. StudentQuit({
  1893. musicGroupId: this.teamid,
  1894. userId: row.userId,
  1895. reason: val.value,
  1896. isRefundCourseFee: false,
  1897. isRefundInstrumentFee: false,
  1898. isRefundTeachingAssistantsFee: false,
  1899. }).then((res) => {
  1900. this.quitForm = {
  1901. // 退团信息确认
  1902. isRefundCourseFee: null,
  1903. isRefundInstrumentFee: null,
  1904. isRefundTeachingAssistantsFee: null,
  1905. reason: "",
  1906. };
  1907. if (res.code == 200) {
  1908. this.$message.success("退团成功");
  1909. this.getList();
  1910. this.quitVisible = false;
  1911. }
  1912. });
  1913. })
  1914. .catch(() => {});
  1915. },
  1916. checkPhone(val) {
  1917. var regu = /^1[3456789]\d{9}$/;
  1918. var re = new RegExp(regu);
  1919. if (re.test(val)) {
  1920. getStudentInfoByPhone({ mobile: this.maskForm.phone }).then((res) => {
  1921. if (res.code == 200) {
  1922. if (res.data) {
  1923. this.maskForm.studentName = res.data.name;
  1924. this.maskForm.sex = res.data.gender;
  1925. this.maskForm.parentName = res.data.parentsName;
  1926. this.maskForm.course = res.data.currentClass;
  1927. this.maskForm.startClass = res.data.currentGrade;
  1928. this.maskForm.currentGradeNum = res.data.currentGradeNum
  1929. ? res.data.currentGradeNum + ""
  1930. : null;
  1931. this.maskForm.phone = val;
  1932. this.maskForm.timer = res.data.birthdate;
  1933. }
  1934. }
  1935. });
  1936. }
  1937. },
  1938. lockStudent(row) {
  1939. this.$confirm("是否锁定/解锁学生缴费周期?", "提示", {
  1940. confirmButtonText: "确定",
  1941. cancelButtonText: "取消",
  1942. type: "warning",
  1943. })
  1944. .then(() => {
  1945. let musicGroupId = this.teamid;
  1946. let studentId = row.userId;
  1947. let isLock;
  1948. row.isLock == 0 ? (isLock = 1) : (isLock = 0);
  1949. StudentFeeIsLock({ musicGroupId, studentId, isLock }).then((res) => {
  1950. if (res.code == 200) {
  1951. this.$message.success("修改成功");
  1952. this.getList();
  1953. }
  1954. });
  1955. })
  1956. .catch(() => {});
  1957. },
  1958. resetPay(row) {
  1959. this.activeRow = row;
  1960. this.payVisible = true;
  1961. this.payForm.studentName = row.realName;
  1962. this.payForm.payMoney = row.courseFee;
  1963. this.payForm.payMonth = row.paymentPeriodList.split(",");
  1964. if (this.payForm.payMonth[0] == "") {
  1965. this.payForm.payMonth = [];
  1966. }
  1967. },
  1968. submitPay() {
  1969. let studentId = this.activeRow.userId;
  1970. let musicGroupId = this.teamid;
  1971. let month = this.payForm.payMonth.join(",") || null;
  1972. let amount = this.payForm.payMoney;
  1973. let obj = {
  1974. studentId,
  1975. musicGroupId,
  1976. month,
  1977. amount,
  1978. };
  1979. updateStudentFee(obj).then((res) => {
  1980. if (res.code == 200) {
  1981. this.$message.success("修改成功");
  1982. this.payVisible = false;
  1983. this.getList();
  1984. }
  1985. });
  1986. },
  1987. closePayVisible() {
  1988. this.$refs["payForm"].resetFields();
  1989. this.payVisible = false;
  1990. },
  1991. addVisit(row) {
  1992. console.log(row);
  1993. this.detail = row;
  1994. // this.visitForm.studentName = row.realName;
  1995. // this.visitForm.musicGroupId = this.teamid;
  1996. // this.visitForm.studentId = row.userId;
  1997. this.visitVisiable = true;
  1998. },
  1999. handleChange(val) {
  2000. this.visitForm.type = val[0];
  2001. this.visitForm.purpose = val[1];
  2002. },
  2003. submitAddVisit() {
  2004. console.log(this.$refs.visitForm);
  2005. this.$refs.visitForm.validate((res) => {
  2006. if (res) {
  2007. addVisit(cleanDeep(this.visitForm)).then((res) => {
  2008. if (res.code === 200) {
  2009. this.$message.success("新增成功");
  2010. this.visitVisiable = false;
  2011. }
  2012. });
  2013. }
  2014. });
  2015. },
  2016. beginDate() {
  2017. let self = this;
  2018. return {
  2019. firstDayOfWeek: 1,
  2020. disabledDate(time) {
  2021. return time.getTime() >= new Date().getTime(); //开始时间不选时,结束时间最大值小于等于当天
  2022. },
  2023. };
  2024. },
  2025. createStudentFrom() {
  2026. this.addStudentVisible = true;
  2027. },
  2028. // 报名缴费功能
  2029. onGoHome() {
  2030. if (this.paymentNum <= 0) {
  2031. this.$message.error("当前缴费人数为0,无法开团");
  2032. return;
  2033. }
  2034. this.$confirm(`是否确认开团?`, "提示", {
  2035. confirmButtonText: "确定",
  2036. cancelButtonText: "取消",
  2037. type: "warning",
  2038. })
  2039. .then(() => {
  2040. musicGroupFound({
  2041. musicGroupId: this.$route.query.id,
  2042. }).then((res) => {
  2043. if (res.code == 200) {
  2044. // let query = this.$route.query;
  2045. // this.$message.success("开启成功");
  2046. // this.$router.push({
  2047. // path: "/teamList",
  2048. // query: {
  2049. // ...query,
  2050. // },
  2051. // });
  2052. this.$store.dispatch("delVisitedViews", this.$route);
  2053. this.$router.push({ path: "/teamList" });
  2054. }
  2055. });
  2056. })
  2057. .catch(() => {});
  2058. },
  2059. payStart() {
  2060. this.paymentStatus = true;
  2061. },
  2062. getStudentStatus() {
  2063. let obj = {
  2064. musicGroupId: this.teamid,
  2065. page: 1,
  2066. rows: 9999,
  2067. };
  2068. getStudentList(obj).then((res) => {
  2069. if (res.code == 200) {
  2070. res.data.rows.forEach((item) => {
  2071. // '未开启缴费', '开启缴费', '已缴费'
  2072. if (item.paymentStatus == 2) {
  2073. this.paymentNum += 1;
  2074. }
  2075. });
  2076. // this.rightList = res.data.rows;
  2077. // this.rules.total = res.data.total;
  2078. // return res;
  2079. }
  2080. });
  2081. },
  2082. payDate() {
  2083. let self = this;
  2084. return {
  2085. firstDayOfWeek: 1,
  2086. disabledDate(time) {
  2087. if (self.applyExpireDate) {
  2088. return (
  2089. time.getTime() <=
  2090. new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
  2091. );
  2092. } else {
  2093. return false;
  2094. }
  2095. },
  2096. };
  2097. },
  2098. onStartPayment(formName) {
  2099. // 开启缴费
  2100. this.$refs[formName].validate((valid) => {
  2101. if (valid) {
  2102. musicGroupOpenPay({
  2103. musicGroupId: this.teamid,
  2104. expireDate: this.paymentForm.paymentExpireDate,
  2105. // feeType: this.paymentForm.feeType
  2106. }).then((res) => {
  2107. if (res.code == 200) {
  2108. this.$message.success("开启成功");
  2109. this.paymentStatus = false;
  2110. this.$store.dispatch("delVisitedViews", this.$route);
  2111. this.$router.push({ path: "/teamList" });
  2112. // this.$router.push({
  2113. // path: "/business/resetTeaming",
  2114. // query: {
  2115. // status: "PAY",
  2116. // id: this.$route.query.id,
  2117. // name: this.$route.query.name,
  2118. // },
  2119. // });
  2120. // this.team_status = "PAY";
  2121. // this.paymentExpireDate = this.paymentForm.paymentExpireDate;
  2122. // this.getList();
  2123. }
  2124. });
  2125. } else {
  2126. return false;
  2127. }
  2128. });
  2129. },
  2130. applyDate() {
  2131. let self = this;
  2132. return {
  2133. firstDayOfWeek: 1,
  2134. disabledDate(time) {
  2135. if (self.paymentExpireDate) {
  2136. return (
  2137. time.getTime() >
  2138. new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
  2139. );
  2140. } else {
  2141. return false;
  2142. }
  2143. },
  2144. };
  2145. },
  2146. extendTime(isPay) {
  2147. this.isPay = isPay;
  2148. if (isPay) {
  2149. // 点击的延长缴费
  2150. this.extendForm.expireDate = this.paymentExpireDate;
  2151. } else {
  2152. // 点击的延长报名
  2153. this.extendForm.expireDate = this.applyExpireDate;
  2154. }
  2155. this.extendPaymentStatus = true;
  2156. },
  2157. onExtendPayment(formName, isPay) {
  2158. this.$refs[formName].validate((valid) => {
  2159. if (valid) {
  2160. if (!isPay) {
  2161. extensionApplyExpire({
  2162. musicGroupId: this.teamid,
  2163. expireDate: this.extendForm.expireDate,
  2164. }).then((res) => {
  2165. if (res.code == 200) {
  2166. this.$message.success("延长报名成功");
  2167. this.extendPaymentStatus = false;
  2168. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  2169. if (res.code == 200) {
  2170. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  2171. this.setBase(res);
  2172. }
  2173. });
  2174. } else {
  2175. this.$message.error(res.msg);
  2176. }
  2177. });
  2178. } else {
  2179. extensionPayment({
  2180. musicGroupId: this.teamid,
  2181. expireDate: this.extendForm.expireDate,
  2182. }).then((res) => {
  2183. if (res.code == 200) {
  2184. this.$message.success("延长缴费成功");
  2185. this.extendPaymentStatus = false;
  2186. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  2187. if (res.code == 200) {
  2188. this.paymentExpireDate =
  2189. res.data.musicGroup.paymentExpireDate;
  2190. }
  2191. });
  2192. } else {
  2193. this.$message.error(res.msg);
  2194. }
  2195. });
  2196. }
  2197. }
  2198. });
  2199. },
  2200. onCreateQRCode(type) {
  2201. // 生成报名二维码
  2202. let id = this.teamid;
  2203. this.codeStatus = true;
  2204. if (type == "payment") {
  2205. this.codeTitle = "学员报名连接";
  2206. this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  2207. } else if (type == "detail") {
  2208. let teamName = this.$route.query.name;
  2209. this.codeTitle = "报名缴费详情";
  2210. this.qrCodeUrl =
  2211. vaildTeacherUrl() +
  2212. "/#/order?musicGroupId=" +
  2213. id +
  2214. "&musicGroupName=" +
  2215. teamName;
  2216. } else if (type == "rePayment") {
  2217. this.codeTitle = "学生报名链接(无乐器)";
  2218. this.qrCodeUrl =
  2219. vaildStudentUrl() + "/#/login?musicGroupId=" + id + "&instrument=1";
  2220. }
  2221. },
  2222. saveIsEdit() {
  2223. // 提交数据
  2224. this.isEdit = false;
  2225. resetPlanNum(this.leftList).then((res) => {});
  2226. },
  2227. openChangeVoice(row) {
  2228. // console.log(row);
  2229. // this.getList
  2230. this.getList().then((res) => {
  2231. for (const item of res.data.rows) {
  2232. if (item.userId === row.userId) {
  2233. this.rowDetail = { ...item, studentId: row.userId };
  2234. this.changeVoiceVisible = true;
  2235. console.log(this.rowDetail);
  2236. }
  2237. }
  2238. });
  2239. // this.rowDetail = { ...row, studentId: row.userId };
  2240. // this.changeVoiceVisible = true;
  2241. },
  2242. closeChangeVoice() {
  2243. this.changeVoiceVisible = false;
  2244. // this.rowDetail = null
  2245. },
  2246. lookdetail(row) {
  2247. this.orderVisible = true;
  2248. this.activeId = row.userId;
  2249. this.orderForm.name = row.realName;
  2250. this.orderForm.subject = row.subjectName;
  2251. getStudentFeeDetail({
  2252. musicGroupId: this.teamid,
  2253. studentId: row.userId,
  2254. }).then((res) => {
  2255. if (res.code == 200) {
  2256. if (res.data) {
  2257. this.orderForm.totalAmount = res.data.totalAmount;
  2258. // this.orderForm.subjectFee = res.data.courseFee;
  2259. let goodStr = "";
  2260. let goodPrice = 0;
  2261. let otherStr = "";
  2262. let othersPrice = 0;
  2263. for (let i in res.data.goods) {
  2264. if (res.data.goods[i].goodsType == "INSTRUMENT") {
  2265. goodStr += res.data.goods[i].goodsName + ",";
  2266. goodPrice += parseFloat(res.data.goods[i].musicalFee);
  2267. // this.orderForm.axe = res.data.goods[i].goodsName;
  2268. // this.orderForm.axePrice = res.data.goods[i].musicalFee;
  2269. } else if (res.data.goods[i].goodsType == "ACCESSORIES") {
  2270. otherStr += res.data.goods[i].goodsName + ",";
  2271. othersPrice += parseFloat(res.data.goods[i].musicalFee);
  2272. // this.orderForm.others = res.data.goods[i].goodsName;
  2273. // this.orderForm.othersPrice = res.data.goods[i].musicalFee;
  2274. } else if (res.data.goods[i].goodsType == "COURSE") {
  2275. this.orderForm.subjectFee = res.data.goods[i].musicalFee;
  2276. }
  2277. }
  2278. this.orderForm.others = otherStr.substring(0, otherStr.length - 1);
  2279. this.orderForm.othersPrice = othersPrice;
  2280. this.orderForm.axe = goodStr.substring(0, goodStr.length - 1);
  2281. this.orderForm.axePrice = goodPrice;
  2282. }
  2283. }
  2284. });
  2285. },
  2286. // 修改专业
  2287. resetSubject(row) {
  2288. this.activeId = row.userId;
  2289. this.maskSoundForm.subject = row.subjectId
  2290. this.subjectVisible = true;
  2291. // resetStudentSubject().then(res=>{]})
  2292. },
  2293. okReset() {
  2294. if (!this.maskSoundForm.subject) {
  2295. this.$message.error("请选择调剂专业");
  2296. return;
  2297. }
  2298. resetStudentSubject({
  2299. musicGroupId: this.teamid,
  2300. userId: this.activeId,
  2301. subId: this.maskSoundForm.subject,
  2302. }).then((res) => {
  2303. if (res.code == 200) {
  2304. this.$message.success("修改成功");
  2305. this.subjectVisible = false;
  2306. this.maskForm.subject = "";
  2307. // getintoClass({ musicGroupId: this.id }).then((res) => {
  2308. // if (res.code == 200) {
  2309. // this.leftList = res.data;
  2310. // }
  2311. // });
  2312. this.getList();
  2313. }
  2314. });
  2315. },
  2316. onPartPayment() {
  2317. // 部分缴费
  2318. let selection = this.multipleSelection;
  2319. if (selection.length <= 0) {
  2320. this.$message.error("您还没有选择学生");
  2321. return false;
  2322. }
  2323. let ids = [];
  2324. selection.forEach((item) => {
  2325. ids.push(item.studentRegistrationId);
  2326. });
  2327. this.$confirm(`是否确认开启缴费?`, "提示", {
  2328. confirmButtonText: "确定",
  2329. cancelButtonText: "取消",
  2330. type: "warning",
  2331. })
  2332. .then(() => {
  2333. openPayment({
  2334. ids: ids.join(","),
  2335. }).then((res) => {
  2336. if (res.code == 200) {
  2337. this.$message.success("开启成功");
  2338. this.getList();
  2339. } else {
  2340. this.$message.error(res.msg);
  2341. }
  2342. });
  2343. })
  2344. .catch(() => {});
  2345. },
  2346. handleSelectionChange(val) {
  2347. this.multipleSelection = val;
  2348. },
  2349. checkboxSelect(row) {
  2350. return row.paymentStatus == 0;
  2351. },
  2352. isShowResSound() {
  2353. /**
  2354. * team_status == 'PAY' ||
  2355. team_status == 'APPLY' ||
  2356. team_status == 'PROGRESS'&&isCanReg ||
  2357. team_status == 'PREPARE')
  2358. */
  2359. if (this.team_status == "PAY" || this.team_status == "APPLY") {
  2360. return true;
  2361. } else if (
  2362. this.team_status == "PROGRESS" ||
  2363. this.team_status == "PREPARE"
  2364. ) {
  2365. return this.isCanReg;
  2366. } else {
  2367. return false;
  2368. }
  2369. },
  2370. },
  2371. watch: {
  2372. quitVisible(val) {
  2373. if (!val) {
  2374. this.quitForm = {
  2375. // 退团信息确认
  2376. isRefundCourseFee: null,
  2377. isRefundInstrumentFee: null,
  2378. isRefundTeachingAssistantsFee: null,
  2379. reason: "",
  2380. };
  2381. this.$refs["quitForm"].resetFields();
  2382. }
  2383. },
  2384. // visitVisiable(val) {
  2385. // if (!val) {
  2386. // this.$refs["visitForm"].resetFields();
  2387. // }
  2388. // },
  2389. },
  2390. computed: {
  2391. saveKey() {
  2392. // return 'teamDetails-'+this.$route.query.id
  2393. return "teamDetails-studentList|id|" + this.$route.query.id;
  2394. },
  2395. },
  2396. };
  2397. </script>
  2398. <style lang="scss" scoped>
  2399. .dialog-footer.question {
  2400. display: flex;
  2401. flex-direction: row;
  2402. justify-content: space-between;
  2403. }
  2404. // .moreInput {
  2405. // width: 100%;
  2406. // display: flex;
  2407. // /deep/.el-form-item__content {
  2408. // display: flex;
  2409. // flex-direction: row;
  2410. // }
  2411. // }
  2412. .error {
  2413. color: red;
  2414. }
  2415. .el-select {
  2416. width: 180px !important;
  2417. }
  2418. .headWrap {
  2419. padding: 20px 0;
  2420. }
  2421. /deep/.el-date-editor.el-input {
  2422. width: auto;
  2423. .el-input__inner {
  2424. padding-right: 0;
  2425. }
  2426. }
  2427. .studentInfo {
  2428. /deep/.el-dialog__body {
  2429. // padding-top: 0;
  2430. // padding-bottom: 0;
  2431. }
  2432. }
  2433. // .instrList {
  2434. // display: flex;
  2435. // /deep/.el-form-item__content {
  2436. // width: 80%;
  2437. // }
  2438. // .el-col {
  2439. // /deep/.el-form-item__content {
  2440. // width: 100%;
  2441. // }
  2442. // }
  2443. // }
  2444. .stu-container {
  2445. .topFrom {
  2446. margin: 20px 30px 0;
  2447. width: 1000px;
  2448. }
  2449. .newStudent {
  2450. width: 121px;
  2451. height: 40px;
  2452. background: rgba(20, 146, 138, 1);
  2453. border-radius: 4px;
  2454. color: #fff;
  2455. text-align: center;
  2456. line-height: 40px;
  2457. font-size: 14px;
  2458. cursor: pointer;
  2459. }
  2460. }
  2461. .left-code,
  2462. .right-code {
  2463. // width: 50%;
  2464. // float: left;
  2465. h2 {
  2466. display: block;
  2467. font-size: 18px;
  2468. text-align: center;
  2469. padding-bottom: 8px;
  2470. line-height: 1;
  2471. height: 30px;
  2472. margin-bottom: 0;
  2473. }
  2474. .qrcode {
  2475. display: flex;
  2476. justify-content: center;
  2477. img {
  2478. width: 200px;
  2479. height: 200px;
  2480. // margin: 0 auto;
  2481. }
  2482. }
  2483. .code-url {
  2484. font-size: 18px;
  2485. text-align: center;
  2486. padding: 15px 15px 0 15px;
  2487. }
  2488. }
  2489. .export {
  2490. background: #14928a;
  2491. }
  2492. .alert {
  2493. margin-bottom: 10px;
  2494. }
  2495. .collapse-title {
  2496. display: flex;
  2497. justify-content: space-between;
  2498. align-items: center;
  2499. width: 100%;
  2500. .el-icon-circle-close {
  2501. font-size: 16px;
  2502. margin-right: 10px;
  2503. }
  2504. }
  2505. /deep/ .el-collapse-item__wrap {
  2506. padding-top: 20px;
  2507. }
  2508. .cycleForm {
  2509. /deep/ .el-form-item {
  2510. display: flex;
  2511. width: 100%;
  2512. /deep/ .el-form-item__content {
  2513. margin-left: 0 !important;
  2514. flex: 1;
  2515. }
  2516. }
  2517. }
  2518. .statistic {
  2519. padding: 20px 0;
  2520. text-align: center;
  2521. width: 100%;
  2522. margin: auto !important;
  2523. }
  2524. .popoverWrap {
  2525. p {
  2526. line-height: 25px;
  2527. }
  2528. }
  2529. .studentListWrap {
  2530. display: flex;
  2531. flex-direction: row;
  2532. justify-content: flex-start;
  2533. align-items: center;
  2534. div {
  2535. margin-right: 15px;
  2536. }
  2537. }
  2538. .btnList {
  2539. display: flex;
  2540. flex-direction: row;
  2541. justify-content: flex-start;
  2542. align-items: center;
  2543. flex-wrap: wrap;
  2544. & > div {
  2545. margin-right: 15px;
  2546. margin-bottom: 10px;
  2547. }
  2548. }
  2549. </style>