signupList.vue 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909
  1. <template>
  2. <div class="sigup-container">
  3. <div class="topWrap">
  4. <div>
  5. <div style="display: flex; justify-content: space-between">
  6. <div
  7. style="
  8. display: flex;
  9. margin-bottom: 15px;
  10. font-size: 18px;
  11. font-weight: 400;
  12. "
  13. >
  14. <p style="margin-right: 10px" v-if="applyExpireDate">
  15. 报名截止时间:{{ applyExpireDate | formatTimer }}
  16. </p>
  17. <p v-if="paymentExpireDate">
  18. 缴费截止时间:{{ paymentExpireDate | formatTimer }}
  19. </p>
  20. </div>
  21. </div>
  22. <div class="btnList">
  23. <!-- <div class='newBand close'
  24. v-permission="'musicGroup/cancelMusicGroup'"
  25. @click="onClose">停止乐团</div> v-show="status == 'APPLY'"-->
  26. <div
  27. class="newBand"
  28. @click="payStart"
  29. v-permission="'musicGroup/openPay'"
  30. v-if="status == 'APPLY'"
  31. >
  32. 开始缴费
  33. </div>
  34. <!-- v-show="status=='PAY'" -->
  35. <div
  36. class="newBand"
  37. v-permission="'musicGroup/found'"
  38. @click="onGoHome"
  39. v-if="status == 'APPLY' || status == 'PAY'"
  40. >
  41. 确认开团
  42. </div>
  43. <div
  44. class="newBand"
  45. v-permission="'musicGroup/extensionPayment'"
  46. @click="extendTime(true)"
  47. v-show="
  48. status == 'PAY' || status == 'PROGRESS' || status == 'PREPARE'
  49. "
  50. >
  51. 延长缴费
  52. </div>
  53. <div
  54. class="newBand"
  55. v-permission="'musicGroup/extensionApplyExpireDate'"
  56. @click="extendTime(false)"
  57. v-show="
  58. status == 'PAY' ||
  59. status == 'APPLY' ||
  60. status == 'PROGRESS' ||
  61. status == 'PREPARE'
  62. "
  63. >
  64. 延长报名
  65. </div>
  66. <div
  67. class="newBand"
  68. @click="onCreateQRCode('payment')"
  69. v-show="
  70. (status == 'PAY' ||
  71. status == 'APPLY' ||
  72. status == 'PROGRESS' ||
  73. status == 'PREPARE') &&
  74. ischeckCanReg
  75. "
  76. >
  77. 报名链接
  78. </div>
  79. <div class="newBand" @click="onCreateQRCode('detail')">缴费详情</div>
  80. <div
  81. class="newBand"
  82. v-show="rightList.length > 0"
  83. v-permission="'studentRegistration/queryStudentApplyDetailExport'"
  84. @click="onDownLoadExecl"
  85. >
  86. 报表导出
  87. </div>
  88. <auth :auths="'studentRegistration/queryPreApplyList/4263'">
  89. <div
  90. class="newBand"
  91. style="margin-right: 0"
  92. @click="forecastVisible = true"
  93. >
  94. 预报名名单
  95. </div>
  96. </auth>
  97. <!-- v-permission="getFullPermission('musicGroup/addMusicGroupRegs')" -->
  98. <div
  99. class="newBand"
  100. v-permission="'musicGroup/addMusicGroupRegs'"
  101. @click="mergeVisible = true"
  102. v-show="
  103. (status == 'PAY' ||
  104. status == 'APPLY' ||
  105. status == 'PROGRESS' ||
  106. status == 'PREPARE') &&
  107. ischeckCanReg
  108. "
  109. >
  110. 合并学员
  111. </div>
  112. <div
  113. class="newBand"
  114. style="background-color: #f97215; border: 1px solid #f97215"
  115. @click="onCreateQRCode('rePayment')"
  116. v-show="
  117. (status == 'PAY' ||
  118. status == 'APPLY' ||
  119. status == 'PROGRESS' ||
  120. status == 'PREPARE') &&
  121. ischeckCanReg
  122. "
  123. >
  124. 报名链接(无乐器)
  125. </div>
  126. </div>
  127. </div>
  128. <el-dialog
  129. title="选择合并乐团"
  130. :visible.sync="mergeVisible"
  131. width="950px"
  132. >
  133. <mergeMusic
  134. v-if="mergeVisible"
  135. style="padding: 0 20px"
  136. :organId="organId"
  137. @close="mergeVisible = false"
  138. @submited="getList"
  139. />
  140. </el-dialog>
  141. <el-dialog
  142. title="预报名名单"
  143. :visible.sync="forecastVisible"
  144. width="1100px"
  145. >
  146. <forecastList v-if="forecastVisible" @close="forecastVisible = false" />
  147. </el-dialog>
  148. <!-- stepImgs: {
  149. APPLY: require('@/assets/images/base/clock.png'),
  150. PAY: require('@/assets/images/base/pay.png')
  151. }, -->
  152. </div>
  153. <div class="searchList">
  154. <save-form
  155. :inline="true"
  156. :model="searchFrom"
  157. @submit="search"
  158. @reset="onReset"
  159. >
  160. <el-form-item>
  161. <el-select
  162. v-model.trim="searchFrom.subject"
  163. filterable
  164. clearable
  165. placeholder="请选择专业"
  166. >
  167. <el-option
  168. v-for="(item, index) in soundList"
  169. :key="index"
  170. :label="item.name"
  171. :value="item.id"
  172. ></el-option>
  173. </el-select>
  174. </el-form-item>
  175. <el-form-item>
  176. <el-select
  177. v-model.trim="searchFrom.isAllowAdjust"
  178. filterable
  179. placeholder="请选择是否允许调剂"
  180. clearable
  181. >
  182. <el-option label="是" value="1"></el-option>
  183. <el-option label="否" value="0"></el-option>
  184. </el-select>
  185. </el-form-item>
  186. <el-form-item>
  187. <el-input
  188. v-model.trim="searchFrom.name"
  189. placeholder="请输入用户名或手机号"
  190. clearable
  191. ></el-input>
  192. </el-form-item>
  193. <el-form-item>
  194. <!-- <el-input v-model.trim="searchFrom.currentGrade" placeholder="请输入年级" clearable></el-input> -->
  195. <el-select
  196. v-model.trim="searchFrom.currentGrade"
  197. filterable
  198. clearable
  199. placeholder="请输入年级"
  200. >
  201. <el-option
  202. v-for="(item, index) in gradeList"
  203. :key="index"
  204. :label="item.label"
  205. :value="item.label"
  206. ></el-option>
  207. </el-select>
  208. </el-form-item>
  209. <el-form-item>
  210. <el-select
  211. v-model.trim="searchFrom.paymentStatus"
  212. clearable
  213. filterable
  214. placeholder="报名缴费"
  215. >
  216. <el-option label="未开启缴费" value="0"></el-option>
  217. <el-option label="开启缴费" value="1"></el-option>
  218. <el-option label="已缴费" value="2"></el-option>
  219. </el-select>
  220. </el-form-item>
  221. <el-form-item>
  222. <el-select
  223. v-model.trim="searchFrom.visited"
  224. clearable
  225. filterable
  226. placeholder="是否回访"
  227. >
  228. <el-option label="否" value="false"></el-option>
  229. <el-option label="是" value="true"></el-option>
  230. </el-select>
  231. </el-form-item>
  232. <el-form-item>
  233. <el-select
  234. v-model.trim="searchFrom.hasCloudTeacher"
  235. clearable
  236. filterable
  237. placeholder="是否购买云教练"
  238. >
  239. <el-option label="是" :value="1"></el-option>
  240. <el-option label="否" :value="0"></el-option>
  241. </el-select>
  242. </el-form-item>
  243. <!-- <el-form-item>
  244. <el-select
  245. v-model.trim="searchFrom.payingStatus"
  246. clearable
  247. filterable
  248. placeholder="交易状态"
  249. >
  250. <el-option label="审核中" :value="2"></el-option>
  251. <el-option label="缴费中" :value="1"></el-option>
  252. </el-select>
  253. </el-form-item> -->
  254. <!-- 专业actualSubjectId 调剂isAllowAdjust 手机号name -->
  255. <el-form-item>
  256. <el-button type="danger" native-type="search">搜索</el-button>
  257. <el-button type="primary" native-type="reset">重置</el-button>
  258. </el-form-item>
  259. </save-form>
  260. </div>
  261. <div class="sigup-core">
  262. <div class="left">
  263. <el-table
  264. style="width: 100% !important"
  265. :data="leftList"
  266. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  267. >
  268. <el-table-column label="乐团声部" prop="subjectName" align="center">
  269. </el-table-column>
  270. <el-table-column
  271. label="计划招生"
  272. prop="expectedStudentNum"
  273. align="center"
  274. >
  275. <template slot-scope="scope">
  276. <div>
  277. <p v-show="!isEdit">{{ scope.row.expectedStudentNum }}</p>
  278. <el-input
  279. v-show="isEdit"
  280. v-model.trim="scope.row.expectedStudentNum"
  281. ></el-input>
  282. </div>
  283. </template>
  284. </el-table-column>
  285. <el-table-column label="已报名" prop="applyStudentNum" align="center">
  286. </el-table-column>
  287. <el-table-column label="已缴费" prop="payNum" align="center">
  288. </el-table-column>
  289. <el-table-column label="缴费中" prop="payingNum" align="center">
  290. </el-table-column>
  291. <el-table-column label="预约中" prop="checkNum" align="center">
  292. </el-table-column>
  293. </el-table>
  294. <div
  295. class="btnWrap"
  296. v-permission="'musicGroup/updateExpectedStudentNum'"
  297. style="margin-right: 20px; margin-top: 20px"
  298. >
  299. <el-button
  300. v-show="
  301. !isEdit &&
  302. (status == 'PAY' ||
  303. status == 'APPLY' ||
  304. status == 'PROGRESS' ||
  305. status == 'PREPARE')
  306. "
  307. @click="isEdit = true"
  308. >编辑</el-button
  309. >
  310. <el-button v-show="isEdit" @click="saveIsEdit">保存</el-button>
  311. </div>
  312. </div>
  313. <div class="right">
  314. <el-table
  315. :data="rightList"
  316. ref="multipleTable"
  317. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  318. @selection-change="handleSelectionChange"
  319. >
  320. <el-table-column
  321. type="selection"
  322. width="55"
  323. :selectable="checkboxSelect"
  324. >
  325. </el-table-column>
  326. <el-table-column label="学员姓名" prop="studentName" align="center">
  327. </el-table-column>
  328. <el-table-column label="家长姓名" prop="parentsName" align="center">
  329. </el-table-column>
  330. <el-table-column align="center" label="入团年份">
  331. <template slot-scope="scope">
  332. <div>
  333. {{ scope.row.createTime | dayjsFormat("YYYY年") }}
  334. </div>
  335. </template>
  336. </el-table-column>
  337. <el-table-column label="年级班级" align="center">
  338. <template slot-scope="scope">
  339. <div>
  340. {{ scope.row.currentGrade + scope.row.currentClass }}
  341. </div>
  342. </template>
  343. </el-table-column>
  344. <el-table-column label="性别" prop="gender" align="center">
  345. <template slot-scope="scope">
  346. <div>
  347. {{ scope.row.gender | sex }}
  348. </div>
  349. </template>
  350. </el-table-column>
  351. <el-table-column label="服从调剂" prop="isAllowAdjust" align="center">
  352. <template slot-scope="scope">
  353. <div>
  354. {{ scope.row.isAllowAdjust | isAllowAdjust }}
  355. </div>
  356. </template>
  357. </el-table-column>
  358. <el-table-column label="报名专业" prop="subjectName" align="center">
  359. </el-table-column>
  360. <el-table-column
  361. label="调剂专业"
  362. prop="actualSubjectName"
  363. align="center"
  364. >
  365. </el-table-column>
  366. <el-table-column label="联系电话" prop="parentsPhone" align="center">
  367. </el-table-column>
  368. <el-table-column label="是否回访" prop="paymentStatus" align="center">
  369. <template slot-scope="scope">
  370. <div>
  371. {{ scope.row.visitNum ? "是" : "否" }}
  372. </div>
  373. </template>
  374. </el-table-column>
  375. <!-- visited -->
  376. <!-- v-show='status == "PAY"' -->
  377. <el-table-column
  378. label="报名缴费状态"
  379. fixed="right"
  380. prop="paymentStatus"
  381. align="center"
  382. >
  383. <template slot-scope="scope">
  384. <div>
  385. {{ scope.row.paymentStatus | paymentStatus }}
  386. </div>
  387. </template>
  388. </el-table-column>
  389. <el-table-column
  390. label="是否购买云教练"
  391. fixed="right"
  392. prop="hasCloudTeacher"
  393. align="center"
  394. >
  395. <template slot-scope="scope">
  396. <div>
  397. {{ scope.row.hasCloudTeacher == 1 ? '是' : '否' }}
  398. </div>
  399. </template>
  400. </el-table-column>
  401. <el-table-column
  402. label="操作"
  403. fixed="right"
  404. width="240"
  405. align="center"
  406. v-if="
  407. status == 'PAY' ||
  408. status == 'APPLY' ||
  409. status == 'PROGRESS' ||
  410. status == 'PREPARE'
  411. "
  412. >
  413. <!-- v-show="
  414. status == 'PAY' || status == 'PROGRESS' || status == 'PREPARE' || status=='APPLY'
  415. " -->
  416. <template slot-scope="scope">
  417. <div>
  418. <auth :auths="'studentRegistration/batchUpdateSubject'">
  419. <el-button
  420. type="text"
  421. v-show="scope.row.paymentStatus != 2"
  422. @click="resetSubject(scope.row)"
  423. >修改专业</el-button
  424. >
  425. </auth>
  426. <!-- APPLY status == "APPLY" || s-->
  427. <el-popover
  428. v-show="scope.row.remark"
  429. placement="top-start"
  430. title="备注"
  431. width="200"
  432. trigger="hover"
  433. :content="scope.row.remark"
  434. >
  435. <el-button type="text" slot="reference">备注</el-button>
  436. </el-popover>
  437. <!-- PAY -->
  438. <!-- && status == "PAY"-->
  439. <auth
  440. :auths="'studentRegistration/queryFeeDetail'"
  441. v-show="scope.row.paymentStatus == 2"
  442. >
  443. <el-button type="text" @click="lookdetail(scope.row)"
  444. >查看</el-button
  445. >
  446. </auth>
  447. <auth
  448. :auths="'musicGroupQuit/directQuitMusicGroup2'"
  449. v-show="scope.row.paymentStatus == 2"
  450. >
  451. <el-button type="text" @click="quitTeam(scope.row)"
  452. >退团退费</el-button
  453. >
  454. </auth>
  455. <auth
  456. :auths="'musicGroupQuit/directQuitMusicGroup3'"
  457. v-show="scope.row.paymentStatus == 2"
  458. >
  459. <el-button type="text" @click="quieTeams(scope.row)"
  460. >退团</el-button
  461. >
  462. </auth>
  463. <auth
  464. :auths="'visit/add/teamSignupList'"
  465. v-if="scope.row.visitNum <= 0"
  466. >
  467. <el-button type="text" @click="addVisit(scope.row)"
  468. >新增回访</el-button
  469. >
  470. </auth>
  471. <auth
  472. :auths="'subjectChange/getStudentOriginal'"
  473. v-show="scope.row.paymentStatus == 2"
  474. >
  475. <el-button type="text" @click="openChangeVoice(scope.row)"
  476. >更改声部</el-button
  477. >
  478. </auth>
  479. </div>
  480. </template>
  481. </el-table-column>
  482. </el-table>
  483. <div
  484. style="margin-top: 10px; margin-bottom: 10px"
  485. v-show="
  486. status == 'APPLY' || status == 'PROGRESS' || status == 'PREPARE'
  487. "
  488. >
  489. <el-button @click="onSelectAll">全选/取消</el-button>
  490. <auth :auths="'studentRegistration/openPayment'">
  491. <el-button
  492. style="background-color: #14928a; border: 1px solid #14928a"
  493. @click="onPartPayment"
  494. type="primary"
  495. >开启缴费</el-button
  496. >
  497. </auth>
  498. <!-- <div class='newBand' v-show="status=='APPLY'">允许缴费</div> -->
  499. </div>
  500. <pagination
  501. sync
  502. :total.sync="rules.total"
  503. :page.sync="rules.page"
  504. :limit.sync="rules.limit"
  505. :page-sizes="rules.page_size"
  506. @pagination="getList"
  507. />
  508. </div>
  509. </div>
  510. <el-dialog title="修改专业" :visible.sync="subjectVisible" width="400px">
  511. <el-form :model="maskForm">
  512. <el-form-item label="选择专业">
  513. <el-select v-model.trim="maskForm.subject" filterable clearable>
  514. <el-option
  515. v-for="(item, index) in soundList"
  516. :key="index"
  517. :label="item.name"
  518. :value="item.id"
  519. ></el-option>
  520. </el-select>
  521. </el-form-item>
  522. </el-form>
  523. <div slot="footer" class="dialog-footer">
  524. <el-button @click="subjectVisible = false">取 消</el-button>
  525. <el-button type="primary" @click="okReset">确 定</el-button>
  526. </div>
  527. </el-dialog>
  528. <el-dialog
  529. :title="!isPay ? '延长报名' : '延长缴费'"
  530. :visible.sync="extendPaymentStatus"
  531. destroy-on-close
  532. width="400px"
  533. >
  534. <el-form :model="extendForm" ref="extendForm" :rules="extendRule">
  535. <el-form-item v-if="isPay" label="延长缴费时间" prop="expireDate">
  536. <el-date-picker
  537. v-model.trim="extendForm.expireDate"
  538. value-format="yyyy-MM-dd"
  539. type="date"
  540. :picker-options="payDate()"
  541. placeholder="选择日期"
  542. >
  543. </el-date-picker>
  544. </el-form-item>
  545. <el-form-item label="延长报名时间" v-else prop="expireDate">
  546. <el-date-picker
  547. v-model.trim="extendForm.expireDate"
  548. value-format="yyyy-MM-dd"
  549. type="date"
  550. :picker-options="applyDates"
  551. placeholder="选择日期"
  552. >
  553. </el-date-picker>
  554. </el-form-item>
  555. </el-form>
  556. <div slot="footer" class="dialog-footer">
  557. <el-button @click="extendPaymentStatus = false">取 消</el-button>
  558. <el-button
  559. type="primary"
  560. v-if="isPay"
  561. @click="onExtendPayment('extendForm', isPay)"
  562. >确 定</el-button
  563. >
  564. <el-button
  565. v-else
  566. type="primary"
  567. @click="onExtendPayment('extendForm', isPay)"
  568. >确 定</el-button
  569. >
  570. </div>
  571. </el-dialog>
  572. <el-dialog title="订单详情" :visible.sync="orderVisible" width="600px">
  573. <el-form :model="orderForm" :inline="true">
  574. <!-- name: '',
  575. totalAmount: '',
  576. subject: '',
  577. subjectFee: '',
  578. axe: '',
  579. axePrice: '',
  580. others: '',
  581. othersPrice: '' -->
  582. <el-form-item label="学员姓名">
  583. <el-input v-model.trim="orderForm.name" disabled=""></el-input>
  584. </el-form-item>
  585. <el-form-item label="实缴金额">
  586. <el-input v-model.trim="orderForm.totalAmount" disabled=""></el-input>
  587. </el-form-item>
  588. <el-form-item label="实际专业">
  589. <el-input v-model.trim="orderForm.subject" disabled=""></el-input>
  590. </el-form-item>
  591. <el-form-item label="课程费用">
  592. <el-input v-model.trim="orderForm.subjectFee" disabled=""></el-input>
  593. </el-form-item>
  594. <el-form-item label="选择乐器">
  595. <el-input v-model.trim="orderForm.axe" disabled=""></el-input>
  596. </el-form-item>
  597. <el-form-item label="乐器价格">
  598. <el-input v-model.trim="orderForm.axePrice" disabled=""></el-input>
  599. </el-form-item>
  600. <el-form-item label="教辅组合">
  601. <el-input v-model.trim="orderForm.others" disabled=""></el-input>
  602. </el-form-item>
  603. <el-form-item label="组合价格">
  604. <el-input v-model.trim="orderForm.othersPrice" disabled=""></el-input>
  605. </el-form-item>
  606. </el-form>
  607. <div slot="footer" class="dialog-footer">
  608. <!-- <el-button>取 消</el-button> -->
  609. <el-button type="primary" @click="orderVisible = false"
  610. >确 定</el-button
  611. >
  612. </div>
  613. </el-dialog>
  614. <el-dialog
  615. title="开始缴费"
  616. :visible.sync="paymentStatus"
  617. width="400px"
  618. destroy-on-close
  619. >
  620. <el-form
  621. ref="paymentForm"
  622. class="paymentForm"
  623. :model="paymentForm"
  624. label-position="top"
  625. :rules="paymentRules"
  626. >
  627. <el-form-item label="请设置缴费截止日期" prop="paymentExpireDate">
  628. <el-date-picker
  629. v-model.trim="paymentForm.paymentExpireDate"
  630. type="date"
  631. value-format="yyyy-MM-dd"
  632. :picker-options="payDate()"
  633. style="width: 100%"
  634. placeholder="选择日期"
  635. >
  636. </el-date-picker>
  637. </el-form-item>
  638. <!-- <el-form-item label="是否排乐团网管课"
  639. :rules="[{ required: true, message: '请选择是否排乐团网管课'}]"
  640. prop="feeType">
  641. <el-select v-model="paymentForm.feeType"
  642. style="width: 100%!imoprtant">
  643. <el-option label="需要排线上课"
  644. value="ONLINE"></el-option>
  645. <el-option label="只排线下课"
  646. value="OFFLINE"></el-option>
  647. </el-select>
  648. </el-form-item> -->
  649. </el-form>
  650. <div slot="footer" class="dialog-footer">
  651. <el-button @click="paymentStatus = false">取 消</el-button>
  652. <el-button type="primary" @click="onStartPayment('paymentForm')"
  653. >确 定</el-button
  654. >
  655. </div>
  656. </el-dialog>
  657. <!-- <el-dialog title="报名二维码" :visible.sync="qrcodeStatus" width="300px">
  658. <div class="left-code">
  659. <h2>学员报名链接</h2>
  660. <div id="qrcode" class="qrcode code" ref="qrCodeUrl"></div>
  661. <p class="code-url" v-show="codeUrl">{{ codeUrl }}</p>
  662. </div>
  663. </el-dialog>
  664. <el-dialog
  665. title="缴费详情二维码"
  666. :visible.sync="qrcodeStatus2"
  667. width="300px"
  668. >
  669. <div class="right-code">
  670. <h2>报名缴费详情</h2>
  671. <div id="qrcode2" class="qrcode code" ref="qrCodeUrl"></div>
  672. <p class="code-url" v-show="codeUrl2">{{ codeUrl2 }}</p>
  673. </div>
  674. </el-dialog> -->
  675. <!-- 预报名链接 -->
  676. <qr-code v-model="codeStatus" :title="codeTitle" :codeUrl="qrCodeUrl" />
  677. <!-- 退团弹窗 -->
  678. <el-dialog
  679. title="退团信息确认"
  680. :destroy-on-close="true"
  681. width="640px"
  682. :visible.sync="quitVisible"
  683. >
  684. <el-form :model="quitForm" ref="quitForm" label-width="150px" :rules="quitRules">
  685. <el-form-item
  686. label="退还云教练费用"
  687. prop="isCloudTeacherAmount"
  688. v-if="activeRow.cloudTeacherAmount > 0"
  689. >
  690. <el-radio v-model.trim="quitForm.isCloudTeacherAmount" :label="true"
  691. >是</el-radio
  692. >
  693. <el-radio v-model.trim="quitForm.isCloudTeacherAmount" :label="false"
  694. >否</el-radio
  695. >
  696. </el-form-item>
  697. <el-form-item
  698. label="退还云教练金额"
  699. prop="cloudTeacherAmount"
  700. v-if="quitForm.isCloudTeacherAmount"
  701. >
  702. <el-input
  703. type="number"
  704. v-model.trim="quitForm.cloudTeacherAmount"
  705. style="width: 180px"
  706. >
  707. <template slot="append">元</template>
  708. </el-input>
  709. </el-form-item>
  710. <el-form-item label="退还课程费用" prop="isRefundCourseFee">
  711. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="true"
  712. >是</el-radio
  713. >
  714. <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="false"
  715. >否</el-radio
  716. >
  717. </el-form-item>
  718. <el-form-item label="退还乐器费用" prop="isRefundInstrumentFee">
  719. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="true"
  720. >是</el-radio
  721. >
  722. <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="false"
  723. >否</el-radio
  724. >
  725. </el-form-item>
  726. <el-form-item label="退还教辅费用" prop="isRefundTeachingAssistantsFee">
  727. <el-radio
  728. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  729. :label="true"
  730. >是</el-radio
  731. >
  732. <el-radio
  733. v-model.trim="quitForm.isRefundTeachingAssistantsFee"
  734. :label="false"
  735. >否</el-radio
  736. >
  737. </el-form-item>
  738. <el-form-item
  739. label="退还乐保费用"
  740. prop="isMaintenanceFee"
  741. v-if="activeRow.hasMaintenance"
  742. >
  743. <el-radio v-model.trim="quitForm.isMaintenanceFee" :label="true"
  744. >是</el-radio
  745. >
  746. <el-radio v-model.trim="quitForm.isMaintenanceFee" :label="false"
  747. >否</el-radio
  748. >
  749. </el-form-item>
  750. <el-form-item
  751. label="退还乐保金额"
  752. prop="maintenanceFee"
  753. v-if="quitForm.isMaintenanceFee"
  754. >
  755. <el-input
  756. type="number"
  757. v-model.trim="quitForm.maintenanceFee"
  758. style="width: 180px"
  759. >
  760. <template slot="append">元</template>
  761. </el-input>
  762. </el-form-item>
  763. <el-form-item label="退团原因" prop="reason">
  764. <el-input type="textarea" v-model.trim="quitForm.reason"> </el-input>
  765. </el-form-item>
  766. </el-form>
  767. <span slot="footer" class="dialog-footer question">
  768. <div>
  769. <el-popover placement="right" width="500" trigger="click">
  770. <div class="popoverWrap">
  771. <p>乐团退团退费规则:</p>
  772. <p>退还乐器练习云教练费用:报名缴费时缴费的乐器练习云教练费用</p>
  773. <p>退还课程费用:缴费总额-已结束课时单价之和</p>
  774. <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
  775. <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
  776. <p>退还乐保费用:报名缴费时缴费的乐保费用</p>
  777. </div>
  778. <el-button
  779. type="text"
  780. icon="el-icon-question"
  781. slot="reference"
  782. style="color: red"
  783. >退团退费说明</el-button
  784. >
  785. </el-popover>
  786. </div>
  787. <div>
  788. <el-button @click="quitVisible = false">取 消</el-button>
  789. <el-button type="primary" @click="chioseType">确 定</el-button>
  790. </div>
  791. </span>
  792. </el-dialog>
  793. <!-- 回访记录 -->
  794. <el-dialog
  795. title="新增回访"
  796. width="500px"
  797. destroy-on-close
  798. :close-on-click-modal="false"
  799. :visible.sync="visitVisiable"
  800. >
  801. <visit
  802. v-if="visitVisiable && detail"
  803. :detail="detail"
  804. @close="visitVisiable = false"
  805. @submited="getList"
  806. />
  807. </el-dialog>
  808. <el-dialog
  809. title="更改声部"
  810. :visible.sync="changeVoiceVisible"
  811. v-if="changeVoiceVisible"
  812. width="600px"
  813. >
  814. <changeVoice
  815. @close="closeChangeVoice"
  816. @submited="getList"
  817. :detail.sync="rowDetail"
  818. :musicGroupId="id"
  819. :voiceList="leftList"
  820. />
  821. </el-dialog>
  822. </div>
  823. </template>
  824. <script>
  825. import pagination from "@/components/Pagination/index";
  826. import qrCode from "@/components/QrCode/index";
  827. import {
  828. getintoClass,
  829. getStudentList,
  830. findSound,
  831. musicGroupOpenPay,
  832. openPayment,
  833. musicGroupFound,
  834. extensionPayment,
  835. extensionApplyExpire,
  836. resetPlanNum,
  837. cancelMusicGroup,
  838. getTeamBaseInfo,
  839. studentApplyDetailExport,
  840. StudentQuit,
  841. getMusicGroupGradeList,
  842. checkCanReg,
  843. } from "@/api/buildTeam";
  844. import mergeMusic from "./components/merge-music";
  845. import forecastList from "./components/forecast-list";
  846. import { resetStudentSubject, getStudentFeeDetail } from "@/api/studentManager";
  847. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  848. import { addVisit } from "@/views/returnVisitManager/api.js";
  849. import QRCode from "qrcodejs2";
  850. import { visitChiose } from "@/utils/searchArray";
  851. import axios from "axios";
  852. import { getToken } from "@/utils/auth";
  853. import load from "@/utils/loading";
  854. import qs from "qs";
  855. import { permission } from "@/utils/directivePage";
  856. import cleanDeep from "clean-deep";
  857. import changeVoice from "./modals/change-voice";
  858. import visit from "@/views/withdrawal-application/modals/visit";
  859. export default {
  860. name: "signupList",
  861. components: {
  862. pagination,
  863. qrCode,
  864. changeVoice,
  865. mergeMusic,
  866. forecastList,
  867. visit,
  868. },
  869. data() {
  870. return {
  871. multipleSelection: [], //
  872. forecastVisible: false, // 预报名状态
  873. isEdit: false,
  874. rowDetail: null,
  875. mergeVisible: false,
  876. changeVoiceVisible: false,
  877. subjectVisible: false,
  878. orderVisible: false,
  879. quitVisible: false,
  880. leftList: [],
  881. rightList: [],
  882. searchFrom: {
  883. name: "",
  884. subject: "", // 专业
  885. isAllowAdjust: "", // 是否允许调剂
  886. currentGrade: null, // 入学年级
  887. paymentStatus: "",
  888. visited: "",
  889. hasCloudTeacher: null, // 是否购买云教练
  890. payingStatus: null,
  891. },
  892. quitForm: {
  893. // 退团信息确认
  894. isRefundCourseFee: null,
  895. isRefundInstrumentFee: null,
  896. isRefundTeachingAssistantsFee: null,
  897. isMaintenanceFee: null,
  898. cloudTeacherAmount: null,
  899. isCloudTeacherAmount: null,
  900. maintenanceFee: 0,
  901. reason: "",
  902. },
  903. stepImgs: {
  904. APPLY: require("@/assets/images/base/clock.png"),
  905. PAY: require("@/assets/images/base/pay.png"),
  906. },
  907. status: "",
  908. id: "",
  909. rules: {
  910. // 分页规则
  911. limit: 10, // 限制显示条数
  912. page: 1, // 当前页
  913. total: 0, // 总条数
  914. page_size: [10, 20, 30, 40], // 选择限制显示条数
  915. },
  916. teamName: "",
  917. maskForm: {
  918. subject: "",
  919. },
  920. activeId: "",
  921. soundList: [],
  922. orderForm: {
  923. name: "",
  924. totalAmount: "",
  925. subject: "",
  926. subjectFee: "",
  927. axe: "",
  928. axePrice: "",
  929. others: "",
  930. othersPrice: "",
  931. },
  932. paymentStatus: false,
  933. paymentForm: {
  934. paymentExpireDate: null,
  935. // feeType: null
  936. },
  937. paymentRules: {
  938. paymentExpireDate: [
  939. { required: true, message: "请设置缴费截止日期", trigger: "blur" },
  940. ],
  941. },
  942. paymentNum: 0, // 缴费了多少人
  943. qrcodeStatus: false, // 生成二维码
  944. qrcodes: true,
  945. qrcode: null,
  946. codeUrl: null,
  947. qrcodeStatus2: false, // 生成二维码
  948. qrcodes2: true,
  949. qrcode2: null,
  950. codeUrl2: null,
  951. codeStatus: false,
  952. codeTitle: null,
  953. qrCodeUrl: null,
  954. organId: "",
  955. extendPaymentStatus: false,
  956. extendForm: {
  957. expireDate: null,
  958. },
  959. extendRule: {
  960. expireDate: [
  961. { required: true, message: "请选择延长时间", trigger: "change" },
  962. ],
  963. },
  964. quitRules: {
  965. isCloudTeacherAmount: [{ required: true, message: "请输入云教练费用" }],
  966. cloudTeacherAmount: [{ required: true, message: "请输入云教练金额", trigger: 'blur' }],
  967. isRefundCourseFee: [{ required: true, message: "请选择是否退还课程费用" }],
  968. isRefundInstrumentFee: [
  969. { required: true, message: "选择是否退还乐器费用" },
  970. ],
  971. isRefundTeachingAssistantsFee: [
  972. { required: true, message: "选择是否退还教辅费用" },
  973. ],
  974. isMaintenanceFee: [{ required: true, message: "选择是否退还乐保费用" }],
  975. maintenanceFee: [{ required: true, message: "请输入退还乐保金额" }],
  976. reason: [{ required: true, message: "请填写退团退费原因" }],
  977. },
  978. applyExpireDate: "",
  979. paymentExpireDate: "",
  980. activeRow: { hasMaintenance: false },
  981. visitVisiable: false,
  982. visitForm: {
  983. musicGroupId: "",
  984. overview: "",
  985. purpose: "",
  986. studentId: "",
  987. type: "",
  988. visitTime: "",
  989. visitType: "",
  990. feedback: "",
  991. studentName: "",
  992. },
  993. visitChiose,
  994. visitRules: {
  995. overview: [{ required: true, message: "请输入学生近况" }],
  996. feedback: [{ required: true, message: "请输入家长反馈" }],
  997. visitTime: [{ required: true, message: "请输入回访时间" }],
  998. visitType: [{ required: true, message: "请选择回访类型" }],
  999. },
  1000. isPay: false,
  1001. applyDates: this.applyDate(),
  1002. detail: null,
  1003. gradeList: [],
  1004. ischeckCanReg: false,
  1005. };
  1006. },
  1007. created() {},
  1008. mounted() {
  1009. // 通过乐团状态判断显示隐藏的东西
  1010. this.init();
  1011. },
  1012. activated() {
  1013. this.init();
  1014. },
  1015. methods: {
  1016. permission(str) {
  1017. return permission(str);
  1018. },
  1019. async init() {
  1020. this.status = this.$route.query.team_status;
  1021. // 通过乐团id 获取乐团招生状态
  1022. this.id = this.$route.query.id;
  1023. this.teamName = this.$route.query.name;
  1024. // 判断是否带缓存参数
  1025. this.pickerOptions = this.beginDate(new Date());
  1026. // checkCanReg
  1027. try {
  1028. this.ischeckCanReg = await (
  1029. await checkCanReg({ musicGroupId: this.id })
  1030. ).data;
  1031. console.log(this.ischeckCanReg);
  1032. } catch (e) {
  1033. console.log(e);
  1034. }
  1035. getMusicGroupGradeList({ musicGroupId: this.id }).then((res) => {
  1036. let result = res.data;
  1037. if (res.code == 200 && result) {
  1038. for (let i in result) {
  1039. this.gradeList.push({
  1040. value: i,
  1041. label: result[i],
  1042. });
  1043. }
  1044. }
  1045. });
  1046. getTeamBaseInfo({ musicGroupId: this.id }).then((res) => {
  1047. if (res.code == 200) {
  1048. this.organId = res.data.musicGroup.organId;
  1049. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1050. this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1051. }
  1052. });
  1053. // 根据乐团id获乐团声部
  1054. findSound({ musicGroupId: this.id }).then((res) => {
  1055. if (res.code == 200) {
  1056. this.soundList = res.data;
  1057. }
  1058. });
  1059. // 通过乐团id获取乐团学生列表
  1060. this.getList();
  1061. },
  1062. search() {
  1063. this.rules.page = 1;
  1064. this.getList();
  1065. },
  1066. onReset() {
  1067. this.rules.page = 1;
  1068. this.rules.limit = 10;
  1069. this.searchFrom = {
  1070. name: null,
  1071. subject: null, // 专业
  1072. isAllowAdjust: null, // 是否允许调剂
  1073. currentGrade: null,
  1074. paymentStatus: null,
  1075. visited: null,
  1076. hasCloudTeacher: null,
  1077. payingStatus: null,
  1078. };
  1079. this.getList();
  1080. },
  1081. onCancel() {
  1082. this.$store.dispatch("delVisitedViews", this.$route);
  1083. this.$router.push({ path: "/teamList" });
  1084. },
  1085. payStart() {
  1086. this.paymentStatus = true;
  1087. getTeamBaseInfo({ musicGroupId: this.id }).then((res) => {
  1088. if (res.code == 200) {
  1089. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1090. this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1091. }
  1092. });
  1093. },
  1094. getList() {
  1095. let obj = {
  1096. musicGroupId: this.id,
  1097. actualSubjectId: this.searchFrom.subject || null,
  1098. isAllowAdjust: this.searchFrom.isAllowAdjust || null,
  1099. name: this.searchFrom.name || null,
  1100. currentGrade: this.searchFrom.currentGrade || null,
  1101. paymentStatus: this.searchFrom.paymentStatus || null,
  1102. visited: this.searchFrom.visited || null,
  1103. hasCloudTeacher: this.searchFrom.hasCloudTeacher,
  1104. payingStatus: this.searchFrom.payingStatus,
  1105. page: this.rules.page,
  1106. rows: this.rules.limit,
  1107. };
  1108. // 根据乐团id获取学团情况
  1109. getintoClass({ musicGroupId: this.id }).then((res) => {
  1110. if (res.code == 200) {
  1111. this.leftList = res.data;
  1112. }
  1113. });
  1114. return getStudentList(obj).then((res) => {
  1115. if (res.code == 200) {
  1116. res.data.rows.forEach((item) => {
  1117. // '未开启缴费', '开启缴费', '已缴费'
  1118. if (item.paymentStatus == 2) {
  1119. this.paymentNum += 1;
  1120. }
  1121. });
  1122. this.rightList = res.data.rows;
  1123. this.rules.total = res.data.total;
  1124. return res;
  1125. }
  1126. });
  1127. },
  1128. onStartPayment(formName) {
  1129. // 开启缴费
  1130. this.$refs[formName].validate((valid) => {
  1131. if (valid) {
  1132. musicGroupOpenPay({
  1133. musicGroupId: this.id,
  1134. expireDate: this.paymentForm.paymentExpireDate,
  1135. // feeType: this.paymentForm.feeType
  1136. }).then((res) => {
  1137. if (res.code == 200) {
  1138. this.$message.success("开启成功");
  1139. this.paymentStatus = false;
  1140. this.$store.dispatch("delVisitedViews", this.$route);
  1141. this.$router.push({
  1142. path: "/teamList",
  1143. });
  1144. this.status = "PAY";
  1145. this.paymentExpireDate = this.paymentForm.paymentExpireDate;
  1146. this.getList();
  1147. }
  1148. });
  1149. } else {
  1150. return false;
  1151. }
  1152. });
  1153. },
  1154. onSelectAll() {
  1155. // 选中全部
  1156. this.$refs.multipleTable.toggleAllSelection();
  1157. },
  1158. onPartPayment() {
  1159. // 部分缴费
  1160. let selection = this.multipleSelection;
  1161. if (selection.length <= 0) {
  1162. this.$message.error("您还没有选择学生");
  1163. return false;
  1164. }
  1165. let ids = [];
  1166. selection.forEach((item) => {
  1167. ids.push(item.id);
  1168. });
  1169. this.$confirm(`是否确认开启缴费?`, "提示", {
  1170. confirmButtonText: "确定",
  1171. cancelButtonText: "取消",
  1172. type: "warning",
  1173. })
  1174. .then(() => {
  1175. openPayment({
  1176. ids: ids.join(","),
  1177. }).then((res) => {
  1178. if (res.code == 200) {
  1179. this.$message.success("开启成功");
  1180. this.getList();
  1181. } else {
  1182. this.$message.error(res.msg);
  1183. }
  1184. });
  1185. })
  1186. .catch(() => {});
  1187. },
  1188. onCreateQRCode(type) {
  1189. // 生成报名二维码
  1190. let id = this.id;
  1191. this.codeStatus = true;
  1192. if (type == "payment") {
  1193. this.codeTitle = "学员报名链接";
  1194. this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  1195. } else if (type == "detail") {
  1196. let teamName = this.$route.query.name;
  1197. this.codeTitle = "报名缴费详情";
  1198. this.qrCodeUrl =
  1199. vaildTeacherUrl() +
  1200. "/#/order?musicGroupId=" +
  1201. id +
  1202. "&musicGroupName=" +
  1203. teamName;
  1204. } else if (type == "rePayment") {
  1205. this.codeTitle = "学生报名链接(无乐器)";
  1206. this.qrCodeUrl =
  1207. vaildStudentUrl() + "/#/login?musicGroupId=" + id + "&instrument=1";
  1208. }
  1209. },
  1210. onCreateQRCode2() {
  1211. // 生成报名二维码
  1212. this.qrcodeStatus2 = true;
  1213. let id = this.id;
  1214. let teamName = this.$route.query.name;
  1215. setTimeout(() => {
  1216. document.getElementById("qrcode2").innerHTML = "";
  1217. this.qrcode2 = new QRCode("qrcode2", {
  1218. width: 200,
  1219. height: 200,
  1220. colorDark: "#000000",
  1221. colorLight: "#ffffff",
  1222. correctLevel: QRCode.CorrectLevel.H,
  1223. });
  1224. this.qrcode2.makeCode(
  1225. vaildTeacherUrl() +
  1226. "/#/order?musicGroupId=" +
  1227. id +
  1228. "&musicGroupName=" +
  1229. teamName
  1230. );
  1231. this.codeUrl2 =
  1232. vaildTeacherUrl() +
  1233. "/#/order?musicGroupId=" +
  1234. id +
  1235. "&musicGroupName=" +
  1236. teamName;
  1237. }, 500);
  1238. },
  1239. onDownLoadExecl() {
  1240. // 报表导出
  1241. let url = "/api-web/studentRegistration/queryStudentApplyDetailExport";
  1242. let data = {
  1243. musicGroupId: this.$route.query.id,
  1244. page: 1,
  1245. rows: 9999,
  1246. };
  1247. const options = {
  1248. method: "POST",
  1249. headers: {
  1250. Authorization: getToken(),
  1251. },
  1252. data: qs.stringify(data),
  1253. url,
  1254. responseType: "blob",
  1255. };
  1256. this.$confirm("您确定导出吗?", "提示", {
  1257. confirmButtonText: "确定",
  1258. cancelButtonText: "取消",
  1259. type: "warning",
  1260. })
  1261. .then(() => {
  1262. load.startLoading();
  1263. axios(options)
  1264. .then((res) => {
  1265. let blob = new Blob([res.data], {
  1266. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  1267. type: "application/vnd.ms-excel;charset=utf-8",
  1268. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1269. });
  1270. let text = new Response(blob).text();
  1271. text.then((res) => {
  1272. // 判断是否报错
  1273. if (res.indexOf("code") != -1) {
  1274. let json = JSON.parse(res);
  1275. this.$message.error(json.msg);
  1276. } else {
  1277. let objectUrl = URL.createObjectURL(blob);
  1278. let link = document.createElement("a");
  1279. let nowTime = new Date();
  1280. let ymd =
  1281. nowTime.getFullYear() +
  1282. "" +
  1283. (nowTime.getMonth() + 1) +
  1284. "" +
  1285. nowTime.getDate() +
  1286. "" +
  1287. nowTime.getHours() +
  1288. "" +
  1289. nowTime.getMinutes();
  1290. let fname = this.$route.query.id + "-" + ymd + ".xls"; //下载文件的名字
  1291. link.href = objectUrl;
  1292. link.setAttribute("download", fname);
  1293. document.body.appendChild(link);
  1294. link.click();
  1295. }
  1296. });
  1297. load.endLoading();
  1298. })
  1299. .catch((error) => {
  1300. this.$message.error("导出数据失败,请联系管理员");
  1301. load.endLoading();
  1302. });
  1303. })
  1304. .catch(() => {});
  1305. },
  1306. onGoHome() {
  1307. // 确认开团
  1308. // 判断是否有学生缴费
  1309. if (this.paymentNum <= 0) {
  1310. this.$message.error("当前缴费人数为0,无法开团");
  1311. return;
  1312. }
  1313. this.$confirm(`是否确认开团?`, "提示", {
  1314. confirmButtonText: "确定",
  1315. cancelButtonText: "取消",
  1316. type: "warning",
  1317. })
  1318. .then(() => {
  1319. musicGroupFound({
  1320. musicGroupId: this.$route.query.id,
  1321. }).then((res) => {
  1322. if (res.code == 200) {
  1323. // let query = this.$route.query;
  1324. // this.$message.success("开启成功");
  1325. // this.$router.push({
  1326. // path: "/teamList",
  1327. // query: {
  1328. // ...query,
  1329. // },
  1330. // });
  1331. this.onCancel();
  1332. }
  1333. });
  1334. })
  1335. .catch(() => {});
  1336. },
  1337. onClose() {
  1338. // 停止乐团
  1339. this.$confirm("您确定停止乐团吗?", "提示", {
  1340. confirmButtonText: "确定",
  1341. cancelButtonText: "取消",
  1342. type: "warning",
  1343. })
  1344. .then(() => {
  1345. cancelMusicGroup({
  1346. musicGroupId: this.$route.query.id,
  1347. }).then((res) => {
  1348. if (res.code == 200) {
  1349. this.$message.success("停止成功");
  1350. this.$store.dispatch("delVisitedViews", this.$route);
  1351. this.$router.push({
  1352. path: "/teamList",
  1353. });
  1354. }
  1355. });
  1356. })
  1357. .catch(() => {});
  1358. },
  1359. handleSelectionChange(val) {
  1360. this.multipleSelection = val;
  1361. },
  1362. // 修改专业
  1363. resetSubject(row) {
  1364. console.log(row);
  1365. this.activeId = row.studentId;
  1366. this.maskForm.subject = row.actualSubjectId;
  1367. this.subjectVisible = true;
  1368. // resetStudentSubject().then(res=>{]})
  1369. },
  1370. // 确认修改
  1371. okReset() {
  1372. if (!this.maskForm.subject) {
  1373. this.$message.error("请选择调剂专业");
  1374. return;
  1375. }
  1376. resetStudentSubject({
  1377. musicGroupId: this.id,
  1378. userId: this.activeId,
  1379. subId: this.maskForm.subject,
  1380. }).then((res) => {
  1381. if (res.code == 200) {
  1382. this.$message.success("修改成功");
  1383. this.subjectVisible = false;
  1384. this.maskForm.subject = "";
  1385. getintoClass({ musicGroupId: this.id }).then((res) => {
  1386. if (res.code == 200) {
  1387. this.leftList = res.data;
  1388. }
  1389. });
  1390. this.getList();
  1391. }
  1392. });
  1393. },
  1394. onExtendPayment(formName, isPay) {
  1395. this.$refs[formName].validate((valid) => {
  1396. if (valid) {
  1397. if (!isPay) {
  1398. extensionApplyExpire({
  1399. musicGroupId: this.id,
  1400. expireDate: this.extendForm.expireDate,
  1401. }).then((res) => {
  1402. if (res.code == 200) {
  1403. this.$message.success("延长报名成功");
  1404. this.extendPaymentStatus = false;
  1405. getTeamBaseInfo({ musicGroupId: this.id }).then((res) => {
  1406. if (res.code == 200) {
  1407. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1408. }
  1409. });
  1410. } else {
  1411. this.$message.error(res.msg);
  1412. }
  1413. });
  1414. } else {
  1415. extensionPayment({
  1416. musicGroupId: this.id,
  1417. expireDate: this.extendForm.expireDate,
  1418. }).then((res) => {
  1419. if (res.code == 200) {
  1420. this.$message.success("延长缴费成功");
  1421. this.extendPaymentStatus = false;
  1422. getTeamBaseInfo({ musicGroupId: this.id }).then((res) => {
  1423. if (res.code == 200) {
  1424. this.paymentExpireDate =
  1425. res.data.musicGroup.paymentExpireDate;
  1426. }
  1427. });
  1428. } else {
  1429. this.$message.error(res.msg);
  1430. }
  1431. });
  1432. }
  1433. }
  1434. });
  1435. },
  1436. lookdetail(row) {
  1437. this.orderVisible = true;
  1438. this.activeId = row.studentId;
  1439. this.orderForm.name = row.studentName;
  1440. this.orderForm.subject = row.subjectName;
  1441. getStudentFeeDetail({
  1442. musicGroupId: this.id,
  1443. studentId: row.studentId,
  1444. }).then((res) => {
  1445. if (res.code == 200) {
  1446. if (res.data) {
  1447. this.orderForm.totalAmount = res.data.totalAmount;
  1448. // this.orderForm.subjectFee = res.data.courseFee;
  1449. let goodStr = "";
  1450. let goodPrice = 0;
  1451. let otherStr = "";
  1452. let othersPrice = 0;
  1453. for (let i in res.data.goods) {
  1454. if (res.data.goods[i].goodsType == "INSTRUMENT") {
  1455. goodStr += res.data.goods[i].goodsName + ",";
  1456. goodPrice += parseFloat(res.data.goods[i].musicalFee);
  1457. // this.orderForm.axe = res.data.goods[i].goodsName;
  1458. // this.orderForm.axePrice = res.data.goods[i].musicalFee;
  1459. } else if (res.data.goods[i].goodsType == "ACCESSORIES") {
  1460. otherStr += res.data.goods[i].goodsName + ",";
  1461. othersPrice += parseFloat(res.data.goods[i].musicalFee);
  1462. // this.orderForm.others = res.data.goods[i].goodsName;
  1463. // this.orderForm.othersPrice = res.data.goods[i].musicalFee;
  1464. } else if (res.data.goods[i].goodsType == "COURSE") {
  1465. this.orderForm.subjectFee = res.data.goods[i].musicalFee;
  1466. }
  1467. }
  1468. this.orderForm.others = otherStr.substring(0, otherStr.length - 1);
  1469. this.orderForm.othersPrice = othersPrice;
  1470. this.orderForm.axe = goodStr.substring(0, goodStr.length - 1);
  1471. this.orderForm.axePrice = goodPrice;
  1472. }
  1473. }
  1474. });
  1475. },
  1476. saveIsEdit() {
  1477. // 提交数据
  1478. this.isEdit = false;
  1479. resetPlanNum(this.leftList).then((res) => {});
  1480. },
  1481. quitTeam(row) {
  1482. this.activeRow = row;
  1483. this.quitVisible = true;
  1484. this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount
  1485. },
  1486. quieTeams(row) {
  1487. this.$prompt("请输入退团原因", "提示", {
  1488. confirmButtonText: "确定",
  1489. cancelButtonText: "取消",
  1490. inputPattern: /\S/,
  1491. inputErrorMessage: "请输入退团原因",
  1492. type: "warning",
  1493. })
  1494. .then((val) => {
  1495. // 发请求 退团
  1496. StudentQuit({
  1497. musicGroupId: this.id,
  1498. userId: row.studentId,
  1499. reason: val.value,
  1500. isRefundCourseFee: false,
  1501. isRefundInstrumentFee: false,
  1502. isRefundTeachingAssistantsFee: false,
  1503. }).then((res) => {
  1504. this.quitForm = {
  1505. // 退团信息确认
  1506. isRefundCourseFee: null,
  1507. isRefundInstrumentFee: null,
  1508. isRefundTeachingAssistantsFee: null,
  1509. isMaintenanceFee: null,
  1510. cloudTeacherAmount: null,
  1511. isCloudTeacherAmount: null,
  1512. maintenanceFee: 0,
  1513. reason: "",
  1514. };
  1515. if (res.code == 200) {
  1516. this.$message.success("退团成功");
  1517. this.getList();
  1518. this.quitVisible = false;
  1519. }
  1520. });
  1521. })
  1522. .catch(() => {});
  1523. },
  1524. chioseType() {
  1525. this.$refs["quitForm"].validate((res) => {
  1526. if (res) {
  1527. this.$confirm("确定退团?", "提示", {
  1528. confirmButtonText: "确定",
  1529. cancelButtonText: "取消",
  1530. type: "warning",
  1531. })
  1532. .then(() => {
  1533. let row = this.activeRow;
  1534. let params = {
  1535. musicGroupId: this.id,
  1536. userId: row.studentId,
  1537. reason: this.quitForm.reason,
  1538. isRefundCourseFee: this.quitForm.isRefundCourseFee,
  1539. isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
  1540. isRefundTeachingAssistantsFee: this.quitForm
  1541. .isRefundTeachingAssistantsFee,
  1542. maintenanceFee: this.quitForm.maintenanceFee,
  1543. }
  1544. // 退还乐器练习云教练费用
  1545. if(this.quitForm.isCloudTeacherAmount) {
  1546. params.cloudTeacherAmount = this.quitForm.cloudTeacherAmount
  1547. } else {
  1548. params.cloudTeacherAmount = 0
  1549. }
  1550. // 发请求 退团
  1551. StudentQuit(params).then((res) => {
  1552. this.quitForm = {
  1553. // 退团信息确认
  1554. isRefundCourseFee: null,
  1555. isRefundInstrumentFee: null,
  1556. isRefundTeachingAssistantsFee: null,
  1557. isMaintenanceFee: null,
  1558. cloudTeacherAmount: null,
  1559. isCloudTeacherAmount: null,
  1560. maintenanceFee: 0,
  1561. reason: "",
  1562. };
  1563. if (res.code == 200) {
  1564. this.$message.success("退团成功");
  1565. this.getList();
  1566. this.quitVisible = false;
  1567. }
  1568. });
  1569. })
  1570. .catch(() => {});
  1571. } else {
  1572. }
  1573. });
  1574. // row.typeVisible = false;
  1575. },
  1576. addVisit(row) {
  1577. // this.visitForm.studentName = row.studentName;
  1578. // this.visitForm.musicGroupId = this.teamid;
  1579. // this.visitForm.studentId = row.studentId;
  1580. row.userId = row.studentId;
  1581. this.detail = row;
  1582. this.detail.musicGroupId = this.$route.query.id;
  1583. this.visitVisiable = true;
  1584. },
  1585. openChangeVoice(row) {
  1586. this.getList().then((res) => {
  1587. for (const item of res.data.rows) {
  1588. if (item.id === row.id) {
  1589. this.rowDetail = { ...item, userId: item.studentId };
  1590. // console.log(this.rowDetail)
  1591. this.changeVoiceVisible = true;
  1592. }
  1593. }
  1594. });
  1595. },
  1596. closeChangeVoice() {
  1597. this.changeVoiceVisible = false;
  1598. // this.rowDetail = null
  1599. },
  1600. handleChange(val) {
  1601. this.visitForm.type = val[0];
  1602. this.visitForm.purpose = val[1];
  1603. },
  1604. submitAddVisit() {
  1605. this.$refs.visitForm.validate((res) => {
  1606. if (res) {
  1607. this.visitForm.visitType = null;
  1608. this.visitForm.musicGroupId = this.id;
  1609. addVisit(cleanDeep(this.visitForm)).then((res) => {
  1610. if (res.code === 200) {
  1611. this.$message.success("新增成功");
  1612. this.visitVisiable = false;
  1613. }
  1614. });
  1615. }
  1616. });
  1617. },
  1618. beginDate(date) {
  1619. let self = this;
  1620. return {
  1621. firstDayOfWeek: 1,
  1622. disabledDate(time) {
  1623. return time.getTime() >= date.getTime(); //开始时间不选时,结束时间最大值小于等于当天
  1624. },
  1625. };
  1626. },
  1627. extendTime(isPay) {
  1628. this.isPay = isPay;
  1629. if (isPay) {
  1630. // 点击的延长缴费
  1631. this.extendForm.expireDate = this.paymentExpireDate;
  1632. } else {
  1633. // 点击的延长报名
  1634. this.extendForm.expireDate = this.applyExpireDate;
  1635. }
  1636. this.extendPaymentStatus = true;
  1637. },
  1638. payDate() {
  1639. let self = this;
  1640. return {
  1641. firstDayOfWeek: 1,
  1642. disabledDate(time) {
  1643. return time.getTime() + 86400000 < new Date().getTime();
  1644. },
  1645. };
  1646. },
  1647. applyDate() {
  1648. let self = this;
  1649. return {
  1650. firstDayOfWeek: 1,
  1651. disabledDate(time) {
  1652. return time.getTime() + 86400000 < new Date().getTime();
  1653. },
  1654. };
  1655. },
  1656. checkboxSelect(row) {
  1657. return row.paymentStatus == 0;
  1658. },
  1659. },
  1660. watch: {
  1661. "quitForm.isMaintenanceFee"(val) {
  1662. if (val) {
  1663. this.quitForm.maintenanceFee = 300;
  1664. } else {
  1665. this.quitForm.maintenanceFee = 0;
  1666. }
  1667. },
  1668. orderVisible(val) {
  1669. if (!val) {
  1670. this.orderForm = {
  1671. name: "",
  1672. totalAmount: "",
  1673. subject: "",
  1674. subjectFee: "",
  1675. axe: "",
  1676. axePrice: "",
  1677. others: "",
  1678. othersPrice: "",
  1679. };
  1680. }
  1681. },
  1682. qrcodeStatus(val) {
  1683. if (!val) {
  1684. this.qrcode.clear();
  1685. }
  1686. },
  1687. qrcodeStatus2(val) {
  1688. if (!val) {
  1689. this.qrcode2.clear();
  1690. }
  1691. },
  1692. paymentStatus(val) {
  1693. if (!val) {
  1694. this.paymentForm = {
  1695. paymentExpireDate: null,
  1696. // feeType: null
  1697. };
  1698. }
  1699. },
  1700. quitVisible(val) {
  1701. if (!val) {
  1702. this.quitForm = {
  1703. // 退团信息确认
  1704. isRefundCourseFee: null,
  1705. isRefundInstrumentFee: null,
  1706. isRefundTeachingAssistantsFee: null,
  1707. isMaintenanceFee: null,
  1708. cloudTeacherAmount: null,
  1709. isCloudTeacherAmount: null,
  1710. maintenanceFee: 0,
  1711. reason: "",
  1712. };
  1713. this.$refs["quitForm"].resetFields();
  1714. }
  1715. },
  1716. // visitVisiable(val) {
  1717. // if (!val) {
  1718. // this.$refs["visitForm"].resetFields();
  1719. // }
  1720. // },
  1721. },
  1722. };
  1723. </script>
  1724. <style lang="scss" scoped>
  1725. .auth {
  1726. display: inline-block;
  1727. & + .auth {
  1728. margin-left: 0px;
  1729. }
  1730. }
  1731. .dialog-footer.question {
  1732. display: flex;
  1733. flex-direction: row;
  1734. justify-content: space-between;
  1735. }
  1736. .sigup-container {
  1737. margin-left: 12px;
  1738. .topWrap {
  1739. padding: 18px 58px 18px 0;
  1740. // height: 136px;
  1741. background-color: #fff;
  1742. // display: flex;
  1743. // flex-direction: row;
  1744. // justify-content: space-between;
  1745. .msg.pay {
  1746. color: #f85043;
  1747. }
  1748. .msg {
  1749. text-align: right;
  1750. color: #f97215;
  1751. font-size: 32px;
  1752. font-weight: bold;
  1753. padding-top: 30px;
  1754. box-sizing: border-box;
  1755. img {
  1756. width: 36px;
  1757. height: 36px;
  1758. position: relative;
  1759. top: 5px;
  1760. margin-right: 8px;
  1761. }
  1762. }
  1763. h2 {
  1764. height: 48px;
  1765. line-height: 48px;
  1766. position: relative;
  1767. // padding-left: 30px;
  1768. font-size: 32px;
  1769. font-weight: 600;
  1770. margin-bottom: 10px;
  1771. display: flex;
  1772. flex-direction: row;
  1773. justify-content: flex-start;
  1774. align-items: center;
  1775. .term {
  1776. height: 32px;
  1777. line-height: 32px;
  1778. border-radius: 24px;
  1779. width: 100px;
  1780. color: #14928a;
  1781. border: 1px solid rgba(20, 146, 138, 1);
  1782. font-size: 14px;
  1783. text-align: center;
  1784. margin-right: 12px;
  1785. &:nth-child(1) {
  1786. margin-left: 47px;
  1787. }
  1788. }
  1789. .term.active {
  1790. color: #fff;
  1791. background-color: #14928a;
  1792. }
  1793. .squrt {
  1794. position: absolute;
  1795. left: -25px;
  1796. top: 8px;
  1797. height: 34px;
  1798. width: 8px;
  1799. background-color: #14928a;
  1800. }
  1801. }
  1802. .btnList {
  1803. display: flex;
  1804. flex-direction: row;
  1805. justify-content: flex-start;
  1806. align-items: center;
  1807. flex-wrap: wrap;
  1808. & > div {
  1809. margin-right: 15px;
  1810. margin-bottom: 10px;
  1811. }
  1812. }
  1813. .newBand.close {
  1814. background-color: #777;
  1815. border: 1px solid #777;
  1816. }
  1817. }
  1818. .searchList {
  1819. background-color: #fff;
  1820. padding: 0 58p 0 0px;
  1821. }
  1822. .sigup-core {
  1823. margin-top: 12px;
  1824. display: flex;
  1825. flex-direction: row;
  1826. justify-content: flex-start;
  1827. .left {
  1828. width: 400px;
  1829. background-color: #fff;
  1830. height: 80vh;
  1831. overflow: auto;
  1832. }
  1833. .right {
  1834. width: calc(100% - 400px);
  1835. margin-left: 12px;
  1836. flex-grow: 1;
  1837. }
  1838. }
  1839. }
  1840. .el-dialog__body {
  1841. overflow: hidden;
  1842. }
  1843. .left-code,
  1844. .right-code {
  1845. // width: 50%;
  1846. // float: left;
  1847. h2 {
  1848. font-size: 18px;
  1849. text-align: center;
  1850. padding-bottom: 8px;
  1851. }
  1852. .qrcode {
  1853. display: flex;
  1854. flex-direction: column;
  1855. align-items: center;
  1856. img {
  1857. width: 200px;
  1858. height: 200px;
  1859. margin: 0 auto;
  1860. }
  1861. }
  1862. .code-url {
  1863. font-size: 18px;
  1864. text-align: center;
  1865. padding: 15px 15px 0 15px;
  1866. }
  1867. }
  1868. .newBand {
  1869. margin-bottom: 0;
  1870. max-width: inherit;
  1871. }
  1872. /deep/.el-button--danger {
  1873. background: #f85043;
  1874. }
  1875. .paymentForm {
  1876. /deep/.el-input__inner,
  1877. /deep/.el-input.el-input--suffix {
  1878. width: 360px !important;
  1879. }
  1880. }
  1881. .popoverWrap {
  1882. p {
  1883. line-height: 25px;
  1884. }
  1885. }
  1886. </style>