teamBaseInfo.vue 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903
  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
  466. label="学生基数"
  467. prop="graduateGrade"
  468. >
  469. <el-input type="number" :disabled="basdisabled" v-model="topFrom.basicStudentNum" />
  470. </el-form-item>
  471. <el-form-item
  472. label="缴费方"
  473. prop="paymentUserType"
  474. >
  475. <el-select
  476. v-model.trim="topFrom.paymentUserType"
  477. filterable
  478. :disabled="basdisabled"
  479. clearable
  480. >
  481. <el-option
  482. v-for="(item, index) in gradeList"
  483. :key="index"
  484. :label="item.label"
  485. :value="item.value"
  486. ></el-option>
  487. </el-select>
  488. </el-form-item>
  489. <el-form-item
  490. label="计费方式"
  491. prop="paymentUserType"
  492. >
  493. <el-select
  494. v-model.trim="topFrom.chargeMode"
  495. filterable
  496. :disabled="basdisabled"
  497. clearable
  498. >
  499. <el-option
  500. v-for="(item, index) in gradeList"
  501. :key="index"
  502. :label="item.label"
  503. :value="item.value"
  504. ></el-option>
  505. </el-select>
  506. </el-form-item>
  507. <el-form-item label="销售活动" prop="saleActivityDesc">
  508. <el-input
  509. style="width:300px"
  510. placeholder="请输入销售活动"
  511. :maxlength="100"
  512. v-model.trim="topFrom.saleActivityDesc"
  513. show-word-limit
  514. type="textarea"
  515. :rows="3"
  516. :disabled="basdisabled"
  517. ></el-input>
  518. </el-form-item>
  519. </div>
  520. <div class="head">乐团设置:</div>
  521. <el-form-item
  522. label="同步群消息"
  523. prop="homeworkPushFlag"
  524. label-width="200px"
  525. :rules="[{ required: true, message: '同步群消息不能为空' }]"
  526. >
  527. <template #label>
  528. <p style="position: relative; display: inline-block">
  529. 开课后作业同步群消息
  530. <el-tooltip placement="top" popper-class="mTooltip">
  531. <div slot="content">
  532. 学员提交乐团课后作业时,群聊中是否发送作业提交消息
  533. </div>
  534. <i
  535. class="el-icon-question"
  536. style="font-size: 18px; color: #f56c6c"
  537. ></i>
  538. </el-tooltip>
  539. </p>
  540. </template>
  541. <el-switch
  542. v-model="topFrom.homeworkPushFlag"
  543. :disabled="basdisabled"
  544. :active-value="1"
  545. :inactive-value="0"
  546. >
  547. </el-switch>
  548. </el-form-item>
  549. <el-form-item
  550. label="是否赠送辅件"
  551. prop="isGiveAccessories"
  552. label-width="200px"
  553. :rules="[{ required: true, message: '是否赠送辅件不能为空' }]"
  554. >
  555. <template #label>
  556. <p style="position: relative; display: inline-block">
  557. 是否赠送辅件
  558. <el-tooltip placement="top" popper-class="mTooltip">
  559. <div slot="content">购买团练宝是否赠送辅件</div>
  560. <i
  561. class="el-icon-question"
  562. style="font-size: 18px; color: #f56c6c"
  563. ></i>
  564. </el-tooltip>
  565. </p>
  566. </template>
  567. <el-switch
  568. v-model="topFrom.isGiveAccessories"
  569. :disabled="basdisabled"
  570. :active-value="'true'"
  571. :inactive-value="'false'"
  572. >
  573. </el-switch>
  574. </el-form-item>
  575. <!-- <el-form-item
  576. label="是否显示免费课程"
  577. prop="memberCourseShowFlag"
  578. label-width="200px"
  579. :rules="[{ required: true, message: '是否显示免费课程不能为空' }]"
  580. >
  581. <template #label>
  582. <p style="position: relative; display: inline-block">
  583. 是否显示免费课程
  584. <el-tooltip placement="top" popper-class="mTooltip">
  585. <div slot="content">报名时是否显示免费赠送课程</div>
  586. <i
  587. class="el-icon-question"
  588. style="font-size: 18px; color: #f56c6c"
  589. ></i>
  590. </el-tooltip>
  591. </p>
  592. </template>
  593. <el-switch
  594. v-model="topFrom.memberCourseShowFlag"
  595. :disabled="basdisabled"
  596. :active-value="1"
  597. :inactive-value="0"
  598. >
  599. </el-switch>
  600. </el-form-item> -->
  601. <!-- <el-form-item label prop="isClass">
  602. <el-checkbox v-model.trim="topFrom.isClass" :disabled="basdisabled"
  603. >课堂课乐团</el-checkbox
  604. >
  605. </el-form-item> -->
  606. <br />
  607. <el-form-item label="" v-if="teamStatus == 'teamDraft'">
  608. <p style="color: red; padding-left: 50px">
  609. 修改【收费类型】会重置乐团声部与缴费信息
  610. </p>
  611. </el-form-item>
  612. </el-form>
  613. <div class="btnWrap">
  614. <!-- <div
  615. class="nextBtn"
  616. v-if="teamStatus == 'resetTeam'"
  617. v-permission="{
  618. child: 'musicGroup/update',
  619. parent: '/resetTeaming/teamBaseInfo',
  620. }"
  621. @click="resetSubmit"
  622. >
  623. 修改
  624. </div> -->
  625. <!-- 审批或者草稿的下一步 -->
  626. <div class="nextBtn" @click="gotoNext()" v-if="!basdisabled">
  627. {{ this.teamStatus == "teamDraft" ? "下一步" : "保存" }}
  628. </div>
  629. <div
  630. class="nextBtn"
  631. v-if="this.teamStatus == 'teamAudit'"
  632. @click="gotoNext()"
  633. >
  634. 下一步
  635. </div>
  636. </div>
  637. </div>
  638. </div>
  639. </template>
  640. <script>
  641. import {
  642. getType,
  643. getTeamBaseInfo,
  644. resetTeamBaseInfo,
  645. getEmployeeOrgan,
  646. getStudentList,
  647. musicGroupOpenPay,
  648. extensionPayment,
  649. extensionApplyExpire,
  650. getOrganRole,
  651. getTeacher,
  652. createTeam,
  653. getGradeList,
  654. } from "@/api/buildTeam";
  655. import dayjs from "dayjs";
  656. import merge from "webpack-merge";
  657. import { queryByOrganId, getSchool } from "@/api/systemManage";
  658. import qrCode from "@/components/QrCode/index";
  659. import { classStatus, courseViewTypeList } from "@/utils/searchArray";
  660. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  661. import { getMusicGroupPlanMakingList } from "@/views/baseRulesManager/api";
  662. import mergeMusic from "../components/merge-music";
  663. const singleTrainMinutesList = [
  664. { name: "90+90", id: "90+90" },
  665. { name: "90+90+45", id: "90+90+45" },
  666. ];
  667. const coursePlanList = [
  668. { name: "PlanS", id: "PlanS" },
  669. { name: "PlanA", id: "PlanA" },
  670. { name: "PlanB", id: "PlanB" },
  671. { name: "PlanC", id: "PlanC" },
  672. { name: "PlanD", id: "PlanD" },
  673. { name: "PlanE", id: "PlanE" },
  674. ];
  675. export default {
  676. components: {
  677. mergeMusic,
  678. qrCode,
  679. },
  680. name: "teamBaseInfo",
  681. props: ["getTeamList"],
  682. data() {
  683. return {
  684. classStatus,
  685. courseViewTypeList,
  686. organId: null,
  687. topFrom: {
  688. type: "", // 收费类型
  689. section: "", //所属分部
  690. courseViewType: "", // 收费模式
  691. school: "", // 合作单位
  692. teacher: null, // 乐团主管
  693. name: "", //乐团名称
  694. boss: "", // 运营主管
  695. time: "", // 报名截止时间
  696. startClass: [], // 招生年级起始
  697. address: "", // 教学地点
  698. salary: "", // 收费模式
  699. head: "",
  700. homeworkPushFlag: 1, // 是否同步群消息
  701. isGiveAccessories: 0, // 是否赠送辅件 默认不赠送
  702. memberCourseShowFlag: 0,
  703. isClass: false, //是否为课堂课
  704. startTime: "",
  705. feeType: null,
  706. paymentPattern: "", // 缴费方式
  707. paymentValid: [], // 缴费有效期
  708. paymentValidStartDate: null, // 缴费有效期开始
  709. paymentValidEndDate: null, // 缴费有效期结束
  710. ownershipType: "OWN", // 合作机构类型
  711. repairUserId: null, // 维修技师
  712. transactionTeacherId: null, // 衔接老师
  713. extracurricularTeacher: "NORMAL",
  714. musicGroupPlanMakingId: "", //建团编制
  715. firstRecruitGrade: "", // 成团年级
  716. defaultChargeStandard: "", // 收费标准
  717. singleTrainMinutes: "", //单次训练时长
  718. coursePlan: "", // 课程计划
  719. graduateGrade: "", // 毕业年级
  720. saleActivityDesc: "", // 销售活动描述
  721. basicStudentNum:"", // 学生基数
  722. paymentUserType:"", // 缴费方
  723. chargeMode:"", // 计费方式
  724. },
  725. baseInfo: {},
  726. money: 580,
  727. orderInfo: {
  728. marketPrice: 0, // 原价总金额
  729. referencePrice: 0, // 现价总金额
  730. }, // 金额列表,金额计算
  731. sectionList: [], // 分部列表
  732. typeList: [], // 收费类型列表
  733. cooperationList: [], // 教学点列表
  734. teacherList: [], // 获取老师列表
  735. educationList: [], // 乐团主管
  736. bossList: [],
  737. transactionList: [],
  738. addList: [], // 教学地点列表
  739. activeTeam: [],
  740. gradeList: [], // 年级
  741. gradeListObj: null,
  742. teamid: "",
  743. teamStatus: "",
  744. isInit: false,
  745. technician: [],
  746. basdisabled: false,
  747. // 整合报名中
  748. paymentExpireDate: "",
  749. applyExpireDate: null,
  750. mergeVisible: false,
  751. team_status: "",
  752. paymentNum: 0,
  753. paymentStatus: false,
  754. paymentForm: {
  755. paymentExpireDate: null,
  756. // feeType: null
  757. },
  758. paymentRules: {
  759. paymentExpireDate: [
  760. { required: true, message: "请设置缴费截止日期", trigger: "blur" },
  761. ],
  762. },
  763. extendForm: {
  764. expireDate: null,
  765. },
  766. extendRule: {
  767. expireDate: [
  768. { required: true, message: "请选择延长时间", trigger: "change" },
  769. ],
  770. },
  771. isPay: false,
  772. extendPaymentStatus: false, // 延长缴费
  773. codeStatus: false,
  774. qrCodeUrl: null,
  775. codeTitle: null,
  776. tenantId: "",
  777. coursePlanList: coursePlanList,
  778. musicGroupPlanMakingList: [],
  779. singleTrainMinutesList: singleTrainMinutesList,
  780. };
  781. },
  782. created() {},
  783. mounted() {
  784. if (this.$route.query.type == "newTeam") {
  785. this.onReset();
  786. }
  787. this.init();
  788. },
  789. activated() {
  790. if (
  791. (this.teamid && this.teamid != this.$route.query.id) ||
  792. this.teamStatus != this.$route.query.type
  793. ) {
  794. this.init();
  795. }
  796. if (this.$route.query.clear == "true") {
  797. this.onReset();
  798. }
  799. if (this.teamStatus == "newTeam") {
  800. this.$store.dispatch("buildIndex", 0);
  801. }
  802. if (this.teamStatus != "newTeam") {
  803. this.$store.dispatch("draftIndex", 0);
  804. }
  805. this.teamStatus = this.$route.query.type;
  806. console.log(this.$route.query.type,'teamStatus')
  807. if (
  808. this.teamStatus == "look" ||
  809. this.teamStatus == "teamAudit" ||
  810. this.teamStatus == "feeAudit" ||
  811. this.teamStatus == "APPLY" ||
  812. this.teamStatus == "PAY" ||
  813. this.teamStatus == 'FEE_AUDIT_FAILED'
  814. ) {
  815. this.basdisabled = true;
  816. } else {
  817. this.basdisabled = false;
  818. }
  819. },
  820. deactivated() {},
  821. // async beforeDestroy() {
  822. // await this.setStore();
  823. // // await new Promise((res, err) => {
  824. // // setTimeout(() => {
  825. // // res();
  826. // // }, 1000);
  827. // // });
  828. // },
  829. methods: {
  830. async setStore(str) {
  831. if (this.teamid) {
  832. let loadash = this.$helpers.lodash;
  833. let sotrage = JSON.parse(localStorage.getItem(`${this.teamid}base`));
  834. // console.log(sotrage,this.topFrom)
  835. if (!loadash.isEqual(this.topFrom, sotrage) && sotrage) {
  836. // 提示保存
  837. return await this.$confirm("已修改当前页面数据是否保存", "提示", {
  838. confirmButtonText: "是",
  839. cancelButtonText: "否",
  840. type: "warning",
  841. closeOnClickModal: false,
  842. distinguishCancelAndClose: true,
  843. })
  844. .then(async () => {
  845. // localStorage.setItem(
  846. // `${this.teamid}base`,
  847. // JSON.stringify(this.topFrom)
  848. // );
  849. let b = await this.gotoNext(str);
  850. console.log(b);
  851. return b;
  852. })
  853. .catch((e) => {
  854. console.log(e);
  855. if (e == "close") {
  856. return false;
  857. } else {
  858. localStorage.removeItem(`${this.teamid}base`);
  859. return true;
  860. }
  861. // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
  862. });
  863. } else {
  864. return true;
  865. // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
  866. }
  867. } else {
  868. localStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
  869. return true;
  870. }
  871. },
  872. //|| this.teamStatus === 'teamAudit'
  873. isNotEditing: function () {
  874. return !(
  875. this.teamStatus === "teamDraft" ||
  876. this.teamStatus === "newTeam" ||
  877. this.teamStatus === "teamList"
  878. );
  879. },
  880. changeFeeType(val) {},
  881. changePaymentValidStartDate(val) {
  882. if (val) {
  883. this.$set(this.topFrom, "paymentValidEndDate", "");
  884. }
  885. },
  886. changePaymentPattern(val) {
  887. // if (val === 2) {
  888. // // this.topFrom.paymentValidStartDate = null
  889. // this.$set(this.topFrom, 'paymentValidEndDate', '')
  890. // }
  891. },
  892. beginDate(end) {
  893. return {
  894. firstDayOfWeek: 1,
  895. disabledDate(time) {
  896. if (end) {
  897. return new Date(end).getTime() - 86400000 >= time.getTime();
  898. } else {
  899. return time.getTime() + 86400000 < Date.now();
  900. //开始时间不选时,结束时间最大值小于等于当天
  901. }
  902. },
  903. };
  904. },
  905. init() {
  906. this.isInit = true;
  907. if (this.$route.query.id) {
  908. this.teamid = this.$route.query.id;
  909. }
  910. this.teamStatus = this.$route.query.type;
  911. this.team_status = this.$route.query.team_status;
  912. this.tenantId = this.$helpers.tenantId;
  913. // if (this.teamStatus == "newTeam") {
  914. // this.$store.dispatch("buildIndex", 0);
  915. // }
  916. // if (this.teamStatus != "newTeam") {
  917. // this.$store.dispatch("draftIndex", 0);
  918. // }
  919. // 获取建团编制
  920. getMusicGroupPlanMakingList().then((res) => {
  921. if (res.code == 200) {
  922. this.musicGroupPlanMakingList = res.data;
  923. }
  924. });
  925. // 传过来的乐团信息
  926. this.activeTeam = this.getTeamList;
  927. if (
  928. this.teamStatus == "look" ||
  929. this.teamStatus == "teamAudit" ||
  930. this.teamStatus == "feeAudit" ||
  931. this.teamStatus == "teamCanceled"||
  932. this.teamStatus == 'FEE_AUDIT_FAILED'
  933. ) {
  934. this.basdisabled = true;
  935. } else {
  936. this.basdisabled = false;
  937. }
  938. if (this.$route.query.id) {
  939. // 单团修改
  940. this.teamid = this.$route.query.id;
  941. let sotrage = JSON.parse(
  942. localStorage.getItem(`${this.$route.query.id}base`)
  943. );
  944. if (!sotrage?.section) {
  945. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  946. if (res.code == 200) {
  947. // if (this.$listeners.getBaseInfo) {
  948. // this.$listeners.getBaseInfo(res.data);
  949. // }
  950. // 头部
  951. this.setBase(res);
  952. // // 循环缴费月
  953. // this.payList.chioseMonth = res.data.months;
  954. if (res.data.musicGroup.organId) {
  955. // 获取员工
  956. this.getBaseList(res.data.musicGroup.organId);
  957. }
  958. this.$emit("getBaseInfo", res.data);
  959. }
  960. });
  961. } else {
  962. this.topFrom = sotrage;
  963. // this.applyExpireDate = sotrage.time;
  964. // this.paymentExpireDate = Storage.paymentExpireDate;
  965. if (this.topFrom?.section) {
  966. // 获取员工
  967. this.getBaseList(this.topFrom.section);
  968. }
  969. }
  970. } else {
  971. // 如果是新建团
  972. let sotrage = JSON.parse(localStorage.getItem(`newTeambase`));
  973. sotrage ? (this.topFrom = sotrage) : this.topFrom;
  974. if (this.topFrom?.section) {
  975. // 获取员工
  976. this.getBaseList(this.topFrom.section);
  977. }
  978. }
  979. this.getStudentStatus();
  980. this.$emit("getName", this.topFrom?.name);
  981. // getEmployeeOrgan().then((res) => {
  982. // if (res.code == 200) {
  983. // this.sectionList = res.data;
  984. // }
  985. // });
  986. // // 2.获取收费类型选项卡
  987. // getType({ rows: 1000 }).then((res) => {
  988. // if (res.code == 200) {
  989. // this.typeList = res.data.rows;
  990. // }
  991. // });
  992. Promise.all([getType({ rows: 1000 }), getEmployeeOrgan()]).then(
  993. (values) => {
  994. if (values[0].code == 200) {
  995. this.typeList = values[0].data;
  996. // this.typeList = [];
  997. }
  998. if (values[1].code == 200) {
  999. this.sectionList = values[1].data;
  1000. // this.sectionList = [];
  1001. }
  1002. let arr = [];
  1003. if (this.sectionList.length <= 0) {
  1004. arr.push("organ");
  1005. } else {
  1006. if (!this.topFrom.section) {
  1007. this.$set(this.topFrom, "section", this.sectionList[0].id);
  1008. this.changeSection(this.sectionList[0].id);
  1009. // diao
  1010. }
  1011. }
  1012. if (this.typeList.length <= 0) {
  1013. arr.push("teamPayType");
  1014. }
  1015. this.$bus.$emit("showguide", arr);
  1016. }
  1017. );
  1018. // console.log('到这里来',getEmployeeOrgan())
  1019. // 缓存设置时的状态
  1020. },
  1021. changeSection(val) {
  1022. // 修改分部的时候 重置运营主管 重置乐团主管 重置乐队指导 合作单位 教学点
  1023. this.topFrom.teacher = null;
  1024. this.topFrom.boss = "";
  1025. this.topFrom.head = "";
  1026. this.topFrom.school = "";
  1027. this.topFrom.address = "";
  1028. this.topFrom.firstRecruitGrade = "";
  1029. this.topFrom.graduateGrade = "";
  1030. // 发请求 根据分部id 查询所有员工
  1031. if (val) {
  1032. this.getBaseList(val);
  1033. }
  1034. },
  1035. async getBaseList(val) {
  1036. // 合作单位
  1037. // queryByOrganId({ organId: val }).then((res) => {
  1038. // if (res.code == 200) {
  1039. // this.cooperationList = res.data;
  1040. // }
  1041. // });
  1042. // 教学点=>学校
  1043. // getSchool({ organId: val }).then((res) => {
  1044. // if (res.code == 200) {
  1045. // this.addList = res.data;
  1046. // }
  1047. // });
  1048. // 获取乐团主管
  1049. try {
  1050. const ruselt = await getOrganRole({
  1051. id: val,
  1052. });
  1053. // 乐团主管
  1054. this.educationList = ruselt?.data?.EDUCATION;
  1055. // 维修技师
  1056. this.technician = ruselt?.data?.REPAIR;
  1057. // this.bossList = ruselt?.data?.TEAM_TEACHER;
  1058. // 衔接老师
  1059. this.transactionList = ruselt?.data?.JOIN_TEACHER;
  1060. } catch (e) {
  1061. console.log(e);
  1062. }
  1063. // 获取指导老师
  1064. getTeacher({ organId: val }).then((res) => {
  1065. if (res.code == 200) {
  1066. this.teacherList = res.data;
  1067. }
  1068. });
  1069. // 获取年级
  1070. getGradeList({ id: val }).then((res) => {
  1071. let result = res.data;
  1072. this.gradeListObj = res.data;
  1073. if (res.code == 200 && result) {
  1074. for (let i in result) {
  1075. this.gradeList.push({
  1076. value: i,
  1077. label: result[i],
  1078. });
  1079. }
  1080. }
  1081. });
  1082. Promise.all([
  1083. queryByOrganId({ organId: val }),
  1084. getSchool({ organId: val }),
  1085. ]).then((values) => {
  1086. if (values[0].code == 200) {
  1087. this.cooperationList = values[0].data;
  1088. }
  1089. if (values[1].code == 200) {
  1090. this.addList = values[1].data;
  1091. }
  1092. let arr = [];
  1093. if (this.cooperationList.length <= 0) {
  1094. arr.push("cooperationOrgan");
  1095. }
  1096. if (this.addList.length <= 0) {
  1097. arr.push("school");
  1098. }
  1099. if (arr.length > 0) {
  1100. this.$bus.$emit("showguide", arr);
  1101. return;
  1102. }
  1103. });
  1104. },
  1105. chioseSchool(val) {
  1106. // 清除教学点
  1107. this.topFrom.teacher = null;
  1108. if (val) {
  1109. console.log(this.cooperationList);
  1110. this.cooperationList.forEach((item) => {
  1111. if (item.id == val) {
  1112. console.log(item);
  1113. this.$set(this.topFrom, "teacher", item.educationUserId);
  1114. console.log(this.topFrom);
  1115. }
  1116. });
  1117. }
  1118. console.log("chioseSchool", this.topFrom.teacher);
  1119. },
  1120. async gotoNext(str) {
  1121. let tempStatus;
  1122. return new Promise((resolve, reject) => {
  1123. this.$refs["topinfo"].validate(async (valid, object) => {
  1124. if (!valid) {
  1125. this.$message.error("请填写建团必要参数");
  1126. // return false
  1127. resolve(false);
  1128. } else {
  1129. // 判断一下是否勾选了课程类型而没有输入金额
  1130. // 验证通过
  1131. this.$store.dispatch("topinfo", this.topFrom);
  1132. if (this.teamStatus == "teamAudit") {
  1133. // 获取数据提交
  1134. this.$emit("handleClick", { name: "2" });
  1135. } else {
  1136. this.$emit("getName", this.topFrom.name);
  1137. tempStatus = await this.resetSubmit(str);
  1138. console.log(tempStatus, "tempStatus");
  1139. resolve(tempStatus);
  1140. }
  1141. }
  1142. });
  1143. });
  1144. },
  1145. async resetSubmit(str) {
  1146. return new Promise((resolve, reject) => {
  1147. this.$refs["topinfo"].validate(async (valid, object) => {
  1148. if (!valid) {
  1149. this.$message.error("请填写必要参数");
  1150. reject();
  1151. } else {
  1152. let status = null;
  1153. // 1.resetTeam 乐团修改
  1154. // 2.newTeam 新建乐团
  1155. // 3.teamList 跨团修改
  1156. // 4.teamDraft 乐团草稿
  1157. switch (this.teamStatus) {
  1158. case "resetTeam": {
  1159. status = "PROGRESS";
  1160. break;
  1161. }
  1162. case "newTeam": {
  1163. status = "DRAFT";
  1164. break;
  1165. }
  1166. case "teamList": {
  1167. status = null;
  1168. break;
  1169. }
  1170. case "teamDraft": {
  1171. status = "DRAFT";
  1172. break;
  1173. }
  1174. }
  1175. let obj = {};
  1176. // topFrom.ownershipType
  1177. // 修改 合并对象
  1178. obj.musicGroup = {
  1179. settlementType: this.topFrom.salary,
  1180. applyExpireDate: this.topFrom.time?dayjs(this.topFrom.time).format(
  1181. "YYYY-MM-DD HH:mm:ss"
  1182. ):null,
  1183. chargeTypeId: this.topFrom.type,
  1184. cooperationOrganId: this.topFrom.school,
  1185. courseViewType: this.topFrom.courseViewType,
  1186. teamTeacherId: this.topFrom.boss,
  1187. // educationalTeacherId: this.topFrom.teacher,
  1188. // chioseSchool
  1189. enrollClasses: this.topFrom.startClass.join(","),
  1190. name: this.topFrom.name,
  1191. paymentPattern: this.topFrom.paymentPattern,
  1192. paymentValidStartDate: this.topFrom.paymentValidStartDate
  1193. ? dayjs(this.topFrom.paymentValidStartDate).format("YYYY-MM-DD")
  1194. : this.topFrom.paymentValidStartDate,
  1195. paymentValidEndDate: this.topFrom.paymentValidEndDate
  1196. ? dayjs(this.topFrom.paymentValidEndDate).format("YYYY-MM-DD")
  1197. : this.topFrom.paymentValidEndDate,
  1198. organId: this.topFrom.section,
  1199. // paymentMonths:obj.months 有待确认
  1200. schoolId: this.topFrom.address,
  1201. id: this.teamid,
  1202. directorUserId: this.topFrom.head,
  1203. isClassroomLessons: this.topFrom.isClass,
  1204. status,
  1205. expectStartGroupDate: this.topFrom.startTime,
  1206. ownershipType: this.topFrom.ownershipType,
  1207. repairUserId: this.topFrom.repairUserId || null,
  1208. feeType: this.topFrom.feeType,
  1209. transactionTeacherId: this.topFrom.transactionTeacherId,
  1210. homeworkPushFlag: this.topFrom.homeworkPushFlag,
  1211. isGiveAccessories: this.topFrom.isGiveAccessories,
  1212. memberCourseShowFlag: this.topFrom.memberCourseShowFlag,
  1213. extracurricularTeacher: this.topFrom.extracurricularTeacher,
  1214. musicGroupPlanMakingId: this.topFrom.musicGroupPlanMakingId,
  1215. firstRecruitGrade: this.topFrom.firstRecruitGrade,
  1216. defaultChargeStandard: this.topFrom.defaultChargeStandard,
  1217. singleTrainMinutes: this.topFrom.singleTrainMinutes,
  1218. coursePlan: this.topFrom.coursePlan,
  1219. graduateGrade: this.topFrom.graduateGrade,
  1220. saleActivityDesc: this.topFrom.saleActivityDesc,
  1221. basicStudentNum: this.topFrom.basicStudentNum,
  1222. paymentUserType: this.topFrom.paymentUserType,
  1223. chargeMode: this.topFrom.chargeMode
  1224. };
  1225. // obj.musicGroupPaymentEntities = [];
  1226. // createTeam
  1227. if (this.teamStatus != "newTeam") {
  1228. return await resetTeamBaseInfo(obj).then(async (res) => {
  1229. if (res.code == 200) {
  1230. localStorage.setItem(
  1231. `${this.teamid}base`,
  1232. JSON.stringify(this.topFrom)
  1233. );
  1234. this.$emit("getBaseInfo");
  1235. if (this.teamStatus == "teamDraft") {
  1236. this.$message.success("保存成功");
  1237. if (!str) {
  1238. this.$emit("handleClick", { name: "2" });
  1239. }
  1240. resolve(true);
  1241. // 跳到第二页
  1242. } else {
  1243. this.$message.success("修改乐团成功");
  1244. // this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
  1245. }
  1246. resolve(true);
  1247. }
  1248. });
  1249. } else {
  1250. // 发送建团申请 成功后跳到第二页
  1251. createTeam(obj).then((res) => {
  1252. if (res.code == 200) {
  1253. // this.$message.success('建团成功,请设置声部信息')
  1254. // this.$emit("chiosetab", 1);
  1255. const h = this.$createElement;
  1256. this.$msgbox({
  1257. title: "提示",
  1258. message: h("p", null, [
  1259. h("p", null, "新乐团基础信息创建完成"),
  1260. h("p", null, "请设置声部信息"),
  1261. ]),
  1262. type: "warning",
  1263. confirmButtonText: "是",
  1264. cancelButtonText: "否",
  1265. showCancelButton: true,
  1266. customClass: "messageBox-prompt-test",
  1267. })
  1268. .then(() => {
  1269. this.$router.push(
  1270. {
  1271. query: merge(this.$route.query, {
  1272. type: "teamDraft",
  1273. id: res.data,
  1274. team_status: "DRAFT",
  1275. }),
  1276. },
  1277. (router) => {
  1278. console.log(router);
  1279. router.meta.title = "乐团编辑中";
  1280. }
  1281. );
  1282. this.$emit("getName", this.topFrom.name);
  1283. this.$emit("handleClick", { name: "2" });
  1284. return true;
  1285. })
  1286. .catch(() => {
  1287. this.$router.push(
  1288. {
  1289. query: merge(this.$route.query, {
  1290. type: "teamDraft",
  1291. id: res.data,
  1292. team_status: "DRAFT",
  1293. }),
  1294. },
  1295. (router) => {
  1296. console.log(router);
  1297. router.meta.title = "乐团编辑中";
  1298. }
  1299. );
  1300. this.$emit("getName", this.topFrom.name);
  1301. this.init();
  1302. return true;
  1303. });
  1304. }
  1305. });
  1306. }
  1307. // 发请求
  1308. }
  1309. });
  1310. });
  1311. },
  1312. changeApplyTime(val) {
  1313. this.$set(this.topFrom, "paymentValidStartDate", "");
  1314. this.$set(this.topFrom, "paymentValidEndDate", "");
  1315. // this.topFrom.paymentValidStartDate = ''
  1316. // this.topFrom.paymentValidEndDate = ''
  1317. },
  1318. onReset() {
  1319. this.topFrom = {
  1320. type: "", // 收费类型
  1321. section: "", //所属分部
  1322. school: "", // 合作单位
  1323. courseViewType: "",
  1324. teacher: "", // 乐团主管
  1325. name: "", //乐团名称
  1326. boss: "", // 运营主管
  1327. time: "", // 报名截止时间
  1328. startClass: [], // 招生年级起始
  1329. paymentValid: [], // 缴费有效期时间起始
  1330. address: "", // 教学地点
  1331. salary: "", // 收费模式
  1332. head: "",
  1333. paymentPattern: "", // 缴费方式
  1334. isClass: false, //是否为课堂课
  1335. startTime: "",
  1336. ownershipType: "OWN", // 合作机构类型
  1337. feeType: null,
  1338. homeworkPushFlag: 1,
  1339. isGiveAccessories: false,
  1340. memberCourseShowFlag: 0,
  1341. extracurricularTeacher: "NORMAL",
  1342. musicGroupPlanMakingId: '',
  1343. firstRecruitGrade: '',
  1344. defaultChargeStandard: '',
  1345. singleTrainMinutes: '',
  1346. coursePlan: '',
  1347. graduateGrade: '',
  1348. saleActivityDesc: '',
  1349. paymentUserType:'',
  1350. chargeMode:'',
  1351. basicStudentNum:''
  1352. };
  1353. this.$refs["topinfo"].resetFields();
  1354. },
  1355. onGoHome() {
  1356. if (this.paymentNum <= 0) {
  1357. this.$message.error("当前缴费人数为0,无法开团");
  1358. return;
  1359. }
  1360. this.$confirm(`是否确认开团?`, "提示", {
  1361. confirmButtonText: "确定",
  1362. cancelButtonText: "取消",
  1363. type: "warning",
  1364. })
  1365. .then(() => {
  1366. musicGroupFound({
  1367. musicGroupId: this.$route.query.id,
  1368. }).then((res) => {
  1369. if (res.code == 200) {
  1370. // let query = this.$route.query;
  1371. // this.$message.success("开启成功");
  1372. // this.$router.push({
  1373. // path: "/teamList",
  1374. // query: {
  1375. // ...query,
  1376. // },
  1377. // });
  1378. this.onCancel();
  1379. }
  1380. });
  1381. })
  1382. .catch(() => {});
  1383. },
  1384. payStart() {
  1385. this.paymentStatus = true;
  1386. },
  1387. getStudentStatus() {
  1388. let obj = {
  1389. musicGroupId: this.teamid,
  1390. page: 1,
  1391. rows: 9999,
  1392. };
  1393. if (!this.teamid) return;
  1394. getStudentList(obj).then((res) => {
  1395. if (res.code == 200) {
  1396. res.data.rows.forEach((item) => {
  1397. // '未开启缴费', '开启缴费', '已缴费'
  1398. if (item.paymentStatus == 2) {
  1399. this.paymentNum += 1;
  1400. }
  1401. });
  1402. // this.rightList = res.data.rows;
  1403. // this.rules.total = res.data.total;
  1404. // return res;
  1405. }
  1406. });
  1407. },
  1408. payDate() {
  1409. let self = this;
  1410. return {
  1411. firstDayOfWeek: 1,
  1412. disabledDate(time) {
  1413. if (self.applyExpireDate) {
  1414. return (
  1415. time.getTime() <=
  1416. new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
  1417. );
  1418. } else {
  1419. return false;
  1420. }
  1421. },
  1422. };
  1423. },
  1424. onStartPayment(formName) {
  1425. // 开启缴费
  1426. this.$refs[formName].validate((valid) => {
  1427. if (valid) {
  1428. musicGroupOpenPay({
  1429. musicGroupId: this.teamid,
  1430. expireDate: this.paymentForm.paymentExpireDate,
  1431. // feeType: this.paymentForm.feeType
  1432. }).then((res) => {
  1433. if (res.code == 200) {
  1434. this.$message.success("开启成功");
  1435. this.paymentStatus = false;
  1436. this.$store.dispatch("delVisitedViews", this.$route);
  1437. this.$router.push({ path: "/teamList" });
  1438. // this.$router.push({
  1439. // path: "/business/resetTeaming",
  1440. // query: {
  1441. // status: "PAY",
  1442. // id: this.$route.query.id,
  1443. // name: this.$route.query.name,
  1444. // },
  1445. // });
  1446. // this.team_status = "PAY";
  1447. // this.paymentExpireDate = this.paymentForm.paymentExpireDate;
  1448. // this.getList();
  1449. }
  1450. });
  1451. } else {
  1452. return false;
  1453. }
  1454. });
  1455. },
  1456. applyDate() {
  1457. let self = this;
  1458. return {
  1459. firstDayOfWeek: 1,
  1460. disabledDate(time) {
  1461. if (self.paymentExpireDate) {
  1462. return (
  1463. time.getTime() >
  1464. new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
  1465. );
  1466. } else {
  1467. return false;
  1468. }
  1469. },
  1470. };
  1471. },
  1472. extendTime(isPay) {
  1473. this.isPay = isPay;
  1474. if (isPay) {
  1475. // 点击的延长缴费
  1476. this.extendForm.expireDate = this.paymentExpireDate;
  1477. } else {
  1478. // 点击的延长报名
  1479. this.extendForm.expireDate = this.applyExpireDate;
  1480. }
  1481. this.extendPaymentStatus = true;
  1482. },
  1483. onExtendPayment(formName, isPay) {
  1484. this.$refs[formName].validate((valid) => {
  1485. if (valid) {
  1486. if (!isPay) {
  1487. extensionApplyExpire({
  1488. musicGroupId: this.teamid,
  1489. expireDate: this.extendForm.expireDate,
  1490. }).then((res) => {
  1491. if (res.code == 200) {
  1492. this.$message.success("延长报名成功");
  1493. this.extendPaymentStatus = false;
  1494. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1495. if (res.code == 200) {
  1496. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1497. this.setBase(res);
  1498. }
  1499. });
  1500. } else {
  1501. this.$message.error(res.msg);
  1502. }
  1503. });
  1504. } else {
  1505. extensionPayment({
  1506. musicGroupId: this.teamid,
  1507. expireDate: this.extendForm.expireDate,
  1508. }).then((res) => {
  1509. if (res.code == 200) {
  1510. this.$message.success("延长缴费成功");
  1511. this.extendPaymentStatus = false;
  1512. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  1513. if (res.code == 200) {
  1514. this.paymentExpireDate =
  1515. res.data.musicGroup.paymentExpireDate;
  1516. }
  1517. });
  1518. } else {
  1519. this.$message.error(res.msg);
  1520. }
  1521. });
  1522. }
  1523. }
  1524. });
  1525. },
  1526. onCreateQRCode(type) {
  1527. // 生成报名二维码
  1528. let id = this.teamid;
  1529. this.codeStatus = true;
  1530. if (type == "payment") {
  1531. this.codeTitle = "学员报名链接";
  1532. this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  1533. } else if (type == "detail") {
  1534. let teamName = this.$route.query.name;
  1535. this.codeTitle = "报名缴费详情";
  1536. this.qrCodeUrl =
  1537. vaildTeacherUrl() +
  1538. "/#/order?musicGroupId=" +
  1539. id +
  1540. "&musicGroupName=" +
  1541. teamName;
  1542. } else if (type == "rePayment") {
  1543. this.codeTitle = "学生报名链接(无乐器)";
  1544. this.qrCodeUrl =
  1545. vaildStudentUrl() + "/#/login?musicGroupId=" + id + "&instrument=1";
  1546. }
  1547. },
  1548. gotoStudentList() {
  1549. this.$router.push({
  1550. query: merge(this.$route.query, { tabrouter: 7 }),
  1551. });
  1552. // this.$router.replace({query:{...this.$route.query,tabrouter:7}})
  1553. },
  1554. setBase(res) {
  1555. this.topFrom.name = res.data.musicGroup.name;
  1556. this.$emit("getName", this.topFrom.name);
  1557. this.topFrom.time = res.data.musicGroup.applyExpireDate;
  1558. this.topFrom.type = res.data.musicGroup.chargeTypeId;
  1559. this.topFrom.startClass = res.data.musicGroup.enrollClasses.split(",");
  1560. this.topFrom.paymentPattern = res.data.musicGroup.paymentPattern;
  1561. this.topFrom.paymentValidStartDate =
  1562. res.data.musicGroup.paymentValidStartDate;
  1563. this.topFrom.paymentValidEndDate =
  1564. res.data.musicGroup.paymentValidEndDate;
  1565. this.topFrom.section = res.data.musicGroup.organId;
  1566. this.topFrom.courseViewType = res.data.musicGroup.courseViewType;
  1567. this.topFrom.school = res.data.musicGroup.cooperationOrganId;
  1568. this.topFrom.teacher = res.data.musicGroup.educationalTeacherId;
  1569. this.topFrom.boss = res.data.musicGroup.teamTeacherId;
  1570. this.topFrom.address = res.data.musicGroup.schoolId;
  1571. // this.topFrom.salary = res.data.musicGroup.settlementType;
  1572. this.topFrom.head = res.data.musicGroup.directorUserId
  1573. ? res.data.musicGroup.directorUserId
  1574. : null;
  1575. this.topFrom.isClass = res.data.musicGroup.isClassroomLessons;
  1576. this.topFrom.startTime = res.data.musicGroup.expectStartGroupDate;
  1577. this.topFrom.ownershipType = res.data.musicGroup.ownershipType;
  1578. this.topFrom.repairUserId = res.data.musicGroup.repairUserId
  1579. ? res.data.musicGroup.repairUserId
  1580. : null;
  1581. this.topFrom.feeType = res.data.musicGroup.feeType
  1582. ? res.data.musicGroup.feeType
  1583. : null;
  1584. this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1585. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1586. this.topFrom.transactionTeacherId =
  1587. res.data.musicGroup.transactionTeacherId || "";
  1588. this.topFrom.homeworkPushFlag = res.data.musicGroup.homeworkPushFlag;
  1589. this.topFrom.isGiveAccessories = res.data.musicGroup.isGiveAccessories+''
  1590. console.log(this.topFrom.isGiveAccessories,'isGiveAccessories')
  1591. this.topFrom.memberCourseShowFlag = res.data.musicGroup
  1592. .memberCourseShowFlag
  1593. ? 1
  1594. : 0;
  1595. this.topFrom.extracurricularTeacher =
  1596. res.data.musicGroup.extracurricularTeacher;
  1597. this.topFrom.musicGroupPlanMakingId =
  1598. res.data.musicGroup.musicGroupPlanMakingId;
  1599. this.topFrom.firstRecruitGrade =
  1600. res.data.musicGroup.firstRecruitGrade+'';
  1601. this.topFrom.defaultChargeStandard =
  1602. res.data.musicGroup.defaultChargeStandard;
  1603. this.topFrom.singleTrainMinutes =
  1604. res.data.musicGroup.singleTrainMinutes;
  1605. this.topFrom.coursePlan =
  1606. res.data.musicGroup.coursePlan;
  1607. this.topFrom.graduateGrade =
  1608. res.data.musicGroup.graduateGrade+'';
  1609. this.topFrom.saleActivityDesc =
  1610. res.data.musicGroup.saleActivityDesc;
  1611. this.topFrom.basicStudentNum =
  1612. res.data.musicGroup.basicStudentNum;
  1613. this.topFrom.paymentUserType =
  1614. res.data.musicGroup.paymentUserType;
  1615. this.topFrom.chargeMode =
  1616. res.data.musicGroup.chargeMode;
  1617. localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
  1618. },
  1619. changeType(val) {
  1620. if (val) {
  1621. localStorage.removeItem(`${this.teamid}sound`);
  1622. }
  1623. },
  1624. checkCourseView(val) {
  1625. if (this.teamStatus == "newTeam" || this.teamStatus == "teamDraft") {
  1626. return false;
  1627. } else {
  1628. if (
  1629. this.topFrom.courseViewType == 0 ||
  1630. this.topFrom.courseViewType == 1
  1631. ) {
  1632. // val ==2
  1633. return false;
  1634. } else {
  1635. return val == 0 || val == 1;
  1636. }
  1637. }
  1638. },
  1639. },
  1640. computed: {
  1641. startClassString() {
  1642. return this.topFrom.startClass
  1643. .map((item) => {
  1644. for (let i in this.classStatus) {
  1645. if (item == this.classStatus[i].value) {
  1646. return this.classStatus[i].label;
  1647. }
  1648. }
  1649. // return this.classStatus[item]
  1650. })
  1651. .join(",");
  1652. },
  1653. showNext() {
  1654. const teamStatus = this.teamStatus;
  1655. return (
  1656. teamStatus == "newTeam" ||
  1657. teamStatus == "teamDraft" ||
  1658. teamStatus == "teamAudit" ||
  1659. teamStatus == "feeAudit"
  1660. );
  1661. },
  1662. },
  1663. };
  1664. </script>
  1665. <style lang="scss" >
  1666. .messageBox-prompt-test {
  1667. .el-message-box__status {
  1668. top: 25% !important;
  1669. }
  1670. }
  1671. .base-container {
  1672. overflow: auto;
  1673. // display: flex;
  1674. // flex-direction: row;
  1675. // justify-content: flex-start;
  1676. // flex-wrap: nowrap;
  1677. font-size: 14px;
  1678. color: #444;
  1679. // width: fill-available;
  1680. .banseLeft {
  1681. // width: 1050px;
  1682. .head {
  1683. height: 48px;
  1684. line-height: 48px;
  1685. background-color: #edeef0;
  1686. font-size: 14px;
  1687. font-weight: bold;
  1688. color: #444;
  1689. padding: 0 11px;
  1690. margin-bottom: 20px;
  1691. }
  1692. .noMargin.head {
  1693. margin-bottom: 0;
  1694. }
  1695. .num {
  1696. padding: 15px 11px;
  1697. }
  1698. .checkRow {
  1699. min-width: 1200px;
  1700. padding-left: 28px;
  1701. display: flex;
  1702. flex-direction: row;
  1703. justify-content: flex-start;
  1704. flex-wrap: nowrap;
  1705. overflow: auto;
  1706. .el-checkbox {
  1707. line-height: 72px;
  1708. width: 120px;
  1709. }
  1710. .inputWrap {
  1711. line-height: 72px;
  1712. font-size: 14px;
  1713. color: #777;
  1714. margin-left: 65px;
  1715. input {
  1716. // border: none;
  1717. // width: 80px;
  1718. // margin-right: 10px;
  1719. // outline: none;
  1720. }
  1721. }
  1722. .inputWrap.rightFirst {
  1723. margin-left: 245px;
  1724. }
  1725. .textWrap {
  1726. display: flex;
  1727. flex-direction: row;
  1728. justify-content: flex-start;
  1729. font-size: 14px;
  1730. color: #777;
  1731. align-items: center;
  1732. span {
  1733. color: #f97215;
  1734. }
  1735. }
  1736. .selectWrap {
  1737. font-size: 14px;
  1738. padding-top: 5px;
  1739. margin-left: 100px;
  1740. margin-right: 52px;
  1741. .rowSelect {
  1742. .el-input__inner {
  1743. min-height: 69px;
  1744. }
  1745. }
  1746. }
  1747. .chioseList {
  1748. display: flex;
  1749. flex-direction: row;
  1750. justify-content: flex-start;
  1751. align-items: center;
  1752. font-size: 14px;
  1753. color: #777;
  1754. margin-left: 64px;
  1755. .chioseItem {
  1756. width: 80px;
  1757. height: 30px;
  1758. border-radius: 15px;
  1759. border: 1px solid #979797;
  1760. margin-right: 10px;
  1761. line-height: 30px;
  1762. text-align: center;
  1763. cursor: pointer;
  1764. }
  1765. .chioseItem.active {
  1766. background-color: var(--color-primary);
  1767. border: 1px solid var(--color-primary);
  1768. color: #fff;
  1769. }
  1770. }
  1771. // &:nth-child(even) {
  1772. // background-color: #c6cbd4;
  1773. // input {
  1774. // background-color: #c6cbd4;
  1775. // }
  1776. // }
  1777. }
  1778. }
  1779. .btnWrap {
  1780. margin-top: 30px;
  1781. }
  1782. .el-checkbox__input.is-checked + .el-checkbox__label {
  1783. color: #606266;
  1784. }
  1785. .subTitle {
  1786. // width: 1203px;
  1787. height: 40px;
  1788. line-height: 40px;
  1789. background-color: #fefceb;
  1790. padding: 0 25px;
  1791. box-sizing: border-box;
  1792. font-size: 16px;
  1793. color: #474747;
  1794. margin-bottom: 20px;
  1795. }
  1796. .chioseWrap {
  1797. margin-bottom: 30px;
  1798. display: flex;
  1799. flex-direction: row;
  1800. padding: 0 25px;
  1801. p {
  1802. width: 80px;
  1803. font-size: 14px;
  1804. // margin-right: 30px;
  1805. }
  1806. }
  1807. .classCheckBox {
  1808. margin-right: 10px;
  1809. }
  1810. }
  1811. </style>
  1812. <style scoped lang="scss">
  1813. .banseLeft {
  1814. :deep(.el-form--inline) {
  1815. .el-form-item__content {
  1816. display: block;
  1817. }
  1818. }
  1819. ::v-deep .el-select {
  1820. width: 300px !important;
  1821. }
  1822. ::v-deep .el-date-editor {
  1823. width: 300px !important;
  1824. }
  1825. ::v-deep .el-checkbox {
  1826. margin-left: 15px !important;
  1827. }
  1828. ::v-deep .el-input {
  1829. position: relative;
  1830. font-size: 14px;
  1831. display: inline-block;
  1832. width: 300px;
  1833. }
  1834. }
  1835. input[disabled] {
  1836. background-color: #fff;
  1837. border-color: #b3b3b3;
  1838. color: #606266;
  1839. }
  1840. ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1841. background-color: #00a79d;
  1842. border-color: #00a79d;
  1843. // -webkit-box-shadow: -1px 0 0 0 rgb (19, 129, 122);
  1844. box-shadow: -1px 0 0 #00a79d;
  1845. color: #fff;
  1846. outline: none;
  1847. }
  1848. ::v-deep .el-radio-button__inner {
  1849. &:hover {
  1850. color: #00a79d;
  1851. }
  1852. outline: none;
  1853. }
  1854. ::v-deep .el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) {
  1855. -webkit-box-shadow: none;
  1856. box-shadow: none;
  1857. }
  1858. </style>