teamBaseInfo.vue 58 KB

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