studentList.vue 69 KB

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