teamBaseInfo.vue 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837
  1. <template>
  2. <div class="base-container">
  3. <div class="banseLeft">
  4. <!-- <div class="num">乐团编号:dywh01</div> -->
  5. <el-form
  6. :model="topFrom"
  7. ref="topinfo"
  8. label-width="150px"
  9. :inline="true"
  10. label-position="right"
  11. >
  12. <div class="head">乐团基本信息:</div>
  13. <el-form-item
  14. label="乐团名称"
  15. prop="name"
  16. :rules="[{ required: true, message: '乐团名称不能为空' }]"
  17. >
  18. <el-input
  19. placeholder="请输入乐团名称"
  20. v-model.trim="topFrom.name"
  21. :disabled="basdisabled"
  22. ></el-input>
  23. </el-form-item>
  24. <!-- style="margin-left: 11px" -->
  25. <el-form-item
  26. label="所属分部"
  27. prop="section"
  28. :rules="[{ required: true, message: '所属分部不能为空' }]"
  29. >
  30. <el-select
  31. class="width400"
  32. v-model.trim="topFrom.section"
  33. filterable
  34. :disabled="basdisabled"
  35. @change="changeSection"
  36. clearable
  37. >
  38. <el-option
  39. v-for="(item, index) in sectionList"
  40. :key="index"
  41. :label="item.name"
  42. :value="item.id"
  43. ></el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item
  47. label="乐团收费类型"
  48. prop="type"
  49. :rules="[{ required: true, message: '乐团收费类型不能为空' }]"
  50. >
  51. <el-select
  52. v-model.trim="topFrom.type"
  53. filterable
  54. :disabled="basdisabled"
  55. clearable
  56. @change="changeType"
  57. >
  58. <el-option
  59. v-for="(item, index) in typeList"
  60. :key="index"
  61. :label="item.name"
  62. :value="item.id"
  63. ></el-option>
  64. </el-select>
  65. </el-form-item>
  66. <el-form-item
  67. label="收费模式"
  68. prop="courseViewType"
  69. :rules="[{ required: true, message: '收费模式不能为空' }]"
  70. >
  71. <el-select
  72. v-model.trim="topFrom.courseViewType"
  73. filterable
  74. :disabled="basdisabled"
  75. clearable
  76. >
  77. <el-option
  78. :label="item.label"
  79. :value="Number(item.value)"
  80. v-for="item in courseViewTypeList"
  81. :key="item.value"
  82. :disabled="checkCourseView(Number(item.value))"
  83. ></el-option>
  84. <!-- <el-option label="AMR收费" :value="1"></el-option>
  85. <el-option label="会员收费" :value="2"></el-option> -->
  86. </el-select>
  87. </el-form-item>
  88. <el-form-item
  89. label="合作单位"
  90. prop="school"
  91. :rules="[{ required: true, message: '合作单位不能为空' }]"
  92. >
  93. <el-select
  94. v-model.trim="topFrom.school"
  95. :disabled="!topFrom.section || basdisabled"
  96. @change="chioseSchool"
  97. filterable
  98. clearable
  99. >
  100. <el-option
  101. v-for="(item, index) in cooperationList"
  102. :key="index"
  103. :label="item.name"
  104. :value="item.id"
  105. ></el-option>
  106. </el-select>
  107. </el-form-item>
  108. <el-form-item
  109. label="教学地点"
  110. prop="address"
  111. :rules="[{ required: true, message: '教学地点不能为空' }]"
  112. >
  113. <template #label>
  114. <p style="position: relative; display: inline-block">
  115. 教学地点
  116. <el-tooltip placement="top" popper-class="mTooltip">
  117. <div slot="content">
  118. 如果已生成课表,则会修改未上课时的教学点
  119. </div>
  120. <i
  121. class="el-icon-question"
  122. style="font-size: 18px; color: #f56c6c"
  123. ></i>
  124. </el-tooltip>
  125. </p>
  126. </template>
  127. <el-select
  128. v-model.trim="topFrom.address"
  129. filterable
  130. clearable
  131. :disabled="!topFrom.section || basdisabled"
  132. >
  133. <el-option
  134. v-for="(item, index) in addList"
  135. :key="index"
  136. :label="item.name"
  137. :value="item.id"
  138. ></el-option>
  139. </el-select>
  140. </el-form-item>
  141. <!-- <el-form-item
  142. label="运营主管"
  143. prop="boss"
  144. :rules="[{ required: true, message: '运营主管不能为空' }]"
  145. >
  146. <el-select
  147. v-model.trim="topFrom.boss"
  148. :disabled="!topFrom.section || basdisabled"
  149. filterable
  150. clearable
  151. >
  152. <el-option
  153. v-for="item in bossList"
  154. :key="item.userId"
  155. :label="item.realName"
  156. :value="item.userId"
  157. >
  158. <span style="float: left">{{ item.realName }}</span>
  159. <span style="float: right; color: #8492a6; font-size: 13px">{{
  160. String(item.userId)
  161. }}</span>
  162. </el-option>
  163. </el-select>
  164. </el-form-item> -->
  165. <!-- <el-form-item
  166. label="预报名截止时间"
  167. prop="time"
  168. :rules="[{ required: true, message: '请输入预报名截止时间' }]"
  169. >
  170. <el-date-picker
  171. v-model.trim="topFrom.time"
  172. :disabled="basdisabled"
  173. type="date"
  174. value-format="yyyy-MM-dd"
  175. :picker-options="beginDate()"
  176. placeholder="选择日期"
  177. ></el-date-picker>
  178. </el-form-item> -->
  179. <!-- <el-form-item
  180. label="报名截止时间"
  181. prop="time"
  182. :rules="[{ required: true, message: '请输入报名截止时间' }]"
  183. >
  184. <el-date-picker
  185. v-model.trim="topFrom.time"
  186. :disabled="basdisabled"
  187. type="date"
  188. value-format="yyyy-MM-dd"
  189. :picker-options="beginDate()"
  190. placeholder="选择日期"
  191. ></el-date-picker>
  192. </el-form-item> -->
  193. <!-- <el-form-item
  194. label="预计开团时间"
  195. prop="startTime"
  196. :rules="[{ required: true, message: '请输入预计开团时间' }]"
  197. >
  198. <el-date-picker
  199. v-model.trim="topFrom.startTime"
  200. :disabled="basdisabled"
  201. type="date"
  202. value-format="yyyy-MM-dd"
  203. :picker-options="beginDate()"
  204. placeholder="选择日期"
  205. ></el-date-picker>
  206. </el-form-item> -->
  207. <!-- <el-form-item
  208. label="课酬结算标准"
  209. :rules="[{ required: true, message: '请选择课酬结算标准' }]"
  210. prop="salary"
  211. >
  212. <el-select
  213. v-model.trim="topFrom.salary"
  214. clearable
  215. :disabled="basdisabled"
  216. filterable
  217. >
  218. <el-option label="自定义课酬" value="TEACHER_DEFAULT"></el-option>
  219. <el-option label="标准课酬" value="GRADIENT_SALARY"></el-option>
  220. </el-select>
  221. </el-form-item> -->
  222. <el-form-item
  223. label="机构类型"
  224. prop="ownershipType"
  225. v-if="tenantId == 1"
  226. >
  227. <el-select
  228. v-model.trim="topFrom.ownershipType"
  229. :disabled="basdisabled"
  230. >
  231. <el-option label="自有" value="OWN"></el-option>
  232. <el-option label="三方" value="COOPERATION"></el-option>
  233. <!-- <el-option label="租赁"
  234. value="LEASE"></el-option>-->
  235. </el-select>
  236. </el-form-item>
  237. <el-form-item
  238. label="课外训练布置老师"
  239. prop="extracurricularTeacher"
  240. v-if="tenantId == 1"
  241. >
  242. <el-select
  243. v-model.trim="topFrom.extracurricularTeacher"
  244. :disabled="basdisabled"
  245. >
  246. <el-option label="声部班老师" value="NORMAL"></el-option>
  247. <el-option label="合奏班老师" value="MIX"></el-option>
  248. <!-- <el-option label="租赁"
  249. value="LEASE"></el-option>-->
  250. </el-select>
  251. </el-form-item>
  252. <!-- v-if="teamStatus == 'resetTeam' || teamStatus == 'teamList'" -->
  253. <div class="head">人员配置:</div>
  254. <el-form-item
  255. label="乐团主管"
  256. prop="teacher"
  257. :rules="[{ required: true, message: '乐团主管不能为空' }]"
  258. >
  259. <el-select
  260. v-model.trim="topFrom.teacher"
  261. :disabled="true"
  262. filterable
  263. clearable
  264. >
  265. <el-option
  266. v-for="(item, key) in educationList"
  267. :key="key"
  268. :label="item.userName"
  269. :value="Number(item.userId)"
  270. >
  271. <span style="float: left">{{ item.userName }}</span>
  272. <span style="float: right; color: #8492a6; font-size: 13px">{{
  273. String(item.userId)
  274. }}</span>
  275. </el-option>
  276. </el-select>
  277. </el-form-item>
  278. <el-form-item label="乐队指导" prop="head">
  279. <el-select
  280. v-model.trim="topFrom.head"
  281. filterable
  282. :disabled="!topFrom.section || basdisabled"
  283. clearable
  284. >
  285. <el-option
  286. v-for="(item, index) in teacherList"
  287. :key="index"
  288. :label="item.realName"
  289. :value="item.id"
  290. >
  291. <span style="float: left">{{ item.realName }}</span>
  292. <span style="float: right; color: #8492a6; font-size: 13px">{{
  293. String(item.id)
  294. }}</span>
  295. </el-option>
  296. </el-select>
  297. </el-form-item>
  298. <el-form-item label="维修技师" prop="repairUserId">
  299. <el-select
  300. v-model.trim="topFrom.repairUserId"
  301. :disabled="!topFrom.section || basdisabled"
  302. filterable
  303. clearable
  304. >
  305. <el-option
  306. v-for="(item, key) in technician"
  307. :key="key"
  308. :label="item.userName"
  309. :value="item.userId"
  310. >
  311. <span style="float: left">{{ item.userName }}</span>
  312. <span style="float: right; color: #8492a6; font-size: 13px">{{
  313. String(item.userId)
  314. }}</span>
  315. </el-option>
  316. </el-select>
  317. </el-form-item>
  318. <el-form-item label="衔接老师" prop="transactionTeacherId">
  319. <el-select
  320. v-model.trim="topFrom.transactionTeacherId"
  321. :disabled="!topFrom.section || basdisabled"
  322. filterable
  323. clearable
  324. >
  325. <el-option
  326. v-for="(item, key) in transactionList"
  327. :key="key"
  328. :label="item.userName"
  329. :value="item.userId"
  330. >
  331. <span style="float: left">{{ item.userName }}</span>
  332. <span style="float: right; color: #8492a6; font-size: 13px">{{
  333. String(item.userId)
  334. }}</span>
  335. </el-option>
  336. </el-select>
  337. </el-form-item>
  338. <div v-if="tenantId == 1">
  339. <div class="head">建团信息:</div>
  340. <el-form-item
  341. label="建团编制"
  342. prop="musicGroupPlanMakingId"
  343. :rules="[{ required: true, message: '建团编制不能为空' }]"
  344. >
  345. <el-select
  346. v-model.trim="topFrom.musicGroupPlanMakingId"
  347. filterable
  348. :disabled="basdisabled"
  349. clearable
  350. @change="changeType"
  351. >
  352. <el-option
  353. v-for="(item, index) in musicGroupPlanMakingList"
  354. :key="index"
  355. :label="item.name"
  356. :value="item.id"
  357. ></el-option>
  358. </el-select>
  359. </el-form-item>
  360. <el-form-item
  361. label="成团年级"
  362. prop="firstRecruitGrade"
  363. :rules="[{ required: true, message: '成团年级不能为空' }]"
  364. >
  365. <el-select
  366. v-model.trim="topFrom.firstRecruitGrade"
  367. filterable
  368. :disabled="basdisabled || !topFrom.section"
  369. clearable
  370. >
  371. <el-option
  372. v-for="(item, index) in gradeList"
  373. :key="index"
  374. :label="item.label"
  375. :value="item.value"
  376. ></el-option>
  377. </el-select>
  378. </el-form-item>
  379. <el-form-item
  380. label="收费标准"
  381. prop="defaultChargeStandard"
  382. :rules="[{ required: true, message: '收费标准不能为空' }, {
  383. pattern:
  384. /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  385. message: '请输入正确的金额',
  386. trigger: 'blur',
  387. },]"
  388. >
  389. <el-input
  390. v-model.trim="topFrom.defaultChargeStandard"
  391. placeholder="请输入收费标准"
  392. :disabled="basdisabled"
  393. >
  394. <i slot="suffix" class="el-input__icon" style="padding-right: 5px"
  395. >元</i
  396. >
  397. </el-input>
  398. </el-form-item>
  399. <el-form-item
  400. label="单次训练时长"
  401. prop="singleTrainMinutes"
  402. :rules="[
  403. { required: true, message: '请输入单次训练时长' },
  404. {
  405. pattern: /(^[0-9+]*$)/,
  406. message: '请输入正确的时长',
  407. },
  408. ]"
  409. >
  410. <el-select
  411. v-model.trim="topFrom.singleTrainMinutes"
  412. filterable
  413. :disabled="basdisabled"
  414. allow-create
  415. default-first-option
  416. clearable
  417. >
  418. <el-option
  419. v-for="(item, index) in singleTrainMinutesList"
  420. :key="index"
  421. :label="item.name"
  422. :value="item.id"
  423. ></el-option>
  424. </el-select>
  425. </el-form-item>
  426. <el-form-item
  427. label="课程配置"
  428. prop="coursePlan"
  429. :rules="[{ required: true, message: '请选择课程配置' }]"
  430. >
  431. <el-select
  432. v-model.trim="topFrom.coursePlan"
  433. filterable
  434. :disabled="basdisabled"
  435. clearable
  436. >
  437. <el-option
  438. v-for="(item, index) in coursePlanList"
  439. :key="index"
  440. :label="item.name"
  441. :value="item.id"
  442. ></el-option>
  443. </el-select>
  444. </el-form-item>
  445. <el-form-item
  446. label="毕业年级"
  447. prop="graduateGrade"
  448. :rules="[{ required: true, message: '毕业年级不能为空' }]"
  449. >
  450. <el-select
  451. v-model.trim="topFrom.graduateGrade"
  452. filterable
  453. :disabled="basdisabled || !topFrom.firstRecruitGrade"
  454. clearable
  455. >
  456. <el-option
  457. v-for="(item, index) in gradeList"
  458. :key="index"
  459. :label="item.label"
  460. :value="item.value"
  461. :disabled="item.value <= topFrom.firstRecruitGrade"
  462. ></el-option>
  463. </el-select>
  464. </el-form-item>
  465. <el-form-item label="销售活动" prop="saleActivityDesc">
  466. <el-input
  467. placeholder="请输入销售活动"
  468. :maxlength="100"
  469. v-model.trim="topFrom.saleActivityDesc"
  470. show-word-limit
  471. :disabled="basdisabled"
  472. ></el-input>
  473. </el-form-item>
  474. </div>
  475. <div class="head">乐团设置:</div>
  476. <el-form-item
  477. label="同步群消息"
  478. prop="homeworkPushFlag"
  479. label-width="200px"
  480. :rules="[{ required: true, message: '同步群消息不能为空' }]"
  481. >
  482. <template #label>
  483. <p style="position: relative; display: inline-block">
  484. 开课后作业同步群消息
  485. <el-tooltip placement="top" popper-class="mTooltip">
  486. <div slot="content">
  487. 学员提交乐团课后作业时,群聊中是否发送作业提交消息
  488. </div>
  489. <i
  490. class="el-icon-question"
  491. style="font-size: 18px; color: #f56c6c"
  492. ></i>
  493. </el-tooltip>
  494. </p>
  495. </template>
  496. <el-switch
  497. v-model="topFrom.homeworkPushFlag"
  498. :disabled="basdisabled"
  499. :active-value="1"
  500. :inactive-value="0"
  501. >
  502. </el-switch>
  503. </el-form-item>
  504. <el-form-item
  505. label="是否赠送辅件"
  506. prop="memberCourseShowFlag"
  507. label-width="200px"
  508. :rules="[{ required: true, message: '是否赠送辅件不能为空' }]"
  509. >
  510. <template #label>
  511. <p style="position: relative; display: inline-block">
  512. 是否赠送辅件
  513. <el-tooltip placement="top" popper-class="mTooltip">
  514. <div slot="content">购买团练宝是否赠送辅件</div>
  515. <i
  516. class="el-icon-question"
  517. style="font-size: 18px; color: #f56c6c"
  518. ></i>
  519. </el-tooltip>
  520. </p>
  521. </template>
  522. <el-switch
  523. v-model="topFrom.isGiveAccessories"
  524. :disabled="basdisabled"
  525. :active-value="1"
  526. :inactive-value="0"
  527. >
  528. </el-switch>
  529. </el-form-item>
  530. <!-- <el-form-item
  531. label="是否显示免费课程"
  532. prop="memberCourseShowFlag"
  533. label-width="200px"
  534. :rules="[{ required: true, message: '是否显示免费课程不能为空' }]"
  535. >
  536. <template #label>
  537. <p style="position: relative; display: inline-block">
  538. 是否显示免费课程
  539. <el-tooltip placement="top" popper-class="mTooltip">
  540. <div slot="content">报名时是否显示免费赠送课程</div>
  541. <i
  542. class="el-icon-question"
  543. style="font-size: 18px; color: #f56c6c"
  544. ></i>
  545. </el-tooltip>
  546. </p>
  547. </template>
  548. <el-switch
  549. v-model="topFrom.memberCourseShowFlag"
  550. :disabled="basdisabled"
  551. :active-value="1"
  552. :inactive-value="0"
  553. >
  554. </el-switch>
  555. </el-form-item> -->
  556. <!-- <el-form-item label prop="isClass">
  557. <el-checkbox v-model.trim="topFrom.isClass" :disabled="basdisabled"
  558. >课堂课乐团</el-checkbox
  559. >
  560. </el-form-item> -->
  561. <br />
  562. <el-form-item label="" v-if="teamStatus == 'teamDraft'">
  563. <p style="color: red; padding-left: 50px">
  564. 修改【收费类型】会重置乐团声部与缴费信息
  565. </p>
  566. </el-form-item>
  567. </el-form>
  568. <div class="btnWrap">
  569. <!-- <div
  570. class="nextBtn"
  571. v-if="teamStatus == 'resetTeam'"
  572. v-permission="{
  573. child: 'musicGroup/update',
  574. parent: '/resetTeaming/teamBaseInfo',
  575. }"
  576. @click="resetSubmit"
  577. >
  578. 修改
  579. </div> -->
  580. <!-- 审批或者草稿的下一步 -->
  581. <div class="nextBtn" @click="gotoNext()" v-if="!basdisabled">
  582. {{ this.teamStatus == "teamDraft" ? "下一步" : "保存" }}
  583. </div>
  584. <div
  585. class="nextBtn"
  586. v-if="this.teamStatus == 'teamAudit'"
  587. @click="gotoNext()"
  588. >
  589. 下一步
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </template>
  595. <script>
  596. import {
  597. getType,
  598. getTeamBaseInfo,
  599. resetTeamBaseInfo,
  600. getEmployeeOrgan,
  601. getStudentList,
  602. musicGroupOpenPay,
  603. extensionPayment,
  604. extensionApplyExpire,
  605. getOrganRole,
  606. getTeacher,
  607. createTeam,
  608. getGradeList,
  609. } from "@/api/buildTeam";
  610. import dayjs from "dayjs";
  611. import merge from "webpack-merge";
  612. import { queryByOrganId, getSchool } from "@/api/systemManage";
  613. import qrCode from "@/components/QrCode/index";
  614. import { classStatus, courseViewTypeList } from "@/utils/searchArray";
  615. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  616. import { getMusicGroupPlanMakingList } from "@/views/baseRulesManager/api";
  617. import mergeMusic from "../components/merge-music";
  618. const singleTrainMinutesList = [
  619. { name: "90+90", id: "90+90" },
  620. { name: "90+90+45", id: "90+90+45" },
  621. ];
  622. const coursePlanList = [
  623. { name: "PlanS", id: "PlanS" },
  624. { name: "PlanA", id: "PlanA" },
  625. { name: "PlanB", id: "PlanB" },
  626. { name: "PlanC", id: "PlanC" },
  627. { name: "PlanD", id: "PlanD" },
  628. { name: "PlanE", id: "PlanE" },
  629. ];
  630. export default {
  631. components: {
  632. mergeMusic,
  633. qrCode,
  634. },
  635. name: "teamBaseInfo",
  636. props: ["getTeamList"],
  637. data() {
  638. return {
  639. classStatus,
  640. courseViewTypeList,
  641. organId: null,
  642. topFrom: {
  643. type: "", // 收费类型
  644. section: "", //所属分部
  645. courseViewType: "", // 收费模式
  646. school: "", // 合作单位
  647. teacher: null, // 乐团主管
  648. name: "", //乐团名称
  649. boss: "", // 运营主管
  650. time: "", // 报名截止时间
  651. startClass: [], // 招生年级起始
  652. address: "", // 教学地点
  653. salary: "", // 收费模式
  654. head: "",
  655. homeworkPushFlag: 1, // 是否同步群消息
  656. isGiveAccessories: 0, // 是否赠送辅件 默认不赠送
  657. memberCourseShowFlag: 0,
  658. isClass: false, //是否为课堂课
  659. startTime: "",
  660. feeType: null,
  661. paymentPattern: "", // 缴费方式
  662. paymentValid: [], // 缴费有效期
  663. paymentValidStartDate: null, // 缴费有效期开始
  664. paymentValidEndDate: null, // 缴费有效期结束
  665. ownershipType: "OWN", // 合作机构类型
  666. repairUserId: null, // 维修技师
  667. transactionTeacherId: null, // 衔接老师
  668. extracurricularTeacher: "NORMAL",
  669. musicGroupPlanMakingId: "", //建团编制
  670. firstRecruitGrade: "", // 成团年级
  671. defaultChargeStandard: "", // 收费标准
  672. singleTrainMinutes: "", //单次训练时长
  673. coursePlan: "", // 课程计划
  674. graduateGrade: "", // 毕业年级
  675. saleActivityDesc: "", // 销售活动描述
  676. },
  677. baseInfo: {},
  678. money: 580,
  679. orderInfo: {
  680. marketPrice: 0, // 原价总金额
  681. referencePrice: 0, // 现价总金额
  682. }, // 金额列表,金额计算
  683. sectionList: [], // 分部列表
  684. typeList: [], // 收费类型列表
  685. cooperationList: [], // 教学点列表
  686. teacherList: [], // 获取老师列表
  687. educationList: [], // 乐团主管
  688. bossList: [],
  689. transactionList: [],
  690. addList: [], // 教学地点列表
  691. activeTeam: [],
  692. gradeList: [], // 年级
  693. gradeListObj: null,
  694. teamid: "",
  695. teamStatus: "",
  696. isInit: false,
  697. technician: [],
  698. basdisabled: false,
  699. // 整合报名中
  700. paymentExpireDate: "",
  701. applyExpireDate: null,
  702. mergeVisible: false,
  703. team_status: "",
  704. paymentNum: 0,
  705. paymentStatus: false,
  706. paymentForm: {
  707. paymentExpireDate: null,
  708. // feeType: null
  709. },
  710. paymentRules: {
  711. paymentExpireDate: [
  712. { required: true, message: "请设置缴费截止日期", trigger: "blur" },
  713. ],
  714. },
  715. extendForm: {
  716. expireDate: null,
  717. },
  718. extendRule: {
  719. expireDate: [
  720. { required: true, message: "请选择延长时间", trigger: "change" },
  721. ],
  722. },
  723. isPay: false,
  724. extendPaymentStatus: false, // 延长缴费
  725. codeStatus: false,
  726. qrCodeUrl: null,
  727. codeTitle: null,
  728. tenantId: "",
  729. coursePlanList: coursePlanList,
  730. musicGroupPlanMakingList: [],
  731. singleTrainMinutesList: singleTrainMinutesList,
  732. };
  733. },
  734. created() {},
  735. mounted() {
  736. if (this.$route.query.type == "newTeam") {
  737. this.onReset();
  738. }
  739. this.init();
  740. },
  741. activated() {
  742. if (
  743. (this.teamid && this.teamid != this.$route.query.id) ||
  744. this.teamStatus != this.$route.query.type
  745. ) {
  746. this.init();
  747. }
  748. if (this.$route.query.clear == "true") {
  749. this.onReset();
  750. }
  751. if (this.teamStatus == "newTeam") {
  752. this.$store.dispatch("buildIndex", 0);
  753. }
  754. if (this.teamStatus != "newTeam") {
  755. this.$store.dispatch("draftIndex", 0);
  756. }
  757. this.teamStatus = this.$route.query.type;
  758. console.log(this.$route.query.type,'teamStatus')
  759. if (
  760. this.teamStatus == "look" ||
  761. this.teamStatus == "teamAudit" ||
  762. this.teamStatus == "feeAudit" ||
  763. this.teamStatus == "APPLY" ||
  764. this.teamStatus == "PAY" ||
  765. this.teamStatus == 'FEE_AUDIT_FAILED'
  766. ) {
  767. this.basdisabled = true;
  768. } else {
  769. this.basdisabled = false;
  770. }
  771. },
  772. deactivated() {},
  773. // async beforeDestroy() {
  774. // await this.setStore();
  775. // // await new Promise((res, err) => {
  776. // // setTimeout(() => {
  777. // // res();
  778. // // }, 1000);
  779. // // });
  780. // },
  781. methods: {
  782. async setStore(str) {
  783. if (this.teamid) {
  784. let loadash = this.$helpers.lodash;
  785. let sotrage = JSON.parse(localStorage.getItem(`${this.teamid}base`));
  786. // console.log(sotrage,this.topFrom)
  787. if (!loadash.isEqual(this.topFrom, sotrage) && sotrage) {
  788. // 提示保存
  789. return await this.$confirm("已修改当前页面数据是否保存", "提示", {
  790. confirmButtonText: "是",
  791. cancelButtonText: "否",
  792. type: "warning",
  793. closeOnClickModal: false,
  794. distinguishCancelAndClose: true,
  795. })
  796. .then(async () => {
  797. // localStorage.setItem(
  798. // `${this.teamid}base`,
  799. // JSON.stringify(this.topFrom)
  800. // );
  801. let b = await this.gotoNext(str);
  802. console.log(b);
  803. return b;
  804. })
  805. .catch((e) => {
  806. console.log(e);
  807. if (e == "close") {
  808. return false;
  809. } else {
  810. localStorage.removeItem(`${this.teamid}base`);
  811. return true;
  812. }
  813. // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
  814. });
  815. } else {
  816. return true;
  817. // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
  818. }
  819. } else {
  820. localStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
  821. return true;
  822. }
  823. },
  824. //|| this.teamStatus === 'teamAudit'
  825. isNotEditing: function () {
  826. return !(
  827. this.teamStatus === "teamDraft" ||
  828. this.teamStatus === "newTeam" ||
  829. this.teamStatus === "teamList"
  830. );
  831. },
  832. changeFeeType(val) {},
  833. changePaymentValidStartDate(val) {
  834. if (val) {
  835. this.$set(this.topFrom, "paymentValidEndDate", "");
  836. }
  837. },
  838. changePaymentPattern(val) {
  839. // if (val === 2) {
  840. // // this.topFrom.paymentValidStartDate = null
  841. // this.$set(this.topFrom, 'paymentValidEndDate', '')
  842. // }
  843. },
  844. beginDate(end) {
  845. return {
  846. firstDayOfWeek: 1,
  847. disabledDate(time) {
  848. if (end) {
  849. return new Date(end).getTime() - 86400000 >= time.getTime();
  850. } else {
  851. return time.getTime() + 86400000 < Date.now();
  852. //开始时间不选时,结束时间最大值小于等于当天
  853. }
  854. },
  855. };
  856. },
  857. init() {
  858. this.isInit = true;
  859. if (this.$route.query.id) {
  860. this.teamid = this.$route.query.id;
  861. }
  862. this.teamStatus = this.$route.query.type;
  863. this.team_status = this.$route.query.team_status;
  864. this.tenantId = this.$helpers.tenantId;
  865. // if (this.teamStatus == "newTeam") {
  866. // this.$store.dispatch("buildIndex", 0);
  867. // }
  868. // if (this.teamStatus != "newTeam") {
  869. // this.$store.dispatch("draftIndex", 0);
  870. // }
  871. // 获取建团编制
  872. getMusicGroupPlanMakingList().then((res) => {
  873. if (res.code == 200) {
  874. this.musicGroupPlanMakingList = res.data;
  875. }
  876. });
  877. // 传过来的乐团信息
  878. this.activeTeam = this.getTeamList;
  879. if (
  880. this.teamStatus == "look" ||
  881. this.teamStatus == "teamAudit" ||
  882. this.teamStatus == "feeAudit" ||
  883. this.teamStatus == "teamCanceled"||
  884. this.teamStatus == 'FEE_AUDIT_FAILED'
  885. ) {
  886. this.basdisabled = true;
  887. } else {
  888. this.basdisabled = false;
  889. }
  890. if (this.$route.query.id) {
  891. // 单团修改
  892. this.teamid = this.$route.query.id;
  893. let sotrage = JSON.parse(
  894. localStorage.getItem(`${this.$route.query.id}base`)
  895. );
  896. if (!sotrage?.section) {
  897. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  898. if (res.code == 200) {
  899. // if (this.$listeners.getBaseInfo) {
  900. // this.$listeners.getBaseInfo(res.data);
  901. // }
  902. // 头部
  903. this.setBase(res);
  904. // // 循环缴费月
  905. // this.payList.chioseMonth = res.data.months;
  906. if (res.data.musicGroup.organId) {
  907. // 获取员工
  908. this.getBaseList(res.data.musicGroup.organId);
  909. }
  910. this.$emit("getBaseInfo", res.data);
  911. }
  912. });
  913. } else {
  914. this.topFrom = sotrage;
  915. // this.applyExpireDate = sotrage.time;
  916. // this.paymentExpireDate = Storage.paymentExpireDate;
  917. if (this.topFrom?.section) {
  918. // 获取员工
  919. this.getBaseList(this.topFrom.section);
  920. }
  921. }
  922. } else {
  923. // 如果是新建团
  924. let sotrage = JSON.parse(localStorage.getItem(`newTeambase`));
  925. console.log(sotrage, this.topFrom);
  926. sotrage ? (this.topFrom = sotrage) : this.topFrom;
  927. if (this.topFrom?.section) {
  928. // 获取员工
  929. this.getBaseList(this.topFrom.section);
  930. }
  931. }
  932. this.getStudentStatus();
  933. this.$emit("getName", this.topFrom?.name);
  934. // getEmployeeOrgan().then((res) => {
  935. // if (res.code == 200) {
  936. // this.sectionList = res.data;
  937. // }
  938. // });
  939. // // 2.获取收费类型选项卡
  940. // getType({ rows: 1000 }).then((res) => {
  941. // if (res.code == 200) {
  942. // this.typeList = res.data.rows;
  943. // }
  944. // });
  945. Promise.all([getType({ rows: 1000 }), getEmployeeOrgan()]).then(
  946. (values) => {
  947. if (values[0].code == 200) {
  948. this.typeList = values[0].data;
  949. // this.typeList = [];
  950. }
  951. if (values[1].code == 200) {
  952. this.sectionList = values[1].data;
  953. // this.sectionList = [];
  954. }
  955. let arr = [];
  956. if (this.sectionList.length <= 0) {
  957. arr.push("organ");
  958. } else {
  959. if (!this.topFrom.section) {
  960. this.$set(this.topFrom, "section", this.sectionList[0].id);
  961. this.changeSection(this.sectionList[0].id);
  962. // diao
  963. }
  964. }
  965. if (this.typeList.length <= 0) {
  966. arr.push("teamPayType");
  967. }
  968. this.$bus.$emit("showguide", arr);
  969. }
  970. );
  971. // console.log('到这里来',getEmployeeOrgan())
  972. // 缓存设置时的状态
  973. },
  974. changeSection(val) {
  975. // 修改分部的时候 重置运营主管 重置乐团主管 重置乐队指导 合作单位 教学点
  976. this.topFrom.teacher = null;
  977. this.topFrom.boss = "";
  978. this.topFrom.head = "";
  979. this.topFrom.school = "";
  980. this.topFrom.address = "";
  981. this.topFrom.firstRecruitGrade = "";
  982. this.topFrom.graduateGrade = "";
  983. // 发请求 根据分部id 查询所有员工
  984. if (val) {
  985. this.getBaseList(val);
  986. }
  987. },
  988. async getBaseList(val) {
  989. // 合作单位
  990. // queryByOrganId({ organId: val }).then((res) => {
  991. // if (res.code == 200) {
  992. // this.cooperationList = res.data;
  993. // }
  994. // });
  995. // 教学点=>学校
  996. // getSchool({ organId: val }).then((res) => {
  997. // if (res.code == 200) {
  998. // this.addList = res.data;
  999. // }
  1000. // });
  1001. // 获取乐团主管
  1002. try {
  1003. const ruselt = await getOrganRole({
  1004. id: val,
  1005. });
  1006. // 乐团主管
  1007. this.educationList = ruselt?.data?.EDUCATION;
  1008. // 维修技师
  1009. this.technician = ruselt?.data?.REPAIR;
  1010. // this.bossList = ruselt?.data?.TEAM_TEACHER;
  1011. // 衔接老师
  1012. this.transactionList = ruselt?.data?.JOIN_TEACHER;
  1013. } catch (e) {
  1014. console.log(e);
  1015. }
  1016. // 获取指导老师
  1017. getTeacher({ organId: val }).then((res) => {
  1018. if (res.code == 200) {
  1019. this.teacherList = res.data;
  1020. }
  1021. });
  1022. // 获取年级
  1023. getGradeList({ id: val }).then((res) => {
  1024. let result = res.data;
  1025. this.gradeListObj = res.data;
  1026. if (res.code == 200 && result) {
  1027. for (let i in result) {
  1028. this.gradeList.push({
  1029. value: i,
  1030. label: result[i],
  1031. });
  1032. }
  1033. }
  1034. });
  1035. Promise.all([
  1036. queryByOrganId({ organId: val }),
  1037. getSchool({ organId: val }),
  1038. ]).then((values) => {
  1039. if (values[0].code == 200) {
  1040. this.cooperationList = values[0].data;
  1041. }
  1042. if (values[1].code == 200) {
  1043. this.addList = values[1].data;
  1044. }
  1045. let arr = [];
  1046. if (this.cooperationList.length <= 0) {
  1047. arr.push("cooperationOrgan");
  1048. }
  1049. if (this.addList.length <= 0) {
  1050. arr.push("school");
  1051. }
  1052. if (arr.length > 0) {
  1053. this.$bus.$emit("showguide", arr);
  1054. return;
  1055. }
  1056. });
  1057. },
  1058. chioseSchool(val) {
  1059. // 清除教学点
  1060. this.topFrom.teacher = null;
  1061. if (val) {
  1062. console.log(this.cooperationList);
  1063. this.cooperationList.forEach((item) => {
  1064. if (item.id == val) {
  1065. console.log(item);
  1066. this.$set(this.topFrom, "teacher", item.educationUserId);
  1067. console.log(this.topFrom);
  1068. }
  1069. });
  1070. }
  1071. console.log("chioseSchool", this.topFrom.teacher);
  1072. },
  1073. async gotoNext(str) {
  1074. let tempStatus;
  1075. return new Promise((resolve, reject) => {
  1076. this.$refs["topinfo"].validate(async (valid, object) => {
  1077. if (!valid) {
  1078. this.$message.error("请填写建团必要参数");
  1079. // return false
  1080. resolve(false);
  1081. } else {
  1082. // 判断一下是否勾选了课程类型而没有输入金额
  1083. // 验证通过
  1084. this.$store.dispatch("topinfo", this.topFrom);
  1085. if (this.teamStatus == "teamAudit") {
  1086. // 获取数据提交
  1087. this.$emit("handleClick", { name: "2" });
  1088. } else {
  1089. this.$emit("getName", this.topFrom.name);
  1090. tempStatus = await this.resetSubmit(str);
  1091. console.log(tempStatus, "tempStatus");
  1092. resolve(tempStatus);
  1093. }
  1094. }
  1095. });
  1096. });
  1097. },
  1098. async resetSubmit(str) {
  1099. return new Promise((resolve, reject) => {
  1100. this.$refs["topinfo"].validate(async (valid, object) => {
  1101. if (!valid) {
  1102. this.$message.error("请填写必要参数");
  1103. reject();
  1104. } else {
  1105. let status = null;
  1106. // 1.resetTeam 乐团修改
  1107. // 2.newTeam 新建乐团
  1108. // 3.teamList 跨团修改
  1109. // 4.teamDraft 乐团草稿
  1110. switch (this.teamStatus) {
  1111. case "resetTeam": {
  1112. status = "PROGRESS";
  1113. break;
  1114. }
  1115. case "newTeam": {
  1116. status = "DRAFT";
  1117. break;
  1118. }
  1119. case "teamList": {
  1120. status = null;
  1121. break;
  1122. }
  1123. case "teamDraft": {
  1124. status = "DRAFT";
  1125. break;
  1126. }
  1127. }
  1128. let obj = {};
  1129. // topFrom.ownershipType
  1130. // 修改 合并对象
  1131. obj.musicGroup = {
  1132. settlementType: this.topFrom.salary,
  1133. applyExpireDate: this.topFrom.time?dayjs(this.topFrom.time).format(
  1134. "YYYY-MM-DD HH:mm:ss"
  1135. ):null,
  1136. chargeTypeId: this.topFrom.type,
  1137. cooperationOrganId: this.topFrom.school,
  1138. courseViewType: this.topFrom.courseViewType,
  1139. teamTeacherId: this.topFrom.boss,
  1140. // educationalTeacherId: this.topFrom.teacher,
  1141. // chioseSchool
  1142. enrollClasses: this.topFrom.startClass.join(","),
  1143. name: this.topFrom.name,
  1144. paymentPattern: this.topFrom.paymentPattern,
  1145. paymentValidStartDate: this.topFrom.paymentValidStartDate
  1146. ? dayjs(this.topFrom.paymentValidStartDate).format("YYYY-MM-DD")
  1147. : this.topFrom.paymentValidStartDate,
  1148. paymentValidEndDate: this.topFrom.paymentValidEndDate
  1149. ? dayjs(this.topFrom.paymentValidEndDate).format("YYYY-MM-DD")
  1150. : this.topFrom.paymentValidEndDate,
  1151. organId: this.topFrom.section,
  1152. // paymentMonths:obj.months 有待确认
  1153. schoolId: this.topFrom.address,
  1154. id: this.teamid,
  1155. directorUserId: this.topFrom.head,
  1156. isClassroomLessons: this.topFrom.isClass,
  1157. status,
  1158. expectStartGroupDate: this.topFrom.startTime,
  1159. ownershipType: this.topFrom.ownershipType,
  1160. repairUserId: this.topFrom.repairUserId || null,
  1161. feeType: this.topFrom.feeType,
  1162. transactionTeacherId: this.topFrom.transactionTeacherId,
  1163. homeworkPushFlag: this.topFrom.homeworkPushFlag,
  1164. isGiveAccessories: this.topFrom.isGiveAccessories,
  1165. memberCourseShowFlag: this.topFrom.memberCourseShowFlag,
  1166. extracurricularTeacher: this.topFrom.extracurricularTeacher,
  1167. musicGroupPlanMakingId: this.topFrom.musicGroupPlanMakingId,
  1168. firstRecruitGrade: this.topFrom.firstRecruitGrade,
  1169. defaultChargeStandard: this.topFrom.defaultChargeStandard,
  1170. singleTrainMinutes: this.topFrom.singleTrainMinutes,
  1171. coursePlan: this.topFrom.coursePlan,
  1172. graduateGrade: this.topFrom.graduateGrade,
  1173. saleActivityDesc: this.topFrom.saleActivityDesc,
  1174. };
  1175. // obj.musicGroupPaymentEntities = [];
  1176. // createTeam
  1177. if (this.teamStatus != "newTeam") {
  1178. return await resetTeamBaseInfo(obj).then(async (res) => {
  1179. if (res.code == 200) {
  1180. localStorage.setItem(
  1181. `${this.teamid}base`,
  1182. JSON.stringify(this.topFrom)
  1183. );
  1184. this.$emit("getBaseInfo");
  1185. if (this.teamStatus == "teamDraft") {
  1186. this.$message.success("保存成功");
  1187. if (!str) {
  1188. this.$emit("handleClick", { name: "2" });
  1189. }
  1190. resolve(true);
  1191. // 跳到第二页
  1192. } else {
  1193. this.$message.success("修改乐团成功");
  1194. // this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
  1195. }
  1196. resolve(true);
  1197. }
  1198. });
  1199. } else {
  1200. // 发送建团申请 成功后跳到第二页
  1201. createTeam(obj).then((res) => {
  1202. if (res.code == 200) {
  1203. // this.$message.success('建团成功,请设置声部信息')
  1204. // this.$emit("chiosetab", 1);
  1205. const h = this.$createElement;
  1206. this.$msgbox({
  1207. title: "提示",
  1208. message: h("p", null, [
  1209. h("p", null, "新乐团基础信息创建完成"),
  1210. h("p", null, "请设置声部信息"),
  1211. ]),
  1212. type: "warning",
  1213. confirmButtonText: "是",
  1214. cancelButtonText: "否",
  1215. showCancelButton: true,
  1216. customClass: "messageBox-prompt-test",
  1217. })
  1218. .then(() => {
  1219. this.$router.push(
  1220. {
  1221. query: merge(this.$route.query, {
  1222. type: "teamDraft",
  1223. id: res.data,
  1224. team_status: "DRAFT",
  1225. }),
  1226. },
  1227. (router) => {
  1228. console.log(router);
  1229. router.meta.title = "乐团编辑中";
  1230. }
  1231. );
  1232. this.$emit("getName", this.topFrom.name);
  1233. this.$emit("handleClick", { name: "2" });
  1234. return true;
  1235. })
  1236. .catch(() => {
  1237. this.$router.push(
  1238. {
  1239. query: merge(this.$route.query, {
  1240. type: "teamDraft",
  1241. id: res.data,
  1242. team_status: "DRAFT",
  1243. }),
  1244. },
  1245. (router) => {
  1246. console.log(router);
  1247. router.meta.title = "乐团编辑中";
  1248. }
  1249. );
  1250. this.$emit("getName", this.topFrom.name);
  1251. this.init();
  1252. return true;
  1253. });
  1254. }
  1255. });
  1256. }
  1257. // 发请求
  1258. }
  1259. });
  1260. });
  1261. },
  1262. changeApplyTime(val) {
  1263. this.$set(this.topFrom, "paymentValidStartDate", "");
  1264. this.$set(this.topFrom, "paymentValidEndDate", "");
  1265. // this.topFrom.paymentValidStartDate = ''
  1266. // this.topFrom.paymentValidEndDate = ''
  1267. },
  1268. onReset() {
  1269. this.topFrom = {
  1270. type: "", // 收费类型
  1271. section: "", //所属分部
  1272. school: "", // 合作单位
  1273. courseViewType: "",
  1274. teacher: "", // 乐团主管
  1275. name: "", //乐团名称
  1276. boss: "", // 运营主管
  1277. time: "", // 报名截止时间
  1278. startClass: [], // 招生年级起始
  1279. paymentValid: [], // 缴费有效期时间起始
  1280. address: "", // 教学地点
  1281. salary: "", // 收费模式
  1282. head: "",
  1283. paymentPattern: "", // 缴费方式
  1284. isClass: false, //是否为课堂课
  1285. startTime: "",
  1286. ownershipType: "OWN", // 合作机构类型
  1287. feeType: null,
  1288. homeworkPushFlag: 1,
  1289. isGiveAccessories: 0,
  1290. memberCourseShowFlag: 0,
  1291. extracurricularTeacher: "NORMAL",
  1292. musicGroupPlanMakingId: '',
  1293. firstRecruitGrade: '',
  1294. defaultChargeStandard: '',
  1295. singleTrainMinutes: '',
  1296. coursePlan: '',
  1297. graduateGrade: '',
  1298. saleActivityDesc: '',
  1299. };
  1300. this.$refs["topinfo"].resetFields();
  1301. },
  1302. onGoHome() {
  1303. if (this.paymentNum <= 0) {
  1304. this.$message.error("当前缴费人数为0,无法开团");
  1305. return;
  1306. }
  1307. this.$confirm(`是否确认开团?`, "提示", {
  1308. confirmButtonText: "确定",
  1309. cancelButtonText: "取消",
  1310. type: "warning",
  1311. })
  1312. .then(() => {
  1313. musicGroupFound({
  1314. musicGroupId: this.$route.query.id,
  1315. }).then((res) => {
  1316. if (res.code == 200) {
  1317. // let query = this.$route.query;
  1318. // this.$message.success("开启成功");
  1319. // this.$router.push({
  1320. // path: "/teamList",
  1321. // query: {
  1322. // ...query,
  1323. // },
  1324. // });
  1325. this.onCancel();
  1326. }
  1327. });
  1328. })
  1329. .catch(() => {});
  1330. },
  1331. payStart() {
  1332. this.paymentStatus = true;
  1333. },
  1334. getStudentStatus() {
  1335. let obj = {
  1336. musicGroupId: this.teamid,
  1337. page: 1,
  1338. rows: 9999,
  1339. };
  1340. if (!this.teamid) return;
  1341. getStudentList(obj).then((res) => {
  1342. if (res.code == 200) {
  1343. res.data.rows.forEach((item) => {
  1344. // '未开启缴费', '开启缴费', '已缴费'
  1345. if (item.paymentStatus == 2) {
  1346. this.paymentNum += 1;
  1347. }
  1348. });
  1349. // this.rightList = res.data.rows;
  1350. // this.rules.total = res.data.total;
  1351. // return res;
  1352. }
  1353. });
  1354. },
  1355. payDate() {
  1356. let self = this;
  1357. return {
  1358. firstDayOfWeek: 1,
  1359. disabledDate(time) {
  1360. if (self.applyExpireDate) {
  1361. return (
  1362. time.getTime() <=
  1363. new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
  1364. );
  1365. } else {
  1366. return false;
  1367. }
  1368. },
  1369. };
  1370. },
  1371. onStartPayment(formName) {
  1372. // 开启缴费
  1373. this.$refs[formName].validate((valid) => {
  1374. if (valid) {
  1375. musicGroupOpenPay({
  1376. musicGroupId: this.teamid,
  1377. expireDate: this.paymentForm.paymentExpireDate,
  1378. // feeType: this.paymentForm.feeType
  1379. }).then((res) => {
  1380. if (res.code == 200) {
  1381. this.$message.success("开启成功");
  1382. this.paymentStatus = false;
  1383. this.$store.dispatch("delVisitedViews", this.$route);
  1384. this.$router.push({ path: "/teamList" });
  1385. // this.$router.push({
  1386. // path: "/business/resetTeaming",
  1387. // query: {
  1388. // status: "PAY",
  1389. // id: this.$route.query.id,
  1390. // name: this.$route.query.name,
  1391. // },
  1392. // });
  1393. // this.team_status = "PAY";
  1394. // this.paymentExpireDate = this.paymentForm.paymentExpireDate;
  1395. // this.getList();
  1396. }
  1397. });
  1398. } else {
  1399. return false;
  1400. }
  1401. });
  1402. },
  1403. applyDate() {
  1404. let self = this;
  1405. return {
  1406. firstDayOfWeek: 1,
  1407. disabledDate(time) {
  1408. if (self.paymentExpireDate) {
  1409. return (
  1410. time.getTime() >
  1411. new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
  1412. );
  1413. } else {
  1414. return false;
  1415. }
  1416. },
  1417. };
  1418. },
  1419. extendTime(isPay) {
  1420. this.isPay = isPay;
  1421. if (isPay) {
  1422. // 点击的延长缴费
  1423. this.extendForm.expireDate = this.paymentExpireDate;
  1424. } else {
  1425. // 点击的延长报名
  1426. this.extendForm.expireDate = this.applyExpireDate;
  1427. }
  1428. this.extendPaymentStatus = true;
  1429. },
  1430. onExtendPayment(formName, isPay) {
  1431. this.$refs[formName].validate((valid) => {
  1432. if (valid) {
  1433. if (!isPay) {
  1434. extensionApplyExpire({
  1435. musicGroupId: this.teamid,
  1436. expireDate: this.extendForm.expireDate,
  1437. }).then((res) => {
  1438. if (res.code == 200) {
  1439. this.$message.success("延长报名成功");
  1440. this.extendPaymentStatus = false;
  1441. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1442. if (res.code == 200) {
  1443. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1444. this.setBase(res);
  1445. }
  1446. });
  1447. } else {
  1448. this.$message.error(res.msg);
  1449. }
  1450. });
  1451. } else {
  1452. extensionPayment({
  1453. musicGroupId: this.teamid,
  1454. expireDate: this.extendForm.expireDate,
  1455. }).then((res) => {
  1456. if (res.code == 200) {
  1457. this.$message.success("延长缴费成功");
  1458. this.extendPaymentStatus = false;
  1459. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1460. if (res.code == 200) {
  1461. this.paymentExpireDate =
  1462. res.data.musicGroup.paymentExpireDate;
  1463. }
  1464. });
  1465. } else {
  1466. this.$message.error(res.msg);
  1467. }
  1468. });
  1469. }
  1470. }
  1471. });
  1472. },
  1473. onCreateQRCode(type) {
  1474. // 生成报名二维码
  1475. let id = this.teamid;
  1476. this.codeStatus = true;
  1477. if (type == "payment") {
  1478. this.codeTitle = "学员报名链接";
  1479. this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  1480. } else if (type == "detail") {
  1481. let teamName = this.$route.query.name;
  1482. this.codeTitle = "报名缴费详情";
  1483. this.qrCodeUrl =
  1484. vaildTeacherUrl() +
  1485. "/#/order?musicGroupId=" +
  1486. id +
  1487. "&musicGroupName=" +
  1488. teamName;
  1489. } else if (type == "rePayment") {
  1490. this.codeTitle = "学生报名链接(无乐器)";
  1491. this.qrCodeUrl =
  1492. vaildStudentUrl() + "/#/login?musicGroupId=" + id + "&instrument=1";
  1493. }
  1494. },
  1495. gotoStudentList() {
  1496. this.$router.push({
  1497. query: merge(this.$route.query, { tabrouter: 7 }),
  1498. });
  1499. // this.$router.replace({query:{...this.$route.query,tabrouter:7}})
  1500. },
  1501. setBase(res) {
  1502. this.topFrom.name = res.data.musicGroup.name;
  1503. this.$emit("getName", this.topFrom.name);
  1504. this.topFrom.time = res.data.musicGroup.applyExpireDate;
  1505. this.topFrom.type = res.data.musicGroup.chargeTypeId;
  1506. this.topFrom.startClass = res.data.musicGroup.enrollClasses.split(",");
  1507. this.topFrom.paymentPattern = res.data.musicGroup.paymentPattern;
  1508. this.topFrom.paymentValidStartDate =
  1509. res.data.musicGroup.paymentValidStartDate;
  1510. this.topFrom.paymentValidEndDate =
  1511. res.data.musicGroup.paymentValidEndDate;
  1512. this.topFrom.section = res.data.musicGroup.organId;
  1513. this.topFrom.courseViewType = res.data.musicGroup.courseViewType;
  1514. this.topFrom.school = res.data.musicGroup.cooperationOrganId;
  1515. this.topFrom.teacher = res.data.musicGroup.educationalTeacherId;
  1516. this.topFrom.boss = res.data.musicGroup.teamTeacherId;
  1517. this.topFrom.address = res.data.musicGroup.schoolId;
  1518. // this.topFrom.salary = res.data.musicGroup.settlementType;
  1519. this.topFrom.head = res.data.musicGroup.directorUserId
  1520. ? res.data.musicGroup.directorUserId
  1521. : null;
  1522. this.topFrom.isClass = res.data.musicGroup.isClassroomLessons;
  1523. this.topFrom.startTime = res.data.musicGroup.expectStartGroupDate;
  1524. this.topFrom.ownershipType = res.data.musicGroup.ownershipType;
  1525. this.topFrom.repairUserId = res.data.musicGroup.repairUserId
  1526. ? res.data.musicGroup.repairUserId
  1527. : null;
  1528. this.topFrom.feeType = res.data.musicGroup.feeType
  1529. ? res.data.musicGroup.feeType
  1530. : null;
  1531. this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1532. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1533. this.topFrom.transactionTeacherId =
  1534. res.data.musicGroup.transactionTeacherId || "";
  1535. this.topFrom.homeworkPushFlag = res.data.musicGroup.homeworkPushFlag;
  1536. this.topFrom.isGiveAccessories = res.data.musicGroup.isGiveAccessories
  1537. ? 1
  1538. : 0;
  1539. this.topFrom.memberCourseShowFlag = res.data.musicGroup
  1540. .memberCourseShowFlag
  1541. ? 1
  1542. : 0;
  1543. this.topFrom.extracurricularTeacher =
  1544. res.data.musicGroup.extracurricularTeacher;
  1545. this.topFrom.musicGroupPlanMakingId =
  1546. res.data.musicGroup.musicGroupPlanMakingId;
  1547. this.topFrom.firstRecruitGrade =
  1548. res.data.musicGroup.firstRecruitGrade+'';
  1549. this.topFrom.defaultChargeStandard =
  1550. res.data.musicGroup.defaultChargeStandard;
  1551. this.topFrom.singleTrainMinutes =
  1552. res.data.musicGroup.singleTrainMinutes;
  1553. this.topFrom.coursePlan =
  1554. res.data.musicGroup.coursePlan;
  1555. this.topFrom.graduateGrade =
  1556. res.data.musicGroup.graduateGrade+'';
  1557. this.topFrom.saleActivityDesc =
  1558. res.data.musicGroup.saleActivityDesc;
  1559. localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
  1560. },
  1561. changeType(val) {
  1562. if (val) {
  1563. localStorage.removeItem(`${this.teamid}sound`);
  1564. }
  1565. },
  1566. checkCourseView(val) {
  1567. if (this.teamStatus == "newTeam" || this.teamStatus == "teamDraft") {
  1568. return false;
  1569. } else {
  1570. if (
  1571. this.topFrom.courseViewType == 0 ||
  1572. this.topFrom.courseViewType == 1
  1573. ) {
  1574. // val ==2
  1575. return false;
  1576. } else {
  1577. return val == 0 || val == 1;
  1578. }
  1579. }
  1580. },
  1581. },
  1582. computed: {
  1583. startClassString() {
  1584. return this.topFrom.startClass
  1585. .map((item) => {
  1586. for (let i in this.classStatus) {
  1587. if (item == this.classStatus[i].value) {
  1588. return this.classStatus[i].label;
  1589. }
  1590. }
  1591. // return this.classStatus[item]
  1592. })
  1593. .join(",");
  1594. },
  1595. showNext() {
  1596. const teamStatus = this.teamStatus;
  1597. return (
  1598. teamStatus == "newTeam" ||
  1599. teamStatus == "teamDraft" ||
  1600. teamStatus == "teamAudit" ||
  1601. teamStatus == "feeAudit"
  1602. );
  1603. },
  1604. },
  1605. };
  1606. </script>
  1607. <style lang="scss" >
  1608. .messageBox-prompt-test {
  1609. .el-message-box__status {
  1610. top: 25% !important;
  1611. }
  1612. }
  1613. .base-container {
  1614. overflow: auto;
  1615. // display: flex;
  1616. // flex-direction: row;
  1617. // justify-content: flex-start;
  1618. // flex-wrap: nowrap;
  1619. font-size: 14px;
  1620. color: #444;
  1621. // width: fill-available;
  1622. .banseLeft {
  1623. // width: 1050px;
  1624. .head {
  1625. height: 48px;
  1626. line-height: 48px;
  1627. background-color: #edeef0;
  1628. font-size: 14px;
  1629. font-weight: bold;
  1630. color: #444;
  1631. padding: 0 11px;
  1632. margin-bottom: 20px;
  1633. }
  1634. .noMargin.head {
  1635. margin-bottom: 0;
  1636. }
  1637. .num {
  1638. padding: 15px 11px;
  1639. }
  1640. .checkRow {
  1641. min-width: 1200px;
  1642. padding-left: 28px;
  1643. display: flex;
  1644. flex-direction: row;
  1645. justify-content: flex-start;
  1646. flex-wrap: nowrap;
  1647. overflow: auto;
  1648. .el-checkbox {
  1649. line-height: 72px;
  1650. width: 120px;
  1651. }
  1652. .inputWrap {
  1653. line-height: 72px;
  1654. font-size: 14px;
  1655. color: #777;
  1656. margin-left: 65px;
  1657. input {
  1658. // border: none;
  1659. // width: 80px;
  1660. // margin-right: 10px;
  1661. // outline: none;
  1662. }
  1663. }
  1664. .inputWrap.rightFirst {
  1665. margin-left: 245px;
  1666. }
  1667. .textWrap {
  1668. display: flex;
  1669. flex-direction: row;
  1670. justify-content: flex-start;
  1671. font-size: 14px;
  1672. color: #777;
  1673. align-items: center;
  1674. span {
  1675. color: #f97215;
  1676. }
  1677. }
  1678. .selectWrap {
  1679. font-size: 14px;
  1680. padding-top: 5px;
  1681. margin-left: 100px;
  1682. margin-right: 52px;
  1683. .rowSelect {
  1684. .el-input__inner {
  1685. min-height: 69px;
  1686. }
  1687. }
  1688. }
  1689. .chioseList {
  1690. display: flex;
  1691. flex-direction: row;
  1692. justify-content: flex-start;
  1693. align-items: center;
  1694. font-size: 14px;
  1695. color: #777;
  1696. margin-left: 64px;
  1697. .chioseItem {
  1698. width: 80px;
  1699. height: 30px;
  1700. border-radius: 15px;
  1701. border: 1px solid #979797;
  1702. margin-right: 10px;
  1703. line-height: 30px;
  1704. text-align: center;
  1705. cursor: pointer;
  1706. }
  1707. .chioseItem.active {
  1708. background-color: var(--color-primary);
  1709. border: 1px solid var(--color-primary);
  1710. color: #fff;
  1711. }
  1712. }
  1713. // &:nth-child(even) {
  1714. // background-color: #c6cbd4;
  1715. // input {
  1716. // background-color: #c6cbd4;
  1717. // }
  1718. // }
  1719. }
  1720. }
  1721. .btnWrap {
  1722. margin-top: 30px;
  1723. }
  1724. .el-checkbox__input.is-checked + .el-checkbox__label {
  1725. color: #606266;
  1726. }
  1727. .subTitle {
  1728. // width: 1203px;
  1729. height: 40px;
  1730. line-height: 40px;
  1731. background-color: #fefceb;
  1732. padding: 0 25px;
  1733. box-sizing: border-box;
  1734. font-size: 16px;
  1735. color: #474747;
  1736. margin-bottom: 20px;
  1737. }
  1738. .chioseWrap {
  1739. margin-bottom: 30px;
  1740. display: flex;
  1741. flex-direction: row;
  1742. padding: 0 25px;
  1743. p {
  1744. width: 80px;
  1745. font-size: 14px;
  1746. // margin-right: 30px;
  1747. }
  1748. }
  1749. .classCheckBox {
  1750. margin-right: 10px;
  1751. }
  1752. }
  1753. </style>
  1754. <style scoped lang="scss">
  1755. .banseLeft {
  1756. :deep(.el-form--inline) {
  1757. .el-form-item__content {
  1758. display: block;
  1759. }
  1760. }
  1761. ::v-deep .el-select {
  1762. width: 300px !important;
  1763. }
  1764. ::v-deep .el-date-editor {
  1765. width: 300px !important;
  1766. }
  1767. ::v-deep .el-checkbox {
  1768. margin-left: 15px !important;
  1769. }
  1770. ::v-deep .el-input {
  1771. position: relative;
  1772. font-size: 14px;
  1773. display: inline-block;
  1774. width: 300px;
  1775. }
  1776. }
  1777. input[disabled] {
  1778. background-color: #fff;
  1779. border-color: #b3b3b3;
  1780. color: #606266;
  1781. }
  1782. ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1783. background-color: #00a79d;
  1784. border-color: #00a79d;
  1785. // -webkit-box-shadow: -1px 0 0 0 rgb (19, 129, 122);
  1786. box-shadow: -1px 0 0 #00a79d;
  1787. color: #fff;
  1788. outline: none;
  1789. }
  1790. ::v-deep .el-radio-button__inner {
  1791. &:hover {
  1792. color: #00a79d;
  1793. }
  1794. outline: none;
  1795. }
  1796. ::v-deep .el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) {
  1797. -webkit-box-shadow: none;
  1798. box-shadow: none;
  1799. }
  1800. </style>