teamBaseInfo.vue 59 KB

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